@xyo-network/os-react-runtime 7.2.1 → 7.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/helpers/BridgeActivityHelper.d.ts +1 -1
- package/dist/browser/helpers/BrowserLocator.d.ts +1 -1
- package/dist/browser/helpers/BrowserLocator.d.ts.map +1 -1
- package/dist/browser/helpers/widget/Caller.d.ts.map +1 -1
- package/dist/browser/img/backgrounds/index.d.ts +18 -18
- package/dist/browser/img/backgrounds/index.d.ts.map +1 -1
- package/dist/browser/index.mjs +210 -180
- package/dist/browser/index.mjs.map +1 -1
- package/dist/browser/modules/Dapp/Alert/RenderErrorWithSupportLink.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/Button/StyledDappIconBuilder.d.ts +1 -1
- package/dist/browser/modules/Dapp/Button/lib/decomposeProps.d.ts +9 -1098
- package/dist/browser/modules/Dapp/Button/lib/decomposeProps.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/Page/DappPathSwitcher.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/modules/Window/LoadingFlexbox.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/modules/Window/components/DefaultComingSoon/DefaultComingSoon.d.ts +1 -1
- package/dist/browser/modules/Dapp/modules/Window/components/DefaultComingSoon/DefaultComingSoon.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/modules/Window/components/menu/BottomNavigation.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/modules/Window/components/menu/Drawer.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/modules/Window/components/menu/StyledListItems.d.ts +1 -1
- package/dist/browser/modules/Dapp/modules/Window/components/menu/img/index.d.ts +2 -2
- package/dist/browser/modules/Dapp/modules/Window/components/menu/img/index.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/modules/Window/hooks/menu/useDappMenu.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/modules/Window/hooks/menu/useDappMenuCaller.d.ts +2 -2
- package/dist/browser/modules/Dapp/modules/Window/hooks/menu/useDappMenuCaller.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/modules/access-interface/components/Dialog.d.ts.map +1 -1
- package/dist/browser/modules/LoadingOsLogo/img/index.d.ts +1 -1
- package/dist/browser/modules/LoadingOsLogo/img/index.d.ts.map +1 -1
- package/dist/browser/modules/XyOsUi/lib/XyOsUi.d.ts.map +1 -1
- package/dist/browser/modules/bios/hooks/useKernel.d.ts +1 -1
- package/dist/browser/modules/bios/hooks/useKernel.d.ts.map +1 -1
- package/dist/browser/modules/dapps/accounts/components/AccountCard.d.ts +1 -1
- package/dist/browser/modules/dapps/accounts/components/AccountCard.d.ts.map +1 -1
- package/dist/browser/modules/dapps/accounts/models/CreditCardInput.d.ts +2 -2
- package/dist/browser/modules/dapps/accounts/models/CreditCardInput.d.ts.map +1 -1
- package/dist/browser/modules/dapps/table/head/components/StyledTableRowHeader.d.ts +1 -1
- package/dist/browser/modules/intent/useDappIntentListener2.d.ts.map +1 -1
- package/dist/browser/modules/intent/useNavigateIntent.d.ts +2 -2
- package/dist/browser/modules/intent/useNavigateIntent.d.ts.map +1 -1
- package/dist/browser/modules/network/components/LoadingIndicator.d.ts.map +1 -1
- package/dist/browser/modules/os/hooks/useDappRegistrationResults.d.ts.map +1 -1
- package/dist/browser/modules/os/hooks/useDappRegistry.d.ts.map +1 -1
- package/dist/browser/modules/os/hooks/useDappSeedPhraseRepository.d.ts +1 -1
- package/dist/browser/modules/os/hooks/useDappSeedPhraseRepository.d.ts.map +1 -1
- package/dist/browser/modules/resource/ResourceHooks.d.ts.map +1 -1
- package/dist/browser/modules/resource/useSyncExternalPayloadStore.d.ts.map +1 -1
- package/dist/browser/modules/stack/useStackReady.d.ts.map +1 -1
- package/dist/browser/modules/widgets/Types/Stat/Subtitle.d.ts +1 -1
- package/dist/browser/modules/widgets/Types/Stat/Unit.d.ts +1 -1
- package/dist/browser/modules/widgets/Types/Stat/Value.d.ts +1 -1
- package/dist/browser/modules/widgets/Types/Tables/BooleanTable.d.ts +4 -4
- package/package.json +304 -69
- package/dist/browser/modules/Dapp/modules/Window/components/menu/stories/DefaultData.d.ts +0 -10
- package/dist/browser/modules/Dapp/modules/Window/components/menu/stories/DefaultData.d.ts.map +0 -1
- package/dist/browser/modules/Dapp/modules/Window/components/menu/stories/Drawer.stories.d.ts +0 -6
- package/dist/browser/modules/Dapp/modules/Window/components/menu/stories/Drawer.stories.d.ts.map +0 -1
- package/src/helpers/BridgeActivityHelper.ts +0 -39
- package/src/helpers/BrowserLocator.ts +0 -19
- package/src/helpers/NodePalettes.ts +0 -84
- package/src/helpers/index.ts +0 -5
- package/src/helpers/monitor/XyOsBrowserMonitor.ts +0 -14
- package/src/helpers/monitor/index.ts +0 -1
- package/src/helpers/widget/Caller.tsx +0 -125
- package/src/helpers/widget/index.ts +0 -1
- package/src/img/backgrounds/candy-dark@3x.webp +0 -0
- package/src/img/backgrounds/candy-light@3x.webp +0 -0
- package/src/img/backgrounds/candyApple-dark@3x.webp +0 -0
- package/src/img/backgrounds/candyApple-light@3x.webp +0 -0
- package/src/img/backgrounds/images.d.ts +0 -5
- package/src/img/backgrounds/index.ts +0 -18
- package/src/img/backgrounds/moss-dark@3x.webp +0 -0
- package/src/img/backgrounds/moss-light@3x.webp +0 -0
- package/src/img/backgrounds/ocean-dark@3x.webp +0 -0
- package/src/img/backgrounds/ocean-light@3x.webp +0 -0
- package/src/img/backgrounds/peachYogurt-dark@3x.webp +0 -0
- package/src/img/backgrounds/peachYogurt-light@3x.webp +0 -0
- package/src/img/backgrounds/sherbet-dark@3x.webp +0 -0
- package/src/img/backgrounds/sherbet-light@3x.webp +0 -0
- package/src/img/backgrounds/spring-dark@3x.webp +0 -0
- package/src/img/backgrounds/spring-light@3x.webp +0 -0
- package/src/img/backgrounds/sunset-dark@3x.webp +0 -0
- package/src/img/backgrounds/sunset-light@3x.webp +0 -0
- package/src/img/backgrounds/xyo-dark@3x.webp +0 -0
- package/src/img/backgrounds/xyo-light@3x.webp +0 -0
- package/src/img/index.ts +0 -1
- package/src/index.ts +0 -5
- package/src/interfaces/StackReady.ts +0 -6
- package/src/interfaces/index.ts +0 -1
- package/src/modules/Dapp/Alert/RenderErrorWithSupportLink.tsx +0 -50
- package/src/modules/Dapp/Alert/index.ts +0 -1
- package/src/modules/Dapp/Button/IconEx.tsx +0 -96
- package/src/modules/Dapp/Button/LaunchFrame.tsx +0 -77
- package/src/modules/Dapp/Button/StyledComponents.tsx +0 -55
- package/src/modules/Dapp/Button/StyledDappIconBuilder.tsx +0 -17
- package/src/modules/Dapp/Button/hooks/index.ts +0 -1
- package/src/modules/Dapp/Button/hooks/useLaunchPoint.tsx +0 -31
- package/src/modules/Dapp/Button/index.ts +0 -4
- package/src/modules/Dapp/Button/lib/decomposeProps.tsx +0 -15
- package/src/modules/Dapp/Button/lib/index.ts +0 -1
- package/src/modules/Dapp/Container.tsx +0 -63
- package/src/modules/Dapp/ContainerFlexbox.tsx +0 -30
- package/src/modules/Dapp/Debug/Dialog.tsx +0 -54
- package/src/modules/Dapp/Debug/index.ts +0 -1
- package/src/modules/Dapp/EnterAnimation.tsx +0 -54
- package/src/modules/Dapp/Page/DappPage.tsx +0 -115
- package/src/modules/Dapp/Page/DappPathSwitcher.tsx +0 -58
- package/src/modules/Dapp/Page/DividerChip.tsx +0 -31
- package/src/modules/Dapp/Page/Row.tsx +0 -69
- package/src/modules/Dapp/Page/index.ts +0 -3
- package/src/modules/Dapp/RenderHtml.tsx +0 -12
- package/src/modules/Dapp/index.ts +0 -8
- package/src/modules/Dapp/lib/DappState.ts +0 -5
- package/src/modules/Dapp/lib/DefaultIconSize.ts +0 -1
- package/src/modules/Dapp/lib/deriveDappState.ts +0 -16
- package/src/modules/Dapp/lib/index.ts +0 -3
- package/src/modules/Dapp/modules/Window/AppBar.tsx +0 -115
- package/src/modules/Dapp/modules/Window/Chrome.tsx +0 -79
- package/src/modules/Dapp/modules/Window/DappWindow.tsx +0 -39
- package/src/modules/Dapp/modules/Window/LoadingFlexbox.tsx +0 -99
- package/src/modules/Dapp/modules/Window/MetaTags.tsx +0 -27
- package/src/modules/Dapp/modules/Window/NodeManifest.tsx +0 -16
- package/src/modules/Dapp/modules/Window/Rendered.tsx +0 -101
- package/src/modules/Dapp/modules/Window/Trail.tsx +0 -33
- package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/DefaultComingSoon.tsx +0 -82
- package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/DeveloperLinkSection.tsx +0 -27
- package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/InstallButtonSection.tsx +0 -34
- package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/SummarySection.tsx +0 -73
- package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/index.ts +0 -1
- package/src/modules/Dapp/modules/Window/components/index.ts +0 -2
- package/src/modules/Dapp/modules/Window/components/menu/BottomMenuArea.tsx +0 -130
- package/src/modules/Dapp/modules/Window/components/menu/BottomNavigation.tsx +0 -66
- package/src/modules/Dapp/modules/Window/components/menu/Drawer.tsx +0 -160
- package/src/modules/Dapp/modules/Window/components/menu/SocialData.tsx +0 -68
- package/src/modules/Dapp/modules/Window/components/menu/StyledListItems.tsx +0 -36
- package/src/modules/Dapp/modules/Window/components/menu/img/index.ts +0 -2
- package/src/modules/Dapp/modules/Window/components/menu/img/xyoOS-Icon-Black.svg +0 -1
- package/src/modules/Dapp/modules/Window/components/menu/img/xyoOS-Icon-White.svg +0 -1
- package/src/modules/Dapp/modules/Window/components/menu/index.ts +0 -3
- package/src/modules/Dapp/modules/Window/components/menu/stories/DefaultData.tsx +0 -118
- package/src/modules/Dapp/modules/Window/components/menu/stories/Drawer.stories.tsx +0 -36
- package/src/modules/Dapp/modules/Window/components/menu/stories/default.manifest.json +0 -20
- package/src/modules/Dapp/modules/Window/hooks/index.ts +0 -8
- package/src/modules/Dapp/modules/Window/hooks/lib/DappPathHelpers.ts +0 -34
- package/src/modules/Dapp/modules/Window/hooks/lib/detectCustomer.ts +0 -21
- package/src/modules/Dapp/modules/Window/hooks/lib/index.ts +0 -2
- package/src/modules/Dapp/modules/Window/hooks/menu/index.ts +0 -5
- package/src/modules/Dapp/modules/Window/hooks/menu/useAddDappMenuItems.ts +0 -25
- package/src/modules/Dapp/modules/Window/hooks/menu/useBuildDappMenuResource.ts +0 -39
- package/src/modules/Dapp/modules/Window/hooks/menu/useDappMenu.ts +0 -71
- package/src/modules/Dapp/modules/Window/hooks/menu/useDappMenuCaller.ts +0 -22
- package/src/modules/Dapp/modules/Window/hooks/menu/useDappMenuDependencies.ts +0 -16
- package/src/modules/Dapp/modules/Window/hooks/route/helpers/RoutingNodes.md +0 -7
- package/src/modules/Dapp/modules/Window/hooks/route/helpers/index.ts +0 -4
- package/src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappInjectableParamsFromRoute.tsx +0 -55
- package/src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappIntentRequest.tsx +0 -68
- package/src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappPathFromRoute.tsx +0 -75
- package/src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappStateFromRoute.tsx +0 -51
- package/src/modules/Dapp/modules/Window/hooks/route/index.ts +0 -1
- package/src/modules/Dapp/modules/Window/hooks/useDebugClick.ts +0 -61
- package/src/modules/Dapp/modules/Window/hooks/useDecomposeDapp.tsx +0 -21
- package/src/modules/Dapp/modules/Window/hooks/useExposedNode.ts +0 -6
- package/src/modules/Dapp/modules/Window/hooks/useSkipLoadingScreen.tsx +0 -17
- package/src/modules/Dapp/modules/Window/hooks/useSyncOsRegisteredAccessInterfaces.tsx +0 -36
- package/src/modules/Dapp/modules/Window/index.ts +0 -7
- package/src/modules/Dapp/modules/Window/types/DappMenuProperties.ts +0 -9
- package/src/modules/Dapp/modules/Window/types/DappWindowProps.ts +0 -14
- package/src/modules/Dapp/modules/Window/types/index.ts +0 -2
- package/src/modules/Dapp/modules/access-interface/components/Dialog.tsx +0 -132
- package/src/modules/Dapp/modules/access-interface/components/Flexbox.tsx +0 -29
- package/src/modules/Dapp/modules/access-interface/components/index.ts +0 -2
- package/src/modules/Dapp/modules/access-interface/hooks/index.ts +0 -1
- package/src/modules/Dapp/modules/access-interface/hooks/useDialogState.tsx +0 -28
- package/src/modules/Dapp/modules/access-interface/index.ts +0 -2
- package/src/modules/Dapp/modules/index.ts +0 -2
- package/src/modules/Dapp/useDappCaller.ts +0 -16
- package/src/modules/LoadingOsLogo/LoadingOsLogo.tsx +0 -54
- package/src/modules/LoadingOsLogo/img/index.ts +0 -1
- package/src/modules/LoadingOsLogo/img/xyoOS-Icon.svg +0 -1
- package/src/modules/LoadingOsLogo/index.ts +0 -1
- package/src/modules/XyOsUi/contexts/XyOsUiContext.ts +0 -10
- package/src/modules/XyOsUi/contexts/index.ts +0 -1
- package/src/modules/XyOsUi/index.ts +0 -2
- package/src/modules/XyOsUi/lib/XyOsUi.ts +0 -51
- package/src/modules/XyOsUi/lib/index.ts +0 -1
- package/src/modules/access-requests/NameServiceRegistrationHooks.ts +0 -36
- package/src/modules/access-requests/index.ts +0 -2
- package/src/modules/access-requests/useBuildDappAccessRequestResource.ts +0 -38
- package/src/modules/bios/hooks/index.ts +0 -2
- package/src/modules/bios/hooks/useBios.ts +0 -25
- package/src/modules/bios/hooks/useKernel.ts +0 -36
- package/src/modules/bios/index.ts +0 -1
- package/src/modules/dapps/accounts/components/AccountCard.tsx +0 -57
- package/src/modules/dapps/accounts/components/AnimatedComponents/GenericAnimations/ShiftAnimation.tsx +0 -116
- package/src/modules/dapps/accounts/components/AnimatedComponents/GenericAnimations/index.ts +0 -1
- package/src/modules/dapps/accounts/components/AnimatedComponents/IconAnimations/TwoToneBulletPoint.tsx +0 -23
- package/src/modules/dapps/accounts/components/AnimatedComponents/IconAnimations/TwoToneBulletPointList.tsx +0 -24
- package/src/modules/dapps/accounts/components/AnimatedComponents/IconAnimations/index.ts +0 -2
- package/src/modules/dapps/accounts/components/AnimatedComponents/index.ts +0 -2
- package/src/modules/dapps/accounts/components/InputFields/CoinbaseEmail.tsx +0 -41
- package/src/modules/dapps/accounts/components/InputFields/PrimaryCryptowallet.tsx +0 -42
- package/src/modules/dapps/accounts/components/InputFields/SecondaryCryptowallet.tsx +0 -42
- package/src/modules/dapps/accounts/components/InputFields/index.ts +0 -3
- package/src/modules/dapps/accounts/components/PaymentMethods.tsx +0 -51
- package/src/modules/dapps/accounts/components/index.ts +0 -3
- package/src/modules/dapps/accounts/hooks/index.ts +0 -1
- package/src/modules/dapps/accounts/hooks/useAccountArchivist.ts +0 -5
- package/src/modules/dapps/accounts/icon/Icon.tsx +0 -49
- package/src/modules/dapps/accounts/icon/custom-accounts-icon.svg +0 -1
- package/src/modules/dapps/accounts/icon/index.ts +0 -1
- package/src/modules/dapps/accounts/index.ts +0 -3
- package/src/modules/dapps/accounts/models/CreditCardInput.ts +0 -20
- package/src/modules/dapps/accounts/models/index.ts +0 -1
- package/src/modules/dapps/index.ts +0 -3
- package/src/modules/dapps/name-service/DomainIcon.tsx +0 -12
- package/src/modules/dapps/name-service/index.ts +0 -1
- package/src/modules/dapps/table/NextIteratorFlexbox.tsx +0 -33
- package/src/modules/dapps/table/head/Payload.ts +0 -11
- package/src/modules/dapps/table/head/Schema.ts +0 -4
- package/src/modules/dapps/table/head/components/Head.tsx +0 -47
- package/src/modules/dapps/table/head/components/StyledTableRowHeader.tsx +0 -6
- package/src/modules/dapps/table/head/components/index.ts +0 -1
- package/src/modules/dapps/table/head/hooks/index.ts +0 -1
- package/src/modules/dapps/table/head/hooks/useVisibleColumns.tsx +0 -15
- package/src/modules/dapps/table/head/index.ts +0 -4
- package/src/modules/dapps/table/index.ts +0 -2
- package/src/modules/index.ts +0 -12
- package/src/modules/intent/DappIntentResourceHooks.ts +0 -35
- package/src/modules/intent/index.ts +0 -7
- package/src/modules/intent/useClearIntents.ts +0 -14
- package/src/modules/intent/useDappIntentCaller.ts +0 -17
- package/src/modules/intent/useDappIntentListener.ts +0 -53
- package/src/modules/intent/useDappIntentListener2.ts +0 -48
- package/src/modules/intent/useNavigateIntent.ts +0 -51
- package/src/modules/intent/useSendDappIntent.ts +0 -38
- package/src/modules/network/components/LoadingIndicator.tsx +0 -51
- package/src/modules/network/components/NetworkButton.tsx +0 -27
- package/src/modules/network/components/NetworkReady.tsx +0 -31
- package/src/modules/network/components/StyledLoadingIndicator.tsx +0 -49
- package/src/modules/network/components/index.ts +0 -3
- package/src/modules/network/hooks/index.ts +0 -2
- package/src/modules/network/hooks/lib/NetworkState.ts +0 -8
- package/src/modules/network/hooks/lib/createNetworkState.ts +0 -20
- package/src/modules/network/hooks/lib/index.ts +0 -2
- package/src/modules/network/hooks/useOsNetwork.tsx +0 -17
- package/src/modules/network/hooks/useXyoPublicNetwork.tsx +0 -17
- package/src/modules/network/index.ts +0 -2
- package/src/modules/os/hooks/index.ts +0 -8
- package/src/modules/os/hooks/useDappContextCreator.ts +0 -89
- package/src/modules/os/hooks/useDappRegistrationResults.ts +0 -30
- package/src/modules/os/hooks/useDappRegistry.ts +0 -19
- package/src/modules/os/hooks/useDappSeedPhraseRepository.ts +0 -19
- package/src/modules/os/hooks/useOsSettingsCaller.ts +0 -19
- package/src/modules/os/hooks/usePhraseFile.ts +0 -33
- package/src/modules/os/hooks/useTabs.ts +0 -14
- package/src/modules/os/hooks/useWidgetDapps.ts +0 -23
- package/src/modules/os/index.ts +0 -1
- package/src/modules/resource/ResourceHooks.ts +0 -45
- package/src/modules/resource/index.ts +0 -3
- package/src/modules/resource/useCleanup.ts +0 -10
- package/src/modules/resource/useSyncExternalPayloadStore.ts +0 -37
- package/src/modules/stack/index.ts +0 -1
- package/src/modules/stack/useStackReady.ts +0 -48
- package/src/modules/widgets/StackOfWidgets.tsx +0 -149
- package/src/modules/widgets/Types/BarGraph/HorizontalBarGraph.tsx +0 -58
- package/src/modules/widgets/Types/BarGraph/StyledLinearProgress.tsx +0 -12
- package/src/modules/widgets/Types/BarGraph/index.ts +0 -2
- package/src/modules/widgets/Types/DataColumns/TwoColFourStat.tsx +0 -34
- package/src/modules/widgets/Types/DataColumns/TwoColTwoStat.tsx +0 -39
- package/src/modules/widgets/Types/DataColumns/index.ts +0 -1
- package/src/modules/widgets/Types/Examples/BarGraph.tsx +0 -10
- package/src/modules/widgets/Types/Examples/BooleanTable.tsx +0 -27
- package/src/modules/widgets/Types/Examples/TwoColTwoStat.tsx +0 -27
- package/src/modules/widgets/Types/Examples/index.ts +0 -3
- package/src/modules/widgets/Types/Stat/Insight.ts +0 -9
- package/src/modules/widgets/Types/Stat/InsightStatProps.ts +0 -7
- package/src/modules/widgets/Types/Stat/Stat.tsx +0 -41
- package/src/modules/widgets/Types/Stat/Subtitle.tsx +0 -14
- package/src/modules/widgets/Types/Stat/Unit.tsx +0 -13
- package/src/modules/widgets/Types/Stat/Value.tsx +0 -16
- package/src/modules/widgets/Types/Stat/index.ts +0 -3
- package/src/modules/widgets/Types/Tables/BooleanTable.tsx +0 -88
- package/src/modules/widgets/Types/Tables/index.ts +0 -1
- package/src/modules/widgets/Types/index.ts +0 -4
- package/src/modules/widgets/WidgetCard.tsx +0 -111
- package/src/modules/widgets/WidgetCardExamples.tsx +0 -31
- package/src/modules/widgets/index.ts +0 -2
- package/src/settings/Theme/ThemeCssVars.ts +0 -228
- package/src/settings/Theme/ThemeProvider.tsx +0 -20
- package/src/settings/Theme/index.ts +0 -1
- package/src/settings/index.ts +0 -1
- package/src/types/global.d.ts +0 -11
- package/src/types/images.d.ts +0 -4
- package/src/utils/DappInstallTypeFilters.ts +0 -27
- package/src/utils/getApiDomain.ts +0 -14
- package/src/utils/index.ts +0 -3
- package/src/utils/useOnWindowResize.tsx +0 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/helpers/BridgeActivityHelper.ts","../../src/helpers/BrowserLocator.ts","../../src/helpers/monitor/XyOsBrowserMonitor.ts","../../src/img/backgrounds/index.ts","../../src/helpers/NodePalettes.ts","../../src/helpers/widget/Caller.tsx","../../src/modules/access-requests/NameServiceRegistrationHooks.ts","../../src/modules/XyOsUi/contexts/XyOsUiContext.ts","../../src/modules/XyOsUi/lib/XyOsUi.ts","../../src/modules/resource/ResourceHooks.ts","../../src/modules/resource/useCleanup.ts","../../src/modules/resource/useSyncExternalPayloadStore.ts","../../src/modules/access-requests/useBuildDappAccessRequestResource.ts","../../src/modules/bios/hooks/useBios.ts","../../src/modules/bios/hooks/useKernel.ts","../../src/modules/Dapp/Alert/RenderErrorWithSupportLink.tsx","../../src/modules/Dapp/Container.tsx","../../src/modules/os/hooks/useDappContextCreator.ts","../../src/modules/os/hooks/useDappRegistrationResults.ts","../../src/modules/os/hooks/useDappRegistry.ts","../../src/modules/os/hooks/useDappSeedPhraseRepository.ts","../../src/modules/os/hooks/useOsSettingsCaller.ts","../../src/modules/stack/useStackReady.ts","../../src/modules/os/hooks/usePhraseFile.ts","../../src/modules/os/hooks/useTabs.ts","../../src/modules/os/hooks/useWidgetDapps.ts","../../src/modules/Dapp/Button/hooks/useLaunchPoint.tsx","../../src/utils/DappInstallTypeFilters.ts","../../src/utils/getApiDomain.ts","../../src/utils/useOnWindowResize.tsx","../../src/modules/Dapp/Button/IconEx.tsx","../../src/modules/intent/DappIntentResourceHooks.ts","../../src/modules/intent/useClearIntents.ts","../../src/modules/intent/useDappIntentCaller.ts","../../src/modules/intent/useDappIntentListener.ts","../../src/modules/intent/useDappIntentListener2.ts","../../src/modules/intent/useNavigateIntent.ts","../../src/modules/intent/useSendDappIntent.ts","../../src/modules/Dapp/lib/DefaultIconSize.ts","../../src/modules/Dapp/lib/deriveDappState.ts","../../src/modules/Dapp/RenderHtml.tsx","../../src/modules/Dapp/Button/LaunchFrame.tsx","../../src/modules/Dapp/Button/lib/decomposeProps.tsx","../../src/modules/Dapp/Button/StyledComponents.tsx","../../src/modules/Dapp/modules/access-interface/components/Dialog.tsx","../../src/modules/Dapp/modules/access-interface/components/Flexbox.tsx","../../src/modules/Dapp/modules/access-interface/hooks/useDialogState.tsx","../../src/modules/Dapp/useDappCaller.ts","../../src/modules/Dapp/modules/Window/AppBar.tsx","../../src/modules/Dapp/Debug/Dialog.tsx","../../src/modules/Dapp/modules/Window/hooks/lib/DappPathHelpers.ts","../../src/modules/Dapp/modules/Window/hooks/lib/detectCustomer.ts","../../src/modules/Dapp/modules/Window/hooks/menu/useAddDappMenuItems.ts","../../src/modules/Dapp/modules/Window/hooks/menu/useBuildDappMenuResource.ts","../../src/modules/Dapp/modules/Window/hooks/menu/useDappMenuCaller.ts","../../src/modules/Dapp/modules/Window/hooks/menu/useDappMenu.ts","../../src/modules/Dapp/modules/Window/hooks/menu/useDappMenuDependencies.ts","../../src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappInjectableParamsFromRoute.tsx","../../src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappIntentRequest.tsx","../../src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappPathFromRoute.tsx","../../src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappStateFromRoute.tsx","../../src/modules/Dapp/modules/Window/hooks/useDebugClick.ts","../../src/modules/Dapp/modules/Window/hooks/useDecomposeDapp.tsx","../../src/modules/Dapp/modules/Window/NodeManifest.tsx","../../src/modules/Dapp/modules/Window/hooks/useExposedNode.ts","../../src/modules/Dapp/modules/Window/hooks/useSkipLoadingScreen.tsx","../../src/modules/Dapp/modules/Window/hooks/useSyncOsRegisteredAccessInterfaces.tsx","../../src/modules/Dapp/modules/Window/Chrome.tsx","../../src/modules/Dapp/modules/Window/components/DefaultComingSoon/DefaultComingSoon.tsx","../../src/modules/Dapp/modules/Window/components/DefaultComingSoon/InstallButtonSection.tsx","../../src/modules/Dapp/modules/Window/components/DefaultComingSoon/SummarySection.tsx","../../src/modules/Dapp/modules/Window/components/DefaultComingSoon/DeveloperLinkSection.tsx","../../src/modules/Dapp/modules/Window/components/menu/BottomNavigation.tsx","../../src/modules/Dapp/modules/Window/components/menu/Drawer.tsx","../../src/modules/Dapp/modules/Window/components/menu/BottomMenuArea.tsx","../../src/modules/Dapp/modules/Window/components/menu/img/xyoOS-Icon-White.svg","../../src/modules/Dapp/modules/Window/components/menu/SocialData.tsx","../../src/modules/Dapp/modules/Window/components/menu/StyledListItems.tsx","../../src/modules/Dapp/modules/Window/DappWindow.tsx","../../src/modules/Dapp/modules/Window/MetaTags.tsx","../../src/modules/Dapp/modules/Window/Rendered.tsx","../../src/modules/Dapp/modules/Window/LoadingFlexbox.tsx","../../src/modules/LoadingOsLogo/LoadingOsLogo.tsx","../../src/modules/LoadingOsLogo/img/xyoOS-Icon.svg","../../src/modules/Dapp/modules/Window/Trail.tsx","../../src/modules/Dapp/ContainerFlexbox.tsx","../../src/modules/Dapp/Page/DappPage.tsx","../../src/modules/network/components/LoadingIndicator.tsx","../../src/modules/network/hooks/useOsNetwork.tsx","../../src/modules/network/hooks/lib/createNetworkState.ts","../../src/modules/network/hooks/useXyoPublicNetwork.tsx","../../src/modules/network/components/StyledLoadingIndicator.tsx","../../src/modules/network/components/NetworkButton.tsx","../../src/modules/network/components/NetworkReady.tsx","../../src/modules/Dapp/Page/DappPathSwitcher.tsx","../../src/modules/Dapp/Page/Row.tsx","../../src/modules/Dapp/Page/DividerChip.tsx","../../src/modules/dapps/accounts/components/AnimatedComponents/GenericAnimations/ShiftAnimation.tsx","../../src/modules/dapps/accounts/components/AnimatedComponents/IconAnimations/TwoToneBulletPoint.tsx","../../src/modules/dapps/accounts/components/AnimatedComponents/IconAnimations/TwoToneBulletPointList.tsx","../../src/modules/dapps/accounts/components/InputFields/CoinbaseEmail.tsx","../../src/modules/dapps/accounts/components/InputFields/PrimaryCryptowallet.tsx","../../src/modules/dapps/accounts/components/InputFields/SecondaryCryptowallet.tsx","../../src/modules/dapps/accounts/components/PaymentMethods.tsx","../../src/modules/dapps/accounts/components/AccountCard.tsx","../../src/modules/dapps/accounts/hooks/useAccountArchivist.ts","../../src/modules/dapps/accounts/models/CreditCardInput.ts","../../src/modules/dapps/name-service/DomainIcon.tsx","../../src/modules/dapps/table/head/components/Head.tsx","../../src/modules/dapps/table/head/hooks/useVisibleColumns.tsx","../../src/modules/dapps/table/head/components/StyledTableRowHeader.tsx","../../src/modules/dapps/table/head/Payload.ts","../../src/modules/dapps/table/head/Schema.ts","../../src/modules/dapps/table/NextIteratorFlexbox.tsx","../../src/modules/widgets/WidgetCard.tsx","../../src/modules/widgets/WidgetCardExamples.tsx","../../src/modules/widgets/StackOfWidgets.tsx","../../src/modules/widgets/Types/BarGraph/HorizontalBarGraph.tsx","../../src/modules/widgets/Types/BarGraph/StyledLinearProgress.tsx","../../src/modules/widgets/Types/DataColumns/TwoColTwoStat.tsx","../../src/modules/widgets/Types/Examples/BarGraph.tsx","../../src/modules/widgets/Types/Examples/BooleanTable.tsx","../../src/modules/widgets/Types/Tables/BooleanTable.tsx","../../src/modules/widgets/Types/Examples/TwoColTwoStat.tsx","../../src/settings/Theme/ThemeProvider.tsx"],"sourcesContent":["import type {\n Address, BaseParams, EmptyObject,\n} from '@xylabs/sdk-js'\nimport { assertEx, BaseEmitter } from '@xylabs/sdk-js'\nimport type { ArchivistInstance, ArchivistNextOptions } from '@xyo-network/archivist-model'\nimport type { DivinerInstance } from '@xyo-network/diviner-model'\nimport { GenericPayloadDivinerConfigSchema } from '@xyo-network/diviner-payload-generic'\nimport type { PayloadDivinerQueryPayload } from '@xyo-network/diviner-payload-model'\nimport { PayloadDivinerQuerySchema } from '@xyo-network/diviner-payload-model'\n\nexport interface BridgeActivityHelperParams extends BaseParams {\n archivist: WeakRef<ArchivistInstance>\n diviner: WeakRef<DivinerInstance>\n}\n\nexport class BridgeActivityHelper<TParams extends BridgeActivityHelperParams | void = void> extends BaseEmitter<\n TParams extends BridgeActivityHelperParams ? TParams : BridgeActivityHelperParams\n> {\n get archivist() {\n return assertEx(this.params.archivist.deref(), () => 'Archivist is missing')\n }\n\n get diviner() {\n const result = assertEx(this.params.diviner.deref(), () => 'Diviner is missing')\n assertEx(result.config.schema === GenericPayloadDivinerConfigSchema, () => 'Diviner is not a generic payload diviner')\n return result\n }\n\n next(options?: ArchivistNextOptions) {\n return this.archivist.next(options)\n }\n\n nextByAddress(address: Address, options?: Pick<PayloadDivinerQueryPayload<EmptyObject>, 'cursor' | 'order'>) {\n const query: PayloadDivinerQueryPayload<EmptyObject> = {\n address, ...options, schema: PayloadDivinerQuerySchema,\n }\n return this.diviner.divine([query])\n }\n}\n","import { IndexedDbArchivist } from '@xyo-network/archivist-indexeddb'\nimport { IndexedDbBoundWitnessDiviner } from '@xyo-network/diviner-boundwitness-indexeddb'\nimport { GenericPayloadDiviner } from '@xyo-network/diviner-payload-generic'\nimport { IndexedDbPayloadDiviner } from '@xyo-network/diviner-payload-indexeddb'\nimport { ModuleFactoryLocator } from '@xyo-network/module-factory-locator'\nimport { asSchema } from '@xyo-network/payload-model'\n\nexport const GenericPayloadDivinerTags = { 'network.xyo.generic.payload.diviner': 'GenericPayloadDiviner' }\n\nexport const BrowserLocator = new ModuleFactoryLocator()\nBrowserLocator.register(GenericPayloadDiviner.factory(), GenericPayloadDivinerTags)\nBrowserLocator.register(IndexedDbArchivist.factory(), { 'network.xyo.archivist.persistence.scope': 'device' }, asSchema('network.xyo.archivist.config', true))\nBrowserLocator.register(IndexedDbPayloadDiviner.factory(), { 'network.xyo.archivist.persistence.scope': 'device' }, asSchema('network.xyo.diviner.payload.config', true))\nBrowserLocator.register(\n IndexedDbBoundWitnessDiviner.factory(),\n { 'network.xyo.archivist.persistence.scope': 'device' },\n asSchema('network.xyo.diviner.boundwitness.config', true),\n)\nBrowserLocator.freeze()\n","import type { Connection } from '@xyo-network/os-runtime'\nimport { XyOsMonitor } from '@xyo-network/os-runtime'\n\nexport class XyOsBrowserMonitor extends XyOsMonitor {\n protected connection(): Connection | undefined {\n try {\n if (globalThis !== undefined) {\n return 'connection' in globalThis.navigator ? (globalThis.navigator.connection as unknown as Connection) : undefined\n }\n } catch {\n return\n }\n }\n}\n","export { default as candyDark } from './candy-dark@3x.webp'\nexport { default as candyLight } from './candy-light@3x.webp'\nexport { default as candyAppleDark } from './candyApple-dark@3x.webp'\nexport { default as candyAppleLight } from './candyApple-light@3x.webp'\nexport { default as mossDark } from './moss-dark@3x.webp'\nexport { default as mossLight } from './moss-light@3x.webp'\nexport { default as oceanDark } from './ocean-dark@3x.webp'\nexport { default as oceanLight } from './ocean-light@3x.webp'\nexport { default as peachYogurtDark } from './peachYogurt-dark@3x.webp'\nexport { default as peachYogurtLight } from './peachYogurt-light@3x.webp'\nexport { default as sherbetDark } from './sherbet-dark@3x.webp'\nexport { default as sherbetLight } from './sherbet-light@3x.webp'\nexport { default as springDark } from './spring-dark@3x.webp'\nexport { default as springLight } from './spring-light@3x.webp'\nexport { default as sunsetDark } from './sunset-dark@3x.webp'\nexport { default as sunsetLight } from './sunset-light@3x.webp'\nexport { default as xyoDark } from './xyo-dark@3x.webp'\nexport { default as xyoLight } from './xyo-light@3x.webp'\n","import type { PaletteList } from '@xyo-network/os-model'\n\nimport {\n candyAppleDark,\n candyAppleLight,\n candyDark,\n candyLight,\n mossDark,\n mossLight,\n oceanDark,\n oceanLight,\n peachYogurtDark,\n peachYogurtLight,\n sherbetDark,\n sherbetLight,\n springDark,\n springLight,\n sunsetDark,\n sunsetLight,\n xyoDark,\n xyoLight,\n} from '../img/index.ts'\n\nexport const OsPalettes: PaletteList = {\n candy: {\n darkModeWallpaper: candyDark,\n lightModeWallpaper: candyLight,\n nameCode: 'candy',\n readableName: 'Candy',\n },\n candyApple: {\n darkModeWallpaper: candyAppleDark,\n lightModeWallpaper: candyAppleLight,\n nameCode: 'candyApple',\n readableName: 'Candy Apple',\n },\n moss: {\n darkModeWallpaper: mossDark,\n lightModeWallpaper: mossLight,\n nameCode: 'moss',\n readableName: 'Moss',\n },\n ocean: {\n darkModeWallpaper: oceanDark,\n lightModeWallpaper: oceanLight,\n nameCode: 'ocean',\n readableName: 'Ocean',\n },\n peachYogurt: {\n darkModeWallpaper: peachYogurtDark,\n lightModeWallpaper: peachYogurtLight,\n nameCode: 'peachYogurt',\n readableName: 'Peach Yogurt',\n },\n sherbet: {\n darkModeWallpaper: sherbetDark,\n lightModeWallpaper: sherbetLight,\n nameCode: 'sherbet',\n readableName: 'Sherbet',\n },\n spring: {\n darkModeWallpaper: springDark,\n lightModeWallpaper: springLight,\n nameCode: 'spring',\n readableName: 'Spring',\n },\n sunset: {\n darkModeWallpaper: sunsetDark,\n lightModeWallpaper: sunsetLight,\n nameCode: 'sunset',\n readableName: 'Sunset',\n },\n xyo: {\n darkModeWallpaper: xyoDark,\n lightModeWallpaper: xyoLight,\n nameCode: 'xyo',\n readableName: 'XYO',\n },\n}\n\nexport const getNodePaletteByNameCode = (nameCode?: string) => {\n const castNameCode = nameCode as keyof typeof OsPalettes\n return OsPalettes[castNameCode]\n}\n","import type { Hash } from '@xylabs/sdk-js'\nimport {\n assertEx, fulfilled, rejected,\n} from '@xylabs/sdk-js'\nimport type {\n DappWidgetConfig, WidgetTray, WidgetTrayLayout, XyOsContext,\n} from '@xyo-network/os-model'\nimport { WidgetTraySchema } from '@xyo-network/os-model'\nimport type { RegisteredReactDappSet } from '@xyo-network/os-react-model'\nimport { OsCallerBase } from '@xyo-network/os-runtime'\nimport type { Payload } from '@xyo-network/payload-model'\nimport type { FC, JSX } from 'react'\nimport React from 'react'\n\ntype WidgetResults = [(JSX.Element | undefined)[] | undefined, (Error | undefined)[]] | undefined\n\nexport class WidgetCaller extends OsCallerBase {\n private _registeredDappSets?: RegisteredReactDappSet[]\n private _widgetTrayLayout?: WidgetTrayLayout\n constructor(\n context: XyOsContext,\n _registeredDappSets?: RegisteredReactDappSet[],\n _widgetTrayLayout?: WidgetTrayLayout,\n ) {\n super(context)\n this._registeredDappSets = _registeredDappSets\n this._widgetTrayLayout = _widgetTrayLayout\n }\n\n get dappsAsObject() {\n const acc = {} as Record<string, RegisteredReactDappSet>\n for (const dapp of this.registeredDappSets) {\n acc[dapp.dapp.config.name] = dapp\n }\n return acc\n }\n\n get registeredDappSets() {\n return assertEx(this._registeredDappSets, () => 'Registered Dapp Sets not available')\n }\n\n get widgetTrayLayout() {\n return assertEx(this._widgetTrayLayout, () => 'Widget Tray Layout not available')\n }\n\n async buildWidgetComponents() {\n const widgetTray = this.widgetTrayFromLayout(this.widgetTrayLayout)\n\n const results = await Promise.allSettled(\n widgetTray.widgetConfigs.map(async (config) => {\n // Find the widget component in the registered Dapps\n const Param: FC<{\n payload?: Payload\n }> | undefined = this.dappsAsObject[config.dappId].dapp.params.modes[config.mode ?? config.dappId]?.component\n\n // Try to find the config payload\n let payload: Payload | undefined\n if (config.configHash) {\n const archivist = await this.getDappsArchivist()\n const foundConfig = assertEx((await archivist.get([config.configHash]))?.[0], () => `Config - ${config.configHash} not found`)\n payload = foundConfig\n }\n\n // Return the widget component\n return Param ? <Param payload={payload} /> : undefined\n }),\n )\n\n const successfulResults = results.filter(fulfilled).map(result => result.value)\n const failedResults = results.filter(rejected).map(result => new Error(result.reason))\n\n return [successfulResults, failedResults] as WidgetResults\n }\n\n // build a new widget config from the base provided by the dapp\n // and pass the config hash from the widgetLayout to the new widgetConfig\n private buildWidgetConfig(widgetConfigToBuild: DappWidgetConfig, configHash?: Hash): DappWidgetConfig {\n const clonedWidgetConfig = this.cloneWidgetConfig(widgetConfigToBuild)\n return {\n ...clonedWidgetConfig,\n configHash,\n }\n }\n\n private cloneWidgetConfig(widgetConfig: DappWidgetConfig) {\n return structuredClone(widgetConfig)\n }\n\n private widgetTrayFromLayout(widgetLayout: WidgetTrayLayout): WidgetTray {\n const targetWidgetConfigs: DappWidgetConfig[] = []\n\n const { layout, label: trayLabel } = widgetLayout\n for (const dappWidgetLayout of layout) {\n const {\n dappId, mode, configHash,\n } = dappWidgetLayout\n\n // find the dapp set for the dappWidgetLayout\n const dappSet = this.registeredDappSets.find(dappSet => dappSet.dapp.config.name === dappId)\n if (!dappSet) {\n console.error('unable to find registered dapp set for', dappId)\n continue\n }\n\n // find the widgetConfig for the dapp based on a match of mode or dappId in the dapp's widgetConfig\n const widgetConfigToBuild = dappSet.dapp.widgetConfigs.find(config => (config.mode ? config.mode === mode : mode === config.dappId))\n if (!widgetConfigToBuild) {\n console.error('unable to find widget config for', mode)\n continue\n }\n\n const config = this.buildWidgetConfig(widgetConfigToBuild, configHash)\n\n // add the foundWidgetConfig to the targetWidgetConfigs\n targetWidgetConfigs.push(config)\n }\n\n return {\n label: trayLabel ?? 'Widget Tray',\n position: 'bottom',\n schema: WidgetTraySchema,\n widgetConfigs: targetWidgetConfigs,\n }\n }\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport type { XnsRegistrationsViews } from '@xyo-network/os-runtime'\nimport { XnsRegistrationsResource } from '@xyo-network/os-runtime'\n\nimport {\n ResourceHooks, useCleanUpResource, useSyncExternalPayloadStore,\n} from '../resource/index.ts'\n\nexport const useBuildNameServiceRegistrationsResource = (context?: XyOsContext | null, pathPrefix?: string) => {\n const result = usePromise(async () => {\n if (context) {\n const xnsRegistrationsResource = new XnsRegistrationsResource(context, pathPrefix)\n await xnsRegistrationsResource.start()\n return xnsRegistrationsResource\n }\n }, [context, pathPrefix])\n\n useCleanUpResource(result[0])\n\n return result\n}\n\nexport const useBuildNameServiceRegistrationsResourceViews = (resource?: XnsRegistrationsResource) => {\n const allRegistrations = useSyncExternalPayloadStore<XnsRegistrationsResource, XnsRegistrationsViews>('allRegistrations', resource)\n\n return {\n allRegistrations,\n resource,\n }\n}\n\nexport const NameServiceRegistrationHooks = new ResourceHooks<XnsRegistrationsViews, XnsRegistrationsResource>(\n useBuildNameServiceRegistrationsResource,\n useBuildNameServiceRegistrationsResourceViews,\n)\n","import type { XyOsUiContext as XyOsUiContextImport } from '@xyo-network/os-react-model'\nimport { createContext, use } from 'react'\n\nexport const XyOsUiContext = createContext<XyOsUiContextImport | undefined>(undefined)\n\nexport const useXyOsUiContext = () => {\n return use(XyOsUiContext)\n}\n\nexport const XyOsUiContextProvider = XyOsUiContext.Provider\n","import { forget } from '@xylabs/sdk-js'\nimport { ModuleFactoryLocator } from '@xyo-network/module-factory-locator'\nimport type { ModuleFactoryLocatorInstance } from '@xyo-network/module-model'\nimport type { SplashScreenLoadingMessages, XyOsUiGlobal } from '@xyo-network/os-model'\nimport type { ReactDappRegistrationResults, XyOsUiContext } from '@xyo-network/os-react-model'\nimport type { XyOsMonitor, XyOsParams } from '@xyo-network/os-runtime'\nimport { dappsReadyConnection, XyOs } from '@xyo-network/os-runtime'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\n\nimport { XyOsBrowserMonitor } from '../../../helpers/index.ts'\n\nexport class XyOsUi extends XyOs implements XyOsUiContext {\n dappRegistrationResults: ReactDappRegistrationResults = { failed: [], succeeded: [] }\n\n private dappsReadyConnection = dappsReadyConnection()\n\n constructor(params: XyOsParams) {\n super(params)\n\n this.eventBus.addConnection(this.dappsReadyConnection)\n }\n\n static override get monitoring(): XyOsMonitor | undefined {\n return new XyOsBrowserMonitor()\n }\n\n static get xyOsUiGlobal(): XyOsUiGlobal {\n return XyOs.xyOsGlobal as XyOsUiGlobal\n }\n\n static hideSplash() {\n this.xyOsUiGlobal.splashScreen.hideSplash()\n this.xyOsUiGlobal.splashScreen.onComplete()\n this.setSplashStatus('complete')\n }\n\n static setSplashStatus(status: SplashScreenLoadingMessages) {\n const statusText = this.xyOsUiGlobal.splashScreen._LOADING_MESSAGES[status]\n this.xyOsUiGlobal.splashScreen.setStatusText(statusText)\n }\n\n override async boot(wallet: WalletInstance, locator: ModuleFactoryLocatorInstance = new ModuleFactoryLocator()): Promise<this> {\n await super.boot(wallet, locator)\n const registerLazy = async () => {\n this.dappRegistrationResults = (await this.dappRegistrationService.start()) as ReactDappRegistrationResults\n await this.dappsReadyConnection.emit('dappsReady', {})\n }\n forget(registerLazy())\n return this\n }\n}\n","import type { UsePromiseState } from '@xylabs/react-promise'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport type { ResourceStore } from '@xyo-network/os-runtime'\n\nimport { useXyOsUiContext } from '../XyOsUi/index.ts'\n\nexport class ResourceHooks<Views extends string, T extends ResourceStore<Views>> {\n private buildResource: (context?: XyOsContext | null, pathPrefix?: string) => [T | undefined, Error | undefined, UsePromiseState | undefined]\n private buildViews: (resource?: T) => { [K in Views]: ReturnType<T['views'][K]> | undefined } | (undefined & Record<'resource', T | undefined>)\n\n constructor(\n buildResource: (context?: XyOsContext | null, pathPrefix?: string) => [T | undefined, Error | undefined, UsePromiseState | undefined],\n buildViews: (resource?: T) => { [K in Views]: ReturnType<T['views'][K]> | undefined } | (undefined & Record<'resource', T | undefined>),\n ) {\n this.buildResource = buildResource\n this.buildViews = buildViews\n }\n\n resourceViewsFromContext = (context?: XyOsContext | null, pathPrefix?: string) => {\n const [resource, resourceError] = this.buildResource(context, pathPrefix)\n const views = this.buildViews(resource)\n\n return {\n ...views,\n resource,\n resourceError,\n }\n }\n\n useBuildResourceFromProvidedNode = (pathPrefix?: string) => {\n const xyOs = useXyOsUiContext()\n return this.buildResource(xyOs, pathPrefix)\n }\n\n useResourceViewsFromProvidedNode = (pathPrefix?: string) => {\n const [resource, resourceError] = this.useBuildResourceFromProvidedNode(pathPrefix)\n const views = this.buildViews(resource)\n\n return {\n ...views,\n resource,\n resourceError,\n }\n }\n}\n","import type { ResourceStore } from '@xyo-network/os-runtime'\nimport { useEffect } from 'react'\n\nexport const useCleanUpResource = (resource?: ResourceStore) => {\n useEffect(() => {\n return () => {\n resource?.cleanupListeners()\n }\n }, [resource])\n}\n","import type { ResourceStore } from '@xyo-network/os-runtime'\nimport { useMemo, useSyncExternalStore } from 'react'\n\n/**\n * Given a repository and one of its store names, return a stream of payloads\n */\nexport const useSyncExternalPayloadStore = <T extends ResourceStore = ResourceStore, ViewName extends string = string>(\n viewName: ViewName,\n repository?: T,\n) => {\n // Grab the return type of the getSnapshot function to ascertain its payload\n type PayloadStoreType = ReturnType<T['views'][ViewName]>\n\n const { getSnapShot, subscribe } = useMemo(() => {\n // capture the view's subscribe function\n const subscriber = repository?.subscriptions[viewName]\n // capture the view's getSnapshot function\n const snapshot = repository?.views[viewName] as (() => PayloadStoreType) | undefined\n\n if (snapshot && subscriber) {\n return {\n // since useExternalStore calls its methods in it's own lambda function, we lose the `this` context of the calling class.\n // bind each method to its appropriate object so the `this` calls work as expected.\n getSnapShot: snapshot,\n subscribe: subscriber.bind(repository),\n }\n }\n // Return a default implementation to satisfy the hook interface\n return {\n // eslint-disable-next-line unicorn/no-useless-undefined\n getSnapShot: () => undefined,\n subscribe: () => () => {},\n }\n }, [repository, viewName])\n\n return useSyncExternalStore(subscribe, getSnapShot)\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport type { DappAccessRequestViews } from '@xyo-network/os-runtime'\nimport { DappAccessRequestResource } from '@xyo-network/os-runtime'\n\nimport {\n ResourceHooks, useCleanUpResource, useSyncExternalPayloadStore,\n} from '../resource/index.ts'\n\nexport const useBuildDappAccessRequestResource = (context?: XyOsContext | null) => {\n const resource = usePromise(async () => {\n if (context) {\n const resource = new DappAccessRequestResource(context)\n await resource.start()\n return resource\n }\n }, [context])\n\n useCleanUpResource(resource[0])\n\n return resource\n}\n\nexport const useDappAccessRequestResourceViews = (resource?: DappAccessRequestResource) => {\n const accessRequests = useSyncExternalPayloadStore('accessRequests', resource)\n const registeredInterfaces = useSyncExternalPayloadStore('registeredInterfaces', resource)\n\n return {\n accessRequests,\n registeredInterfaces,\n resource,\n }\n}\n\nexport const DappAccessRequestResourceHooks = new ResourceHooks<DappAccessRequestViews, DappAccessRequestResource>(\n useBuildDappAccessRequestResource,\n useDappAccessRequestResourceViews,\n)\n","import { usePromise } from '@xylabs/react-promise'\nimport { boot } from '@xyo-network/bios-browser'\nimport type { BiosExternalInterface } from '@xyo-network/bios-model'\nimport { useEffect } from 'react'\n\nlet biosBoot: Promise<BiosExternalInterface>\n\nexport const useBios = () => {\n const [biosExternalInterface, biosError] = usePromise(async () => {\n // If we've already booted the bios, await it's boot\n if (biosBoot !== undefined) return await biosBoot\n // Otherwise, boot the bios\n biosBoot = boot()\n // and await it's boot\n return await biosBoot\n }, [])\n\n // Bring any async BIOS errors from usePromise back\n // within react error boundaries\n useEffect(() => {\n if (biosError) throw biosError\n }, [biosError])\n\n return biosExternalInterface\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { Kernel } from '@xyo-network/kernel'\nimport type { KernelBootParams, KernelExternal } from '@xyo-network/kernel-model'\nimport type { ModuleFactoryLocator } from '@xyo-network/module-factory-locator'\nimport { useEffect } from 'react'\n\nimport { useBios } from './useBios.js'\n\nlet kernelBoot: Promise<KernelExternal>\n\nexport const useKernel = (locator: ModuleFactoryLocator, params: KernelBootParams) => {\n const bios = useBios()\n const [kernelExternalInterface, kernelError] = usePromise(async () => {\n // If we've already booted the kernel, await it's boot\n if (kernelBoot !== undefined) return await kernelBoot\n if (bios) {\n // Otherwise, boot the kernel\n kernelBoot = (async function () {\n const kernel = new Kernel()\n\n await kernel.boot(bios, { locator, ...params })\n return kernel\n })()\n // and await it's boot\n return await kernelBoot\n }\n }, [bios])\n\n // Bring any async BIOS errors from usePromise back\n // within react error boundaries\n useEffect(() => {\n if (kernelError) throw kernelError\n }, [kernelError])\n\n return kernelExternalInterface\n}\n","import { ButtonEx } from '@xylabs/react-button'\nimport type { ErrorAlertProps } from '@xylabs/react-error'\nimport { ErrorAlert } from '@xylabs/react-error'\nimport type { ModuleError } from '@xyo-network/payload-model'\nimport React, { useEffect } from 'react'\nimport { useLocation } from 'react-router-dom'\n\nexport interface ErrorRenderWithSupportProps extends ErrorAlertProps<ModuleError> {\n supportHref?: string\n supportLinkText?: string\n supportTo?: string\n}\n\nexport const ErrorRenderWithSupport: React.FC<ErrorRenderWithSupportProps> = ({\n supportHref = '',\n supportTo,\n supportLinkText = 'Support',\n error,\n onCancel,\n ...props\n}) => {\n const location = useLocation()\n useEffect(() => {\n // ensure we end up at the same place we are now after logging in\n location.state = { from: { pathname: globalThis.location.pathname } }\n }, [location])\n return (\n <ErrorAlert\n action={supportTo\n ? (\n <ButtonEx target=\"_blank\" to={supportTo} color=\"inherit\" size=\"small\">\n {supportLinkText}\n </ButtonEx>\n )\n : (\n <ButtonEx target=\"_blank\" href={supportHref} color=\"inherit\" size=\"small\">\n {supportLinkText}\n </ButtonEx>\n )}\n error={error}\n onCancel={onCancel}\n {...props}\n >\n </ErrorAlert>\n )\n}\n\nexport const ErrorRenderWithSupportDefault: React.FC<ErrorRenderWithSupportProps> = (props) => {\n return <ErrorRenderWithSupport supportHref=\"https://discord.com/channels/935586624392298547/1228436997375393885\" {...props} />\n}\n","import type { DappIntent } from '@xyo-network/os-model'\nimport type { RegisteredReactDappSet } from '@xyo-network/os-react-model'\nimport React, { memo, useMemo } from 'react'\n\nimport { useDappContextCreator } from '../os/index.ts'\nimport { DappIconButton } from './Button/index.ts'\nimport { deriveDappState } from './lib/index.ts'\nimport {\n DappRendered, DappWindow, useDappMenu,\n} from './modules/index.ts'\n\nexport interface DappContainerProps {\n currentIntent?: DappIntent\n dappSet: RegisteredReactDappSet\n xnsNetwork: string | undefined\n xnsNodeUrl: string | undefined\n}\n\nexport const DappContainer: React.FC<DappContainerProps> = ({\n currentIntent, dappSet, xnsNodeUrl, xnsNetwork,\n}) => {\n const { dapp, dappIcon } = dappSet\n\n const {\n dappWallet, context, nodeCreateError,\n } = useDappContextCreator(xnsNodeUrl, xnsNetwork, dapp, currentIntent)\n\n const dappState = useMemo(() => {\n if (currentIntent?.targetDappId === dapp.config.name) {\n return deriveDappState(currentIntent)\n }\n }, [currentIntent, dapp])\n\n const { error: menuError, ...dappMenuProperties } = useDappMenu(context, dapp?.config.name)\n\n const errors = useMemo(() => [nodeCreateError, menuError].filter(Boolean), [nodeCreateError])\n\n const dappWindowProps = useMemo(() => ({\n context,\n dapp,\n dappMenuProperties,\n dappState,\n dappWallet,\n errors,\n }), [context, dapp, dappMenuProperties, dappState, dappWallet, errors])\n\n return (\n <DappIconButton\n dappIcon={dappIcon}\n dappIconSvg={dapp.params.iconSvg}\n dappName={dapp?.config.name}\n dappState={dappState}\n >\n <DappWindow {...dappWindowProps}>\n <DappRendered\n {...dappWindowProps}\n />\n </DappWindow>\n </DappIconButton>\n )\n}\n\nexport const DappContainerMemo = memo(DappContainer)\n","import { useAsyncEffect } from '@xylabs/react-async-effect'\nimport type {\n DappIntent, RegisteredDapp, WindowDappNodeSet,\n} from '@xyo-network/os-model'\nimport { DappIntentTypes } from '@xyo-network/os-model'\nimport { DappContextCreator, RunningDappCache } from '@xyo-network/os-runtime'\nimport {\n useCallback, useEffect, useRef, useState,\n} from 'react'\n\nimport { useXyOsUiContext } from '../../XyOsUi/index.ts'\n\n/**\n * Creates a dapp node for the provided dapp and name\n * @param dapp - The dapp to create the node for\n */\nexport const useDappContextCreator = (\n xnsNodeUrl: string | undefined,\n xnsNetwork: string | undefined,\n dapp?: RegisteredDapp,\n currentIntent?: DappIntent,\n allowedNames?: string[],\n createOnMount = false,\n): WindowDappNodeSet & {\n nodeCreateError?: Error\n} => {\n const context = useXyOsUiContext()\n const [windowDappNodeSet, setWindowDappNodeSet] = useState<WindowDappNodeSet>({ context: undefined, dappWallet: undefined })\n const [dappWindowNodeError, setDappWindowNodeError] = useState<Error>()\n // ensure the dapp is targeted by the current intent\n const targetedDapp = !!(dapp && context && currentIntent?.targetDappId === dapp?.config.name)\n\n // Keep a ref of the windowDappNodeSet to use in effect hooks without needing it as a dependency\n const windowDappNodeSetRef = useRef<WindowDappNodeSet>(windowDappNodeSet)\n useEffect(() => {\n windowDappNodeSetRef.current = windowDappNodeSet\n }, [windowDappNodeSet])\n\n const createNode = useCallback(async () => {\n if (targetedDapp) {\n try {\n const windowDappNodeSet = await RunningDappCache.findOrCreate(dapp, context, allowedNames ?? [], xnsNodeUrl, xnsNetwork)\n setWindowDappNodeSet(windowDappNodeSet)\n } catch (e) {\n setDappWindowNodeError(e as Error)\n }\n }\n }, [dapp, currentIntent, context, allowedNames])\n\n useEffect(() => {\n if (createOnMount) {\n void (async () => {\n await createNode()\n })()\n }\n }, [createOnMount, createNode])\n\n // Watch the intents to determine if the dappWindowNode should be built\n useAsyncEffect(\n\n async () => {\n // unless the dapp was passed, do nothing\n if (targetedDapp) {\n switch (currentIntent?.intent) {\n case DappIntentTypes.Launch: {\n await createNode()\n break\n }\n case DappIntentTypes.Close: {\n if (windowDappNodeSetRef.current.context) {\n // In case a cached dapp was closed, clear its Dapp Archivist to allow for a fresh start upon next launch\n await DappContextCreator.resetDappArchivist(windowDappNodeSetRef.current.context)\n setWindowDappNodeSet({ context: null, dappWallet: undefined })\n }\n break\n }\n case DappIntentTypes.Minimize:\n // do nothing\n }\n }\n },\n [createNode, currentIntent],\n )\n\n return {\n ...windowDappNodeSet,\n nodeCreateError: dappWindowNodeError,\n }\n}\n","import type { EventListener } from '@xylabs/sdk-js'\nimport type { DappRegistrationResults, EventBusPubSubConnectionRequest } from '@xyo-network/os-model'\nimport { EventBusPubSubConnection } from '@xyo-network/os-runtime'\nimport { useEffect, useState } from 'react'\n\nimport { useXyOsUiContext } from '../../XyOsUi/index.ts'\n\nexport const useDappRegistrationResults = () => {\n const context = useXyOsUiContext()\n\n const [registeredDappSetResults, setRegisteredDappSetResults] = useState<DappRegistrationResults | undefined>()\n\n useEffect(() => {\n const listener: EventListener = () => {\n setRegisteredDappSetResults(context?.dappRegistrationResults)\n }\n const dappsReadyConnectionRequest: EventBusPubSubConnectionRequest = {\n subscribableEvents: new Map([['dappsReady', listener]]),\n type: 'PubSub',\n }\n const dappsReadyConnection = new EventBusPubSubConnection(dappsReadyConnectionRequest)\n if (context) {\n context.eventBus.addConnection(dappsReadyConnection)\n setRegisteredDappSetResults(context.dappRegistrationResults)\n }\n return () => (context && dappsReadyConnection.id ? context.eventBus.removeConnection(dappsReadyConnection.id) : undefined)\n }, [context])\n\n return registeredDappSetResults\n}\n","import { DappRegistry } from '@xyo-network/os-runtime'\nimport { useMemo } from 'react'\n\nimport { useDappSeedPhraseRepository } from './useDappSeedPhraseRepository.ts'\n\nlet _dappRegistry: DappRegistry\n\nexport const useDappRegistry = (allowedNames: string[]) => {\n const dappSeedPhraseRepository = useDappSeedPhraseRepository(allowedNames)\n\n return useMemo(() => {\n if (dappSeedPhraseRepository) {\n if (!_dappRegistry) {\n _dappRegistry = new DappRegistry(dappSeedPhraseRepository)\n }\n return _dappRegistry\n }\n }, [dappSeedPhraseRepository])\n}\n","import { DappSeedPhraseRepository } from '@xyo-network/os-runtime'\nimport { useMemo } from 'react'\n\nimport { useXyOsUiContext } from '../../XyOsUi/index.ts'\n\nlet _dappWalletRepository: DappSeedPhraseRepository\n\nexport const useDappSeedPhraseRepository = (allowedNames: string[]) => {\n const context = useXyOsUiContext()\n\n const dappWalletRepository = useMemo(() => {\n if (_dappWalletRepository === undefined && context) {\n _dappWalletRepository = new DappSeedPhraseRepository(context, allowedNames)\n }\n return _dappWalletRepository\n }, [context, allowedNames])\n\n return dappWalletRepository\n}\n","import { assertEx } from '@xylabs/sdk-js'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport { OsSettingsCaller, OsSettingsReadyEvent } from '@xyo-network/os-runtime'\nimport { useMemo } from 'react'\n\nimport { useStackReady } from '../../stack/index.ts'\nimport { useXyOsUiContext } from '../../XyOsUi/index.ts'\n\nexport const useOsSettingsCaller = (context?: XyOsContext | null) => {\n const providedContext = useXyOsUiContext()\n const { ready } = useStackReady(OsSettingsReadyEvent, 'osSettingsStack', providedContext)\n\n return useMemo(() => {\n if (providedContext || context || ready) {\n const derivedNode = assertEx(context ?? providedContext, () => 'no node was found in context or passed as argument')\n return new OsSettingsCaller(derivedNode)\n }\n }, [context, providedContext])\n}\n","import type { EventListener } from '@xylabs/sdk-js'\nimport { assertEx } from '@xylabs/sdk-js'\nimport type { EventBusPubSubConnectionRequest, XyOsContext } from '@xyo-network/os-model'\nimport { EventBusPubSubConnection } from '@xyo-network/os-runtime'\nimport { useEffect, useState } from 'react'\n\nimport type { StackReady } from '../../interfaces/index.ts'\nimport { useXyOsUiContext } from '../XyOsUi/index.ts'\n\nexport const useStackReady = (stackReadyEvent: string, stackName: string, context?: XyOsContext | null) => {\n const providedContext = useXyOsUiContext()\n const [stackReady, setStackReady] = useState<StackReady>({ ready: false })\n\n useEffect(() => {\n const derivedContext = context ?? providedContext\n\n const listener: EventListener = () => {\n if (!derivedContext) throw new Error('no context found')\n const stack = assertEx(derivedContext.getStack(stackName).stack, () => `${stackName} missing stack`)\n setStackReady({ ready: true, stack })\n }\n\n const stackReadyReadyConnectionRequest: EventBusPubSubConnectionRequest = {\n subscribableEvents: new Map([[stackReadyEvent, listener]]),\n type: 'PubSub',\n }\n\n const stackReadyReadyConnection = new EventBusPubSubConnection(stackReadyReadyConnectionRequest)\n\n if (derivedContext) {\n // connect to the bus\n derivedContext.eventBus.addConnection(stackReadyReadyConnection)\n\n // attempt to see if the stack is already initialized\n const stack = derivedContext.getStack(stackName)\n if (stack.initialized) setStackReady({ ready: true, stack: stack.stack })\n }\n\n return () => {\n const derivedContext = context ?? providedContext\n if (derivedContext && stackReadyReadyConnection._id) {\n derivedContext.eventBus.removeConnection(stackReadyReadyConnection.id)\n }\n }\n }, [context, providedContext])\n\n return stackReady\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { buildUserWalletSeedPhrasePayload } from '@xyo-network/os-runtime'\nimport { useMemo } from 'react'\n\nexport const usePhraseFile = (phrase?: string) => {\n const [payloadAndRootHash] = usePromise(async () => (phrase ? await buildUserWalletSeedPhrasePayload(phrase) : undefined), [phrase])\n\n const filename = useMemo(() => `xyo-phrase-${payloadAndRootHash?.rootHash}.json`, [payloadAndRootHash?.rootHash])\n\n const { phraseFile, phraseFileError } = useMemo<{\n phraseFile?: string\n phraseFileError?: Error\n }>(() => {\n const payload = payloadAndRootHash?.payload\n if (payload) {\n try {\n const data = new Blob([JSON.stringify(payload, null, 2)], { type: 'text/plain' })\n return { phraseFile: globalThis.URL.createObjectURL(data) }\n } catch (e) {\n return { phraseFileError: e as Error }\n }\n } else {\n return {}\n }\n }, [payloadAndRootHash])\n\n return {\n filename,\n payload: payloadAndRootHash?.payload,\n phraseFile,\n phraseFileError,\n }\n}\n","import type { Dispatch } from 'react'\nimport { useLocation, useNavigate } from 'react-router-dom'\n\nexport const useTabs = (): [string, Dispatch<string>] => {\n const location = useLocation()\n const navigate = useNavigate()\n\n const rootFolder = location.pathname.split('/')[1]\n const tab = rootFolder?.length > 0 ? rootFolder : 'node'\n const setTab = (tab: string) => {\n void navigate(`/${tab}`)\n }\n return [tab, setTab]\n}\n","import type { UsePromiseState } from '@xylabs/react-promise'\nimport { usePromise } from '@xylabs/react-promise'\nimport type { WidgetTrayLayout } from '@xyo-network/os-model'\nimport type { RegisteredReactDappSet } from '@xyo-network/os-react-model'\nimport type { JSX } from 'react'\n\nimport { WidgetCaller } from '../../../helpers/index.ts'\nimport { useXyOsUiContext } from '../../XyOsUi/index.ts'\n\ntype WidgetResults = [(JSX.Element | undefined)[] | undefined, (Error | undefined)[]] | undefined\n\nexport const useWidgetDapps = (\n registeredDapps?: RegisteredReactDappSet[],\n widgetTrayLayout?: WidgetTrayLayout,\n): [WidgetResults, Error | undefined, UsePromiseState | undefined] => {\n const context = useXyOsUiContext()\n return usePromise(async () => {\n if (registeredDapps && registeredDapps.length > 0 && context && widgetTrayLayout) {\n const caller = new WidgetCaller(context, registeredDapps, widgetTrayLayout)\n return await caller.buildWidgetComponents()\n }\n }, [context, registeredDapps, widgetTrayLayout])\n}\n","import type { RefObject } from 'react'\nimport { useLayoutEffect, useState } from 'react'\n\nimport { useOnWindowResize } from '../../../../utils/index.ts'\n\n/**\n * For a given element, determine the left and top distance from the edge of the viewport\n * to the element's center\n */\nexport const useLaunchPoint = (spanRef: RefObject<HTMLSpanElement | null>) => {\n const [coordinates, setCoordinates] = useState<{\n left: number\n top: number\n }>({ left: 0, top: 0 })\n const resized = useOnWindowResize()\n\n useLayoutEffect(() => {\n const rect = spanRef.current?.getBoundingClientRect() ?? null\n if (rect) {\n const {\n width, height, left, top,\n } = rect\n setCoordinates({\n left: left + width / 2,\n top: top + height / 2,\n })\n }\n }, [spanRef, resized])\n\n return coordinates\n}\n","import type { InstallationType, RegisteredDappSet } from '@xyo-network/os-model'\nimport {\n isInstalledDappSet, isPreInstalledDappSet, isUnInstalledDappSet,\n} from '@xyo-network/os-model'\n\nexport const DappInstallTypeFilters: Record<\n InstallationType,\n (registeredDappSets: RegisteredDappSet[] | undefined) => RegisteredDappSet[] | undefined\n> = {\n installed(registeredDappSets?: RegisteredDappSet[]) {\n return registeredDappSets && registeredDappSets?.length > 0\n ? registeredDappSets?.filter(isInstalledDappSet).toSorted((a, b) => (a.dapp.config.name.toUpperCase() < b.dapp.config.name.toUpperCase() ? -1 : 1))\n : undefined\n },\n preInstalled(registeredDappSets?: RegisteredDappSet[]) {\n return registeredDappSets && registeredDappSets?.length > 0\n ? registeredDappSets\n ?.filter(isPreInstalledDappSet)\n .toSorted((a, b) => (a.dapp.config.name.toUpperCase() < b.dapp.config.name.toUpperCase() ? -1 : 1))\n : undefined\n },\n uninstalled(registeredDappSets?: RegisteredDappSet[]) {\n return registeredDappSets && registeredDappSets?.length > 0\n ? registeredDappSets.filter(isUnInstalledDappSet).toSorted((a, b) => (a.dapp.config.name.toUpperCase() < b.dapp.config.name.toUpperCase() ? -1 : 1))\n : undefined\n },\n}\n","const getApiDomain = (localHost: boolean, apiDomain: string | undefined) => {\n if (apiDomain !== undefined) {\n return apiDomain\n }\n if (localHost) {\n return 'http://localhost:8080'\n }\n if (location.hostname.startsWith('beta')) {\n return 'https://beta.archivist.xyo.network'\n }\n return 'https://archivist.xyo.network'\n}\n\nexport { getApiDomain }\n","import { useEffect, useState } from 'react'\n\nexport const useOnWindowResize = () => {\n const [resized, setResized] = useState<UIEvent>()\n\n useEffect(() => {\n const onResize = (event: UIEvent) => {\n setResized(event)\n }\n globalThis.addEventListener('resize', onResize, false)\n\n return () => {\n globalThis.removeEventListener('resize', onResize)\n }\n }, [])\n\n return resized\n}\n","/* eslint-disable @typescript-eslint/no-misused-promises */\nimport { Circle } from '@mui/icons-material'\nimport type { ButtonExProps } from '@xylabs/react-button'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport type {\n DappIcon,\n DappName,\n} from '@xyo-network/os-model'\nimport { DappIntentTypes } from '@xyo-network/os-model'\nimport { DappIntentCaller, XyOsMonitor } from '@xyo-network/os-runtime'\nimport React, { useRef } from 'react'\n\nimport { useSendDappIntent } from '../../intent/index.ts'\nimport type { DappState } from '../lib/index.ts'\nimport { DEFAULT_ICON_SIZE } from '../lib/index.ts'\nimport { RenderHtml } from '../RenderHtml.tsx'\nimport { useLaunchPoint } from './hooks/index.ts'\nimport { DappLaunchFrame } from './LaunchFrame.js'\nimport { decomposeProps } from './lib/index.ts'\nimport {\n StyledDappIconButtonEx, StyledDappName, StyledDefaultDappIcon,\n} from './StyledComponents.js'\n\nexport type DappIconButtonProps = ButtonExProps & {\n dappIcon?: DappIcon\n dappIconSvg?: string\n dappName?: DappName\n dappState?: DappState\n}\n\nexport const DappIconButton: React.FC<DappIconButtonProps> = ({\n children, dappIcon, dappIconSvg, dappName, dappState, ...props\n}) => {\n const {\n DappIconSize, color, nonSxProps, sx,\n } = decomposeProps(dappIcon, props)\n const iconSize = DEFAULT_ICON_SIZE\n\n const { active, minimized } = dappState ?? {}\n\n // Functions to invoke Dapp intents\n const sendIntent = useSendDappIntent()\n\n // Use the DappIconButton to calculate the launch point for the DappWindow\n const iconButtonRef = useRef<HTMLButtonElement>(null)\n const { left: launchLeft, top: launchTop } = useLaunchPoint(iconButtonRef)\n\n const MiddleEllipsisFunction = (str: DappName | undefined) => {\n if (str && str.length > 25) {\n // console.log(str)\n // console.log(str.slice(0, 15))\n // console.log(str.slice(-10, str.length - 10 + str.length))\n return str.slice(0, 15) + '...' + str.slice(-7, str.length - 7 + str.length)\n }\n return str\n }\n\n const onClickIcon = async () => {\n XyOsMonitor.trackEvent('Launch dApp', { 'Dapp Name': `${dappName}` })\n await sendIntent?.(DappIntentCaller.buildIntent(DappIntentCaller.OsDappName, DappIntentTypes.Launch, dappName))\n }\n\n return (\n <FlexCol alignItems=\"stretch\" justifyContent=\"stretch\">\n <DappLaunchFrame id=\"dapp-launch-frame\" open={!!active} launchLeft={launchLeft} launchTop={launchTop}>\n {children}\n </DappLaunchFrame>\n <span\n style={{ cursor: 'pointer' }}\n onClick={onClickIcon}\n >\n <StyledDappIconButtonEx\n iconBgBaseColor={color}\n ref={iconButtonRef}\n sx={{\n height: iconSize, mb: 0.75, width: iconSize, ...sx,\n }}\n {...nonSxProps}\n >\n {dappIconSvg\n ? <RenderHtml htmlString={dappIconSvg} />\n : <StyledDefaultDappIcon fontSize={DappIconSize}>{dappIcon?.name.at(0)}</StyledDefaultDappIcon>}\n </StyledDappIconButtonEx>\n <FlexCol gap={0.25}>\n <StyledDappName variant=\"body2\" maxWidth={iconSize}>\n {MiddleEllipsisFunction(dappIcon?.name)}\n </StyledDappName>\n <Circle sx={{\n height: 8, opacity: minimized ? 1 : 0, transition: 'opacity .5s',\n }}\n />\n </FlexCol>\n </span>\n </FlexCol>\n )\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport type { DappIntentViews } from '@xyo-network/os-runtime'\nimport { DappIntentResource } from '@xyo-network/os-runtime'\n\nimport {\n ResourceHooks, useCleanUpResource, useSyncExternalPayloadStore,\n} from '../resource/index.ts'\n\nexport const useBuildIntentResource = (context?: XyOsContext | null) => {\n const resource = usePromise(async () => {\n if (context) {\n const resource = new DappIntentResource(context)\n await resource.start()\n return resource\n }\n }, [context])\n\n useCleanUpResource(resource[0])\n\n return resource\n}\n\nexport const useIntentResourceViews = (resource?: DappIntentResource) => {\n const allDappIntents = useSyncExternalPayloadStore('allDappIntents', resource)\n const latestDappIntent = useSyncExternalPayloadStore('latestDappIntent', resource)\n\n return {\n allDappIntents,\n latestDappIntent,\n resource,\n }\n}\n\nexport const DappIntentResourceHooks = new ResourceHooks<DappIntentViews, DappIntentResource>(useBuildIntentResource, useIntentResourceViews)\n","import { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { useWeakArchivistFromNode } from '@xyo-network/react-archivist'\n\nexport const useClearIntents = () => {\n const [intentArchivist] = useWeakArchivistFromNode('IntentArchivist')\n // For now, clear the archivist to avoid bloating\n useAsyncEffect(\n async () => {\n const intentArchivistInstance = intentArchivist?.deref()\n if (intentArchivistInstance) await intentArchivistInstance.clear?.()\n },\n [intentArchivist],\n )\n}\n","import { assertEx } from '@xylabs/sdk-js'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport { DappIntentCaller } from '@xyo-network/os-runtime'\nimport { useMemo } from 'react'\n\nimport { useXyOsUiContext } from '../XyOsUi/index.ts'\n\nexport const useDappIntentCaller = (xyOsContext?: XyOsContext | null) => {\n const xyOs = useXyOsUiContext()\n\n return useMemo(() => {\n if (xyOsContext || xyOs) {\n const context = assertEx(xyOsContext ?? xyOs, () => 'no node was found in context or passed as argument')\n return new DappIntentCaller(context)\n }\n }, [xyOsContext, xyOs])\n}\n","import { filterAs } from '@xylabs/sdk-js'\nimport type { ArchivistModuleEventData } from '@xyo-network/archivist-model'\nimport type { DappIntent } from '@xyo-network/os-model'\nimport {\n asOptionalDappIntent,\n DappIntentTypes, DappMode,\n} from '@xyo-network/os-model'\nimport { useWeakArchivistFromNode } from '@xyo-network/react-archivist'\nimport { useEffect, useState } from 'react'\n\n/** watch payloads going into the intent archivist to figure out what if the current state of the passed in dappId */\nexport const useDappIntentListener = (dappName?: string | null, targetMode = DappMode.Window) => {\n const [dappIntentType, setDappIntentType] = useState<DappIntentTypes>(DappIntentTypes.Close)\n const [intentPayload, setIntentPayload] = useState<DappIntent>()\n const [intentArchivist] = useWeakArchivistFromNode('IntentArchivist')\n\n useEffect(() => {\n const listener = ({ payloads }: ArchivistModuleEventData['inserted']) => {\n const filteredPayloads = filterAs(payloads, asOptionalDappIntent)\n for (const payload of filteredPayloads) {\n const allDapps = dappName === null && payload.targetMode === targetMode\n const targetDapps = dappName === payload.targetDappId && payload.targetMode === targetMode\n if (allDapps || targetDapps) {\n setIntentPayload(payload)\n switch (payload.intent) {\n case DappIntentTypes.Close: {\n setDappIntentType(DappIntentTypes.Close)\n break\n }\n case DappIntentTypes.Launch: {\n setDappIntentType(DappIntentTypes.Launch)\n break\n }\n case DappIntentTypes.Minimize: {\n setDappIntentType(DappIntentTypes.Minimize)\n break\n }\n default: {\n console.warn('Unrecognized DappIntentType:', payload)\n }\n }\n }\n }\n }\n intentArchivist?.deref()?.on('inserted', listener)\n\n return () => {\n intentArchivist?.deref()?.off('inserted', listener)\n }\n }, [dappName, intentArchivist, targetMode])\n\n return { dappIntentType, intentPayload }\n}\n","import { DappIntentTypes, DappMode } from '@xyo-network/os-model'\nimport { useEffect, useState } from 'react'\n\nimport { DappIntentResourceHooks } from './DappIntentResourceHooks.ts'\n\n/**\n * Note: This is a modified version of the original useDappIntentListener hook.\n * This version uses the DappIntentResourceHooks instead of the useArchivistFromNode hook.\n * Sadly, it appears to be much slower than the original version. It might be because the resource\n * uses useExternalStoreSync under the hood, which might be the cause :shrug:\n */\n\n/** watch payloads going into the intent archivist to figure out what if the current state of the passed in dappId */\n/** @deprecated - use the original version - useDappIntentListener till performance issues are ironed out */\nexport const useDappIntentListener2 = (dappName?: string | null, sourceMode = DappMode.Window) => {\n const { latestDappIntent } = DappIntentResourceHooks.useResourceViewsFromProvidedNode()\n const [dappIntentType, setDappIntentType] = useState<DappIntentTypes>(DappIntentTypes.Close)\n\n useEffect(() => {\n if (sourceMode === DappMode.Window) {\n for (const payload of latestDappIntent ?? []) {\n if (payload.targetDappId === dappName) {\n switch (payload.intent) {\n case DappIntentTypes.Close: {\n setDappIntentType(DappIntentTypes.Close)\n break\n }\n case DappIntentTypes.Launch: {\n setDappIntentType(DappIntentTypes.Launch)\n break\n }\n case DappIntentTypes.Minimize: {\n setDappIntentType(DappIntentTypes.Minimize)\n break\n }\n default: {\n console.warn('Unrecognized DappIntentType:', payload)\n }\n }\n }\n }\n } else {\n console.warn('Intent sent from unrecognized mode', sourceMode)\n }\n }, [dappName, latestDappIntent, sourceMode])\n\n return dappIntentType\n}\n","import type { DappIntent } from '@xyo-network/os-model'\nimport { DappIntentTypes } from '@xyo-network/os-model'\nimport { NameTransforms } from '@xyo-network/os-runtime'\nimport { useCallback } from 'react'\nimport { useNavigate, useParams } from 'react-router-dom'\n\nexport type UpdateRouteParamOptions = {\n // skip the navigate call to allow intents to be processed without updating the route\n skipNavigate?: boolean\n}\n\nconst rootRoute = '/'\n\n/** update url based off passed intents */\nexport const useNavigateIntent = () => {\n const navigate = useNavigate()\n const { dappName: dappNameParam } = useParams()\n\n const updateRouteParam = useCallback(\n (dappIntent: DappIntent, { skipNavigate }: UpdateRouteParamOptions = {}) => {\n if (dappIntent && dappIntent.targetDappId) {\n const {\n targetDappId: dappName, intent: intentType, params: intentParams,\n } = dappIntent\n const slug = new NameTransforms(dappName).slug()\n switch (intentType) {\n case DappIntentTypes.Launch: {\n const dappNameDeSlugged = dappNameParam ? new NameTransforms(dappNameParam).deSlug() : null\n if (dappNameDeSlugged !== dappName) {\n // navigating from the root to allow overwriting duplicate slugs\n const slugFromRoot = `${rootRoute}${slug}${intentParams ? `/${intentParams}` : ''}`\n if (!skipNavigate) void navigate(slugFromRoot)\n }\n break\n }\n case DappIntentTypes.Minimize: {\n if (!skipNavigate) void navigate(rootRoute)\n break\n }\n case DappIntentTypes.Close: {\n if (!skipNavigate) void navigate(rootRoute)\n break\n }\n }\n }\n },\n [dappNameParam, navigate],\n )\n\n return updateRouteParam\n}\n","import type { DappIntent } from '@xyo-network/os-model'\nimport { useWeakArchivistFromNode } from '@xyo-network/react-archivist'\nimport { useCallback } from 'react'\n\nimport type { UpdateRouteParamOptions } from './useNavigateIntent.js'\nimport { useNavigateIntent } from './useNavigateIntent.js'\n\n/** Returns a function that resolves the IntentArchivist and inserts an intent payload */\nexport const useSendDappIntent = () => {\n const [intentArchivist] = useWeakArchivistFromNode('IntentArchivist')\n const navigate = useNavigateIntent()\n\n const sendIntent = useCallback(\n async (dappIntent: DappIntent, options: UpdateRouteParamOptions = {}) => {\n const intentArchivistInstance = intentArchivist?.deref()\n if (!intentArchivistInstance) {\n console.error('unable to find IntentArchivist')\n return\n }\n if (dappIntent) {\n try {\n await intentArchivistInstance.insert([dappIntent])\n } catch (e) {\n console.error('error sending intent to archivist', e)\n }\n // sync the route with the intent\n navigate(dappIntent, options)\n } else {\n console.warn('tried to send intent but intent payload')\n }\n },\n // Disabling because navigate changes references and causes additional renders\n\n [intentArchivist],\n )\n\n return intentArchivist ? sendIntent : null\n}\n","export const DEFAULT_ICON_SIZE = 84\n","import type { DappIntent } from '@xyo-network/os-model'\nimport { DappIntentTypes } from '@xyo-network/os-model'\n\nimport type { DappState } from './DappState.ts'\n\nexport const deriveDappState = (intent?: DappIntent): DappState => {\n const minimized = intent?.intent === DappIntentTypes.Minimize\n const active = intent?.intent === DappIntentTypes.Launch\n const closed = intent?.intent === DappIntentTypes.Close\n\n return {\n active,\n closed,\n minimized,\n }\n}\n","import React from 'react'\n\nexport const RenderHtml = ({ htmlString }: {\n htmlString: string\n}) => {\n return (\n <div\n style={{ height: 64, width: 64 }}\n dangerouslySetInnerHTML={{ __html: htmlString }}\n />\n )\n}\n","import { useTheme } from '@mui/material'\nimport {\n animated, config, useSpring,\n} from '@react-spring/web'\nimport type { PropsWithChildren, Ref } from 'react'\nimport React, { useMemo } from 'react'\n\nexport interface DappLaunchFrameProps extends PropsWithChildren {\n bgColor?: string\n id?: string\n launchLeft?: number\n launchTop?: number\n open: boolean\n ref?: Ref<HTMLDivElement>\n}\n\nexport const DappLaunchFrame: React.FC<DappLaunchFrameProps> = ({\n bgColor, children, id, launchLeft, open, launchTop, ref,\n}) => {\n const theme = useTheme()\n\n const frameOpenSpringConfig = useMemo(\n () => ({\n config: config.stiff,\n from: { height: '0%', width: '0%' },\n to: {\n height: open ? '100dvh' : '0%',\n left: open ? 0 : launchLeft,\n top: open ? 0 : launchTop,\n width: open ? '100vw' : '0%',\n },\n }),\n [launchLeft, launchTop, open],\n )\n\n const {\n height, width, ...frameProps\n } = useSpring(frameOpenSpringConfig)\n const { transform, ...scaleProps } = useSpring({\n config: config.stiff,\n from: { transform: 'scale(0)' },\n to: { transform: open ? 'scale(1)' : 'scale(0)' },\n })\n\n return (\n <div id={id} ref={ref}>\n <animated.div\n id=\"dapp-launch-frame-transition-width-height\"\n style={{\n ...frameProps,\n height,\n overflow: 'hidden',\n position: 'fixed',\n width,\n // Set to one above the mui app bar\n zIndex: 1101,\n }}\n >\n <animated.div\n id=\"dapp-launch-frame-transition-scale\"\n style={{\n ...scaleProps,\n alignItems: 'start',\n background: bgColor ?? theme.vars?.palette.background.default,\n display: 'flex',\n height: '100%',\n justifyContent: 'start',\n transform,\n width: '100%',\n }}\n >\n {children}\n </animated.div>\n </animated.div>\n </div>\n )\n}\n","import type { ButtonExProps } from '@xylabs/react-button'\nimport type { DappIcon } from '@xyo-network/os-model'\n\nimport { DEFAULT_ICON_SIZE } from '../../lib/index.ts'\n\nexport const decomposeProps = (dappIcon?: DappIcon, props?: ButtonExProps) => {\n // Decompose the Payload into various properties\n const { color, windowId: id } = dappIcon ?? {}\n const DappIconSize = DEFAULT_ICON_SIZE * 0.8\n const { sx, ...nonSxProps } = props ?? {}\n\n return {\n DappIconSize, color, id, nonSxProps, sx,\n }\n}\n","import { styled } from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { alphaCss } from '@xylabs/react-theme'\nimport { TypographyEx } from '@xyo-network/react-shared'\n\nconst borderRadiusFactor = 1.5\n\nexport const StyledDappIconButtonEx = styled(ButtonEx, {\n name: 'DappIconButton',\n shouldForwardProp: prop => !['iconBgBaseColor'].includes(prop as string),\n})<{\n iconBgBaseColor?: string\n}>(({ theme }) => {\n return {\n // :before hack in place since css transitions not supported in css\n '&:before': {\n WebkitBackdropFilter: 'blur(20px)',\n backdropFilter: 'blur(20px)',\n backgroundColor: alphaCss(theme.vars?.palette.background.paper ?? '#fff', 0.5),\n borderRadius: theme.spacing(borderRadiusFactor),\n content: \"''\",\n inset: 0,\n opacity: 0,\n position: 'absolute',\n transition: 'transform 0.15s linear, opacity 0.15s linear',\n zIndex: '-1',\n },\n '&:hover': { transform: 'translateY(-2px)' },\n '&:hover:before': { opacity: 1 },\n 'WebkitBackdropFilter': 'blur(20px)',\n 'backdropFilter': 'blur(20px)',\n 'backgroundColor': alphaCss(theme.vars?.palette.background.paper ?? '#fff', 0.5),\n 'borderRadius': theme.spacing(borderRadiusFactor),\n 'color': theme.vars?.palette.text.primary,\n 'position': 'relative',\n 'transition': 'transform 0.15s linear',\n }\n})\n\nexport const StyledDappName = styled(TypographyEx, { name: 'StyledDappName' })(({ theme }) => ({\n // WebkitBoxOrient: 'vertical',\n WebkitLineClamp: 2,\n color: theme.vars?.palette.text.primary,\n flexWrap: 'wrap',\n fontWeight: 700,\n letterSpacing: '-0.5px',\n lineClamp: 2,\n textAlign: 'center',\n textOverflow: 'ellipsis',\n textShadow: `1px 1px 3px ${alphaCss(theme.vars?.palette.common.black ?? '#000', 0.3)}`,\n whiteSpace: 'initial',\n wordWrap: 'break-word',\n}))\n\nexport const StyledDefaultDappIcon = styled(TypographyEx, { name: 'StyledDappName' })(() => ({ lineHeight: 1 }))\n","import { ArrowForward } from '@mui/icons-material'\nimport type { DialogProps } from '@mui/material'\nimport {\n Alert,\n Button, Dialog, DialogActions, DialogContent, DialogTitle, Typography,\n} from '@mui/material'\nimport { ErrorRender } from '@xylabs/react-error'\nimport { FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport type {\n DappAccessRequest, RegisteredDappAccess, XyOsContext,\n} from '@xyo-network/os-model'\nimport { RegisteredNames } from '@xyo-network/os-model'\nimport { AccessNodeQueries } from '@xyo-network/os-runtime'\nimport React, { useState } from 'react'\n\nexport interface AccessDialogProps extends DialogProps {\n accessRequest?: DappAccessRequest\n dappNode?: XyOsContext | null\n registeredDappAccess?: RegisteredDappAccess\n}\n\nexport const DappAccessDialog: React.FC<AccessDialogProps> = ({\n accessRequest, children, dappNode, registeredDappAccess, ...props\n}) => {\n const [error, setError] = useState<Error>()\n const [noPayloadsInserted, setNoPayloadsInserted] = useState(false)\n\n const onClose = () => {\n setNoPayloadsInserted(false)\n props.onClose?.({}, 'escapeKeyDown')\n }\n\n const handleAllow = () => {\n if (accessRequest && registeredDappAccess && dappNode) {\n try {\n switch (registeredDappAccess.name) {\n case RegisteredNames: {\n const accessNodeQueries = new AccessNodeQueries(dappNode, accessRequest, registeredDappAccess)\n accessNodeQueries.run().then((payloads) => {\n if (payloads.length === 0) {\n setNoPayloadsInserted(true)\n } else {\n onClose()\n }\n return\n }).catch((e) => {\n setError(e as Error)\n })\n }\n default: {\n const message = `no helper for interface ${registeredDappAccess.name} found`\n console.error(message)\n setError(new Error(message))\n }\n }\n } catch (e) {\n console.error(e)\n setError(e as Error)\n }\n } else {\n setError(new Error('No registered dapp access or dappNode found'))\n }\n }\n\n return (\n <Dialog {...props}>\n <DialogTitle>Message from XYO OS</DialogTitle>\n <DialogContent\n dividers\n sx={{\n display: 'flex', flexDirection: 'column', gap: 3,\n }}\n >\n <ErrorRender error={error} scope=\"DappAccessDialog\" />\n <FlexCol gap={1}>\n <Typography variant=\"subtitle2\">dApp to dApp Access Request</Typography>\n <FlexRow gap={1}>\n <Typography fontSize={16}>\n <strong>{accessRequest?.requestingDappId}</strong>\n \n </Typography>\n <ArrowForward />\n <Typography fontSize={16}>\n <strong>{registeredDappAccess?.registeringDappId}</strong>\n </Typography>\n </FlexRow>\n </FlexCol>\n </DialogContent>\n <DialogContent\n dividers\n sx={{\n display: 'flex', flexDirection: 'column', gap: 3,\n }}\n >\n <FlexCol gap={1}>\n <Typography>\n <strong>{accessRequest?.requestingDappId}</strong>\n {' '}\n dApp would like to access your\n <strong>{registeredDappAccess?.name}</strong>\n {' '}\n from\n {' '}\n <strong>{registeredDappAccess?.registeringDappId}</strong>\n {' '}\n dApp\n </Typography>\n </FlexCol>\n {noPayloadsInserted\n ? (\n <Alert severity=\"warning\">\n {registeredDappAccess?.name}\n {' '}\n Access Request did not find payloads to insert\n </Alert>\n )\n : null}\n </DialogContent>\n {children\n ? <DialogContent dividers>{children}</DialogContent>\n : null}\n <DialogActions>\n <Button variant=\"outlined\" onClick={onClose}>\n Cancel\n </Button>\n <Button variant=\"contained\" onClick={handleAllow}>\n Allow\n </Button>\n </DialogActions>\n </Dialog>\n )\n}\n","import { ErrorRender } from '@xylabs/react-error'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport React from 'react'\n\nimport { useDialogState } from '../hooks/index.ts'\nimport { DappAccessDialog } from './Dialog.js'\n\nexport interface DappAccessFlexboxProps {\n context?: XyOsContext | null\n}\n\nexport const DappAccessFlexbox: React.FC<DappAccessFlexboxProps> = ({ context }) => {\n const {\n accessRequests, allowAccessDialogError, openAccessDialog, registeredInterface, setOpenAccessDialog,\n } = useDialogState(context)\n return (\n <DappAccessDialog\n accessRequest={accessRequests?.[0]}\n dappNode={context}\n open={openAccessDialog}\n onClose={() => setOpenAccessDialog(false)}\n registeredDappAccess={registeredInterface}\n >\n {allowAccessDialogError\n ? <ErrorRender error={allowAccessDialogError} scope=\"DappAccessFlexbox\" />\n : null}\n </DappAccessDialog>\n )\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { RegisteredDappAccess, XyOsContext } from '@xyo-network/os-model'\nimport { isRegisteredDappAccess, RegisteredNames } from '@xyo-network/os-model'\nimport { useState } from 'react'\n\nimport { DappAccessRequestResourceHooks } from '../../../../access-requests/index.ts'\nimport { useDappCaller } from '../../../useDappCaller.ts'\n\nexport const useDialogState = (context?: XyOsContext | null) => {\n const dappCaller = useDappCaller()\n const { accessRequests } = DappAccessRequestResourceHooks.resourceViewsFromContext(context)\n const [openAccessDialog, setOpenAccessDialog] = useState(false)\n const [registeredInterface, setRegisteredInterface] = useState<RegisteredDappAccess>()\n\n const [, allowAccessDialogError] = usePromise(async () => {\n const accessRequest = accessRequests?.[0]\n if (accessRequest && context && dappCaller) {\n setOpenAccessDialog(true)\n const payload = await dappCaller.getRegisteredDappAccessByName(RegisteredNames)\n\n setRegisteredInterface(isRegisteredDappAccess(payload) ? payload : undefined)\n }\n }, [accessRequests, dappCaller, context])\n\n return {\n accessRequests, allowAccessDialogError, openAccessDialog, registeredInterface, setOpenAccessDialog,\n }\n}\n","import type { XyOsContext } from '@xyo-network/os-model'\nimport { DappCaller } from '@xyo-network/os-runtime'\nimport { useMemo } from 'react'\n\nimport { useXyOsUiContext } from '../XyOsUi/index.ts'\n\nexport const useDappCaller = (context?: XyOsContext | null) => {\n const xyOs = useXyOsUiContext()\n\n return useMemo(() => {\n const resolvedContext = context ?? xyOs\n if (resolvedContext) {\n return new DappCaller(resolvedContext)\n }\n }, [context, xyOs])\n}\n","/* eslint-disable @typescript-eslint/no-misused-promises */\nimport {\n BugReport,\n CloseRounded,\n RemoveRounded,\n} from '@mui/icons-material'\nimport type { AppBarProps } from '@mui/material'\nimport {\n AppBar, Box, Divider, IconButton, Toolbar, Tooltip, Typography,\n} from '@mui/material'\nimport { FlexGrowRow } from '@xylabs/react-flexbox'\nimport { ColorSchemeButton } from '@xylabs/react-theme'\nimport type {\n DappName, DappVersion, XyOsContext,\n} from '@xyo-network/os-model'\nimport { DappIntentTypes } from '@xyo-network/os-model'\nimport { DappIntentCaller } from '@xyo-network/os-runtime'\nimport React from 'react'\n\nimport { useSendDappIntent } from '../../../intent/index.ts'\nimport { DebugDialogWithNode } from '../../Debug/index.ts'\nimport { useDebugClick } from './hooks/index.ts'\n\nexport interface DappBarProps extends AppBarProps {\n context?: XyOsContext | null\n name?: DappName\n simplifiedAppBar?: boolean\n version?: DappVersion\n}\n\nexport const EmptyDappBarForPadding: React.FC<DappBarProps> = (props) => {\n return (\n <AppBar\n color=\"primary\"\n sx={{ flexDirection: 'row' }}\n component=\"div\"\n position=\"fixed\"\n {...props}\n >\n </AppBar>\n )\n}\n\nexport const DappBar: React.FC<DappBarProps> = ({\n title, context, name, ...props\n}) => {\n const sendIntent = useSendDappIntent()\n\n const {\n closeDebug, debugOpen, openDebug,\n } = useDebugClick()\n\n return (\n <AppBar\n elevation={0}\n color=\"transparent\"\n sx={{ backgroundColor: 'transparent', flexDirection: 'row' }}\n component=\"div\"\n position=\"sticky\"\n {...props}\n >\n <Toolbar\n disableGutters\n sx={{ paddingX: 2 }}\n >\n <Typography noWrap variant=\"h6\" letterSpacing=\"-1px\">\n {title}\n </Typography>\n </Toolbar>\n <FlexGrowRow />\n <Toolbar\n disableGutters\n sx={{ paddingX: 2 }}\n >\n <IconButton\n onClick={openDebug}\n sx={{ display: { md: 'none', xs: 'flex' } }}\n >\n <BugReport />\n </IconButton>\n <Tooltip\n title=\"Toggle Light/Dark Mode\"\n sx={{ display: { md: 'none', xs: 'flex' } }}\n >\n <Box>\n <ColorSchemeButton />\n </Box>\n </Tooltip>\n <Divider\n orientation=\"vertical\"\n flexItem\n sx={{\n display: { md: 'none', xs: 'flex' },\n m: 1,\n }}\n />\n <Tooltip title=\"Minimize\">\n <IconButton\n onClick={async () => await sendIntent?.(DappIntentCaller.buildIntent(DappIntentCaller.OsDappName, DappIntentTypes.Minimize, name))}\n >\n <RemoveRounded htmlColor=\"inherit\" />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"Close\">\n <IconButton\n onClick={async () => await sendIntent?.(DappIntentCaller.buildIntent(DappIntentCaller.OsDappName, DappIntentTypes.Close, name))}\n >\n <CloseRounded htmlColor=\"inherit\" />\n </IconButton>\n </Tooltip>\n </Toolbar>\n <DebugDialogWithNode closeDebug={closeDebug} debugOpen={debugOpen} context={context} />\n </AppBar>\n )\n}\n","import type { DialogProps } from '@mui/material'\nimport {\n Dialog, DialogActions, DialogContent,\n} from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport { NodeProvider } from '@xyo-network/react-node'\nimport React, { lazy, Suspense } from 'react'\n\nconst Debug = lazy(() => import(/* webpackChunkName: \"Debug\" */ '@xyo-network/os-react-debug'))\n\nexport interface DebugDialogProps extends Omit<DialogProps, 'open'> {\n closeDebug: () => void\n debugOpen: boolean\n}\n\nexport const LazyDebug = () => (\n <Suspense fallback={<FlexCol />}>\n <FlexCol />\n <Debug height=\"100%\" />\n </Suspense>\n)\n\nexport const DebugDialog: React.FC<DebugDialogProps> = ({\n closeDebug, debugOpen, ...props\n}) => {\n return (\n <Dialog open={debugOpen} onClose={closeDebug} fullScreen {...props}>\n <DialogContent>\n <LazyDebug />\n </DialogContent>\n <DialogActions>\n <ButtonEx variant=\"outlined\" onClick={closeDebug}>\n Close\n </ButtonEx>\n </DialogActions>\n </Dialog>\n )\n}\n\nexport interface DebugDialogWithNodeProps extends DebugDialogProps {\n context: XyOsContext | undefined | null\n}\n\nexport const DebugDialogWithNode: React.FC<DebugDialogWithNodeProps> = ({\n closeDebug, debugOpen, context, ...props\n}) => {\n return (\n <NodeProvider node={context?.root}>\n <DebugDialog closeDebug={closeDebug} debugOpen={debugOpen} {...props} />\n </NodeProvider>\n )\n}\n","import { NameTransforms } from '@xyo-network/os-runtime'\n\nexport const DappPathHelpers = {\n // update the url based off the path\n deriveDestinationPath(path: string, defaultPath: string | undefined, dappName?: string) {\n const rootPath = `/${new NameTransforms(dappName ?? '').slug()}`\n const nestedPath = `${rootPath}/${path}`\n return path === defaultPath ? rootPath : nestedPath\n },\n // derive the path for the nav selection\n derivePathForNavSelection(newPath?: string, currentPath?: string, defaultPath?: string) {\n let derivedPath: string | undefined\n\n // If the path is not set, set it to the default path\n if (newPath === undefined && defaultPath) {\n derivedPath = defaultPath\n }\n\n // If the path has changed, update the selection (the back button case where onPathChanged was not called)\n if (newPath && currentPath !== newPath) {\n derivedPath = newPath\n }\n return derivedPath\n },\n // detect duplicate nav selections\n detectDuplicateSelections(lastSavedPath?: string, path?: string, defaultPath?: string) {\n // If the path is the default path and the current path ref is empty, then we are already at the default path\n const selectedDefaultPathAgain = path === defaultPath && lastSavedPath === ''\n // If the path is the same as the last seen path, then we don't need to navigate\n const pathIsUnchanged = lastSavedPath === path\n\n return selectedDefaultPathAgain || pathIsUnchanged\n },\n}\n","export const CustomerParams = [\n { key: 'utm_source', value: 'coin' },\n {\n key: 'receipt', matches: '*', value: 'receiptHash',\n },\n]\n\nexport const detectCustomer = () => {\n return CustomerParams.find((customerParamSet) => {\n const searchParams = new URLSearchParams(globalThis.location.search)\n const searchParamValue = searchParams.get(customerParamSet.key)\n\n // if the customerParamSet.key is present and matches in *, we don't care about the value\n if (searchParams.has(customerParamSet.key) && customerParamSet.matches === '*') {\n return true\n }\n\n // if the customerParamSet.value is defined, we care if the key is present and the value matches\n return searchParamValue && searchParamValue === customerParamSet.value\n })\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { Payload } from '@xyo-network/payload-model'\n\nimport { useXyOsUiContext } from '../../../../../XyOsUi/index.ts'\nimport { DappMenuResourceHooks } from './useBuildDappMenuResource.ts'\nimport { useDappMenuCaller } from './useDappMenuCaller.ts'\n\nexport const useAddDappMenuItems = (payloads: Payload[]) => {\n const xyOs = useXyOsUiContext()\n const {\n menuItemSelections, menuConfigs, resourceError,\n } = DappMenuResourceHooks.resourceViewsFromContext(xyOs)\n const dappMenuCaller = useDappMenuCaller()\n\n const [, addMenuItemsError] = usePromise(async () => {\n await dappMenuCaller?.add(payloads)\n }, [payloads, dappMenuCaller])\n\n return {\n addMenuItemsError,\n menuConfig: menuConfigs?.[0],\n path: menuItemSelections?.[0],\n error: resourceError,\n }\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport type { DappMenuResourceViews } from '@xyo-network/os-runtime'\nimport { DappMenuResource } from '@xyo-network/os-runtime'\n\nimport {\n ResourceHooks, useCleanUpResource, useSyncExternalPayloadStore,\n} from '../../../../../resource/index.ts'\n\nexport const useBuildDappMenuResource = (xyOsContext?: XyOsContext | null) => {\n const resource = usePromise(async () => {\n if (xyOsContext) {\n const resource = new DappMenuResource(xyOsContext)\n await resource.start()\n return resource\n }\n }, [xyOsContext])\n\n useCleanUpResource(resource[0])\n\n return resource\n}\n\nexport const useMenuResourceViews = (resource?: DappMenuResource) => {\n const menuItemSelections = useSyncExternalPayloadStore('menuItemSelections', resource)\n const menuConfigs = useSyncExternalPayloadStore('menuConfigs', resource)\n const menuItems = useSyncExternalPayloadStore('menuItems', resource)\n const menuItemsVisible = useSyncExternalPayloadStore('menuItemsVisible', resource)\n\n return {\n menuConfigs,\n menuItemSelections,\n menuItems,\n menuItemsVisible,\n resource,\n }\n}\n\nexport const DappMenuResourceHooks = new ResourceHooks<DappMenuResourceViews, DappMenuResource>(useBuildDappMenuResource, useMenuResourceViews)\n","import { assertEx } from '@xylabs/sdk-js'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport { DappMenuCaller } from '@xyo-network/os-runtime'\nimport { useMemo } from 'react'\n\nimport { useXyOsUiContext } from '../../../../../XyOsUi/index.ts'\n\ntype DappMenuCallerHookOptions = {\n ignoreProvidedNode?: boolean\n}\n\nexport const useDappMenuCaller = (context?: XyOsContext | null, { ignoreProvidedNode }: DappMenuCallerHookOptions = {}) => {\n const xyOs = useXyOsUiContext()\n\n return useMemo(() => {\n const resolvedProvidedNode = ignoreProvidedNode ? null : xyOs\n if (context || resolvedProvidedNode) {\n const finalContext = assertEx(context ?? xyOs, () => 'no node was found in context or passed as argument')\n return new DappMenuCaller(finalContext)\n }\n }, [ignoreProvidedNode, context, xyOs])\n}\n","import type { DappName, XyOsContext } from '@xyo-network/os-model'\nimport {\n useEffect, useRef, useState,\n} from 'react'\nimport { useNavigate, useParams } from 'react-router-dom'\n\nimport type { DappMenuProperties } from '../../types/index.ts'\nimport { DappPathHelpers } from '../lib/index.ts'\nimport { useDappMenuDependencies } from './useDappMenuDependencies.ts'\n\n/**\n * Use the passed in dapp Node to resolve menu related modules and return the menu related items\n */\n\nexport const useDappMenu = (context?: XyOsContext | null, dappName?: DappName): DappMenuProperties => {\n const [error, setError] = useState<Error>()\n const params = useParams()\n const navigate = useNavigate()\n const {\n defaultPath, menuConfigs, menuItemsVisible, menuSelection, resourceError,\n } = useDappMenuDependencies(context)\n const activePath = menuSelection ?? defaultPath\n\n // Keep track of the current path\n // If links are clicked within a dapp, the path will change so we need to keep track of it\n const currentPathRef = useRef<string>(undefined)\n\n // Initialize the current path\n useEffect(() => {\n if (params && currentPathRef.current === undefined) {\n currentPathRef.current = params.path ?? ''\n }\n }, [])\n\n // Reset the current path when the dappNode goes away (e.g. when the dapp is closed)\n useEffect(() => {\n if (context === null) {\n currentPathRef.current = undefined\n }\n }, [context])\n\n // Update the current path when new menuSelections are made without invoking onPathChange (i.e. clicking link within a dapp)\n useEffect(() => {\n if (menuSelection) {\n currentPathRef.current = menuSelection\n }\n }, [menuSelection])\n\n useEffect(() => {\n if (resourceError) setError(resourceError)\n }, [resourceError])\n\n // Callback to invoke when the path changes. Main purpose is the keep the url in sync with the menu selection\n const onPathChange = (path: string) => {\n const pathIsInUnchanged = DappPathHelpers.detectDuplicateSelections(currentPathRef.current, path, defaultPath)\n if (pathIsInUnchanged) return\n\n // navigate to the new path so listeners on the route can react\n const destinationPath = DappPathHelpers.deriveDestinationPath(path, defaultPath, dappName)\n void navigate(destinationPath)\n currentPathRef.current = path\n }\n\n return {\n activePath,\n error,\n menuConfig: menuConfigs?.[0],\n menuItems: menuItemsVisible,\n onPathChange,\n }\n}\n","import type { XyOsContext } from '@xyo-network/os-model'\nimport { useMemo } from 'react'\n\nimport { DappMenuResourceHooks } from './useBuildDappMenuResource.ts'\n\nexport const useDappMenuDependencies = (context?: XyOsContext | null) => {\n const {\n menuConfigs, menuItemSelections, menuItemsVisible, resourceError,\n } = DappMenuResourceHooks.resourceViewsFromContext(context)\n const defaultPath = useMemo(() => menuConfigs?.[0]?.defaultPath, [menuConfigs])\n const menuSelection = menuItemSelections?.[0]?.path\n\n return {\n defaultPath, menuConfigs, menuItemsVisible, menuSelection, resourceError,\n }\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { assertEx, findAs } from '@xylabs/sdk-js'\nimport type { ArchivistInstance, ArchivistModuleEventData } from '@xyo-network/archivist-model'\nimport { asArchivistInstance } from '@xyo-network/archivist-model'\nimport { asOptionalDappInjectableParams, type XyOsContext } from '@xyo-network/os-model'\nimport { DappCaller } from '@xyo-network/os-runtime'\nimport { useNavigate, useSearchParams } from 'react-router-dom'\n\n/** Update the dapp archivist with injectable params based off changes in the query params */\nexport const useManageDappInjectableParamsFromRoute = (context?: XyOsContext | null) => {\n const [queryParams] = useSearchParams()\n const navigate = useNavigate()\n\n const [, callerError] = usePromise(async () => {\n if (context && queryParams) {\n const dappCaller = new DappCaller(context)\n const pathname = globalThis.location.pathname\n await dappCaller.setDappInjectableRouteParams(queryParams, pathname)\n }\n }, [context, queryParams])\n\n // Update the route if the dapp inserts a new injectable params payload and the path is different\n const [, listenerError] = usePromise(async () => {\n let archivist: ArchivistInstance | undefined\n const listener = ({ payloads }: ArchivistModuleEventData['inserted']) => {\n const injectableParams = findAs(payloads, asOptionalDappInjectableParams)\n if (injectableParams && context) {\n const pathname = globalThis.location.pathname\n if (pathname !== injectableParams.path) {\n void navigate(injectableParams.path)\n }\n }\n }\n\n try {\n if (context) {\n const mod = assertEx(await context?.root.resolve('DappArchivist'), () => 'DappArchivist not found')\n archivist = asArchivistInstance(mod, () => 'DappArchivist not is not an Archivist', { required: true })\n\n archivist.on('inserted', listener)\n }\n } catch (e) {\n console.error(e)\n throw e\n }\n\n return () => {\n archivist?.off('inserted', listener)\n }\n // disabling because navigate reference changes unnecessarily for this use case\n // see - https://stackoverflow.com/a/75329664/2803259\n }, [context])\n\n return [callerError, listenerError]\n}\n","import { useAtomicPromise, usePromise } from '@xylabs/react-promise'\nimport { findAs } from '@xylabs/sdk-js'\nimport type { ArchivistInstance, ArchivistModuleEventData } from '@xyo-network/archivist-model'\nimport type {\n DappId, DappIntent, XyOsContext,\n} from '@xyo-network/os-model'\nimport { asOptionalDappIntent, DappIntentTypes } from '@xyo-network/os-model'\nimport { DappIntentCaller } from '@xyo-network/os-runtime'\nimport { useEffect, useState } from 'react'\n\nimport { useSendDappIntent } from '../../../../../../intent/index.ts'\nimport { useDappCaller } from '../../../../../useDappCaller.ts'\n\n// React to new intents inserted into the dapp archivist\nexport const useManageDappIntentRequest = (context?: XyOsContext | null, dappId?: DappId) => {\n const dappCaller = useDappCaller(context)\n const sendIntent = useSendDappIntent()\n const [intentPayload, setIntentPayload] = useState<DappIntent>()\n const [handleIntentError, setHandleIntentError] = useState<Error>()\n const [dappArchivist, setDappArchivist] = useState<ArchivistInstance>()\n\n usePromise(async () => {\n if (context && dappCaller) {\n const archivist = await dappCaller.getDappArchivist()\n if (archivist) setDappArchivist(archivist)\n }\n }, [context, dappCaller])\n\n useAtomicPromise(\n 'manageDappIntent',\n async () => {\n if (context && intentPayload?.targetDappId && dappId && sendIntent) {\n try {\n const minimizeIntent = DappIntentCaller.buildIntent(DappIntentCaller.OsDappName, DappIntentTypes.Minimize, dappId)\n await sendIntent(minimizeIntent)\n await sendIntent(intentPayload)\n } catch (e) {\n console.error(e)\n setHandleIntentError(e as Error)\n }\n setIntentPayload(undefined)\n }\n },\n [context, dappId, intentPayload, sendIntent],\n )\n\n useEffect(() => {\n // catch the intent sent by the dapp and mirror it inside the os intent archivist\n const listener = ({ payloads }: ArchivistModuleEventData['inserted']) => {\n // only dapps with an active context should react to the new intents\n if (context) {\n const intentPayload = findAs(payloads, asOptionalDappIntent)\n if (intentPayload) {\n setIntentPayload(intentPayload)\n }\n }\n }\n dappArchivist?.off('inserted', listener)\n if (dappArchivist && context) {\n dappArchivist.on('inserted', listener)\n }\n return () => {\n dappArchivist?.off('inserted', listener)\n }\n }, [context, dappArchivist])\n\n return handleIntentError\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport {\n useCallback, useEffect, useRef,\n} from 'react'\nimport { useNavigate, useParams } from 'react-router-dom'\n\nimport { DappPathHelpers } from '../../lib/index.ts'\nimport { useDappMenuCaller, useDappMenuDependencies } from '../../menu/index.ts'\n\n/**\n * Update the menu archivist based off changes in the the `path` route param\n *\n * Test Cases:\n *\n * 1. Clicking sidebar menu\n * 2. Clicking sidebar menu twice\n * 3. Navigating directly to a path on dApp load\n * 4. Navigating directly to a path from within the dApp by clicking a link\n * 5. Navigating directly to a path from within the dApp by clicking back\n */\n\n/** React to changes in the `path` route param */\nexport const useManageDappPathFromRoute = (context?: XyOsContext | null, dappName?: string) => {\n const params = useParams()\n const { path: pathParam } = params\n const dappMenuCaller = useDappMenuCaller(context, { ignoreProvidedNode: true })\n const { menuSelection, defaultPath } = useDappMenuDependencies(context)\n const navigate = useNavigate()\n\n // keep track of the current path and avoid making pathParam a dependency\n const currentPathRef = useRef<string>(undefined)\n\n // Update the menu archivist based off the params\n const updateMenuArchivist = useCallback(\n async (pathParam?: string) => {\n currentPathRef.current = pathParam\n // ensure the dappNode is active before updating the menu\n if (context && dappMenuCaller) {\n const currentPath = await dappMenuCaller?.currentNavSelection()\n const updatedPath = DappPathHelpers.derivePathForNavSelection(pathParam, currentPath?.[0]?.path, defaultPath)\n\n if (updatedPath) {\n await dappMenuCaller.makeNavItemSelection(updatedPath)\n }\n }\n },\n [dappMenuCaller, context, defaultPath],\n )\n\n // Sync the route when the menu archivist updates (no pathParam dependency)\n useEffect(() => {\n if (context && menuSelection) {\n const pathIsInUnchanged = DappPathHelpers.detectDuplicateSelections(currentPathRef.current ?? '', menuSelection, defaultPath)\n if (pathIsInUnchanged) return\n\n // navigate to the new path so listeners on the route can react\n const destinationPath = DappPathHelpers.deriveDestinationPath(menuSelection, defaultPath, dappName)\n void navigate(destinationPath)\n currentPathRef.current = menuSelection === defaultPath ? undefined : menuSelection\n }\n // disabling because navigate reference changes unnecessarily for this use case\n // see - https://stackoverflow.com/a/75329664/2803259\n }, [dappName, context, defaultPath, menuSelection])\n\n // Sync the menu archivist when the route changes (no menuSelection dependency)\n const [, updateErrors] = usePromise(async () => {\n if (context && pathParam !== currentPathRef.current) {\n await updateMenuArchivist(pathParam)\n currentPathRef.current = pathParam\n }\n }, [context, pathParam, updateMenuArchivist])\n\n return updateErrors\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { DappIntent } from '@xyo-network/os-model'\nimport { DappIntentTypes } from '@xyo-network/os-model'\nimport { DappIntentCaller, NameTransforms } from '@xyo-network/os-runtime'\nimport { useRef } from 'react'\nimport { useParams } from 'react-router-dom'\n\nimport { useDappIntentCaller, useSendDappIntent } from '../../../../../../intent/index.ts'\n\n/** Launch or close the dapp based off changes to the `dappName` route param */\nexport const useManageDappStateFromRoute = (intentPayload?: DappIntent) => {\n const params = useParams()\n const { dappName: dappNameParam } = params\n const sendIntent = useSendDappIntent()\n const intentCaller = useDappIntentCaller()\n\n // refs to track the dappName param and the last intent sent\n const dappNameParamRef = useRef<string>(undefined)\n const intentRef = useRef<DappIntent>(undefined)\n\n // auto-close the dapp if it was launched and the route param goes undefined (i.e. back button clicked)\n usePromise(async () => {\n const launched = intentPayload?.intent === DappIntentTypes.Launch\n const dappNameParamRemoved = !!dappNameParamRef.current && dappNameParam === undefined\n // The last intent was Launch and the dappName param was removed\n if (launched && dappNameParamRemoved && sendIntent) {\n const closeIntent = DappIntentCaller.buildIntent(DappIntentCaller.OsDappName, DappIntentTypes.Close)\n await sendIntent(closeIntent)\n }\n\n // sync back the dappNameParamRef for future checks\n dappNameParamRef.current = dappNameParam\n }, [dappNameParam, intentPayload, sendIntent])\n\n // auto-launch the dapp if the route param matches the dapp name\n usePromise(async () => {\n if (dappNameParam && sendIntent && intentCaller) {\n const dappNameParamDeSlugged = new NameTransforms(dappNameParam).deSlug()\n // no intents have been sent yet and the dappName param is set so we need to auto launch the dapp\n const autoLaunchNeeded = intentRef.current === undefined && dappNameParam\n\n if (autoLaunchNeeded) {\n const launchIntent = DappIntentCaller.buildIntent(DappIntentCaller.OsDappName, DappIntentTypes.Launch, dappNameParamDeSlugged)\n await sendIntent(launchIntent)\n // sync back the intentRef to ensure the auto launch only happens once\n intentRef.current = launchIntent\n return\n }\n }\n }, [dappNameParam, sendIntent, intentCaller, intentPayload?.intent])\n}\n","import {\n useCallback, useEffect, useRef, useState,\n} from 'react'\nimport { useNavigate, useSearchParams } from 'react-router-dom'\n\nexport const useDebugClick = () => {\n const [params, setParams] = useSearchParams()\n const [debugOpen, setDebugOpen] = useState(false)\n const openFromClick = useRef(false)\n const closeFromClick = useRef(false)\n const initialized = useRef(false)\n const navigate = useNavigate()\n\n const openDebug = useCallback(() => {\n openFromClick.current = true\n closeFromClick.current = false\n setParams((params) => {\n params.set('debug', 'true')\n return new URLSearchParams(params)\n })\n setDebugOpen(true)\n }, [setParams])\n\n const closeDebug = useCallback(() => {\n openFromClick.current = false\n closeFromClick.current = true\n initialized.current = false\n void navigate(-1)\n setDebugOpen(false)\n }, [navigate])\n\n // Auto Open Logic (on forward click) - not working\n // useEffect(() => {\n // // Was closed, open wasn't clicked, and debug is in the query params\n // const openedFromRoute = !openFromClick.current && !closeFromClick.current && params.has('debug')\n // if (openedFromRoute) {\n // // openDebug()\n // }\n // }, [openDebug, params])\n\n // Auto Close Logic (on back click)\n useEffect(() => {\n // Was opened, close wasn't clicked, and debug is in the query params\n const initialOpen = openFromClick.current && !closeFromClick.current && params.has('debug')\n // Was opened, close wasn't clicked, and debug is missing in the query params\n const backButtonClicked = openFromClick.current && !closeFromClick.current && !params.has('debug')\n if (initialOpen) {\n // using the ref to avoid setting debugOpen to false on the first render\n if (initialized.current === false) {\n initialized.current = true\n }\n } else if (backButtonClicked) {\n initialized.current = false\n closeDebug()\n }\n }, [params, closeDebug])\n\n return {\n closeDebug, debugOpen, openDebug,\n }\n}\n","import type { RegisteredReactDapp } from '@xyo-network/os-react-model'\nimport { useMemo } from 'react'\n\nimport { NodeManifest } from '../NodeManifest.tsx'\n\nexport const useDecomposeDapp = (dapp?: RegisteredReactDapp) => {\n const DappComponent = useMemo(() => dapp?.params.modes?.window?.component ?? NodeManifest, []) as React.FC<{\n name?: string\n }>\n const name = dapp?.config.name\n const version = dapp?.config.version\n const scrollable = dapp?.params.modes?.window?.scrollable ?? true\n\n return {\n DappComponent,\n dapp,\n name,\n scrollable,\n version,\n }\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { useProvidedNode } from '@xyo-network/react-node'\nimport React from 'react'\n\nexport const NodeManifest = () => {\n const [node] = useProvidedNode()\n const [nodeManifest] = usePromise(async () => await node?.manifest(3), [node])\n\n return (\n <>\n {node\n ? <pre>{JSON.stringify(nodeManifest, null, 2)}</pre>\n : null}\n </>\n )\n}\n","import { useXyOsUiContext } from '../../../../XyOsUi/index.ts'\n\nexport const useExposedNode = () => {\n const xyOS = useXyOsUiContext()\n return xyOS?.exposedNode\n}\n","import { useMemo } from 'react'\nimport { useSearchParams } from 'react-router-dom'\n\nimport { detectCustomer } from './lib/index.ts'\n\nconst PARAMS_TO_TARGET = ['username', 'utm_source'] as const\n\nexport const useSkipLoadingScreen = () => {\n const [params] = useSearchParams()\n const customer = detectCustomer()\n return useMemo(() => {\n const hasTargetParams = PARAMS_TO_TARGET.some(param => params.has(param))\n const isCustomer = !!customer\n\n return hasTargetParams || isCustomer\n }, [customer, params])\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { ArchivistModuleEventData } from '@xyo-network/archivist-model'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport { useWeakArchivistFromNode } from '@xyo-network/react-archivist'\n\nimport { useDappCaller } from '../../../useDappCaller.ts'\n\n/**\n * Syncs the registered access interfaces from the Os with the DappArchivist\n * @param dappNode The dapp node\n */\nexport const useSyncOsRegisteredAccessInterfaces = (context?: XyOsContext | null) => {\n const [registeredInterfacesArchivist] = useWeakArchivistFromNode('RegisteredDappInterfacesArchivist')\n const dappCaller = useDappCaller(context)\n\n usePromise(async () => {\n const listener = async ({ payloads }: ArchivistModuleEventData['inserted']) => {\n if (context && dappCaller) {\n await dappCaller.addPayloadsToDappArchivist(payloads)\n }\n }\n if (context && dappCaller) {\n // Add all registered interfaces to the dapp archivist\n const registeredInterfaces = await registeredInterfacesArchivist?.deref()?.all()\n if (registeredInterfaces) {\n await dappCaller.addPayloadsToDappArchivist(registeredInterfaces)\n }\n // Listen for new interfaces and add them to the dapp archivist\n registeredInterfacesArchivist?.deref()?.on('inserted', listener)\n }\n\n return () => {\n registeredInterfacesArchivist?.deref()?.off('inserted', listener)\n }\n }, [dappCaller, context, registeredInterfacesArchivist])\n}\n","import type { Theme } from '@mui/material'\nimport { useMediaQuery } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport {\n FlexCol, FlexGrowCol, FlexRow,\n} from '@xylabs/react-flexbox'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nexport interface DappChromeBaseProps extends FlexBoxProps {\n appBar?: ReactNode\n children?: ReactNode\n screenMenu?: ReactNode\n splashScreen?: ReactNode\n}\n\nexport interface DappChromeProps extends DappChromeBaseProps {\n largeScreenMenu?: ReactNode\n smallScreenMenu?: ReactNode\n}\n\nconst DappChromeSmall: React.FC<DappChromeBaseProps> = ({\n appBar, children, screenMenu, splashScreen, ...props\n}) => {\n return (\n <FlexCol alignItems=\"stretch\" id=\"dapp-chrome-container-small\" {...props}>\n {splashScreen}\n <FlexGrowCol\n alignItems=\"stretch\"\n id=\"dapp-chrome-small\"\n justifyContent=\"start\"\n sx={{ background: (theme: Theme) => theme.vars?.palette.background.default }}\n >\n {appBar}\n <FlexGrowCol\n sx={{ overflowY: 'auto' }}\n alignItems=\"stretch\"\n >\n {children}\n </FlexGrowCol>\n {screenMenu}\n </FlexGrowCol>\n </FlexCol>\n )\n}\n\nexport const DappChromeLarge: React.FC<DappChromeBaseProps> = ({\n appBar, children, screenMenu, splashScreen, ...props\n}) => {\n return (\n <FlexRow alignItems=\"stretch\" id=\"dapp-chrome-container-large\" {...props}>\n {splashScreen}\n {screenMenu}\n <FlexGrowCol\n alignItems=\"stretch\"\n id=\"dapp-chrome-large\"\n justifyContent=\"start\"\n sx={{ background: (theme: Theme) => theme.vars?.palette.background.default }}\n >\n {appBar}\n <FlexGrowCol\n sx={{ overflowY: 'auto' }}\n alignItems=\"stretch\"\n justifyContent=\"flex-start\"\n >\n {children}\n </FlexGrowCol>\n </FlexGrowCol>\n </FlexRow>\n )\n}\n\nexport const DappChrome: React.FC<DappChromeProps> = ({\n largeScreenMenu, smallScreenMenu, ...props\n}) => {\n const isMedium = useMediaQuery((theme: Theme) => theme.breakpoints.up('md'))\n\n return isMedium ? <DappChromeLarge screenMenu={largeScreenMenu} {...props} /> : <DappChromeSmall screenMenu={smallScreenMenu} {...props} />\n}\n","import {\n Card, CardContent, Chip, Container, Divider, Typography, useTheme,\n} from '@mui/material'\nimport { FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'\nimport { alphaCss } from '@xylabs/react-theme'\nimport type { DappName, DappVersion } from '@xyo-network/os-model'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport { InstallButtonSection } from './InstallButtonSection.js'\nimport { SummarySection } from './SummarySection.js'\n\nexport interface DefaultComingSoonProps extends PropsWithChildren {\n children?: React.ReactNode\n dappIconSvg?: string\n desc?: Array<string>\n developerLink?: string\n name?: DappName\n version?: DappVersion\n}\n\nconst defaultDescription = ['Description coming soon!']\n\nexport const DefaultComingSoon: React.FC<DefaultComingSoonProps> = ({\n children,\n desc = defaultDescription,\n developerLink = 'https://xylabs.com',\n name,\n dappIconSvg,\n version,\n}) => {\n const theme = useTheme()\n\n return (\n <Container\n maxWidth=\"md\"\n sx={{\n minHeight: '100%', overflow: 'auto', paddingTop: 2, width: '100%',\n }}\n >\n {version\n ? null\n : (\n <FlexRow width=\"100%\" paddingBottom={2}>\n <Chip\n label=\"This app is not yet publicly available on xyOS\"\n sx={{\n backgroundColor: alphaCss(theme.vars?.palette.info.main ?? '#000', 0.2), color: theme.vars?.palette.info.main, width: '100%',\n }}\n >\n </Chip>\n </FlexRow>\n )}\n <FlexGrowCol width=\"100%\" alignItems=\"flex-start\" minHeight=\"100%\">\n <FlexGrowCol width=\"100%\" alignItems=\"stretch\" justifyContent=\"flex-start\" gap={2}>\n <SummarySection dappIconSvg={dappIconSvg} name={name} version={version} developerLink={developerLink} />\n <InstallButtonSection />\n <Divider flexItem />\n <Card>\n <CardContent>\n <FlexGrowCol justifyContent=\"flex-start\" alignItems=\"flex-start\">\n <Typography variant=\"h6\" gutterBottom>\n Learn more about\n {' '}\n {name}\n </Typography>\n {desc?.map((paragraph: string, index: number) => {\n return (\n <Typography gutterBottom paddingBottom={1} key={index} variant=\"body1\">\n {paragraph}\n </Typography>\n )\n })}\n </FlexGrowCol>\n </CardContent>\n </Card>\n {children}\n </FlexGrowCol>\n </FlexGrowCol>\n </Container>\n )\n}\n","import { ButtonEx } from '@xylabs/react-button'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nexport interface InstallButtonSectionProps extends FlexBoxProps {\n installLink?: string\n notificationLink?: string\n}\n\nexport const InstallButtonSection: React.FC<InstallButtonSectionProps> = ({\n installLink = '',\n notificationLink = 'https://xyo.network/newsletter',\n ...props\n}) => {\n return (\n <FlexRow\n width=\"100%\"\n gap={1}\n sx={{\n alignItems: 'flex-start',\n flexDirection: { md: 'row', xs: 'column' },\n }}\n {...props}\n >\n <ButtonEx fullWidth variant=\"contained\" disabled href={installLink}>\n Install\n </ButtonEx>\n <ButtonEx fullWidth variant=\"outlined\" href={notificationLink} target=\"_blank\">\n Get Notified When Available\n </ButtonEx>\n </FlexRow>\n )\n}\n","import { VerifiedRounded } from '@mui/icons-material'\nimport {\n Card, CardContent, Typography, useTheme,\n} from '@mui/material'\nimport {\n FlexGrowCol, FlexGrowRow, FlexRow,\n} from '@xylabs/react-flexbox'\nimport type { DappName, DappVersion } from '@xyo-network/os-model'\nimport React from 'react'\n\nimport { RenderHtml } from '../../../../RenderHtml.tsx'\nimport { DeveloperLinkSection } from './DeveloperLinkSection.js'\n\nexport interface SummarySectionProps {\n dappIconSvg?: string\n developerLink: string\n name?: DappName\n version?: DappVersion\n}\n\nexport const SummarySection: React.FC<SummarySectionProps> = ({\n name, dappIconSvg, version = '1.0', developerLink = 'https://xylabs.com',\n}) => {\n const theme = useTheme()\n return (\n <Card sx={{ width: '100%' }}>\n <CardContent>\n <FlexRow\n gap={3}\n alignItems=\"flex-start\"\n sx={{ flexDirection: 'column', width: '100%' }}\n >\n <FlexGrowRow\n sx={{ gap: { md: 2, xs: 1 } }}\n alignItems=\"flex-start\"\n >\n <Card elevation={0} variant=\"outlined\">\n <CardContent>\n {dappIconSvg\n ? <RenderHtml htmlString={dappIconSvg} />\n : null}\n </CardContent>\n </Card>\n <FlexGrowCol alignItems=\"flex-start\">\n <FlexGrowCol alignItems=\"flex-start\">\n <Typography\n sx={{ fontSize: { md: theme.typography.h1.fontSize, xs: theme.typography.h5.fontSize } }}\n fontWeight={theme.typography.fontWeightBold}\n >\n {name}\n </Typography>\n <Typography gutterBottom variant=\"subtitle2\">\n Version:\n {' '}\n {version}\n </Typography>\n </FlexGrowCol>\n <FlexGrowRow gap={0.5} alignItems=\"center\" justifyContent=\"center\">\n <VerifiedRounded color=\"success\" fontSize=\"small\" />\n <Typography variant=\"body1\" color={theme.vars?.palette.success.main}>\n XY Labs\n </Typography>\n </FlexGrowRow>\n {developerLink\n ? <DeveloperLinkSection developerLink={developerLink} />\n : null}\n </FlexGrowCol>\n </FlexGrowRow>\n </FlexRow>\n </CardContent>\n </Card>\n )\n}\n","import { useTheme } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexGrowRow } from '@xylabs/react-flexbox'\nimport { LinkEx } from '@xylabs/react-link'\nimport React from 'react'\n\nexport interface DeveloperLinkSectionProps extends FlexBoxProps {\n developerLink: string\n}\n\nexport const DeveloperLinkSection: React.FC<DeveloperLinkSectionProps> = ({ developerLink = 'https://xylabs.com', ...props }) => {\n const theme = useTheme()\n return (\n <FlexGrowRow\n gap={1}\n sx={{\n alignItems: 'flex-start',\n flexDirection: { md: 'row', xs: 'column' },\n }}\n {...props}\n >\n <LinkEx color={theme.vars?.palette.info.main} href={developerLink} target=\"_blank\">\n {developerLink}\n </LinkEx>\n </FlexGrowRow>\n )\n}\n","import type { BottomNavigationProps } from '@mui/material'\nimport {\n BottomNavigation, BottomNavigationAction, Paper, styled,\n} from '@mui/material'\nimport { useIsDark } from '@xylabs/react-theme'\nimport type { DappNavItem, DappNavMenuConfig } from '@xyo-network/os-model'\nimport React, { useEffect, useState } from 'react'\n\nexport interface DappBottomNavigationProps extends BottomNavigationProps {\n activePath?: string\n menuConfig?: DappNavMenuConfig\n menuItems?: DappNavItem[]\n onPathChange?: (to: string) => void\n}\n\nexport const DappBottomNavigation: React.FC<DappBottomNavigationProps> = ({\n activePath, menuConfig, menuItems, onPathChange, ...props\n}) => {\n const [activeIndex, setActiveIndex] = useState(0)\n\n // update based off active path changes\n useEffect(() => {\n if (menuConfig?.defaultPath && menuItems && activePath) {\n setActiveIndex(menuItems.findIndex(item => activePath === item.path))\n }\n }, [activePath, menuConfig, menuItems])\n\n return (\n <Paper elevation={3}>\n <BottomNavigation\n value={activeIndex}\n onChange={(_, value) => {\n setActiveIndex(value)\n const to = menuItems?.[value].path\n if (to) onPathChange?.(to)\n }}\n showLabels\n {...props}\n >\n {menuItems?.map(({ svgIcon: icon, primaryText }, index) => {\n return (\n <StyledBottomNavigationAction\n className=\"bottom-nav-action\"\n key={index}\n label={primaryText}\n icon={(\n <span\n ref={(ref) => {\n if (ref) {\n ref.innerHTML = icon ?? ''\n }\n }}\n />\n )}\n />\n )\n })}\n </BottomNavigation>\n </Paper>\n )\n}\n\nconst StyledBottomNavigationAction = styled(BottomNavigationAction, { name: 'StyledBottomNavigationAction' })(({ theme }) => {\n const darkMode = useIsDark()\n return { '&.Mui-selected': { color: darkMode ? theme.vars?.palette.primary.main : theme.vars?.palette.secondary.main } }\n})\n","import type { DrawerProps } from '@mui/material'\nimport {\n alpha,\n Drawer,\n List,\n ListItem,\n ListItemIcon,\n ListItemText,\n Tooltip,\n Typography,\n useTheme,\n} from '@mui/material'\nimport {\n FlexCol, FlexGrowRow, FlexRow,\n} from '@xylabs/react-flexbox'\nimport {\n alphaCss, darkenCss, useIsDark,\n} from '@xylabs/react-theme'\nimport type {\n DappName, DappNavItem, DappNavMenuConfig, DappVersion, XyOsContext,\n} from '@xyo-network/os-model'\nimport { XyOsMonitor } from '@xyo-network/os-runtime'\nimport React, { useEffect, useState } from 'react'\n\nimport { DebugDialogWithNode } from '../../../../Debug/index.ts'\nimport { RenderHtml } from '../../../../RenderHtml.tsx'\nimport { useDebugClick } from '../../hooks/index.ts'\nimport { BottomMenuArea } from './BottomMenuArea.tsx'\nimport { StyledListItemButton, StyledMenuIconWrapSpan } from './StyledListItems.tsx'\n\nexport interface DappMenuDrawerProps extends DrawerProps {\n activePath?: string\n context?: XyOsContext | null\n iconSvg?: string\n menuConfig?: DappNavMenuConfig\n menuItems?: DappNavItem[]\n name?: DappName\n onPathChange?: (to: string) => void\n version?: DappVersion\n}\n\nexport const DappMenuDrawer: React.FC<DappMenuDrawerProps> = ({\n activePath,\n context,\n iconSvg,\n name,\n menuConfig,\n menuItems,\n onPathChange,\n version,\n ...props\n}) => {\n const [path, setPath] = useState('')\n const darkMode = useIsDark()\n const theme = useTheme()\n const drawerColor = darkMode ? theme.vars?.palette.background.paper : darkenCss(theme.vars?.palette.primary.main ?? '#fff', 0.5)\n const activeColor = theme.vars?.palette.primary.light\n\n useEffect(() => {\n if (menuConfig?.defaultPath && menuItems && activePath) {\n const newPath = menuItems.find(item => activePath === item.path)?.path ?? ''\n setPath(newPath)\n }\n }, [activePath, menuConfig, menuItems])\n\n const handleChange = (to: string) => {\n XyOsMonitor.trackEvent('Visit dApp Page', { Page: to })\n setPath(to)\n onPathChange?.(to)\n }\n\n const {\n closeDebug, debugOpen, openDebug,\n } = useDebugClick()\n\n return (\n <Drawer\n variant=\"permanent\"\n anchor=\"left\"\n PaperProps={{\n sx: {\n position: 'static', backgroundColor: drawerColor, borderRight: 'none',\n },\n }}\n sx={{ width: '280px' }}\n {...props}\n >\n <FlexCol alignItems=\"stretch\" justifyContent=\"space-between\" height=\"100dvh\">\n <FlexCol alignItems=\"stretch\" justifyContent=\"flex-start\" flexGrow={1} overflow=\"auto\">\n <Tooltip title={version}>\n <FlexGrowRow\n id=\"dapp-name-and-icon\"\n padding={2}\n justifyContent=\"flex-start\"\n gap={1}\n sx={{ cursor: 'pointer' }}\n flexGrow={0}\n >\n {iconSvg ? RenderHtml({ htmlString: iconSvg }) : null}\n <Typography noWrap variant=\"h6\" letterSpacing=\"-1px\">\n {name}\n </Typography>\n </FlexGrowRow>\n </Tooltip>\n <DebugDialogWithNode closeDebug={closeDebug} debugOpen={debugOpen} context={context} />\n <List sx={{ p: 0, overflow: 'auto' }}>\n {menuItems?.map(({\n svgIcon: icon, primaryText, path: pathFromPayload,\n }) => (\n <ListItem\n key={primaryText}\n disablePadding\n sx={{ paddingBottom: 1 }}\n >\n <StyledListItemButton\n onClick={() => handleChange(pathFromPayload)}\n active={pathFromPayload === path}\n disableRipple\n disableTouchRipple\n >\n <FlexRow\n flexGrow={1}\n paddingX={2}\n paddingY={0.5}\n sx={{ '&:hover': { backgroundColor: alpha('#ffffff', 0.05) }, 'borderRadius': '10px' }}\n >\n <ListItemIcon\n sx={{ color: pathFromPayload === path ? activeColor : alpha('#fff', 0.3), justifyContent: 'center' }}\n >\n <StyledMenuIconWrapSpan\n ref={(ref: HTMLSpanElement | null) => {\n if (ref !== null) {\n ref.innerHTML = icon ?? ''\n }\n }}\n />\n </ListItemIcon>\n <ListItemText\n slotProps={{\n primary: {\n typography: {\n fontWeight: path === pathFromPayload ? 'bold' : 'inherit',\n color: pathFromPayload === path ? 'inherit' : alphaCss(theme.vars?.palette.text.primary ?? '#000', 0.5),\n },\n },\n }}\n primary={primaryText}\n style={{ opacity: pathFromPayload === path ? 1 : 0.5 }}\n />\n </FlexRow>\n </StyledListItemButton>\n </ListItem>\n ))}\n </List>\n </FlexCol>\n <BottomMenuArea openDebug={openDebug} backgroundColor={theme.vars?.palette.primary.dark ?? '#000'} />\n </FlexCol>\n </Drawer>\n )\n}\n","import {\n BugReport, KeyboardArrowDownRounded, KeyboardArrowUpRounded,\n} from '@mui/icons-material'\nimport {\n Card,\n Collapse,\n Divider,\n IconButton,\n Stack,\n Toolbar,\n Tooltip,\n Typography,\n useTheme,\n} from '@mui/material'\nimport { RotationAnimation } from '@xylabs/react-animation'\nimport { FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { LinkEx } from '@xylabs/react-link'\nimport { ColorSchemeButton } from '@xylabs/react-theme'\nimport React, { useState } from 'react'\n\nimport { XyoOSLogoWhite } from './img/index.ts'\nimport { socialLinksData } from './SocialData.js'\n\nexport interface BottomMenuAreaProps {\n backgroundColor: string\n openDebug: () => void\n}\n\nexport const BottomMenuArea: React.FC<BottomMenuAreaProps> = ({ openDebug, backgroundColor }) => {\n const theme = useTheme()\n const [expanded, setExpanded] = useState(false)\n\n // Toggle expand/collapse\n const handleExpandClick = () => {\n setExpanded(!expanded)\n }\n\n return (\n <Card\n sx={{\n position: 'relative',\n borderTopLeftRadius: '10px',\n borderTopRightRadius: '10px',\n borderBottomLeftRadius: '0px',\n borderBottomRightRadius: '0px',\n backgroundColor: backgroundColor,\n overflow: 'hidden',\n }}\n elevation={4}\n >\n {/* Collapsed View */}\n <FlexCol paddingY={1} alignItems=\"stretch\">\n <Stack\n paddingX={2}\n justifyContent=\"space-between\"\n flexDirection=\"row\"\n gap={0.5}\n onClick={handleExpandClick}\n sx={{ textTransform: 'none', cursor: 'pointer' }}\n >\n <Typography gutterBottom={false}>More</Typography>\n {expanded ? <KeyboardArrowUpRounded sx={{ color: '#fff' }} /> : <KeyboardArrowDownRounded sx={{ color: '#fff' }} />}\n </Stack>\n </FlexCol>\n {/* Expanded Content */}\n <Collapse in={expanded} timeout=\"auto\" unmountOnExit sx={{ paddingBottom: 3, color: '#fff' }}>\n <Divider flexItem></Divider>\n <FlexCol alignItems=\"center\">\n <Toolbar sx={{ paddingX: 1.5 }}>\n <Tooltip title=\"Debug Node View\">\n <IconButton onClick={openDebug} sx={{ color: '#fff' }}>\n <BugReport />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"Toggle Light/Dark Mode\">\n <span>\n <ColorSchemeButton />\n </span>\n </Tooltip>\n </Toolbar>\n <FlexRow flexWrap=\"wrap\">\n {socialLinksData.map(social => (\n <RotationAnimation key={social.link} rotation={20}>\n <IconButton\n sx={{ color: '#fff' }}\n href={social.link}\n target=\"_blank\"\n\n >\n {social.icon}\n </IconButton>\n </RotationAnimation>\n ))}\n </FlexRow>\n <FlexRow padding={1} justifyContent=\"center\" gap={0.5}>\n <Typography variant=\"body2\" color={theme.vars?.palette.text.primary}>\n Powered By\n </Typography>\n <img\n style={{ color: theme.vars?.palette.text.primary, fill: theme.vars?.palette.text.primary }}\n src={XyoOSLogoWhite}\n width=\"auto\"\n height=\"20px\"\n />\n </FlexRow>\n <Typography variant=\"caption\" color={theme.vars?.palette.text.primary}>\n Copyright © 2024 XY Labs, Inc.\n </Typography>\n <Stack gap={0.5} flexDirection=\"row\">\n <LinkEx color=\"inherit\" target=\"_blank\" href=\"https://xylabs.com/privacy/\">\n <Typography variant=\"caption\">Privacy</Typography>\n </LinkEx>\n {' '}\n •\n {' '}\n <LinkEx color=\"inherit\" target=\"_blank\" href=\"https://xylabs.com/terms/\">\n <Typography variant=\"caption\">Terms</Typography>\n </LinkEx>\n {' '}\n •\n {' '}\n <LinkEx color=\"inherit\" target=\"_blank\" href=\"https://xyo.network/\">\n <Typography variant=\"caption\">XYO Website</Typography>\n </LinkEx>\n </Stack>\n </FlexCol>\n </Collapse>\n </Card>\n )\n}\n","<svg id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 900 900\"><defs><style>.cls-1{fill:#a8a8a8;opacity:.21;}.cls-1,.cls-2{stroke-width:0px;}.cls-2{fill:#fff;}</style></defs><path class=\"cls-1\" d=\"M864.29,297.43c-2.44-6.58-9.76-9.94-16.34-7.5l-143.74,53.26L533.2,21.88c-1.85-3.48-5.21-5.9-9.09-6.56-3.89-.66-7.85.51-10.75,3.18l-267.76,246.55-118-97.86c-5.4-4.48-13.42-3.73-17.9,1.67-4.48,5.4-3.73,13.42,1.67,17.9l118,97.86L36.62,593.37c-2.09,3.34-2.5,7.46-1.14,11.15s4.37,6.54,8.13,7.72l347.4,108.61-25.75,151.12c-1.18,6.92,3.48,13.49,10.4,14.67.24.04.47.07.7.1,6.66.76,12.82-3.81,13.96-10.5l25.75-151.12,363.77,12.56c3.94.14,7.71-1.56,10.22-4.59,2.51-3.03,3.48-7.06,2.62-10.9l-79.64-355.16,143.75-53.26c6.58-2.44,9.94-9.75,7.5-16.34ZM518.49,48.34l156.33,293.75-401.12-68.35,244.79-225.4ZM674.37,367.8l-264.69,319.16-144.06-388.81,408.75,69.65ZM66.9,592.88l176.22-282.26,141.37,381.56-317.59-99.29ZM431.72,700.22l259.75-313.21,72.81,324.69-332.56-11.48Z\"/><path class=\"cls-2\" d=\"M865.04,302.64c.01-.2.02-.4.03-.6,0-.33,0-.66-.03-.99-.01-.2-.02-.39-.04-.58-.04-.35-.1-.71-.17-1.06-.03-.16-.05-.32-.09-.48-.12-.5-.26-1.01-.45-1.5-.18-.49-.4-.97-.64-1.43-.08-.15-.17-.29-.25-.43-.17-.31-.35-.61-.55-.9-.12-.17-.24-.33-.37-.49-.19-.25-.39-.5-.6-.74-.14-.16-.29-.32-.45-.47-.22-.22-.45-.44-.68-.65-.1-.08-.18-.18-.27-.26L530.1,18.07c-.34-.28-.7-.53-1.07-.77-.09-.06-.17-.13-.26-.19-.62-.39-1.26-.7-1.92-.98-.18-.07-.36-.14-.54-.21-.71-.26-1.43-.47-2.16-.6,0,0-.01,0-.02,0,0,0,0,0-.01,0-.67-.11-1.35-.15-2.03-.16-.37,0-.73,0-1.09.03-.23.02-.46.06-.7.09-.86.11-1.69.31-2.5.59-.07.03-.15.04-.23.07l-.32.12c-.2.08-.4.13-.59.22L115.08,165.06c-.11.04-.22.1-.33.15-.3.12-.59.25-.88.39-.19.1-.38.19-.57.3-.27.15-.54.32-.81.5-.17.12-.35.22-.52.35-.27.2-.53.42-.79.64-.14.12-.28.23-.41.35-.35.33-.68.68-1,1.05-.04.05-.08.1-.12.14-.32.38-.6.78-.87,1.2-.09.14-.16.29-.25.43-.18.31-.36.62-.51.94-.08.17-.15.35-.23.53-.13.31-.25.62-.36.93-.06.19-.12.38-.17.57-.09.33-.17.65-.23.98-.02.11-.06.22-.08.33l-72.09,423.12c-.07.43-.11.87-.13,1.3,0,.11-.03.22-.03.33-.03.73.02,1.44.12,2.16.02.19.06.38.09.57.13.74.31,1.48.57,2.19,0,0,0,0,0,0,0,.02.01.03.02.04.2.53.43,1.04.7,1.53.12.22.26.42.38.63.17.28.33.56.52.82.17.23.35.44.54.66.18.22.36.44.56.65.2.21.42.4.63.6.16.14.29.3.46.43l330.39,274c.08.07.17.12.25.18.32.25.65.49.99.71.15.09.29.19.44.28.44.26.9.5,1.37.7.04.02.08.04.12.06.51.21,1.03.39,1.56.53.17.05.35.08.53.12.24.06.47.12.71.16.23.04.46.07.69.1.47.05.95.08,1.42.08.15,0,.3-.02.45-.02.32-.01.65-.02.97-.06.18-.02.36-.06.54-.08.29-.04.58-.09.86-.15.19-.04.38-.1.56-.15.28-.08.55-.16.82-.25.08-.03.15-.04.23-.07l402.48-149.13s.06-.03.09-.04c.39-.15.76-.32,1.13-.51.12-.06.24-.1.35-.16.44-.24.88-.51,1.29-.8.03-.02.06-.04.09-.06.55-.39,1.07-.85,1.56-1.34.83-.82,1.54-1.76,2.11-2.78.09-.17.19-.33.27-.5.32-.64.61-1.3.82-2,.03-.11.05-.22.08-.33.12-.42.23-.84.3-1.27l72.09-423.12c.02-.11.02-.22.03-.33.05-.34.08-.67.1-1.01ZM771.44,701.13l-101.05-83.8,158.61-254.06-57.56,337.86ZM121.2,242.67l65.53,292.26-123.1,45.61,57.57-337.87ZM656.65,591.33l-141.37-381.56,317.59,99.3-176.22,282.26ZM508.76,181.1l22.05-129.41,263.81,218.79-285.86-89.37ZM483.7,176.83l-299.33-10.33L505.75,47.42l-22.05,129.41ZM208.31,514.94l-72.81-324.69,332.56,11.48-259.75,313.21ZM490.1,214.98l144.06,388.81-382.98-65.25-25.77-4.39L490.1,214.98ZM246.9,563.6l379.17,64.6-244.79,225.4-156.33-293.74,21.95,3.74ZM654.16,636.9l101.05,83.8-321.38,119.08,220.33-202.88ZM72.47,604.37l123.1-45.61,140.72,264.4-84.17-69.81-179.65-148.98Z\"/></svg>","import {\n Facebook, Instagram, LinkedIn, Reddit, StorefrontRounded, Telegram, X, YouTube,\n} from '@mui/icons-material'\nimport type { ReactNode } from 'react'\nimport React from 'react'\nimport { FaDiscord } from 'react-icons/fa'\n\ninterface socialLinksDataProps {\n icon: ReactNode\n link: string\n}\n\nexport const socialLinksData: socialLinksDataProps[] = [\n {\n icon: (\n <Facebook style={{ fontSize: '24px' }} />\n ),\n link: 'https://www.facebook.com/OfficialXYO',\n },\n {\n icon: (\n <X style={{ fontSize: '24px' }} />\n ),\n link: 'https://twitter.com/OfficialXYO',\n },\n {\n icon: (\n <Instagram style={{ fontSize: '24px' }} />\n ),\n link: 'https://www.instagram.com/officialxyo/',\n },\n {\n icon: (\n <Telegram style={{ fontSize: '24px' }} />\n ),\n link: 'https://t.me/xyonetwork',\n },\n {\n icon: (\n <Reddit style={{ fontSize: '24px' }} />\n ),\n link: 'https://www.reddit.com/r/XYONetwork/',\n },\n {\n icon: (\n <YouTube style={{ fontSize: '24px' }} />\n ),\n link: 'https://www.youtube.com/channel/UCyZDqb9pgntVHJVt1pxXtsw',\n },\n {\n icon: (\n <LinkedIn style={{ fontSize: '24px' }} />\n ),\n link: 'https://www.linkedin.com/company/officialxyo/',\n },\n {\n icon: (\n <FaDiscord style={{ fontSize: '24px' }} />\n ),\n link: 'https://discord.gg/officialxyo',\n },\n {\n icon: (\n <StorefrontRounded style={{ fontSize: '24px' }} />\n ),\n link: 'https://shop.xyo.network',\n },\n]\n","import { ListItemButton, styled } from '@mui/material'\n\n// Styled span for wrapping menu icons\nexport const StyledMenuIconWrapSpan = styled('span', { name: 'StyledMenuIconWrapSpan' })(() => ({\n alignItems: 'center',\n display: 'inline-flex',\n flexDirection: 'column',\n}))\n\nexport const StyledListItemButton = styled(ListItemButton, { name: 'StyledListItemButton', shouldForwardProp: prop => prop !== 'active' })<{\n active?: boolean\n}>(({ theme, active }) => {\n const activeOrHoverColor = theme.vars?.palette.primary.main\n\n return {\n 'position': 'relative',\n 'padding': '8px 16px',\n 'borderRadius': '12px',\n 'transition': 'background-color 0.3s ease',\n '&:hover': {\n backgroundColor: 'transparent',\n borderRadius: '12px',\n },\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n left: 0,\n top: 0,\n bottom: 0,\n width: '6px',\n backgroundColor: active ? activeOrHoverColor : 'transparent',\n borderRadius: '0 4px 4px 0',\n transition: 'background-color 0.3s ease',\n },\n }\n})\n","import { Snackbar } from '@mui/material'\nimport { ErrorBoundary, ErrorRender } from '@xylabs/react-error'\nimport type { PropsWithChildren } from 'react'\nimport React, { useMemo } from 'react'\n\nimport {\n useManageDappInjectableParamsFromRoute, useManageDappPathFromRoute, useSyncOsRegisteredAccessInterfaces,\n} from './hooks/index.ts'\nimport { DappMetaTags } from './MetaTags.tsx'\nimport type { DappWindowProps } from './types/index.ts'\n\n/** A component that can load immediately, but delays node loading and dapp mounting till corresponding launch intent arrives */\nexport const DappWindow: React.FC<DappWindowProps & PropsWithChildren> = ({\n children, context, dapp, dappMenuProperties, dappState,\n}) => {\n const { name } = dapp?.config ?? {}\n\n const { active } = dappState ?? {}\n\n useSyncOsRegisteredAccessInterfaces(context)\n const routingError = useManageDappPathFromRoute(context, name)\n const injectableErrors = useManageDappInjectableParamsFromRoute(context)\n\n const resolvedErrors = useMemo(() => [...injectableErrors, routingError].filter(Boolean), [injectableErrors, routingError])\n\n return (\n <ErrorBoundary>\n <DappMetaTags active={active} activePath={dappMenuProperties?.activePath} dappName={name} />\n {resolvedErrors.map(error => (\n <Snackbar\n key={error?.message}\n open={!!error}\n message={<ErrorRender error={error} scope=\"DappWindow\" />}\n />\n ))}\n {children}\n </ErrorBoundary>\n )\n}\n","import { NameTransforms } from '@xyo-network/os-runtime'\nimport React from 'react'\nimport { Helmet } from 'react-helmet'\n\nexport interface DappMetaTagsProps {\n active?: boolean\n activePath?: string\n dappName?: string\n}\n\nexport const DappMetaTags: React.FC<DappMetaTagsProps> = ({\n active, activePath, dappName,\n}) => {\n return active\n ? (\n <Helmet>\n <title>\n {activePath ? `${new NameTransforms(activePath).deSlug()} | ` : ''}\n {' '}\n {dappName}\n {' '}\n dApp\n </title>\n </Helmet>\n )\n : null\n}\n","import { ErrorRender } from '@xylabs/react-error'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport { NameTransforms } from '@xyo-network/os-runtime'\nimport { NodeProvider } from '@xyo-network/react-node'\nimport { WalletProvider } from '@xyo-network/react-wallet'\nimport React from 'react'\n\nimport { XyOsUiContextProvider } from '../../../XyOsUi/index.ts'\nimport { DappAccessFlexbox } from '../access-interface/index.ts'\nimport { DappBar } from './AppBar.tsx'\nimport { DappChrome } from './Chrome.tsx'\nimport { DappBottomNavigation, DappMenuDrawer } from './components/index.ts'\nimport { useDecomposeDapp } from './hooks/index.ts'\nimport { DappLoadingFlexbox } from './LoadingFlexbox.tsx'\nimport type { DappWindowProps } from './types/index.ts'\n\n/** A pure component that can render a dapp via props only */\nexport const DappRendered: React.FC<DappWindowProps> = ({\n context, dapp, dappMenuProperties, dappState, dappWallet, errors,\n}) => {\n const {\n DappComponent, name, scrollable = true, version,\n } = useDecomposeDapp(dapp)\n\n const { active, minimized } = dappState ?? {}\n\n const hasErrors = errors && errors.length > 0\n\n return (\n <DappChrome\n /* Keep DappBar outside of the Dapp's Node Provider so it can still see the intentArchivist for close and minimize */\n appBar={(\n <DappBar\n context={context}\n name={name}\n version={version}\n title={dappMenuProperties?.activePath ? new NameTransforms(dappMenuProperties.activePath).deSlug() : ''}\n />\n )}\n height=\"100dvh\"\n width=\"100dvw\"\n largeScreenMenu={active && (\n <DappMenuDrawer\n context={context}\n name={name}\n version={version}\n {...dappMenuProperties}\n />\n )}\n smallScreenMenu={active && (\n <DappBottomNavigation\n {...dappMenuProperties}\n sx={{ display: dappMenuProperties?.menuConfig ? 'flex' : 'none' }}\n />\n )}\n /* Ensure that loading goes away when error occurs */\n splashScreen={hasErrors ? null : <DappLoadingFlexbox minimize={!!minimized} name={name} open={!!active} />}\n >\n {hasErrors\n ? (\n <FlexCol padding={2}>\n {errors?.map(error => (\n <ErrorRender key={error?.message} error={error} scope=\"DappWindow\" />\n ))}\n </FlexCol>\n )\n : null}\n <WalletProvider rootWallet={dappWallet}>\n {/* Only load the dapp component when the dapp's node exists and dapp is launched */}\n {context === null\n ? null\n : (\n <XyOsUiContextProvider value={context}>\n {/* Prevent dapps from reaching out to the os node */}\n <NodeProvider node={context?.root}>\n {active\n ? (\n <>\n <FlexCol\n position=\"absolute\"\n top={0}\n left={0}\n right={0}\n bottom={0}\n alignItems=\"stretch\"\n justifyContent=\"stretch\"\n sx={{ overflowY: scrollable ? 'auto' : 'hidden' }}\n >\n <DappComponent name={dapp?.config.name} />\n </FlexCol>\n <DappAccessFlexbox context={context} />\n </>\n )\n : null}\n </NodeProvider>\n </XyOsUiContextProvider>\n )}\n </WalletProvider>\n </DappChrome>\n )\n}\n","import {\n Fade, styled, Typography,\n} from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport type { DappName } from '@xyo-network/os-model'\nimport React, { useEffect, useState } from 'react'\n\nimport { LoadingOsLogo } from '../../../LoadingOsLogo/index.ts'\nimport { useSkipLoadingScreen } from './hooks/index.ts'\nimport { TextTrail } from './Trail.js'\n\nexport interface DappLoadingFlexBoxProps extends FlexBoxProps {\n minimize: boolean\n name?: DappName\n open: boolean\n}\n\nexport const DappLoadingFlexbox: React.FC<DappLoadingFlexBoxProps> = ({\n minimize, open, name, ...props\n}) => {\n // keep slash visible when open is false\n const [fadeIn, setFadeIn] = useState(!open)\n const [trail, setTrail] = useState(false)\n const skipLoadingScreen = useSkipLoadingScreen()\n\n // For now, loading of the node is instantaneous so this is meant to ensure we pause 1.5s minimum before\n // hiding splash ui\n useEffect(() => {\n if (open) {\n if (skipLoadingScreen) {\n setFadeIn(false)\n return\n }\n // Sets time of load experience & fade\n const fadeInTimeout = setTimeout(() => {\n setFadeIn(false)\n }, 2000)\n\n let trailTimeout = setTimeout(() => {\n setTrail(true)\n // Re-set trail after time passes\n trailTimeout = setTimeout(() => {\n setTrail(false)\n }, 4000)\n }, 300)\n return () => {\n clearTimeout(fadeInTimeout)\n clearTimeout(trailTimeout)\n }\n }\n // if not open and not minimized, reset fadeIn\n if (!minimize) {\n setFadeIn(true)\n }\n }, [minimize, open, skipLoadingScreen])\n\n return (\n <Fade in={fadeIn} unmountOnExit>\n <StyledSplashContainer {...props}>\n <LoadingOsLogo widthInPixels={100} busy position=\"absolute\" />\n <TextTrail open={trail} flexDirection=\"row\">\n <Typography\n textAlign=\"center\"\n sx={{ fontSize: { md: '3em', xs: '2em' } }}\n >\n Loading\n </Typography>\n <Typography\n textAlign=\"center\"\n sx={{ fontSize: { md: '3em', xs: '2em' } }}\n >\n {name}\n </Typography>\n <Typography\n textAlign=\"center\"\n sx={{ fontSize: { md: '3em', xs: '2em' } }}\n >\n dApp\n </Typography>\n </TextTrail>\n </StyledSplashContainer>\n </Fade>\n )\n}\n\nconst StyledSplashContainer = styled(FlexCol, { name: 'StyledSplashContainer' })(({ theme }) => {\n return {\n background: theme.vars?.palette.background.default,\n color: theme.vars?.palette.text.primary,\n gap: theme.spacing(1),\n height: '100%',\n left: 0,\n position: 'absolute',\n top: 0,\n width: '100%',\n zIndex: 999,\n }\n})\n","import type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport React, { useState } from 'react'\n\nimport { XyoOSIcon } from './img/index.ts'\n\nexport type LoadingOsLogoProps = Omit<FlexBoxProps, 'children'> & {\n busy?: boolean\n spinsPerSecond?: number\n widthInPixels?: number\n}\n\nexport const LoadingOsLogo: React.FC<LoadingOsLogoProps> = ({\n widthInPixels, busy, spinsPerSecond = 0.5, ...props\n}) => {\n // preloading image to prevent shifting\n const [imageLoaded, setImageLoaded] = useState(false)\n if (!imageLoaded) {\n const img = new Image()\n img.addEventListener('load', () => setImageLoaded(true))\n img.src = XyoOSIcon\n }\n return imageLoaded\n ? (\n <FlexCol\n sx={{\n '@keyframes fadeOut': {\n '0%': { opacity: 1 },\n '100%': { opacity: 0.1 },\n '35%': { opacity: 1 },\n },\n 'animation': busy ? 'fadeOut linear' : undefined,\n 'animationDuration': '1500ms',\n 'animationFillMode': 'both',\n }}\n {...props}\n >\n <FlexCol\n sx={{\n '@keyframes spin': {\n '0%': { transform: 'rotate(360deg)' },\n '100%': { transform: 'rotate(0deg)' },\n },\n 'animation': busy ? `spin ${1 / spinsPerSecond}s linear infinite` : undefined,\n 'animationDirection': 'reverse',\n }}\n {...props}\n >\n <img src={XyoOSIcon} height={widthInPixels ?? 22} />\n </FlexCol>\n </FlexCol>\n )\n : null\n}\n","<?xml version=\"1.0\" encoding=\"UTF-8\"?><svg id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 900 900\"><defs><style>.cls-1{fill:url(#linear-gradient);}.cls-1,.cls-2{stroke-width:0px;}.cls-2{fill:#a8a8a8;opacity:.21;}</style><linearGradient id=\"linear-gradient\" x1=\"34.7\" y1=\"450.98\" x2=\"865.07\" y2=\"450.98\" gradientUnits=\"userSpaceOnUse\"><stop offset=\"0\" stop-color=\"#579fd6\"/><stop offset=\".52\" stop-color=\"#eb407a\"/><stop offset=\"1\" stop-color=\"#f27046\"/></linearGradient></defs><path class=\"cls-2\" d=\"M864.29,297.43c-2.44-6.58-9.76-9.94-16.34-7.5l-143.74,53.26L533.2,21.88c-1.85-3.48-5.21-5.9-9.09-6.56-3.89-.66-7.85.51-10.75,3.18l-267.76,246.55-118-97.86c-5.4-4.48-13.42-3.73-17.9,1.67-4.48,5.4-3.73,13.42,1.67,17.9l118,97.86L36.62,593.37c-2.09,3.34-2.5,7.46-1.14,11.15s4.37,6.54,8.13,7.72l347.4,108.61-25.75,151.12c-1.18,6.92,3.48,13.49,10.4,14.67.24.04.47.07.7.1,6.66.76,12.82-3.81,13.96-10.5l25.75-151.12,363.77,12.56c3.94.14,7.71-1.56,10.22-4.59,2.51-3.03,3.48-7.06,2.62-10.9l-79.64-355.16,143.75-53.26c6.58-2.44,9.94-9.75,7.5-16.34ZM518.49,48.34l156.33,293.75-401.12-68.35,244.79-225.4ZM674.37,367.8l-264.69,319.16-144.06-388.81,408.75,69.65ZM66.9,592.88l176.22-282.26,141.37,381.56-317.59-99.29ZM431.72,700.22l259.75-313.21,72.81,324.69-332.56-11.48Z\"/><path class=\"cls-1\" d=\"M865.04,302.64c.01-.2.02-.4.03-.6,0-.33,0-.66-.03-.99-.01-.2-.02-.39-.04-.58-.04-.35-.1-.71-.17-1.06-.03-.16-.05-.32-.09-.48-.12-.5-.26-1.01-.45-1.5-.18-.49-.4-.97-.64-1.43-.08-.15-.17-.29-.25-.43-.17-.31-.35-.61-.55-.9-.12-.17-.24-.33-.37-.49-.19-.25-.39-.5-.6-.74-.14-.16-.29-.32-.45-.47-.22-.22-.45-.44-.68-.65-.1-.08-.18-.18-.27-.26L530.1,18.07c-.34-.28-.7-.53-1.07-.77-.09-.06-.17-.13-.26-.19-.62-.39-1.26-.7-1.92-.98-.18-.07-.36-.14-.54-.21-.71-.26-1.43-.47-2.16-.6,0,0-.01,0-.02,0,0,0,0,0-.01,0-.67-.11-1.35-.15-2.03-.16-.37,0-.73,0-1.09.03-.23.02-.46.06-.7.09-.86.11-1.69.31-2.5.59-.07.03-.15.04-.23.07l-.32.12c-.2.08-.4.13-.59.22L115.08,165.06c-.11.04-.22.1-.33.15-.3.12-.59.25-.88.39-.19.1-.38.19-.57.3-.27.15-.54.32-.81.5-.17.12-.35.22-.52.35-.27.2-.53.42-.79.64-.14.12-.28.23-.41.35-.35.33-.68.68-1,1.05-.04.05-.08.1-.12.14-.32.38-.6.78-.87,1.2-.09.14-.16.29-.25.43-.18.31-.36.62-.51.94-.08.17-.15.35-.23.53-.13.31-.25.62-.36.93-.06.19-.12.38-.17.57-.09.33-.17.65-.23.98-.02.11-.06.22-.08.33l-72.09,423.12c-.07.43-.11.87-.13,1.3,0,.11-.03.22-.03.33-.03.73.02,1.44.12,2.16.02.19.06.38.09.57.13.74.31,1.48.57,2.19,0,0,0,0,0,0,0,.02.01.03.02.04.2.53.43,1.04.7,1.53.12.22.26.42.38.63.17.28.33.56.52.82.17.23.35.44.54.66.18.22.36.44.56.65.2.21.42.4.63.6.16.14.29.3.46.43l330.39,274c.08.07.17.12.25.18.32.25.65.49.99.71.15.09.29.19.44.28.44.26.9.5,1.37.7.04.02.08.04.12.06.51.21,1.03.39,1.56.53.17.05.35.08.53.12.24.06.47.12.71.16.23.04.46.07.69.1.47.05.95.08,1.42.08.15,0,.3-.02.45-.02.32-.01.65-.02.97-.06.18-.02.36-.06.54-.08.29-.04.58-.09.86-.15.19-.04.38-.1.56-.15.28-.08.55-.16.82-.25.08-.03.15-.04.23-.07l402.48-149.13s.06-.03.09-.04c.39-.15.76-.32,1.13-.51.12-.06.24-.1.35-.16.44-.24.88-.51,1.29-.8.03-.02.06-.04.09-.06.55-.39,1.07-.85,1.56-1.34.83-.82,1.54-1.76,2.11-2.78.09-.17.19-.33.27-.5.32-.64.61-1.3.82-2,.03-.11.05-.22.08-.33.12-.42.23-.84.3-1.27l72.09-423.12c.02-.11.02-.22.03-.33.05-.34.08-.67.1-1.01ZM771.44,701.13l-101.05-83.8,158.61-254.06-57.56,337.86ZM121.2,242.67l65.53,292.26-123.1,45.61,57.57-337.87ZM656.65,591.33l-141.37-381.56,317.59,99.3-176.22,282.26ZM508.76,181.1l22.05-129.41,263.81,218.79-285.86-89.37ZM483.7,176.83l-299.33-10.33L505.75,47.42l-22.05,129.41ZM208.31,514.94l-72.81-324.69,332.56,11.48-259.75,313.21ZM490.1,214.98l144.06,388.81-382.98-65.25-25.77-4.39L490.1,214.98ZM246.9,563.6l379.17,64.6-244.79,225.4-156.33-293.74,21.95,3.74ZM654.16,636.9l101.05,83.8-321.38,119.08,220.33-202.88ZM72.47,604.37l123.1-45.61,140.72,264.4-84.17-69.81-179.65-148.98Z\"/></svg>","import { a, useTrail } from '@react-spring/web'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport React from 'react'\n\ninterface TextTrailProps extends FlexBoxProps {\n open: boolean\n}\n\nexport const TextTrail: React.FC<TextTrailProps> = ({ open, children }) => {\n const items = React.Children.toArray(children)\n const trail = useTrail(items.length, {\n config: {\n friction: 200, mass: 5, tension: 2000,\n },\n from: {\n height: 'auto', opacity: 0, y: 20,\n },\n height: 'auto',\n opacity: open ? 1 : 0,\n y: open ? 0 : 60,\n })\n return (\n <div>\n {trail.map(({ height, ...style }, index) => (\n <a.div key={index} style={style}>\n <a.div style={{ height }}>\n {items[index]}\n </a.div>\n </a.div>\n ))}\n </div>\n )\n}\n","import type { ContainerProps } from '@mui/material'\nimport { Container } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nexport interface ContainerFlexboxProps extends PropsWithChildren, FlexBoxProps {\n containerProps?: ContainerProps\n scrollable?: boolean\n}\n\nexport const ContainerFlexbox: React.FC<ContainerFlexboxProps> = ({\n children, containerProps, scrollable = true, ...props\n}) => {\n return (\n <FlexCol\n id=\"container-flexbox\"\n alignItems=\"center\"\n justifyContent=\"start\"\n width=\"100%\"\n pt={2}\n gap={2}\n overflow={scrollable ? 'auto' : 'unset'}\n {...props}\n >\n <Container {...containerProps}>{children}</Container>\n </FlexCol>\n )\n}\n","import type { Breakpoint, TypographyProps } from '@mui/material'\nimport { Container, Typography } from '@mui/material'\nimport { ThrownErrorBoundary } from '@xylabs/react-error'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport type { ModuleError } from '@xyo-network/payload-model'\nimport React from 'react'\nimport type Rollbar from 'rollbar'\n\nimport { NetworkReadyFlexBox } from '../../network/index.ts'\nimport { ErrorRenderWithSupportDefault } from '../Alert/index.ts'\n\nexport interface SharedDappPageProps extends FlexBoxProps {\n checkNetwork?: boolean\n noScroll?: boolean\n subtitle?: string\n titleProps?: TypographyProps\n}\n\nexport interface DappPageProps extends SharedDappPageProps {\n container?: true | Breakpoint\n rollbar?: Rollbar\n}\n\nexport const DappTitle: React.FC<SharedDappPageProps> = ({\n subtitle, title, ...props\n}) => {\n return title\n ? (\n <FlexCol alignItems=\"flex-start\" gap={1} {...props}>\n <Typography variant=\"h3\">\n <b>{title}</b>\n </Typography>\n <Typography gutterBottom variant=\"subtitle2\">\n {subtitle}\n </Typography>\n </FlexCol>\n )\n : null\n}\n\nconst InnerDappPage: React.FC<SharedDappPageProps> = ({\n noScroll, children, subtitle, title, sx, titleProps, ...props\n}) => {\n return (\n <FlexCol\n id=\"innerPage\"\n sx={{\n margin: 2,\n ...sx,\n }}\n gap={noScroll ? 0 : 2}\n alignItems=\"stretch\"\n justifyContent=\"flex-start\"\n {...props}\n >\n {title\n ? <DappTitle subtitle={subtitle} title={title} {...titleProps} />\n : null}\n {children}\n </FlexCol>\n )\n}\n// This component is written to be used inside of a DappWindow Component\nexport const DappPage: React.FC<DappPageProps> = ({\n checkNetwork, noScroll, subtitle, title, container, rollbar, ...props\n}) => {\n return (\n <ThrownErrorBoundary<ModuleError>\n errorComponent={(error, boundaryName) => <ErrorRenderWithSupportDefault scope={boundaryName} error={error} />}\n rollbar={rollbar}\n scope=\"DappPage\"\n >\n <NetworkReadyFlexBox skipCheck={!checkNetwork}>\n {container\n ? (\n <Container disableGutters maxWidth={container === true ? 'md' : container}>\n {noScroll\n ? (\n <FlexCol sx={{\n position: 'absolute', top: 0, left: 0, right: 0, bottom: 0,\n }}\n >\n <InnerDappPage noScroll={noScroll} title={title} subtitle={subtitle} {...props} flexGrow={1} />\n </FlexCol>\n )\n : (\n <FlexCol width=\"100%\" height=\"100%\" alignItems=\"stretch\">\n <InnerDappPage noScroll={noScroll} title={title} subtitle={subtitle} {...props} flexGrow={1} />\n </FlexCol>\n )}\n </Container>\n )\n : noScroll\n ? (\n <InnerDappPage\n sx={{\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n }}\n noScroll={noScroll}\n title={title}\n subtitle={subtitle}\n {...props}\n flexGrow={1}\n />\n )\n : <InnerDappPage noScroll={noScroll} title={title} subtitle={subtitle} {...props} flexGrow={1} />}\n </NetworkReadyFlexBox>\n </ThrownErrorBoundary>\n )\n}\n","import { SignalCellularAltOutlined } from '@mui/icons-material'\nimport { Tooltip, useTheme } from '@mui/material'\nimport { useIsDark } from '@xylabs/react-theme'\nimport React, { useMemo } from 'react'\n\nimport { useOsNetwork } from '../hooks/index.ts'\nimport { StyledNetworkLoadingIndicator } from './StyledLoadingIndicator.js'\n\nconst WaitingForNetwork: React.FC = () => (\n <Tooltip title=\"Waiting for Network initialization\">\n <StyledNetworkLoadingIndicator />\n </Tooltip>\n)\n\nexport interface NetworkLoadingIndicatorProps {\n // helps with contrast on bright backgrounds for dark mode\n highContrast?: boolean\n}\n\nexport const NetworkLoadingIndicator: React.FC<NetworkLoadingIndicatorProps> = ({ highContrast }) => {\n const darkMode = useIsDark()\n const theme = useTheme()\n const { networkReady } = useOsNetwork()\n\n const highContrastSuccessColor = darkMode ? theme.vars?.palette.success.dark : theme.vars?.palette.success.main\n const successColor = highContrast ? highContrastSuccessColor : theme.vars?.palette.success.main\n\n const highContrastErrorColor = darkMode ? theme.vars?.palette.success.dark : theme.vars?.palette.error.main\n const errorColor = highContrast ? highContrastErrorColor : theme.vars?.palette.error.main\n\n const NetworkComponent = useMemo(() => {\n if (networkReady) {\n const connectionReady = true\n return connectionReady\n ? () => (\n <Tooltip title=\"Connected to Network\">\n <SignalCellularAltOutlined sx={{ color: successColor }} />\n </Tooltip>\n )\n : () => (\n <Tooltip title=\"Error Connecting to Network\">\n <SignalCellularAltOutlined sx={{ color: errorColor }} />\n </Tooltip>\n )\n } else {\n return WaitingForNetwork\n }\n }, [errorColor, networkReady, successColor])\n\n return <NetworkComponent />\n}\n","import { OsPubSubNetworkReadyEvent } from '@xyo-network/os-runtime'\nimport { useMemo } from 'react'\n\nimport { useStackReady } from '../../stack/index.ts'\nimport { useXyOsUiContext } from '../../XyOsUi/index.ts'\nimport { createNetworkState, type NetworkState } from './lib/index.ts'\n\nexport const useOsNetwork = () => {\n const context = useXyOsUiContext()\n const stackReady = useStackReady(OsPubSubNetworkReadyEvent, 'osPubSubNetworkStack', context)\n\n const networkState = useMemo<NetworkState>(() => {\n return createNetworkState(stackReady)\n }, [context, stackReady])\n\n return networkState\n}\n","import { assertEx } from '@xylabs/sdk-js'\n\nimport type { StackReady } from '../../../../interfaces/index.ts'\nimport type { NetworkState } from './NetworkState.ts'\n\nconst defaultNetworkState: NetworkState = {\n connected: false, error: undefined, networkReady: false,\n}\n\nexport const createNetworkState = (stackReady?: StackReady) => {\n const { ready, stack } = stackReady ?? {}\n if (ready) {\n const foundStack = assertEx(stack, () => 'stack said it was ready but no stack found')\n return {\n connected: true, error: undefined, networkReady: true, stack: foundStack,\n }\n } else {\n return defaultNetworkState\n }\n}\n","import { OsXyoPublicNetworkReadyEvent } from '@xyo-network/os-runtime'\nimport { useMemo } from 'react'\n\nimport { useStackReady } from '../../stack/index.ts'\nimport { useXyOsUiContext } from '../../XyOsUi/index.ts'\nimport { createNetworkState, type NetworkState } from './lib/index.ts'\n\nexport const useXyoPublicNetwork = () => {\n const context = useXyOsUiContext()\n const stackReady = useStackReady(OsXyoPublicNetworkReadyEvent, 'xyoPublicNetworkStack', context)\n\n const networkState = useMemo<NetworkState>(() => {\n return createNetworkState(stackReady)\n }, [context, stackReady])\n\n return networkState\n}\n","import { styled } from '@mui/material'\n\n// Inspired by https://codepen.io/andrewarchi/pen/ExVQmQm\nexport const StyledNetworkLoadingIndicator = styled('div', { name: 'StyledNetworkLoadingIndicator' })(({ theme }) => ({\n '&': {\n '--Loader-color': '#fff',\n '--Loader-offset': theme.spacing(0.1667),\n '--Loader-size': theme.spacing(1.5),\n '--Loader-timing': 'ease-in-out',\n 'alignItems': 'center',\n 'display': 'flex',\n 'justifyContent': 'center',\n 'marginBottom': 'calc(var(--Loader-size) / 2)',\n 'marginTop': 'calc(var(--Loader-size) / 2)',\n 'minHeight': 'var(--Loader-size)',\n 'minWidth': 'var(--Loader-size)',\n 'position': 'relative',\n 'width': '100%',\n },\n '&:after': {\n animationName: 'pulsB',\n boxShadow: '0 0 0 0 var(--Loader-color)',\n paddingBottom: 'calc(100% - var(--Loader-offset) * 2)',\n width: 'calc(100% - var(--Loader-offset) * 2)',\n },\n '&:before': {\n animationName: 'pulsA',\n boxShadow: 'inset 0 0 0 var(--Loader-offset) var(--Loader-color)',\n paddingBottom: '100%',\n width: '100%',\n },\n '&:before, &:after': {\n animationDuration: '1.8s',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'var(--Loader-timing)',\n borderRadius: '50%',\n content: '\"\"',\n filter: 'drop-shadow(0 0 var(--Loader-offset)/2.25 rgba(var(--Loader-color), 0.75))',\n position: 'absolute',\n },\n '@keyframes pulsA': {\n '0%': { boxShadow: 'inset 0 0 0 var(--Loader-offset) var(--Loader-color)' },\n '50%, 100%': { boxShadow: 'inset 0 0 0 0 var(--Loader-color)' },\n },\n '@keyframes pulsB': {\n '0%, 50%': { boxShadow: '0 0 0 0 var(--Loader-color)' },\n '100%': { boxShadow: '0 0 0 var(--Loader-offset) var(--Loader-color)' },\n },\n}))\n","import { NotInterested } from '@mui/icons-material'\nimport type { ButtonProps } from '@mui/material'\nimport { Button } from '@mui/material'\nimport React from 'react'\n\nimport { useOsNetwork } from '../hooks/index.ts'\n\nexport const NetworkButton: React.FC<ButtonProps> = ({\n disabled, startIcon, ...props\n}) => {\n const { networkReady } = useOsNetwork()\n\n return (\n <Button\n disabled={disabled || !networkReady}\n startIcon={(\n <>\n {startIcon}\n {networkReady === false\n ? <NotInterested />\n : null}\n </>\n )}\n {...props}\n />\n )\n}\n","import { Typography } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport { LoadingOsLogo } from '../../LoadingOsLogo/index.ts'\nimport { useOsNetwork } from '../hooks/index.ts'\n\nexport interface NetworkReadyFlexBoxProps extends PropsWithChildren, FlexBoxProps {\n skipCheck?: boolean\n}\n\nexport const NetworkReadyFlexBox: React.FC<NetworkReadyFlexBoxProps> = ({\n children, skipCheck, ...props\n}) => {\n const { networkReady } = useOsNetwork()\n\n return (\n <>\n {networkReady || skipCheck\n ? children\n : (\n <FlexCol height=\"100%\" {...props}>\n <LoadingOsLogo widthInPixels={100} busy />\n <Typography fontFamily=\"monospace\">Loading XYO Name Service...</Typography>\n </FlexCol>\n )}\n </>\n )\n}\n","/* eslint-disable react-x/jsx-no-iife */\nimport { animated, useTransition } from '@react-spring/web'\nimport { ErrorRender } from '@xylabs/react-error'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nexport interface PathToComponent<PathNames extends string = string> {\n component: ReactNode\n path: PathNames\n}\n\nexport interface DappPathSwitcherProps {\n activePath?: string\n pathToComponent?: PathToComponent[]\n}\n\nexport const DappPathSwitcher: React.FC<DappPathSwitcherProps> = ({ activePath, pathToComponent }) => {\n // inspired by - https://codesandbox.io/p/sandbox/react-spring-page-transition-3vrk8\n const transitions = useTransition(activePath, {\n enter: { opacity: 1, transform: 'translate3d(0, 0, 0)' },\n from: { opacity: 0, transform: 'translate3d(100vw, 0, 0)' },\n leave: { opacity: 0, transform: 'translate3d(0, 0, 0)' },\n })\n const possibleZIndex = pathToComponent?.findIndex(item => item.path === activePath)\n const zIndex = possibleZIndex !== -1 && possibleZIndex !== undefined ? possibleZIndex : 1\n\n return (\n <>\n {transitions((transitionProps, activePathRef) => (\n <animated.div\n style={{\n ...transitionProps,\n alignItems: 'stretch',\n bottom: 0,\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'stretch',\n left: 0,\n overflowX: 'hidden',\n overflowY: 'auto',\n position: 'absolute',\n right: 0,\n top: 0,\n zIndex,\n }}\n >\n {(() => {\n const activeIndex = pathToComponent?.findIndex(({ path: componentPath }) => activePathRef === componentPath)\n const activeItem = pathToComponent && activeIndex !== -1 && activeIndex !== undefined ? pathToComponent[activeIndex] : undefined\n return activeItem\n ? activeItem.component\n : <ErrorRender error={new Error(`No component found for path: ${activePathRef}`)} scope=\"DappPathSwitcher\" />\n })()}\n </animated.div>\n ))}\n </>\n )\n}\n","import {\n Divider, Fade, styled,\n} from '@mui/material'\nimport type { DappIntent, InstallationType } from '@xyo-network/os-model'\nimport type { RegisteredReactDappSet } from '@xyo-network/os-react-model'\nimport React, { useMemo } from 'react'\n\nimport { DappInstallTypeFilters } from '../../../utils/index.ts'\nimport { DappContainerMemo } from '../Container.tsx'\nimport { DividerChip } from './DividerChip.js'\n\nexport interface DappsRowProps {\n chipLabel: string\n currentIntent?: DappIntent\n installType: InstallationType\n registeredDappsSet?: RegisteredReactDappSet[]\n xnsNetwork: string | undefined\n xnsNodeUrl: string | undefined\n}\n\nexport const DappsRow: React.FC<DappsRowProps> = ({\n chipLabel, currentIntent, installType, registeredDappsSet, xnsNetwork, xnsNodeUrl,\n}) => {\n const filteredRegisteredDappSets = useMemo(() => DappInstallTypeFilters[installType](registeredDappsSet), [installType, registeredDappsSet])\n\n return (\n <>\n <Divider\n variant=\"middle\"\n sx={{ marginY: 3 }}\n flexItem\n >\n <DividerChip\n label={`${filteredRegisteredDappSets === undefined ? 'Loading ' : ''}${chipLabel}`}\n registeredDapps={filteredRegisteredDappSets}\n />\n </Divider>\n {filteredRegisteredDappSets?.length\n ? (\n <Fade in={!!filteredRegisteredDappSets?.length} timeout={1000}>\n <StyledGridContainer>\n {filteredRegisteredDappSets?.map(\n dappSet => (\n <DappContainerMemo\n currentIntent={currentIntent}\n key={dappSet.dapp.config.name}\n dappSet={dappSet as RegisteredReactDappSet}\n xnsNodeUrl={xnsNodeUrl}\n xnsNetwork={xnsNetwork}\n />\n ),\n )}\n </StyledGridContainer>\n </Fade>\n )\n : null}\n </>\n )\n}\n\nexport const StyledGridContainer = styled('div', { name: 'StyledGridContainer' })(({ theme }) => ({\n display: 'grid',\n gridGap: theme.spacing(2),\n gridTemplateColumns: `repeat(auto-fit, ${theme.spacing(8)})`,\n justifyContent: 'center',\n justifyItems: 'center',\n paddingTop: theme.spacing(1),\n width: '100%',\n}))\n","import type { ChipProps } from '@mui/material'\nimport { Chip, CircularProgress } from '@mui/material'\nimport type { RegisteredDappSet } from '@xyo-network/os-model'\nimport React from 'react'\n\nexport interface DividerChipProps extends ChipProps {\n registeredDapps?: RegisteredDappSet[]\n}\n\nexport const DividerChip: React.FC<DividerChipProps> = ({ registeredDapps, ...props }) => {\n return (\n <Chip\n avatar={\n registeredDapps === undefined\n ? (\n <span>\n <CircularProgress\n size=\"small\"\n sx={{ display: 'inline' }}\n />\n </span>\n )\n : undefined\n }\n label={`${registeredDapps?.length ? '' : 'Loading '}Beta dApps`}\n size=\"small\"\n sx={{ gap: 0.5 }}\n {...props}\n />\n )\n}\n","// Inspired by https://www.joshwcomeau.com/react/rotate/#bonus-that-star-animation-8\n\nimport { animated, useSpring } from '@react-spring/web'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport React, { useEffect, useState } from 'react'\n\nexport interface ShiftAnimationProps extends FlexBoxProps {\n animationDirection: Direction\n startAnimation?: boolean\n}\n\ntype Direction = 'wiggle' | 'jump' | 'up' | 'down' | 'left' | 'right'\ninterface PointData {\n FromXMovement?: Readonly<number>\n FromYMovement?: Readonly<number>\n ToXMovement?: Readonly<number>\n ToYMovement?: Readonly<number>\n}\nconst MovementData: Readonly<Record<Direction, Readonly<PointData[]>>> = {\n down: [\n {\n FromYMovement: 0,\n ToYMovement: -3,\n },\n {\n FromYMovement: -3,\n ToYMovement: 0,\n },\n ],\n jump: [\n {\n FromYMovement: 0,\n ToYMovement: -3,\n },\n {\n FromYMovement: -3,\n ToYMovement: 0,\n },\n ],\n left: [\n {\n FromXMovement: 0,\n ToXMovement: -3,\n },\n {\n FromXMovement: -3,\n ToXMovement: 0,\n },\n ],\n right: [\n {\n FromXMovement: 0,\n ToXMovement: -3,\n },\n {\n FromXMovement: -3,\n ToXMovement: 0,\n },\n ],\n up: [\n {\n FromYMovement: 0,\n ToYMovement: -3,\n },\n {\n FromYMovement: -3,\n ToYMovement: 0,\n },\n ],\n wiggle: [\n {\n FromXMovement: 0,\n ToXMovement: -3,\n },\n {\n FromXMovement: -3,\n ToXMovement: 0,\n },\n ],\n}\n\nexport const ShiftAnimation: React.FC<ShiftAnimationProps> = ({\n startAnimation = false, animationDirection, children,\n}) => {\n const [isShifted, setIsShifted] = useState(startAnimation)\n const anim = useSpring({\n backfaceVisibility: 'hidden',\n config: {\n friction: 10,\n tension: 300,\n },\n from: {\n x: startAnimation ? MovementData[animationDirection][1].FromXMovement : 0,\n y: startAnimation ? MovementData[animationDirection][1].FromYMovement : 0,\n },\n reset: true,\n to: {\n x: startAnimation ? MovementData[animationDirection][0].FromXMovement : 0,\n y: startAnimation ? MovementData[animationDirection][0].FromYMovement : 0,\n },\n })\n\n useEffect(() => {\n if (!isShifted) {\n return\n }\n const timeoutId = globalThis.setTimeout(() => {\n setIsShifted(false)\n }, 5)\n return () => {\n globalThis.clearTimeout(timeoutId)\n }\n }, [isShifted])\n\n return <animated.div style={anim}>{children}</animated.div>\n}\n","import { FiberManualRecordRounded } from '@mui/icons-material'\nimport type { BoxProps } from '@mui/material'\nimport { Box, useTheme } from '@mui/material'\nimport { alphaCss } from '@xylabs/react-theme'\nimport React from 'react'\n\nexport const TwoToneBulletPoint: React.FC<BoxProps> = (props) => {\n const theme = useTheme()\n return (\n <Box {...props}>\n <FiberManualRecordRounded\n fontSize=\"small\"\n sx={{\n '&:hover': { padding: 0.2 },\n 'backgroundColor': alphaCss(theme.vars?.palette.secondary.main ?? '#000', 0.2),\n 'borderRadius': 2,\n 'padding': 0.4,\n }}\n color=\"primary\"\n />\n </Box>\n )\n}\n","import { FlexCol, FlexGrowRow } from '@xylabs/react-flexbox'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nimport { TwoToneBulletPoint } from './TwoToneBulletPoint.tsx'\n\nexport interface TwoToneBulletPointListProps {\n list: ReactNode[]\n}\n\nexport const TwoToneBulletPointList: React.FC<TwoToneBulletPointListProps> = ({ list }) => {\n return (\n <FlexCol alignItems=\"flex-start\" gap={1}>\n {list.map((item, index) => {\n return (\n <FlexGrowRow key={index + 'bulletPointList'} alignItems=\"flex-start\" justifyContent=\"flex-start\" gap={1}>\n <TwoToneBulletPoint marginTop=\"4px\" />\n {item}\n </FlexGrowRow>\n )\n })}\n </FlexCol>\n )\n}\n","import type { StandardTextFieldProps } from '@mui/material'\nimport { FormControl, TextField } from '@mui/material'\nimport { LabeledTextFieldWrapper } from '@xyo-network/react-shared'\nimport type { ChangeEventHandler, FocusEventHandler } from 'react'\nimport React, { useState } from 'react'\n\nexport interface CoinbaseEmailInputProps extends StandardTextFieldProps {\n existingEmail?: string\n}\n\nexport const CoinbaseEmailInput: React.FC<CoinbaseEmailInputProps> = ({ existingEmail, ...props }) => {\n const [email, setEmail] = useState(existingEmail)\n const [valid, setValid] = useState<boolean | undefined>()\n\n const handleBlur: FocusEventHandler<HTMLInputElement> = (event) => {\n setValid(!!event.target.value)\n }\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n const emailFromEvent = event.target.value\n setValid(!!emailFromEvent)\n setEmail(emailFromEvent)\n }\n return (\n <FormControl fullWidth>\n <LabeledTextFieldWrapper label=\"Primary Cryptowallet\">\n <TextField\n fullWidth\n variant=\"filled\"\n error={valid === false}\n hiddenLabel\n onBlur={handleBlur}\n value={email}\n onChange={handleChange}\n size=\"small\"\n {...props}\n />\n </LabeledTextFieldWrapper>\n </FormControl>\n )\n}\n","import type { StandardTextFieldProps } from '@mui/material'\nimport { FormControl, TextField } from '@mui/material'\nimport { LabeledTextFieldWrapper } from '@xyo-network/react-shared'\nimport type { ChangeEventHandler, FocusEventHandler } from 'react'\nimport React, { useState } from 'react'\n\nexport interface PrimaryCryptoWalletInputProps extends StandardTextFieldProps {\n existingPrimaryCryptoWallet?: string\n}\n\nexport const PrimaryCryptoWalletInput: React.FC<PrimaryCryptoWalletInputProps> = ({ existingPrimaryCryptoWallet, ...props }) => {\n const [primaryWallet, setPrimaryWallet] = useState(existingPrimaryCryptoWallet)\n const [valid, setValid] = useState<boolean | undefined>()\n\n const handleBlur: FocusEventHandler<HTMLInputElement> = (event) => {\n setValid(!!event.target.value)\n }\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n const nameFromEvent = event.target.value\n setValid(!!nameFromEvent)\n setPrimaryWallet(nameFromEvent)\n }\n return (\n <FormControl fullWidth>\n <LabeledTextFieldWrapper label=\"Primary Cryptowallet\">\n <TextField\n fullWidth\n variant=\"filled\"\n error={valid === false}\n hiddenLabel\n onBlur={handleBlur}\n value={primaryWallet}\n onChange={handleChange}\n size=\"small\"\n required\n {...props}\n />\n </LabeledTextFieldWrapper>\n </FormControl>\n )\n}\n","import type { StandardTextFieldProps } from '@mui/material'\nimport { FormControl, TextField } from '@mui/material'\nimport { LabeledTextFieldWrapper } from '@xyo-network/react-shared'\nimport type { ChangeEventHandler, FocusEventHandler } from 'react'\nimport React, { useState } from 'react'\n\nexport interface SecondaryCryptoWalletInputProps extends StandardTextFieldProps {\n existingSecondaryCryptoWallet?: string\n}\n\nexport const SecondaryCryptoWalletInput: React.FC<SecondaryCryptoWalletInputProps> = ({ existingSecondaryCryptoWallet, ...props }) => {\n const [secondaryWallet, setSecondaryWallet] = useState(existingSecondaryCryptoWallet)\n const [valid, setValid] = useState<boolean | undefined>()\n\n const handleBlur: FocusEventHandler<HTMLInputElement> = (event) => {\n setValid(!!event.target.value)\n }\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n const walletFromEvent = event.target.value\n setValid(!!walletFromEvent)\n setSecondaryWallet(walletFromEvent)\n }\n return (\n <FormControl fullWidth>\n <LabeledTextFieldWrapper label=\"Secondary Cryptowallet\">\n <TextField\n variant=\"filled\"\n fullWidth\n error={valid === false}\n hiddenLabel\n onBlur={handleBlur}\n value={secondaryWallet}\n onChange={handleChange}\n size=\"small\"\n required\n {...props}\n />\n </LabeledTextFieldWrapper>\n </FormControl>\n )\n}\n","import { Grid } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FormGroupCreditCardProvider } from '@xyo-network/react-form-credit-card'\nimport React from 'react'\n\nimport { DappPage } from '../../../Dapp/index.ts'\nimport { AccountCard } from './AccountCard.tsx'\nimport {\n CoinbaseEmailInput, PrimaryCryptoWalletInput, SecondaryCryptoWalletInput,\n} from './InputFields/index.ts'\n\nexport const PaymentMethods: React.FC<FlexBoxProps> = () => {\n return (\n <DappPage title=\"Payment Methods\">\n <Grid container spacing={3}>\n <Grid size={{ xs: 12 }}>\n <AccountCard\n sx={{ height: '100%' }}\n items={[\n {\n // TODO - needs a default implementation\n component: (\n <FormGroupCreditCardProvider>\n null\n </FormGroupCreditCardProvider>\n ),\n desc: 'Save a credit card to your node to complete credit payments seamlessly.',\n title: 'Credit Card',\n },\n {\n component: <CoinbaseEmailInput />,\n desc: 'Use your Coinbase Account receive payments easily.',\n title: 'Coinbase Email',\n },\n {\n component: <PrimaryCryptoWalletInput />,\n desc: 'This is the primary crypto wallet on your node.',\n title: 'Primary Crypto Wallet',\n },\n {\n component: <SecondaryCryptoWalletInput />,\n desc: 'This is the secondary crypto wallet on your node.',\n title: 'Secondary Crypto Wallet',\n },\n ]}\n />\n </Grid>\n </Grid>\n </DappPage>\n )\n}\n","import type { CardProps } from '@mui/material'\nimport {\n Card, CardContent, Divider, Typography,\n} from '@mui/material'\nimport { FlexGrowCol, FlexGrowRow } from '@xylabs/react-flexbox'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\ninterface AccountSectionProps {\n component?: ReactNode\n desc: string\n title: string\n}\n\ninterface AccountCardProps extends CardProps {\n items: Array<AccountSectionProps>\n}\n\nexport const AccountCard: React.FC<AccountCardProps> = ({ items, ...props }) => {\n return (\n <Card {...props}>\n <CardContent>\n <FlexGrowCol width=\"100%\" gap={2}>\n {items.map((item, index) => {\n return (\n <FlexGrowCol gap={2} key={index} width=\"100%\" alignItems=\"stretch\">\n <FlexGrowRow\n sx={{\n alignItems: 'stretch',\n flexDirection: { md: 'row', xs: 'column' },\n justifyContent: 'space-between',\n }}\n gap={2}\n >\n <FlexGrowCol\n alignItems=\"flex-start\"\n width=\"100%\"\n sx={{ maxWidth: { md: '40%', xs: '100%' } }}\n >\n <Typography variant=\"h5\" gutterBottom>\n {item.title}\n </Typography>\n <Typography variant=\"body1\" gutterBottom>\n {item.desc}\n </Typography>\n </FlexGrowCol>\n {item?.component}\n </FlexGrowRow>\n {items.length === 1 || index === items.length - 1 ? null : <Divider flexItem />}\n </FlexGrowCol>\n )\n })}\n </FlexGrowCol>\n </CardContent>\n </Card>\n )\n}\n","import { useWeakArchivistFromNode } from '@xyo-network/react-archivist'\n\nexport const useAccountArchivist = () => {\n return useWeakArchivistFromNode('AccountArchivist')\n}\n","import type { Payload } from '@xyo-network/payload-model'\nimport { asSchema, isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const CreditCardInputSchema = asSchema('network.xyo.credit.card.input', true)\nexport type CreditCardInputSchema = typeof CreditCardInputSchema\n\nexport type CreditCardInputFields = {\n cardNumber: string\n cvc: string\n emailAddress: string\n expiration: string\n firstName: string\n lastName: string\n timestamp: number\n zip: string\n}\n\nexport type CreditCardInput = Payload<CreditCardInputFields, CreditCardInputSchema>\n\nexport const isCreditCardInput = isPayloadOfSchemaType<CreditCardInput>(CreditCardInputSchema)\n","/* eslint-disable @stylistic/max-len */\nimport { createSvgIcon } from '@mui/material'\nimport React from 'react'\n\nexport const XnsDomainIcon = createSvgIcon(\n <svg id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 400 400\">\n <path fill=\"currentColor\" d=\"M0,314.34V85.34h43.89l99.55,152.67V85.34h43.89v229h-43.89L43.89,161.68v152.67H0Z\"></path>\n <path fill=\"currentColor\" d=\"M298.99,319.12c-16.96,0-32.26-3-45.88-8.99-13.62-5.99-24.81-14.58-33.56-25.76-8.75-11.18-14.29-24.52-16.62-40l45.17-6.68c3.18,13.15,9.75,23.27,19.72,30.37,9.96,7.1,21.31,10.65,34.03,10.65,7.1,0,14-1.11,20.67-3.34,6.68-2.23,12.17-5.51,16.46-9.86,4.29-4.35,6.44-9.7,6.44-16.06,0-2.33-.35-4.59-1.03-6.76-.69-2.17-1.83-4.21-3.42-6.12-1.59-1.91-3.84-3.71-6.76-5.41-2.92-1.69-6.6-3.23-11.05-4.61l-59.48-17.49c-4.45-1.27-9.62-3.07-15.5-5.41-5.88-2.33-11.58-5.67-17.1-10.02-5.51-4.35-10.1-10.1-13.76-17.26-3.66-7.16-5.49-16.19-5.49-27.11,0-15.37,3.87-28.15,11.61-38.33,7.74-10.18,18.08-17.76,31.01-22.74,12.93-4.98,27.25-7.42,42.94-7.32,15.8.21,29.9,2.92,42.3,8.11,12.4,5.2,22.79,12.75,31.17,22.66,8.37,9.92,14.42,22.03,18.13,36.34l-46.76,7.95c-1.7-7.42-4.83-13.68-9.38-18.77-4.56-5.09-9.99-8.96-16.3-11.61-6.31-2.65-12.91-4.08-19.8-4.29-6.79-.21-13.17.72-19.16,2.78-5.99,2.07-10.87,5.06-14.63,8.99-3.76,3.92-5.65,8.59-5.65,14,0,4.98,1.54,9.04,4.61,12.17,3.07,3.13,6.94,5.65,11.61,7.55,4.66,1.91,9.44,3.5,14.31,4.77l39.76,10.81c5.94,1.59,12.51,3.68,19.72,6.28,7.21,2.6,14.13,6.2,20.75,10.81,6.62,4.61,12.09,10.68,16.38,18.21,4.29,7.53,6.44,17.07,6.44,28.63,0,12.3-2.57,23.03-7.71,32.2-5.14,9.17-12.06,16.75-20.75,22.74-8.69,5.99-18.53,10.47-29.5,13.44-10.97,2.97-22.29,4.45-33.95,4.45Z\"></path>\n <circle fill=\"#3898e7\" cx=\"372.52\" cy=\"291.63\" r=\"27.48\"></circle>\n </svg>,\n 'XNSDomain',\n)\n","import { InfoOutlined } from '@mui/icons-material'\nimport type { TableHeadProps } from '@mui/material'\nimport {\n TableCell, TableHead, Tooltip,\n} from '@mui/material'\nimport React from 'react'\n\nimport { useVisibleColumns } from '../hooks/index.ts'\nimport type { TableHeadCell } from '../Payload.ts'\nimport { StyledTableRowHeader } from './StyledTableRowHeader.tsx'\n\ninterface TableHeadExProps extends TableHeadProps {\n payloads: TableHeadCell[]\n}\n\nexport const TableHeadEx: React.FC<TableHeadExProps> = ({ payloads, ...props }) => {\n const [VisibleTableCells] = useVisibleColumns(payloads)\n\n return (\n <TableHead {...props}>\n <StyledTableRowHeader>\n {VisibleTableCells.map(headCell => (\n <TableCell\n key={headCell.id}\n align={headCell.align ?? 'left'}\n padding={headCell.disablePadding ? 'none' : 'normal'}\n width={headCell.width ?? 'auto'}\n >\n {headCell.tooltip\n ? (\n <span style={{\n alignItems: 'center', display: 'inline-flex', gap: '4px',\n }}\n >\n {headCell.label}\n <Tooltip title={headCell.tooltip}>\n <InfoOutlined sx={{ fontSize: '16px' }} />\n </Tooltip>\n </span>\n )\n : headCell.label}\n </TableCell>\n ))}\n </StyledTableRowHeader>\n </TableHead>\n )\n}\n","import type { Theme } from '@mui/material'\nimport { useMediaQuery } from '@mui/material'\nimport { useMemo } from 'react'\n\nimport type { TableHeadCell } from '../Payload.ts'\n\nexport const useVisibleColumns = (tableHeadCells: TableHeadCell[]): [TableHeadCell[], boolean] => {\n const isMedium = useMediaQuery((theme: Theme) => theme.breakpoints.down('lg'))\n\n const VisibleTableCells = useMemo(() => {\n return isMedium ? tableHeadCells.filter(cell => cell.showOnMobile) : tableHeadCells\n }, [isMedium, tableHeadCells])\n\n return [VisibleTableCells, isMedium]\n}\n","import { styled, TableRow } from '@mui/material'\n\nexport const StyledTableRowHeader = styled(\n TableRow,\n { name: 'StyledTableRowHeader' },\n)(({ theme }) => ({ '& .MuiTableCell-root': { backgroundColor: theme.vars?.palette.background.paper } }))\n","import type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\nimport type { TableHeadCell as TableHeadCellFields } from '@xyo-network/react-table'\n\nimport { TableHeadCellSchema } from './Schema.ts'\n\nexport type TableHeadCell = Payload<TableHeadCellFields & {\n tooltip?: string\n}, TableHeadCellSchema>\n\nexport const isTableHeadCell = isPayloadOfSchemaType<TableHeadCell>(TableHeadCellSchema)\n","import { asSchema } from '@xyo-network/payload-model'\n\nexport const TableHeadCellSchema = asSchema('network.xyo.table.cell.head', true)\nexport type TableHeadCellSchema = typeof TableHeadCellSchema\n","/* eslint-disable @typescript-eslint/no-misused-promises */\nimport { ArrowCircleLeftOutlined, ArrowCircleRightOutlined } from '@mui/icons-material'\nimport { IconButton, LinearProgress } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport type { PayloadDivinerQueryPayload } from '@xyo-network/diviner-payload-model'\nimport React from 'react'\n\nexport interface NextIteratorFlexboxProps extends FlexBoxProps {\n loading?: boolean\n next: (order: PayloadDivinerQueryPayload['order']) => Promise<void>\n}\n\nexport const NextIteratorFlexbox: React.FC<NextIteratorFlexboxProps> = ({\n next: changePage, loading, ...props\n}) => {\n return (\n <FlexRow justifyContent=\"space-between\" gap={2} {...props}>\n <LinearProgress sx={{\n display: 'flex', flexGrow: 1, visibility: loading ? 'visible' : 'hidden',\n }}\n />\n <FlexRow>\n <IconButton onClick={() => changePage('asc')}>\n <ArrowCircleLeftOutlined />\n </IconButton>\n <IconButton onClick={() => changePage('desc')}>\n <ArrowCircleRightOutlined />\n </IconButton>\n </FlexRow>\n </FlexRow>\n )\n}\n","import {\n ArrowForwardRounded, HistoryRounded, RefreshRounded,\n} from '@mui/icons-material'\nimport {\n Box, CardContent, IconButton, Tooltip, Typography, useTheme,\n} from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport {\n FlexCol, FlexGrowRow, FlexRow,\n} from '@xylabs/react-flexbox'\nimport { alphaCss } from '@xylabs/react-theme'\nimport type { SimpleCardProps } from '@xyo-network/react-card'\nimport { CardEx } from '@xyo-network/react-card'\nimport { DateTime } from 'luxon'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nexport interface WidgetCardProps extends SimpleCardProps {\n timeOfData: number\n widgetContent: ReactNode\n widgetName: string\n widgetPath: string\n}\n\nexport const WidgetCard: React.FC<WidgetCardProps> = ({\n widgetName, widgetContent, widgetPath, timeOfData = 1_715_875_087, ...props\n}) => {\n const theme = useTheme()\n\n const formatTimeOfData = () => {\n const timeNow = DateTime.now().toSeconds()\n const secondsSinceDataRefreshed: number = timeNow - timeOfData\n\n const getYearsAndMonths = () => {\n const years = Math.floor(secondsSinceDataRefreshed / 31_536_000)\n const months = Math.ceil((secondsSinceDataRefreshed - years * 31_536_000) / 2_628_288)\n if (months === 12) {\n return `${years + 1} Years Ago`\n } else if (years > 1 && months > 1) {\n return `${years} Years, ${months} Months Ago`\n } else if (years === 1 && months > 1) {\n return `${years} Year, ${months} Months Ago`\n } else if (years > 1 && months === 1) {\n return `${years} Years, ${months} Month Ago`\n } else if (years === 1 && months === 1) {\n return `${years} Year, ${months} Month Ago`\n } else {\n return `About ${years} Years Ago`\n }\n }\n\n if (secondsSinceDataRefreshed < 60) {\n return 'Less than 1 Minute Ago'\n } else if (secondsSinceDataRefreshed < 3600) {\n return `${DateTime.fromSeconds(secondsSinceDataRefreshed).toFormat('m')} Minutes Ago`\n } else if (secondsSinceDataRefreshed < 86_400) {\n return `${Math.ceil(secondsSinceDataRefreshed / 3600)} Hours Ago`\n } else if (secondsSinceDataRefreshed < 2_628_288) {\n return `${Math.ceil(secondsSinceDataRefreshed / 86_400)} Days Ago`\n } else if (secondsSinceDataRefreshed < 31_536_000) {\n return `${Math.ceil(secondsSinceDataRefreshed / 2_628_288)} Months Ago`\n } else {\n return getYearsAndMonths()\n }\n }\n\n return (\n <CardEx\n {...props}\n sx={{\n backgroundColor: alphaCss(theme.vars?.palette.background.paper ?? '#000', 0.4),\n display: 'flex',\n height: '300px',\n width: '300px',\n }}\n >\n <CardContent sx={{ height: '100%', padding: 1 }}>\n <FlexCol sx={{\n alignItems: 'stretch', height: '100%', justifyContent: 'space-between',\n }}\n >\n <FlexCol alignItems=\"stretch\">\n <FlexGrowRow justifyContent=\"space-between\" alignItems=\"center\">\n <Typography color={theme.vars?.palette.text.primary} fontWeight={theme.typography.fontWeightMedium} variant=\"h6\">\n {widgetName}\n </Typography>\n <IconButton>\n <RefreshRounded />\n </IconButton>\n </FlexGrowRow>\n <Box paddingY={2}>{widgetContent}</Box>\n </FlexCol>\n <FlexRow justifyContent=\"space-between\" alignItems=\"center\">\n <Tooltip title={DateTime.fromSeconds(timeOfData).toFormat('DD ttt')}>\n <FlexRow\n gap={0.5}\n sx={{ opacity: 0.5 }}\n >\n <HistoryRounded fontSize=\"small\" color=\"inherit\" />\n <Typography variant=\"body2\">{formatTimeOfData()}</Typography>\n </FlexRow>\n </Tooltip>\n <ButtonEx size=\"small\" to={widgetPath}>\n <ArrowForwardRounded fontSize=\"small\" />\n </ButtonEx>\n </FlexRow>\n </FlexCol>\n </CardContent>\n </CardEx>\n )\n}\n","import { Stack } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { useIsDark } from '@xylabs/react-theme'\nimport React from 'react'\n\nimport { xyoDark, xyoLight } from '../../img/index.ts'\nimport { DappPage } from '../Dapp/index.ts'\nimport { StackOfWidgets } from './StackOfWidgets.tsx'\nimport {\n ExampleBarGraphWidget, ExampleBooleanTableWidget, ExampleTwoColTwoStatWidget,\n} from './Types/index.ts'\n\nexport const WidgetCardExamples: React.FC<FlexBoxProps> = () => {\n // resolve the default name code for the palette\n const darkMode = useIsDark()\n\n return (\n <DappPage\n sx={{ backgroundImage: darkMode ? `url(${xyoDark})` : `url(${xyoLight})`, backgroundSize: 'cover' }}\n container=\"xl\"\n title=\"Example Widget Cards\"\n >\n <Stack gap={2} flexDirection=\"row\" flexWrap=\"wrap\">\n <ExampleTwoColTwoStatWidget />\n <ExampleBarGraphWidget />\n <ExampleBooleanTableWidget />\n <StackOfWidgets />\n </Stack>\n </DappPage>\n )\n}\n","// Example from https://codesandbox.io/p/sandbox/cards-stack-to6uf?\nimport { Box, useTheme } from '@mui/material'\nimport {\n animated, to as interpolate, useSprings,\n} from '@react-spring/web'\nimport { alphaCss } from '@xylabs/react-theme'\nimport type { ReactNode } from 'react'\nimport React, { useState } from 'react'\nimport { useDrag } from 'react-use-gesture'\n\nimport {\n ExampleBarGraphWidget, ExampleBooleanTableWidget, ExampleTwoColTwoStatWidget,\n} from './Types/index.ts'\n\nconst cards: ReactNode[] = [\n <ExampleBarGraphWidget key=\"bar-graph\" />,\n <ExampleBooleanTableWidget key=\"boolean-table\" />,\n <ExampleTwoColTwoStatWidget key=\"two-column\" />,\n]\n\n// These two are just helpers, they curate spring data, values that are later being interpolated into css\nconst to = (i: number) => ({\n delay: i * 100,\n rot: -10 + Math.random() * 15,\n scale: 1,\n x: 0,\n y: i * -4,\n})\nconst from = (_i: number) => ({\n rot: 0, scale: 1.5, x: 0, y: -1000,\n})\n// This is being used down there in the view, it interpolates rotation and scale into a css transform\nconst trans = (r: number, s: number) => `perspective(1500px) rotateY(${r / 10}deg) scale(${s})`\n\nfunction Deck() {\n const [gone] = useState(() => new Set()) // The set flags all the cards that are flicked out\n const theme = useTheme()\n const [props, api] = useSprings(cards.length, i => ({\n ...to(i),\n from: from(i),\n })) // Create a bunch of springs using the helpers above\n // Create a gesture, we're interested in down-state, delta (current-pos - click-pos), direction and velocity\n const bind = useDrag(({\n args: [index], down, movement: [mx], direction: [xDir], velocity,\n }) => {\n const trigger = velocity > 0.2 // If you flick hard enough it should trigger the card to fly out\n const dir = xDir < 0 ? -1 : 1 // Direction should either point left or right\n if (!down && trigger) gone.add(index) // If button/finger's up and trigger velocity is reached, we flag the card ready to fly out\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n api.start((i) => {\n if (index !== i) return // We're only interested in changing spring-data for the current spring\n const isGone = gone.has(index)\n const x\n = isGone\n ? (200 + globalThis.innerWidth) * dir\n : down\n ? mx\n : 0 // When a card is gone it flys out left or right, otherwise goes back to zero\n const rot = mx / 100 + (isGone ? dir * 10 * velocity : 0) // How much the card tilts, flicking it harder makes it rotate faster\n const scale = down ? 1.1 : 1 // Active cards lift up a bit\n return {\n config: {\n friction: 50,\n tension:\n down\n ? 800\n : isGone\n ? 200\n : 500,\n },\n delay: undefined,\n rot,\n scale,\n x,\n }\n })\n if (!down && gone.size === cards.length)\n setTimeout(() => {\n gone.clear()\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n api.start(i => to(i))\n }, 600)\n })\n // Now we're just mapping the animated values to our view, that's it. Btw, this component only renders once. :-)\n return (\n <>\n {props.map(({\n x, y, rot, scale,\n }, i) => (\n <animated.div\n key={i}\n style={{\n alignItems: 'center',\n display: 'flex',\n height: '300px',\n justifyContent: 'center',\n position: 'absolute',\n touchAction: 'none',\n width: '300px',\n willChange: 'transform',\n x,\n y,\n }}\n >\n {/* This is the card itself, we're binding our gesture to it (and inject its index so we know which is which) */}\n <animated.div\n {...bind(i)}\n style={{\n // WebkitBackdropFilter: 'blur(10px)',\n // backdropFilter: 'blur(10px)',\n backgroundColor: alphaCss(theme.vars?.palette.background.paper ?? '#000', 0.2),\n backgroundPosition: 'center center',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'auto 85%',\n borderRadius: ' 10px',\n boxShadow: theme.shadows[7],\n height: '85vh',\n maxHeight: '300px',\n maxWidth: '300px',\n transform: interpolate([rot, scale], trans),\n width: '45vh',\n willChange: 'transform',\n }}\n >\n {cards[i]}\n </animated.div>\n </animated.div>\n ))}\n </>\n )\n}\n\nexport const StackOfWidgets: React.FC = () => {\n return (\n <Box\n sx={{\n alignItems: 'center',\n cursor: 'pointer',\n display: 'flex',\n height: '300px',\n justifyContent: 'center',\n width: '300px',\n }}\n >\n <Deck />\n </Box>\n )\n}\n","import { Typography } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol, FlexGrowRow } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nimport { StyledLinearProgress } from './StyledLinearProgress.tsx'\n\nexport interface HorizontalBarGraphItemProps {\n name: string\n value: number\n}\n\nexport interface HorizontalBarGraphProps extends FlexBoxProps {\n items?: HorizontalBarGraphItemProps[]\n}\n\nconst sampleData: HorizontalBarGraphItemProps[] = [\n { name: 'United States', value: 134 },\n { name: 'South Africa', value: 400 },\n { name: 'Canada', value: 382 },\n { name: 'Philippines', value: 423 },\n { name: 'Denmark', value: 123 },\n { name: 'Greece', value: 321 },\n { name: 'Japan', value: 421 },\n]\n\nexport const HorizontalBarGraph: React.FC<HorizontalBarGraphProps> = ({ items = sampleData, ...props }) => {\n const itemsSortedByValue = items.toSorted(function (a, b) {\n const keyA = a.value,\n keyB = b.value\n // Compare the 2 dates\n if (keyA > keyB) return -1\n if (keyA < keyB) return 1\n return 0\n })\n\n console.log(itemsSortedByValue)\n\n const topValue = itemsSortedByValue[0].value\n\n return (\n <FlexCol alignItems=\"stretch\" gap={0.5} {...props}>\n {items.slice(0, 5).map((item, index) => (\n <FlexCol alignItems=\"stretch\" key={index}>\n <FlexGrowRow justifyContent=\"space-between\">\n <Typography variant=\"caption\" maxWidth=\"50%\" noWrap>\n {item.name}\n </Typography>\n <Typography variant=\"caption\" maxWidth=\"50%\">\n {item.value}\n </Typography>\n </FlexGrowRow>\n <StyledLinearProgress color=\"primary\" value={(item.value / (topValue * 1.25)) * 100} variant=\"determinate\" />\n </FlexCol>\n ))}\n </FlexCol>\n )\n}\n","import { LinearProgress, styled } from '@mui/material'\nimport { alphaCss } from '@xylabs/react-theme'\n\nexport const StyledLinearProgress = styled(LinearProgress, { name: 'StyledLinearProgress' })(({ theme }) => ({\n '& .MuiLinearProgress-bar': { borderRadius: theme.shape.borderRadius },\n 'MozBoxSizing': 'border-box',\n 'WebkitBoxSizing': 'border-box',\n 'background': 'transparent',\n 'borderBottom': `1px solid ${alphaCss(theme.vars?.palette.text.secondary ?? '#000', 0.3)}`,\n 'boxSizing': 'border-box',\n 'height': theme.spacing(0.25),\n}))\n","import { Typography, useTheme } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol, FlexGrowRow } from '@xylabs/react-flexbox'\nimport React, { useEffect } from 'react'\n\nimport type { InsightStatProps } from '../Stat/index.ts'\n\nexport interface TwoColTwoStatProps extends FlexBoxProps {\n items: InsightStatProps[]\n}\n\nconst MAX_LENGTH = 2\n\nconst validateProps = (props: InsightStatProps[]) => {\n if (props.length > MAX_LENGTH) {\n throw new Error(`The length of items for the Two Column Two Stat widget should not exceed ${MAX_LENGTH}`)\n }\n}\n\nexport const TwoColTwoStat: React.FC<TwoColTwoStatProps> = ({ items, ...props }) => {\n const theme = useTheme()\n\n useEffect(() => {\n validateProps(items)\n }, [items])\n\n return (\n <FlexGrowRow gap={2} {...props}>\n {items.map((item, index) => (\n <FlexCol key={`stat-${index}-${item.unit}`} flexGrow={1} alignItems=\"start\">\n <Typography variant=\"h2\" fontWeight={theme.typography.fontWeightMedium}>\n {item.rawInsightValue}\n </Typography>\n <Typography variant=\"body2\">{item.subtitle}</Typography>\n </FlexCol>\n ))}\n </FlexGrowRow>\n )\n}\n","import React from 'react'\n\nimport { WidgetCard } from '../../WidgetCard.tsx'\nimport { HorizontalBarGraph } from '../BarGraph/index.ts'\n\nexport const ExampleBarGraphWidget: React.FC = () => {\n return (\n <WidgetCard widgetContent={<HorizontalBarGraph />} widgetName=\"Friend Locations\" timeOfData={1_715_713_478} widgetPath=\"/profile\"></WidgetCard>\n )\n}\n","import React from 'react'\n\nimport { WidgetCard } from '../../WidgetCard.tsx'\nimport { BooleanTable } from '../Tables/index.ts'\n\nexport const ExampleBooleanTableWidget: React.FC = () => {\n return (\n <WidgetCard\n widgetContent={(\n <BooleanTable\n items={[\n { name: '@arietrouw', value: true },\n { name: '@officialxyo', value: false },\n { name: '0x187623121928634124', value: true },\n { name: '@coinwithus', value: true },\n { name: '0x871218376123894321', value: true },\n ]}\n tableHeaders={['Id', 'Online']}\n />\n )}\n widgetName=\"Friends\"\n timeOfData={1_715_875_797}\n widgetPath=\"/profile\"\n >\n </WidgetCard>\n )\n}\n","import { CircleRounded } from '@mui/icons-material'\nimport type { SvgIcon } from '@mui/material'\nimport {\n Paper, styled, TableRow, Typography,\n} from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport {\n FlexCol, FlexGrowRow, FlexRow,\n} from '@xylabs/react-flexbox'\nimport { alphaCss } from '@xylabs/react-theme'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nexport interface BooleanTablePropsItemProps {\n name: string\n value: boolean\n}\n\nconst sampleData: BooleanTablePropsItemProps[] = [\n { name: '@arietrouw', value: true },\n { name: '@officialxyo', value: false },\n { name: '0x187623121928634124', value: true },\n { name: '@coinwithus', value: true },\n { name: '0x871218376123894321', value: true },\n]\n\nexport interface BooleanTableProps extends FlexBoxProps {\n falseOutput?: ReactNode\n items: BooleanTablePropsItemProps[]\n tableHeaders: string[]\n trueOutput?: ReactNode\n}\n\nexport const StyledLightTableRow = styled(Paper, { name: 'StyledLightTableRow' })(({ theme }) => ({\n backgroundColor: 'transparent',\n padding: theme.spacing(0.75),\n}))\n\nexport const StyledTableColumnTitle = styled(Typography, { name: 'StyledTableColumnTitle' })(({ theme }) => ({\n color: theme.vars?.palette.text.secondary,\n fontWeight: theme.typography.fontWeightBold,\n textTransform: 'uppercase',\n}))\n\nexport const DefaultTrueOutput = styled<typeof SvgIcon>(CircleRounded, { name: 'DefaultTrueOutput' })(({ theme }) => ({\n fill: theme.vars?.palette.success.main,\n fontSize: '10px',\n}))\n\nexport const DefaultFalseOutput = styled<typeof SvgIcon>(CircleRounded, { name: 'DefaultFalseOutput' })(({ theme }) => ({\n fill: alphaCss(theme.vars?.palette.text.disabled ?? '#111', 0.5),\n fontSize: '10px',\n}))\n\nconst defaultTrueOutput = <DefaultTrueOutput />\nconst defaultFalseOutput = <DefaultFalseOutput />\n\nexport const BooleanTable: React.FC<BooleanTableProps> = ({\n items = sampleData,\n tableHeaders,\n trueOutput = defaultTrueOutput,\n falseOutput = defaultFalseOutput,\n ...props\n}) => {\n return (\n <FlexCol alignItems=\"stretch\" {...props}>\n <FlexRow paddingBottom={0.5} justifyContent=\"space-between\">\n {tableHeaders.map(name => (\n <StyledTableColumnTitle key={name} variant=\"caption\">\n {name}\n </StyledTableColumnTitle>\n ))}\n </FlexRow>\n <FlexCol alignItems=\"stretch\" gap={0.25}>\n {items.slice(0, 4).map((item, index) => (\n <TableRow key={index}>\n <FlexGrowRow flexGrow={1} justifyContent=\"space-between\">\n <Typography variant=\"caption\" noWrap maxWidth=\"70%\">\n {item.name}\n </Typography>\n {item.value ? trueOutput : falseOutput}\n </FlexGrowRow>\n </TableRow>\n ))}\n </FlexCol>\n </FlexCol>\n )\n}\n","import React from 'react'\n\nimport { WidgetCard } from '../../WidgetCard.tsx'\nimport { TwoColTwoStat } from '../DataColumns/index.ts'\n\nexport const ExampleTwoColTwoStatWidget: React.FC = () => {\n return (\n <WidgetCard\n widgetContent={(\n <TwoColTwoStat\n items={[\n {\n rawInsightValue: 218, subtitle: 'Inbound Access Requests', uiInsightValue: 218, unit: 'requests',\n },\n {\n rawInsightValue: 18, subtitle: 'Outbound Access Requests', uiInsightValue: 18, unit: 'requests',\n },\n ]}\n />\n )}\n widgetName=\"Network Activity\"\n timeOfData={1_642_637_397}\n widgetPath=\"/network\"\n >\n </WidgetCard>\n )\n}\n","import { type SupportedColorScheme, ThemeProvider } from '@mui/material'\nimport { XyosTheme } from '@xylabs/react-theme'\nimport type { PropsWithChildren } from 'react'\nimport React, { useMemo } from 'react'\n\n/** @deprecated - rely on websites to construct their own theme provider */\nexport const AppOsThemeProvider: React.FC<PropsWithChildren> = ({ children }) => {\n const initialValue: SupportedColorScheme | 'system' = useMemo(() => {\n const validValues: SupportedColorScheme[] = ['light', 'dark']\n const savedValue = localStorage.getItem('mui-mode')\n if (savedValue && validValues.includes(savedValue as SupportedColorScheme)) return savedValue as SupportedColorScheme\n return 'system'\n }, [])\n\n return (\n <ThemeProvider theme={XyosTheme} defaultMode={initialValue}>\n {children}\n </ThemeProvider>\n )\n}\n"],"mappings":";;;;AAGA,SAASA,UAAUC,mBAAmB;AAGtC,SAASC,yCAAyC;AAElD,SAASC,iCAAiC;AAOnC,IAAMC,uBAAN,cAA6FC,YAAAA;EAZpG,OAYoGA;;;EAGlG,IAAIC,YAAY;AACd,WAAOC,SAAS,KAAKC,OAAOF,UAAUG,MAAK,GAAI,MAAM,sBAAA;EACvD;EAEA,IAAIC,UAAU;AACZ,UAAMC,SAASJ,SAAS,KAAKC,OAAOE,QAAQD,MAAK,GAAI,MAAM,oBAAA;AAC3DF,aAASI,OAAOC,OAAOC,WAAWC,mCAAmC,MAAM,0CAAA;AAC3E,WAAOH;EACT;EAEAI,KAAKC,SAAgC;AACnC,WAAO,KAAKV,UAAUS,KAAKC,OAAAA;EAC7B;EAEAC,cAAcC,SAAkBF,SAA6E;AAC3G,UAAMG,QAAiD;MACrDD;MAAS,GAAGF;MAASH,QAAQO;IAC/B;AACA,WAAO,KAAKV,QAAQW,OAAO;MAACF;KAAM;EACpC;AACF;;;ACtCA,SAASG,0BAA0B;A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A,CAAAA;AAIT,GAlB0D;;;ASZ1D,SAAoCC,qBAAqB;AACzD,SAASC,iBAAiB;AAE1B,OAAOC,WAASC,WAAAA,iBAAe;AAGxB,IAAMC,qBAAkD,wBAAC,EAAEC,SAAQ,MAAE;AAC1E,QAAMC,eAAgDC,UAAQ,MAAA;AAC5D,UAAMC,cAAsC;MAAC;MAAS;;AACtD,UAAMC,aAAaC,aAAaC,QAAQ,UAAA;AACxC,QAAIF,cAAcD,YAAYI,SAASH,UAAAA,EAAqC,QAAOA;AACnF,WAAO;EACT,GAAG,CAAA,CAAE;AAEL,SACE,gBAAAI,QAAA,cAACC,eAAAA;IAAcC,OAAOC;IAAWC,aAAaX;KAC3CD,QAAAA;AAGP,GAb+D;","names":["assertEx","BaseEmitter","GenericPayloadDivinerConfigSchema","PayloadDivinerQuerySchema","BridgeActivityHelper","BaseEmitter","archivist","assertEx","params","deref","diviner","result","config","schema","GenericPayloadDivinerConfigSchema","next","options","nextByAddress","address","query","PayloadDivinerQuerySchema","divine","IndexedDbArchivist","IndexedDbBoundWitnessDiviner","GenericPayloadDiviner","IndexedDbPayloadDiviner","ModuleFactoryLocator","asSchema","GenericPayloadDivinerTags","BrowserLocator","register","factory","freeze","XyOsMonitor","XyOsBrowserMonitor","XyOsMonitor","connection","globalThis","undefined","navigator","candyDark","default","candyLight","candyAppleDark","candyAppleLight","mossDark","mossLight","oceanDark","oceanLight","peachYogurtDark","peachYogurtLight","sherbetDark","sherbetLight","springDark","springLight","sunsetDark","sunsetLight","xyoDark","xyoLight","OsPalettes","candy","darkModeWallpaper","candyDark","lightModeWallpaper","candyLight","nameCode","readableName","candyApple","candyAppleDark","candyAppleLight","moss","mossDark","mossLight","ocean","oceanDark","oceanLight","peachYogurt","peachYogurtDark","peachYogurtLight","sherbet","sherbetDark","sherbetLight","spring","springDark","springLight","sunset","sunsetDark","sunsetLight","xyo","xyoDark","xyoLight","getNodePaletteByNameCode","castNameCode","assertEx","fulfilled","rejected","WidgetTraySchema","OsCallerBase","React","WidgetCaller","OsCallerBase","_registeredDappSets","_widgetTrayLayout","context","dappsAsObject","acc","dapp","registeredDappSets","config","name","assertEx","widgetTrayLayout","buildWidgetComponents","widgetTray","widgetTrayFromLayout","results","Promise","allSettled","widgetConfigs","map","Param","dappId","params","modes","mode","component","payload","configHash","archivist","getDappsArchivist","foundConfig","get","undefined","successfulResults","filter","fulfilled","result","value","failedResults","rejected","Error","reason","buildWidgetConfig","widgetConfigToBuild","clonedWidgetConfig","cloneWidgetConfig","widgetConfig","structuredClone","widgetLayout","targetWidgetConfigs","layout","label","trayLabel","dappWidgetLayout","dappSet","find","console","error","push","position","schema","WidgetTraySchema","usePromise","XnsRegistrationsResource","createContext","use","XyOsUiContext","createContext","undefined","useXyOsUiContext","use","XyOsUiContextProvider","Provider","forget","ModuleFactoryLocator","dappsReadyConnection","XyOs","XyOsUi","XyOs","dappRegistrationResults","failed","succeeded","dappsReadyConnection","params","eventBus","addConnection","monitoring","XyOsBrowserMonitor","xyOsUiGlobal","xyOsGlobal","hideSplash","splashScreen","onComplete","setSplashStatus","status","statusText","_LOADING_MESSAGES","setStatusText","boot","wallet","locator","ModuleFactoryLocator","registerLazy","dappRegistrationService","start","emit","forget","ResourceHooks","buildResource","buildViews","resourceViewsFromContext","context","pathPrefix","resource","resourceError","views","useBuildResourceFromProvidedNode","xyOs","useXyOsUiContext","useResourceViewsFromProvidedNode","useEffect","useCleanUpResource","resource","useEffect","cleanupListeners","useMemo","useSyncExternalStore","useSyncExternalPayloadStore","viewName","repository","getSnapShot","subscribe","useMemo","subscriber","subscriptions","snapshot","views","bind","undefined","useSyncExternalStore","useBuildNameServiceRegistrationsResource","context","pathPrefix","result","usePromise","xnsRegistrationsResource","XnsRegistrationsResource","start","useCleanUpResource","useBuildNameServiceRegistrationsResourceViews","resource","allRegistrations","useSyncExternalPayloadStore","NameServiceRegistrationHooks","ResourceHooks","usePromise","DappAccessRequestResource","useBuildDappAccessRequestResource","context","resource","usePromise","DappAccessRequestResource","start","useCleanUpResource","useDappAccessRequestResourceViews","accessRequests","useSyncExternalPayloadStore","registeredInterfaces","DappAccessRequestResourceHooks","ResourceHooks","usePromise","boot","useEffect","biosBoot","useBios","biosExternalInterface","biosError","usePromise","undefined","boot","useEffect","usePromise","Kernel","useEffect","kernelBoot","useKernel","locator","params","bios","useBios","kernelExternalInterface","kernelError","usePromise","undefined","kernel","Kernel","boot","useEffect","ButtonEx","ErrorAlert","React","useEffect","useLocation","ErrorRenderWithSupport","supportHref","supportTo","supportLinkText","error","onCancel","props","location","useLocation","useEffect","state","from","pathname","globalThis","React","ErrorAlert","action","ButtonEx","target","to","color","size","href","ErrorRenderWithSupportDefault","React","memo","useMemo","useAsyncEffect","DappIntentTypes","DappContextCreator","RunningDappCache","useCallback","useEffect","useRef","useState","useDappContextCreator","xnsNodeUrl","xnsNetwork","dapp","currentIntent","allowedNames","createOnMount","context","useXyOsUiContext","windowDappNodeSet","setWindowDappNodeSet","useState","undefined","dappWallet","dappWindowNodeError","setDappWindowNodeError","targetedDapp","targetDappId","config","name","windowDappNodeSetRef","useRef","useEffect","current","createNode","useCallback","RunningDappCache","findOrCreate","e","useAsyncEffect","intent","DappIntentTypes","Launch","Close","DappContextCreator","resetDappArchivist","Minimize","nodeCreateError","EventBusPubSubConnection","useEffect","useState","useDappRegistrationResults","context","useXyOsUiContext","registeredDappSetResults","setRegisteredDappSetResults","useState","useEffect","listener","dappRegistrationResults","dappsReadyConnectionRequest","subscribableEvents","Map","type","dappsReadyConnection","EventBusPubSubConnection","eventBus","addConnection","id","removeConnection","undefined","DappRegistry","useMemo","DappSeedPhraseRepository","useMemo","_dappWalletRepository","useDappSeedPhraseRepository","allowedNames","context","useXyOsUiContext","dappWalletRepository","useMemo","undefined","DappSeedPhraseRepository","_dappRegistry","useDappRegistry","allowedNames","dappSeedPhraseRepository","useDappSeedPhraseRepository","useMemo","DappRegistry","assertEx","OsSettingsCaller","OsSettingsReadyEvent","useMemo","assertEx","EventBusPubSubConnection","useEffect","useState","useStackReady","stackReadyEvent","stackName","context","providedContext","useXyOsUiContext","stackReady","setStackReady","useState","ready","useEffect","derivedContext","listener","Error","stack","assertEx","getStack","stackReadyReadyConnectionRequest","subscribableEvents","Map","type","stackReadyReadyConnection","EventBusPubSubConnection","eventBus","addConnection","initialized","_id","removeConnection","id","useOsSettingsCaller","context","providedContext","useXyOsUiContext","ready","useStackReady","OsSettingsReadyEvent","useMemo","derivedNode","assertEx","OsSettingsCaller","usePromise","buildUserWalletSeedPhrasePayload","useMemo","usePhraseFile","phrase","payloadAndRootHash","usePromise","buildUserWalletSeedPhrasePayload","undefined","filename","useMemo","rootHash","phraseFile","phraseFileError","payload","data","Blob","JSON","stringify","type","globalThis","URL","createObjectURL","e","useLocation","useNavigate","useTabs","location","useLocation","navigate","useNavigate","rootFolder","pathname","split","tab","length","setTab","usePromise","useWidgetDapps","registeredDapps","widgetTrayLayout","context","useXyOsUiContext","usePromise","length","caller","WidgetCaller","buildWidgetComponents","useLayoutEffect","useState","isInstalledDappSet","isPreInstalledDappSet","isUnInstalledDappSet","DappInstallTypeFilters","installed","registeredDappSets","length","filter","toSorted","a","b","dapp","config","name","toUpperCase","undefined","preInstalled","uninstalled","getApiDomain","localHost","apiDomain","undefined","location","hostname","startsWith","useEffect","useState","useOnWindowResize","resized","setResized","useState","useEffect","onResize","event","globalThis","addEventListener","removeEventListener","useLaunchPoint","spanRef","coordinates","setCoordinates","useState","left","top","resized","useOnWindowResize","useLayoutEffect","rect","current","getBoundingClientRect","width","height","Circle","FlexCol","DappIntentTypes","DappIntentCaller","XyOsMonitor","React","useRef","usePromise","DappIntentResource","useBuildIntentResource","context","resource","usePromise","DappIntentResource","start","useCleanUpResource","useIntentResourceViews","allDappIntents","useSyncExternalPayloadStore","latestDappIntent","DappIntentResourceHooks","ResourceHooks","useAsyncEffect","useWeakArchivistFromNode","useClearIntents","intentArchivist","useWeakArchivistFromNode","useAsyncEffect","intentArchivistInstance","deref","clear","assertEx","DappIntentCaller","useMemo","useDappIntentCaller","xyOsContext","xyOs","useXyOsUiContext","useMemo","context","assertEx","DappIntentCaller","filterAs","asOptionalDappIntent","DappIntentTypes","DappMode","useWeakArchivistFromNode","useEffect","useState","useDappIntentListener","dappName","targetMode","DappMode","Window","dappIntentType","setDappIntentType","useState","DappIntentTypes","Close","intentPayload","setIntentPayload","intentArchivist","useWeakArchivistFromNode","useEffect","listener","payloads","filteredPayloads","filterAs","asOptionalDappIntent","payload","allDapps","targetDapps","targetDappId","intent","Launch","Minimize","console","warn","deref","on","off","DappIntentTypes","DappMode","useEffect","useState","useDappIntentListener2","dappName","sourceMode","DappMode","Window","latestDappIntent","DappIntentResourceHooks","useResourceViewsFromProvidedNode","dappIntentType","setDappIntentType","useState","DappIntentTypes","Close","useEffect","payload","targetDappId","intent","Launch","Minimize","console","warn","DappIntentTypes","NameTransforms","useCallback","useNavigate","useParams","rootRoute","useNavigateIntent","navigate","useNavigate","dappName","dappNameParam","useParams","updateRouteParam","useCallback","dappIntent","skipNavigate","targetDappId","intent","intentType","params","intentParams","slug","NameTransforms","DappIntentTypes","Launch","dappNameDeSlugged","deSlug","slugFromRoot","Minimize","Close","useWeakArchivistFromNode","useCallback","useSendDappIntent","intentArchivist","useWeakArchivistFromNode","navigate","useNavigateIntent","sendIntent","useCallback","dappIntent","options","intentArchivistInstance","deref","console","error","insert","e","warn","DEFAULT_ICON_SIZE","DappIntentTypes","deriveDappState","intent","minimized","DappIntentTypes","Minimize","active","Launch","closed","Close","React","RenderHtml","htmlString","React","div","style","height","width","dangerouslySetInnerHTML","__html","useTheme","animated","config","useSpring","React","useMemo","DappLaunchFrame","bgColor","children","id","launchLeft","open","launchTop","ref","theme","useTheme","frameOpenSpringConfig","useMemo","config","stiff","from","height","width","to","left","top","frameProps","useSpring","transform","scaleProps","React","div","animated","style","overflow","position","zIndex","alignItems","background","vars","palette","default","display","justifyContent","decomposeProps","dappIcon","props","color","windowId","id","DappIconSize","DEFAULT_ICON_SIZE","sx","nonSxProps","styled","ButtonEx","alphaCss","TypographyEx","borderRadiusFactor","StyledDappIconButtonEx","styled","ButtonEx","name","shouldForwardProp","prop","includes","theme","WebkitBackdropFilter","backdropFilter","backgroundColor","alphaCss","vars","palette","background","paper","borderRadius","spacing","content","inset","opacity","position","transition","zIndex","transform","text","primary","StyledDappName","TypographyEx","WebkitLineClamp","color","flexWrap","fontWeight","letterSpacing","lineClamp","textAlign","textOverflow","textShadow","common","black","whiteSpace","wordWrap","StyledDefaultDappIcon","lineHeight","DappIconButton","children","dappIcon","dappIconSvg","dappName","dappState","props","DappIconSize","color","nonSxProps","sx","decomposeProps","iconSize","DEFAULT_ICON_SIZE","active","minimized","sendIntent","useSendDappIntent","iconButtonRef","useRef","left","launchLeft","top","launchTop","useLaunchPoint","MiddleEllipsisFunction","str","length","slice","onClickIcon","XyOsMonitor","trackEvent","DappIntentCaller","buildIntent","OsDappName","DappIntentTypes","Launch","React","FlexCol","alignItems","justifyContent","DappLaunchFrame","id","open","span","style","cursor","onClick","StyledDappIconButtonEx","iconBgBaseColor","ref","height","mb","width","RenderHtml","htmlString","StyledDefaultDappIcon","fontSize","name","at","gap","StyledDappName","variant","maxWidth","Circle","opacity","transition","ArrowForward","Alert","Button","Dialog","DialogActions","DialogContent","DialogTitle","Typography","ErrorRender","FlexCol","FlexRow","RegisteredNames","AccessNodeQueries","React","useState","DappAccessDialog","accessRequest","children","dappNode","registeredDappAccess","props","error","setError","useState","noPayloadsInserted","setNoPayloadsInserted","onClose","handleAllow","name","RegisteredNames","accessNodeQueries","AccessNodeQueries","run","then","payloads","length","catch","e","message","console","Error","React","Dialog","DialogTitle","DialogContent","dividers","sx","display","flexDirection","gap","ErrorRender","scope","FlexCol","Typography","variant","FlexRow","fontSize","strong","requestingDappId","ArrowForward","registeringDappId","Alert","severity","DialogActions","Button","onClick","ErrorRender","React","usePromise","isRegisteredDappAccess","RegisteredNames","useState","DappCaller","useMemo","useDappCaller","context","xyOs","useXyOsUiContext","useMemo","resolvedContext","DappCaller","useDialogState","context","dappCaller","useDappCaller","accessRequests","DappAccessRequestResourceHooks","resourceViewsFromContext","openAccessDialog","setOpenAccessDialog","useState","registeredInterface","setRegisteredInterface","allowAccessDialogError","usePromise","accessRequest","payload","getRegisteredDappAccessByName","RegisteredNames","isRegisteredDappAccess","undefined","DappAccessFlexbox","context","accessRequests","allowAccessDialogError","openAccessDialog","registeredInterface","setOpenAccessDialog","useDialogState","React","DappAccessDialog","accessRequest","dappNode","open","onClose","registeredDappAccess","ErrorRender","error","scope","BugReport","CloseRounded","RemoveRounded","AppBar","Box","Divider","IconButton","Toolbar","Tooltip","Typography","FlexGrowRow","ColorSchemeButton","DappIntentTypes","DappIntentCaller","React","Dialog","DialogActions","DialogContent","ButtonEx","FlexCol","NodeProvider","React","lazy","Suspense","Debug","lazy","LazyDebug","React","Suspense","fallback","FlexCol","height","DebugDialog","closeDebug","debugOpen","props","Dialog","open","onClose","fullScreen","DialogContent","DialogActions","ButtonEx","variant","onClick","DebugDialogWithNode","context","NodeProvider","node","root","NameTransforms","DappPathHelpers","deriveDestinationPath","path","defaultPath","dappName","rootPath","slug","nestedPath","derivePathForNavSelection","newPath","currentPath","derivedPath","undefined","detectDuplicateSelections","lastSavedPath","selectedDefaultPathAgain","pathIsUnchanged","CustomerParams","key","value","matches","detectCustomer","find","customerParamSet","searchParams","URLSearchParams","globalThis","location","search","searchParamValue","get","has","usePromise","usePromise","DappMenuResource","useBuildDappMenuResource","xyOsContext","resource","usePromise","DappMenuResource","start","useCleanUpResource","useMenuResourceViews","menuItemSelections","useSyncExternalPayloadStore","menuConfigs","menuItems","menuItemsVisible","DappMenuResourceHooks","ResourceHooks","assertEx","DappMenuCaller","useMemo","useDappMenuCaller","context","ignoreProvidedNode","xyOs","useXyOsUiContext","useMemo","resolvedProvidedNode","finalContext","assertEx","DappMenuCaller","useAddDappMenuItems","payloads","xyOs","useXyOsUiContext","menuItemSelections","menuConfigs","resourceError","DappMenuResourceHooks","resourceViewsFromContext","dappMenuCaller","useDappMenuCaller","addMenuItemsError","usePromise","add","menuConfig","path","error","useEffect","useRef","useState","useNavigate","useParams","useMemo","useDappMenuDependencies","context","menuConfigs","menuItemSelections","menuItemsVisible","resourceError","DappMenuResourceHooks","resourceViewsFromContext","defaultPath","useMemo","menuSelection","path","useDappMenu","context","dappName","error","setError","useState","params","useParams","navigate","useNavigate","defaultPath","menuConfigs","menuItemsVisible","menuSelection","resourceError","useDappMenuDependencies","activePath","currentPathRef","useRef","undefined","useEffect","current","path","onPathChange","pathIsInUnchanged","DappPathHelpers","detectDuplicateSelections","destinationPath","deriveDestinationPath","menuConfig","menuItems","usePromise","assertEx","findAs","asArchivistInstance","asOptionalDappInjectableParams","DappCaller","useNavigate","useSearchParams","useManageDappInjectableParamsFromRoute","context","queryParams","useSearchParams","navigate","useNavigate","callerError","usePromise","dappCaller","DappCaller","pathname","globalThis","location","setDappInjectableRouteParams","listenerError","archivist","listener","payloads","injectableParams","findAs","asOptionalDappInjectableParams","path","mod","assertEx","root","resolve","asArchivistInstance","required","on","e","console","error","off","useAtomicPromise","usePromise","findAs","asOptionalDappIntent","DappIntentTypes","DappIntentCaller","useEffect","useState","useManageDappIntentRequest","context","dappId","dappCaller","useDappCaller","sendIntent","useSendDappIntent","intentPayload","setIntentPayload","useState","handleIntentError","setHandleIntentError","dappArchivist","setDappArchivist","usePromise","archivist","getDappArchivist","useAtomicPromise","targetDappId","minimizeIntent","DappIntentCaller","buildIntent","OsDappName","DappIntentTypes","Minimize","e","console","error","undefined","useEffect","listener","payloads","findAs","asOptionalDappIntent","off","on","usePromise","useCallback","useEffect","useRef","useNavigate","useParams","useManageDappPathFromRoute","context","dappName","params","useParams","path","pathParam","dappMenuCaller","useDappMenuCaller","ignoreProvidedNode","menuSelection","defaultPath","useDappMenuDependencies","navigate","useNavigate","currentPathRef","useRef","undefined","updateMenuArchivist","useCallback","current","currentPath","currentNavSelection","updatedPath","DappPathHelpers","derivePathForNavSelection","makeNavItemSelection","useEffect","pathIsInUnchanged","detectDuplicateSelections","destinationPath","deriveDestinationPath","updateErrors","usePromise","usePromise","DappIntentTypes","DappIntentCaller","NameTransforms","useRef","useParams","useManageDappStateFromRoute","intentPayload","params","useParams","dappName","dappNameParam","sendIntent","useSendDappIntent","intentCaller","useDappIntentCaller","dappNameParamRef","useRef","undefined","intentRef","usePromise","launched","intent","DappIntentTypes","Launch","dappNameParamRemoved","current","closeIntent","DappIntentCaller","buildIntent","OsDappName","Close","dappNameParamDeSlugged","NameTransforms","deSlug","autoLaunchNeeded","launchIntent","useCallback","useEffect","useRef","useState","useNavigate","useSearchParams","useDebugClick","params","setParams","useSearchParams","debugOpen","setDebugOpen","useState","openFromClick","useRef","closeFromClick","initialized","navigate","useNavigate","openDebug","useCallback","current","set","URLSearchParams","closeDebug","useEffect","initialOpen","has","backButtonClicked","useMemo","usePromise","useProvidedNode","React","NodeManifest","node","useProvidedNode","nodeManifest","usePromise","manifest","React","pre","JSON","stringify","useDecomposeDapp","dapp","DappComponent","useMemo","params","modes","window","component","NodeManifest","name","config","version","scrollable","useExposedNode","xyOS","useXyOsUiContext","exposedNode","useMemo","useSearchParams","PARAMS_TO_TARGET","useSkipLoadingScreen","params","useSearchParams","customer","detectCustomer","useMemo","hasTargetParams","some","param","has","isCustomer","usePromise","useWeakArchivistFromNode","useSyncOsRegisteredAccessInterfaces","context","registeredInterfacesArchivist","useWeakArchivistFromNode","dappCaller","useDappCaller","usePromise","listener","payloads","addPayloadsToDappArchivist","registeredInterfaces","deref","all","on","off","EmptyDappBarForPadding","props","React","AppBar","color","sx","flexDirection","component","position","DappBar","title","context","name","sendIntent","useSendDappIntent","closeDebug","debugOpen","openDebug","useDebugClick","elevation","backgroundColor","Toolbar","disableGutters","paddingX","Typography","noWrap","variant","letterSpacing","FlexGrowRow","IconButton","onClick","display","md","xs","BugReport","Tooltip","Box","ColorSchemeButton","Divider","orientation","flexItem","m","DappIntentCaller","buildIntent","OsDappName","DappIntentTypes","Minimize","RemoveRounded","htmlColor","Close","CloseRounded","DebugDialogWithNode","useMediaQuery","FlexCol","FlexGrowCol","FlexRow","React","DappChromeSmall","appBar","children","screenMenu","splashScreen","props","React","FlexCol","alignItems","id","FlexGrowCol","justifyContent","sx","background","theme","vars","palette","default","overflowY","DappChromeLarge","FlexRow","DappChrome","largeScreenMenu","smallScreenMenu","isMedium","useMediaQuery","breakpoints","up","Card","CardContent","Chip","Container","Divider","Typography","useTheme","FlexGrowCol","FlexRow","alphaCss","React","ButtonEx","FlexRow","React","InstallButtonSection","installLink","notificationLink","props","React","FlexRow","width","gap","sx","alignItems","flexDirection","md","xs","ButtonEx","fullWidth","variant","disabled","href","target","VerifiedRounded","Card","CardContent","Typography","useTheme","FlexGrowCol","FlexGrowRow","FlexRow","React","useTheme","FlexGrowRow","LinkEx","React","DeveloperLinkSection","developerLink","props","theme","useTheme","React","FlexGrowRow","gap","sx","alignItems","flexDirection","md","xs","LinkEx","color","vars","palette","info","main","href","target","SummarySection","name","dappIconSvg","version","developerLink","theme","useTheme","React","Card","sx","width","CardContent","FlexRow","gap","alignItems","flexDirection","FlexGrowRow","md","xs","elevation","variant","RenderHtml","htmlString","FlexGrowCol","Typography","fontSize","typography","h1","h5","fontWeight","fontWeightBold","gutterBottom","justifyContent","VerifiedRounded","color","vars","palette","success","main","DeveloperLinkSection","defaultDescription","DefaultComingSoon","children","desc","developerLink","name","dappIconSvg","version","theme","useTheme","React","Container","maxWidth","sx","minHeight","overflow","paddingTop","width","FlexRow","paddingBottom","Chip","label","backgroundColor","alphaCss","vars","palette","info","main","color","FlexGrowCol","alignItems","justifyContent","gap","SummarySection","InstallButtonSection","Divider","flexItem","Card","CardContent","Typography","variant","gutterBottom","map","paragraph","index","key","BottomNavigation","BottomNavigationAction","Paper","styled","useIsDark","React","useEffect","useState","DappBottomNavigation","activePath","menuConfig","menuItems","onPathChange","props","activeIndex","setActiveIndex","useState","useEffect","defaultPath","findIndex","item","path","React","Paper","elevation","BottomNavigation","value","onChange","_","to","showLabels","map","svgIcon","icon","primaryText","index","StyledBottomNavigationAction","className","key","label","span","ref","innerHTML","styled","BottomNavigationAction","name","theme","darkMode","useIsDark","color","vars","palette","primary","main","secondary","alpha","Drawer","List","ListItem","ListItemIcon","ListItemText","Tooltip","Typography","useTheme","FlexCol","FlexGrowRow","FlexRow","alphaCss","darkenCss","useIsDark","XyOsMonitor","React","useEffect","useState","BugReport","KeyboardArrowDownRounded","KeyboardArrowUpRounded","Card","Collapse","Divider","IconButton","Stack","Toolbar","Tooltip","Typography","useTheme","RotationAnimation","FlexCol","FlexRow","LinkEx","ColorSchemeButton","React","useState","Facebook","Instagram","LinkedIn","Reddit","StorefrontRounded","Telegram","X","YouTube","React","FaDiscord","socialLinksData","icon","style","fontSize","link","BottomMenuArea","openDebug","backgroundColor","theme","useTheme","expanded","setExpanded","useState","handleExpandClick","React","Card","sx","position","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","overflow","elevation","FlexCol","paddingY","alignItems","Stack","paddingX","justifyContent","flexDirection","gap","onClick","textTransform","cursor","Typography","gutterBottom","KeyboardArrowUpRounded","color","KeyboardArrowDownRounded","Collapse","in","timeout","unmountOnExit","paddingBottom","Divider","flexItem","Toolbar","Tooltip","title","IconButton","BugReport","span","ColorSchemeButton","FlexRow","flexWrap","socialLinksData","map","social","RotationAnimation","key","link","rotation","href","target","icon","padding","variant","vars","palette","text","primary","img","style","fill","src","XyoOSLogoWhite","width","height","LinkEx","ListItemButton","styled","StyledMenuIconWrapSpan","styled","name","alignItems","display","flexDirection","StyledListItemButton","ListItemButton","shouldForwardProp","prop","theme","active","activeOrHoverColor","vars","palette","primary","main","backgroundColor","borderRadius","content","position","left","top","bottom","width","transition","DappMenuDrawer","activePath","context","iconSvg","name","menuConfig","menuItems","onPathChange","version","props","path","setPath","useState","darkMode","useIsDark","theme","useTheme","drawerColor","vars","palette","background","paper","darkenCss","primary","main","activeColor","light","useEffect","defaultPath","newPath","find","item","handleChange","to","XyOsMonitor","trackEvent","Page","closeDebug","debugOpen","openDebug","useDebugClick","React","Drawer","variant","anchor","PaperProps","sx","position","backgroundColor","borderRight","width","FlexCol","alignItems","justifyContent","height","flexGrow","overflow","Tooltip","title","FlexGrowRow","id","padding","gap","cursor","RenderHtml","htmlString","Typography","noWrap","letterSpacing","DebugDialogWithNode","List","p","map","svgIcon","icon","primaryText","pathFromPayload","ListItem","key","disablePadding","paddingBottom","StyledListItemButton","onClick","active","disableRipple","disableTouchRipple","FlexRow","paddingX","paddingY","alpha","ListItemIcon","color","StyledMenuIconWrapSpan","ref","innerHTML","ListItemText","slotProps","typography","fontWeight","alphaCss","text","style","opacity","BottomMenuArea","dark","Snackbar","ErrorBoundary","ErrorRender","React","useMemo","NameTransforms","React","Helmet","DappMetaTags","active","activePath","dappName","React","Helmet","title","NameTransforms","deSlug","DappWindow","children","context","dapp","dappMenuProperties","dappState","name","config","active","useSyncOsRegisteredAccessInterfaces","routingError","useManageDappPathFromRoute","injectableErrors","useManageDappInjectableParamsFromRoute","resolvedErrors","useMemo","filter","Boolean","React","ErrorBoundary","DappMetaTags","activePath","dappName","map","error","Snackbar","key","message","open","ErrorRender","scope","ErrorRender","FlexCol","NameTransforms","NodeProvider","WalletProvider","React","Fade","styled","Typography","FlexCol","React","useEffect","useState","FlexCol","React","useState","LoadingOsLogo","widthInPixels","busy","spinsPerSecond","props","imageLoaded","setImageLoaded","useState","img","Image","addEventListener","src","XyoOSIcon","React","FlexCol","sx","opacity","undefined","transform","height","a","useTrail","React","TextTrail","open","children","items","React","Children","toArray","trail","useTrail","length","config","friction","mass","tension","from","height","opacity","y","div","map","style","index","a","key","DappLoadingFlexbox","minimize","open","name","props","fadeIn","setFadeIn","useState","trail","setTrail","skipLoadingScreen","useSkipLoadingScreen","useEffect","fadeInTimeout","setTimeout","trailTimeout","clearTimeout","React","Fade","in","unmountOnExit","StyledSplashContainer","LoadingOsLogo","widthInPixels","busy","position","TextTrail","flexDirection","Typography","textAlign","sx","fontSize","md","xs","styled","FlexCol","theme","background","vars","palette","default","color","text","primary","gap","spacing","height","left","top","width","zIndex","DappRendered","context","dapp","dappMenuProperties","dappState","dappWallet","errors","DappComponent","name","scrollable","version","useDecomposeDapp","active","minimized","hasErrors","length","React","DappChrome","appBar","DappBar","title","activePath","NameTransforms","deSlug","height","width","largeScreenMenu","DappMenuDrawer","smallScreenMenu","DappBottomNavigation","sx","display","menuConfig","splashScreen","DappLoadingFlexbox","minimize","open","FlexCol","padding","map","error","ErrorRender","key","message","scope","WalletProvider","rootWallet","XyOsUiContextProvider","value","NodeProvider","node","root","position","top","left","right","bottom","alignItems","justifyContent","overflowY","config","DappAccessFlexbox","DappContainer","currentIntent","dappSet","xnsNodeUrl","xnsNetwork","dapp","dappIcon","dappWallet","context","nodeCreateError","useDappContextCreator","dappState","useMemo","targetDappId","config","name","deriveDappState","error","menuError","dappMenuProperties","useDappMenu","errors","filter","Boolean","dappWindowProps","React","DappIconButton","dappIconSvg","params","iconSvg","dappName","DappWindow","DappRendered","DappContainerMemo","memo","Container","FlexCol","React","ContainerFlexbox","children","containerProps","scrollable","props","React","FlexCol","id","alignItems","justifyContent","width","pt","gap","overflow","Container","Container","Typography","ThrownErrorBoundary","FlexCol","React","SignalCellularAltOutlined","Tooltip","useTheme","useIsDark","React","useMemo","OsPubSubNetworkReadyEvent","useMemo","assertEx","defaultNetworkState","connected","error","undefined","networkReady","createNetworkState","stackReady","ready","stack","foundStack","assertEx","useOsNetwork","context","useXyOsUiContext","stackReady","useStackReady","OsPubSubNetworkReadyEvent","networkState","useMemo","createNetworkState","OsXyoPublicNetworkReadyEvent","useMemo","useXyoPublicNetwork","context","useXyOsUiContext","stackReady","useStackReady","OsXyoPublicNetworkReadyEvent","networkState","useMemo","createNetworkState","styled","StyledNetworkLoadingIndicator","name","theme","spacing","animationName","boxShadow","paddingBottom","width","animationDuration","animationIterationCount","animationTimingFunction","borderRadius","content","filter","position","WaitingForNetwork","React","Tooltip","title","StyledNetworkLoadingIndicator","NetworkLoadingIndicator","highContrast","darkMode","useIsDark","theme","useTheme","networkReady","useOsNetwork","highContrastSuccessColor","vars","palette","success","dark","main","successColor","highContrastErrorColor","error","errorColor","NetworkComponent","useMemo","connectionReady","SignalCellularAltOutlined","sx","color","NotInterested","Button","React","NetworkButton","disabled","startIcon","props","networkReady","useOsNetwork","React","Button","NotInterested","Typography","FlexCol","React","NetworkReadyFlexBox","children","skipCheck","props","networkReady","useOsNetwork","React","FlexCol","height","LoadingOsLogo","widthInPixels","busy","Typography","fontFamily","DappTitle","subtitle","title","props","React","FlexCol","alignItems","gap","Typography","variant","b","gutterBottom","InnerDappPage","noScroll","children","sx","titleProps","id","margin","justifyContent","DappPage","checkNetwork","container","rollbar","ThrownErrorBoundary","errorComponent","error","boundaryName","ErrorRenderWithSupportDefault","scope","NetworkReadyFlexBox","skipCheck","Container","disableGutters","maxWidth","position","top","left","right","bottom","flexGrow","width","height","animated","useTransition","ErrorRender","React","DappPathSwitcher","activePath","pathToComponent","transitions","useTransition","enter","opacity","transform","from","leave","possibleZIndex","findIndex","item","path","zIndex","undefined","React","transitionProps","activePathRef","animated","div","style","alignItems","bottom","display","flexDirection","justifyContent","left","overflowX","overflowY","position","right","top","activeIndex","componentPath","activeItem","component","ErrorRender","error","Error","scope","Divider","Fade","styled","React","useMemo","Chip","CircularProgress","React","DividerChip","registeredDapps","props","React","Chip","avatar","undefined","span","CircularProgress","size","sx","display","label","length","gap","DappsRow","chipLabel","currentIntent","installType","registeredDappsSet","xnsNetwork","xnsNodeUrl","filteredRegisteredDappSets","useMemo","DappInstallTypeFilters","React","Divider","variant","sx","marginY","flexItem","DividerChip","label","undefined","registeredDapps","length","Fade","in","timeout","StyledGridContainer","map","dappSet","DappContainerMemo","key","dapp","config","name","styled","theme","display","gridGap","spacing","gridTemplateColumns","justifyContent","justifyItems","paddingTop","width","animated","useSpring","React","useEffect","useState","MovementData","down","FromYMovement","ToYMovement","jump","left","FromXMovement","ToXMovement","right","up","wiggle","ShiftAnimation","startAnimation","animationDirection","children","isShifted","setIsShifted","useState","anim","useSpring","backfaceVisibility","config","friction","tension","from","x","y","reset","to","useEffect","timeoutId","globalThis","setTimeout","clearTimeout","React","animated","div","style","FiberManualRecordRounded","Box","useTheme","alphaCss","React","TwoToneBulletPoint","props","theme","useTheme","React","Box","FiberManualRecordRounded","fontSize","sx","padding","alphaCss","vars","palette","secondary","main","color","FlexCol","FlexGrowRow","React","TwoToneBulletPointList","list","React","FlexCol","alignItems","gap","map","item","index","FlexGrowRow","key","justifyContent","TwoToneBulletPoint","marginTop","FormControl","TextField","LabeledTextFieldWrapper","React","useState","CoinbaseEmailInput","existingEmail","props","email","setEmail","useState","valid","setValid","handleBlur","event","target","value","handleChange","emailFromEvent","React","FormControl","fullWidth","LabeledTextFieldWrapper","label","TextField","variant","error","hiddenLabel","onBlur","onChange","size","FormControl","TextField","LabeledTextFieldWrapper","React","useState","PrimaryCryptoWalletInput","existingPrimaryCryptoWallet","props","primaryWallet","setPrimaryWallet","useState","valid","setValid","handleBlur","event","target","value","handleChange","nameFromEvent","React","FormControl","fullWidth","LabeledTextFieldWrapper","label","TextField","variant","error","hiddenLabel","onBlur","onChange","size","required","FormControl","TextField","LabeledTextFieldWrapper","React","useState","SecondaryCryptoWalletInput","existingSecondaryCryptoWallet","props","secondaryWallet","setSecondaryWallet","useState","valid","setValid","handleBlur","event","target","value","handleChange","walletFromEvent","React","FormControl","fullWidth","LabeledTextFieldWrapper","label","TextField","variant","error","hiddenLabel","onBlur","onChange","size","required","Grid","FormGroupCreditCardProvider","React","Card","CardContent","Divider","Typography","FlexGrowCol","FlexGrowRow","React","AccountCard","items","props","React","Card","CardContent","FlexGrowCol","width","gap","map","item","index","key","alignItems","FlexGrowRow","sx","flexDirection","md","xs","justifyContent","maxWidth","Typography","variant","gutterBottom","title","desc","component","length","Divider","flexItem","PaymentMethods","React","DappPage","title","Grid","container","spacing","size","xs","AccountCard","sx","height","items","component","FormGroupCreditCardProvider","desc","CoinbaseEmailInput","PrimaryCryptoWalletInput","SecondaryCryptoWalletInput","useWeakArchivistFromNode","useAccountArchivist","useWeakArchivistFromNode","asSchema","isPayloadOfSchemaType","CreditCardInputSchema","isCreditCardInput","createSvgIcon","React","XnsDomainIcon","svg","id","xmlns","viewBox","path","fill","d","circle","cx","cy","r","InfoOutlined","TableCell","TableHead","Tooltip","React","useMediaQuery","useMemo","useVisibleColumns","tableHeadCells","isMedium","useMediaQuery","theme","breakpoints","down","VisibleTableCells","useMemo","filter","cell","showOnMobile","styled","TableRow","StyledTableRowHeader","name","theme","backgroundColor","vars","palette","background","paper","TableHeadEx","payloads","props","VisibleTableCells","useVisibleColumns","React","TableHead","StyledTableRowHeader","map","headCell","TableCell","key","id","align","padding","disablePadding","width","tooltip","span","style","alignItems","display","gap","label","Tooltip","title","InfoOutlined","sx","fontSize","isPayloadOfSchemaType","asSchema","TableHeadCellSchema","isTableHeadCell","isPayloadOfSchemaType","TableHeadCellSchema","ArrowCircleLeftOutlined","ArrowCircleRightOutlined","IconButton","LinearProgress","FlexRow","React","NextIteratorFlexbox","next","changePage","loading","props","React","FlexRow","justifyContent","gap","LinearProgress","sx","display","flexGrow","visibility","IconButton","onClick","ArrowCircleLeftOutlined","ArrowCircleRightOutlined","ArrowForwardRounded","HistoryRounded","RefreshRounded","Box","CardContent","IconButton","Tooltip","Typography","useTheme","ButtonEx","FlexCol","FlexGrowRow","FlexRow","alphaCss","CardEx","DateTime","React","WidgetCard","widgetName","widgetContent","widgetPath","timeOfData","props","theme","useTheme","formatTimeOfData","timeNow","DateTime","now","toSeconds","secondsSinceDataRefreshed","getYearsAndMonths","years","Math","floor","months","ceil","fromSeconds","toFormat","React","CardEx","sx","backgroundColor","alphaCss","vars","palette","background","paper","display","height","width","CardContent","padding","FlexCol","alignItems","justifyContent","FlexGrowRow","Typography","color","text","primary","fontWeight","typography","fontWeightMedium","variant","IconButton","RefreshRounded","Box","paddingY","FlexRow","Tooltip","title","gap","opacity","HistoryRounded","fontSize","ButtonEx","size","to","ArrowForwardRounded","Stack","useIsDark","React","Box","useTheme","animated","to","interpolate","useSprings","alphaCss","React","useState","useDrag","Typography","FlexCol","FlexGrowRow","React","LinearProgress","styled","alphaCss","StyledLinearProgress","name","theme","borderRadius","shape","vars","palette","text","secondary","spacing","sampleData","name","value","HorizontalBarGraph","items","props","itemsSortedByValue","toSorted","a","b","keyA","keyB","console","log","topValue","React","FlexCol","alignItems","gap","slice","map","item","index","key","FlexGrowRow","justifyContent","Typography","variant","maxWidth","noWrap","StyledLinearProgress","color","Typography","useTheme","FlexCol","FlexGrowRow","React","useEffect","MAX_LENGTH","validateProps","props","length","Error","TwoColTwoStat","items","theme","useTheme","useEffect","React","FlexGrowRow","gap","map","item","index","FlexCol","key","unit","flexGrow","alignItems","Typography","variant","fontWeight","typography","fontWeightMedium","rawInsightValue","subtitle","React","ExampleBarGraphWidget","React","WidgetCard","widgetContent","HorizontalBarGraph","widgetName","timeOfData","widgetPath","React","CircleRounded","Paper","styled","TableRow","Typography","FlexCol","FlexGrowRow","FlexRow","alphaCss","React","sampleData","name","value","StyledLightTableRow","styled","Paper","theme","backgroundColor","padding","spacing","StyledTableColumnTitle","Typography","color","vars","palette","text","secondary","fontWeight","typography","fontWeightBold","textTransform","DefaultTrueOutput","CircleRounded","fill","success","main","fontSize","DefaultFalseOutput","alphaCss","disabled","defaultTrueOutput","React","defaultFalseOutput","BooleanTable","items","tableHeaders","trueOutput","falseOutput","props","FlexCol","alignItems","FlexRow","paddingBottom","justifyContent","map","key","variant","gap","slice","item","index","TableRow","FlexGrowRow","flexGrow","noWrap","maxWidth","ExampleBooleanTableWidget","React","WidgetCard","widgetContent","BooleanTable","items","name","value","tableHeaders","widgetName","timeOfData","widgetPath","React","ExampleTwoColTwoStatWidget","React","WidgetCard","widgetContent","TwoColTwoStat","items","rawInsightValue","subtitle","uiInsightValue","unit","widgetName","timeOfData","widgetPath","cards","React","ExampleBarGraphWidget","key","ExampleBooleanTableWidget","ExampleTwoColTwoStatWidget","to","i","delay","rot","Math","random","scale","x","y","from","_i","trans","r","s","Deck","gone","useState","Set","theme","useTheme","props","api","useSprings","length","bind","useDrag","args","index","down","movement","mx","direction","xDir","velocity","trigger","dir","add","start","isGone","has","globalThis","innerWidth","config","friction","tension","undefined","size","setTimeout","clear","map","animated","div","style","alignItems","display","height","justifyContent","position","touchAction","width","willChange","backgroundColor","alphaCss","vars","palette","background","paper","backgroundPosition","backgroundRepeat","backgroundSize","borderRadius","boxShadow","shadows","maxHeight","maxWidth","transform","interpolate","StackOfWidgets","Box","sx","cursor","WidgetCardExamples","darkMode","useIsDark","React","DappPage","sx","backgroundImage","xyoDark","xyoLight","backgroundSize","container","title","Stack","gap","flexDirection","flexWrap","ExampleTwoColTwoStatWidget","ExampleBarGraphWidget","ExampleBooleanTableWidget","StackOfWidgets","ThemeProvider","XyosTheme","React","useMemo","AppOsThemeProvider","children","initialValue","useMemo","validValues","savedValue","localStorage","getItem","includes","React","ThemeProvider","theme","XyosTheme","defaultMode"]}
|
|
1
|
+
{"version":3,"sources":["../../src/helpers/BridgeActivityHelper.ts","../../src/helpers/BrowserLocator.ts","../../src/helpers/monitor/XyOsBrowserMonitor.ts","../../src/img/backgrounds/index.ts","../../src/helpers/NodePalettes.ts","../../src/helpers/widget/Caller.tsx","../../src/modules/access-requests/NameServiceRegistrationHooks.ts","../../src/modules/XyOsUi/contexts/XyOsUiContext.ts","../../src/modules/XyOsUi/lib/XyOsUi.ts","../../src/modules/resource/ResourceHooks.ts","../../src/modules/resource/useCleanup.ts","../../src/modules/resource/useSyncExternalPayloadStore.ts","../../src/modules/access-requests/useBuildDappAccessRequestResource.ts","../../src/modules/bios/hooks/useBios.ts","../../src/modules/bios/hooks/useKernel.ts","../../src/modules/Dapp/Alert/RenderErrorWithSupportLink.tsx","../../src/modules/Dapp/Container.tsx","../../src/modules/os/hooks/useDappContextCreator.ts","../../src/modules/os/hooks/useDappRegistrationResults.ts","../../src/modules/os/hooks/useDappRegistry.ts","../../src/modules/os/hooks/useDappSeedPhraseRepository.ts","../../src/modules/os/hooks/useOsSettingsCaller.ts","../../src/modules/stack/useStackReady.ts","../../src/modules/os/hooks/usePhraseFile.ts","../../src/modules/os/hooks/useTabs.ts","../../src/modules/os/hooks/useWidgetDapps.ts","../../src/modules/Dapp/Button/hooks/useLaunchPoint.tsx","../../src/utils/DappInstallTypeFilters.ts","../../src/utils/getApiDomain.ts","../../src/utils/useOnWindowResize.tsx","../../src/modules/Dapp/Button/IconEx.tsx","../../src/modules/intent/DappIntentResourceHooks.ts","../../src/modules/intent/useClearIntents.ts","../../src/modules/intent/useDappIntentCaller.ts","../../src/modules/intent/useDappIntentListener.ts","../../src/modules/intent/useDappIntentListener2.ts","../../src/modules/intent/useNavigateIntent.ts","../../src/modules/intent/useSendDappIntent.ts","../../src/modules/Dapp/lib/DefaultIconSize.ts","../../src/modules/Dapp/lib/deriveDappState.ts","../../src/modules/Dapp/RenderHtml.tsx","../../src/modules/Dapp/Button/LaunchFrame.tsx","../../src/modules/Dapp/Button/lib/decomposeProps.tsx","../../src/modules/Dapp/Button/StyledComponents.tsx","../../src/modules/Dapp/modules/access-interface/components/Dialog.tsx","../../src/modules/Dapp/modules/access-interface/components/Flexbox.tsx","../../src/modules/Dapp/modules/access-interface/hooks/useDialogState.tsx","../../src/modules/Dapp/useDappCaller.ts","../../src/modules/Dapp/modules/Window/AppBar.tsx","../../src/modules/Dapp/Debug/Dialog.tsx","../../src/modules/Dapp/modules/Window/hooks/lib/DappPathHelpers.ts","../../src/modules/Dapp/modules/Window/hooks/lib/detectCustomer.ts","../../src/modules/Dapp/modules/Window/hooks/menu/useAddDappMenuItems.ts","../../src/modules/Dapp/modules/Window/hooks/menu/useBuildDappMenuResource.ts","../../src/modules/Dapp/modules/Window/hooks/menu/useDappMenuCaller.ts","../../src/modules/Dapp/modules/Window/hooks/menu/useDappMenu.ts","../../src/modules/Dapp/modules/Window/hooks/menu/useDappMenuDependencies.ts","../../src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappInjectableParamsFromRoute.tsx","../../src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappIntentRequest.tsx","../../src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappPathFromRoute.tsx","../../src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappStateFromRoute.tsx","../../src/modules/Dapp/modules/Window/hooks/useDebugClick.ts","../../src/modules/Dapp/modules/Window/hooks/useDecomposeDapp.tsx","../../src/modules/Dapp/modules/Window/NodeManifest.tsx","../../src/modules/Dapp/modules/Window/hooks/useExposedNode.ts","../../src/modules/Dapp/modules/Window/hooks/useSkipLoadingScreen.tsx","../../src/modules/Dapp/modules/Window/hooks/useSyncOsRegisteredAccessInterfaces.tsx","../../src/modules/Dapp/modules/Window/Chrome.tsx","../../src/modules/Dapp/modules/Window/components/DefaultComingSoon/DefaultComingSoon.tsx","../../src/modules/Dapp/modules/Window/components/DefaultComingSoon/InstallButtonSection.tsx","../../src/modules/Dapp/modules/Window/components/DefaultComingSoon/SummarySection.tsx","../../src/modules/Dapp/modules/Window/components/DefaultComingSoon/DeveloperLinkSection.tsx","../../src/modules/Dapp/modules/Window/components/menu/BottomNavigation.tsx","../../src/modules/Dapp/modules/Window/components/menu/Drawer.tsx","../../src/modules/Dapp/modules/Window/components/menu/BottomMenuArea.tsx","../../src/modules/Dapp/modules/Window/components/menu/img/xyoOS-Icon-White.svg","../../src/modules/Dapp/modules/Window/components/menu/img/index.ts","../../src/modules/Dapp/modules/Window/components/menu/SocialData.tsx","../../src/modules/Dapp/modules/Window/components/menu/StyledListItems.tsx","../../src/modules/Dapp/modules/Window/DappWindow.tsx","../../src/modules/Dapp/modules/Window/MetaTags.tsx","../../src/modules/Dapp/modules/Window/Rendered.tsx","../../src/modules/Dapp/modules/Window/LoadingFlexbox.tsx","../../src/modules/LoadingOsLogo/LoadingOsLogo.tsx","../../src/modules/LoadingOsLogo/img/xyoOS-Icon.svg","../../src/modules/LoadingOsLogo/img/index.ts","../../src/modules/Dapp/modules/Window/Trail.tsx","../../src/modules/Dapp/ContainerFlexbox.tsx","../../src/modules/Dapp/Page/DappPage.tsx","../../src/modules/network/components/LoadingIndicator.tsx","../../src/modules/network/hooks/useOsNetwork.tsx","../../src/modules/network/hooks/lib/createNetworkState.ts","../../src/modules/network/hooks/useXyoPublicNetwork.tsx","../../src/modules/network/components/StyledLoadingIndicator.tsx","../../src/modules/network/components/NetworkButton.tsx","../../src/modules/network/components/NetworkReady.tsx","../../src/modules/Dapp/Page/DappPathSwitcher.tsx","../../src/modules/Dapp/Page/Row.tsx","../../src/modules/Dapp/Page/DividerChip.tsx","../../src/modules/dapps/accounts/components/AnimatedComponents/GenericAnimations/ShiftAnimation.tsx","../../src/modules/dapps/accounts/components/AnimatedComponents/IconAnimations/TwoToneBulletPoint.tsx","../../src/modules/dapps/accounts/components/AnimatedComponents/IconAnimations/TwoToneBulletPointList.tsx","../../src/modules/dapps/accounts/components/InputFields/CoinbaseEmail.tsx","../../src/modules/dapps/accounts/components/InputFields/PrimaryCryptowallet.tsx","../../src/modules/dapps/accounts/components/InputFields/SecondaryCryptowallet.tsx","../../src/modules/dapps/accounts/components/PaymentMethods.tsx","../../src/modules/dapps/accounts/components/AccountCard.tsx","../../src/modules/dapps/accounts/hooks/useAccountArchivist.ts","../../src/modules/dapps/accounts/models/CreditCardInput.ts","../../src/modules/dapps/name-service/DomainIcon.tsx","../../src/modules/dapps/table/head/components/Head.tsx","../../src/modules/dapps/table/head/hooks/useVisibleColumns.tsx","../../src/modules/dapps/table/head/components/StyledTableRowHeader.tsx","../../src/modules/dapps/table/head/Payload.ts","../../src/modules/dapps/table/head/Schema.ts","../../src/modules/dapps/table/NextIteratorFlexbox.tsx","../../src/modules/widgets/WidgetCard.tsx","../../src/modules/widgets/WidgetCardExamples.tsx","../../src/modules/widgets/StackOfWidgets.tsx","../../src/modules/widgets/Types/BarGraph/HorizontalBarGraph.tsx","../../src/modules/widgets/Types/BarGraph/StyledLinearProgress.tsx","../../src/modules/widgets/Types/DataColumns/TwoColTwoStat.tsx","../../src/modules/widgets/Types/Examples/BarGraph.tsx","../../src/modules/widgets/Types/Examples/BooleanTable.tsx","../../src/modules/widgets/Types/Tables/BooleanTable.tsx","../../src/modules/widgets/Types/Examples/TwoColTwoStat.tsx","../../src/settings/Theme/ThemeProvider.tsx"],"sourcesContent":["import type {\n Address, BaseParams, EmptyObject,\n} from '@xylabs/sdk-js'\nimport { assertEx, BaseEmitter } from '@xylabs/sdk-js'\nimport type { ArchivistInstance, ArchivistNextOptions } from '@xyo-network/archivist-model'\nimport type { DivinerInstance } from '@xyo-network/diviner-model'\nimport { GenericPayloadDivinerConfigSchema } from '@xyo-network/diviner-payload-generic'\nimport type { PayloadDivinerQueryPayload } from '@xyo-network/diviner-payload-model'\nimport { PayloadDivinerQuerySchema } from '@xyo-network/diviner-payload-model'\n\nexport interface BridgeActivityHelperParams extends BaseParams {\n archivist: WeakRef<ArchivistInstance>\n diviner: WeakRef<DivinerInstance>\n}\n\nexport class BridgeActivityHelper<TParams extends BridgeActivityHelperParams | void = void> extends BaseEmitter<\n TParams extends BridgeActivityHelperParams ? TParams : BridgeActivityHelperParams\n> {\n get archivist() {\n return assertEx(this.params.archivist.deref(), () => 'Archivist is missing')\n }\n\n get diviner() {\n const result = assertEx(this.params.diviner.deref(), () => 'Diviner is missing')\n assertEx(result.config.schema === GenericPayloadDivinerConfigSchema, () => 'Diviner is not a generic payload diviner')\n return result\n }\n\n next(options?: ArchivistNextOptions) {\n return this.archivist.next(options)\n }\n\n nextByAddress(address: Address, options?: Pick<PayloadDivinerQueryPayload<EmptyObject>, 'cursor' | 'order'>) {\n const query: PayloadDivinerQueryPayload<EmptyObject> = {\n address, ...options, schema: PayloadDivinerQuerySchema,\n }\n return this.diviner.divine([query])\n }\n}\n","import { IndexedDbArchivist } from '@xyo-network/archivist-indexeddb'\nimport { IndexedDbBoundWitnessDiviner } from '@xyo-network/diviner-boundwitness-indexeddb'\nimport { GenericPayloadDiviner } from '@xyo-network/diviner-payload-generic'\nimport { IndexedDbPayloadDiviner } from '@xyo-network/diviner-payload-indexeddb'\nimport { asSchema } from '@xyo-network/payload-model'\nimport { ModuleFactoryLocator } from '@xyo-network/sdk-js'\n\nexport const GenericPayloadDivinerTags = { 'network.xyo.generic.payload.diviner': 'GenericPayloadDiviner' }\n\nexport const BrowserLocator = new ModuleFactoryLocator()\nBrowserLocator.register(GenericPayloadDiviner.factory(), GenericPayloadDivinerTags)\nBrowserLocator.register(IndexedDbArchivist.factory(), { 'network.xyo.archivist.persistence.scope': 'device' }, asSchema('network.xyo.archivist.config', true))\nBrowserLocator.register(IndexedDbPayloadDiviner.factory(), { 'network.xyo.archivist.persistence.scope': 'device' }, asSchema('network.xyo.diviner.payload.config', true))\nBrowserLocator.register(\n IndexedDbBoundWitnessDiviner.factory(),\n { 'network.xyo.archivist.persistence.scope': 'device' },\n asSchema('network.xyo.diviner.boundwitness.config', true),\n)\nBrowserLocator.freeze()\n","import type { Connection } from '@xyo-network/os-runtime'\nimport { XyOsMonitor } from '@xyo-network/os-runtime'\n\nexport class XyOsBrowserMonitor extends XyOsMonitor {\n protected connection(): Connection | undefined {\n try {\n if (globalThis !== undefined) {\n return 'connection' in globalThis.navigator ? (globalThis.navigator.connection as Connection) : undefined\n }\n } catch {\n return\n }\n }\n}\n","/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\nimport candyDarkImport from './candy-dark@3x.webp'\nimport candyLightImport from './candy-light@3x.webp'\nimport candyAppleDarkImport from './candyApple-dark@3x.webp'\nimport candyAppleLightImport from './candyApple-light@3x.webp'\nimport mossDarkImport from './moss-dark@3x.webp'\nimport mossLightImport from './moss-light@3x.webp'\nimport oceanDarkImport from './ocean-dark@3x.webp'\nimport oceanLightImport from './ocean-light@3x.webp'\nimport peachYogurtDarkImport from './peachYogurt-dark@3x.webp'\nimport peachYogurtLightImport from './peachYogurt-light@3x.webp'\nimport sherbetDarkImport from './sherbet-dark@3x.webp'\nimport sherbetLightImport from './sherbet-light@3x.webp'\nimport springDarkImport from './spring-dark@3x.webp'\nimport springLightImport from './spring-light@3x.webp'\nimport sunsetDarkImport from './sunset-dark@3x.webp'\nimport sunsetLightImport from './sunset-light@3x.webp'\nimport xyoDarkImport from './xyo-dark@3x.webp'\nimport xyoLightImport from './xyo-light@3x.webp'\n\n// NOTE: the `as string` assertions below are intentional. Downstream consumers were\n// seeing these re-exports as `any` (typescript-eslint projectService not picking up the\n// ambient `.d.ts` for cross-file `.webp` re-exports). Casting to string here locks the\n// public type so the barrel consumers stay strongly typed.\nexport const candyDark = candyDarkImport as string\nexport const candyLight = candyLightImport as string\nexport const candyAppleDark = candyAppleDarkImport as string\nexport const candyAppleLight = candyAppleLightImport as string\nexport const mossDark = mossDarkImport as string\nexport const mossLight = mossLightImport as string\nexport const oceanDark = oceanDarkImport as string\nexport const oceanLight = oceanLightImport as string\nexport const peachYogurtDark = peachYogurtDarkImport as string\nexport const peachYogurtLight = peachYogurtLightImport as string\nexport const sherbetDark = sherbetDarkImport as string\nexport const sherbetLight = sherbetLightImport as string\nexport const springDark = springDarkImport as string\nexport const springLight = springLightImport as string\nexport const sunsetDark = sunsetDarkImport as string\nexport const sunsetLight = sunsetLightImport as string\nexport const xyoDark = xyoDarkImport as string\nexport const xyoLight = xyoLightImport as string\n","import type { PaletteList } from '@xyo-network/os-model'\n\nimport {\n candyAppleDark,\n candyAppleLight,\n candyDark,\n candyLight,\n mossDark,\n mossLight,\n oceanDark,\n oceanLight,\n peachYogurtDark,\n peachYogurtLight,\n sherbetDark,\n sherbetLight,\n springDark,\n springLight,\n sunsetDark,\n sunsetLight,\n xyoDark,\n xyoLight,\n} from '../img/index.ts'\n\nexport const OsPalettes: PaletteList = {\n candy: {\n darkModeWallpaper: candyDark,\n lightModeWallpaper: candyLight,\n nameCode: 'candy',\n readableName: 'Candy',\n },\n candyApple: {\n darkModeWallpaper: candyAppleDark,\n lightModeWallpaper: candyAppleLight,\n nameCode: 'candyApple',\n readableName: 'Candy Apple',\n },\n moss: {\n darkModeWallpaper: mossDark,\n lightModeWallpaper: mossLight,\n nameCode: 'moss',\n readableName: 'Moss',\n },\n ocean: {\n darkModeWallpaper: oceanDark,\n lightModeWallpaper: oceanLight,\n nameCode: 'ocean',\n readableName: 'Ocean',\n },\n peachYogurt: {\n darkModeWallpaper: peachYogurtDark,\n lightModeWallpaper: peachYogurtLight,\n nameCode: 'peachYogurt',\n readableName: 'Peach Yogurt',\n },\n sherbet: {\n darkModeWallpaper: sherbetDark,\n lightModeWallpaper: sherbetLight,\n nameCode: 'sherbet',\n readableName: 'Sherbet',\n },\n spring: {\n darkModeWallpaper: springDark,\n lightModeWallpaper: springLight,\n nameCode: 'spring',\n readableName: 'Spring',\n },\n sunset: {\n darkModeWallpaper: sunsetDark,\n lightModeWallpaper: sunsetLight,\n nameCode: 'sunset',\n readableName: 'Sunset',\n },\n xyo: {\n darkModeWallpaper: xyoDark,\n lightModeWallpaper: xyoLight,\n nameCode: 'xyo',\n readableName: 'XYO',\n },\n}\n\nexport const getNodePaletteByNameCode = (nameCode?: string) => {\n const castNameCode = nameCode as keyof typeof OsPalettes\n return OsPalettes[castNameCode]\n}\n","import type { Hash } from '@xylabs/sdk-js'\nimport {\n assertEx, fulfilled, rejected,\n} from '@xylabs/sdk-js'\nimport type {\n DappWidgetConfig, WidgetTray, WidgetTrayLayout, XyOsContext,\n} from '@xyo-network/os-model'\nimport { WidgetTraySchema } from '@xyo-network/os-model'\nimport type { RegisteredReactDappSet } from '@xyo-network/os-react-model'\nimport { OsCallerBase } from '@xyo-network/os-runtime'\nimport type { Payload } from '@xyo-network/payload-model'\nimport type { FC, JSX } from 'react'\nimport React from 'react'\n\ntype WidgetResults = [(JSX.Element | undefined)[] | undefined, (Error | undefined)[]] | undefined\n\nexport class WidgetCaller extends OsCallerBase {\n private _registeredDappSets?: RegisteredReactDappSet[]\n private _widgetTrayLayout?: WidgetTrayLayout\n constructor(\n context: XyOsContext,\n _registeredDappSets?: RegisteredReactDappSet[],\n _widgetTrayLayout?: WidgetTrayLayout,\n ) {\n super(context)\n this._registeredDappSets = _registeredDappSets\n this._widgetTrayLayout = _widgetTrayLayout\n }\n\n get dappsAsObject() {\n const acc = {} as Record<string, RegisteredReactDappSet>\n for (const dapp of this.registeredDappSets) {\n acc[dapp.dapp.config.name] = dapp\n }\n return acc\n }\n\n get registeredDappSets() {\n return assertEx(this._registeredDappSets, () => 'Registered Dapp Sets not available')\n }\n\n get widgetTrayLayout() {\n return assertEx(this._widgetTrayLayout, () => 'Widget Tray Layout not available')\n }\n\n async buildWidgetComponents() {\n const widgetTray = this.widgetTrayFromLayout(this.widgetTrayLayout)\n\n const results = await Promise.allSettled(\n widgetTray.widgetConfigs.map(async (config) => {\n // Find the widget component in the registered Dapps\n const Param: FC<{\n payload?: Payload\n }> | undefined = this.dappsAsObject[config.dappId].dapp.params.modes[config.mode ?? config.dappId]?.component\n\n // Try to find the config payload\n let payload: Payload | undefined\n if (config.configHash) {\n const archivist = await this.getDappsArchivist()\n const foundConfig = assertEx((await archivist.get([config.configHash]))?.[0], () => `Config - ${config.configHash} not found`)\n payload = foundConfig\n }\n\n // Return the widget component\n return Param ? <Param payload={payload} /> : undefined\n }),\n )\n\n const successfulResults = results.filter(fulfilled).map(result => result.value)\n const failedResults = results.filter(rejected).map((result) => {\n return result.reason instanceof Error ? result.reason : new Error(String(result.reason))\n })\n\n return [successfulResults, failedResults] as WidgetResults\n }\n\n // build a new widget config from the base provided by the dapp\n // and pass the config hash from the widgetLayout to the new widgetConfig\n private buildWidgetConfig(widgetConfigToBuild: DappWidgetConfig, configHash?: Hash): DappWidgetConfig {\n const clonedWidgetConfig = this.cloneWidgetConfig(widgetConfigToBuild)\n return {\n ...clonedWidgetConfig,\n configHash,\n }\n }\n\n private cloneWidgetConfig(widgetConfig: DappWidgetConfig) {\n return structuredClone(widgetConfig)\n }\n\n private widgetTrayFromLayout(widgetLayout: WidgetTrayLayout): WidgetTray {\n const targetWidgetConfigs: DappWidgetConfig[] = []\n\n const { layout, label: trayLabel } = widgetLayout\n for (const dappWidgetLayout of layout) {\n const {\n dappId, mode, configHash,\n } = dappWidgetLayout\n\n // find the dapp set for the dappWidgetLayout\n const dappSet = this.registeredDappSets.find(dappSet => dappSet.dapp.config.name === dappId)\n if (!dappSet) {\n console.error('unable to find registered dapp set for', dappId)\n continue\n }\n\n // find the widgetConfig for the dapp based on a match of mode or dappId in the dapp's widgetConfig\n const widgetConfigToBuild = dappSet.dapp.widgetConfigs.find(config => (config.mode ? config.mode === mode : mode === config.dappId))\n if (!widgetConfigToBuild) {\n console.error('unable to find widget config for', mode)\n continue\n }\n\n const config = this.buildWidgetConfig(widgetConfigToBuild, configHash)\n\n // add the foundWidgetConfig to the targetWidgetConfigs\n targetWidgetConfigs.push(config)\n }\n\n return {\n label: trayLabel ?? 'Widget Tray',\n position: 'bottom',\n schema: WidgetTraySchema,\n widgetConfigs: targetWidgetConfigs,\n }\n }\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport type { XnsRegistrationsViews } from '@xyo-network/os-runtime'\nimport { XnsRegistrationsResource } from '@xyo-network/os-runtime'\n\nimport {\n ResourceHooks, useCleanUpResource, useSyncExternalPayloadStore,\n} from '../resource/index.ts'\n\nexport const useBuildNameServiceRegistrationsResource = (context?: XyOsContext | null, pathPrefix?: string) => {\n const result = usePromise(async () => {\n if (context) {\n const xnsRegistrationsResource = new XnsRegistrationsResource(context, pathPrefix)\n await xnsRegistrationsResource.start()\n return xnsRegistrationsResource\n }\n }, [context, pathPrefix])\n\n useCleanUpResource(result[0])\n\n return result\n}\n\nexport const useBuildNameServiceRegistrationsResourceViews = (resource?: XnsRegistrationsResource) => {\n const allRegistrations = useSyncExternalPayloadStore<XnsRegistrationsResource, XnsRegistrationsViews>('allRegistrations', resource)\n\n return {\n allRegistrations,\n resource,\n }\n}\n\nexport const NameServiceRegistrationHooks = new ResourceHooks<XnsRegistrationsViews, XnsRegistrationsResource>(\n useBuildNameServiceRegistrationsResource,\n useBuildNameServiceRegistrationsResourceViews,\n)\n","import type { XyOsUiContext as XyOsUiContextImport } from '@xyo-network/os-react-model'\nimport { createContext, use } from 'react'\n\nexport const XyOsUiContext = createContext<XyOsUiContextImport | undefined>(undefined)\n\nexport const useXyOsUiContext = () => {\n return use(XyOsUiContext)\n}\n\nexport const XyOsUiContextProvider = XyOsUiContext.Provider\n","import { forget } from '@xylabs/sdk-js'\nimport type { ModuleFactoryLocatorInstance } from '@xyo-network/module-model'\nimport type { SplashScreenLoadingMessages, XyOsUiGlobal } from '@xyo-network/os-model'\nimport type { ReactDappRegistrationResults, XyOsUiContext } from '@xyo-network/os-react-model'\nimport type { XyOsMonitor, XyOsParams } from '@xyo-network/os-runtime'\nimport { dappsReadyConnection, XyOs } from '@xyo-network/os-runtime'\nimport { ModuleFactoryLocator } from '@xyo-network/sdk-js'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\n\nimport { XyOsBrowserMonitor } from '../../../helpers/index.ts'\n\nexport class XyOsUi extends XyOs implements XyOsUiContext {\n dappRegistrationResults: ReactDappRegistrationResults = { failed: [], succeeded: [] }\n\n private dappsReadyConnection = dappsReadyConnection()\n\n constructor(params: XyOsParams) {\n super(params)\n\n this.eventBus.addConnection(this.dappsReadyConnection)\n }\n\n static override get monitoring(): XyOsMonitor | undefined {\n return new XyOsBrowserMonitor()\n }\n\n static get xyOsUiGlobal(): XyOsUiGlobal {\n return XyOs.xyOsGlobal as XyOsUiGlobal\n }\n\n static hideSplash() {\n this.xyOsUiGlobal.splashScreen.hideSplash()\n this.xyOsUiGlobal.splashScreen.onComplete()\n this.setSplashStatus('complete')\n }\n\n static setSplashStatus(status: SplashScreenLoadingMessages) {\n const statusText = this.xyOsUiGlobal.splashScreen._LOADING_MESSAGES[status]\n this.xyOsUiGlobal.splashScreen.setStatusText(statusText)\n }\n\n override async boot(wallet: WalletInstance, locator: ModuleFactoryLocatorInstance = new ModuleFactoryLocator()): Promise<this> {\n await super.boot(wallet, locator)\n const registerLazy = async () => {\n this.dappRegistrationResults = (await this.dappRegistrationService.start()) as ReactDappRegistrationResults\n await this.dappsReadyConnection.emit('dappsReady', {})\n }\n forget(registerLazy())\n return this\n }\n}\n","import type { UsePromiseState } from '@xylabs/react-promise'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport type { ResourceStore } from '@xyo-network/os-runtime'\n\nimport { useXyOsUiContext } from '../XyOsUi/index.ts'\n\nexport class ResourceHooks<Views extends string, T extends ResourceStore<Views>> {\n private buildResource: (context?: XyOsContext | null, pathPrefix?: string) => [T | undefined, Error | undefined, UsePromiseState | undefined]\n private buildViews: (resource?: T) => { [K in Views]: ReturnType<T['views'][K]> | undefined } | (undefined & Record<'resource', T | undefined>)\n\n constructor(\n buildResource: (context?: XyOsContext | null, pathPrefix?: string) => [T | undefined, Error | undefined, UsePromiseState | undefined],\n buildViews: (resource?: T) => { [K in Views]: ReturnType<T['views'][K]> | undefined } | (undefined & Record<'resource', T | undefined>),\n ) {\n this.buildResource = buildResource\n this.buildViews = buildViews\n }\n\n resourceViewsFromContext = (context?: XyOsContext | null, pathPrefix?: string) => {\n const [resource, resourceError] = this.buildResource(context, pathPrefix)\n const views = this.buildViews(resource)\n\n return {\n ...views,\n resource,\n resourceError,\n }\n }\n\n useBuildResourceFromProvidedNode = (pathPrefix?: string) => {\n // eslint-disable-next-line react-hooks/rules-of-hooks, react-x/rules-of-hooks\n const xyOs = useXyOsUiContext()\n return this.buildResource(xyOs, pathPrefix)\n }\n\n useResourceViewsFromProvidedNode = (pathPrefix?: string) => {\n const [resource, resourceError] = this.useBuildResourceFromProvidedNode(pathPrefix)\n const views = this.buildViews(resource)\n\n return {\n ...views,\n resource,\n resourceError,\n }\n }\n}\n","import type { ResourceStore } from '@xyo-network/os-runtime'\nimport { useEffect } from 'react'\n\nexport const useCleanUpResource = (resource?: ResourceStore) => {\n useEffect(() => {\n return () => {\n resource?.cleanupListeners()\n }\n }, [resource])\n}\n","import type { ResourceStore } from '@xyo-network/os-runtime'\nimport { useMemo, useSyncExternalStore } from 'react'\n\n/**\n * Given a repository and one of its store names, return a stream of payloads\n */\nexport const useSyncExternalPayloadStore = <T extends ResourceStore = ResourceStore, ViewName extends string = string>(\n viewName: ViewName,\n repository?: T,\n) => {\n // Grab the return type of the getSnapshot function to ascertain its payload\n type PayloadStoreType = ReturnType<T['views'][ViewName]>\n\n const { getSnapShot, subscribe } = useMemo(() => {\n // capture the view's subscribe function\n const subscriber = repository?.subscriptions[viewName]\n // capture the view's getSnapshot function\n const snapshot = repository?.views[viewName] as (() => PayloadStoreType) | undefined\n\n if (snapshot && subscriber) {\n return {\n // since useExternalStore calls its methods in it's own lambda function, we lose the `this` context of the calling class.\n // bind each method to its appropriate object so the `this` calls work as expected.\n getSnapShot: snapshot,\n subscribe: subscriber.bind(repository),\n }\n }\n // Return a default implementation to satisfy the hook interface\n return {\n // eslint-disable-next-line unicorn/no-useless-undefined\n getSnapShot: () => undefined,\n subscribe: () => () => {\n // no-op: subscriber is unavailable when repository/view is not yet ready\n },\n }\n }, [repository, viewName])\n\n return useSyncExternalStore(subscribe, getSnapShot)\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport type { DappAccessRequestViews } from '@xyo-network/os-runtime'\nimport { DappAccessRequestResource } from '@xyo-network/os-runtime'\n\nimport {\n ResourceHooks, useCleanUpResource, useSyncExternalPayloadStore,\n} from '../resource/index.ts'\n\nexport const useBuildDappAccessRequestResource = (context?: XyOsContext | null) => {\n const resource = usePromise(async () => {\n if (context) {\n const resource = new DappAccessRequestResource(context)\n await resource.start()\n return resource\n }\n }, [context])\n\n useCleanUpResource(resource[0])\n\n return resource\n}\n\nexport const useDappAccessRequestResourceViews = (resource?: DappAccessRequestResource) => {\n const accessRequests = useSyncExternalPayloadStore('accessRequests', resource)\n const registeredInterfaces = useSyncExternalPayloadStore('registeredInterfaces', resource)\n\n return {\n accessRequests,\n registeredInterfaces,\n resource,\n }\n}\n\nexport const DappAccessRequestResourceHooks = new ResourceHooks<DappAccessRequestViews, DappAccessRequestResource>(\n useBuildDappAccessRequestResource,\n useDappAccessRequestResourceViews,\n)\n","import { usePromise } from '@xylabs/react-promise'\nimport { boot } from '@xyo-network/bios-browser'\nimport type { BiosExternalInterface } from '@xyo-network/bios-model'\nimport { useEffect } from 'react'\n\nlet biosBoot: Promise<BiosExternalInterface>\n\nexport const useBios = () => {\n const [biosExternalInterface, biosError] = usePromise(async () => {\n // If we've already booted the bios, await it's boot\n if (biosBoot !== undefined) return await biosBoot\n // Otherwise, boot the bios\n biosBoot = boot()\n // and await it's boot\n return await biosBoot\n }, [])\n\n // Bring any async BIOS errors from usePromise back\n // within react error boundaries\n useEffect(() => {\n if (biosError) throw biosError\n }, [biosError])\n\n return biosExternalInterface\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { Kernel } from '@xyo-network/kernel'\nimport type { KernelBootParams, KernelExternal } from '@xyo-network/kernel-model'\nimport type { ModuleFactoryLocator } from '@xyo-network/sdk-js'\nimport { useEffect } from 'react'\n\nimport { useBios } from './useBios.js'\n\nlet kernelBoot: Promise<KernelExternal>\n\nexport const useKernel = (locator: ModuleFactoryLocator, params: KernelBootParams) => {\n const bios = useBios()\n const [kernelExternalInterface, kernelError] = usePromise(async () => {\n // If we've already booted the kernel, await it's boot\n if (kernelBoot !== undefined) return await kernelBoot\n if (bios) {\n // Otherwise, boot the kernel\n kernelBoot = (async function () {\n const kernel = new Kernel()\n\n await kernel.boot(bios, { locator, ...params })\n return kernel\n })()\n // and await it's boot\n return await kernelBoot\n }\n }, [bios])\n\n // Bring any async BIOS errors from usePromise back\n // within react error boundaries\n useEffect(() => {\n if (kernelError) throw kernelError\n }, [kernelError])\n\n return kernelExternalInterface\n}\n","import { ButtonEx } from '@xylabs/react-button'\nimport type { ErrorAlertProps } from '@xylabs/react-error'\nimport { ErrorAlert } from '@xylabs/react-error'\nimport type { ModuleError } from '@xyo-network/payload-model'\nimport React from 'react'\n\nexport interface ErrorRenderWithSupportProps extends ErrorAlertProps<ModuleError> {\n supportHref?: string\n supportLinkText?: string\n supportTo?: string\n}\n\nexport const ErrorRenderWithSupport: React.FC<ErrorRenderWithSupportProps> = ({\n supportHref = '',\n supportTo,\n supportLinkText = 'Support',\n error,\n onCancel,\n ...props\n}) => {\n return (\n <ErrorAlert\n action={supportTo\n ? (\n <ButtonEx target=\"_blank\" to={supportTo} color=\"inherit\" size=\"small\">\n {supportLinkText}\n </ButtonEx>\n )\n : (\n <ButtonEx target=\"_blank\" href={supportHref} color=\"inherit\" size=\"small\">\n {supportLinkText}\n </ButtonEx>\n )}\n error={error}\n onCancel={onCancel}\n {...props}\n >\n </ErrorAlert>\n )\n}\n\nexport const ErrorRenderWithSupportDefault: React.FC<ErrorRenderWithSupportProps> = (props) => {\n return <ErrorRenderWithSupport supportHref=\"https://discord.com/channels/935586624392298547/1228436997375393885\" {...props} />\n}\n","import type { DappIntent } from '@xyo-network/os-model'\nimport type { RegisteredReactDappSet } from '@xyo-network/os-react-model'\nimport React, { memo, useMemo } from 'react'\n\nimport { useDappContextCreator } from '../os/index.ts'\nimport { DappIconButton } from './Button/index.ts'\nimport { deriveDappState } from './lib/index.ts'\nimport {\n DappRendered, DappWindow, useDappMenu,\n} from './modules/index.ts'\n\nexport interface DappContainerProps {\n currentIntent?: DappIntent\n dappSet: RegisteredReactDappSet\n xnsNetwork: string | undefined\n xnsNodeUrl: string | undefined\n}\n\nexport const DappContainer: React.FC<DappContainerProps> = ({\n currentIntent, dappSet, xnsNodeUrl, xnsNetwork,\n}) => {\n const { dapp, dappIcon } = dappSet\n\n const {\n dappWallet, context, nodeCreateError,\n } = useDappContextCreator(xnsNodeUrl, xnsNetwork, dapp, currentIntent)\n\n const dappState = useMemo(() => {\n if (currentIntent?.targetDappId === dapp.config.name) {\n return deriveDappState(currentIntent)\n }\n }, [currentIntent, dapp])\n\n const { error: menuError, ...dappMenuProperties } = useDappMenu(context, dapp?.config.name)\n\n const errors = useMemo(() => [nodeCreateError, menuError].filter(Boolean), [nodeCreateError])\n\n const dappWindowProps = useMemo(() => ({\n context,\n dapp,\n dappMenuProperties,\n dappState,\n dappWallet,\n errors,\n }), [context, dapp, dappMenuProperties, dappState, dappWallet, errors])\n\n return (\n <DappIconButton\n dappIcon={dappIcon}\n dappIconSvg={dapp.params.iconSvg}\n dappName={dapp?.config.name}\n dappState={dappState}\n >\n <DappWindow {...dappWindowProps}>\n <DappRendered\n {...dappWindowProps}\n />\n </DappWindow>\n </DappIconButton>\n )\n}\n\nexport const DappContainerMemo = memo(DappContainer)\n","import { useAsyncEffect } from '@xylabs/react-async-effect'\nimport type {\n DappIntent, RegisteredDapp, WindowDappNodeSet,\n} from '@xyo-network/os-model'\nimport { DappIntentTypes } from '@xyo-network/os-model'\nimport { DappContextCreator, RunningDappCache } from '@xyo-network/os-runtime'\nimport {\n useCallback, useEffect, useRef, useState,\n} from 'react'\n\nimport { useXyOsUiContext } from '../../XyOsUi/index.ts'\n\n/**\n * Creates a dapp node for the provided dapp and name\n * @param dapp - The dapp to create the node for\n */\nexport const useDappContextCreator = (\n xnsNodeUrl: string | undefined,\n xnsNetwork: string | undefined,\n dapp?: RegisteredDapp,\n currentIntent?: DappIntent,\n allowedNames?: string[],\n createOnMount = false,\n): WindowDappNodeSet & {\n nodeCreateError?: Error\n} => {\n const context = useXyOsUiContext()\n const [windowDappNodeSet, setWindowDappNodeSet] = useState<WindowDappNodeSet>({ context: undefined, dappWallet: undefined })\n const [dappWindowNodeError, setDappWindowNodeError] = useState<Error>()\n // ensure the dapp is targeted by the current intent\n const targetedDapp = !!(dapp && context && currentIntent?.targetDappId === dapp?.config.name)\n\n // Keep a ref of the windowDappNodeSet to use in effect hooks without needing it as a dependency\n const windowDappNodeSetRef = useRef<WindowDappNodeSet>(windowDappNodeSet)\n useEffect(() => {\n windowDappNodeSetRef.current = windowDappNodeSet\n }, [windowDappNodeSet])\n\n const createNode = useCallback(async () => {\n if (targetedDapp) {\n try {\n const windowDappNodeSet = await RunningDappCache.findOrCreate(dapp, context, allowedNames ?? [], xnsNodeUrl, xnsNetwork)\n setWindowDappNodeSet(windowDappNodeSet)\n } catch (e) {\n setDappWindowNodeError(e as Error)\n }\n }\n }, [dapp, currentIntent, context, allowedNames])\n\n useEffect(() => {\n if (createOnMount) {\n void (async () => {\n await createNode()\n })()\n }\n }, [createOnMount, createNode])\n\n // Watch the intents to determine if the dappWindowNode should be built\n useAsyncEffect(\n\n async () => {\n // unless the dapp was passed, do nothing\n if (targetedDapp) {\n switch (currentIntent?.intent) {\n case DappIntentTypes.Launch: {\n await createNode()\n break\n }\n case DappIntentTypes.Close: {\n if (windowDappNodeSetRef.current.context) {\n // In case a cached dapp was closed, clear its Dapp Archivist to allow for a fresh start upon next launch\n await DappContextCreator.resetDappArchivist(windowDappNodeSetRef.current.context)\n setWindowDappNodeSet({ context: null, dappWallet: undefined })\n }\n break\n }\n case DappIntentTypes.Minimize:\n // do nothing\n }\n }\n },\n [createNode, currentIntent],\n )\n\n return {\n ...windowDappNodeSet,\n nodeCreateError: dappWindowNodeError,\n }\n}\n","import type { EventListener } from '@xylabs/sdk-js'\nimport type { DappRegistrationResults, EventBusPubSubConnectionRequest } from '@xyo-network/os-model'\nimport { EventBusPubSubConnection } from '@xyo-network/os-runtime'\nimport { useEffect, useState } from 'react'\n\nimport { useXyOsUiContext } from '../../XyOsUi/index.ts'\n\nexport const useDappRegistrationResults = () => {\n const context = useXyOsUiContext()\n\n const [registeredDappSetResults, setRegisteredDappSetResults] = useState<DappRegistrationResults | undefined>()\n\n useEffect(() => {\n const listener: EventListener = () => {\n setRegisteredDappSetResults(context?.dappRegistrationResults)\n }\n const dappsReadyConnectionRequest: EventBusPubSubConnectionRequest = {\n subscribableEvents: new Map([['dappsReady', listener]]),\n type: 'PubSub',\n }\n const dappsReadyConnection = new EventBusPubSubConnection(dappsReadyConnectionRequest)\n let initialResultsTimeoutId: ReturnType<typeof setTimeout> | undefined\n if (context) {\n context.eventBus.addConnection(dappsReadyConnection)\n initialResultsTimeoutId = setTimeout(() => setRegisteredDappSetResults(context.dappRegistrationResults), 0)\n }\n return () => {\n if (initialResultsTimeoutId !== undefined) clearTimeout(initialResultsTimeoutId)\n if (context && dappsReadyConnection.id) context.eventBus.removeConnection(dappsReadyConnection.id)\n }\n }, [context])\n\n return registeredDappSetResults\n}\n","import type { DappSeedPhraseRepository } from '@xyo-network/os-runtime'\nimport { DappRegistry } from '@xyo-network/os-runtime'\nimport { useMemo } from 'react'\n\nimport { useDappSeedPhraseRepository } from './useDappSeedPhraseRepository.ts'\n\nlet _dappRegistry: DappRegistry | undefined\n\nconst getOrCreateDappRegistry = (repository: DappSeedPhraseRepository): DappRegistry => {\n _dappRegistry ??= new DappRegistry(repository)\n return _dappRegistry\n}\n\nexport const useDappRegistry = (allowedNames: string[]) => {\n const dappSeedPhraseRepository = useDappSeedPhraseRepository(allowedNames)\n\n return useMemo(() => {\n return dappSeedPhraseRepository ? getOrCreateDappRegistry(dappSeedPhraseRepository) : undefined\n }, [dappSeedPhraseRepository])\n}\n","import type { XyOsContext } from '@xyo-network/os-model'\nimport { DappSeedPhraseRepository } from '@xyo-network/os-runtime'\nimport { useMemo } from 'react'\n\nimport { useXyOsUiContext } from '../../XyOsUi/index.ts'\n\nlet _dappWalletRepository: DappSeedPhraseRepository | undefined\n\nconst getOrCreateDappSeedPhraseRepository = (context: XyOsContext, allowedNames: string[]): DappSeedPhraseRepository => {\n _dappWalletRepository ??= new DappSeedPhraseRepository(context, allowedNames)\n return _dappWalletRepository\n}\n\nexport const useDappSeedPhraseRepository = (allowedNames: string[]) => {\n const context = useXyOsUiContext()\n\n return useMemo(() => {\n return context ? getOrCreateDappSeedPhraseRepository(context, allowedNames) : undefined\n }, [context, allowedNames])\n}\n","import { assertEx } from '@xylabs/sdk-js'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport { OsSettingsCaller, OsSettingsReadyEvent } from '@xyo-network/os-runtime'\nimport { useMemo } from 'react'\n\nimport { useStackReady } from '../../stack/index.ts'\nimport { useXyOsUiContext } from '../../XyOsUi/index.ts'\n\nexport const useOsSettingsCaller = (context?: XyOsContext | null) => {\n const providedContext = useXyOsUiContext()\n const { ready } = useStackReady(OsSettingsReadyEvent, 'osSettingsStack', providedContext)\n\n return useMemo(() => {\n if (providedContext || context || ready) {\n const derivedNode = assertEx(context ?? providedContext, () => 'no node was found in context or passed as argument')\n return new OsSettingsCaller(derivedNode)\n }\n }, [context, providedContext])\n}\n","import type { EventListener } from '@xylabs/sdk-js'\nimport { assertEx } from '@xylabs/sdk-js'\nimport type { EventBusPubSubConnectionRequest, XyOsContext } from '@xyo-network/os-model'\nimport { EventBusPubSubConnection } from '@xyo-network/os-runtime'\nimport { useEffect, useState } from 'react'\n\nimport type { StackReady } from '../../interfaces/index.ts'\nimport { useXyOsUiContext } from '../XyOsUi/index.ts'\n\nexport const useStackReady = (stackReadyEvent: string, stackName: string, context?: XyOsContext | null) => {\n const providedContext = useXyOsUiContext()\n const [stackReady, setStackReady] = useState<StackReady>({ ready: false })\n\n useEffect(() => {\n const derivedContext = context ?? providedContext\n\n const listener: EventListener = () => {\n if (!derivedContext) throw new Error('no context found')\n const stack = assertEx(derivedContext.getStack(stackName).stack, () => `${stackName} missing stack`)\n setStackReady({ ready: true, stack })\n }\n\n const stackReadyReadyConnectionRequest: EventBusPubSubConnectionRequest = {\n subscribableEvents: new Map([[stackReadyEvent, listener]]),\n type: 'PubSub',\n }\n\n const stackReadyReadyConnection = new EventBusPubSubConnection(stackReadyReadyConnectionRequest)\n\n let initialReadyTimeoutId: ReturnType<typeof setTimeout> | undefined\n if (derivedContext) {\n // connect to the bus\n derivedContext.eventBus.addConnection(stackReadyReadyConnection)\n\n // attempt to see if the stack is already initialized\n const stack = derivedContext.getStack(stackName)\n if (stack.initialized) {\n initialReadyTimeoutId = setTimeout(() => setStackReady({ ready: true, stack: stack.stack }), 0)\n }\n }\n\n return () => {\n if (initialReadyTimeoutId !== undefined) clearTimeout(initialReadyTimeoutId)\n const derivedContext = context ?? providedContext\n if (derivedContext && stackReadyReadyConnection._id) {\n derivedContext.eventBus.removeConnection(stackReadyReadyConnection.id)\n }\n }\n }, [context, providedContext, stackName, stackReadyEvent])\n\n return stackReady\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { buildUserWalletSeedPhrasePayload } from '@xyo-network/os-runtime'\nimport { useMemo } from 'react'\n\nexport const usePhraseFile = (phrase?: string) => {\n const [payloadAndRootHash] = usePromise(async () => (phrase ? await buildUserWalletSeedPhrasePayload(phrase) : undefined), [phrase])\n\n const filename = useMemo(() => `xyo-phrase-${payloadAndRootHash?.rootHash}.json`, [payloadAndRootHash?.rootHash])\n\n const { phraseFile, phraseFileError } = useMemo<{\n phraseFile?: string\n phraseFileError?: Error\n }>(() => {\n const payload = payloadAndRootHash?.payload\n if (payload) {\n try {\n const data = new Blob([JSON.stringify(payload, null, 2)], { type: 'text/plain' })\n return { phraseFile: globalThis.URL.createObjectURL(data) }\n } catch (e) {\n return { phraseFileError: e as Error }\n }\n } else {\n return {}\n }\n }, [payloadAndRootHash])\n\n return {\n filename,\n payload: payloadAndRootHash?.payload,\n phraseFile,\n phraseFileError,\n }\n}\n","import type { Dispatch } from 'react'\nimport { useLocation, useNavigate } from 'react-router-dom'\n\nexport const useTabs = (): [string, Dispatch<string>] => {\n const location = useLocation()\n const navigate = useNavigate()\n\n const rootFolder = location.pathname.split('/')[1]\n const tab = rootFolder?.length > 0 ? rootFolder : 'node'\n const setTab = (tab: string) => {\n void navigate(`/${tab}`)\n }\n return [tab, setTab]\n}\n","import type { UsePromiseState } from '@xylabs/react-promise'\nimport { usePromise } from '@xylabs/react-promise'\nimport type { WidgetTrayLayout } from '@xyo-network/os-model'\nimport type { RegisteredReactDappSet } from '@xyo-network/os-react-model'\nimport type { JSX } from 'react'\n\nimport { WidgetCaller } from '../../../helpers/index.ts'\nimport { useXyOsUiContext } from '../../XyOsUi/index.ts'\n\ntype WidgetResults = [(JSX.Element | undefined)[] | undefined, (Error | undefined)[]] | undefined\n\nexport const useWidgetDapps = (\n registeredDapps?: RegisteredReactDappSet[],\n widgetTrayLayout?: WidgetTrayLayout,\n): [WidgetResults, Error | undefined, UsePromiseState | undefined] => {\n const context = useXyOsUiContext()\n return usePromise(async () => {\n if (registeredDapps && registeredDapps.length > 0 && context && widgetTrayLayout) {\n const caller = new WidgetCaller(context, registeredDapps, widgetTrayLayout)\n return await caller.buildWidgetComponents()\n }\n }, [context, registeredDapps, widgetTrayLayout])\n}\n","import type { RefObject } from 'react'\nimport { useLayoutEffect, useState } from 'react'\n\nimport { useOnWindowResize } from '../../../../utils/index.ts'\n\n/**\n * For a given element, determine the left and top distance from the edge of the viewport\n * to the element's center\n */\nexport const useLaunchPoint = (spanRef: RefObject<HTMLSpanElement | null>) => {\n const [coordinates, setCoordinates] = useState<{\n left: number\n top: number\n }>({ left: 0, top: 0 })\n const resized = useOnWindowResize()\n\n useLayoutEffect(() => {\n const rect = spanRef.current?.getBoundingClientRect() ?? null\n if (rect) {\n const {\n width, height, left, top,\n } = rect\n setCoordinates({\n left: left + width / 2,\n top: top + height / 2,\n })\n }\n }, [spanRef, resized])\n\n return coordinates\n}\n","import type { InstallationType, RegisteredDappSet } from '@xyo-network/os-model'\nimport {\n isInstalledDappSet, isPreInstalledDappSet, isUnInstalledDappSet,\n} from '@xyo-network/os-model'\n\nexport const DappInstallTypeFilters: Record<\n InstallationType,\n (registeredDappSets: RegisteredDappSet[] | undefined) => RegisteredDappSet[] | undefined\n> = {\n installed(registeredDappSets?: RegisteredDappSet[]) {\n return registeredDappSets && registeredDappSets?.length > 0\n ? registeredDappSets?.filter(isInstalledDappSet).toSorted((a, b) => (a.dapp.config.name.toUpperCase() < b.dapp.config.name.toUpperCase() ? -1 : 1))\n : undefined\n },\n preInstalled(registeredDappSets?: RegisteredDappSet[]) {\n return registeredDappSets && registeredDappSets?.length > 0\n ? registeredDappSets\n ?.filter(isPreInstalledDappSet)\n .toSorted((a, b) => (a.dapp.config.name.toUpperCase() < b.dapp.config.name.toUpperCase() ? -1 : 1))\n : undefined\n },\n uninstalled(registeredDappSets?: RegisteredDappSet[]) {\n return registeredDappSets && registeredDappSets?.length > 0\n ? registeredDappSets.filter(isUnInstalledDappSet).toSorted((a, b) => (a.dapp.config.name.toUpperCase() < b.dapp.config.name.toUpperCase() ? -1 : 1))\n : undefined\n },\n}\n","const getApiDomain = (localHost: boolean, apiDomain: string | undefined) => {\n if (apiDomain !== undefined) {\n return apiDomain\n }\n if (localHost) {\n return 'http://localhost:8080'\n }\n if (location.hostname.startsWith('beta')) {\n return 'https://beta.archivist.xyo.network'\n }\n return 'https://archivist.xyo.network'\n}\n\nexport { getApiDomain }\n","import { useEffect, useState } from 'react'\n\nexport const useOnWindowResize = () => {\n const [resized, setResized] = useState<UIEvent>()\n\n useEffect(() => {\n const onResize = (event: UIEvent) => {\n setResized(event)\n }\n globalThis.addEventListener('resize', onResize, false)\n\n return () => {\n globalThis.removeEventListener('resize', onResize)\n }\n }, [])\n\n return resized\n}\n","/* eslint-disable @typescript-eslint/no-misused-promises */\nimport { Circle } from '@mui/icons-material'\nimport type { ButtonExProps } from '@xylabs/react-button'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport type {\n DappIcon,\n DappName,\n} from '@xyo-network/os-model'\nimport { DappIntentTypes } from '@xyo-network/os-model'\nimport { DappIntentCaller, XyOsMonitor } from '@xyo-network/os-runtime'\nimport React, { useRef } from 'react'\n\nimport { useSendDappIntent } from '../../intent/index.ts'\nimport type { DappState } from '../lib/index.ts'\nimport { DEFAULT_ICON_SIZE } from '../lib/index.ts'\nimport { RenderHtml } from '../RenderHtml.tsx'\nimport { useLaunchPoint } from './hooks/index.ts'\nimport { DappLaunchFrame } from './LaunchFrame.js'\nimport { decomposeProps } from './lib/index.ts'\nimport {\n StyledDappIconButtonEx, StyledDappName, StyledDefaultDappIcon,\n} from './StyledComponents.js'\n\nexport type DappIconButtonProps = ButtonExProps & {\n dappIcon?: DappIcon\n dappIconSvg?: string\n dappName?: DappName\n dappState?: DappState\n}\n\nexport const DappIconButton: React.FC<DappIconButtonProps> = ({\n children, dappIcon, dappIconSvg, dappName, dappState, ...props\n}) => {\n const {\n DappIconSize, color, nonSxProps, sx,\n } = decomposeProps(dappIcon, props)\n const iconSize = DEFAULT_ICON_SIZE\n\n const { active, minimized } = dappState ?? {}\n\n // Functions to invoke Dapp intents\n const sendIntent = useSendDappIntent()\n\n // Use the DappIconButton to calculate the launch point for the DappWindow\n const iconButtonRef = useRef<HTMLButtonElement>(null)\n const { left: launchLeft, top: launchTop } = useLaunchPoint(iconButtonRef)\n\n const MiddleEllipsisFunction = (str: DappName | undefined) => {\n if (str && str.length > 25) {\n // console.log(str)\n // console.log(str.slice(0, 15))\n // console.log(str.slice(-10, str.length - 10 + str.length))\n return str.slice(0, 15) + '...' + str.slice(-7, str.length - 7 + str.length)\n }\n return str\n }\n\n const onClickIcon = async () => {\n XyOsMonitor.trackEvent('Launch dApp', { 'Dapp Name': `${dappName}` })\n await sendIntent?.(DappIntentCaller.buildIntent(DappIntentCaller.OsDappName, DappIntentTypes.Launch, dappName))\n }\n\n return (\n <FlexCol alignItems=\"stretch\" justifyContent=\"stretch\">\n <DappLaunchFrame id=\"dapp-launch-frame\" open={!!active} launchLeft={launchLeft} launchTop={launchTop}>\n {children}\n </DappLaunchFrame>\n <span\n style={{ cursor: 'pointer' }}\n onClick={onClickIcon}\n >\n <StyledDappIconButtonEx\n iconBgBaseColor={color}\n ref={iconButtonRef}\n sx={{\n height: iconSize, mb: 0.75, width: iconSize, ...sx,\n }}\n {...nonSxProps}\n >\n {dappIconSvg\n ? <RenderHtml htmlString={dappIconSvg} />\n : <StyledDefaultDappIcon fontSize={DappIconSize}>{dappIcon?.name.at(0)}</StyledDefaultDappIcon>}\n </StyledDappIconButtonEx>\n <FlexCol gap={0.25}>\n <StyledDappName variant=\"body2\" maxWidth={iconSize}>\n {MiddleEllipsisFunction(dappIcon?.name)}\n </StyledDappName>\n <Circle sx={{\n height: 8, opacity: minimized ? 1 : 0, transition: 'opacity .5s',\n }}\n />\n </FlexCol>\n </span>\n </FlexCol>\n )\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport type { DappIntentViews } from '@xyo-network/os-runtime'\nimport { DappIntentResource } from '@xyo-network/os-runtime'\n\nimport {\n ResourceHooks, useCleanUpResource, useSyncExternalPayloadStore,\n} from '../resource/index.ts'\n\nexport const useBuildIntentResource = (context?: XyOsContext | null) => {\n const resource = usePromise(async () => {\n if (context) {\n const resource = new DappIntentResource(context)\n await resource.start()\n return resource\n }\n }, [context])\n\n useCleanUpResource(resource[0])\n\n return resource\n}\n\nexport const useIntentResourceViews = (resource?: DappIntentResource) => {\n const allDappIntents = useSyncExternalPayloadStore('allDappIntents', resource)\n const latestDappIntent = useSyncExternalPayloadStore('latestDappIntent', resource)\n\n return {\n allDappIntents,\n latestDappIntent,\n resource,\n }\n}\n\nexport const DappIntentResourceHooks = new ResourceHooks<DappIntentViews, DappIntentResource>(useBuildIntentResource, useIntentResourceViews)\n","import { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { useWeakArchivistFromNode } from '@xyo-network/react-archivist'\n\nexport const useClearIntents = () => {\n const [intentArchivist] = useWeakArchivistFromNode('IntentArchivist')\n // For now, clear the archivist to avoid bloating\n useAsyncEffect(\n async () => {\n const intentArchivistInstance = intentArchivist?.deref()\n if (intentArchivistInstance) await intentArchivistInstance.clear?.()\n },\n [intentArchivist],\n )\n}\n","import { assertEx } from '@xylabs/sdk-js'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport { DappIntentCaller } from '@xyo-network/os-runtime'\nimport { useMemo } from 'react'\n\nimport { useXyOsUiContext } from '../XyOsUi/index.ts'\n\nexport const useDappIntentCaller = (xyOsContext?: XyOsContext | null) => {\n const xyOs = useXyOsUiContext()\n\n return useMemo(() => {\n if (xyOsContext || xyOs) {\n const context = assertEx(xyOsContext ?? xyOs, () => 'no node was found in context or passed as argument')\n return new DappIntentCaller(context)\n }\n }, [xyOsContext, xyOs])\n}\n","import { filterAs } from '@xylabs/sdk-js'\nimport type { ArchivistModuleEventData } from '@xyo-network/archivist-model'\nimport type { DappIntent } from '@xyo-network/os-model'\nimport {\n asOptionalDappIntent,\n DappIntentTypes, DappMode,\n} from '@xyo-network/os-model'\nimport { useWeakArchivistFromNode } from '@xyo-network/react-archivist'\nimport { useEffect, useState } from 'react'\n\n/** watch payloads going into the intent archivist to figure out what if the current state of the passed in dappId */\nexport const useDappIntentListener = (dappName?: string | null, targetMode = DappMode.Window) => {\n const [dappIntentType, setDappIntentType] = useState<DappIntentTypes>(DappIntentTypes.Close)\n const [intentPayload, setIntentPayload] = useState<DappIntent>()\n const [intentArchivist] = useWeakArchivistFromNode('IntentArchivist')\n\n useEffect(() => {\n const listener = ({ payloads }: ArchivistModuleEventData['inserted']) => {\n const filteredPayloads = filterAs(payloads, asOptionalDappIntent)\n for (const payload of filteredPayloads) {\n const allDapps = dappName === null && payload.targetMode === targetMode\n const targetDapps = dappName === payload.targetDappId && payload.targetMode === targetMode\n if (allDapps || targetDapps) {\n setIntentPayload(payload)\n switch (payload.intent) {\n case DappIntentTypes.Close: {\n setDappIntentType(DappIntentTypes.Close)\n break\n }\n case DappIntentTypes.Launch: {\n setDappIntentType(DappIntentTypes.Launch)\n break\n }\n case DappIntentTypes.Minimize: {\n setDappIntentType(DappIntentTypes.Minimize)\n break\n }\n default: {\n console.warn('Unrecognized DappIntentType:', payload)\n }\n }\n }\n }\n }\n intentArchivist?.deref()?.on('inserted', listener)\n\n return () => {\n intentArchivist?.deref()?.off('inserted', listener)\n }\n }, [dappName, intentArchivist, targetMode])\n\n return { dappIntentType, intentPayload }\n}\n","import { DappIntentTypes, DappMode } from '@xyo-network/os-model'\nimport { useEffect, useState } from 'react'\n\nimport { DappIntentResourceHooks } from './DappIntentResourceHooks.ts'\n\n/**\n * Note: This is a modified version of the original useDappIntentListener hook.\n * This version uses the DappIntentResourceHooks instead of the useArchivistFromNode hook.\n * Sadly, it appears to be much slower than the original version. It might be because the resource\n * uses useExternalStoreSync under the hood, which might be the cause :shrug:\n */\n\n/** watch payloads going into the intent archivist to figure out what if the current state of the passed in dappId */\n/** @deprecated - use the original version - useDappIntentListener till performance issues are ironed out */\nexport const useDappIntentListener2 = (dappName?: string | null, sourceMode = DappMode.Window) => {\n const { latestDappIntent } = DappIntentResourceHooks.useResourceViewsFromProvidedNode()\n const [dappIntentType, setDappIntentType] = useState<DappIntentTypes>(DappIntentTypes.Close)\n\n useEffect(() => {\n if (sourceMode !== DappMode.Window) {\n console.warn('Intent sent from unrecognized mode', sourceMode)\n return\n }\n let nextIntent: DappIntentTypes | undefined\n for (const payload of latestDappIntent ?? []) {\n if (payload.targetDappId === dappName) {\n switch (payload.intent) {\n case DappIntentTypes.Close: {\n nextIntent = DappIntentTypes.Close\n break\n }\n case DappIntentTypes.Launch: {\n nextIntent = DappIntentTypes.Launch\n break\n }\n case DappIntentTypes.Minimize: {\n nextIntent = DappIntentTypes.Minimize\n break\n }\n default: {\n console.warn('Unrecognized DappIntentType:', payload)\n }\n }\n }\n }\n if (nextIntent !== undefined) {\n const timeoutId = setTimeout(() => setDappIntentType(nextIntent), 0)\n return () => clearTimeout(timeoutId)\n }\n }, [dappName, latestDappIntent, sourceMode])\n\n return dappIntentType\n}\n","import type { DappIntent } from '@xyo-network/os-model'\nimport { DappIntentTypes } from '@xyo-network/os-model'\nimport { NameTransforms } from '@xyo-network/os-runtime'\nimport { useCallback } from 'react'\nimport { useNavigate, useParams } from 'react-router-dom'\n\nexport interface UpdateRouteParamOptions {\n // skip the navigate call to allow intents to be processed without updating the route\n skipNavigate?: boolean\n}\n\nconst rootRoute = '/'\n\n/** update url based off passed intents */\nexport const useNavigateIntent = () => {\n const navigate = useNavigate()\n const { dappName: dappNameParam } = useParams()\n\n const updateRouteParam = useCallback(\n (dappIntent: DappIntent, { skipNavigate }: UpdateRouteParamOptions = {}) => {\n if (dappIntent?.targetDappId) {\n const {\n targetDappId: dappName, intent: intentType, params: intentParams,\n } = dappIntent\n const slug = new NameTransforms(dappName).slug()\n switch (intentType) {\n case DappIntentTypes.Launch: {\n const dappNameDeSlugged = dappNameParam ? new NameTransforms(dappNameParam).deSlug() : null\n if (dappNameDeSlugged !== dappName) {\n // navigating from the root to allow overwriting duplicate slugs\n const slugFromRoot = `${rootRoute}${slug}${intentParams ? `/${intentParams}` : ''}`\n if (!skipNavigate) void navigate(slugFromRoot)\n }\n break\n }\n case DappIntentTypes.Minimize: {\n if (!skipNavigate) void navigate(rootRoute)\n break\n }\n case DappIntentTypes.Close: {\n if (!skipNavigate) void navigate(rootRoute)\n break\n }\n }\n }\n },\n [dappNameParam, navigate],\n )\n\n return updateRouteParam\n}\n","import type { DappIntent } from '@xyo-network/os-model'\nimport { useWeakArchivistFromNode } from '@xyo-network/react-archivist'\nimport { useCallback } from 'react'\n\nimport type { UpdateRouteParamOptions } from './useNavigateIntent.js'\nimport { useNavigateIntent } from './useNavigateIntent.js'\n\n/** Returns a function that resolves the IntentArchivist and inserts an intent payload */\nexport const useSendDappIntent = () => {\n const [intentArchivist] = useWeakArchivistFromNode('IntentArchivist')\n const navigate = useNavigateIntent()\n\n const sendIntent = useCallback(\n async (dappIntent: DappIntent, options: UpdateRouteParamOptions = {}) => {\n const intentArchivistInstance = intentArchivist?.deref()\n if (!intentArchivistInstance) {\n console.error('unable to find IntentArchivist')\n return\n }\n if (dappIntent) {\n try {\n await intentArchivistInstance.insert([dappIntent])\n } catch (e) {\n console.error('error sending intent to archivist', e)\n }\n // sync the route with the intent\n navigate(dappIntent, options)\n } else {\n console.warn('tried to send intent but intent payload')\n }\n },\n // Disabling because navigate changes references and causes additional renders\n\n [intentArchivist],\n )\n\n return intentArchivist ? sendIntent : null\n}\n","export const DEFAULT_ICON_SIZE = 84\n","import type { DappIntent } from '@xyo-network/os-model'\nimport { DappIntentTypes } from '@xyo-network/os-model'\n\nimport type { DappState } from './DappState.ts'\n\nexport const deriveDappState = (intent?: DappIntent): DappState => {\n const minimized = intent?.intent === DappIntentTypes.Minimize\n const active = intent?.intent === DappIntentTypes.Launch\n const closed = intent?.intent === DappIntentTypes.Close\n\n return {\n active,\n closed,\n minimized,\n }\n}\n","import React from 'react'\n\nexport const RenderHtml = ({ htmlString }: {\n htmlString: string\n}) => {\n return (\n <div\n style={{ height: 64, width: 64 }}\n dangerouslySetInnerHTML={{ __html: htmlString }}\n />\n )\n}\n","import { useTheme } from '@mui/material'\nimport {\n animated, config, useSpring,\n} from '@react-spring/web'\nimport type { PropsWithChildren, Ref } from 'react'\nimport React, { useMemo } from 'react'\n\nexport interface DappLaunchFrameProps extends PropsWithChildren {\n bgColor?: string\n id?: string\n launchLeft?: number\n launchTop?: number\n open: boolean\n ref?: Ref<HTMLDivElement>\n}\n\nexport const DappLaunchFrame: React.FC<DappLaunchFrameProps> = ({\n bgColor, children, id, launchLeft, open, launchTop, ref,\n}) => {\n const theme = useTheme()\n\n const frameOpenSpringConfig = useMemo(\n () => ({\n config: config.stiff,\n from: { height: '0%', width: '0%' },\n to: {\n height: open ? '100dvh' : '0%',\n left: open ? 0 : launchLeft,\n top: open ? 0 : launchTop,\n width: open ? '100vw' : '0%',\n },\n }),\n [launchLeft, launchTop, open],\n )\n\n const {\n height, width, ...frameProps\n } = useSpring(frameOpenSpringConfig)\n const { transform, ...scaleProps } = useSpring({\n config: config.stiff,\n from: { transform: 'scale(0)' },\n to: { transform: open ? 'scale(1)' : 'scale(0)' },\n })\n\n return (\n <div id={id} ref={ref}>\n <animated.div\n id=\"dapp-launch-frame-transition-width-height\"\n style={{\n ...frameProps,\n height,\n overflow: 'hidden',\n position: 'fixed',\n width,\n // Set to one above the mui app bar\n zIndex: 1101,\n }}\n >\n <animated.div\n id=\"dapp-launch-frame-transition-scale\"\n style={{\n ...scaleProps,\n alignItems: 'start',\n background: bgColor ?? theme.vars?.palette.background.default,\n display: 'flex',\n height: '100%',\n justifyContent: 'start',\n transform,\n width: '100%',\n }}\n >\n {children}\n </animated.div>\n </animated.div>\n </div>\n )\n}\n","import type { ButtonExProps } from '@xylabs/react-button'\nimport type { DappIcon } from '@xyo-network/os-model'\n\nimport { DEFAULT_ICON_SIZE } from '../../lib/index.ts'\n\ntype DistributiveOmit<T, K extends keyof never> = T extends unknown ? Omit<T, K> : never\n\nexport interface DecomposedProps {\n DappIconSize: number\n color: DappIcon['color']\n id: DappIcon['windowId']\n nonSxProps: DistributiveOmit<ButtonExProps, 'sx'>\n sx: ButtonExProps['sx']\n}\n\nexport const decomposeProps = (dappIcon?: DappIcon, props?: ButtonExProps): DecomposedProps => {\n // Decompose the Payload into various properties\n const { color, windowId: id } = dappIcon ?? {}\n const DappIconSize = DEFAULT_ICON_SIZE * 0.8\n const { sx, ...nonSxProps } = props ?? {}\n\n return {\n DappIconSize, color, id, nonSxProps, sx,\n }\n}\n","import { styled } from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { alphaCss } from '@xylabs/react-theme'\nimport { TypographyEx } from '@xyo-network/react-shared'\n\nconst borderRadiusFactor = 1.5\n\nexport const StyledDappIconButtonEx = styled(ButtonEx, {\n name: 'DappIconButton',\n shouldForwardProp: prop => !['iconBgBaseColor'].includes(prop as string),\n})<{\n iconBgBaseColor?: string\n}>(({ theme }) => {\n return {\n // :before hack in place since css transitions not supported in css\n '&:before': {\n WebkitBackdropFilter: 'blur(20px)',\n backdropFilter: 'blur(20px)',\n backgroundColor: alphaCss(theme.vars?.palette.background.paper ?? '#fff', 0.5),\n borderRadius: theme.spacing(borderRadiusFactor),\n content: \"''\",\n inset: 0,\n opacity: 0,\n position: 'absolute',\n transition: 'transform 0.15s linear, opacity 0.15s linear',\n zIndex: '-1',\n },\n '&:hover': { transform: 'translateY(-2px)' },\n '&:hover:before': { opacity: 1 },\n 'WebkitBackdropFilter': 'blur(20px)',\n 'backdropFilter': 'blur(20px)',\n 'backgroundColor': alphaCss(theme.vars?.palette.background.paper ?? '#fff', 0.5),\n 'borderRadius': theme.spacing(borderRadiusFactor),\n 'color': theme.vars?.palette.text.primary,\n 'position': 'relative',\n 'transition': 'transform 0.15s linear',\n }\n})\n\nexport const StyledDappName = styled(TypographyEx, { name: 'StyledDappName' })(({ theme }) => ({\n // WebkitBoxOrient: 'vertical',\n WebkitLineClamp: 2,\n color: theme.vars?.palette.text.primary,\n flexWrap: 'wrap',\n fontWeight: 700,\n letterSpacing: '-0.5px',\n lineClamp: 2,\n textAlign: 'center',\n textOverflow: 'ellipsis',\n textShadow: `1px 1px 3px ${alphaCss(theme.vars?.palette.common.black ?? '#000', 0.3)}`,\n whiteSpace: 'initial',\n wordWrap: 'break-word',\n}))\n\nexport const StyledDefaultDappIcon = styled(TypographyEx, { name: 'StyledDappName' })(() => ({ lineHeight: 1 }))\n","import { ArrowForward } from '@mui/icons-material'\nimport type { DialogProps } from '@mui/material'\nimport {\n Alert,\n Button, Dialog, DialogActions, DialogContent, DialogTitle, Typography,\n} from '@mui/material'\nimport { ErrorRender } from '@xylabs/react-error'\nimport { FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport type {\n DappAccessRequest, RegisteredDappAccess, XyOsContext,\n} from '@xyo-network/os-model'\nimport { RegisteredNames } from '@xyo-network/os-model'\nimport { AccessNodeQueries } from '@xyo-network/os-runtime'\nimport React, { useState } from 'react'\n\nexport interface AccessDialogProps extends DialogProps {\n accessRequest?: DappAccessRequest\n dappNode?: XyOsContext | null\n registeredDappAccess?: RegisteredDappAccess\n}\n\nexport const DappAccessDialog: React.FC<AccessDialogProps> = ({\n accessRequest, children, dappNode, registeredDappAccess, ...props\n}) => {\n const [error, setError] = useState<Error>()\n const [noPayloadsInserted, setNoPayloadsInserted] = useState(false)\n\n const onClose = () => {\n setNoPayloadsInserted(false)\n props.onClose?.({}, 'escapeKeyDown')\n }\n\n const handleAllow = () => {\n if (accessRequest && registeredDappAccess && dappNode) {\n try {\n switch (registeredDappAccess.name) {\n case RegisteredNames: {\n const accessNodeQueries = new AccessNodeQueries(dappNode, accessRequest, registeredDappAccess)\n accessNodeQueries.run().then((payloads) => {\n if (payloads.length === 0) {\n setNoPayloadsInserted(true)\n } else {\n onClose()\n }\n return\n }).catch((e) => {\n setError(e as Error)\n })\n break\n }\n default: {\n const message = `no helper for interface ${registeredDappAccess.name} found`\n console.error(message)\n setError(new Error(message))\n }\n }\n } catch (e) {\n console.error(e)\n setError(e as Error)\n }\n } else {\n setError(new Error('No registered dapp access or dappNode found'))\n }\n }\n\n return (\n <Dialog {...props}>\n <DialogTitle>Message from XYO OS</DialogTitle>\n <DialogContent\n dividers\n sx={{\n display: 'flex', flexDirection: 'column', gap: 3,\n }}\n >\n <ErrorRender error={error} scope=\"DappAccessDialog\" />\n <FlexCol gap={1}>\n <Typography variant=\"subtitle2\">dApp to dApp Access Request</Typography>\n <FlexRow gap={1}>\n <Typography fontSize={16}>\n <strong>{accessRequest?.requestingDappId}</strong>\n \n </Typography>\n <ArrowForward />\n <Typography fontSize={16}>\n <strong>{registeredDappAccess?.registeringDappId}</strong>\n </Typography>\n </FlexRow>\n </FlexCol>\n </DialogContent>\n <DialogContent\n dividers\n sx={{\n display: 'flex', flexDirection: 'column', gap: 3,\n }}\n >\n <FlexCol gap={1}>\n <Typography>\n <strong>{accessRequest?.requestingDappId}</strong>\n {' '}\n dApp would like to access your\n <strong>{registeredDappAccess?.name}</strong>\n {' '}\n from\n {' '}\n <strong>{registeredDappAccess?.registeringDappId}</strong>\n {' '}\n dApp\n </Typography>\n </FlexCol>\n {noPayloadsInserted\n ? (\n <Alert severity=\"warning\">\n {registeredDappAccess?.name}\n {' '}\n Access Request did not find payloads to insert\n </Alert>\n )\n : null}\n </DialogContent>\n {children\n ? <DialogContent dividers>{children}</DialogContent>\n : null}\n <DialogActions>\n <Button variant=\"outlined\" onClick={onClose}>\n Cancel\n </Button>\n <Button variant=\"contained\" onClick={handleAllow}>\n Allow\n </Button>\n </DialogActions>\n </Dialog>\n )\n}\n","import { ErrorRender } from '@xylabs/react-error'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport React from 'react'\n\nimport { useDialogState } from '../hooks/index.ts'\nimport { DappAccessDialog } from './Dialog.js'\n\nexport interface DappAccessFlexboxProps {\n context?: XyOsContext | null\n}\n\nexport const DappAccessFlexbox: React.FC<DappAccessFlexboxProps> = ({ context }) => {\n const {\n accessRequests, allowAccessDialogError, openAccessDialog, registeredInterface, setOpenAccessDialog,\n } = useDialogState(context)\n return (\n <DappAccessDialog\n accessRequest={accessRequests?.[0]}\n dappNode={context}\n open={openAccessDialog}\n onClose={() => setOpenAccessDialog(false)}\n registeredDappAccess={registeredInterface}\n >\n {allowAccessDialogError\n ? <ErrorRender error={allowAccessDialogError} scope=\"DappAccessFlexbox\" />\n : null}\n </DappAccessDialog>\n )\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { RegisteredDappAccess, XyOsContext } from '@xyo-network/os-model'\nimport { isRegisteredDappAccess, RegisteredNames } from '@xyo-network/os-model'\nimport { useState } from 'react'\n\nimport { DappAccessRequestResourceHooks } from '../../../../access-requests/index.ts'\nimport { useDappCaller } from '../../../useDappCaller.ts'\n\nexport const useDialogState = (context?: XyOsContext | null) => {\n const dappCaller = useDappCaller()\n const { accessRequests } = DappAccessRequestResourceHooks.resourceViewsFromContext(context)\n const [openAccessDialog, setOpenAccessDialog] = useState(false)\n const [registeredInterface, setRegisteredInterface] = useState<RegisteredDappAccess>()\n\n const [, allowAccessDialogError] = usePromise(async () => {\n const accessRequest = accessRequests?.[0]\n if (accessRequest && context && dappCaller) {\n setOpenAccessDialog(true)\n const payload = await dappCaller.getRegisteredDappAccessByName(RegisteredNames)\n\n setRegisteredInterface(isRegisteredDappAccess(payload) ? payload : undefined)\n }\n }, [accessRequests, dappCaller, context])\n\n return {\n accessRequests, allowAccessDialogError, openAccessDialog, registeredInterface, setOpenAccessDialog,\n }\n}\n","import type { XyOsContext } from '@xyo-network/os-model'\nimport { DappCaller } from '@xyo-network/os-runtime'\nimport { useMemo } from 'react'\n\nimport { useXyOsUiContext } from '../XyOsUi/index.ts'\n\nexport const useDappCaller = (context?: XyOsContext | null) => {\n const xyOs = useXyOsUiContext()\n\n return useMemo(() => {\n const resolvedContext = context ?? xyOs\n if (resolvedContext) {\n return new DappCaller(resolvedContext)\n }\n }, [context, xyOs])\n}\n","/* eslint-disable @typescript-eslint/no-misused-promises */\nimport {\n BugReport,\n CloseRounded,\n RemoveRounded,\n} from '@mui/icons-material'\nimport type { AppBarProps } from '@mui/material'\nimport {\n AppBar, Box, Divider, IconButton, Toolbar, Tooltip, Typography,\n} from '@mui/material'\nimport { FlexGrowRow } from '@xylabs/react-flexbox'\nimport { ColorSchemeButton } from '@xylabs/react-theme'\nimport type {\n DappName, DappVersion, XyOsContext,\n} from '@xyo-network/os-model'\nimport { DappIntentTypes } from '@xyo-network/os-model'\nimport { DappIntentCaller } from '@xyo-network/os-runtime'\nimport React from 'react'\n\nimport { useSendDappIntent } from '../../../intent/index.ts'\nimport { DebugDialogWithNode } from '../../Debug/index.ts'\nimport { useDebugClick } from './hooks/index.ts'\n\nexport interface DappBarProps extends AppBarProps {\n context?: XyOsContext | null\n name?: DappName\n simplifiedAppBar?: boolean\n version?: DappVersion\n}\n\nexport const EmptyDappBarForPadding: React.FC<DappBarProps> = (props) => {\n return (\n <AppBar\n color=\"primary\"\n sx={{ flexDirection: 'row' }}\n component=\"div\"\n position=\"fixed\"\n {...props}\n >\n </AppBar>\n )\n}\n\nexport const DappBar: React.FC<DappBarProps> = ({\n title, context, name, ...props\n}) => {\n const sendIntent = useSendDappIntent()\n\n const {\n closeDebug, debugOpen, openDebug,\n } = useDebugClick()\n\n return (\n <AppBar\n elevation={0}\n color=\"transparent\"\n sx={{ backgroundColor: 'transparent', flexDirection: 'row' }}\n component=\"div\"\n position=\"sticky\"\n {...props}\n >\n <Toolbar\n disableGutters\n sx={{ paddingX: 2 }}\n >\n <Typography noWrap variant=\"h6\" letterSpacing=\"-1px\">\n {title}\n </Typography>\n </Toolbar>\n <FlexGrowRow />\n <Toolbar\n disableGutters\n sx={{ paddingX: 2 }}\n >\n <IconButton\n onClick={openDebug}\n sx={{ display: { md: 'none', xs: 'flex' } }}\n >\n <BugReport />\n </IconButton>\n <Tooltip\n title=\"Toggle Light/Dark Mode\"\n sx={{ display: { md: 'none', xs: 'flex' } }}\n >\n <Box>\n <ColorSchemeButton />\n </Box>\n </Tooltip>\n <Divider\n orientation=\"vertical\"\n flexItem\n sx={{\n display: { md: 'none', xs: 'flex' },\n m: 1,\n }}\n />\n <Tooltip title=\"Minimize\">\n <IconButton\n onClick={async () => await sendIntent?.(DappIntentCaller.buildIntent(DappIntentCaller.OsDappName, DappIntentTypes.Minimize, name))}\n >\n <RemoveRounded htmlColor=\"inherit\" />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"Close\">\n <IconButton\n onClick={async () => await sendIntent?.(DappIntentCaller.buildIntent(DappIntentCaller.OsDappName, DappIntentTypes.Close, name))}\n >\n <CloseRounded htmlColor=\"inherit\" />\n </IconButton>\n </Tooltip>\n </Toolbar>\n <DebugDialogWithNode closeDebug={closeDebug} debugOpen={debugOpen} context={context} />\n </AppBar>\n )\n}\n","import type { DialogProps } from '@mui/material'\nimport {\n Dialog, DialogActions, DialogContent,\n} from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport { NodeProvider } from '@xyo-network/react-node'\nimport React, { lazy, Suspense } from 'react'\n\nconst Debug = lazy(() => import(/* webpackChunkName: \"Debug\" */ '@xyo-network/os-react-debug'))\n\nexport interface DebugDialogProps extends Omit<DialogProps, 'open'> {\n closeDebug: () => void\n debugOpen: boolean\n}\n\nexport const LazyDebug = () => (\n <Suspense fallback={<FlexCol />}>\n <FlexCol />\n <Debug height=\"100%\" />\n </Suspense>\n)\n\nexport const DebugDialog: React.FC<DebugDialogProps> = ({\n closeDebug, debugOpen, ...props\n}) => {\n return (\n <Dialog open={debugOpen} onClose={closeDebug} fullScreen {...props}>\n <DialogContent>\n <LazyDebug />\n </DialogContent>\n <DialogActions>\n <ButtonEx variant=\"outlined\" onClick={closeDebug}>\n Close\n </ButtonEx>\n </DialogActions>\n </Dialog>\n )\n}\n\nexport interface DebugDialogWithNodeProps extends DebugDialogProps {\n context: XyOsContext | undefined | null\n}\n\nexport const DebugDialogWithNode: React.FC<DebugDialogWithNodeProps> = ({\n closeDebug, debugOpen, context, ...props\n}) => {\n return (\n <NodeProvider node={context?.root}>\n <DebugDialog closeDebug={closeDebug} debugOpen={debugOpen} {...props} />\n </NodeProvider>\n )\n}\n","import { NameTransforms } from '@xyo-network/os-runtime'\n\nexport const DappPathHelpers = {\n // update the url based off the path\n deriveDestinationPath(path: string, defaultPath: string | undefined, dappName?: string) {\n const rootPath = `/${new NameTransforms(dappName ?? '').slug()}`\n const nestedPath = `${rootPath}/${path}`\n return path === defaultPath ? rootPath : nestedPath\n },\n // derive the path for the nav selection\n derivePathForNavSelection(newPath?: string, currentPath?: string, defaultPath?: string) {\n let derivedPath: string | undefined\n\n // If the path is not set, set it to the default path\n if (newPath === undefined && defaultPath) {\n derivedPath = defaultPath\n }\n\n // If the path has changed, update the selection (the back button case where onPathChanged was not called)\n if (newPath && currentPath !== newPath) {\n derivedPath = newPath\n }\n return derivedPath\n },\n // detect duplicate nav selections\n detectDuplicateSelections(lastSavedPath?: string, path?: string, defaultPath?: string) {\n // If the path is the default path and the current path ref is empty, then we are already at the default path\n const selectedDefaultPathAgain = path === defaultPath && lastSavedPath === ''\n // If the path is the same as the last seen path, then we don't need to navigate\n const pathIsUnchanged = lastSavedPath === path\n\n return selectedDefaultPathAgain || pathIsUnchanged\n },\n}\n","export const CustomerParams = [\n { key: 'utm_source', value: 'coin' },\n {\n key: 'receipt', matches: '*', value: 'receiptHash',\n },\n]\n\nexport const detectCustomer = () => {\n return CustomerParams.find((customerParamSet) => {\n const searchParams = new URLSearchParams(globalThis.location.search)\n const searchParamValue = searchParams.get(customerParamSet.key)\n\n // if the customerParamSet.key is present and matches in *, we don't care about the value\n if (searchParams.has(customerParamSet.key) && customerParamSet.matches === '*') {\n return true\n }\n\n // if the customerParamSet.value is defined, we care if the key is present and the value matches\n return searchParamValue && searchParamValue === customerParamSet.value\n })\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { Payload } from '@xyo-network/payload-model'\n\nimport { useXyOsUiContext } from '../../../../../XyOsUi/index.ts'\nimport { DappMenuResourceHooks } from './useBuildDappMenuResource.ts'\nimport { useDappMenuCaller } from './useDappMenuCaller.ts'\n\nexport const useAddDappMenuItems = (payloads: Payload[]) => {\n const xyOs = useXyOsUiContext()\n const {\n menuItemSelections, menuConfigs, resourceError,\n } = DappMenuResourceHooks.resourceViewsFromContext(xyOs)\n const dappMenuCaller = useDappMenuCaller()\n\n const [, addMenuItemsError] = usePromise(async () => {\n await dappMenuCaller?.add(payloads)\n }, [payloads, dappMenuCaller])\n\n return {\n addMenuItemsError,\n menuConfig: menuConfigs?.[0],\n path: menuItemSelections?.[0],\n error: resourceError,\n }\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport type { DappMenuResourceViews } from '@xyo-network/os-runtime'\nimport { DappMenuResource } from '@xyo-network/os-runtime'\n\nimport {\n ResourceHooks, useCleanUpResource, useSyncExternalPayloadStore,\n} from '../../../../../resource/index.ts'\n\nexport const useBuildDappMenuResource = (xyOsContext?: XyOsContext | null) => {\n const resource = usePromise(async () => {\n if (xyOsContext) {\n const resource = new DappMenuResource(xyOsContext)\n await resource.start()\n return resource\n }\n }, [xyOsContext])\n\n useCleanUpResource(resource[0])\n\n return resource\n}\n\nexport const useMenuResourceViews = (resource?: DappMenuResource) => {\n const menuItemSelections = useSyncExternalPayloadStore('menuItemSelections', resource)\n const menuConfigs = useSyncExternalPayloadStore('menuConfigs', resource)\n const menuItems = useSyncExternalPayloadStore('menuItems', resource)\n const menuItemsVisible = useSyncExternalPayloadStore('menuItemsVisible', resource)\n\n return {\n menuConfigs,\n menuItemSelections,\n menuItems,\n menuItemsVisible,\n resource,\n }\n}\n\nexport const DappMenuResourceHooks = new ResourceHooks<DappMenuResourceViews, DappMenuResource>(useBuildDappMenuResource, useMenuResourceViews)\n","import { assertEx } from '@xylabs/sdk-js'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport { DappMenuCaller } from '@xyo-network/os-runtime'\nimport { useMemo } from 'react'\n\nimport { useXyOsUiContext } from '../../../../../XyOsUi/index.ts'\n\ninterface DappMenuCallerHookOptions {\n ignoreProvidedNode?: boolean\n}\n\nexport const useDappMenuCaller = (context?: XyOsContext | null, { ignoreProvidedNode }: DappMenuCallerHookOptions = {}) => {\n const xyOs = useXyOsUiContext()\n\n return useMemo(() => {\n const resolvedProvidedNode = ignoreProvidedNode ? null : xyOs\n if (context || resolvedProvidedNode) {\n const finalContext = assertEx(context ?? xyOs, () => 'no node was found in context or passed as argument')\n return new DappMenuCaller(finalContext)\n }\n }, [ignoreProvidedNode, context, xyOs])\n}\n","import type { DappName, XyOsContext } from '@xyo-network/os-model'\nimport {\n useEffect, useRef, useState,\n} from 'react'\nimport { useNavigate, useParams } from 'react-router-dom'\n\nimport type { DappMenuProperties } from '../../types/index.ts'\nimport { DappPathHelpers } from '../lib/index.ts'\nimport { useDappMenuDependencies } from './useDappMenuDependencies.ts'\n\n/**\n * Use the passed in dapp Node to resolve menu related modules and return the menu related items\n */\n\nexport const useDappMenu = (context?: XyOsContext | null, dappName?: DappName): DappMenuProperties => {\n const [error, setError] = useState<Error>()\n const params = useParams()\n const navigate = useNavigate()\n const {\n defaultPath, menuConfigs, menuItemsVisible, menuSelection, resourceError,\n } = useDappMenuDependencies(context)\n const activePath = menuSelection ?? defaultPath\n\n // Keep track of the current path\n // If links are clicked within a dapp, the path will change so we need to keep track of it\n const currentPathRef = useRef<string>(undefined)\n\n // Initialize the current path\n useEffect(() => {\n if (params && currentPathRef.current === undefined) {\n currentPathRef.current = params.path ?? ''\n }\n }, [])\n\n // Reset the current path when the dappNode goes away (e.g. when the dapp is closed)\n useEffect(() => {\n if (context === null) {\n currentPathRef.current = undefined\n }\n }, [context])\n\n // Update the current path when new menuSelections are made without invoking onPathChange (i.e. clicking link within a dapp)\n useEffect(() => {\n if (menuSelection) {\n currentPathRef.current = menuSelection\n }\n }, [menuSelection])\n\n useEffect(() => {\n if (resourceError) {\n const timeoutId = setTimeout(() => setError(resourceError), 0)\n return () => clearTimeout(timeoutId)\n }\n }, [resourceError])\n\n // Callback to invoke when the path changes. Main purpose is the keep the url in sync with the menu selection\n const onPathChange = (path: string) => {\n const pathIsInUnchanged = DappPathHelpers.detectDuplicateSelections(currentPathRef.current, path, defaultPath)\n if (pathIsInUnchanged) return\n\n // navigate to the new path so listeners on the route can react\n const destinationPath = DappPathHelpers.deriveDestinationPath(path, defaultPath, dappName)\n void navigate(destinationPath)\n currentPathRef.current = path\n }\n\n return {\n activePath,\n error,\n menuConfig: menuConfigs?.[0],\n menuItems: menuItemsVisible,\n onPathChange,\n }\n}\n","import type { XyOsContext } from '@xyo-network/os-model'\nimport { useMemo } from 'react'\n\nimport { DappMenuResourceHooks } from './useBuildDappMenuResource.ts'\n\nexport const useDappMenuDependencies = (context?: XyOsContext | null) => {\n const {\n menuConfigs, menuItemSelections, menuItemsVisible, resourceError,\n } = DappMenuResourceHooks.resourceViewsFromContext(context)\n const defaultPath = useMemo(() => menuConfigs?.[0]?.defaultPath, [menuConfigs])\n const menuSelection = menuItemSelections?.[0]?.path\n\n return {\n defaultPath, menuConfigs, menuItemsVisible, menuSelection, resourceError,\n }\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { assertEx, findAs } from '@xylabs/sdk-js'\nimport type { ArchivistInstance, ArchivistModuleEventData } from '@xyo-network/archivist-model'\nimport { asArchivistInstance } from '@xyo-network/archivist-model'\nimport { asOptionalDappInjectableParams, type XyOsContext } from '@xyo-network/os-model'\nimport { DappCaller } from '@xyo-network/os-runtime'\nimport { useNavigate, useSearchParams } from 'react-router-dom'\n\n/** Update the dapp archivist with injectable params based off changes in the query params */\nexport const useManageDappInjectableParamsFromRoute = (context?: XyOsContext | null) => {\n const [queryParams] = useSearchParams()\n const navigate = useNavigate()\n\n const [, callerError] = usePromise(async () => {\n if (context && queryParams) {\n const dappCaller = new DappCaller(context)\n const pathname = globalThis.location.pathname\n await dappCaller.setDappInjectableRouteParams(queryParams, pathname)\n }\n }, [context, queryParams])\n\n // Update the route if the dapp inserts a new injectable params payload and the path is different\n const [, listenerError] = usePromise(async () => {\n let archivist: ArchivistInstance | undefined\n const listener = ({ payloads }: ArchivistModuleEventData['inserted']) => {\n const injectableParams = findAs(payloads, asOptionalDappInjectableParams)\n if (injectableParams && context) {\n const pathname = globalThis.location.pathname\n if (pathname !== injectableParams.path) {\n void navigate(injectableParams.path)\n }\n }\n }\n\n try {\n if (context) {\n const mod = assertEx(await context?.root.resolve('DappArchivist'), () => 'DappArchivist not found')\n archivist = asArchivistInstance(mod, () => 'DappArchivist not is not an Archivist', { required: true })\n\n archivist.on('inserted', listener)\n }\n } catch (e) {\n console.error(e)\n throw e\n }\n\n return () => {\n archivist?.off('inserted', listener)\n }\n // disabling because navigate reference changes unnecessarily for this use case\n // see - https://stackoverflow.com/a/75329664/2803259\n }, [context])\n\n return [callerError, listenerError]\n}\n","import { useAtomicPromise, usePromise } from '@xylabs/react-promise'\nimport { findAs } from '@xylabs/sdk-js'\nimport type { ArchivistInstance, ArchivistModuleEventData } from '@xyo-network/archivist-model'\nimport type {\n DappId, DappIntent, XyOsContext,\n} from '@xyo-network/os-model'\nimport { asOptionalDappIntent, DappIntentTypes } from '@xyo-network/os-model'\nimport { DappIntentCaller } from '@xyo-network/os-runtime'\nimport { useEffect, useState } from 'react'\n\nimport { useSendDappIntent } from '../../../../../../intent/index.ts'\nimport { useDappCaller } from '../../../../../useDappCaller.ts'\n\n// React to new intents inserted into the dapp archivist\nexport const useManageDappIntentRequest = (context?: XyOsContext | null, dappId?: DappId) => {\n const dappCaller = useDappCaller(context)\n const sendIntent = useSendDappIntent()\n const [intentPayload, setIntentPayload] = useState<DappIntent>()\n const [handleIntentError, setHandleIntentError] = useState<Error>()\n const [dappArchivist, setDappArchivist] = useState<ArchivistInstance>()\n\n usePromise(async () => {\n if (context && dappCaller) {\n const archivist = await dappCaller.getDappArchivist()\n if (archivist) setDappArchivist(archivist)\n }\n }, [context, dappCaller])\n\n useAtomicPromise(\n 'manageDappIntent',\n async () => {\n if (context && intentPayload?.targetDappId && dappId && sendIntent) {\n try {\n const minimizeIntent = DappIntentCaller.buildIntent(DappIntentCaller.OsDappName, DappIntentTypes.Minimize, dappId)\n await sendIntent(minimizeIntent)\n await sendIntent(intentPayload)\n } catch (e) {\n console.error(e)\n setHandleIntentError(e as Error)\n }\n setIntentPayload(undefined)\n }\n },\n [context, dappId, intentPayload, sendIntent],\n )\n\n useEffect(() => {\n // catch the intent sent by the dapp and mirror it inside the os intent archivist\n const listener = ({ payloads }: ArchivistModuleEventData['inserted']) => {\n // only dapps with an active context should react to the new intents\n if (context) {\n const intentPayload = findAs(payloads, asOptionalDappIntent)\n if (intentPayload) {\n setIntentPayload(intentPayload)\n }\n }\n }\n dappArchivist?.off('inserted', listener)\n if (dappArchivist && context) {\n dappArchivist.on('inserted', listener)\n }\n return () => {\n dappArchivist?.off('inserted', listener)\n }\n }, [context, dappArchivist])\n\n return handleIntentError\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport {\n useCallback, useEffect, useRef,\n} from 'react'\nimport { useNavigate, useParams } from 'react-router-dom'\n\nimport { DappPathHelpers } from '../../lib/index.ts'\nimport { useDappMenuCaller, useDappMenuDependencies } from '../../menu/index.ts'\n\n/**\n * Update the menu archivist based off changes in the the `path` route param\n *\n * Test Cases:\n *\n * 1. Clicking sidebar menu\n * 2. Clicking sidebar menu twice\n * 3. Navigating directly to a path on dApp load\n * 4. Navigating directly to a path from within the dApp by clicking a link\n * 5. Navigating directly to a path from within the dApp by clicking back\n */\n\n/** React to changes in the `path` route param */\nexport const useManageDappPathFromRoute = (context?: XyOsContext | null, dappName?: string) => {\n const params = useParams()\n const { path: pathParam } = params\n const dappMenuCaller = useDappMenuCaller(context, { ignoreProvidedNode: true })\n const { menuSelection, defaultPath } = useDappMenuDependencies(context)\n const navigate = useNavigate()\n\n // keep track of the current path and avoid making pathParam a dependency\n const currentPathRef = useRef<string>(undefined)\n\n // Update the menu archivist based off the params\n const updateMenuArchivist = useCallback(\n async (pathParam?: string) => {\n currentPathRef.current = pathParam\n // ensure the dappNode is active before updating the menu\n if (context && dappMenuCaller) {\n const currentPath = await dappMenuCaller?.currentNavSelection()\n const updatedPath = DappPathHelpers.derivePathForNavSelection(pathParam, currentPath?.[0]?.path, defaultPath)\n\n if (updatedPath) {\n await dappMenuCaller.makeNavItemSelection(updatedPath)\n }\n }\n },\n [dappMenuCaller, context, defaultPath],\n )\n\n // Sync the route when the menu archivist updates (no pathParam dependency)\n useEffect(() => {\n if (context && menuSelection) {\n const pathIsInUnchanged = DappPathHelpers.detectDuplicateSelections(currentPathRef.current ?? '', menuSelection, defaultPath)\n if (pathIsInUnchanged) return\n\n // navigate to the new path so listeners on the route can react\n const destinationPath = DappPathHelpers.deriveDestinationPath(menuSelection, defaultPath, dappName)\n void navigate(destinationPath)\n currentPathRef.current = menuSelection === defaultPath ? undefined : menuSelection\n }\n // disabling because navigate reference changes unnecessarily for this use case\n // see - https://stackoverflow.com/a/75329664/2803259\n }, [dappName, context, defaultPath, menuSelection])\n\n // Sync the menu archivist when the route changes (no menuSelection dependency)\n const [, updateErrors] = usePromise(async () => {\n if (context && pathParam !== currentPathRef.current) {\n await updateMenuArchivist(pathParam)\n currentPathRef.current = pathParam\n }\n }, [context, pathParam, updateMenuArchivist])\n\n return updateErrors\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { DappIntent } from '@xyo-network/os-model'\nimport { DappIntentTypes } from '@xyo-network/os-model'\nimport { DappIntentCaller, NameTransforms } from '@xyo-network/os-runtime'\nimport { useRef } from 'react'\nimport { useParams } from 'react-router-dom'\n\nimport { useDappIntentCaller, useSendDappIntent } from '../../../../../../intent/index.ts'\n\n/** Launch or close the dapp based off changes to the `dappName` route param */\nexport const useManageDappStateFromRoute = (intentPayload?: DappIntent) => {\n const params = useParams()\n const { dappName: dappNameParam } = params\n const sendIntent = useSendDappIntent()\n const intentCaller = useDappIntentCaller()\n\n // refs to track the dappName param and the last intent sent\n const dappNameParamRef = useRef<string>(undefined)\n const intentRef = useRef<DappIntent>(undefined)\n\n // auto-close the dapp if it was launched and the route param goes undefined (i.e. back button clicked)\n usePromise(async () => {\n const launched = intentPayload?.intent === DappIntentTypes.Launch\n const dappNameParamRemoved = !!dappNameParamRef.current && dappNameParam === undefined\n // The last intent was Launch and the dappName param was removed\n if (launched && dappNameParamRemoved && sendIntent) {\n const closeIntent = DappIntentCaller.buildIntent(DappIntentCaller.OsDappName, DappIntentTypes.Close)\n await sendIntent(closeIntent)\n }\n\n // sync back the dappNameParamRef for future checks\n dappNameParamRef.current = dappNameParam\n }, [dappNameParam, intentPayload, sendIntent])\n\n // auto-launch the dapp if the route param matches the dapp name\n usePromise(async () => {\n if (dappNameParam && sendIntent && intentCaller) {\n const dappNameParamDeSlugged = new NameTransforms(dappNameParam).deSlug()\n // no intents have been sent yet and the dappName param is set so we need to auto launch the dapp\n const autoLaunchNeeded = intentRef.current === undefined && dappNameParam\n\n if (autoLaunchNeeded) {\n const launchIntent = DappIntentCaller.buildIntent(DappIntentCaller.OsDappName, DappIntentTypes.Launch, dappNameParamDeSlugged)\n await sendIntent(launchIntent)\n // sync back the intentRef to ensure the auto launch only happens once\n intentRef.current = launchIntent\n return\n }\n }\n }, [dappNameParam, sendIntent, intentCaller, intentPayload?.intent])\n}\n","import {\n useCallback, useEffect, useRef, useState,\n} from 'react'\nimport { useNavigate, useSearchParams } from 'react-router-dom'\n\nexport const useDebugClick = () => {\n const [params, setParams] = useSearchParams()\n const [debugOpen, setDebugOpen] = useState(false)\n const openFromClick = useRef(false)\n const closeFromClick = useRef(false)\n const initialized = useRef(false)\n const navigate = useNavigate()\n\n const openDebug = useCallback(() => {\n openFromClick.current = true\n closeFromClick.current = false\n setParams((params) => {\n params.set('debug', 'true')\n return new URLSearchParams(params)\n })\n setDebugOpen(true)\n }, [setParams])\n\n const closeDebug = useCallback(() => {\n openFromClick.current = false\n closeFromClick.current = true\n initialized.current = false\n void navigate(-1)\n setDebugOpen(false)\n }, [navigate])\n\n // Auto Open Logic (on forward click) - not working\n // useEffect(() => {\n // // Was closed, open wasn't clicked, and debug is in the query params\n // const openedFromRoute = !openFromClick.current && !closeFromClick.current && params.has('debug')\n // if (openedFromRoute) {\n // // openDebug()\n // }\n // }, [openDebug, params])\n\n // Auto Close Logic (on back click)\n useEffect(() => {\n // Was opened, close wasn't clicked, and debug is in the query params\n const initialOpen = openFromClick.current && !closeFromClick.current && params.has('debug')\n // Was opened, close wasn't clicked, and debug is missing in the query params\n const backButtonClicked = openFromClick.current && !closeFromClick.current && !params.has('debug')\n if (initialOpen) {\n // using the ref to avoid setting debugOpen to false on the first render\n if (initialized.current === false) {\n initialized.current = true\n }\n } else if (backButtonClicked) {\n initialized.current = false\n closeDebug()\n }\n }, [params, closeDebug])\n\n return {\n closeDebug, debugOpen, openDebug,\n }\n}\n","import type { RegisteredReactDapp } from '@xyo-network/os-react-model'\nimport { useMemo } from 'react'\n\nimport { NodeManifest } from '../NodeManifest.tsx'\n\nexport const useDecomposeDapp = (dapp?: RegisteredReactDapp) => {\n const DappComponent = useMemo(() => dapp?.params.modes?.window?.component ?? NodeManifest, []) as React.FC<{\n name?: string\n }>\n const name = dapp?.config.name\n const version = dapp?.config.version\n const scrollable = dapp?.params.modes?.window?.scrollable ?? true\n\n return {\n DappComponent,\n dapp,\n name,\n scrollable,\n version,\n }\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { useProvidedNode } from '@xyo-network/react-node'\nimport React from 'react'\n\nexport const NodeManifest = () => {\n const [node] = useProvidedNode()\n const [nodeManifest] = usePromise(async () => await node?.manifest(3), [node])\n\n return (\n <>\n {node\n ? <pre>{JSON.stringify(nodeManifest, null, 2)}</pre>\n : null}\n </>\n )\n}\n","import { useXyOsUiContext } from '../../../../XyOsUi/index.ts'\n\nexport const useExposedNode = () => {\n const xyOS = useXyOsUiContext()\n return xyOS?.exposedNode\n}\n","import { useMemo } from 'react'\nimport { useSearchParams } from 'react-router-dom'\n\nimport { detectCustomer } from './lib/index.ts'\n\nconst PARAMS_TO_TARGET = ['username', 'utm_source'] as const\n\nexport const useSkipLoadingScreen = () => {\n const [params] = useSearchParams()\n const customer = detectCustomer()\n return useMemo(() => {\n const hasTargetParams = PARAMS_TO_TARGET.some(param => params.has(param))\n const isCustomer = !!customer\n\n return hasTargetParams || isCustomer\n }, [customer, params])\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { ArchivistModuleEventData } from '@xyo-network/archivist-model'\nimport type { XyOsContext } from '@xyo-network/os-model'\nimport { useWeakArchivistFromNode } from '@xyo-network/react-archivist'\n\nimport { useDappCaller } from '../../../useDappCaller.ts'\n\n/**\n * Syncs the registered access interfaces from the Os with the DappArchivist\n * @param dappNode The dapp node\n */\nexport const useSyncOsRegisteredAccessInterfaces = (context?: XyOsContext | null) => {\n const [registeredInterfacesArchivist] = useWeakArchivistFromNode('RegisteredDappInterfacesArchivist')\n const dappCaller = useDappCaller(context)\n\n usePromise(async () => {\n const listener = async ({ payloads }: ArchivistModuleEventData['inserted']) => {\n if (context && dappCaller) {\n await dappCaller.addPayloadsToDappArchivist(payloads)\n }\n }\n if (context && dappCaller) {\n // Add all registered interfaces to the dapp archivist\n const registeredInterfaces = await registeredInterfacesArchivist?.deref()?.all()\n if (registeredInterfaces) {\n await dappCaller.addPayloadsToDappArchivist(registeredInterfaces)\n }\n // Listen for new interfaces and add them to the dapp archivist\n registeredInterfacesArchivist?.deref()?.on('inserted', listener)\n }\n\n return () => {\n registeredInterfacesArchivist?.deref()?.off('inserted', listener)\n }\n }, [dappCaller, context, registeredInterfacesArchivist])\n}\n","import type { Theme } from '@mui/material'\nimport { useMediaQuery } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport {\n FlexCol, FlexGrowCol, FlexRow,\n} from '@xylabs/react-flexbox'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nexport interface DappChromeBaseProps extends FlexBoxProps {\n appBar?: ReactNode\n children?: ReactNode\n screenMenu?: ReactNode\n splashScreen?: ReactNode\n}\n\nexport interface DappChromeProps extends DappChromeBaseProps {\n largeScreenMenu?: ReactNode\n smallScreenMenu?: ReactNode\n}\n\nconst DappChromeSmall: React.FC<DappChromeBaseProps> = ({\n appBar, children, screenMenu, splashScreen, ...props\n}) => {\n return (\n <FlexCol alignItems=\"stretch\" id=\"dapp-chrome-container-small\" {...props}>\n {splashScreen}\n <FlexGrowCol\n alignItems=\"stretch\"\n id=\"dapp-chrome-small\"\n justifyContent=\"start\"\n sx={{ background: (theme: Theme) => theme.vars?.palette.background.default }}\n >\n {appBar}\n <FlexGrowCol\n sx={{ overflowY: 'auto' }}\n alignItems=\"stretch\"\n >\n {children}\n </FlexGrowCol>\n {screenMenu}\n </FlexGrowCol>\n </FlexCol>\n )\n}\n\nexport const DappChromeLarge: React.FC<DappChromeBaseProps> = ({\n appBar, children, screenMenu, splashScreen, ...props\n}) => {\n return (\n <FlexRow alignItems=\"stretch\" id=\"dapp-chrome-container-large\" {...props}>\n {splashScreen}\n {screenMenu}\n <FlexGrowCol\n alignItems=\"stretch\"\n id=\"dapp-chrome-large\"\n justifyContent=\"start\"\n sx={{ background: (theme: Theme) => theme.vars?.palette.background.default }}\n >\n {appBar}\n <FlexGrowCol\n sx={{ overflowY: 'auto' }}\n alignItems=\"stretch\"\n justifyContent=\"flex-start\"\n >\n {children}\n </FlexGrowCol>\n </FlexGrowCol>\n </FlexRow>\n )\n}\n\nexport const DappChrome: React.FC<DappChromeProps> = ({\n largeScreenMenu, smallScreenMenu, ...props\n}) => {\n const isMedium = useMediaQuery((theme: Theme) => theme.breakpoints.up('md'))\n\n return isMedium ? <DappChromeLarge screenMenu={largeScreenMenu} {...props} /> : <DappChromeSmall screenMenu={smallScreenMenu} {...props} />\n}\n","import {\n Card, CardContent, Chip, Container, Divider, Typography, useTheme,\n} from '@mui/material'\nimport { FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'\nimport { alphaCss } from '@xylabs/react-theme'\nimport type { DappName, DappVersion } from '@xyo-network/os-model'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport { InstallButtonSection } from './InstallButtonSection.js'\nimport { SummarySection } from './SummarySection.js'\n\nexport interface DefaultComingSoonProps extends PropsWithChildren {\n children?: React.ReactNode\n dappIconSvg?: string\n desc?: string[]\n developerLink?: string\n name?: DappName\n version?: DappVersion\n}\n\nconst defaultDescription = ['Description coming soon!']\n\nexport const DefaultComingSoon: React.FC<DefaultComingSoonProps> = ({\n children,\n desc = defaultDescription,\n developerLink = 'https://xylabs.com',\n name,\n dappIconSvg,\n version,\n}) => {\n const theme = useTheme()\n\n return (\n <Container\n maxWidth=\"md\"\n sx={{\n minHeight: '100%', overflow: 'auto', paddingTop: 2, width: '100%',\n }}\n >\n {version\n ? null\n : (\n <FlexRow width=\"100%\" paddingBottom={2}>\n <Chip\n label=\"This app is not yet publicly available on xyOS\"\n sx={{\n backgroundColor: alphaCss(theme.vars?.palette.info.main ?? '#000', 0.2), color: theme.vars?.palette.info.main, width: '100%',\n }}\n >\n </Chip>\n </FlexRow>\n )}\n <FlexGrowCol width=\"100%\" alignItems=\"flex-start\" minHeight=\"100%\">\n <FlexGrowCol width=\"100%\" alignItems=\"stretch\" justifyContent=\"flex-start\" gap={2}>\n <SummarySection dappIconSvg={dappIconSvg} name={name} version={version} developerLink={developerLink} />\n <InstallButtonSection />\n <Divider flexItem />\n <Card>\n <CardContent>\n <FlexGrowCol justifyContent=\"flex-start\" alignItems=\"flex-start\">\n <Typography variant=\"h6\" gutterBottom>\n Learn more about\n {' '}\n {name}\n </Typography>\n {desc?.map((paragraph: string, index: number) => {\n return (\n <Typography gutterBottom paddingBottom={1} key={index} variant=\"body1\">\n {paragraph}\n </Typography>\n )\n })}\n </FlexGrowCol>\n </CardContent>\n </Card>\n {children}\n </FlexGrowCol>\n </FlexGrowCol>\n </Container>\n )\n}\n","import { ButtonEx } from '@xylabs/react-button'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nexport interface InstallButtonSectionProps extends FlexBoxProps {\n installLink?: string\n notificationLink?: string\n}\n\nexport const InstallButtonSection: React.FC<InstallButtonSectionProps> = ({\n installLink = '',\n notificationLink = 'https://xyo.network/newsletter',\n ...props\n}) => {\n return (\n <FlexRow\n width=\"100%\"\n gap={1}\n sx={{\n alignItems: 'flex-start',\n flexDirection: { md: 'row', xs: 'column' },\n }}\n {...props}\n >\n <ButtonEx fullWidth variant=\"contained\" disabled href={installLink}>\n Install\n </ButtonEx>\n <ButtonEx fullWidth variant=\"outlined\" href={notificationLink} target=\"_blank\">\n Get Notified When Available\n </ButtonEx>\n </FlexRow>\n )\n}\n","import { VerifiedRounded } from '@mui/icons-material'\nimport {\n Card, CardContent, Typography, useTheme,\n} from '@mui/material'\nimport {\n FlexGrowCol, FlexGrowRow, FlexRow,\n} from '@xylabs/react-flexbox'\nimport type { DappName, DappVersion } from '@xyo-network/os-model'\nimport React from 'react'\n\nimport { RenderHtml } from '../../../../RenderHtml.tsx'\nimport { DeveloperLinkSection } from './DeveloperLinkSection.js'\n\nexport interface SummarySectionProps {\n dappIconSvg?: string\n developerLink: string\n name?: DappName\n version?: DappVersion\n}\n\nexport const SummarySection: React.FC<SummarySectionProps> = ({\n name, dappIconSvg, version = '1.0', developerLink = 'https://xylabs.com',\n}) => {\n const theme = useTheme()\n return (\n <Card sx={{ width: '100%' }}>\n <CardContent>\n <FlexRow\n gap={3}\n alignItems=\"flex-start\"\n sx={{ flexDirection: 'column', width: '100%' }}\n >\n <FlexGrowRow\n sx={{ gap: { md: 2, xs: 1 } }}\n alignItems=\"flex-start\"\n >\n <Card elevation={0} variant=\"outlined\">\n <CardContent>\n {dappIconSvg\n ? <RenderHtml htmlString={dappIconSvg} />\n : null}\n </CardContent>\n </Card>\n <FlexGrowCol alignItems=\"flex-start\">\n <FlexGrowCol alignItems=\"flex-start\">\n <Typography\n sx={{ fontSize: { md: theme.typography.h1.fontSize, xs: theme.typography.h5.fontSize } }}\n fontWeight={theme.typography.fontWeightBold}\n >\n {name}\n </Typography>\n <Typography gutterBottom variant=\"subtitle2\">\n Version:\n {' '}\n {version}\n </Typography>\n </FlexGrowCol>\n <FlexGrowRow gap={0.5} alignItems=\"center\" justifyContent=\"center\">\n <VerifiedRounded color=\"success\" fontSize=\"small\" />\n <Typography variant=\"body1\" color={theme.vars?.palette.success.main}>\n XY Labs\n </Typography>\n </FlexGrowRow>\n {developerLink\n ? <DeveloperLinkSection developerLink={developerLink} />\n : null}\n </FlexGrowCol>\n </FlexGrowRow>\n </FlexRow>\n </CardContent>\n </Card>\n )\n}\n","import { useTheme } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexGrowRow } from '@xylabs/react-flexbox'\nimport { LinkEx } from '@xylabs/react-link'\nimport React from 'react'\n\nexport interface DeveloperLinkSectionProps extends FlexBoxProps {\n developerLink: string\n}\n\nexport const DeveloperLinkSection: React.FC<DeveloperLinkSectionProps> = ({ developerLink = 'https://xylabs.com', ...props }) => {\n const theme = useTheme()\n return (\n <FlexGrowRow\n gap={1}\n sx={{\n alignItems: 'flex-start',\n flexDirection: { md: 'row', xs: 'column' },\n }}\n {...props}\n >\n <LinkEx color={theme.vars?.palette.info.main} href={developerLink} target=\"_blank\">\n {developerLink}\n </LinkEx>\n </FlexGrowRow>\n )\n}\n","import type { BottomNavigationProps } from '@mui/material'\nimport {\n BottomNavigation, BottomNavigationAction, Paper, styled,\n} from '@mui/material'\nimport { useIsDark } from '@xylabs/react-theme'\nimport type { DappNavItem, DappNavMenuConfig } from '@xyo-network/os-model'\nimport React, { useEffect, useState } from 'react'\n\nexport interface DappBottomNavigationProps extends BottomNavigationProps {\n activePath?: string\n menuConfig?: DappNavMenuConfig\n menuItems?: DappNavItem[]\n onPathChange?: (to: string) => void\n}\n\nexport const DappBottomNavigation: React.FC<DappBottomNavigationProps> = ({\n activePath, menuConfig, menuItems, onPathChange, ...props\n}) => {\n const [activeIndex, setActiveIndex] = useState(0)\n\n // update based off active path changes\n useEffect(() => {\n if (menuConfig?.defaultPath && menuItems && activePath) {\n const nextIndex = menuItems.findIndex(item => activePath === item.path)\n const timeoutId = setTimeout(() => setActiveIndex(nextIndex), 0)\n return () => clearTimeout(timeoutId)\n }\n }, [activePath, menuConfig, menuItems])\n\n return (\n <Paper elevation={3}>\n <BottomNavigation\n value={activeIndex}\n onChange={(_, value: number) => {\n setActiveIndex(value)\n const to = menuItems?.[value].path\n if (to) onPathChange?.(to)\n }}\n showLabels\n {...props}\n >\n {menuItems?.map(({ svgIcon: icon, primaryText }, index) => {\n return (\n <StyledBottomNavigationAction\n className=\"bottom-nav-action\"\n key={index}\n label={primaryText}\n icon={(\n <span\n ref={(ref) => {\n if (ref) {\n ref.innerHTML = icon ?? ''\n }\n }}\n />\n )}\n />\n )\n })}\n </BottomNavigation>\n </Paper>\n )\n}\n\nconst StyledBottomNavigationAction = styled(BottomNavigationAction, { name: 'StyledBottomNavigationAction' })(({ theme }) => {\n const darkMode = useIsDark()\n return { '&.Mui-selected': { color: darkMode ? theme.vars?.palette.primary.main : theme.vars?.palette.secondary.main } }\n})\n","import type { DrawerProps } from '@mui/material'\nimport {\n alpha,\n Drawer,\n List,\n ListItem,\n ListItemIcon,\n ListItemText,\n Tooltip,\n Typography,\n useTheme,\n} from '@mui/material'\nimport {\n FlexCol, FlexGrowRow, FlexRow,\n} from '@xylabs/react-flexbox'\nimport {\n alphaCss, darkenCss, useIsDark,\n} from '@xylabs/react-theme'\nimport type {\n DappName, DappNavItem, DappNavMenuConfig, DappVersion, XyOsContext,\n} from '@xyo-network/os-model'\nimport { XyOsMonitor } from '@xyo-network/os-runtime'\nimport React, { useEffect, useState } from 'react'\n\nimport { DebugDialogWithNode } from '../../../../Debug/index.ts'\nimport { RenderHtml } from '../../../../RenderHtml.tsx'\nimport { useDebugClick } from '../../hooks/index.ts'\nimport { BottomMenuArea } from './BottomMenuArea.tsx'\nimport { StyledListItemButton, StyledMenuIconWrapSpan } from './StyledListItems.tsx'\n\nexport interface DappMenuDrawerProps extends DrawerProps {\n activePath?: string\n context?: XyOsContext | null\n iconSvg?: string\n menuConfig?: DappNavMenuConfig\n menuItems?: DappNavItem[]\n name?: DappName\n onPathChange?: (to: string) => void\n version?: DappVersion\n}\n\nexport const DappMenuDrawer: React.FC<DappMenuDrawerProps> = ({\n activePath,\n context,\n iconSvg,\n name,\n menuConfig,\n menuItems,\n onPathChange,\n version,\n ...props\n}) => {\n const [path, setPath] = useState('')\n const darkMode = useIsDark()\n const theme = useTheme()\n const drawerColor = darkMode ? theme.vars?.palette.background.paper : darkenCss(theme.vars?.palette.primary.main ?? '#fff', 0.5)\n const activeColor = theme.vars?.palette.primary.light\n\n useEffect(() => {\n if (menuConfig?.defaultPath && menuItems && activePath) {\n const newPath = menuItems.find(item => activePath === item.path)?.path ?? ''\n const timeoutId = setTimeout(() => setPath(newPath), 0)\n return () => clearTimeout(timeoutId)\n }\n }, [activePath, menuConfig, menuItems])\n\n const handleChange = (to: string) => {\n XyOsMonitor.trackEvent('Visit dApp Page', { Page: to })\n setPath(to)\n onPathChange?.(to)\n }\n\n const {\n closeDebug, debugOpen, openDebug,\n } = useDebugClick()\n\n return (\n <Drawer\n variant=\"permanent\"\n anchor=\"left\"\n PaperProps={{\n sx: {\n position: 'static', backgroundColor: drawerColor, borderRight: 'none',\n },\n }}\n sx={{ width: '280px' }}\n {...props}\n >\n <FlexCol alignItems=\"stretch\" justifyContent=\"space-between\" height=\"100dvh\">\n <FlexCol alignItems=\"stretch\" justifyContent=\"flex-start\" flexGrow={1} overflow=\"auto\">\n <Tooltip title={version}>\n <FlexGrowRow\n id=\"dapp-name-and-icon\"\n padding={2}\n justifyContent=\"flex-start\"\n gap={1}\n sx={{ cursor: 'pointer' }}\n flexGrow={0}\n >\n {iconSvg ? RenderHtml({ htmlString: iconSvg }) : null}\n <Typography noWrap variant=\"h6\" letterSpacing=\"-1px\">\n {name}\n </Typography>\n </FlexGrowRow>\n </Tooltip>\n <DebugDialogWithNode closeDebug={closeDebug} debugOpen={debugOpen} context={context} />\n <List sx={{ p: 0, overflow: 'auto' }}>\n {menuItems?.map(({\n svgIcon: icon, primaryText, path: pathFromPayload,\n }) => (\n <ListItem\n key={primaryText}\n disablePadding\n sx={{ paddingBottom: 1 }}\n >\n <StyledListItemButton\n onClick={() => handleChange(pathFromPayload)}\n active={pathFromPayload === path}\n disableRipple\n disableTouchRipple\n >\n <FlexRow\n flexGrow={1}\n paddingX={2}\n paddingY={0.5}\n sx={{ '&:hover': { backgroundColor: alpha('#ffffff', 0.05) }, 'borderRadius': '10px' }}\n >\n <ListItemIcon\n sx={{ color: pathFromPayload === path ? activeColor : alpha('#fff', 0.3), justifyContent: 'center' }}\n >\n <StyledMenuIconWrapSpan\n ref={(ref: HTMLSpanElement | null) => {\n if (ref !== null) {\n ref.innerHTML = icon ?? ''\n }\n }}\n />\n </ListItemIcon>\n <ListItemText\n slotProps={{\n primary: {\n typography: {\n fontWeight: path === pathFromPayload ? 'bold' : 'inherit',\n color: pathFromPayload === path ? 'inherit' : alphaCss(theme.vars?.palette.text.primary ?? '#000', 0.5),\n },\n },\n }}\n primary={primaryText}\n style={{ opacity: pathFromPayload === path ? 1 : 0.5 }}\n />\n </FlexRow>\n </StyledListItemButton>\n </ListItem>\n ))}\n </List>\n </FlexCol>\n <BottomMenuArea openDebug={openDebug} backgroundColor={theme.vars?.palette.primary.dark ?? '#000'} />\n </FlexCol>\n </Drawer>\n )\n}\n","import {\n BugReport, KeyboardArrowDownRounded, KeyboardArrowUpRounded,\n} from '@mui/icons-material'\nimport {\n Card,\n Collapse,\n Divider,\n IconButton,\n Stack,\n Toolbar,\n Tooltip,\n Typography,\n useTheme,\n} from '@mui/material'\nimport { RotationAnimation } from '@xylabs/react-animation'\nimport { FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { LinkEx } from '@xylabs/react-link'\nimport { ColorSchemeButton } from '@xylabs/react-theme'\nimport React, { useState } from 'react'\n\nimport { XyoOSLogoWhite } from './img/index.ts'\nimport { socialLinksData } from './SocialData.js'\n\nexport interface BottomMenuAreaProps {\n backgroundColor: string\n openDebug: () => void\n}\n\nexport const BottomMenuArea: React.FC<BottomMenuAreaProps> = ({ openDebug, backgroundColor }) => {\n const theme = useTheme()\n const [expanded, setExpanded] = useState(false)\n\n // Toggle expand/collapse\n const handleExpandClick = () => {\n setExpanded(!expanded)\n }\n\n return (\n <Card\n sx={{\n position: 'relative',\n borderTopLeftRadius: '10px',\n borderTopRightRadius: '10px',\n borderBottomLeftRadius: '0px',\n borderBottomRightRadius: '0px',\n backgroundColor: backgroundColor,\n overflow: 'hidden',\n }}\n elevation={4}\n >\n {/* Collapsed View */}\n <FlexCol paddingY={1} alignItems=\"stretch\">\n <Stack\n paddingX={2}\n justifyContent=\"space-between\"\n flexDirection=\"row\"\n gap={0.5}\n onClick={handleExpandClick}\n sx={{ textTransform: 'none', cursor: 'pointer' }}\n >\n <Typography gutterBottom={false}>More</Typography>\n {expanded ? <KeyboardArrowUpRounded sx={{ color: '#fff' }} /> : <KeyboardArrowDownRounded sx={{ color: '#fff' }} />}\n </Stack>\n </FlexCol>\n {/* Expanded Content */}\n <Collapse in={expanded} timeout=\"auto\" unmountOnExit sx={{ paddingBottom: 3, color: '#fff' }}>\n <Divider flexItem></Divider>\n <FlexCol alignItems=\"center\">\n <Toolbar sx={{ paddingX: 1.5 }}>\n <Tooltip title=\"Debug Node View\">\n <IconButton onClick={openDebug} sx={{ color: '#fff' }}>\n <BugReport />\n </IconButton>\n </Tooltip>\n <Tooltip title=\"Toggle Light/Dark Mode\">\n <span>\n <ColorSchemeButton />\n </span>\n </Tooltip>\n </Toolbar>\n <FlexRow flexWrap=\"wrap\">\n {socialLinksData.map(social => (\n <RotationAnimation key={social.link} rotation={20}>\n <IconButton\n sx={{ color: '#fff' }}\n href={social.link}\n target=\"_blank\"\n\n >\n {social.icon}\n </IconButton>\n </RotationAnimation>\n ))}\n </FlexRow>\n <FlexRow padding={1} justifyContent=\"center\" gap={0.5}>\n <Typography variant=\"body2\" color={theme.vars?.palette.text.primary}>\n Powered By\n </Typography>\n <img\n style={{ color: theme.vars?.palette.text.primary, fill: theme.vars?.palette.text.primary }}\n src={XyoOSLogoWhite}\n width=\"auto\"\n height=\"20px\"\n />\n </FlexRow>\n <Typography variant=\"caption\" color={theme.vars?.palette.text.primary}>\n Copyright © 2024 XY Labs, Inc.\n </Typography>\n <Stack gap={0.5} flexDirection=\"row\">\n <LinkEx color=\"inherit\" target=\"_blank\" href=\"https://xylabs.com/privacy/\">\n <Typography variant=\"caption\">Privacy</Typography>\n </LinkEx>\n {' '}\n •\n {' '}\n <LinkEx color=\"inherit\" target=\"_blank\" href=\"https://xylabs.com/terms/\">\n <Typography variant=\"caption\">Terms</Typography>\n </LinkEx>\n {' '}\n •\n {' '}\n <LinkEx color=\"inherit\" target=\"_blank\" href=\"https://xyo.network/\">\n <Typography variant=\"caption\">XYO Website</Typography>\n </LinkEx>\n </Stack>\n </FlexCol>\n </Collapse>\n </Card>\n )\n}\n","<svg id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 900 900\"><defs><style>.cls-1{fill:#a8a8a8;opacity:.21;}.cls-1,.cls-2{stroke-width:0px;}.cls-2{fill:#fff;}</style></defs><path class=\"cls-1\" d=\"M864.29,297.43c-2.44-6.58-9.76-9.94-16.34-7.5l-143.74,53.26L533.2,21.88c-1.85-3.48-5.21-5.9-9.09-6.56-3.89-.66-7.85.51-10.75,3.18l-267.76,246.55-118-97.86c-5.4-4.48-13.42-3.73-17.9,1.67-4.48,5.4-3.73,13.42,1.67,17.9l118,97.86L36.62,593.37c-2.09,3.34-2.5,7.46-1.14,11.15s4.37,6.54,8.13,7.72l347.4,108.61-25.75,151.12c-1.18,6.92,3.48,13.49,10.4,14.67.24.04.47.07.7.1,6.66.76,12.82-3.81,13.96-10.5l25.75-151.12,363.77,12.56c3.94.14,7.71-1.56,10.22-4.59,2.51-3.03,3.48-7.06,2.62-10.9l-79.64-355.16,143.75-53.26c6.58-2.44,9.94-9.75,7.5-16.34ZM518.49,48.34l156.33,293.75-401.12-68.35,244.79-225.4ZM674.37,367.8l-264.69,319.16-144.06-388.81,408.75,69.65ZM66.9,592.88l176.22-282.26,141.37,381.56-317.59-99.29ZM431.72,700.22l259.75-313.21,72.81,324.69-332.56-11.48Z\"/><path class=\"cls-2\" d=\"M865.04,302.64c.01-.2.02-.4.03-.6,0-.33,0-.66-.03-.99-.01-.2-.02-.39-.04-.58-.04-.35-.1-.71-.17-1.06-.03-.16-.05-.32-.09-.48-.12-.5-.26-1.01-.45-1.5-.18-.49-.4-.97-.64-1.43-.08-.15-.17-.29-.25-.43-.17-.31-.35-.61-.55-.9-.12-.17-.24-.33-.37-.49-.19-.25-.39-.5-.6-.74-.14-.16-.29-.32-.45-.47-.22-.22-.45-.44-.68-.65-.1-.08-.18-.18-.27-.26L530.1,18.07c-.34-.28-.7-.53-1.07-.77-.09-.06-.17-.13-.26-.19-.62-.39-1.26-.7-1.92-.98-.18-.07-.36-.14-.54-.21-.71-.26-1.43-.47-2.16-.6,0,0-.01,0-.02,0,0,0,0,0-.01,0-.67-.11-1.35-.15-2.03-.16-.37,0-.73,0-1.09.03-.23.02-.46.06-.7.09-.86.11-1.69.31-2.5.59-.07.03-.15.04-.23.07l-.32.12c-.2.08-.4.13-.59.22L115.08,165.06c-.11.04-.22.1-.33.15-.3.12-.59.25-.88.39-.19.1-.38.19-.57.3-.27.15-.54.32-.81.5-.17.12-.35.22-.52.35-.27.2-.53.42-.79.64-.14.12-.28.23-.41.35-.35.33-.68.68-1,1.05-.04.05-.08.1-.12.14-.32.38-.6.78-.87,1.2-.09.14-.16.29-.25.43-.18.31-.36.62-.51.94-.08.17-.15.35-.23.53-.13.31-.25.62-.36.93-.06.19-.12.38-.17.57-.09.33-.17.65-.23.98-.02.11-.06.22-.08.33l-72.09,423.12c-.07.43-.11.87-.13,1.3,0,.11-.03.22-.03.33-.03.73.02,1.44.12,2.16.02.19.06.38.09.57.13.74.31,1.48.57,2.19,0,0,0,0,0,0,0,.02.01.03.02.04.2.53.43,1.04.7,1.53.12.22.26.42.38.63.17.28.33.56.52.82.17.23.35.44.54.66.18.22.36.44.56.65.2.21.42.4.63.6.16.14.29.3.46.43l330.39,274c.08.07.17.12.25.18.32.25.65.49.99.71.15.09.29.19.44.28.44.26.9.5,1.37.7.04.02.08.04.12.06.51.21,1.03.39,1.56.53.17.05.35.08.53.12.24.06.47.12.71.16.23.04.46.07.69.1.47.05.95.08,1.42.08.15,0,.3-.02.45-.02.32-.01.65-.02.97-.06.18-.02.36-.06.54-.08.29-.04.58-.09.86-.15.19-.04.38-.1.56-.15.28-.08.55-.16.82-.25.08-.03.15-.04.23-.07l402.48-149.13s.06-.03.09-.04c.39-.15.76-.32,1.13-.51.12-.06.24-.1.35-.16.44-.24.88-.51,1.29-.8.03-.02.06-.04.09-.06.55-.39,1.07-.85,1.56-1.34.83-.82,1.54-1.76,2.11-2.78.09-.17.19-.33.27-.5.32-.64.61-1.3.82-2,.03-.11.05-.22.08-.33.12-.42.23-.84.3-1.27l72.09-423.12c.02-.11.02-.22.03-.33.05-.34.08-.67.1-1.01ZM771.44,701.13l-101.05-83.8,158.61-254.06-57.56,337.86ZM121.2,242.67l65.53,292.26-123.1,45.61,57.57-337.87ZM656.65,591.33l-141.37-381.56,317.59,99.3-176.22,282.26ZM508.76,181.1l22.05-129.41,263.81,218.79-285.86-89.37ZM483.7,176.83l-299.33-10.33L505.75,47.42l-22.05,129.41ZM208.31,514.94l-72.81-324.69,332.56,11.48-259.75,313.21ZM490.1,214.98l144.06,388.81-382.98-65.25-25.77-4.39L490.1,214.98ZM246.9,563.6l379.17,64.6-244.79,225.4-156.33-293.74,21.95,3.74ZM654.16,636.9l101.05,83.8-321.38,119.08,220.33-202.88ZM72.47,604.37l123.1-45.61,140.72,264.4-84.17-69.81-179.65-148.98Z\"/></svg>","/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\nimport xyoOSLogoBlackImport from './xyoOS-Icon-Black.svg'\nimport xyoOSLogoWhiteImport from './xyoOS-Icon-White.svg'\n\n// See packages/os-react/packages/runtime/src/img/backgrounds/index.ts — ambient `*.svg`\n// declarations are not carried through re-exports by typescript-eslint, so we pin the\n// public type with an explicit `as string` here.\nexport const XyoOSLogoBlack = xyoOSLogoBlackImport as string\nexport const XyoOSLogoWhite = xyoOSLogoWhiteImport as string\n","import {\n Facebook, Instagram, LinkedIn, Reddit, StorefrontRounded, Telegram, X, YouTube,\n} from '@mui/icons-material'\nimport type { ReactNode } from 'react'\nimport React from 'react'\nimport { FaDiscord } from 'react-icons/fa'\n\ninterface socialLinksDataProps {\n icon: ReactNode\n link: string\n}\n\nexport const socialLinksData: socialLinksDataProps[] = [\n {\n icon: (\n <Facebook style={{ fontSize: '24px' }} />\n ),\n link: 'https://www.facebook.com/OfficialXYO',\n },\n {\n icon: (\n <X style={{ fontSize: '24px' }} />\n ),\n link: 'https://twitter.com/OfficialXYO',\n },\n {\n icon: (\n <Instagram style={{ fontSize: '24px' }} />\n ),\n link: 'https://www.instagram.com/officialxyo/',\n },\n {\n icon: (\n <Telegram style={{ fontSize: '24px' }} />\n ),\n link: 'https://t.me/xyonetwork',\n },\n {\n icon: (\n <Reddit style={{ fontSize: '24px' }} />\n ),\n link: 'https://www.reddit.com/r/XYONetwork/',\n },\n {\n icon: (\n <YouTube style={{ fontSize: '24px' }} />\n ),\n link: 'https://www.youtube.com/channel/UCyZDqb9pgntVHJVt1pxXtsw',\n },\n {\n icon: (\n <LinkedIn style={{ fontSize: '24px' }} />\n ),\n link: 'https://www.linkedin.com/company/officialxyo/',\n },\n {\n icon: (\n <FaDiscord style={{ fontSize: '24px' }} />\n ),\n link: 'https://discord.gg/officialxyo',\n },\n {\n icon: (\n <StorefrontRounded style={{ fontSize: '24px' }} />\n ),\n link: 'https://shop.xyo.network',\n },\n]\n","import { ListItemButton, styled } from '@mui/material'\n\n// Styled span for wrapping menu icons\nexport const StyledMenuIconWrapSpan = styled('span', { name: 'StyledMenuIconWrapSpan' })(() => ({\n alignItems: 'center',\n display: 'inline-flex',\n flexDirection: 'column',\n}))\n\nexport const StyledListItemButton = styled(ListItemButton, { name: 'StyledListItemButton', shouldForwardProp: prop => prop !== 'active' })<{\n active?: boolean\n}>(({ theme, active }) => {\n const activeOrHoverColor = theme.vars?.palette.primary.main\n\n return {\n 'position': 'relative',\n 'padding': '8px 16px',\n 'borderRadius': '12px',\n 'transition': 'background-color 0.3s ease',\n '&:hover': {\n backgroundColor: 'transparent',\n borderRadius: '12px',\n },\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n left: 0,\n top: 0,\n bottom: 0,\n width: '6px',\n backgroundColor: active ? activeOrHoverColor : 'transparent',\n borderRadius: '0 4px 4px 0',\n transition: 'background-color 0.3s ease',\n },\n }\n})\n","import { Snackbar } from '@mui/material'\nimport { ErrorBoundary, ErrorRender } from '@xylabs/react-error'\nimport type { PropsWithChildren } from 'react'\nimport React, { useMemo } from 'react'\n\nimport {\n useManageDappInjectableParamsFromRoute, useManageDappPathFromRoute, useSyncOsRegisteredAccessInterfaces,\n} from './hooks/index.ts'\nimport { DappMetaTags } from './MetaTags.tsx'\nimport type { DappWindowProps } from './types/index.ts'\n\n/** A component that can load immediately, but delays node loading and dapp mounting till corresponding launch intent arrives */\nexport const DappWindow: React.FC<DappWindowProps & PropsWithChildren> = ({\n children, context, dapp, dappMenuProperties, dappState,\n}) => {\n const { name } = dapp?.config ?? {}\n\n const { active } = dappState ?? {}\n\n useSyncOsRegisteredAccessInterfaces(context)\n const routingError = useManageDappPathFromRoute(context, name)\n const injectableErrors = useManageDappInjectableParamsFromRoute(context)\n\n const resolvedErrors = useMemo(() => [...injectableErrors, routingError].filter(Boolean), [injectableErrors, routingError])\n\n return (\n <ErrorBoundary>\n <DappMetaTags active={active} activePath={dappMenuProperties?.activePath} dappName={name} />\n {resolvedErrors.map(error => (\n <Snackbar\n key={error?.message}\n open={!!error}\n message={<ErrorRender error={error} scope=\"DappWindow\" />}\n />\n ))}\n {children}\n </ErrorBoundary>\n )\n}\n","import { NameTransforms } from '@xyo-network/os-runtime'\nimport React from 'react'\nimport { Helmet } from 'react-helmet'\n\nexport interface DappMetaTagsProps {\n active?: boolean\n activePath?: string\n dappName?: string\n}\n\nexport const DappMetaTags: React.FC<DappMetaTagsProps> = ({\n active, activePath, dappName,\n}) => {\n return active\n ? (\n <Helmet>\n <title>\n {activePath ? `${new NameTransforms(activePath).deSlug()} | ` : ''}\n {' '}\n {dappName}\n {' '}\n dApp\n </title>\n </Helmet>\n )\n : null\n}\n","import { ErrorRender } from '@xylabs/react-error'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport { NameTransforms } from '@xyo-network/os-runtime'\nimport { NodeProvider } from '@xyo-network/react-node'\nimport { WalletProvider } from '@xyo-network/react-wallet'\nimport React from 'react'\n\nimport { XyOsUiContextProvider } from '../../../XyOsUi/index.ts'\nimport { DappAccessFlexbox } from '../access-interface/index.ts'\nimport { DappBar } from './AppBar.tsx'\nimport { DappChrome } from './Chrome.tsx'\nimport { DappBottomNavigation, DappMenuDrawer } from './components/index.ts'\nimport { useDecomposeDapp } from './hooks/index.ts'\nimport { DappLoadingFlexbox } from './LoadingFlexbox.tsx'\nimport type { DappWindowProps } from './types/index.ts'\n\n/** A pure component that can render a dapp via props only */\nexport const DappRendered: React.FC<DappWindowProps> = ({\n context, dapp, dappMenuProperties, dappState, dappWallet, errors,\n}) => {\n const {\n DappComponent: dappComponent, name, scrollable = true, version,\n } = useDecomposeDapp(dapp)\n\n const { active, minimized } = dappState ?? {}\n\n const hasErrors = errors && errors.length > 0\n\n return (\n <DappChrome\n /* Keep DappBar outside of the Dapp's Node Provider so it can still see the intentArchivist for close and minimize */\n appBar={(\n <DappBar\n context={context}\n name={name}\n version={version}\n title={dappMenuProperties?.activePath ? new NameTransforms(dappMenuProperties.activePath).deSlug() : ''}\n />\n )}\n height=\"100dvh\"\n width=\"100dvw\"\n largeScreenMenu={active && (\n <DappMenuDrawer\n context={context}\n name={name}\n version={version}\n {...dappMenuProperties}\n />\n )}\n smallScreenMenu={active && (\n <DappBottomNavigation\n {...dappMenuProperties}\n sx={{ display: dappMenuProperties?.menuConfig ? 'flex' : 'none' }}\n />\n )}\n /* Ensure that loading goes away when error occurs */\n splashScreen={hasErrors ? null : <DappLoadingFlexbox minimize={!!minimized} name={name} open={!!active} />}\n >\n {hasErrors\n ? (\n <FlexCol padding={2}>\n {errors?.map(error => (\n <ErrorRender key={error?.message} error={error} scope=\"DappWindow\" />\n ))}\n </FlexCol>\n )\n : null}\n <WalletProvider rootWallet={dappWallet}>\n {/* Only load the dapp component when the dapp's node exists and dapp is launched */}\n {context === null\n ? null\n : (\n <XyOsUiContextProvider value={context}>\n {/* Prevent dapps from reaching out to the os node */}\n <NodeProvider node={context?.root}>\n {active\n ? (\n <>\n <FlexCol\n position=\"absolute\"\n top={0}\n left={0}\n right={0}\n bottom={0}\n alignItems=\"stretch\"\n justifyContent=\"stretch\"\n sx={{ overflowY: scrollable ? 'auto' : 'hidden' }}\n >\n {React.createElement(dappComponent, { name: dapp?.config.name })}\n </FlexCol>\n <DappAccessFlexbox context={context} />\n </>\n )\n : null}\n </NodeProvider>\n </XyOsUiContextProvider>\n )}\n </WalletProvider>\n </DappChrome>\n )\n}\n","import {\n Fade, styled, Typography,\n} from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport type { DappName } from '@xyo-network/os-model'\nimport React, { useEffect, useState } from 'react'\n\nimport { LoadingOsLogo } from '../../../LoadingOsLogo/index.ts'\nimport { useSkipLoadingScreen } from './hooks/index.ts'\nimport { TextTrail } from './Trail.js'\n\nexport interface DappLoadingFlexBoxProps extends FlexBoxProps {\n minimize: boolean\n name?: DappName\n open: boolean\n}\n\nexport const DappLoadingFlexbox: React.FC<DappLoadingFlexBoxProps> = ({\n minimize, open, name, ...props\n}) => {\n // keep slash visible when open is false\n const [fadeIn, setFadeIn] = useState(!open)\n const [trail, setTrail] = useState(false)\n const skipLoadingScreen = useSkipLoadingScreen()\n\n // For now, loading of the node is instantaneous so this is meant to ensure we pause 1.5s minimum before\n // hiding splash ui\n useEffect(() => {\n if (open) {\n if (skipLoadingScreen) {\n const immediateTimeout = setTimeout(() => setFadeIn(false), 0)\n return () => clearTimeout(immediateTimeout)\n }\n // Sets time of load experience & fade\n const fadeInTimeout = setTimeout(() => {\n setFadeIn(false)\n }, 2000)\n\n let trailTimeout = setTimeout(() => {\n setTrail(true)\n // Re-set trail after time passes\n trailTimeout = setTimeout(() => {\n setTrail(false)\n }, 4000)\n }, 300)\n return () => {\n clearTimeout(fadeInTimeout)\n clearTimeout(trailTimeout)\n }\n }\n // if not open and not minimized, reset fadeIn\n if (!minimize) {\n const resetTimeout = setTimeout(() => setFadeIn(true), 0)\n return () => clearTimeout(resetTimeout)\n }\n }, [minimize, open, skipLoadingScreen])\n\n return (\n <Fade in={fadeIn} unmountOnExit>\n <StyledSplashContainer {...props}>\n <LoadingOsLogo widthInPixels={100} busy position=\"absolute\" />\n <TextTrail open={trail} flexDirection=\"row\">\n <Typography\n textAlign=\"center\"\n sx={{ fontSize: { md: '3em', xs: '2em' } }}\n >\n Loading\n </Typography>\n <Typography\n textAlign=\"center\"\n sx={{ fontSize: { md: '3em', xs: '2em' } }}\n >\n {name}\n </Typography>\n <Typography\n textAlign=\"center\"\n sx={{ fontSize: { md: '3em', xs: '2em' } }}\n >\n dApp\n </Typography>\n </TextTrail>\n </StyledSplashContainer>\n </Fade>\n )\n}\n\nconst StyledSplashContainer = styled(FlexCol, { name: 'StyledSplashContainer' })(({ theme }) => {\n return {\n background: theme.vars?.palette.background.default,\n color: theme.vars?.palette.text.primary,\n gap: theme.spacing(1),\n height: '100%',\n left: 0,\n position: 'absolute',\n top: 0,\n width: '100%',\n zIndex: 999,\n }\n})\n","import type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport React, { useState } from 'react'\n\nimport { XyoOSIcon } from './img/index.ts'\n\nexport type LoadingOsLogoProps = Omit<FlexBoxProps, 'children'> & {\n busy?: boolean\n spinsPerSecond?: number\n widthInPixels?: number\n}\n\nexport const LoadingOsLogo: React.FC<LoadingOsLogoProps> = ({\n widthInPixels, busy, spinsPerSecond = 0.5, ...props\n}) => {\n // preloading image to prevent shifting\n const [imageLoaded, setImageLoaded] = useState(false)\n if (!imageLoaded) {\n const img = new Image()\n img.addEventListener('load', () => setImageLoaded(true))\n img.src = XyoOSIcon\n }\n return imageLoaded\n ? (\n <FlexCol\n sx={{\n '@keyframes fadeOut': {\n '0%': { opacity: 1 },\n '100%': { opacity: 0.1 },\n '35%': { opacity: 1 },\n },\n 'animation': busy ? 'fadeOut linear' : undefined,\n 'animationDuration': '1500ms',\n 'animationFillMode': 'both',\n }}\n {...props}\n >\n <FlexCol\n sx={{\n '@keyframes spin': {\n '0%': { transform: 'rotate(360deg)' },\n '100%': { transform: 'rotate(0deg)' },\n },\n 'animation': busy ? `spin ${1 / spinsPerSecond}s linear infinite` : undefined,\n 'animationDirection': 'reverse',\n }}\n {...props}\n >\n <img src={XyoOSIcon} height={widthInPixels ?? 22} />\n </FlexCol>\n </FlexCol>\n )\n : null\n}\n","<?xml version=\"1.0\" encoding=\"UTF-8\"?><svg id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 900 900\"><defs><style>.cls-1{fill:url(#linear-gradient);}.cls-1,.cls-2{stroke-width:0px;}.cls-2{fill:#a8a8a8;opacity:.21;}</style><linearGradient id=\"linear-gradient\" x1=\"34.7\" y1=\"450.98\" x2=\"865.07\" y2=\"450.98\" gradientUnits=\"userSpaceOnUse\"><stop offset=\"0\" stop-color=\"#579fd6\"/><stop offset=\".52\" stop-color=\"#eb407a\"/><stop offset=\"1\" stop-color=\"#f27046\"/></linearGradient></defs><path class=\"cls-2\" d=\"M864.29,297.43c-2.44-6.58-9.76-9.94-16.34-7.5l-143.74,53.26L533.2,21.88c-1.85-3.48-5.21-5.9-9.09-6.56-3.89-.66-7.85.51-10.75,3.18l-267.76,246.55-118-97.86c-5.4-4.48-13.42-3.73-17.9,1.67-4.48,5.4-3.73,13.42,1.67,17.9l118,97.86L36.62,593.37c-2.09,3.34-2.5,7.46-1.14,11.15s4.37,6.54,8.13,7.72l347.4,108.61-25.75,151.12c-1.18,6.92,3.48,13.49,10.4,14.67.24.04.47.07.7.1,6.66.76,12.82-3.81,13.96-10.5l25.75-151.12,363.77,12.56c3.94.14,7.71-1.56,10.22-4.59,2.51-3.03,3.48-7.06,2.62-10.9l-79.64-355.16,143.75-53.26c6.58-2.44,9.94-9.75,7.5-16.34ZM518.49,48.34l156.33,293.75-401.12-68.35,244.79-225.4ZM674.37,367.8l-264.69,319.16-144.06-388.81,408.75,69.65ZM66.9,592.88l176.22-282.26,141.37,381.56-317.59-99.29ZM431.72,700.22l259.75-313.21,72.81,324.69-332.56-11.48Z\"/><path class=\"cls-1\" d=\"M865.04,302.64c.01-.2.02-.4.03-.6,0-.33,0-.66-.03-.99-.01-.2-.02-.39-.04-.58-.04-.35-.1-.71-.17-1.06-.03-.16-.05-.32-.09-.48-.12-.5-.26-1.01-.45-1.5-.18-.49-.4-.97-.64-1.43-.08-.15-.17-.29-.25-.43-.17-.31-.35-.61-.55-.9-.12-.17-.24-.33-.37-.49-.19-.25-.39-.5-.6-.74-.14-.16-.29-.32-.45-.47-.22-.22-.45-.44-.68-.65-.1-.08-.18-.18-.27-.26L530.1,18.07c-.34-.28-.7-.53-1.07-.77-.09-.06-.17-.13-.26-.19-.62-.39-1.26-.7-1.92-.98-.18-.07-.36-.14-.54-.21-.71-.26-1.43-.47-2.16-.6,0,0-.01,0-.02,0,0,0,0,0-.01,0-.67-.11-1.35-.15-2.03-.16-.37,0-.73,0-1.09.03-.23.02-.46.06-.7.09-.86.11-1.69.31-2.5.59-.07.03-.15.04-.23.07l-.32.12c-.2.08-.4.13-.59.22L115.08,165.06c-.11.04-.22.1-.33.15-.3.12-.59.25-.88.39-.19.1-.38.19-.57.3-.27.15-.54.32-.81.5-.17.12-.35.22-.52.35-.27.2-.53.42-.79.64-.14.12-.28.23-.41.35-.35.33-.68.68-1,1.05-.04.05-.08.1-.12.14-.32.38-.6.78-.87,1.2-.09.14-.16.29-.25.43-.18.31-.36.62-.51.94-.08.17-.15.35-.23.53-.13.31-.25.62-.36.93-.06.19-.12.38-.17.57-.09.33-.17.65-.23.98-.02.11-.06.22-.08.33l-72.09,423.12c-.07.43-.11.87-.13,1.3,0,.11-.03.22-.03.33-.03.73.02,1.44.12,2.16.02.19.06.38.09.57.13.74.31,1.48.57,2.19,0,0,0,0,0,0,0,.02.01.03.02.04.2.53.43,1.04.7,1.53.12.22.26.42.38.63.17.28.33.56.52.82.17.23.35.44.54.66.18.22.36.44.56.65.2.21.42.4.63.6.16.14.29.3.46.43l330.39,274c.08.07.17.12.25.18.32.25.65.49.99.71.15.09.29.19.44.28.44.26.9.5,1.37.7.04.02.08.04.12.06.51.21,1.03.39,1.56.53.17.05.35.08.53.12.24.06.47.12.71.16.23.04.46.07.69.1.47.05.95.08,1.42.08.15,0,.3-.02.45-.02.32-.01.65-.02.97-.06.18-.02.36-.06.54-.08.29-.04.58-.09.86-.15.19-.04.38-.1.56-.15.28-.08.55-.16.82-.25.08-.03.15-.04.23-.07l402.48-149.13s.06-.03.09-.04c.39-.15.76-.32,1.13-.51.12-.06.24-.1.35-.16.44-.24.88-.51,1.29-.8.03-.02.06-.04.09-.06.55-.39,1.07-.85,1.56-1.34.83-.82,1.54-1.76,2.11-2.78.09-.17.19-.33.27-.5.32-.64.61-1.3.82-2,.03-.11.05-.22.08-.33.12-.42.23-.84.3-1.27l72.09-423.12c.02-.11.02-.22.03-.33.05-.34.08-.67.1-1.01ZM771.44,701.13l-101.05-83.8,158.61-254.06-57.56,337.86ZM121.2,242.67l65.53,292.26-123.1,45.61,57.57-337.87ZM656.65,591.33l-141.37-381.56,317.59,99.3-176.22,282.26ZM508.76,181.1l22.05-129.41,263.81,218.79-285.86-89.37ZM483.7,176.83l-299.33-10.33L505.75,47.42l-22.05,129.41ZM208.31,514.94l-72.81-324.69,332.56,11.48-259.75,313.21ZM490.1,214.98l144.06,388.81-382.98-65.25-25.77-4.39L490.1,214.98ZM246.9,563.6l379.17,64.6-244.79,225.4-156.33-293.74,21.95,3.74ZM654.16,636.9l101.05,83.8-321.38,119.08,220.33-202.88ZM72.47,604.37l123.1-45.61,140.72,264.4-84.17-69.81-179.65-148.98Z\"/></svg>","/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\nimport xyoOSIconImport from './xyoOS-Icon.svg'\n\n// See src/img/backgrounds/index.ts — pin the public type for downstream consumers.\nexport const XyoOSIcon = xyoOSIconImport as string\n","import { a, useTrail } from '@react-spring/web'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport React from 'react'\n\ninterface TextTrailProps extends FlexBoxProps {\n open: boolean\n}\n\nexport const TextTrail: React.FC<TextTrailProps> = ({ open, children }) => {\n const items = React.Children.toArray(children)\n const trail = useTrail(items.length, {\n config: {\n friction: 200, mass: 5, tension: 2000,\n },\n from: {\n height: 'auto', opacity: 0, y: 20,\n },\n height: 'auto',\n opacity: open ? 1 : 0,\n y: open ? 0 : 60,\n })\n return (\n <div>\n {trail.map(({ height, ...style }, index) => (\n <a.div key={index} style={style}>\n <a.div style={{ height }}>\n {items[index]}\n </a.div>\n </a.div>\n ))}\n </div>\n )\n}\n","import type { ContainerProps } from '@mui/material'\nimport { Container } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nexport interface ContainerFlexboxProps extends PropsWithChildren, FlexBoxProps {\n containerProps?: ContainerProps\n scrollable?: boolean\n}\n\nexport const ContainerFlexbox: React.FC<ContainerFlexboxProps> = ({\n children, containerProps, scrollable = true, ...props\n}) => {\n return (\n <FlexCol\n id=\"container-flexbox\"\n alignItems=\"center\"\n justifyContent=\"start\"\n width=\"100%\"\n pt={2}\n gap={2}\n overflow={scrollable ? 'auto' : 'unset'}\n {...props}\n >\n <Container {...containerProps}>{children}</Container>\n </FlexCol>\n )\n}\n","import type { Breakpoint, TypographyProps } from '@mui/material'\nimport { Container, Typography } from '@mui/material'\nimport { ThrownErrorBoundary } from '@xylabs/react-error'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport type { ModuleError } from '@xyo-network/payload-model'\nimport React from 'react'\nimport type Rollbar from 'rollbar'\n\nimport { NetworkReadyFlexBox } from '../../network/index.ts'\nimport { ErrorRenderWithSupportDefault } from '../Alert/index.ts'\n\nexport interface SharedDappPageProps extends FlexBoxProps {\n checkNetwork?: boolean\n noScroll?: boolean\n subtitle?: string\n titleProps?: TypographyProps\n}\n\nexport interface DappPageProps extends SharedDappPageProps {\n container?: true | Breakpoint\n rollbar?: Rollbar\n}\n\nexport const DappTitle: React.FC<SharedDappPageProps> = ({\n subtitle, title, ...props\n}) => {\n return title\n ? (\n <FlexCol alignItems=\"flex-start\" gap={1} {...props}>\n <Typography variant=\"h3\">\n <b>{title}</b>\n </Typography>\n <Typography gutterBottom variant=\"subtitle2\">\n {subtitle}\n </Typography>\n </FlexCol>\n )\n : null\n}\n\nconst InnerDappPage: React.FC<SharedDappPageProps> = ({\n noScroll, children, subtitle, title, sx, titleProps, ...props\n}) => {\n return (\n <FlexCol\n id=\"innerPage\"\n sx={{\n margin: 2,\n ...sx,\n }}\n gap={noScroll ? 0 : 2}\n alignItems=\"stretch\"\n justifyContent=\"flex-start\"\n {...props}\n >\n {title\n ? <DappTitle subtitle={subtitle} title={title} {...titleProps} />\n : null}\n {children}\n </FlexCol>\n )\n}\n// This component is written to be used inside of a DappWindow Component\nexport const DappPage: React.FC<DappPageProps> = ({\n checkNetwork, noScroll, subtitle, title, container, rollbar, ...props\n}) => {\n return (\n <ThrownErrorBoundary<ModuleError>\n errorComponent={(error, boundaryName) => <ErrorRenderWithSupportDefault scope={boundaryName} error={error} />}\n rollbar={rollbar}\n scope=\"DappPage\"\n >\n <NetworkReadyFlexBox skipCheck={!checkNetwork}>\n {container\n ? (\n <Container disableGutters maxWidth={container === true ? 'md' : container}>\n {noScroll\n ? (\n <FlexCol sx={{\n position: 'absolute', top: 0, left: 0, right: 0, bottom: 0,\n }}\n >\n <InnerDappPage noScroll={noScroll} title={title} subtitle={subtitle} {...props} flexGrow={1} />\n </FlexCol>\n )\n : (\n <FlexCol width=\"100%\" height=\"100%\" alignItems=\"stretch\">\n <InnerDappPage noScroll={noScroll} title={title} subtitle={subtitle} {...props} flexGrow={1} />\n </FlexCol>\n )}\n </Container>\n )\n : noScroll\n ? (\n <InnerDappPage\n sx={{\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n }}\n noScroll={noScroll}\n title={title}\n subtitle={subtitle}\n {...props}\n flexGrow={1}\n />\n )\n : <InnerDappPage noScroll={noScroll} title={title} subtitle={subtitle} {...props} flexGrow={1} />}\n </NetworkReadyFlexBox>\n </ThrownErrorBoundary>\n )\n}\n","import { SignalCellularAltOutlined } from '@mui/icons-material'\nimport { Tooltip, useTheme } from '@mui/material'\nimport { useIsDark } from '@xylabs/react-theme'\nimport React from 'react'\n\nimport { useOsNetwork } from '../hooks/index.ts'\nimport { StyledNetworkLoadingIndicator } from './StyledLoadingIndicator.js'\n\nconst WaitingForNetwork: React.FC = () => (\n <Tooltip title=\"Waiting for Network initialization\">\n <StyledNetworkLoadingIndicator />\n </Tooltip>\n)\n\nexport interface NetworkLoadingIndicatorProps {\n // helps with contrast on bright backgrounds for dark mode\n highContrast?: boolean\n}\n\nexport const NetworkLoadingIndicator: React.FC<NetworkLoadingIndicatorProps> = ({ highContrast }) => {\n const darkMode = useIsDark()\n const theme = useTheme()\n const { networkReady } = useOsNetwork()\n\n const highContrastSuccessColor = darkMode ? theme.vars?.palette.success.dark : theme.vars?.palette.success.main\n const successColor = highContrast ? highContrastSuccessColor : theme.vars?.palette.success.main\n\n const highContrastErrorColor = darkMode ? theme.vars?.palette.success.dark : theme.vars?.palette.error.main\n const errorColor = highContrast ? highContrastErrorColor : theme.vars?.palette.error.main\n\n if (!networkReady) {\n return <WaitingForNetwork />\n }\n\n const connectionReady = true\n return connectionReady\n ? (\n <Tooltip title=\"Connected to Network\">\n <SignalCellularAltOutlined sx={{ color: successColor }} />\n </Tooltip>\n )\n : (\n <Tooltip title=\"Error Connecting to Network\">\n <SignalCellularAltOutlined sx={{ color: errorColor }} />\n </Tooltip>\n )\n}\n","import { OsPubSubNetworkReadyEvent } from '@xyo-network/os-runtime'\nimport { useMemo } from 'react'\n\nimport { useStackReady } from '../../stack/index.ts'\nimport { useXyOsUiContext } from '../../XyOsUi/index.ts'\nimport { createNetworkState, type NetworkState } from './lib/index.ts'\n\nexport const useOsNetwork = () => {\n const context = useXyOsUiContext()\n const stackReady = useStackReady(OsPubSubNetworkReadyEvent, 'osPubSubNetworkStack', context)\n\n const networkState = useMemo<NetworkState>(() => {\n return createNetworkState(stackReady)\n }, [context, stackReady])\n\n return networkState\n}\n","import { assertEx } from '@xylabs/sdk-js'\n\nimport type { StackReady } from '../../../../interfaces/index.ts'\nimport type { NetworkState } from './NetworkState.ts'\n\nconst defaultNetworkState: NetworkState = {\n connected: false, error: undefined, networkReady: false,\n}\n\nexport const createNetworkState = (stackReady?: StackReady) => {\n const { ready, stack } = stackReady ?? {}\n if (ready) {\n const foundStack = assertEx(stack, () => 'stack said it was ready but no stack found')\n return {\n connected: true, error: undefined, networkReady: true, stack: foundStack,\n }\n } else {\n return defaultNetworkState\n }\n}\n","import { OsXyoPublicNetworkReadyEvent } from '@xyo-network/os-runtime'\nimport { useMemo } from 'react'\n\nimport { useStackReady } from '../../stack/index.ts'\nimport { useXyOsUiContext } from '../../XyOsUi/index.ts'\nimport { createNetworkState, type NetworkState } from './lib/index.ts'\n\nexport const useXyoPublicNetwork = () => {\n const context = useXyOsUiContext()\n const stackReady = useStackReady(OsXyoPublicNetworkReadyEvent, 'xyoPublicNetworkStack', context)\n\n const networkState = useMemo<NetworkState>(() => {\n return createNetworkState(stackReady)\n }, [context, stackReady])\n\n return networkState\n}\n","import { styled } from '@mui/material'\n\n// Inspired by https://codepen.io/andrewarchi/pen/ExVQmQm\nexport const StyledNetworkLoadingIndicator = styled('div', { name: 'StyledNetworkLoadingIndicator' })(({ theme }) => ({\n '&': {\n '--Loader-color': '#fff',\n '--Loader-offset': theme.spacing(0.1667),\n '--Loader-size': theme.spacing(1.5),\n '--Loader-timing': 'ease-in-out',\n 'alignItems': 'center',\n 'display': 'flex',\n 'justifyContent': 'center',\n 'marginBottom': 'calc(var(--Loader-size) / 2)',\n 'marginTop': 'calc(var(--Loader-size) / 2)',\n 'minHeight': 'var(--Loader-size)',\n 'minWidth': 'var(--Loader-size)',\n 'position': 'relative',\n 'width': '100%',\n },\n '&:after': {\n animationName: 'pulsB',\n boxShadow: '0 0 0 0 var(--Loader-color)',\n paddingBottom: 'calc(100% - var(--Loader-offset) * 2)',\n width: 'calc(100% - var(--Loader-offset) * 2)',\n },\n '&:before': {\n animationName: 'pulsA',\n boxShadow: 'inset 0 0 0 var(--Loader-offset) var(--Loader-color)',\n paddingBottom: '100%',\n width: '100%',\n },\n '&:before, &:after': {\n animationDuration: '1.8s',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'var(--Loader-timing)',\n borderRadius: '50%',\n content: '\"\"',\n filter: 'drop-shadow(0 0 var(--Loader-offset)/2.25 rgba(var(--Loader-color), 0.75))',\n position: 'absolute',\n },\n '@keyframes pulsA': {\n '0%': { boxShadow: 'inset 0 0 0 var(--Loader-offset) var(--Loader-color)' },\n '50%, 100%': { boxShadow: 'inset 0 0 0 0 var(--Loader-color)' },\n },\n '@keyframes pulsB': {\n '0%, 50%': { boxShadow: '0 0 0 0 var(--Loader-color)' },\n '100%': { boxShadow: '0 0 0 var(--Loader-offset) var(--Loader-color)' },\n },\n}))\n","import { NotInterested } from '@mui/icons-material'\nimport type { ButtonProps } from '@mui/material'\nimport { Button } from '@mui/material'\nimport React from 'react'\n\nimport { useOsNetwork } from '../hooks/index.ts'\n\nexport const NetworkButton: React.FC<ButtonProps> = ({\n disabled, startIcon, ...props\n}) => {\n const { networkReady } = useOsNetwork()\n\n return (\n <Button\n disabled={disabled === true || !networkReady}\n startIcon={(\n <>\n {startIcon}\n {networkReady === false\n ? <NotInterested />\n : null}\n </>\n )}\n {...props}\n />\n )\n}\n","import { Typography } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport { LoadingOsLogo } from '../../LoadingOsLogo/index.ts'\nimport { useOsNetwork } from '../hooks/index.ts'\n\nexport interface NetworkReadyFlexBoxProps extends PropsWithChildren, FlexBoxProps {\n skipCheck?: boolean\n}\n\nexport const NetworkReadyFlexBox: React.FC<NetworkReadyFlexBoxProps> = ({\n children, skipCheck, ...props\n}) => {\n const { networkReady } = useOsNetwork()\n\n return (\n <>\n {networkReady || skipCheck\n ? children\n : (\n <FlexCol height=\"100%\" {...props}>\n <LoadingOsLogo widthInPixels={100} busy />\n <Typography fontFamily=\"monospace\">Loading XYO Name Service...</Typography>\n </FlexCol>\n )}\n </>\n )\n}\n","import { animated, useTransition } from '@react-spring/web'\nimport { ErrorRender } from '@xylabs/react-error'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nexport interface PathToComponent<PathNames extends string = string> {\n component: ReactNode\n path: PathNames\n}\n\nexport interface DappPathSwitcherProps {\n activePath?: string\n pathToComponent?: PathToComponent[]\n}\n\nconst resolveActiveComponent = (activePathRef: string | undefined, pathToComponent?: PathToComponent[]): ReactNode => {\n const activeIndex = pathToComponent?.findIndex(({ path: componentPath }) => activePathRef === componentPath)\n const activeItem = pathToComponent && activeIndex !== -1 && activeIndex !== undefined ? pathToComponent[activeIndex] : undefined\n return activeItem\n ? activeItem.component\n : <ErrorRender error={new Error(`No component found for path: ${activePathRef}`)} scope=\"DappPathSwitcher\" />\n}\n\nexport const DappPathSwitcher: React.FC<DappPathSwitcherProps> = ({ activePath, pathToComponent }) => {\n // inspired by - https://codesandbox.io/p/sandbox/react-spring-page-transition-3vrk8\n const transitions = useTransition(activePath, {\n enter: { opacity: 1, transform: 'translate3d(0, 0, 0)' },\n from: { opacity: 0, transform: 'translate3d(100vw, 0, 0)' },\n leave: { opacity: 0, transform: 'translate3d(0, 0, 0)' },\n })\n const possibleZIndex = pathToComponent?.findIndex(item => item.path === activePath)\n const zIndex = possibleZIndex !== -1 && possibleZIndex !== undefined ? possibleZIndex : 1\n\n return (\n <>\n {transitions((transitionProps, activePathRef) => (\n <animated.div\n style={{\n ...transitionProps,\n alignItems: 'stretch',\n bottom: 0,\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'stretch',\n left: 0,\n overflowX: 'hidden',\n overflowY: 'auto',\n position: 'absolute',\n right: 0,\n top: 0,\n zIndex,\n }}\n >\n {resolveActiveComponent(activePathRef, pathToComponent)}\n </animated.div>\n ))}\n </>\n )\n}\n","import {\n Divider, Fade, styled,\n} from '@mui/material'\nimport type { DappIntent, InstallationType } from '@xyo-network/os-model'\nimport type { RegisteredReactDappSet } from '@xyo-network/os-react-model'\nimport React, { useMemo } from 'react'\n\nimport { DappInstallTypeFilters } from '../../../utils/index.ts'\nimport { DappContainerMemo } from '../Container.tsx'\nimport { DividerChip } from './DividerChip.js'\n\nexport interface DappsRowProps {\n chipLabel: string\n currentIntent?: DappIntent\n installType: InstallationType\n registeredDappsSet?: RegisteredReactDappSet[]\n xnsNetwork: string | undefined\n xnsNodeUrl: string | undefined\n}\n\nexport const DappsRow: React.FC<DappsRowProps> = ({\n chipLabel, currentIntent, installType, registeredDappsSet, xnsNetwork, xnsNodeUrl,\n}) => {\n const filteredRegisteredDappSets = useMemo(() => DappInstallTypeFilters[installType](registeredDappsSet), [installType, registeredDappsSet])\n\n return (\n <>\n <Divider\n variant=\"middle\"\n sx={{ marginY: 3 }}\n flexItem\n >\n <DividerChip\n label={`${filteredRegisteredDappSets === undefined ? 'Loading ' : ''}${chipLabel}`}\n registeredDapps={filteredRegisteredDappSets}\n />\n </Divider>\n {filteredRegisteredDappSets?.length\n ? (\n <Fade in={!!filteredRegisteredDappSets?.length} timeout={1000}>\n <StyledGridContainer>\n {filteredRegisteredDappSets?.map(\n dappSet => (\n <DappContainerMemo\n currentIntent={currentIntent}\n key={dappSet.dapp.config.name}\n dappSet={dappSet as RegisteredReactDappSet}\n xnsNodeUrl={xnsNodeUrl}\n xnsNetwork={xnsNetwork}\n />\n ),\n )}\n </StyledGridContainer>\n </Fade>\n )\n : null}\n </>\n )\n}\n\nexport const StyledGridContainer = styled('div', { name: 'StyledGridContainer' })(({ theme }) => ({\n display: 'grid',\n gridGap: theme.spacing(2),\n gridTemplateColumns: `repeat(auto-fit, ${theme.spacing(8)})`,\n justifyContent: 'center',\n justifyItems: 'center',\n paddingTop: theme.spacing(1),\n width: '100%',\n}))\n","import type { ChipProps } from '@mui/material'\nimport { Chip, CircularProgress } from '@mui/material'\nimport type { RegisteredDappSet } from '@xyo-network/os-model'\nimport React from 'react'\n\nexport interface DividerChipProps extends ChipProps {\n registeredDapps?: RegisteredDappSet[]\n}\n\nexport const DividerChip: React.FC<DividerChipProps> = ({ registeredDapps, ...props }) => {\n return (\n <Chip\n avatar={\n registeredDapps === undefined\n ? (\n <span>\n <CircularProgress\n size=\"small\"\n sx={{ display: 'inline' }}\n />\n </span>\n )\n : undefined\n }\n label={`${registeredDapps?.length ? '' : 'Loading '}Beta dApps`}\n size=\"small\"\n sx={{ gap: 0.5 }}\n {...props}\n />\n )\n}\n","// Inspired by https://www.joshwcomeau.com/react/rotate/#bonus-that-star-animation-8\n\nimport { animated, useSpring } from '@react-spring/web'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport React, { useEffect, useState } from 'react'\n\nexport interface ShiftAnimationProps extends FlexBoxProps {\n animationDirection: Direction\n startAnimation?: boolean\n}\n\ntype Direction = 'wiggle' | 'jump' | 'up' | 'down' | 'left' | 'right'\ninterface PointData {\n FromXMovement?: Readonly<number>\n FromYMovement?: Readonly<number>\n ToXMovement?: Readonly<number>\n ToYMovement?: Readonly<number>\n}\nconst MovementData: Readonly<Record<Direction, readonly PointData[]>> = {\n down: [\n {\n FromYMovement: 0,\n ToYMovement: -3,\n },\n {\n FromYMovement: -3,\n ToYMovement: 0,\n },\n ],\n jump: [\n {\n FromYMovement: 0,\n ToYMovement: -3,\n },\n {\n FromYMovement: -3,\n ToYMovement: 0,\n },\n ],\n left: [\n {\n FromXMovement: 0,\n ToXMovement: -3,\n },\n {\n FromXMovement: -3,\n ToXMovement: 0,\n },\n ],\n right: [\n {\n FromXMovement: 0,\n ToXMovement: -3,\n },\n {\n FromXMovement: -3,\n ToXMovement: 0,\n },\n ],\n up: [\n {\n FromYMovement: 0,\n ToYMovement: -3,\n },\n {\n FromYMovement: -3,\n ToYMovement: 0,\n },\n ],\n wiggle: [\n {\n FromXMovement: 0,\n ToXMovement: -3,\n },\n {\n FromXMovement: -3,\n ToXMovement: 0,\n },\n ],\n}\n\nexport const ShiftAnimation: React.FC<ShiftAnimationProps> = ({\n startAnimation = false, animationDirection, children,\n}) => {\n const [isShifted, setIsShifted] = useState(startAnimation)\n const anim = useSpring({\n backfaceVisibility: 'hidden',\n config: {\n friction: 10,\n tension: 300,\n },\n from: {\n x: startAnimation ? MovementData[animationDirection][1].FromXMovement : 0,\n y: startAnimation ? MovementData[animationDirection][1].FromYMovement : 0,\n },\n reset: true,\n to: {\n x: startAnimation ? MovementData[animationDirection][0].FromXMovement : 0,\n y: startAnimation ? MovementData[animationDirection][0].FromYMovement : 0,\n },\n })\n\n useEffect(() => {\n if (!isShifted) {\n return\n }\n const timeoutId = globalThis.setTimeout(() => {\n setIsShifted(false)\n }, 5)\n return () => {\n globalThis.clearTimeout(timeoutId)\n }\n }, [isShifted])\n\n return <animated.div style={anim}>{children}</animated.div>\n}\n","import { FiberManualRecordRounded } from '@mui/icons-material'\nimport type { BoxProps } from '@mui/material'\nimport { Box, useTheme } from '@mui/material'\nimport { alphaCss } from '@xylabs/react-theme'\nimport React from 'react'\n\nexport const TwoToneBulletPoint: React.FC<BoxProps> = (props) => {\n const theme = useTheme()\n return (\n <Box {...props}>\n <FiberManualRecordRounded\n fontSize=\"small\"\n sx={{\n '&:hover': { padding: 0.2 },\n 'backgroundColor': alphaCss(theme.vars?.palette.secondary.main ?? '#000', 0.2),\n 'borderRadius': 2,\n 'padding': 0.4,\n }}\n color=\"primary\"\n />\n </Box>\n )\n}\n","import { FlexCol, FlexGrowRow } from '@xylabs/react-flexbox'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nimport { TwoToneBulletPoint } from './TwoToneBulletPoint.tsx'\n\nexport interface TwoToneBulletPointListProps {\n list: ReactNode[]\n}\n\nexport const TwoToneBulletPointList: React.FC<TwoToneBulletPointListProps> = ({ list }) => {\n return (\n <FlexCol alignItems=\"flex-start\" gap={1}>\n {list.map((item, index) => {\n return (\n <FlexGrowRow key={index + 'bulletPointList'} alignItems=\"flex-start\" justifyContent=\"flex-start\" gap={1}>\n <TwoToneBulletPoint marginTop=\"4px\" />\n {item}\n </FlexGrowRow>\n )\n })}\n </FlexCol>\n )\n}\n","import type { StandardTextFieldProps } from '@mui/material'\nimport { FormControl, TextField } from '@mui/material'\nimport { LabeledTextFieldWrapper } from '@xyo-network/react-shared'\nimport type { ChangeEventHandler, FocusEventHandler } from 'react'\nimport React, { useState } from 'react'\n\nexport interface CoinbaseEmailInputProps extends StandardTextFieldProps {\n existingEmail?: string\n}\n\nexport const CoinbaseEmailInput: React.FC<CoinbaseEmailInputProps> = ({ existingEmail, ...props }) => {\n const [email, setEmail] = useState(existingEmail)\n const [valid, setValid] = useState<boolean | undefined>()\n\n const handleBlur: FocusEventHandler<HTMLInputElement> = (event) => {\n setValid(!!event.target.value)\n }\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n const emailFromEvent = event.target.value\n setValid(!!emailFromEvent)\n setEmail(emailFromEvent)\n }\n return (\n <FormControl fullWidth>\n <LabeledTextFieldWrapper label=\"Primary Cryptowallet\">\n <TextField\n fullWidth\n variant=\"filled\"\n error={valid === false}\n hiddenLabel\n onBlur={handleBlur}\n value={email}\n onChange={handleChange}\n size=\"small\"\n {...props}\n />\n </LabeledTextFieldWrapper>\n </FormControl>\n )\n}\n","import type { StandardTextFieldProps } from '@mui/material'\nimport { FormControl, TextField } from '@mui/material'\nimport { LabeledTextFieldWrapper } from '@xyo-network/react-shared'\nimport type { ChangeEventHandler, FocusEventHandler } from 'react'\nimport React, { useState } from 'react'\n\nexport interface PrimaryCryptoWalletInputProps extends StandardTextFieldProps {\n existingPrimaryCryptoWallet?: string\n}\n\nexport const PrimaryCryptoWalletInput: React.FC<PrimaryCryptoWalletInputProps> = ({ existingPrimaryCryptoWallet, ...props }) => {\n const [primaryWallet, setPrimaryWallet] = useState(existingPrimaryCryptoWallet)\n const [valid, setValid] = useState<boolean | undefined>()\n\n const handleBlur: FocusEventHandler<HTMLInputElement> = (event) => {\n setValid(!!event.target.value)\n }\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n const nameFromEvent = event.target.value\n setValid(!!nameFromEvent)\n setPrimaryWallet(nameFromEvent)\n }\n return (\n <FormControl fullWidth>\n <LabeledTextFieldWrapper label=\"Primary Cryptowallet\">\n <TextField\n fullWidth\n variant=\"filled\"\n error={valid === false}\n hiddenLabel\n onBlur={handleBlur}\n value={primaryWallet}\n onChange={handleChange}\n size=\"small\"\n required\n {...props}\n />\n </LabeledTextFieldWrapper>\n </FormControl>\n )\n}\n","import type { StandardTextFieldProps } from '@mui/material'\nimport { FormControl, TextField } from '@mui/material'\nimport { LabeledTextFieldWrapper } from '@xyo-network/react-shared'\nimport type { ChangeEventHandler, FocusEventHandler } from 'react'\nimport React, { useState } from 'react'\n\nexport interface SecondaryCryptoWalletInputProps extends StandardTextFieldProps {\n existingSecondaryCryptoWallet?: string\n}\n\nexport const SecondaryCryptoWalletInput: React.FC<SecondaryCryptoWalletInputProps> = ({ existingSecondaryCryptoWallet, ...props }) => {\n const [secondaryWallet, setSecondaryWallet] = useState(existingSecondaryCryptoWallet)\n const [valid, setValid] = useState<boolean | undefined>()\n\n const handleBlur: FocusEventHandler<HTMLInputElement> = (event) => {\n setValid(!!event.target.value)\n }\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n const walletFromEvent = event.target.value\n setValid(!!walletFromEvent)\n setSecondaryWallet(walletFromEvent)\n }\n return (\n <FormControl fullWidth>\n <LabeledTextFieldWrapper label=\"Secondary Cryptowallet\">\n <TextField\n variant=\"filled\"\n fullWidth\n error={valid === false}\n hiddenLabel\n onBlur={handleBlur}\n value={secondaryWallet}\n onChange={handleChange}\n size=\"small\"\n required\n {...props}\n />\n </LabeledTextFieldWrapper>\n </FormControl>\n )\n}\n","import { Grid } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FormGroupCreditCardProvider } from '@xyo-network/react-form-credit-card'\nimport React from 'react'\n\nimport { DappPage } from '../../../Dapp/index.ts'\nimport { AccountCard } from './AccountCard.tsx'\nimport {\n CoinbaseEmailInput, PrimaryCryptoWalletInput, SecondaryCryptoWalletInput,\n} from './InputFields/index.ts'\n\nexport const PaymentMethods: React.FC<FlexBoxProps> = () => {\n return (\n <DappPage title=\"Payment Methods\">\n <Grid container spacing={3}>\n <Grid size={{ xs: 12 }}>\n <AccountCard\n sx={{ height: '100%' }}\n items={[\n {\n // TODO - needs a default implementation\n component: (\n <FormGroupCreditCardProvider>\n null\n </FormGroupCreditCardProvider>\n ),\n desc: 'Save a credit card to your node to complete credit payments seamlessly.',\n title: 'Credit Card',\n },\n {\n component: <CoinbaseEmailInput />,\n desc: 'Use your Coinbase Account receive payments easily.',\n title: 'Coinbase Email',\n },\n {\n component: <PrimaryCryptoWalletInput />,\n desc: 'This is the primary crypto wallet on your node.',\n title: 'Primary Crypto Wallet',\n },\n {\n component: <SecondaryCryptoWalletInput />,\n desc: 'This is the secondary crypto wallet on your node.',\n title: 'Secondary Crypto Wallet',\n },\n ]}\n />\n </Grid>\n </Grid>\n </DappPage>\n )\n}\n","import type { CardProps } from '@mui/material'\nimport {\n Card, CardContent, Divider, Typography,\n} from '@mui/material'\nimport { FlexGrowCol, FlexGrowRow } from '@xylabs/react-flexbox'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\ninterface AccountSectionProps {\n component?: ReactNode\n desc: string\n title: string\n}\n\ninterface AccountCardProps extends CardProps {\n items: AccountSectionProps[]\n}\n\nexport const AccountCard: React.FC<AccountCardProps> = ({ items, ...props }) => {\n return (\n <Card {...props}>\n <CardContent>\n <FlexGrowCol width=\"100%\" gap={2}>\n {items.map((item, index) => {\n return (\n <FlexGrowCol gap={2} key={index} width=\"100%\" alignItems=\"stretch\">\n <FlexGrowRow\n sx={{\n alignItems: 'stretch',\n flexDirection: { md: 'row', xs: 'column' },\n justifyContent: 'space-between',\n }}\n gap={2}\n >\n <FlexGrowCol\n alignItems=\"flex-start\"\n width=\"100%\"\n sx={{ maxWidth: { md: '40%', xs: '100%' } }}\n >\n <Typography variant=\"h5\" gutterBottom>\n {item.title}\n </Typography>\n <Typography variant=\"body1\" gutterBottom>\n {item.desc}\n </Typography>\n </FlexGrowCol>\n {item?.component}\n </FlexGrowRow>\n {items.length === 1 || index === items.length - 1 ? null : <Divider flexItem />}\n </FlexGrowCol>\n )\n })}\n </FlexGrowCol>\n </CardContent>\n </Card>\n )\n}\n","import { useWeakArchivistFromNode } from '@xyo-network/react-archivist'\n\nexport const useAccountArchivist = () => {\n return useWeakArchivistFromNode('AccountArchivist')\n}\n","import type { Payload } from '@xyo-network/payload-model'\nimport { asSchema, isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nexport const CreditCardInputSchema = asSchema('network.xyo.credit.card.input', true)\nexport type CreditCardInputSchema = typeof CreditCardInputSchema\n\nexport interface CreditCardInputFields {\n cardNumber: string\n cvc: string\n emailAddress: string\n expiration: string\n firstName: string\n lastName: string\n timestamp: number\n zip: string\n}\n\nexport type CreditCardInput = Payload<CreditCardInputFields, CreditCardInputSchema>\n\nexport const isCreditCardInput = isPayloadOfSchemaType<CreditCardInput>(CreditCardInputSchema)\n","/* eslint-disable @stylistic/max-len */\nimport { createSvgIcon } from '@mui/material'\nimport React from 'react'\n\nexport const XnsDomainIcon = createSvgIcon(\n <svg id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 400 400\">\n <path fill=\"currentColor\" d=\"M0,314.34V85.34h43.89l99.55,152.67V85.34h43.89v229h-43.89L43.89,161.68v152.67H0Z\"></path>\n <path fill=\"currentColor\" d=\"M298.99,319.12c-16.96,0-32.26-3-45.88-8.99-13.62-5.99-24.81-14.58-33.56-25.76-8.75-11.18-14.29-24.52-16.62-40l45.17-6.68c3.18,13.15,9.75,23.27,19.72,30.37,9.96,7.1,21.31,10.65,34.03,10.65,7.1,0,14-1.11,20.67-3.34,6.68-2.23,12.17-5.51,16.46-9.86,4.29-4.35,6.44-9.7,6.44-16.06,0-2.33-.35-4.59-1.03-6.76-.69-2.17-1.83-4.21-3.42-6.12-1.59-1.91-3.84-3.71-6.76-5.41-2.92-1.69-6.6-3.23-11.05-4.61l-59.48-17.49c-4.45-1.27-9.62-3.07-15.5-5.41-5.88-2.33-11.58-5.67-17.1-10.02-5.51-4.35-10.1-10.1-13.76-17.26-3.66-7.16-5.49-16.19-5.49-27.11,0-15.37,3.87-28.15,11.61-38.33,7.74-10.18,18.08-17.76,31.01-22.74,12.93-4.98,27.25-7.42,42.94-7.32,15.8.21,29.9,2.92,42.3,8.11,12.4,5.2,22.79,12.75,31.17,22.66,8.37,9.92,14.42,22.03,18.13,36.34l-46.76,7.95c-1.7-7.42-4.83-13.68-9.38-18.77-4.56-5.09-9.99-8.96-16.3-11.61-6.31-2.65-12.91-4.08-19.8-4.29-6.79-.21-13.17.72-19.16,2.78-5.99,2.07-10.87,5.06-14.63,8.99-3.76,3.92-5.65,8.59-5.65,14,0,4.98,1.54,9.04,4.61,12.17,3.07,3.13,6.94,5.65,11.61,7.55,4.66,1.91,9.44,3.5,14.31,4.77l39.76,10.81c5.94,1.59,12.51,3.68,19.72,6.28,7.21,2.6,14.13,6.2,20.75,10.81,6.62,4.61,12.09,10.68,16.38,18.21,4.29,7.53,6.44,17.07,6.44,28.63,0,12.3-2.57,23.03-7.71,32.2-5.14,9.17-12.06,16.75-20.75,22.74-8.69,5.99-18.53,10.47-29.5,13.44-10.97,2.97-22.29,4.45-33.95,4.45Z\"></path>\n <circle fill=\"#3898e7\" cx=\"372.52\" cy=\"291.63\" r=\"27.48\"></circle>\n </svg>,\n 'XNSDomain',\n)\n","import { InfoOutlined } from '@mui/icons-material'\nimport type { TableHeadProps } from '@mui/material'\nimport {\n TableCell, TableHead, Tooltip,\n} from '@mui/material'\nimport React from 'react'\n\nimport { useVisibleColumns } from '../hooks/index.ts'\nimport type { TableHeadCell } from '../Payload.ts'\nimport { StyledTableRowHeader } from './StyledTableRowHeader.tsx'\n\ninterface TableHeadExProps extends TableHeadProps {\n payloads: TableHeadCell[]\n}\n\nexport const TableHeadEx: React.FC<TableHeadExProps> = ({ payloads, ...props }) => {\n const [VisibleTableCells] = useVisibleColumns(payloads)\n\n return (\n <TableHead {...props}>\n <StyledTableRowHeader>\n {VisibleTableCells.map(headCell => (\n <TableCell\n key={headCell.id}\n align={headCell.align ?? 'left'}\n padding={headCell.disablePadding ? 'none' : 'normal'}\n width={headCell.width ?? 'auto'}\n >\n {headCell.tooltip\n ? (\n <span style={{\n alignItems: 'center', display: 'inline-flex', gap: '4px',\n }}\n >\n {headCell.label}\n <Tooltip title={headCell.tooltip}>\n <InfoOutlined sx={{ fontSize: '16px' }} />\n </Tooltip>\n </span>\n )\n : headCell.label}\n </TableCell>\n ))}\n </StyledTableRowHeader>\n </TableHead>\n )\n}\n","import type { Theme } from '@mui/material'\nimport { useMediaQuery } from '@mui/material'\nimport { useMemo } from 'react'\n\nimport type { TableHeadCell } from '../Payload.ts'\n\nexport const useVisibleColumns = (tableHeadCells: TableHeadCell[]): [TableHeadCell[], boolean] => {\n const isMedium = useMediaQuery((theme: Theme) => theme.breakpoints.down('lg'))\n\n const VisibleTableCells = useMemo(() => {\n return isMedium ? tableHeadCells.filter(cell => cell.showOnMobile) : tableHeadCells\n }, [isMedium, tableHeadCells])\n\n return [VisibleTableCells, isMedium]\n}\n","import { styled, TableRow } from '@mui/material'\n\nexport const StyledTableRowHeader = styled(\n TableRow,\n { name: 'StyledTableRowHeader' },\n)(({ theme }) => ({ '& .MuiTableCell-root': { backgroundColor: theme.vars?.palette.background.paper } }))\n","import type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\nimport type { TableHeadCell as TableHeadCellFields } from '@xyo-network/react-table'\n\nimport { TableHeadCellSchema } from './Schema.ts'\n\nexport type TableHeadCell = Payload<TableHeadCellFields & {\n tooltip?: string\n}, TableHeadCellSchema>\n\nexport const isTableHeadCell = isPayloadOfSchemaType<TableHeadCell>(TableHeadCellSchema)\n","import { asSchema } from '@xyo-network/payload-model'\n\nexport const TableHeadCellSchema = asSchema('network.xyo.table.cell.head', true)\nexport type TableHeadCellSchema = typeof TableHeadCellSchema\n","/* eslint-disable @typescript-eslint/no-misused-promises */\nimport { ArrowCircleLeftOutlined, ArrowCircleRightOutlined } from '@mui/icons-material'\nimport { IconButton, LinearProgress } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport type { PayloadDivinerQueryPayload } from '@xyo-network/diviner-payload-model'\nimport React from 'react'\n\nexport interface NextIteratorFlexboxProps extends FlexBoxProps {\n loading?: boolean\n next: (order: PayloadDivinerQueryPayload['order']) => Promise<void>\n}\n\nexport const NextIteratorFlexbox: React.FC<NextIteratorFlexboxProps> = ({\n next: changePage, loading, ...props\n}) => {\n return (\n <FlexRow justifyContent=\"space-between\" gap={2} {...props}>\n <LinearProgress sx={{\n display: 'flex', flexGrow: 1, visibility: loading ? 'visible' : 'hidden',\n }}\n />\n <FlexRow>\n <IconButton onClick={() => changePage('asc')}>\n <ArrowCircleLeftOutlined />\n </IconButton>\n <IconButton onClick={() => changePage('desc')}>\n <ArrowCircleRightOutlined />\n </IconButton>\n </FlexRow>\n </FlexRow>\n )\n}\n","import {\n ArrowForwardRounded, HistoryRounded, RefreshRounded,\n} from '@mui/icons-material'\nimport {\n Box, CardContent, IconButton, Tooltip, Typography, useTheme,\n} from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport {\n FlexCol, FlexGrowRow, FlexRow,\n} from '@xylabs/react-flexbox'\nimport { alphaCss } from '@xylabs/react-theme'\nimport type { SimpleCardProps } from '@xyo-network/react-card'\nimport { CardEx } from '@xyo-network/react-card'\nimport { DateTime } from 'luxon'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nexport interface WidgetCardProps extends SimpleCardProps {\n timeOfData: number\n widgetContent: ReactNode\n widgetName: string\n widgetPath: string\n}\n\nexport const WidgetCard: React.FC<WidgetCardProps> = ({\n widgetName, widgetContent, widgetPath, timeOfData = 1_715_875_087, ...props\n}) => {\n const theme = useTheme()\n\n const formatTimeOfData = () => {\n const timeNow = DateTime.now().toSeconds()\n const secondsSinceDataRefreshed: number = timeNow - timeOfData\n\n const getYearsAndMonths = () => {\n const years = Math.floor(secondsSinceDataRefreshed / 31_536_000)\n const months = Math.ceil((secondsSinceDataRefreshed - years * 31_536_000) / 2_628_288)\n if (months === 12) {\n return `${years + 1} Years Ago`\n } else if (years > 1 && months > 1) {\n return `${years} Years, ${months} Months Ago`\n } else if (years === 1 && months > 1) {\n return `${years} Year, ${months} Months Ago`\n } else if (years > 1 && months === 1) {\n return `${years} Years, ${months} Month Ago`\n } else if (years === 1 && months === 1) {\n return `${years} Year, ${months} Month Ago`\n } else {\n return `About ${years} Years Ago`\n }\n }\n\n if (secondsSinceDataRefreshed < 60) {\n return 'Less than 1 Minute Ago'\n } else if (secondsSinceDataRefreshed < 3600) {\n return `${DateTime.fromSeconds(secondsSinceDataRefreshed).toFormat('m')} Minutes Ago`\n } else if (secondsSinceDataRefreshed < 86_400) {\n return `${Math.ceil(secondsSinceDataRefreshed / 3600)} Hours Ago`\n } else if (secondsSinceDataRefreshed < 2_628_288) {\n return `${Math.ceil(secondsSinceDataRefreshed / 86_400)} Days Ago`\n } else if (secondsSinceDataRefreshed < 31_536_000) {\n return `${Math.ceil(secondsSinceDataRefreshed / 2_628_288)} Months Ago`\n } else {\n return getYearsAndMonths()\n }\n }\n\n return (\n <CardEx\n {...props}\n sx={{\n backgroundColor: alphaCss(theme.vars?.palette.background.paper ?? '#000', 0.4),\n display: 'flex',\n height: '300px',\n width: '300px',\n }}\n >\n <CardContent sx={{ height: '100%', padding: 1 }}>\n <FlexCol sx={{\n alignItems: 'stretch', height: '100%', justifyContent: 'space-between',\n }}\n >\n <FlexCol alignItems=\"stretch\">\n <FlexGrowRow justifyContent=\"space-between\" alignItems=\"center\">\n <Typography color={theme.vars?.palette.text.primary} fontWeight={theme.typography.fontWeightMedium} variant=\"h6\">\n {widgetName}\n </Typography>\n <IconButton>\n <RefreshRounded />\n </IconButton>\n </FlexGrowRow>\n <Box paddingY={2}>{widgetContent}</Box>\n </FlexCol>\n <FlexRow justifyContent=\"space-between\" alignItems=\"center\">\n <Tooltip title={DateTime.fromSeconds(timeOfData).toFormat('DD ttt')}>\n <FlexRow\n gap={0.5}\n sx={{ opacity: 0.5 }}\n >\n <HistoryRounded fontSize=\"small\" color=\"inherit\" />\n <Typography variant=\"body2\">{formatTimeOfData()}</Typography>\n </FlexRow>\n </Tooltip>\n <ButtonEx size=\"small\" to={widgetPath}>\n <ArrowForwardRounded fontSize=\"small\" />\n </ButtonEx>\n </FlexRow>\n </FlexCol>\n </CardContent>\n </CardEx>\n )\n}\n","import { Stack } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { useIsDark } from '@xylabs/react-theme'\nimport React from 'react'\n\nimport { xyoDark, xyoLight } from '../../img/index.ts'\nimport { DappPage } from '../Dapp/index.ts'\nimport { StackOfWidgets } from './StackOfWidgets.tsx'\nimport {\n ExampleBarGraphWidget, ExampleBooleanTableWidget, ExampleTwoColTwoStatWidget,\n} from './Types/index.ts'\n\nexport const WidgetCardExamples: React.FC<FlexBoxProps> = () => {\n // resolve the default name code for the palette\n const darkMode = useIsDark()\n\n return (\n <DappPage\n sx={{ backgroundImage: darkMode ? `url(${xyoDark})` : `url(${xyoLight})`, backgroundSize: 'cover' }}\n container=\"xl\"\n title=\"Example Widget Cards\"\n >\n <Stack gap={2} flexDirection=\"row\" flexWrap=\"wrap\">\n <ExampleTwoColTwoStatWidget />\n <ExampleBarGraphWidget />\n <ExampleBooleanTableWidget />\n <StackOfWidgets />\n </Stack>\n </DappPage>\n )\n}\n","// Example from https://codesandbox.io/p/sandbox/cards-stack-to6uf?\nimport { Box, useTheme } from '@mui/material'\nimport {\n animated, to as interpolate, useSprings,\n} from '@react-spring/web'\nimport { alphaCss } from '@xylabs/react-theme'\nimport type { ReactNode } from 'react'\nimport React, { useState } from 'react'\nimport { useDrag } from 'react-use-gesture'\n\nimport {\n ExampleBarGraphWidget, ExampleBooleanTableWidget, ExampleTwoColTwoStatWidget,\n} from './Types/index.ts'\n\nconst cards: ReactNode[] = [\n <ExampleBarGraphWidget key=\"bar-graph\" />,\n <ExampleBooleanTableWidget key=\"boolean-table\" />,\n <ExampleTwoColTwoStatWidget key=\"two-column\" />,\n]\n\n// These two are just helpers, they curate spring data, values that are later being interpolated into css\nconst to = (i: number) => ({\n delay: i * 100,\n rot: -10 + Math.random() * 15,\n scale: 1,\n x: 0,\n y: i * -4,\n})\nconst from = (_i: number) => ({\n rot: 0, scale: 1.5, x: 0, y: -1000,\n})\n// This is being used down there in the view, it interpolates rotation and scale into a css transform\nconst trans = (r: number, s: number) => `perspective(1500px) rotateY(${r / 10}deg) scale(${s})`\n\nfunction Deck() {\n const [gone] = useState(() => new Set()) // The set flags all the cards that are flicked out\n const theme = useTheme()\n const [props, api] = useSprings(cards.length, i => ({\n ...to(i),\n from: from(i),\n })) // Create a bunch of springs using the helpers above\n // Create a gesture, we're interested in down-state, delta (current-pos - click-pos), direction and velocity\n const bind = useDrag(({\n args: [index], down, movement: [mx], direction: [xDir], velocity,\n }) => {\n const trigger = velocity > 0.2 // If you flick hard enough it should trigger the card to fly out\n const dir = xDir < 0 ? -1 : 1 // Direction should either point left or right\n if (!down && trigger) gone.add(index) // If button/finger's up and trigger velocity is reached, we flag the card ready to fly out\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n api.start((i) => {\n if (index !== i) return // We're only interested in changing spring-data for the current spring\n const isGone = gone.has(index)\n const x\n = isGone\n ? (200 + globalThis.innerWidth) * dir\n : down\n ? mx\n : 0 // When a card is gone it flys out left or right, otherwise goes back to zero\n const rot = mx / 100 + (isGone ? dir * 10 * velocity : 0) // How much the card tilts, flicking it harder makes it rotate faster\n const scale = down ? 1.1 : 1 // Active cards lift up a bit\n return {\n config: {\n friction: 50,\n tension:\n down\n ? 800\n : isGone\n ? 200\n : 500,\n },\n delay: undefined,\n rot,\n scale,\n x,\n }\n })\n if (!down && gone.size === cards.length)\n setTimeout(() => {\n gone.clear()\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n api.start(i => to(i))\n }, 600)\n })\n // Now we're just mapping the animated values to our view, that's it. Btw, this component only renders once. :-)\n return (\n <>\n {props.map(({\n x, y, rot, scale,\n }, i) => (\n <animated.div\n key={i}\n style={{\n alignItems: 'center',\n display: 'flex',\n height: '300px',\n justifyContent: 'center',\n position: 'absolute',\n touchAction: 'none',\n width: '300px',\n willChange: 'transform',\n x,\n y,\n }}\n >\n {/* This is the card itself, we're binding our gesture to it (and inject its index so we know which is which) */}\n <animated.div\n {...bind(i)}\n style={{\n // WebkitBackdropFilter: 'blur(10px)',\n // backdropFilter: 'blur(10px)',\n backgroundColor: alphaCss(theme.vars?.palette.background.paper ?? '#000', 0.2),\n backgroundPosition: 'center center',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'auto 85%',\n borderRadius: ' 10px',\n boxShadow: theme.shadows[7],\n height: '85vh',\n maxHeight: '300px',\n maxWidth: '300px',\n transform: interpolate([rot, scale], trans),\n width: '45vh',\n willChange: 'transform',\n }}\n >\n {cards[i]}\n </animated.div>\n </animated.div>\n ))}\n </>\n )\n}\n\nexport const StackOfWidgets: React.FC = () => {\n return (\n <Box\n sx={{\n alignItems: 'center',\n cursor: 'pointer',\n display: 'flex',\n height: '300px',\n justifyContent: 'center',\n width: '300px',\n }}\n >\n <Deck />\n </Box>\n )\n}\n","import { Typography } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol, FlexGrowRow } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nimport { StyledLinearProgress } from './StyledLinearProgress.tsx'\n\nexport interface HorizontalBarGraphItemProps {\n name: string\n value: number\n}\n\nexport interface HorizontalBarGraphProps extends FlexBoxProps {\n items?: HorizontalBarGraphItemProps[]\n}\n\nconst sampleData: HorizontalBarGraphItemProps[] = [\n { name: 'United States', value: 134 },\n { name: 'South Africa', value: 400 },\n { name: 'Canada', value: 382 },\n { name: 'Philippines', value: 423 },\n { name: 'Denmark', value: 123 },\n { name: 'Greece', value: 321 },\n { name: 'Japan', value: 421 },\n]\n\nexport const HorizontalBarGraph: React.FC<HorizontalBarGraphProps> = ({ items = sampleData, ...props }) => {\n const itemsSortedByValue = items.toSorted(function (a, b) {\n const keyA = a.value,\n keyB = b.value\n // Compare the 2 dates\n if (keyA > keyB) return -1\n if (keyA < keyB) return 1\n return 0\n })\n\n console.log(itemsSortedByValue)\n\n const topValue = itemsSortedByValue[0].value\n\n return (\n <FlexCol alignItems=\"stretch\" gap={0.5} {...props}>\n {items.slice(0, 5).map((item, index) => (\n <FlexCol alignItems=\"stretch\" key={index}>\n <FlexGrowRow justifyContent=\"space-between\">\n <Typography variant=\"caption\" maxWidth=\"50%\" noWrap>\n {item.name}\n </Typography>\n <Typography variant=\"caption\" maxWidth=\"50%\">\n {item.value}\n </Typography>\n </FlexGrowRow>\n <StyledLinearProgress color=\"primary\" value={(item.value / (topValue * 1.25)) * 100} variant=\"determinate\" />\n </FlexCol>\n ))}\n </FlexCol>\n )\n}\n","import { LinearProgress, styled } from '@mui/material'\nimport { alphaCss } from '@xylabs/react-theme'\n\nexport const StyledLinearProgress = styled(LinearProgress, { name: 'StyledLinearProgress' })(({ theme }) => ({\n '& .MuiLinearProgress-bar': { borderRadius: theme.shape.borderRadius },\n 'MozBoxSizing': 'border-box',\n 'WebkitBoxSizing': 'border-box',\n 'background': 'transparent',\n 'borderBottom': `1px solid ${alphaCss(theme.vars?.palette.text.secondary ?? '#000', 0.3)}`,\n 'boxSizing': 'border-box',\n 'height': theme.spacing(0.25),\n}))\n","import { Typography, useTheme } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol, FlexGrowRow } from '@xylabs/react-flexbox'\nimport React, { useEffect } from 'react'\n\nimport type { InsightStatProps } from '../Stat/index.ts'\n\nexport interface TwoColTwoStatProps extends FlexBoxProps {\n items: InsightStatProps[]\n}\n\nconst MAX_LENGTH = 2\n\nconst validateProps = (props: InsightStatProps[]) => {\n if (props.length > MAX_LENGTH) {\n throw new Error(`The length of items for the Two Column Two Stat widget should not exceed ${MAX_LENGTH}`)\n }\n}\n\nexport const TwoColTwoStat: React.FC<TwoColTwoStatProps> = ({ items, ...props }) => {\n const theme = useTheme()\n\n useEffect(() => {\n validateProps(items)\n }, [items])\n\n return (\n <FlexGrowRow gap={2} {...props}>\n {items.map((item, index) => (\n <FlexCol key={`stat-${index}-${item.unit}`} flexGrow={1} alignItems=\"start\">\n <Typography variant=\"h2\" fontWeight={theme.typography.fontWeightMedium}>\n {item.rawInsightValue}\n </Typography>\n <Typography variant=\"body2\">{item.subtitle}</Typography>\n </FlexCol>\n ))}\n </FlexGrowRow>\n )\n}\n","import React from 'react'\n\nimport { WidgetCard } from '../../WidgetCard.tsx'\nimport { HorizontalBarGraph } from '../BarGraph/index.ts'\n\nexport const ExampleBarGraphWidget: React.FC = () => {\n return (\n <WidgetCard widgetContent={<HorizontalBarGraph />} widgetName=\"Friend Locations\" timeOfData={1_715_713_478} widgetPath=\"/profile\"></WidgetCard>\n )\n}\n","import React from 'react'\n\nimport { WidgetCard } from '../../WidgetCard.tsx'\nimport { BooleanTable } from '../Tables/index.ts'\n\nexport const ExampleBooleanTableWidget: React.FC = () => {\n return (\n <WidgetCard\n widgetContent={(\n <BooleanTable\n items={[\n { name: '@arietrouw', value: true },\n { name: '@officialxyo', value: false },\n { name: '0x187623121928634124', value: true },\n { name: '@coinwithus', value: true },\n { name: '0x871218376123894321', value: true },\n ]}\n tableHeaders={['Id', 'Online']}\n />\n )}\n widgetName=\"Friends\"\n timeOfData={1_715_875_797}\n widgetPath=\"/profile\"\n >\n </WidgetCard>\n )\n}\n","import { CircleRounded } from '@mui/icons-material'\nimport type { SvgIcon } from '@mui/material'\nimport {\n Paper, styled, TableRow, Typography,\n} from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport {\n FlexCol, FlexGrowRow, FlexRow,\n} from '@xylabs/react-flexbox'\nimport { alphaCss } from '@xylabs/react-theme'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nexport interface BooleanTablePropsItemProps {\n name: string\n value: boolean\n}\n\nconst sampleData: BooleanTablePropsItemProps[] = [\n { name: '@arietrouw', value: true },\n { name: '@officialxyo', value: false },\n { name: '0x187623121928634124', value: true },\n { name: '@coinwithus', value: true },\n { name: '0x871218376123894321', value: true },\n]\n\nexport interface BooleanTableProps extends FlexBoxProps {\n falseOutput?: ReactNode\n items: BooleanTablePropsItemProps[]\n tableHeaders: string[]\n trueOutput?: ReactNode\n}\n\nexport const StyledLightTableRow = styled(Paper, { name: 'StyledLightTableRow' })(({ theme }) => ({\n backgroundColor: 'transparent',\n padding: theme.spacing(0.75),\n}))\n\nexport const StyledTableColumnTitle = styled(Typography, { name: 'StyledTableColumnTitle' })(({ theme }) => ({\n color: theme.vars?.palette.text.secondary,\n fontWeight: theme.typography.fontWeightBold,\n textTransform: 'uppercase',\n}))\n\nexport const DefaultTrueOutput = styled<typeof SvgIcon>(CircleRounded, { name: 'DefaultTrueOutput' })(({ theme }) => ({\n fill: theme.vars?.palette.success.main,\n fontSize: '10px',\n}))\n\nexport const DefaultFalseOutput = styled<typeof SvgIcon>(CircleRounded, { name: 'DefaultFalseOutput' })(({ theme }) => ({\n fill: alphaCss(theme.vars?.palette.text.disabled ?? '#111', 0.5),\n fontSize: '10px',\n}))\n\nconst defaultTrueOutput = <DefaultTrueOutput />\nconst defaultFalseOutput = <DefaultFalseOutput />\n\nexport const BooleanTable: React.FC<BooleanTableProps> = ({\n items = sampleData,\n tableHeaders,\n trueOutput = defaultTrueOutput,\n falseOutput = defaultFalseOutput,\n ...props\n}) => {\n return (\n <FlexCol alignItems=\"stretch\" {...props}>\n <FlexRow paddingBottom={0.5} justifyContent=\"space-between\">\n {tableHeaders.map(name => (\n <StyledTableColumnTitle key={name} variant=\"caption\">\n {name}\n </StyledTableColumnTitle>\n ))}\n </FlexRow>\n <FlexCol alignItems=\"stretch\" gap={0.25}>\n {items.slice(0, 4).map((item, index) => (\n <TableRow key={index}>\n <FlexGrowRow flexGrow={1} justifyContent=\"space-between\">\n <Typography variant=\"caption\" noWrap maxWidth=\"70%\">\n {item.name}\n </Typography>\n {item.value ? trueOutput : falseOutput}\n </FlexGrowRow>\n </TableRow>\n ))}\n </FlexCol>\n </FlexCol>\n )\n}\n","import React from 'react'\n\nimport { WidgetCard } from '../../WidgetCard.tsx'\nimport { TwoColTwoStat } from '../DataColumns/index.ts'\n\nexport const ExampleTwoColTwoStatWidget: React.FC = () => {\n return (\n <WidgetCard\n widgetContent={(\n <TwoColTwoStat\n items={[\n {\n rawInsightValue: 218, subtitle: 'Inbound Access Requests', uiInsightValue: 218, unit: 'requests',\n },\n {\n rawInsightValue: 18, subtitle: 'Outbound Access Requests', uiInsightValue: 18, unit: 'requests',\n },\n ]}\n />\n )}\n widgetName=\"Network Activity\"\n timeOfData={1_642_637_397}\n widgetPath=\"/network\"\n >\n </WidgetCard>\n )\n}\n","import { type SupportedColorScheme, ThemeProvider } from '@mui/material'\nimport { XyosTheme } from '@xylabs/react-theme'\nimport type { PropsWithChildren } from 'react'\nimport React, { useMemo } from 'react'\n\n/** @deprecated - rely on websites to construct their own theme provider */\nexport const AppOsThemeProvider: React.FC<PropsWithChildren> = ({ children }) => {\n const initialValue: SupportedColorScheme | 'system' = useMemo(() => {\n const validValues: SupportedColorScheme[] = ['light', 'dark']\n const savedValue = localStorage.getItem('mui-mode')\n if (savedValue && validValues.includes(savedValue as SupportedColorScheme)) return savedValue as SupportedColorScheme\n return 'system'\n }, [])\n\n return (\n <ThemeProvider theme={XyosTheme} defaultMode={initialValue}>\n {children}\n </ThemeProvider>\n )\n}\n"],"mappings":";;;;AAGA,SAASA,UAAUC,mBAAmB;AAGtC,SAASC,yCAAyC;AAElD,SAASC,iCAAiC;AAOnC,IAAMC,uBAAN,cAA6FC,YAAAA;EAZpG,OAYoGA;;;EAGlG,IAAIC,YAAY;AACd,WAAOC,SAAS,KAAKC,OAAOF,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QAAA,cAACS,QAAAA;IAAMC,KAAK;IAAGC,eAAc;IAAMC,UAAS;KAC1C,gBAAAZ,QAAA,cAACa,4BAAAA,IAAAA,GACD,gBAAAb,QAAA,cAACc,uBAAAA,IAAAA,GACD,gBAAAd,QAAA,cAACe,2BAAAA,IAAAA,GACD,gBAAAf,QAAA,cAACgB,gBAAAA,IAAAA,CAAAA,CAAAA;AAIT,GAlB0D;;;ASZ1D,SAAoCC,qBAAqB;AACzD,SAASC,iBAAiB;AAE1B,OAAOC,WAASC,WAAAA,iBAAe;AAGxB,IAAMC,qBAAkD,wBAAC,EAAEC,SAAQ,MAAE;AAC1E,QAAMC,eAAgDC,UAAQ,MAAA;AAC5D,UAAMC,cAAsC;MAAC;MAAS;;AACtD,UAAMC,aAAaC,aAAaC,QAAQ,UAAA;AACxC,QAAIF,cAAcD,YAAYI,SAASH,UAAAA,EAAqC,QAAOA;AACnF,WAAO;EACT,GAAG,CAAA,CAAE;AAEL,SACE,gBAAAI,QAAA,cAACC,eAAAA;IAAcC,OAAOC;IAAWC,aAAaX;KAC3CD,QAAAA;AAGP,GAb+D;","names":["assertEx","BaseEmitter","GenericPayloadDivinerConfigSchema","PayloadDivinerQuerySchema","BridgeActivityHelper","BaseEmitter","archivist","assertEx","params","deref","diviner","result","config","schema","GenericPayloadDivinerConfigSchema","next","options","nextByAddress","address","query","PayloadDivinerQuerySchema","divine","IndexedDbArchivist","IndexedDbBoundWitnessDiviner","GenericPayloadDiviner","IndexedDbPayloadDiviner","asSchema","ModuleFactoryLocator","GenericPayloadDivinerTags","BrowserLocator","register","factory","freeze","XyOsMonitor","XyOsBrowserMonitor","XyOsMonitor","connection","globalThis","undefined","navigator","candyDarkImport","candyLightImport","candyAppleDarkImport","candyAppleLightImport","mossDarkImport","mossLightImport","oceanDarkImport","oceanLightImport","peachYogurtDarkImport","peachYogurtLightImport","sherbetDarkImport","sherbetLightImport","springDarkImport","springLightImport","sunsetDarkImport","sunsetLightImport","xyoDarkImport","xyoLightImport","candyDark","candyLight","candyAppleDark","candyAppleLight","mossDark","mossLight","oceanDark","oceanLight","peachYogurtDark","peachYogurtLight","sherbetDark","sherbetLight","springDark","springLight","sunsetDark","sunsetLight","xyoDark","xyoLight","OsPalettes","candy","darkModeWallpaper","candyDark","lightModeWallpaper","candyLight","nameCode","readableName","candyApple","candyAppleDark","candyAppleLight","moss","mossDark","mossLight","ocean","oceanDark","oceanLight","peachYogurt","peachYogurtDark","peachYogurtLight","sherbet","sherbetDark","sherbetLight","spring","springDark","springLight","sunset","sunsetDark","sunsetLight","xyo","xyoDark","xyoLight","getNodePaletteByNameCode","castNameCode","assertEx","fulfilled","rejected","WidgetTraySchema","OsCallerBase","React","WidgetCaller","OsCallerBase","_registeredDappSets","_widgetTrayLayout","context","dappsAsObject","acc","dapp","registeredDappSets","config","name","assertEx","widgetTrayLayout","buildWidgetComponents","widgetTray","widgetTrayFromLayout","results","Promise","allSettled","widgetConfigs","map","Param","dappId","params","modes","mode","component","payload","configHash","archivist","getDappsArchivist","foundConfig","get","undefined","successfulResults","filter","fulfilled","result","value","failedResults","rejected","reason","Error","String","buildWidgetConfig","widgetConfigToBuild","clonedWidgetConfig","cloneWidgetConfig","widgetConfig","structuredClone","widgetLayout","targetWidgetConfigs","layout","label","trayLabel","dappWidgetLayout","dappSet","find","console","error","push","position","schema","WidgetTraySchema","usePromise","XnsRegistrationsResource","createContext","use","XyOsUiContext","createContext","undefined","useXyOsUiContext","use","XyOsUiContextProvider","Provider","forget","dappsReadyConnection","XyOs","ModuleFactoryLocator","XyOsUi","XyOs","dappRegistrationResults","failed","succeeded","dappsReadyConnection","params","eventBus","addConnection","monitoring","XyOsBrowserMonitor","xyOsUiGlobal","xyOsGlobal","hideSplash","splashScreen","onComplete","setSplashStatus","status","statusText","_LOADING_MESSAGES","setStatusText","boot","wallet","locator","ModuleFactoryLocator","registerLazy","dappRegistrationService","start","emit","forget","ResourceHooks","buildResource","buildViews","resourceViewsFromContext","context","pathPrefix","resource","resourceError","views","useBuildResourceFromProvidedNode","xyOs","useXyOsUiContext","useResourceViewsFromProvidedNode","useEffect","useCleanUpResource","resource","useEffect","cleanupListeners","useMemo","useSyncExternalStore","useSyncExternalPayloadStore","viewName","repository","getSnapShot","subscribe","useMemo","subscriber","subscriptions","snapshot","views","bind","undefined","useSyncExternalStore","useBuildNameServiceRegistrationsResource","context","pathPrefix","result","usePromise","xnsRegistrationsResource","XnsRegistrationsResource","start","useCleanUpResource","useBuildNameServiceRegistrationsResourceViews","resource","allRegistrations","useSyncExternalPayloadStore","NameServiceRegistrationHooks","ResourceHooks","usePromise","DappAccessRequestResource","useBuildDappAccessRequestResource","context","resource","usePromise","DappAccessRequestResource","start","useCleanUpResource","useDappAccessRequestResourceViews","accessRequests","useSyncExternalPayloadStore","registeredInterfaces","DappAccessRequestResourceHooks","ResourceHooks","usePromise","boot","useEffect","biosBoot","useBios","biosExternalInterface","biosError","usePromise","undefined","boot","useEffect","usePromise","Kernel","useEffect","kernelBoot","useKernel","locator","params","bios","useBios","kernelExternalInterface","kernelError","usePromise","undefined","kernel","Kernel","boot","useEffect","ButtonEx","ErrorAlert","React","ErrorRenderWithSupport","supportHref","supportTo","supportLinkText","error","onCancel","props","React","ErrorAlert","action","ButtonEx","target","to","color","size","href","ErrorRenderWithSupportDefault","React","memo","useMemo","useAsyncEffect","DappIntentTypes","DappContextCreator","RunningDappCache","useCallback","useEffect","useRef","useState","useDappContextCreator","xnsNodeUrl","xnsNetwork","dapp","currentIntent","allowedNames","createOnMount","context","useXyOsUiContext","windowDappNodeSet","setWindowDappNodeSet","useState","undefined","dappWallet","dappWindowNodeError","setDappWindowNodeError","targetedDapp","targetDappId","config","name","windowDappNodeSetRef","useRef","useEffect","current","createNode","useCallback","RunningDappCache","findOrCreate","e","useAsyncEffect","intent","DappIntentTypes","Launch","Close","DappContextCreator","resetDappArchivist","Minimize","nodeCreateError","EventBusPubSubConnection","useEffect","useState","useDappRegistrationResults","context","useXyOsUiContext","registeredDappSetResults","setRegisteredDappSetResults","useState","useEffect","listener","dappRegistrationResults","dappsReadyConnectionRequest","subscribableEvents","Map","type","dappsReadyConnection","EventBusPubSubConnection","initialResultsTimeoutId","eventBus","addConnection","setTimeout","undefined","clearTimeout","id","removeConnection","DappRegistry","useMemo","DappSeedPhraseRepository","useMemo","_dappWalletRepository","getOrCreateDappSeedPhraseRepository","context","allowedNames","DappSeedPhraseRepository","useDappSeedPhraseRepository","useXyOsUiContext","useMemo","undefined","_dappRegistry","getOrCreateDappRegistry","repository","DappRegistry","useDappRegistry","allowedNames","dappSeedPhraseRepository","useDappSeedPhraseRepository","useMemo","undefined","assertEx","OsSettingsCaller","OsSettingsReadyEvent","useMemo","assertEx","EventBusPubSubConnection","useEffect","useState","useStackReady","stackReadyEvent","stackName","context","providedContext","useXyOsUiContext","stackReady","setStackReady","useState","ready","useEffect","derivedContext","listener","Error","stack","assertEx","getStack","stackReadyReadyConnectionRequest","subscribableEvents","Map","type","stackReadyReadyConnection","EventBusPubSubConnection","initialReadyTimeoutId","eventBus","addConnection","initialized","setTimeout","undefined","clearTimeout","_id","removeConnection","id","useOsSettingsCaller","context","providedContext","useXyOsUiContext","ready","useStackReady","OsSettingsReadyEvent","useMemo","derivedNode","assertEx","OsSettingsCaller","usePromise","buildUserWalletSeedPhrasePayload","useMemo","usePhraseFile","phrase","payloadAndRootHash","usePromise","buildUserWalletSeedPhrasePayload","undefined","filename","useMemo","rootHash","phraseFile","phraseFileError","payload","data","Blob","JSON","stringify","type","globalThis","URL","createObjectURL","e","useLocation","useNavigate","useTabs","location","useLocation","navigate","useNavigate","rootFolder","pathname","split","tab","length","setTab","usePromise","useWidgetDapps","registeredDapps","widgetTrayLayout","context","useXyOsUiContext","usePromise","length","caller","WidgetCaller","buildWidgetComponents","useLayoutEffect","useState","isInstalledDappSet","isPreInstalledDappSet","isUnInstalledDappSet","DappInstallTypeFilters","installed","registeredDappSets","length","filter","toSorted","a","b","dapp","config","name","toUpperCase","undefined","preInstalled","uninstalled","getApiDomain","localHost","apiDomain","undefined","location","hostname","startsWith","useEffect","useState","useOnWindowResize","resized","setResized","useState","useEffect","onResize","event","globalThis","addEventListener","removeEventListener","useLaunchPoint","spanRef","coordinates","setCoordinates","useState","left","top","resized","useOnWindowResize","useLayoutEffect","rect","current","getBoundingClientRect","width","height","Circle","FlexCol","DappIntentTypes","DappIntentCaller","XyOsMonitor","React","useRef","usePromise","DappIntentResource","useBuildIntentResource","context","resource","usePromise","DappIntentResource","start","useCleanUpResource","useIntentResourceViews","allDappIntents","useSyncExternalPayloadStore","latestDappIntent","DappIntentResourceHooks","ResourceHooks","useAsyncEffect","useWeakArchivistFromNode","useClearIntents","intentArchivist","useWeakArchivistFromNode","useAsyncEffect","intentArchivistInstance","deref","clear","assertEx","DappIntentCaller","useMemo","useDappIntentCaller","xyOsContext","xyOs","useXyOsUiContext","useMemo","context","assertEx","DappIntentCaller","filterAs","asOptionalDappIntent","DappIntentTypes","DappMode","useWeakArchivistFromNode","useEffect","useState","useDappIntentListener","dappName","targetMode","DappMode","Window","dappIntentType","setDappIntentType","useState","DappIntentTypes","Close","intentPayload","setIntentPayload","intentArchivist","useWeakArchivistFromNode","useEffect","listener","payloads","filteredPayloads","filterAs","asOptionalDappIntent","payload","allDapps","targetDapps","targetDappId","intent","Launch","Minimize","console","warn","deref","on","off","DappIntentTypes","DappMode","useEffect","useState","useDappIntentListener2","dappName","sourceMode","DappMode","Window","latestDappIntent","DappIntentResourceHooks","useResourceViewsFromProvidedNode","dappIntentType","setDappIntentType","useState","DappIntentTypes","Close","useEffect","console","warn","nextIntent","payload","targetDappId","intent","Launch","Minimize","undefined","timeoutId","setTimeout","clearTimeout","DappIntentTypes","NameTransforms","useCallback","useNavigate","useParams","rootRoute","useNavigateIntent","navigate","useNavigate","dappName","dappNameParam","useParams","updateRouteParam","useCallback","dappIntent","skipNavigate","targetDappId","intent","intentType","params","intentParams","slug","NameTransforms","DappIntentTypes","Launch","dappNameDeSlugged","deSlug","slugFromRoot","Minimize","Close","useWeakArchivistFromNode","useCallback","useSendDappIntent","intentArchivist","useWeakArchivistFromNode","navigate","useNavigateIntent","sendIntent","useCallback","dappIntent","options","intentArchivistInstance","deref","console","error","insert","e","warn","DEFAULT_ICON_SIZE","DappIntentTypes","deriveDappState","intent","minimized","DappIntentTypes","Minimize","active","Launch","closed","Close","React","RenderHtml","htmlString","React","div","style","height","width","dangerouslySetInnerHTML","__html","useTheme","animated","config","useSpring","React","useMemo","DappLaunchFrame","bgColor","children","id","launchLeft","open","launchTop","ref","theme","useTheme","frameOpenSpringConfig","useMemo","config","stiff","from","height","width","to","left","top","frameProps","useSpring","transform","scaleProps","React","div","animated","style","overflow","position","zIndex","alignItems","background","vars","palette","default","display","justifyContent","decomposeProps","dappIcon","props","color","windowId","id","DappIconSize","DEFAULT_ICON_SIZE","sx","nonSxProps","styled","ButtonEx","alphaCss","TypographyEx","borderRadiusFactor","StyledDappIconButtonEx","styled","ButtonEx","name","shouldForwardProp","prop","includes","theme","WebkitBackdropFilter","backdropFilter","backgroundColor","alphaCss","vars","palette","background","paper","borderRadius","spacing","content","inset","opacity","position","transition","zIndex","transform","text","primary","StyledDappName","TypographyEx","WebkitLineClamp","color","flexWrap","fontWeight","letterSpacing","lineClamp","textAlign","textOverflow","textShadow","common","black","whiteSpace","wordWrap","StyledDefaultDappIcon","lineHeight","DappIconButton","children","dappIcon","dappIconSvg","dappName","dappState","props","DappIconSize","color","nonSxProps","sx","decomposeProps","iconSize","DEFAULT_ICON_SIZE","active","minimized","sendIntent","useSendDappIntent","iconButtonRef","useRef","left","launchLeft","top","launchTop","useLaunchPoint","MiddleEllipsisFunction","str","length","slice","onClickIcon","XyOsMonitor","trackEvent","DappIntentCaller","buildIntent","OsDappName","DappIntentTypes","Launch","React","FlexCol","alignItems","justifyContent","DappLaunchFrame","id","open","span","style","cursor","onClick","StyledDappIconButtonEx","iconBgBaseColor","ref","height","mb","width","RenderHtml","htmlString","StyledDefaultDappIcon","fontSize","name","at","gap","StyledDappName","variant","maxWidth","Circle","opacity","transition","ArrowForward","Alert","Button","Dialog","DialogActions","DialogContent","DialogTitle","Typography","ErrorRender","FlexCol","FlexRow","RegisteredNames","AccessNodeQueries","React","useState","DappAccessDialog","accessRequest","children","dappNode","registeredDappAccess","props","error","setError","useState","noPayloadsInserted","setNoPayloadsInserted","onClose","handleAllow","name","RegisteredNames","accessNodeQueries","AccessNodeQueries","run","then","payloads","length","catch","e","message","console","Error","React","Dialog","DialogTitle","DialogContent","dividers","sx","display","flexDirection","gap","ErrorRender","scope","FlexCol","Typography","variant","FlexRow","fontSize","strong","requestingDappId","ArrowForward","registeringDappId","Alert","severity","DialogActions","Button","onClick","ErrorRender","React","usePromise","isRegisteredDappAccess","RegisteredNames","useState","DappCaller","useMemo","useDappCaller","context","xyOs","useXyOsUiContext","useMemo","resolvedContext","DappCaller","useDialogState","context","dappCaller","useDappCaller","accessRequests","DappAccessRequestResourceHooks","resourceViewsFromContext","openAccessDialog","setOpenAccessDialog","useState","registeredInterface","setRegisteredInterface","allowAccessDialogError","usePromise","accessRequest","payload","getRegisteredDappAccessByName","RegisteredNames","isRegisteredDappAccess","undefined","DappAccessFlexbox","context","accessRequests","allowAccessDialogError","openAccessDialog","registeredInterface","setOpenAccessDialog","useDialogState","React","DappAccessDialog","accessRequest","dappNode","open","onClose","registeredDappAccess","ErrorRender","error","scope","BugReport","CloseRounded","RemoveRounded","AppBar","Box","Divider","IconButton","Toolbar","Tooltip","Typography","FlexGrowRow","ColorSchemeButton","DappIntentTypes","DappIntentCaller","React","Dialog","DialogActions","DialogContent","ButtonEx","FlexCol","NodeProvider","React","lazy","Suspense","Debug","lazy","LazyDebug","React","Suspense","fallback","FlexCol","height","DebugDialog","closeDebug","debugOpen","props","Dialog","open","onClose","fullScreen","DialogContent","DialogActions","ButtonEx","variant","onClick","DebugDialogWithNode","context","NodeProvider","node","root","NameTransforms","DappPathHelpers","deriveDestinationPath","path","defaultPath","dappName","rootPath","slug","nestedPath","derivePathForNavSelection","newPath","currentPath","derivedPath","undefined","detectDuplicateSelections","lastSavedPath","selectedDefaultPathAgain","pathIsUnchanged","CustomerParams","key","value","matches","detectCustomer","find","customerParamSet","searchParams","URLSearchParams","globalThis","location","search","searchParamValue","get","has","usePromise","usePromise","DappMenuResource","useBuildDappMenuResource","xyOsContext","resource","usePromise","DappMenuResource","start","useCleanUpResource","useMenuResourceViews","menuItemSelections","useSyncExternalPayloadStore","menuConfigs","menuItems","menuItemsVisible","DappMenuResourceHooks","ResourceHooks","assertEx","DappMenuCaller","useMemo","useDappMenuCaller","context","ignoreProvidedNode","xyOs","useXyOsUiContext","useMemo","resolvedProvidedNode","finalContext","assertEx","DappMenuCaller","useAddDappMenuItems","payloads","xyOs","useXyOsUiContext","menuItemSelections","menuConfigs","resourceError","DappMenuResourceHooks","resourceViewsFromContext","dappMenuCaller","useDappMenuCaller","addMenuItemsError","usePromise","add","menuConfig","path","error","useEffect","useRef","useState","useNavigate","useParams","useMemo","useDappMenuDependencies","context","menuConfigs","menuItemSelections","menuItemsVisible","resourceError","DappMenuResourceHooks","resourceViewsFromContext","defaultPath","useMemo","menuSelection","path","useDappMenu","context","dappName","error","setError","useState","params","useParams","navigate","useNavigate","defaultPath","menuConfigs","menuItemsVisible","menuSelection","resourceError","useDappMenuDependencies","activePath","currentPathRef","useRef","undefined","useEffect","current","path","timeoutId","setTimeout","clearTimeout","onPathChange","pathIsInUnchanged","DappPathHelpers","detectDuplicateSelections","destinationPath","deriveDestinationPath","menuConfig","menuItems","usePromise","assertEx","findAs","asArchivistInstance","asOptionalDappInjectableParams","DappCaller","useNavigate","useSearchParams","useManageDappInjectableParamsFromRoute","context","queryParams","useSearchParams","navigate","useNavigate","callerError","usePromise","dappCaller","DappCaller","pathname","globalThis","location","setDappInjectableRouteParams","listenerError","archivist","listener","payloads","injectableParams","findAs","asOptionalDappInjectableParams","path","mod","assertEx","root","resolve","asArchivistInstance","required","on","e","console","error","off","useAtomicPromise","usePromise","findAs","asOptionalDappIntent","DappIntentTypes","DappIntentCaller","useEffect","useState","useManageDappIntentRequest","context","dappId","dappCaller","useDappCaller","sendIntent","useSendDappIntent","intentPayload","setIntentPayload","useState","handleIntentError","setHandleIntentError","dappArchivist","setDappArchivist","usePromise","archivist","getDappArchivist","useAtomicPromise","targetDappId","minimizeIntent","DappIntentCaller","buildIntent","OsDappName","DappIntentTypes","Minimize","e","console","error","undefined","useEffect","listener","payloads","findAs","asOptionalDappIntent","off","on","usePromise","useCallback","useEffect","useRef","useNavigate","useParams","useManageDappPathFromRoute","context","dappName","params","useParams","path","pathParam","dappMenuCaller","useDappMenuCaller","ignoreProvidedNode","menuSelection","defaultPath","useDappMenuDependencies","navigate","useNavigate","currentPathRef","useRef","undefined","updateMenuArchivist","useCallback","current","currentPath","currentNavSelection","updatedPath","DappPathHelpers","derivePathForNavSelection","makeNavItemSelection","useEffect","pathIsInUnchanged","detectDuplicateSelections","destinationPath","deriveDestinationPath","updateErrors","usePromise","usePromise","DappIntentTypes","DappIntentCaller","NameTransforms","useRef","useParams","useManageDappStateFromRoute","intentPayload","params","useParams","dappName","dappNameParam","sendIntent","useSendDappIntent","intentCaller","useDappIntentCaller","dappNameParamRef","useRef","undefined","intentRef","usePromise","launched","intent","DappIntentTypes","Launch","dappNameParamRemoved","current","closeIntent","DappIntentCaller","buildIntent","OsDappName","Close","dappNameParamDeSlugged","NameTransforms","deSlug","autoLaunchNeeded","launchIntent","useCallback","useEffect","useRef","useState","useNavigate","useSearchParams","useDebugClick","params","setParams","useSearchParams","debugOpen","setDebugOpen","useState","openFromClick","useRef","closeFromClick","initialized","navigate","useNavigate","openDebug","useCallback","current","set","URLSearchParams","closeDebug","useEffect","initialOpen","has","backButtonClicked","useMemo","usePromise","useProvidedNode","React","NodeManifest","node","useProvidedNode","nodeManifest","usePromise","manifest","React","pre","JSON","stringify","useDecomposeDapp","dapp","DappComponent","useMemo","params","modes","window","component","NodeManifest","name","config","version","scrollable","useExposedNode","xyOS","useXyOsUiContext","exposedNode","useMemo","useSearchParams","PARAMS_TO_TARGET","useSkipLoadingScreen","params","useSearchParams","customer","detectCustomer","useMemo","hasTargetParams","some","param","has","isCustomer","usePromise","useWeakArchivistFromNode","useSyncOsRegisteredAccessInterfaces","context","registeredInterfacesArchivist","useWeakArchivistFromNode","dappCaller","useDappCaller","usePromise","listener","payloads","addPayloadsToDappArchivist","registeredInterfaces","deref","all","on","off","EmptyDappBarForPadding","props","React","AppBar","color","sx","flexDirection","component","position","DappBar","title","context","name","sendIntent","useSendDappIntent","closeDebug","debugOpen","openDebug","useDebugClick","elevation","backgroundColor","Toolbar","disableGutters","paddingX","Typography","noWrap","variant","letterSpacing","FlexGrowRow","IconButton","onClick","display","md","xs","BugReport","Tooltip","Box","ColorSchemeButton","Divider","orientation","flexItem","m","DappIntentCaller","buildIntent","OsDappName","DappIntentTypes","Minimize","RemoveRounded","htmlColor","Close","CloseRounded","DebugDialogWithNode","useMediaQuery","FlexCol","FlexGrowCol","FlexRow","React","DappChromeSmall","appBar","children","screenMenu","splashScreen","props","React","FlexCol","alignItems","id","FlexGrowCol","justifyContent","sx","background","theme","vars","palette","default","overflowY","DappChromeLarge","FlexRow","DappChrome","largeScreenMenu","smallScreenMenu","isMedium","useMediaQuery","breakpoints","up","Card","CardContent","Chip","Container","Divider","Typography","useTheme","FlexGrowCol","FlexRow","alphaCss","React","ButtonEx","FlexRow","React","InstallButtonSection","installLink","notificationLink","props","React","FlexRow","width","gap","sx","alignItems","flexDirection","md","xs","ButtonEx","fullWidth","variant","disabled","href","target","VerifiedRounded","Card","CardContent","Typography","useTheme","FlexGrowCol","FlexGrowRow","FlexRow","React","useTheme","FlexGrowRow","LinkEx","React","DeveloperLinkSection","developerLink","props","theme","useTheme","React","FlexGrowRow","gap","sx","alignItems","flexDirection","md","xs","LinkEx","color","vars","palette","info","main","href","target","SummarySection","name","dappIconSvg","version","developerLink","theme","useTheme","React","Card","sx","width","CardContent","FlexRow","gap","alignItems","flexDirection","FlexGrowRow","md","xs","elevation","variant","RenderHtml","htmlString","FlexGrowCol","Typography","fontSize","typography","h1","h5","fontWeight","fontWeightBold","gutterBottom","justifyContent","VerifiedRounded","color","vars","palette","success","main","DeveloperLinkSection","defaultDescription","DefaultComingSoon","children","desc","developerLink","name","dappIconSvg","version","theme","useTheme","React","Container","maxWidth","sx","minHeight","overflow","paddingTop","width","FlexRow","paddingBottom","Chip","label","backgroundColor","alphaCss","vars","palette","info","main","color","FlexGrowCol","alignItems","justifyContent","gap","SummarySection","InstallButtonSection","Divider","flexItem","Card","CardContent","Typography","variant","gutterBottom","map","paragraph","index","key","BottomNavigation","BottomNavigationAction","Paper","styled","useIsDark","React","useEffect","useState","DappBottomNavigation","activePath","menuConfig","menuItems","onPathChange","props","activeIndex","setActiveIndex","useState","useEffect","defaultPath","nextIndex","findIndex","item","path","timeoutId","setTimeout","clearTimeout","React","Paper","elevation","BottomNavigation","value","onChange","_","to","showLabels","map","svgIcon","icon","primaryText","index","StyledBottomNavigationAction","className","key","label","span","ref","innerHTML","styled","BottomNavigationAction","name","theme","darkMode","useIsDark","color","vars","palette","primary","main","secondary","alpha","Drawer","List","ListItem","ListItemIcon","ListItemText","Tooltip","Typography","useTheme","FlexCol","FlexGrowRow","FlexRow","alphaCss","darkenCss","useIsDark","XyOsMonitor","React","useEffect","useState","BugReport","KeyboardArrowDownRounded","KeyboardArrowUpRounded","Card","Collapse","Divider","IconButton","Stack","Toolbar","Tooltip","Typography","useTheme","RotationAnimation","FlexCol","FlexRow","LinkEx","ColorSchemeButton","React","useState","XyoOSLogoWhite","xyoOSLogoWhiteImport","Facebook","Instagram","LinkedIn","Reddit","StorefrontRounded","Telegram","X","YouTube","React","FaDiscord","socialLinksData","icon","style","fontSize","link","BottomMenuArea","openDebug","backgroundColor","theme","useTheme","expanded","setExpanded","useState","handleExpandClick","React","Card","sx","position","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","overflow","elevation","FlexCol","paddingY","alignItems","Stack","paddingX","justifyContent","flexDirection","gap","onClick","textTransform","cursor","Typography","gutterBottom","KeyboardArrowUpRounded","color","KeyboardArrowDownRounded","Collapse","in","timeout","unmountOnExit","paddingBottom","Divider","flexItem","Toolbar","Tooltip","title","IconButton","BugReport","span","ColorSchemeButton","FlexRow","flexWrap","socialLinksData","map","social","RotationAnimation","key","link","rotation","href","target","icon","padding","variant","vars","palette","text","primary","img","style","fill","src","XyoOSLogoWhite","width","height","LinkEx","ListItemButton","styled","StyledMenuIconWrapSpan","styled","name","alignItems","display","flexDirection","StyledListItemButton","ListItemButton","shouldForwardProp","prop","theme","active","activeOrHoverColor","vars","palette","primary","main","backgroundColor","borderRadius","content","position","left","top","bottom","width","transition","DappMenuDrawer","activePath","context","iconSvg","name","menuConfig","menuItems","onPathChange","version","props","path","setPath","useState","darkMode","useIsDark","theme","useTheme","drawerColor","vars","palette","background","paper","darkenCss","primary","main","activeColor","light","useEffect","defaultPath","newPath","find","item","timeoutId","setTimeout","clearTimeout","handleChange","to","XyOsMonitor","trackEvent","Page","closeDebug","debugOpen","openDebug","useDebugClick","React","Drawer","variant","anchor","PaperProps","sx","position","backgroundColor","borderRight","width","FlexCol","alignItems","justifyContent","height","flexGrow","overflow","Tooltip","title","FlexGrowRow","id","padding","gap","cursor","RenderHtml","htmlString","Typography","noWrap","letterSpacing","DebugDialogWithNode","List","p","map","svgIcon","icon","primaryText","pathFromPayload","ListItem","key","disablePadding","paddingBottom","StyledListItemButton","onClick","active","disableRipple","disableTouchRipple","FlexRow","paddingX","paddingY","alpha","ListItemIcon","color","StyledMenuIconWrapSpan","ref","innerHTML","ListItemText","slotProps","typography","fontWeight","alphaCss","text","style","opacity","BottomMenuArea","dark","Snackbar","ErrorBoundary","ErrorRender","React","useMemo","NameTransforms","React","Helmet","DappMetaTags","active","activePath","dappName","React","Helmet","title","NameTransforms","deSlug","DappWindow","children","context","dapp","dappMenuProperties","dappState","name","config","active","useSyncOsRegisteredAccessInterfaces","routingError","useManageDappPathFromRoute","injectableErrors","useManageDappInjectableParamsFromRoute","resolvedErrors","useMemo","filter","Boolean","React","ErrorBoundary","DappMetaTags","activePath","dappName","map","error","Snackbar","key","message","open","ErrorRender","scope","ErrorRender","FlexCol","NameTransforms","NodeProvider","WalletProvider","React","Fade","styled","Typography","FlexCol","React","useEffect","useState","FlexCol","React","useState","XyoOSIcon","xyoOSIconImport","LoadingOsLogo","widthInPixels","busy","spinsPerSecond","props","imageLoaded","setImageLoaded","useState","img","Image","addEventListener","src","XyoOSIcon","React","FlexCol","sx","opacity","undefined","transform","height","a","useTrail","React","TextTrail","open","children","items","React","Children","toArray","trail","useTrail","length","config","friction","mass","tension","from","height","opacity","y","div","map","style","index","a","key","DappLoadingFlexbox","minimize","open","name","props","fadeIn","setFadeIn","useState","trail","setTrail","skipLoadingScreen","useSkipLoadingScreen","useEffect","immediateTimeout","setTimeout","clearTimeout","fadeInTimeout","trailTimeout","resetTimeout","React","Fade","in","unmountOnExit","StyledSplashContainer","LoadingOsLogo","widthInPixels","busy","position","TextTrail","flexDirection","Typography","textAlign","sx","fontSize","md","xs","styled","FlexCol","theme","background","vars","palette","default","color","text","primary","gap","spacing","height","left","top","width","zIndex","DappRendered","context","dapp","dappMenuProperties","dappState","dappWallet","errors","DappComponent","dappComponent","name","scrollable","version","useDecomposeDapp","active","minimized","hasErrors","length","React","DappChrome","appBar","DappBar","title","activePath","NameTransforms","deSlug","height","width","largeScreenMenu","DappMenuDrawer","smallScreenMenu","DappBottomNavigation","sx","display","menuConfig","splashScreen","DappLoadingFlexbox","minimize","open","FlexCol","padding","map","error","ErrorRender","key","message","scope","WalletProvider","rootWallet","XyOsUiContextProvider","value","NodeProvider","node","root","position","top","left","right","bottom","alignItems","justifyContent","overflowY","createElement","config","DappAccessFlexbox","DappContainer","currentIntent","dappSet","xnsNodeUrl","xnsNetwork","dapp","dappIcon","dappWallet","context","nodeCreateError","useDappContextCreator","dappState","useMemo","targetDappId","config","name","deriveDappState","error","menuError","dappMenuProperties","useDappMenu","errors","filter","Boolean","dappWindowProps","React","DappIconButton","dappIconSvg","params","iconSvg","dappName","DappWindow","DappRendered","DappContainerMemo","memo","Container","FlexCol","React","ContainerFlexbox","children","containerProps","scrollable","props","React","FlexCol","id","alignItems","justifyContent","width","pt","gap","overflow","Container","Container","Typography","ThrownErrorBoundary","FlexCol","React","SignalCellularAltOutlined","Tooltip","useTheme","useIsDark","React","OsPubSubNetworkReadyEvent","useMemo","assertEx","defaultNetworkState","connected","error","undefined","networkReady","createNetworkState","stackReady","ready","stack","foundStack","assertEx","useOsNetwork","context","useXyOsUiContext","stackReady","useStackReady","OsPubSubNetworkReadyEvent","networkState","useMemo","createNetworkState","OsXyoPublicNetworkReadyEvent","useMemo","useXyoPublicNetwork","context","useXyOsUiContext","stackReady","useStackReady","OsXyoPublicNetworkReadyEvent","networkState","useMemo","createNetworkState","styled","StyledNetworkLoadingIndicator","name","theme","spacing","animationName","boxShadow","paddingBottom","width","animationDuration","animationIterationCount","animationTimingFunction","borderRadius","content","filter","position","WaitingForNetwork","React","Tooltip","title","StyledNetworkLoadingIndicator","NetworkLoadingIndicator","highContrast","darkMode","useIsDark","theme","useTheme","networkReady","useOsNetwork","highContrastSuccessColor","vars","palette","success","dark","main","successColor","highContrastErrorColor","error","errorColor","connectionReady","SignalCellularAltOutlined","sx","color","NotInterested","Button","React","NetworkButton","disabled","startIcon","props","networkReady","useOsNetwork","React","Button","NotInterested","Typography","FlexCol","React","NetworkReadyFlexBox","children","skipCheck","props","networkReady","useOsNetwork","React","FlexCol","height","LoadingOsLogo","widthInPixels","busy","Typography","fontFamily","DappTitle","subtitle","title","props","React","FlexCol","alignItems","gap","Typography","variant","b","gutterBottom","InnerDappPage","noScroll","children","sx","titleProps","id","margin","justifyContent","DappPage","checkNetwork","container","rollbar","ThrownErrorBoundary","errorComponent","error","boundaryName","ErrorRenderWithSupportDefault","scope","NetworkReadyFlexBox","skipCheck","Container","disableGutters","maxWidth","position","top","left","right","bottom","flexGrow","width","height","animated","useTransition","ErrorRender","React","resolveActiveComponent","activePathRef","pathToComponent","activeIndex","findIndex","path","componentPath","activeItem","undefined","component","React","ErrorRender","error","Error","scope","DappPathSwitcher","activePath","transitions","useTransition","enter","opacity","transform","from","leave","possibleZIndex","item","zIndex","transitionProps","animated","div","style","alignItems","bottom","display","flexDirection","justifyContent","left","overflowX","overflowY","position","right","top","Divider","Fade","styled","React","useMemo","Chip","CircularProgress","React","DividerChip","registeredDapps","props","React","Chip","avatar","undefined","span","CircularProgress","size","sx","display","label","length","gap","DappsRow","chipLabel","currentIntent","installType","registeredDappsSet","xnsNetwork","xnsNodeUrl","filteredRegisteredDappSets","useMemo","DappInstallTypeFilters","React","Divider","variant","sx","marginY","flexItem","DividerChip","label","undefined","registeredDapps","length","Fade","in","timeout","StyledGridContainer","map","dappSet","DappContainerMemo","key","dapp","config","name","styled","theme","display","gridGap","spacing","gridTemplateColumns","justifyContent","justifyItems","paddingTop","width","animated","useSpring","React","useEffect","useState","MovementData","down","FromYMovement","ToYMovement","jump","left","FromXMovement","ToXMovement","right","up","wiggle","ShiftAnimation","startAnimation","animationDirection","children","isShifted","setIsShifted","useState","anim","useSpring","backfaceVisibility","config","friction","tension","from","x","y","reset","to","useEffect","timeoutId","globalThis","setTimeout","clearTimeout","React","animated","div","style","FiberManualRecordRounded","Box","useTheme","alphaCss","React","TwoToneBulletPoint","props","theme","useTheme","React","Box","FiberManualRecordRounded","fontSize","sx","padding","alphaCss","vars","palette","secondary","main","color","FlexCol","FlexGrowRow","React","TwoToneBulletPointList","list","React","FlexCol","alignItems","gap","map","item","index","FlexGrowRow","key","justifyContent","TwoToneBulletPoint","marginTop","FormControl","TextField","LabeledTextFieldWrapper","React","useState","CoinbaseEmailInput","existingEmail","props","email","setEmail","useState","valid","setValid","handleBlur","event","target","value","handleChange","emailFromEvent","React","FormControl","fullWidth","LabeledTextFieldWrapper","label","TextField","variant","error","hiddenLabel","onBlur","onChange","size","FormControl","TextField","LabeledTextFieldWrapper","React","useState","PrimaryCryptoWalletInput","existingPrimaryCryptoWallet","props","primaryWallet","setPrimaryWallet","useState","valid","setValid","handleBlur","event","target","value","handleChange","nameFromEvent","React","FormControl","fullWidth","LabeledTextFieldWrapper","label","TextField","variant","error","hiddenLabel","onBlur","onChange","size","required","FormControl","TextField","LabeledTextFieldWrapper","React","useState","SecondaryCryptoWalletInput","existingSecondaryCryptoWallet","props","secondaryWallet","setSecondaryWallet","useState","valid","setValid","handleBlur","event","target","value","handleChange","walletFromEvent","React","FormControl","fullWidth","LabeledTextFieldWrapper","label","TextField","variant","error","hiddenLabel","onBlur","onChange","size","required","Grid","FormGroupCreditCardProvider","React","Card","CardContent","Divider","Typography","FlexGrowCol","FlexGrowRow","React","AccountCard","items","props","React","Card","CardContent","FlexGrowCol","width","gap","map","item","index","key","alignItems","FlexGrowRow","sx","flexDirection","md","xs","justifyContent","maxWidth","Typography","variant","gutterBottom","title","desc","component","length","Divider","flexItem","PaymentMethods","React","DappPage","title","Grid","container","spacing","size","xs","AccountCard","sx","height","items","component","FormGroupCreditCardProvider","desc","CoinbaseEmailInput","PrimaryCryptoWalletInput","SecondaryCryptoWalletInput","useWeakArchivistFromNode","useAccountArchivist","useWeakArchivistFromNode","asSchema","isPayloadOfSchemaType","CreditCardInputSchema","isCreditCardInput","createSvgIcon","React","XnsDomainIcon","svg","id","xmlns","viewBox","path","fill","d","circle","cx","cy","r","InfoOutlined","TableCell","TableHead","Tooltip","React","useMediaQuery","useMemo","useVisibleColumns","tableHeadCells","isMedium","useMediaQuery","theme","breakpoints","down","VisibleTableCells","useMemo","filter","cell","showOnMobile","styled","TableRow","StyledTableRowHeader","name","theme","backgroundColor","vars","palette","background","paper","TableHeadEx","payloads","props","VisibleTableCells","useVisibleColumns","React","TableHead","StyledTableRowHeader","map","headCell","TableCell","key","id","align","padding","disablePadding","width","tooltip","span","style","alignItems","display","gap","label","Tooltip","title","InfoOutlined","sx","fontSize","isPayloadOfSchemaType","asSchema","TableHeadCellSchema","isTableHeadCell","isPayloadOfSchemaType","TableHeadCellSchema","ArrowCircleLeftOutlined","ArrowCircleRightOutlined","IconButton","LinearProgress","FlexRow","React","NextIteratorFlexbox","next","changePage","loading","props","React","FlexRow","justifyContent","gap","LinearProgress","sx","display","flexGrow","visibility","IconButton","onClick","ArrowCircleLeftOutlined","ArrowCircleRightOutlined","ArrowForwardRounded","HistoryRounded","RefreshRounded","Box","CardContent","IconButton","Tooltip","Typography","useTheme","ButtonEx","FlexCol","FlexGrowRow","FlexRow","alphaCss","CardEx","DateTime","React","WidgetCard","widgetName","widgetContent","widgetPath","timeOfData","props","theme","useTheme","formatTimeOfData","timeNow","DateTime","now","toSeconds","secondsSinceDataRefreshed","getYearsAndMonths","years","Math","floor","months","ceil","fromSeconds","toFormat","React","CardEx","sx","backgroundColor","alphaCss","vars","palette","background","paper","display","height","width","CardContent","padding","FlexCol","alignItems","justifyContent","FlexGrowRow","Typography","color","text","primary","fontWeight","typography","fontWeightMedium","variant","IconButton","RefreshRounded","Box","paddingY","FlexRow","Tooltip","title","gap","opacity","HistoryRounded","fontSize","ButtonEx","size","to","ArrowForwardRounded","Stack","useIsDark","React","Box","useTheme","animated","to","interpolate","useSprings","alphaCss","React","useState","useDrag","Typography","FlexCol","FlexGrowRow","React","LinearProgress","styled","alphaCss","StyledLinearProgress","name","theme","borderRadius","shape","vars","palette","text","secondary","spacing","sampleData","name","value","HorizontalBarGraph","items","props","itemsSortedByValue","toSorted","a","b","keyA","keyB","console","log","topValue","React","FlexCol","alignItems","gap","slice","map","item","index","key","FlexGrowRow","justifyContent","Typography","variant","maxWidth","noWrap","StyledLinearProgress","color","Typography","useTheme","FlexCol","FlexGrowRow","React","useEffect","MAX_LENGTH","validateProps","props","length","Error","TwoColTwoStat","items","theme","useTheme","useEffect","React","FlexGrowRow","gap","map","item","index","FlexCol","key","unit","flexGrow","alignItems","Typography","variant","fontWeight","typography","fontWeightMedium","rawInsightValue","subtitle","React","ExampleBarGraphWidget","React","WidgetCard","widgetContent","HorizontalBarGraph","widgetName","timeOfData","widgetPath","React","CircleRounded","Paper","styled","TableRow","Typography","FlexCol","FlexGrowRow","FlexRow","alphaCss","React","sampleData","name","value","StyledLightTableRow","styled","Paper","theme","backgroundColor","padding","spacing","StyledTableColumnTitle","Typography","color","vars","palette","text","secondary","fontWeight","typography","fontWeightBold","textTransform","DefaultTrueOutput","CircleRounded","fill","success","main","fontSize","DefaultFalseOutput","alphaCss","disabled","defaultTrueOutput","React","defaultFalseOutput","BooleanTable","items","tableHeaders","trueOutput","falseOutput","props","FlexCol","alignItems","FlexRow","paddingBottom","justifyContent","map","key","variant","gap","slice","item","index","TableRow","FlexGrowRow","flexGrow","noWrap","maxWidth","ExampleBooleanTableWidget","React","WidgetCard","widgetContent","BooleanTable","items","name","value","tableHeaders","widgetName","timeOfData","widgetPath","React","ExampleTwoColTwoStatWidget","React","WidgetCard","widgetContent","TwoColTwoStat","items","rawInsightValue","subtitle","uiInsightValue","unit","widgetName","timeOfData","widgetPath","cards","React","ExampleBarGraphWidget","key","ExampleBooleanTableWidget","ExampleTwoColTwoStatWidget","to","i","delay","rot","Math","random","scale","x","y","from","_i","trans","r","s","Deck","gone","useState","Set","theme","useTheme","props","api","useSprings","length","bind","useDrag","args","index","down","movement","mx","direction","xDir","velocity","trigger","dir","add","start","isGone","has","globalThis","innerWidth","config","friction","tension","undefined","size","setTimeout","clear","map","animated","div","style","alignItems","display","height","justifyContent","position","touchAction","width","willChange","backgroundColor","alphaCss","vars","palette","background","paper","backgroundPosition","backgroundRepeat","backgroundSize","borderRadius","boxShadow","shadows","maxHeight","maxWidth","transform","interpolate","StackOfWidgets","Box","sx","cursor","WidgetCardExamples","darkMode","useIsDark","React","DappPage","sx","backgroundImage","xyoDark","xyoLight","backgroundSize","container","title","Stack","gap","flexDirection","flexWrap","ExampleTwoColTwoStatWidget","ExampleBarGraphWidget","ExampleBooleanTableWidget","StackOfWidgets","ThemeProvider","XyosTheme","React","useMemo","AppOsThemeProvider","children","initialValue","useMemo","validValues","savedValue","localStorage","getItem","includes","React","ThemeProvider","theme","XyosTheme","defaultMode"]}
|