@imtbl/checkout-widgets 2.24.7 → 2.24.9-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{AddTokensWidget-aAZMavtt.js → AddTokensWidget-CIR8BF_I.js} +24 -297
- package/dist/browser/{BridgeWidget-CWWCr015.js → BridgeWidget-C5Uljhhx.js} +13 -294
- package/dist/browser/{CommerceWidget-B36D9SAt.js → CommerceWidget-CeBBYCbK.js} +17 -47
- package/dist/browser/{FeesBreakdown-WeqZxAT6.js → FeesBreakdown-BU4haotD.js} +1 -1
- package/dist/browser/{OnRampWidget-DpxysET8.js → OnRampWidget-Ccvb3QkT.js} +5 -80
- package/dist/browser/{SaleWidget-CMkn5eAJ.js → SaleWidget-CPARFlzv.js} +61 -219
- package/dist/browser/{SpendingCapHero-BuWrv_Rb.js → SpendingCapHero-B-0YYZho.js} +1 -1
- package/dist/browser/{SwapWidget-CEnCMtGs.js → SwapWidget-ujE6uX-N.js} +12 -206
- package/dist/browser/{TokenImage-EqfdG328.js → TokenImage-BeUf_Ulv.js} +1 -1
- package/dist/browser/{TopUpView-D3BxE8R3.js → TopUpView-GMv3360Q.js} +3 -54
- package/dist/browser/{WalletApproveHero-C_8es7r9.js → WalletApproveHero-BJi7ufqM.js} +4 -12
- package/dist/browser/{WalletWidget-Czye7zS5.js → WalletWidget-BABrqsfd.js} +4 -96
- package/dist/browser/{index-WfurfROg.js → index-CcxHW36j.js} +1275 -9717
- package/dist/browser/{index-CcLq9am4.js → index-Cp1w6map.js} +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/{useInterval-CrmneADn.js → useInterval-DbCsm_gG.js} +1 -1
- package/dist/types/components/FormComponents/SelectForm/SelectForm.d.ts +1 -5
- package/dist/types/components/FormComponents/SelectInput/SelectInput.d.ts +1 -5
- package/dist/types/components/Transak/TransakIframe.d.ts +0 -1
- package/dist/types/components/Transak/useTransakEvents.d.ts +0 -4
- package/dist/types/components/WalletDrawer/ConnectWalletDrawer.d.ts +1 -2
- package/dist/types/lib/squid/hooks/useExecute.d.ts +1 -2
- package/dist/types/views/top-up/TopUpView.d.ts +1 -5
- package/dist/types/widgets/add-tokens/hooks/useError.d.ts +1 -1
- package/dist/types/widgets/purchase/components/PurchaseConnectWalletDrawer.d.ts +1 -3
- package/dist/types/widgets/sale/hooks/useSaleEvents.d.ts +5 -31
- package/dist/types/widgets/swap/components/Fees.d.ts +1 -1
- package/package.json +7 -9
- package/src/components/ConnectLoader/ConnectLoader.tsx +0 -16
- package/src/components/FormComponents/SelectForm/SelectForm.tsx +2 -18
- package/src/components/FormComponents/SelectInput/SelectInput.tsx +1 -12
- package/src/components/RouteOptionsDrawer/RouteOptionsDrawer.tsx +2 -26
- package/src/components/Transactions/ChangeWallet.tsx +1 -12
- package/src/components/Transactions/ClaimWithdrawalInProgress.tsx +0 -11
- package/src/components/Transactions/NoTransactions.tsx +0 -10
- package/src/components/Transactions/TransactionItemWithdrawPending.tsx +1 -13
- package/src/components/Transactions/Transactions.tsx +2 -28
- package/src/components/Transak/TransakIframe.tsx +0 -6
- package/src/components/Transak/useTransakEvents.ts +1 -70
- package/src/components/WalletDrawer/ConnectWalletDrawer.tsx +2 -35
- package/src/components/WalletDrawer/PayWithWalletDrawer.tsx +0 -1
- package/src/context/view-context/test-components/ViewContextTestComponent.tsx +14 -15
- package/src/lib/squid/hooks/useExecute.ts +5 -18
- package/src/views/top-up/TopUpView.tsx +5 -56
- package/src/widgets/add-tokens/AddTokensRoot.tsx +28 -29
- package/src/widgets/add-tokens/AddTokensWidget.tsx +2 -17
- package/src/widgets/add-tokens/components/TokenDrawerMenu.tsx +2 -18
- package/src/widgets/add-tokens/hooks/useError.tsx +1 -18
- package/src/widgets/add-tokens/hooks/useErrorHandler.ts +2 -12
- package/src/widgets/add-tokens/views/AddTokens.tsx +8 -154
- package/src/widgets/add-tokens/views/Review.tsx +6 -94
- package/src/widgets/bridge/BridgeWidget.tsx +0 -35
- package/src/widgets/bridge/BridgeWidgetRoot.tsx +17 -18
- package/src/widgets/bridge/components/BridgeForm.tsx +0 -20
- package/src/widgets/bridge/components/BridgeReviewSummary.tsx +1 -49
- package/src/widgets/bridge/components/WalletAndNetworkSelector.tsx +3 -122
- package/src/widgets/bridge/views/ApproveTransaction.tsx +1 -15
- package/src/widgets/bridge/views/Bridge.tsx +1 -16
- package/src/widgets/bridge/views/BridgeReview.tsx +1 -12
- package/src/widgets/bridge/views/ClaimWithdrawal.tsx +0 -11
- package/src/widgets/bridge/views/MoveInProgress.tsx +0 -24
- package/src/widgets/bridge/views/WalletNetworkSelectionView.tsx +1 -12
- package/src/widgets/connect/ConnectWidget.tsx +2 -18
- package/src/widgets/connect/ConnectWidgetRoot.tsx +15 -16
- package/src/widgets/connect/components/WalletList.tsx +6 -55
- package/src/widgets/connect/views/ConnectWallet.tsx +1 -12
- package/src/widgets/connect/views/ReadyToConnect.tsx +2 -29
- package/src/widgets/connect/views/SwitchNetworkEth.tsx +3 -22
- package/src/widgets/connect/views/SwitchNetworkZkEVM.tsx +0 -18
- package/src/widgets/immutable-commerce/CommerceWidgetRoot.tsx +17 -19
- package/src/widgets/on-ramp/OnRampWidget.tsx +0 -2
- package/src/widgets/on-ramp/OnRampWidgetRoot.tsx +23 -24
- package/src/widgets/on-ramp/views/OnRampMain.tsx +1 -91
- package/src/widgets/purchase/PurchaseWidgetRoot.tsx +22 -23
- package/src/widgets/purchase/components/PurchaseConnectWalletDrawer.tsx +2 -34
- package/src/widgets/purchase/components/PurchaseDeliverToWalletDrawer.tsx +0 -1
- package/src/widgets/purchase/components/PurchasePayWithWalletDrawer.tsx +0 -2
- package/src/widgets/purchase/components/PurchaseRouteOptionsDrawer/RouteOptionsDrawer.tsx +1 -30
- package/src/widgets/purchase/components/WithCard.tsx +0 -4
- package/src/widgets/purchase/views/Purchase.tsx +1 -2
- package/src/widgets/sale/SaleWidget.tsx +0 -2
- package/src/widgets/sale/SaleWidgetRoot.tsx +32 -33
- package/src/widgets/sale/components/OrderReview.tsx +2 -29
- package/src/widgets/sale/components/WithCard.tsx +0 -2
- package/src/widgets/sale/hooks/useSaleEvents.ts +3 -185
- package/src/widgets/sale/views/OrderSummary.tsx +2 -15
- package/src/widgets/sale/views/PayWithCard.tsx +4 -46
- package/src/widgets/sale/views/PayWithCoins.tsx +4 -9
- package/src/widgets/sale/views/PaymentMethods.tsx +3 -6
- package/src/widgets/sale/views/SaleErrorView.tsx +1 -1
- package/src/widgets/swap/SwapWidget.tsx +0 -24
- package/src/widgets/swap/SwapWidgetRoot.tsx +29 -30
- package/src/widgets/swap/components/Fees.tsx +1 -1
- package/src/widgets/swap/components/SwapForm.tsx +2 -140
- package/src/widgets/swap/views/ApproveERC20Onboarding.tsx +1 -36
- package/src/widgets/swap/views/SwapCoins.tsx +0 -17
- package/src/widgets/swap/views/SwapInProgress.tsx +0 -14
- package/src/widgets/transfer/TransferForm.tsx +3 -25
- package/src/widgets/transfer/TransferWidget.tsx +1 -23
- package/src/widgets/wallet/WalletWidgetRoot.tsx +24 -25
- package/src/widgets/wallet/components/BalanceItem/BalanceItem.tsx +1 -50
- package/src/widgets/wallet/components/NetworkMenu/NetworkMenu.tsx +0 -13
- package/src/widgets/wallet/components/WalletAddress/WalletAddress.tsx +0 -13
- package/src/widgets/wallet/views/CoinInfo.tsx +1 -12
- package/src/widgets/wallet/views/Settings.tsx +1 -15
- package/src/widgets/wallet/views/WalletBalances.tsx +0 -24
- package/tsconfig.json +0 -1
- package/dist/browser/auto-track-BcwQjFJ1.js +0 -105
- package/dist/browser/index-BSnE_6oQ.js +0 -27
- package/dist/browser/index-CKGatDzP.js +0 -60
- package/dist/browser/index-Cnt0i-EY.js +0 -65
- package/dist/browser/index-DLXeqRzN.js +0 -65
- package/dist/browser/index-MANbU_qG.js +0 -5634
- package/dist/browser/index-lHICKwNF.js +0 -446
- package/dist/browser/index.umd-Cn1Q502t.js +0 -32
- package/dist/browser/is-plan-event-enabled-mXX0dwl-.js +0 -17
- package/dist/types/context/analytics-provider/CustomAnalyticsProvider.d.ts +0 -7
- package/dist/types/context/analytics-provider/SegmentAnalyticsProvider.d.ts +0 -42
- package/dist/types/context/analytics-provider/SetupAnalytics.d.ts +0 -7
- package/dist/types/lib/analytics/identifyUser.d.ts +0 -8
- package/dist/types/lib/analytics/identifyUser.test.d.ts +0 -1
- package/src/context/analytics-provider/CustomAnalyticsProvider.tsx +0 -22
- package/src/context/analytics-provider/SegmentAnalyticsProvider.ts +0 -41
- package/src/context/analytics-provider/SetupAnalytics.tsx +0 -35
- package/src/lib/analytics/identifyUser.test.ts +0 -44
- package/src/lib/analytics/identifyUser.ts +0 -26
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { T as TokenImage } from './TokenImage-
|
|
4
|
-
import { F as Fees, B as BridgeWidget } from './BridgeWidget-
|
|
5
|
-
import OnRampWidget from './OnRampWidget-
|
|
6
|
-
import { a as SwapWidget } from './SwapWidget-
|
|
7
|
-
import { f as fetchRiskAssessmentV2, i as isSingleAddressSanctioned } from './FeesBreakdown-
|
|
8
|
-
import './WalletApproveHero-
|
|
9
|
-
import './useInterval-
|
|
10
|
-
import './SpendingCapHero-
|
|
1
|
+
import { bG as r, k as Contract, r as reactExports, bL as errorToString, bM as hexToText, bN as compareStr, aP as ViewContext, V as ViewActions, bO as Z, q as jsx, bP as SalePaymentTypes, u as useTranslation, bQ as TransakIframe, j as calculateCryptoToFiat, E as EventTargetContext, bR as sendSaleWidgetCloseEvent, bS as sendSaleSuccessEvent, bT as sendSaleFailedEvent, bU as sendSaleTransactionSuccessEvent, bV as sendSalePaymentMethodEvent, bW as sendSalePaymentTokenEvent, G as HeaderNavigation, s as jsxs, bX as LoadingOverlay, t as Box, aD as Fragment, x as SimpleLayout, aQ as useHandover, aR as HandoverTarget, n as getRemoteRive, H as Heading, bY as HandoverDuration, aG as isPassportProvider, aU as HandoverContent, aK as MenuItem, be as motion, bd as listVariants, bf as listItemVariants, a3 as SharedViews, bZ as FooterLogo, b_ as StatusType, b$ as prettyFormatNumber, D as tokenValueFormat, c0 as ShimmerCircle, v as Button, w as Stack, c1 as FundingStepType, c2 as abbreviateWalletAddress, c3 as formatUnits, ay as Drawer, c4 as Caption, az as Divider, c5 as tokenSymbolNameOverrides, c6 as TransactionOrGasType, c7 as GasTokenType, c8 as ItemType, c9 as RoutingOutcomeType, aW as isNativeToken, aX as getTokenImageByAddress, ca as isGasFree, z as CryptoFiatContext, X as ConnectLoaderContext, cb as eventTargetReducer, cc as initialEventTargetState, I as IMTBLWidgetEvents, cd as EventTargetActions, _ as LoadingView, aL as ChainId, ce as ConnectWidgetViews, a5 as ConnectWidget, O as OnRampEventType, S as SwapEventType, B as BridgeEventType, b as ConnectEventType, cf as ConnectLoaderActions, p as parseUnits, $ as CryptoFiatActions, a_ as ButtCon, y as Body, cg as widgetTheme, bC as viewReducer, bD as initialViewState, o as BlockExplorerService, bK as ServiceUnavailableErrorView, U as CryptoFiatProvider } from './index-CcxHW36j.js';
|
|
2
|
+
import { T as TopUpView } from './TopUpView-GMv3360Q.js';
|
|
3
|
+
import { T as TokenImage } from './TokenImage-BeUf_Ulv.js';
|
|
4
|
+
import { F as Fees, B as BridgeWidget } from './BridgeWidget-C5Uljhhx.js';
|
|
5
|
+
import OnRampWidget from './OnRampWidget-Ccvb3QkT.js';
|
|
6
|
+
import { a as SwapWidget } from './SwapWidget-ujE6uX-N.js';
|
|
7
|
+
import { f as fetchRiskAssessmentV2, i as isSingleAddressSanctioned } from './FeesBreakdown-BU4haotD.js';
|
|
8
|
+
import './WalletApproveHero-BJi7ufqM.js';
|
|
9
|
+
import './useInterval-DbCsm_gG.js';
|
|
10
|
+
import './SpendingCapHero-B-0YYZho.js';
|
|
11
11
|
|
|
12
12
|
var SaleWidgetViews;
|
|
13
13
|
(function (SaleWidgetViews) {
|
|
@@ -799,7 +799,7 @@ function useSaleContext() {
|
|
|
799
799
|
function WithCard(props) {
|
|
800
800
|
const { t } = useTranslation();
|
|
801
801
|
const { onInit, onOpen, onOrderCreated, onOrderProcessing, onOrderCompleted, onOrderFailed, } = props;
|
|
802
|
-
const { recipientEmail, recipientAddress,
|
|
802
|
+
const { recipientEmail, recipientAddress, signResponse, goToErrorView, environment, orderQuote, excludeFiatCurrencies, } = useSaleContext();
|
|
803
803
|
const executeTxn = signResponse?.transactions.find((txn) => txn.methodCall.startsWith('execute'));
|
|
804
804
|
if (!signResponse || !executeTxn) {
|
|
805
805
|
return null;
|
|
@@ -817,7 +817,7 @@ function WithCard(props) {
|
|
|
817
817
|
const onFailedToLoad = () => {
|
|
818
818
|
goToErrorView(SaleErrorTypes.TRANSAK_FAILED);
|
|
819
819
|
};
|
|
820
|
-
return (jsx(TransakIframe, { id: "transak-iframe", type: "nft-checkout", email: recipientEmail, walletAddress: recipientAddress,
|
|
820
|
+
return (jsx(TransakIframe, { id: "transak-iframe", type: "nft-checkout", email: recipientEmail, walletAddress: recipientAddress, exchangeScreenTitle: t('views.PAY_WITH_CARD.screenTitle'), nftData: nftData, calldata: executeTxn.rawData, cryptoCurrencyCode: signResponse.order.currency.name, estimatedGasLimit: executeTxn.gasEstimate, partnerOrderId: executeTxn.params.reference, excludeFiatCurrencies: excludeFiatCurrencies, onInit: onInit, onOpen: onOpen, onOrderCreated: onOrderCreated, onOrderProcessing: onOrderProcessing, onOrderCompleted: onOrderCompleted, onOrderFailed: onOrderFailed, onFailedToLoad: onFailedToLoad, environment: environment, contractId: orderQuote.config.contractId }));
|
|
821
821
|
}
|
|
822
822
|
|
|
823
823
|
const getPaymentTokenDetails = (fundingBalance, conversions) => {
|
|
@@ -837,179 +837,41 @@ const getPaymentTokenDetails = (fundingBalance, conversions) => {
|
|
|
837
837
|
};
|
|
838
838
|
|
|
839
839
|
const useSaleEvent = () => {
|
|
840
|
-
const {
|
|
841
|
-
const { recipientAddress: userId, signResponse, paymentMethod, } = useSaleContext();
|
|
840
|
+
const { paymentMethod } = useSaleContext();
|
|
842
841
|
const { eventTargetState: { eventTarget }, } = reactExports.useContext(EventTargetContext);
|
|
843
|
-
const
|
|
844
|
-
const commonProps = {
|
|
845
|
-
location: 'web',
|
|
846
|
-
userJourney: UserJourney.SALE,
|
|
847
|
-
};
|
|
848
|
-
const userProps = {
|
|
849
|
-
userId,
|
|
850
|
-
paymentMethod,
|
|
851
|
-
};
|
|
852
|
-
const orderProps = {
|
|
853
|
-
amount: signResponse?.order.totalAmount,
|
|
854
|
-
currency: signResponse?.order.currency.name,
|
|
855
|
-
};
|
|
856
|
-
const sendCloseEvent = (screen = defaultView, controlType = 'Button', action = 'Pressed') => {
|
|
857
|
-
track({
|
|
858
|
-
...commonProps,
|
|
859
|
-
screen: toPascalCase(screen),
|
|
860
|
-
control: 'Close',
|
|
861
|
-
controlType,
|
|
862
|
-
action,
|
|
863
|
-
extras: {
|
|
864
|
-
...userProps,
|
|
865
|
-
},
|
|
866
|
-
});
|
|
842
|
+
const sendCloseEvent = () => {
|
|
867
843
|
sendSaleWidgetCloseEvent(eventTarget);
|
|
868
844
|
};
|
|
869
|
-
const sendSuccessEvent = (
|
|
870
|
-
track({
|
|
871
|
-
...commonProps,
|
|
872
|
-
screen: toPascalCase(screen),
|
|
873
|
-
control: 'Success',
|
|
874
|
-
controlType: 'Event',
|
|
875
|
-
action: 'Succeeded',
|
|
876
|
-
extras: {
|
|
877
|
-
...details,
|
|
878
|
-
...userProps,
|
|
879
|
-
transactions: toStringifyTransactions(transactions),
|
|
880
|
-
...orderProps,
|
|
881
|
-
paymentMethod,
|
|
882
|
-
tokenIds,
|
|
883
|
-
},
|
|
884
|
-
});
|
|
845
|
+
const sendSuccessEvent = (transactions = [], tokenIds = [], details = {}) => {
|
|
885
846
|
sendSaleSuccessEvent(eventTarget, paymentMethod, transactions, tokenIds, details.transactionId);
|
|
886
847
|
};
|
|
887
|
-
const sendFailedEvent = (reason, error, transactions = [],
|
|
888
|
-
track({
|
|
889
|
-
...commonProps,
|
|
890
|
-
screen: toPascalCase(screen || defaultView),
|
|
891
|
-
control: 'Fail',
|
|
892
|
-
controlType: 'Event',
|
|
893
|
-
action: 'Failed',
|
|
894
|
-
extras: {
|
|
895
|
-
...details,
|
|
896
|
-
transactions: toStringifyTransactions(transactions),
|
|
897
|
-
...error,
|
|
898
|
-
...orderProps,
|
|
899
|
-
...userProps,
|
|
900
|
-
paymentMethod,
|
|
901
|
-
reason,
|
|
902
|
-
},
|
|
903
|
-
});
|
|
848
|
+
const sendFailedEvent = (reason, error, transactions = [], details = {}) => {
|
|
904
849
|
sendSaleFailedEvent(eventTarget, reason, error, paymentMethod, transactions, details.transactionId);
|
|
905
850
|
};
|
|
906
851
|
const sendTransactionSuccessEvent = (transaction) => {
|
|
907
852
|
sendSaleTransactionSuccessEvent(eventTarget, paymentMethod, [transaction]);
|
|
908
853
|
};
|
|
909
|
-
const sendSelectedPaymentMethod = (type
|
|
910
|
-
track({
|
|
911
|
-
...commonProps,
|
|
912
|
-
screen: toPascalCase(screen),
|
|
913
|
-
control: 'Select',
|
|
914
|
-
controlType: 'MenuItem',
|
|
915
|
-
extras: {
|
|
916
|
-
paymentMethod: type,
|
|
917
|
-
},
|
|
918
|
-
});
|
|
854
|
+
const sendSelectedPaymentMethod = (type) => {
|
|
919
855
|
sendSalePaymentMethodEvent(eventTarget, type);
|
|
920
856
|
};
|
|
921
|
-
const sendSelectedPaymentToken = (
|
|
857
|
+
const sendSelectedPaymentToken = (fundingBalance, conversions) => {
|
|
922
858
|
const details = getPaymentTokenDetails(fundingBalance, conversions);
|
|
923
|
-
track({
|
|
924
|
-
...commonProps,
|
|
925
|
-
screen: toPascalCase(screen),
|
|
926
|
-
control: 'Select',
|
|
927
|
-
controlType: 'MenuItem',
|
|
928
|
-
extras: {
|
|
929
|
-
...details,
|
|
930
|
-
},
|
|
931
|
-
});
|
|
932
859
|
sendSalePaymentTokenEvent(eventTarget, details);
|
|
933
860
|
};
|
|
934
|
-
const sendPageView = (screen, data) => {
|
|
935
|
-
page({
|
|
936
|
-
...commonProps,
|
|
937
|
-
screen: toPascalCase(screen),
|
|
938
|
-
action: 'Viewed',
|
|
939
|
-
extras: { ...data },
|
|
940
|
-
});
|
|
941
|
-
};
|
|
942
|
-
const sendOrderCreated = (screen, details) => {
|
|
943
|
-
track({
|
|
944
|
-
...commonProps,
|
|
945
|
-
screen: toPascalCase(screen),
|
|
946
|
-
control: 'OrderCreated',
|
|
947
|
-
controlType: 'Event',
|
|
948
|
-
extras: {
|
|
949
|
-
...details,
|
|
950
|
-
},
|
|
951
|
-
});
|
|
952
|
-
};
|
|
953
|
-
const sendProceedToPay = (screen, fundingBalance, conversions, controlType = 'Button', action = 'Pressed') => {
|
|
954
|
-
track({
|
|
955
|
-
...commonProps,
|
|
956
|
-
screen: toPascalCase(screen),
|
|
957
|
-
control: 'ProceedToPay',
|
|
958
|
-
controlType,
|
|
959
|
-
action,
|
|
960
|
-
extras: {
|
|
961
|
-
...userProps,
|
|
962
|
-
...getPaymentTokenDetails(fundingBalance, conversions),
|
|
963
|
-
},
|
|
964
|
-
});
|
|
965
|
-
};
|
|
966
|
-
const sendInsufficientFunds = (screen, txRequirements, controlType = 'Event', action = 'Viewed') => {
|
|
967
|
-
track({
|
|
968
|
-
...commonProps,
|
|
969
|
-
screen: toPascalCase(screen),
|
|
970
|
-
control: 'InsufficientFunds',
|
|
971
|
-
controlType,
|
|
972
|
-
action,
|
|
973
|
-
extras: {
|
|
974
|
-
...userProps,
|
|
975
|
-
...txRequirements,
|
|
976
|
-
},
|
|
977
|
-
});
|
|
978
|
-
};
|
|
979
|
-
const sendViewFeesEvent = (screen, controlType = 'Button', action = 'Pressed') => {
|
|
980
|
-
track({
|
|
981
|
-
...commonProps,
|
|
982
|
-
screen: toPascalCase(screen),
|
|
983
|
-
control: 'ViewFees',
|
|
984
|
-
controlType,
|
|
985
|
-
action,
|
|
986
|
-
extras: {
|
|
987
|
-
...userProps,
|
|
988
|
-
},
|
|
989
|
-
});
|
|
990
|
-
};
|
|
991
861
|
return {
|
|
992
|
-
track,
|
|
993
|
-
page,
|
|
994
|
-
sendPageView,
|
|
995
862
|
sendCloseEvent,
|
|
996
863
|
sendSuccessEvent,
|
|
997
864
|
sendFailedEvent,
|
|
998
865
|
sendTransactionSuccessEvent,
|
|
999
|
-
sendOrderCreated,
|
|
1000
866
|
sendSelectedPaymentMethod,
|
|
1001
867
|
sendSelectedPaymentToken,
|
|
1002
|
-
sendProceedToPay,
|
|
1003
|
-
sendViewFeesEvent,
|
|
1004
|
-
sendInsufficientFunds,
|
|
1005
868
|
};
|
|
1006
869
|
};
|
|
1007
870
|
|
|
1008
871
|
function PayWithCard() {
|
|
1009
|
-
const { sendPageView } = useSaleEvent();
|
|
1010
872
|
const [initialised, setInitialised] = reactExports.useState(false);
|
|
1011
873
|
const { goBackToPaymentMethods, goToErrorView, signResponse: signData, signTokenIds, } = useSaleContext();
|
|
1012
|
-
const {
|
|
874
|
+
const { sendCloseEvent, sendSuccessEvent } = useSaleEvent();
|
|
1013
875
|
const { t } = useTranslation();
|
|
1014
876
|
const onInit = () => setInitialised(true);
|
|
1015
877
|
const onOrderFailed = () => {
|
|
@@ -1036,32 +898,9 @@ function PayWithCard() {
|
|
|
1036
898
|
signData,
|
|
1037
899
|
transactionId: signData?.transactionId,
|
|
1038
900
|
};
|
|
1039
|
-
sendSuccessEvent(
|
|
1040
|
-
sendCloseEvent(
|
|
901
|
+
sendSuccessEvent([], signTokenIds, details);
|
|
902
|
+
sendCloseEvent();
|
|
1041
903
|
};
|
|
1042
|
-
const onOrderCreated = (data = {}) => {
|
|
1043
|
-
const { id: orderId, status: orderStatus, cryptoAmount, cryptoCurrency, fiatAmount, fiatAmountInUsd, amountPaid, totalFeeInFiat, paymentOptionId: paymentOption, userId, userKycType, walletAddress, nftAssetInfo, } = data;
|
|
1044
|
-
const { nftDataBase64, quantity } = nftAssetInfo || {};
|
|
1045
|
-
sendOrderCreated(SaleWidgetViews.PAY_WITH_CARD, {
|
|
1046
|
-
orderId,
|
|
1047
|
-
orderStatus,
|
|
1048
|
-
cryptoAmount,
|
|
1049
|
-
cryptoCurrency,
|
|
1050
|
-
fiatAmount,
|
|
1051
|
-
fiatAmountInUsd,
|
|
1052
|
-
amountPaid,
|
|
1053
|
-
totalFeeInFiat,
|
|
1054
|
-
paymentOption,
|
|
1055
|
-
userId,
|
|
1056
|
-
userKycType,
|
|
1057
|
-
walletAddress,
|
|
1058
|
-
nftDataBase64,
|
|
1059
|
-
quantity,
|
|
1060
|
-
signData,
|
|
1061
|
-
transactionId: signData?.transactionId,
|
|
1062
|
-
}); // checkoutPrimarySalePayWithCard_OrderCreatedEvent
|
|
1063
|
-
};
|
|
1064
|
-
reactExports.useEffect(() => sendPageView(SaleWidgetViews.PAY_WITH_CARD), []); // checkoutPrimarySalePayWithCardViewed
|
|
1065
904
|
return (jsx(SimpleLayout, { header: initialised && (jsx(HeaderNavigation, { onCloseButtonClick: () => goBackToPaymentMethods() })), children: jsxs(Fragment, { children: [jsx(LoadingOverlay, { visible: !initialised, children: jsx(LoadingOverlay.Content, { children: jsx(LoadingOverlay.Content.LoopingText, { text: [t('views.PAY_WITH_CARD.loading')] }) }) }), jsx(Box, { style: {
|
|
1066
905
|
display: 'block',
|
|
1067
906
|
position: 'relative',
|
|
@@ -1071,7 +910,7 @@ function PayWithCard() {
|
|
|
1071
910
|
overflow: 'hidden',
|
|
1072
911
|
margin: '0 auto',
|
|
1073
912
|
width: '100%',
|
|
1074
|
-
}, children: jsx(WithCard, { onInit: onInit, onOrderFailed: onOrderFailed, onOrderCompleted: onOrderProcessing,
|
|
913
|
+
}, children: jsx(WithCard, { onInit: onInit, onOrderFailed: onOrderFailed, onOrderCompleted: onOrderProcessing, onOrderProcessing: onOrderProcessing }) })] }) }));
|
|
1075
914
|
}
|
|
1076
915
|
|
|
1077
916
|
var TransactionMethod;
|
|
@@ -1229,7 +1068,7 @@ function PayWithCoins() {
|
|
|
1229
1068
|
const processing = reactExports.useRef(false);
|
|
1230
1069
|
const prevTransactionIndexRef = reactExports.useRef(null);
|
|
1231
1070
|
const { t } = useTranslation();
|
|
1232
|
-
const {
|
|
1071
|
+
const { sendTransactionSuccessEvent, sendFailedEvent, sendCloseEvent, sendSuccessEvent, } = useSaleEvent();
|
|
1233
1072
|
const { executeAll, executeNextTransaction, signResponse, filteredTransactions, currentTransactionIndex, executeResponse, signTokenIds, environment, provider, goToErrorView, } = useSaleContext();
|
|
1234
1073
|
const { onTxnStepExecuteNextTransaction, onTxnStepExecuteAll } = useHandoverSteps(environment);
|
|
1235
1074
|
const { addHandover } = useHandover({
|
|
@@ -1240,7 +1079,7 @@ function PayWithCoins() {
|
|
|
1240
1079
|
sendTransactionSuccessEvent(txn); // not an analytics event
|
|
1241
1080
|
}, (error, txns) => {
|
|
1242
1081
|
const details = { transactionId: signResponse?.transactionId };
|
|
1243
|
-
sendFailedEvent(error.toString(), error, txns,
|
|
1082
|
+
sendFailedEvent(error.toString(), error, txns, details);
|
|
1244
1083
|
goToErrorView(error.type, error.data);
|
|
1245
1084
|
}, onTxnStepExecuteAll);
|
|
1246
1085
|
}, [signResponse, environment]);
|
|
@@ -1257,7 +1096,7 @@ function PayWithCoins() {
|
|
|
1257
1096
|
const details = {
|
|
1258
1097
|
transactionId: signResponse?.transactionId,
|
|
1259
1098
|
};
|
|
1260
|
-
sendFailedEvent(err.toString(), err, txns,
|
|
1099
|
+
sendFailedEvent(err.toString(), err, txns, details);
|
|
1261
1100
|
goToErrorView(err.type, err.data);
|
|
1262
1101
|
}, onTxnStepExecuteNextTransaction);
|
|
1263
1102
|
}
|
|
@@ -1276,7 +1115,6 @@ function PayWithCoins() {
|
|
|
1276
1115
|
signResponse,
|
|
1277
1116
|
environment,
|
|
1278
1117
|
]);
|
|
1279
|
-
reactExports.useEffect(() => sendPageView(SaleWidgetViews.PAY_WITH_COINS), []); // checkoutPrimarySalePayWithCoinsViewed
|
|
1280
1118
|
reactExports.useEffect(() => {
|
|
1281
1119
|
if (!provider || filteredTransactions.length === 0)
|
|
1282
1120
|
return;
|
|
@@ -1304,8 +1142,8 @@ function PayWithCoins() {
|
|
|
1304
1142
|
inputValue: StateMachineInput.COMPLETED,
|
|
1305
1143
|
children: (jsx(Heading, { sx: { px: 'base.spacing.x6' }, children: t('views.PAYMENT_METHODS.handover.success') })),
|
|
1306
1144
|
onClose: () => {
|
|
1307
|
-
sendSuccessEvent(
|
|
1308
|
-
sendCloseEvent(
|
|
1145
|
+
sendSuccessEvent(executeResponse?.transactions, signTokenIds, details);
|
|
1146
|
+
sendCloseEvent();
|
|
1309
1147
|
},
|
|
1310
1148
|
});
|
|
1311
1149
|
}
|
|
@@ -1357,13 +1195,13 @@ function PaymentMethods() {
|
|
|
1357
1195
|
const { t } = useTranslation();
|
|
1358
1196
|
const { viewDispatch } = reactExports.useContext(ViewContext);
|
|
1359
1197
|
const { sign, goToErrorView, paymentMethod, setPaymentMethod, invalidParameters, disabledPaymentTypes, hideExcludedPaymentTypes, } = useSaleContext();
|
|
1360
|
-
const {
|
|
1198
|
+
const { sendCloseEvent, sendSelectedPaymentMethod } = useSaleEvent();
|
|
1361
1199
|
const handleOptionClick = (type) => {
|
|
1362
1200
|
setPaymentMethod(type);
|
|
1363
1201
|
};
|
|
1364
1202
|
reactExports.useEffect(() => {
|
|
1365
1203
|
if (paymentMethod) {
|
|
1366
|
-
sendSelectedPaymentMethod(paymentMethod
|
|
1204
|
+
sendSelectedPaymentMethod(paymentMethod);
|
|
1367
1205
|
}
|
|
1368
1206
|
if (paymentMethod
|
|
1369
1207
|
&& [SalePaymentTypes.DEBIT, SalePaymentTypes.CREDIT].includes(paymentMethod)) {
|
|
@@ -1399,13 +1237,12 @@ function PaymentMethods() {
|
|
|
1399
1237
|
});
|
|
1400
1238
|
}
|
|
1401
1239
|
}, [paymentMethod]);
|
|
1402
|
-
reactExports.useEffect(() => sendPageView(SaleWidgetViews.PAYMENT_METHODS), []); // checkoutPrimarySalePaymentMethodsViewed
|
|
1403
1240
|
reactExports.useEffect(() => {
|
|
1404
1241
|
if (!invalidParameters)
|
|
1405
1242
|
return;
|
|
1406
1243
|
goToErrorView(SaleErrorTypes.INVALID_PARAMETERS);
|
|
1407
1244
|
}, [invalidParameters]);
|
|
1408
|
-
return (jsx(SimpleLayout, { testId: "payment-methods", header: (jsx(HeaderNavigation, { onCloseButtonClick:
|
|
1245
|
+
return (jsx(SimpleLayout, { testId: "payment-methods", header: (jsx(HeaderNavigation, { onCloseButtonClick: sendCloseEvent })), footer: jsx(FooterLogo, {}), children: jsxs(Box, { sx: {
|
|
1409
1246
|
display: 'flex',
|
|
1410
1247
|
flexDirection: 'column',
|
|
1411
1248
|
paddingX: 'base.spacing.x2',
|
|
@@ -1446,7 +1283,7 @@ function SaleErrorView({ biomeTheme, transactionHash, blockExplorerLink, errorTy
|
|
|
1446
1283
|
const details = {
|
|
1447
1284
|
transactionId: signResponse?.transactionId,
|
|
1448
1285
|
};
|
|
1449
|
-
sendFailedEvent(err.toString(), err, txns,
|
|
1286
|
+
sendFailedEvent(err.toString(), err, txns, details);
|
|
1450
1287
|
setCurrentErrorType(SaleErrorTypes.TRANSACTION_FAILED);
|
|
1451
1288
|
}, onTxnStepExecuteNextTransaction);
|
|
1452
1289
|
}
|
|
@@ -1825,7 +1662,7 @@ function OrderReview({ fundingBalances, conversions, collectionName, loadingBala
|
|
|
1825
1662
|
const { eventTargetState: { eventTarget }, } = reactExports.useContext(EventTargetContext);
|
|
1826
1663
|
const { t } = useTranslation();
|
|
1827
1664
|
const { provider, items, orderQuote, disabledPaymentTypes, selectedCurrency, config: { theme, environment }, } = useSaleContext();
|
|
1828
|
-
const { sendSelectedPaymentToken
|
|
1665
|
+
const { sendSelectedPaymentToken } = useSaleEvent();
|
|
1829
1666
|
const [showCoinsDrawer, setShowCoinsDrawer] = reactExports.useState(false);
|
|
1830
1667
|
const [selectedCurrencyIndex, setSelectedCurrencyIndex] = reactExports.useState(0);
|
|
1831
1668
|
const [transactionFees, setTransactionFees] = reactExports.useState({
|
|
@@ -1843,7 +1680,7 @@ function OrderReview({ fundingBalances, conversions, collectionName, loadingBala
|
|
|
1843
1680
|
};
|
|
1844
1681
|
const onSelect = (selectedIndex) => {
|
|
1845
1682
|
setSelectedCurrencyIndex(selectedIndex);
|
|
1846
|
-
sendSelectedPaymentToken(
|
|
1683
|
+
sendSelectedPaymentToken(fundingBalances[selectedIndex], conversions);
|
|
1847
1684
|
// checkoutPrimarySalePaymentTokenSelected
|
|
1848
1685
|
};
|
|
1849
1686
|
const fundingBalance = reactExports.useMemo(() => fundingBalances[selectedCurrencyIndex], [fundingBalances, selectedCurrencyIndex, provider]);
|
|
@@ -1896,20 +1733,6 @@ function OrderReview({ fundingBalances, conversions, collectionName, loadingBala
|
|
|
1896
1733
|
],
|
|
1897
1734
|
});
|
|
1898
1735
|
}, [gasFees, fundingBalance, conversions]);
|
|
1899
|
-
// Trigger page loaded event
|
|
1900
|
-
useMount(() => {
|
|
1901
|
-
const tokens = fundingBalances.map((fb) => getPaymentTokenDetails(fb, conversions));
|
|
1902
|
-
sendPageView(SaleWidgetViews.ORDER_SUMMARY, {
|
|
1903
|
-
subView: OrderSummarySubViews.REVIEW_ORDER,
|
|
1904
|
-
tokens,
|
|
1905
|
-
items,
|
|
1906
|
-
collectionName,
|
|
1907
|
-
});
|
|
1908
|
-
// checkoutPrimarySaleOrderSummaryViewed
|
|
1909
|
-
}, () => Boolean(items.length
|
|
1910
|
-
&& fundingBalances.length
|
|
1911
|
-
&& !loadingBalances
|
|
1912
|
-
&& conversions.size), [items, fundingBalances, loadingBalances, conversions]);
|
|
1913
1736
|
const multiple = items.length > 1;
|
|
1914
1737
|
const withFees = transactionFees.formattedFees.length > 0;
|
|
1915
1738
|
return (jsxs(SimpleLayout, { testId: "order-review", header: (jsx(HeaderNavigation, { showBack: true, onCloseButtonClick: () => sendSaleWidgetCloseEvent(eventTarget), onBackButtonClick: onBackButtonClick, title: collectionName })), bodyStyleOverrides: {
|
|
@@ -1937,14 +1760,14 @@ function OrderReview({ fundingBalances, conversions, collectionName, loadingBala
|
|
|
1937
1760
|
border: '0px solid transparent',
|
|
1938
1761
|
borderTopWidth: 'base.border.size.200',
|
|
1939
1762
|
borderTopColor: 'base.color.translucent.inverse.1000',
|
|
1940
|
-
}
|
|
1763
|
+
} })) }) }) }), multiple && withFees && (jsx(OrderFees, { fees: transactionFees, sx: {
|
|
1941
1764
|
mb: '-12px',
|
|
1942
1765
|
bradtl: 'base.borderRadius.x6',
|
|
1943
1766
|
bradtr: 'base.borderRadius.x6',
|
|
1944
1767
|
border: '0px solid transparent',
|
|
1945
1768
|
borderTopWidth: 'base.border.size.100',
|
|
1946
1769
|
borderTopColor: 'base.color.translucent.emphasis.400',
|
|
1947
|
-
}
|
|
1770
|
+
} })), jsx(SelectCoinDropdown, { onClick: openDrawer, onProceed: onProceedToBuy, balance: fundingBalance, conversions: conversions, isFreeMint: isFreeMint, canOpen: fundingBalances.length > 1, loading: loadingBalances, priceDisplay: items.length > 1 }), jsx(CoinsDrawer, { conversions: conversions, balances: fundingBalances, onSelect: onSelect, onClose: closeDrawer, selectedIndex: selectedCurrencyIndex, visible: showCoinsDrawer, loading: loadingBalances, onPayWithCard: onPayWithCard, transactionRequirement: transactionRequirement, disabledPaymentTypes: disabledPaymentTypes, theme: theme, environment: environment })] }));
|
|
1948
1771
|
}
|
|
1949
1772
|
|
|
1950
1773
|
const MAX_GAS_LIMIT = '30000000';
|
|
@@ -2430,6 +2253,29 @@ function FundingRouteExecute({ fundingRouteStep, onFundingRouteExecuted, }) {
|
|
|
2430
2253
|
: ChainId.IMTBL_ZKEVM_TESTNET, browserProvider: provider, checkout: checkout, deepLink: ConnectWidgetViews.SWITCH_NETWORK }))] }));
|
|
2431
2254
|
}
|
|
2432
2255
|
|
|
2256
|
+
/**
|
|
2257
|
+
* useMount hook to runs only once when the component mounts
|
|
2258
|
+
* after mounting condition is met
|
|
2259
|
+
*
|
|
2260
|
+
* @param fn function to run
|
|
2261
|
+
* @param shouldMount function to check mount condition
|
|
2262
|
+
* @param deps dependencies to watch for changes
|
|
2263
|
+
*/
|
|
2264
|
+
const useMount = (fn, shouldMount, deps) => {
|
|
2265
|
+
const isMounted = reactExports.useRef(false);
|
|
2266
|
+
const shouldMountCheck = () => {
|
|
2267
|
+
return true;
|
|
2268
|
+
};
|
|
2269
|
+
reactExports.useEffect(() => {
|
|
2270
|
+
if (isMounted.current)
|
|
2271
|
+
return;
|
|
2272
|
+
if (!shouldMountCheck())
|
|
2273
|
+
return;
|
|
2274
|
+
fn();
|
|
2275
|
+
isMounted.current = true;
|
|
2276
|
+
}, []);
|
|
2277
|
+
};
|
|
2278
|
+
|
|
2433
2279
|
function LoadingHandover({ text, duration, animationUrl, inputValue = 0, }) {
|
|
2434
2280
|
const { addHandover } = useHandover({
|
|
2435
2281
|
id: HandoverTarget.GLOBAL,
|
|
@@ -2447,7 +2293,7 @@ function LoadingHandover({ text, duration, animationUrl, inputValue = 0, }) {
|
|
|
2447
2293
|
|
|
2448
2294
|
function OrderSummary({ subView }) {
|
|
2449
2295
|
const { t } = useTranslation();
|
|
2450
|
-
const { sendFailedEvent
|
|
2296
|
+
const { sendFailedEvent } = useSaleEvent();
|
|
2451
2297
|
const { fromTokenAddress, collectionName, goToErrorView, goBackToPaymentMethods, sign, selectedCurrency, setPaymentMethod, environment, paymentMethod, orderQuote, items, } = useSaleContext();
|
|
2452
2298
|
const { connectLoaderState } = reactExports.useContext(ConnectLoaderContext);
|
|
2453
2299
|
const { checkout, provider } = connectLoaderState;
|
|
@@ -2503,7 +2349,7 @@ function OrderSummary({ subView }) {
|
|
|
2503
2349
|
const riskAssessment = await fetchRiskAssessmentV2(riskAssessmentData, checkout.config);
|
|
2504
2350
|
if (riskAssessment && isSingleAddressSanctioned(riskAssessment, address)) {
|
|
2505
2351
|
const error = new Error('Sanctioned address');
|
|
2506
|
-
sendFailedEvent(error.message, {}, [],
|
|
2352
|
+
sendFailedEvent(error.message, {}, [], { riskAssessment, paymentMethod });
|
|
2507
2353
|
viewDispatch({
|
|
2508
2354
|
payload: {
|
|
2509
2355
|
type: ViewActions.UPDATE_VIEW,
|
|
@@ -2515,8 +2361,6 @@ function OrderSummary({ subView }) {
|
|
|
2515
2361
|
});
|
|
2516
2362
|
return;
|
|
2517
2363
|
}
|
|
2518
|
-
sendProceedToPay(SaleWidgetViews.ORDER_SUMMARY, fundingBalance, cryptoFiatState.conversions);
|
|
2519
|
-
// checkoutPrimarySaleProceedToPay
|
|
2520
2364
|
if (type === FundingBalanceType.SUFFICIENT) {
|
|
2521
2365
|
signAndProceed(fundingItem.token.address);
|
|
2522
2366
|
return;
|
|
@@ -2578,8 +2422,6 @@ function OrderSummary({ subView }) {
|
|
|
2578
2422
|
const smartCheckoutResult = fundingBalancesResult.find((result) => result.currency.base)?.smartCheckoutResult;
|
|
2579
2423
|
const data = getTopUpViewData(smartCheckoutResult.transactionRequirements);
|
|
2580
2424
|
setPaymentMethod(undefined);
|
|
2581
|
-
// Send analytics event to track insufficient funds
|
|
2582
|
-
sendInsufficientFunds(SaleWidgetViews.ORDER_SUMMARY, data);
|
|
2583
2425
|
closeHandover();
|
|
2584
2426
|
viewDispatch({
|
|
2585
2427
|
payload: {
|
|
@@ -2696,7 +2538,7 @@ function SaleWidget(props) {
|
|
|
2696
2538
|
customOrderData,
|
|
2697
2539
|
waitFulfillmentSettlements,
|
|
2698
2540
|
hideExcludedPaymentTypes,
|
|
2699
|
-
}, children: jsxs(CryptoFiatProvider, { environment: config.environment, children: [viewState.view.type === SharedViews.LOADING_VIEW && (jsx(LoadingView, { loadingText: loadingText })), viewState.view.type === SaleWidgetViews.PAYMENT_METHODS && (jsx(PaymentMethods, {})), viewState.view.type === SaleWidgetViews.PAY_WITH_CARD && (jsx(PayWithCard, {})), viewState.view.type === SaleWidgetViews.PAY_WITH_COINS && (jsx(PayWithCoins, {})), viewState.view.type === SaleWidgetViews.SALE_FAIL && (jsx(SaleErrorView, { biomeTheme: biomeTheme, errorType: viewState.view.data?.errorType, transactionHash: viewState.view.data?.transactionHash, vendorMessage: viewState.view.data?.vendorError?.message, blockExplorerLink: BlockExplorerService.getTransactionLink(chainId.current, viewState.view.data?.transactionHash) })), viewState.view.type === SaleWidgetViews.ORDER_SUMMARY && (jsx(OrderSummary, { subView: viewState.view.subView })), viewState.view.type === SharedViews.TOP_UP_VIEW && (jsx(TopUpView, {
|
|
2541
|
+
}, children: jsxs(CryptoFiatProvider, { environment: config.environment, children: [viewState.view.type === SharedViews.LOADING_VIEW && (jsx(LoadingView, { loadingText: loadingText })), viewState.view.type === SaleWidgetViews.PAYMENT_METHODS && (jsx(PaymentMethods, {})), viewState.view.type === SaleWidgetViews.PAY_WITH_CARD && (jsx(PayWithCard, {})), viewState.view.type === SaleWidgetViews.PAY_WITH_COINS && (jsx(PayWithCoins, {})), viewState.view.type === SaleWidgetViews.SALE_FAIL && (jsx(SaleErrorView, { biomeTheme: biomeTheme, errorType: viewState.view.data?.errorType, transactionHash: viewState.view.data?.transactionHash, vendorMessage: viewState.view.data?.vendorError?.message, blockExplorerLink: BlockExplorerService.getTransactionLink(chainId.current, viewState.view.data?.transactionHash) })), viewState.view.type === SaleWidgetViews.ORDER_SUMMARY && (jsx(OrderSummary, { subView: viewState.view.subView })), viewState.view.type === SharedViews.TOP_UP_VIEW && (jsx(TopUpView, { widgetEvent: IMTBLWidgetEvents.IMTBL_SALE_WIDGET_EVENT, checkout: checkout, provider: provider, showOnrampOption: config.isOnRampEnabled, showSwapOption: false, showBridgeOption: config.isBridgeEnabled, onCloseButtonClick: () => sendSaleWidgetCloseEvent(eventTarget), onBackButtonClick: () => {
|
|
2700
2542
|
viewDispatch({
|
|
2701
2543
|
payload: {
|
|
2702
2544
|
type: ViewActions.UPDATE_VIEW,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { q as jsx,
|
|
1
|
+
import { q as jsx, cT as heroBackGroundStyles, t as Box, cU as heroImageStyles, dy as heroImageBottomAlign, s as jsxs } from './index-CcxHW36j.js';
|
|
2
2
|
|
|
3
3
|
function SpendingCapHero() {
|
|
4
4
|
return (jsx(Box, { sx: { ...heroBackGroundStyles, background: 'base.color.translucent.emphasis.100' }, children: jsx(Box, { sx: { ...heroImageStyles, ...heroImageBottomAlign }, children: jsxs("svg", { width: "430", height: "305", viewBox: "0 0 430 305", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsx("path", { d: "M94.0614 105.632L93.6321 104L92 104.429L92.4292 106.061L94.0614 105.632Z", fill: "white" }), jsx("path", { d: "M63.6531 193.101L63.1006 191L60.9996 191.553L61.5521 193.654L63.6531 193.101Z", fill: "white" }), jsx("path", { d: "M344.489 224.345L342.345 224L342 226.145L344.144 226.49L344.489 224.345Z", fill: "white" }), jsx("path", { d: "M372.286 139.905L372.905 138.619L371.619 138L371 139.286L372.286 139.905Z", fill: "white" }), jsx("path", { d: "M341.653 78.101L341.101 76L339 76.5525L339.552 78.6535L341.653 78.101Z", fill: "white" }), jsx("path", { d: "M359.286 242.905L359.905 241.619L358.619 241L358 242.286L359.286 242.905Z", fill: "white" }), jsx("path", { d: "M87.0123 112.087L86.0869 111L85.0002 111.925L85.9256 113.012L87.0123 112.087Z", fill: "white" }), jsx("path", { d: "M84.2862 248.905L84.9053 247.619L83.6192 247L83.0001 248.286L84.2862 248.905Z", fill: "white" }), jsx("path", { d: "M215.496 262.992C268.237 262.992 310.993 220.237 310.993 167.496C310.993 114.755 268.237 72 215.496 72C162.755 72 120 114.755 120 167.496C120 220.237 162.755 262.992 215.496 262.992Z", fill: "white", fillOpacity: "0.24", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M159.82 95.1695C179.975 79.6536 204.651 73.1506 227.89 77.0665C261.089 82.6606 253.281 101.028 199.197 121.314C151.934 139.037 123.49 136.348 143.823 110.95C148.422 105.208 153.721 99.8623 159.82 95.1695Z", fill: "white", fillOpacity: "0.08" }), jsx("path", { d: "M215.497 227.183C171.451 227.183 135.159 219.871 130.194 210.462H130.187C145.912 241.626 178.21 263.001 215.497 263.001C252.705 263.001 284.942 241.719 300.706 210.664C295.33 219.98 259.232 227.183 215.505 227.183H215.497Z", fill: "#36E0F8", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M284.219 219.607L283.978 219.84C281.275 222.482 256.583 215.986 253.172 218.418C222.389 240.36 182.779 269.061 146.099 219.397C146.099 219.397 140.761 217.641 138.609 216.686C139.425 217.96 140.279 219.226 141.165 220.469C170.425 261.516 227.423 271.073 268.47 241.813C276.97 235.752 284.118 228.503 289.852 220.454L292.424 216.841L288.252 218.302C287.086 218.713 285.851 219.11 284.553 219.498L284.227 219.599L284.219 219.607Z", fill: "black" }), jsx("path", { d: "M215.496 241.4C262.183 241.4 300.03 226.557 300.03 208.248C300.03 189.938 262.183 175.095 215.496 175.095C168.81 175.095 130.963 189.938 130.963 208.248C130.963 226.557 168.81 241.4 215.496 241.4Z", fill: "#F191FA", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M300.705 210.659C300.705 210.659 300.705 210.65 300.705 210.641C300.705 210.641 300.705 210.65 300.705 210.659Z", fill: "#EBE9E9", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.624 204.511C208.952 204.511 221.377 199.638 221.377 193.626C221.377 187.614 208.952 182.741 193.624 182.741C178.297 182.741 165.871 187.614 165.871 193.626C165.871 199.638 178.297 204.511 193.624 204.511Z", fill: "#D0F500", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.624 204.511C208.954 204.511 221.377 199.64 221.377 193.626V201.349C221.377 207.363 208.954 212.234 193.624 212.234C178.295 212.234 165.871 207.363 165.871 201.349V193.626C165.871 199.64 178.295 204.511 193.624 204.511Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M197.33 204.41C199.49 204.294 201.573 204.084 203.546 203.789V211.512C201.573 211.807 199.49 212.017 197.33 212.133V204.41Z", fill: "#D0F500" }), jsx("path", { d: "M206.398 203.291C211.246 202.304 215.255 200.774 217.905 198.901V206.624C215.255 208.497 211.246 210.027 206.398 211.014V203.291Z", fill: "black" }), jsx("path", { d: "M193.624 204.511C208.954 204.511 221.377 199.64 221.377 193.626V201.349C221.377 207.363 208.954 212.234 193.624 212.234C178.295 212.234 165.871 207.363 165.871 201.349V193.626C165.871 199.64 178.295 204.511 193.624 204.511Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M206.398 211.015C211.246 210.028 215.255 208.497 217.905 206.625", stroke: "#A66CFF", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.624 196.788C208.952 196.788 221.377 191.914 221.377 185.903C221.377 179.891 208.952 175.017 193.624 175.017C178.297 175.017 165.871 179.891 165.871 185.903C165.871 191.914 178.297 196.788 193.624 196.788Z", fill: "#D0F500", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.624 196.788C208.954 196.788 221.377 191.917 221.377 185.903V193.626C221.377 199.639 208.954 204.511 193.624 204.511C178.295 204.511 165.871 199.639 165.871 193.626V185.903C165.871 191.917 178.295 196.788 193.624 196.788Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M197.33 196.687C199.49 196.57 201.573 196.361 203.546 196.065V203.788C201.573 204.084 199.49 204.293 197.33 204.41V196.687Z", fill: "#36E0F8" }), jsx("path", { d: "M206.398 195.568C211.246 194.581 215.255 193.051 217.905 191.178V198.901C215.255 200.774 211.246 202.304 206.398 203.291V195.568Z", fill: "black" }), jsx("path", { d: "M193.624 196.788C208.954 196.788 221.377 191.917 221.377 185.903V193.626C221.377 199.639 208.954 204.511 193.624 204.511C178.295 204.511 165.871 199.639 165.871 193.626V185.903C165.871 191.917 178.295 196.788 193.624 196.788Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M206.398 203.291C211.246 202.304 215.255 200.774 217.905 198.901", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.624 189.065C208.952 189.065 221.377 184.192 221.377 178.18C221.377 172.168 208.952 167.294 193.624 167.294C178.297 167.294 165.871 172.168 165.871 178.18C165.871 184.192 178.297 189.065 193.624 189.065Z", fill: "#F191FA", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.624 189.065C208.954 189.065 221.377 184.194 221.377 178.18V185.903C221.377 191.917 208.954 196.788 193.624 196.788C178.295 196.788 165.871 191.917 165.871 185.903V178.18C165.871 184.194 178.295 189.065 193.624 189.065Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M197.33 188.965C199.49 188.849 201.573 188.639 203.546 188.343V196.067C201.573 196.362 199.49 196.571 197.33 196.688V188.965Z", fill: "#F191FA" }), jsx("path", { d: "M206.398 187.845C211.246 186.858 215.255 185.327 217.905 183.455V191.178C215.255 193.05 211.246 194.581 206.398 195.568V187.845Z", fill: "black" }), jsx("path", { d: "M193.624 189.065C208.954 189.065 221.377 184.194 221.377 178.18V185.903C221.377 191.917 208.954 196.788 193.624 196.788C178.295 196.788 165.871 191.917 165.871 185.903V178.18C165.871 184.194 178.295 189.065 193.624 189.065Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M206.398 195.569C211.246 194.582 215.255 193.052 217.905 191.179", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M238.601 212.934C253.929 212.934 266.354 208.06 266.354 202.049C266.354 196.037 253.929 191.164 238.601 191.164C223.274 191.164 210.848 196.037 210.848 202.049C210.848 208.06 223.274 212.934 238.601 212.934Z", fill: "#D0F500", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M238.601 212.935C253.931 212.935 266.354 208.063 266.354 202.049V209.772C266.354 215.786 253.931 220.658 238.601 220.658C223.272 220.658 210.848 215.786 210.848 209.772V202.049C210.848 208.063 223.272 212.935 238.601 212.935Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M242.307 212.833C244.467 212.717 246.55 212.507 248.523 212.212V219.935C246.55 220.23 244.467 220.44 242.307 220.556V212.833Z", fill: "#F191FA" }), jsx("path", { d: "M251.375 211.713C256.223 210.727 260.232 209.196 262.882 207.324V215.047C260.232 216.919 256.223 218.45 251.375 219.436V211.713Z", fill: "black" }), jsx("path", { d: "M238.601 212.935C253.931 212.935 266.354 208.063 266.354 202.049V209.772C266.354 215.786 253.931 220.658 238.601 220.658C223.272 220.658 210.848 215.786 210.848 209.772V202.049C210.848 208.063 223.272 212.935 238.601 212.935Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M251.375 219.437C256.223 218.45 260.232 216.919 262.882 215.047", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M238.601 205.21C253.929 205.21 266.354 200.336 266.354 194.324C266.354 188.313 253.929 183.439 238.601 183.439C223.274 183.439 210.848 188.313 210.848 194.324C210.848 200.336 223.274 205.21 238.601 205.21Z", fill: "#D0F500", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M238.601 205.21C253.931 205.21 266.354 200.339 266.354 194.325V202.048C266.354 208.062 253.931 212.934 238.601 212.934C223.272 212.934 210.848 208.062 210.848 202.048V194.325C210.848 200.339 223.272 205.21 238.601 205.21Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M242.307 205.109C244.467 204.993 246.55 204.783 248.523 204.488V212.211C246.55 212.506 244.467 212.716 242.307 212.832V205.109Z", fill: "#36E0F8" }), jsx("path", { d: "M251.375 203.989C256.223 203.003 260.232 201.472 262.882 199.6V207.323C260.232 209.195 256.223 210.726 251.375 211.712V203.989Z", fill: "black" }), jsx("path", { d: "M238.601 205.21C253.931 205.21 266.354 200.339 266.354 194.325V202.048C266.354 208.062 253.931 212.934 238.601 212.934C223.272 212.934 210.848 208.062 210.848 202.048V194.325C210.848 200.339 223.272 205.21 238.601 205.21Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M251.375 211.713C256.223 210.726 260.232 209.195 262.882 207.323", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M238.601 197.487C253.929 197.487 266.354 192.613 266.354 186.602C266.354 180.59 253.929 175.716 238.601 175.716C223.274 175.716 210.848 180.59 210.848 186.602C210.848 192.613 223.274 197.487 238.601 197.487Z", fill: "#F191FA", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M238.601 197.487C253.931 197.487 266.354 192.616 266.354 186.602V194.325C266.354 200.339 253.931 205.21 238.601 205.21C223.272 205.21 210.848 200.339 210.848 194.325V186.602C210.848 192.616 223.272 197.487 238.601 197.487Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M242.307 197.386C244.467 197.27 246.55 197.06 248.523 196.765V204.488C246.55 204.783 244.467 204.992 242.307 205.109V197.386Z", fill: "#F191FA" }), jsx("path", { d: "M251.375 196.267C256.223 195.28 260.232 193.75 262.882 191.877V199.6C260.232 201.473 256.223 203.003 251.375 203.99V196.267Z", fill: "#9AEFFB" }), jsx("path", { d: "M238.601 197.487C253.931 197.487 266.354 192.616 266.354 186.602V194.325C266.354 200.339 253.931 205.21 238.601 205.21C223.272 205.21 210.848 200.339 210.848 194.325V186.602C210.848 192.616 223.272 197.487 238.601 197.487Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M251.375 203.99C256.223 203.004 260.232 201.473 262.882 199.601", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M232.652 189.678C247.979 189.678 260.405 184.804 260.405 178.793C260.405 172.781 247.979 167.908 232.652 167.908C217.324 167.908 204.899 172.781 204.899 178.793C204.899 184.804 217.324 189.678 232.652 189.678Z", fill: "#F191FA", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M232.652 189.678C247.981 189.678 260.405 184.807 260.405 178.793V186.516C260.405 192.53 247.981 197.401 232.652 197.401C217.323 197.401 204.899 192.53 204.899 186.516V178.793C204.899 184.807 217.323 189.678 232.652 189.678Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M236.358 189.578C238.518 189.461 240.6 189.251 242.574 188.956V196.679C240.6 196.974 238.518 197.184 236.358 197.301V189.578Z", fill: "#F191FA" }), jsx("path", { d: "M245.426 188.458C250.274 187.471 254.283 185.94 256.932 184.067V191.791C254.283 193.663 250.274 195.194 245.426 196.18V188.458Z", fill: "black" }), jsx("path", { d: "M232.652 189.678C247.981 189.678 260.405 184.807 260.405 178.793V186.516C260.405 192.53 247.981 197.401 232.652 197.401C217.323 197.401 204.899 192.53 204.899 186.516V178.793C204.899 184.807 217.323 189.678 232.652 189.678Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M245.426 196.182C250.274 195.195 254.283 193.664 256.932 191.792", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M240.99 180.021C256.317 180.021 268.743 175.148 268.743 169.136C268.743 163.124 256.317 158.25 240.99 158.25C225.662 158.25 213.237 163.124 213.237 169.136C213.237 175.148 225.662 180.021 240.99 180.021Z", fill: "#F191FA", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M240.99 180.021C256.319 180.021 268.743 175.15 268.743 169.136V176.859C268.743 182.873 256.319 187.744 240.99 187.744C225.66 187.744 213.237 182.873 213.237 176.859V169.136C213.237 175.15 225.66 180.021 240.99 180.021Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M244.696 179.92C246.856 179.804 248.938 179.594 250.911 179.299V187.022C248.938 187.317 246.856 187.527 244.696 187.643V179.92Z", fill: "#9AEFFB" }), jsx("path", { d: "M253.763 178.801C258.612 177.815 262.621 176.284 265.27 174.412V182.135C262.621 184.007 258.612 185.538 253.763 186.524V178.801Z", fill: "black" }), jsx("path", { d: "M240.99 180.021C256.319 180.021 268.743 175.15 268.743 169.136V176.859C268.743 182.873 256.319 187.744 240.99 187.744C225.66 187.744 213.237 182.873 213.237 176.859V169.136C213.237 175.15 225.66 180.021 240.99 180.021Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M253.763 186.525C258.612 185.538 262.621 184.007 265.27 182.135", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M189.911 223.803C205.238 223.803 217.664 218.929 217.664 212.918C217.664 206.906 205.238 202.032 189.911 202.032C174.583 202.032 162.158 206.906 162.158 212.918C162.158 218.929 174.583 223.803 189.911 223.803Z", fill: "#F191FA", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M189.911 223.803C205.24 223.803 217.664 218.932 217.664 212.918V220.641C217.664 226.655 205.24 231.526 189.911 231.526C174.581 231.526 162.158 226.655 162.158 220.641V212.918C162.158 218.932 174.581 223.803 189.911 223.803Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.625 223.71C195.785 223.593 197.867 223.384 199.84 223.088V230.811C197.867 231.107 195.785 231.316 193.625 231.433V223.71Z", fill: "#F191FA" }), jsx("path", { d: "M202.685 222.583C207.533 221.596 211.542 220.066 214.191 218.193V225.916C211.542 227.789 207.533 229.319 202.685 230.306V222.583Z", fill: "#9AEFFB" }), jsx("path", { d: "M189.911 223.803C205.24 223.803 217.664 218.932 217.664 212.918V220.641C217.664 226.655 205.24 231.526 189.911 231.526C174.581 231.526 162.158 226.655 162.158 220.641V212.918C162.158 218.932 174.581 223.803 189.911 223.803Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M202.685 230.306C207.533 229.32 211.542 227.789 214.191 225.917", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M300.705 210.658C300.705 210.658 300.705 210.649 300.705 210.641C300.705 210.641 300.705 210.649 300.705 210.658Z", fill: "#A66CFF", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" })] }) }) }));
|