@imtbl/sdk 1.63.0 → 1.64.0-alpha.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/{blockchain_data-Dpv5muPl.js → blockchain_data-BiEq7OrB.js} +2 -2
- package/dist/blockchain_data.js +3 -3
- package/dist/browser/checkout/{AddTokensWidget-BfDY0LwB.js → AddTokensWidget-BhaUBTKx.js} +754 -802
- package/dist/browser/checkout/{BridgeWidget-DreWq2OO.js → BridgeWidget-DUStg-ob.js} +9 -8
- package/dist/browser/checkout/{CommerceWidget-BFEo_z63.js → CommerceWidget-8wW5PFpX.js} +17 -16
- package/dist/browser/checkout/CryptoFiatProvider-kmpyiWXO.js +224 -0
- package/dist/browser/checkout/{EllipsizedText-_yDoxF8V.js → EllipsizedText-D0HkC9NK.js} +1 -1
- package/dist/browser/checkout/{FeesBreakdown-CQVi4M-W.js → FeesBreakdown-ZnwuhHxu.js} +1 -1
- package/dist/browser/checkout/{HandoverContent-D0HXf455.js → HandoverContent-DgMbXSS1.js} +1 -1
- package/dist/browser/checkout/{OnRampWidget-BpRLbHli.js → OnRampWidget-BRguwmcW.js} +3 -3
- package/dist/browser/checkout/{SaleWidget-C-ATgwRu.js → SaleWidget-YRJq-KHp.js} +15 -26
- package/dist/browser/checkout/{SpendingCapHero-DLdYNa0u.js → SpendingCapHero-CJNEaDPZ.js} +1 -1
- package/dist/browser/checkout/{SwapWidget-Dm2cQUYh.js → SwapWidget-BiiN2Y72.js} +9 -8
- package/dist/browser/checkout/{TopUpView-Nbu5J6zy.js → TopUpView-wuE4Wsn7.js} +6 -239
- package/dist/browser/checkout/{WalletApproveHero-Cc6p3CkR.js → WalletApproveHero-CMf6e8E8.js} +3 -3
- package/dist/browser/checkout/{WalletWidget-C25SCVnz.js → WalletWidget-BN45L_RI.js} +7 -22
- package/dist/browser/checkout/{auto-track-1Zr4QLt3.js → auto-track-CnDJ3ZvA.js} +1 -1
- package/dist/browser/checkout/{index-c7pVchOF.js → index-BEP80ac-.js} +1 -1
- package/dist/browser/checkout/{index-Vadzr0yp.js → index-BMR0rE9j.js} +1 -1
- package/dist/browser/checkout/{index-Co93fBqn.js → index-CZPVM8ED.js} +24 -21
- package/dist/browser/checkout/{index-3DC3zK0u.js → index-DG807GCH.js} +1 -1
- package/dist/browser/checkout/{index-DzrC5Kuy.js → index-TbXVGt2L.js} +1 -1
- package/dist/browser/checkout/{index-BYrBQsd2.js → index-ecosDhwb.js} +2 -2
- package/dist/browser/checkout/{index-B7urOO_H.js → index-hOCXgQoK.js} +1 -1
- package/dist/browser/checkout/{index-t2b5ztUB.js → index-mG63hnlk.js} +1 -1
- package/dist/browser/checkout/{index-DthkZUK5.js → index-s5-HDiIZ.js} +1 -1
- package/dist/browser/checkout/{index.umd-CwLr5uH5.js → index.umd-DiodwTFt.js} +1 -1
- package/dist/browser/checkout/{retry-DqIpQ6wO.js → retry-DzLPtvIf.js} +1 -1
- package/dist/browser/checkout/sdk.js +4 -4
- package/dist/browser/checkout/{useInterval-D42dwhRA.js → useInterval-ChxxDIzQ.js} +1 -1
- package/dist/browser/checkout/widgets-esm.js +1 -1
- package/dist/browser/checkout/widgets.js +37 -66
- package/dist/{checkout-Dr99AQC1.js → checkout-BcldOfSR.js} +5 -5
- package/dist/checkout.js +5 -5
- package/dist/{config-DkJOEY8_.js → config-ZFQb1qmW.js} +1 -1
- package/dist/config.js +1 -1
- package/dist/{index-BI-lDUrN.js → index-BdCrr6TB.js} +3 -3
- package/dist/{index-B7ZGqefm.js → index-C-LxQ6AY.js} +1 -1
- package/dist/{index-Dvd-bDuR.js → index-C3hrAlCu.js} +4 -4
- package/dist/{index-DWXUkxHc.js → index-CzQpbCKA.js} +1 -1
- package/dist/{index-ONuhnAdl.js → index-CzR63dKt.js} +1 -1
- package/dist/{index-CK8NRXyO.js → index-F_ZSqzHo.js} +1 -1
- package/dist/index.browser.js +5 -5
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +77 -7
- package/dist/index.js +14 -14
- package/dist/{minting_backend-CpZGmZ-L.js → minting_backend-CQYysz_8.js} +3 -3
- package/dist/minting_backend.js +5 -5
- package/dist/{orderbook-BGc1pQHt.js → orderbook-C3eUJ09J.js} +1 -1
- package/dist/orderbook.js +2 -2
- package/dist/{passport-CsmpMk_U.js → passport-DMtS147y.js} +73 -3
- package/dist/passport.js +4 -4
- package/dist/{webhook-8q1P3n_h.js → webhook-DOHhrEzR.js} +1 -1
- package/dist/webhook.js +2 -2
- package/dist/{x-BNK0EB3B.js → x-CZF84tyL.js} +3 -3
- package/dist/x.js +4 -4
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { _ as _objectWithoutProperties, x as useTheme, y as useForwardLocalDomRef, z as useGetSubcomponentChild, A as useSplitApartChildrenAndSubComponents, r as reactExports, D as merge$2, F as useResizeObserver, q as jsxs, j as jsx, G as SmartClone, H as Box, J as isChildSubcomponent, K as flattenChildren, M as Body, N as useTheme$1, Q as Icon, R as ButtCon, T as Button, U as _defineProperty, X as isDualVariantIcon, Y as _slicedToArray, Z as isNumberWithinTotal, $ as getStartingSize, a0 as BaseClickable, a1 as ClassNames, a2 as _toConsumableArray, a3 as isError, a4 as Badge, a5 as FramedIcon, a6 as FramedImage, a7 as FramedLogo, a8 as Stack, a9 as hFlex, aa as usePrevious, ab as useBrowserEffect, ac as getHeadingTextStyles, ad as vFlex, ae as centerFlexChildren, af as FormControlLabel, ag as FormControlValidation, ah as FormControlCaption, I as IMTBLWidgetEvents, ai as AddTokensEventType, aj as getDefaultExportFromCjs, ak as commonjsGlobal, l as useTranslation, al as MenuItem, am as tokenValueFormat, an as DEFAULT_TOKEN_FORMATTING_DECIMALS, ao as BigNumber, ap as getRemoteVideo, aq as FramedVideo, ar as motion, as as listItemVariants, at as Divider, au as Fragment, av as listVariants, aw as useProvidersContext, ax as Drawer, ay as useAnalytics, az as UserJourney, aA as
|
|
2
|
-
import { f as formatUnits, p as parseUnits } from './index-
|
|
3
|
-
import { E as EllipsizedText, C as Contract } from './EllipsizedText-
|
|
4
|
-
import { r as retry, T as TokenImage } from './retry-
|
|
5
|
-
import { H as HandoverContent } from './HandoverContent-
|
|
6
|
-
import { F as FeesBreakdown } from './FeesBreakdown-
|
|
1
|
+
import { _ as _objectWithoutProperties, x as useTheme, y as useForwardLocalDomRef, z as useGetSubcomponentChild, A as useSplitApartChildrenAndSubComponents, r as reactExports, D as merge$2, F as useResizeObserver, q as jsxs, j as jsx, G as SmartClone, H as Box, J as isChildSubcomponent, K as flattenChildren, M as Body, N as useTheme$1, Q as Icon, R as ButtCon, T as Button, U as _defineProperty, X as isDualVariantIcon, Y as _slicedToArray, Z as isNumberWithinTotal, $ as getStartingSize, a0 as BaseClickable, a1 as ClassNames, a2 as _toConsumableArray, a3 as isError, a4 as Badge, a5 as FramedIcon, a6 as FramedImage, a7 as FramedLogo, a8 as Stack, a9 as hFlex, aa as usePrevious, ab as useBrowserEffect, ac as getHeadingTextStyles, ad as vFlex, ae as centerFlexChildren, af as FormControlLabel, ag as FormControlValidation, ah as FormControlCaption, I as IMTBLWidgetEvents, ai as AddTokensEventType, aj as getDefaultExportFromCjs, ak as commonjsGlobal, l as useTranslation, al as MenuItem, am as tokenValueFormat, an as DEFAULT_TOKEN_FORMATTING_DECIMALS, ao as BigNumber, ap as getRemoteVideo, aq as FramedVideo, ar as motion, as as listItemVariants, at as Divider, au as Fragment, av as listVariants, aw as useProvidersContext, ax as Drawer, ay as useAnalytics, az as UserJourney, aA as isPassportProvider, aB as Heading, aC as WalletDrawer, aD as UnableToConnectDrawer, aE as ChangedYourMindDrawer, aF as WalletProviderRdns, aG as getProviderSlugFromRdns, aH as Web3Provider, aI as connectEIP6963Provider, aJ as identifyUser, aK as ConnectEIP6963ProviderError, aL as ProvidersContextActions, aM as ViewContext, V as ViewActions, o as SharedViews, k as ChainId, aN as commonjsRequire, aO as getRemoteImage, aP as useHandover, aQ as HandoverTarget, aR as EventTargetContext, aS as getRemoteRive, aT as Trans, aU as Link, aV as useInjectedProviders, aW as getDefaultTokenImage, aX as OverflowDrawerMenu, aY as SimpleLayout, aZ as TokenFilterTypes, h as getL2ChainId, a_ as isNativeToken, a$ as getTokenImageByAddress, b0 as orchestrationEvents, b1 as requireSecp256k1$1, b2 as requireLib_commonjs, b3 as require$$0$2, b4 as bech32$2, b5 as bnExports$1, b6 as require$$0$3, b7 as getAugmentedNamespace, b8 as require$$0$4, b9 as minimalisticAssert, ba as require$$2, bb as hash$6, bc as MaxUint256, bd as merge$3, be as SvgIcon, bf as WalletWarningHero, bg as Environment, bh as t, bi as PriceDisplay, L as LoadingView, bj as viewReducer, bk as initialViewState, bl as isValidAddress, bm as amountInputValidation, bn as CloudImage, E as ErrorView, bo as ServiceUnavailableErrorView, bp as ServiceType } from './index-CZPVM8ED.js';
|
|
2
|
+
import { f as formatUnits, p as parseUnits } from './index-TbXVGt2L.js';
|
|
3
|
+
import { E as EllipsizedText, C as Contract } from './EllipsizedText-D0HkC9NK.js';
|
|
4
|
+
import { r as retry, T as TokenImage } from './retry-DzLPtvIf.js';
|
|
5
|
+
import { H as HandoverContent } from './HandoverContent-DgMbXSS1.js';
|
|
6
|
+
import { F as FeesBreakdown } from './FeesBreakdown-ZnwuhHxu.js';
|
|
7
7
|
|
|
8
8
|
var bannerSx = {
|
|
9
9
|
d: "flex",
|
|
@@ -1695,6 +1695,7 @@ function getRouteAndTokenBalances(routeData) {
|
|
|
1695
1695
|
}
|
|
1696
1696
|
|
|
1697
1697
|
function RouteOption({ routeData, onClick, chains, disabled = false, isFastest = false, size = 'small', rc = jsx("span", {}), selected = false, }) {
|
|
1698
|
+
const { t } = useTranslation();
|
|
1698
1699
|
const { fromToken } = routeData.amountData;
|
|
1699
1700
|
const { estimate } = routeData.route.route;
|
|
1700
1701
|
const chain = chains?.find((c) => c.id === fromToken.chainId);
|
|
@@ -1712,7 +1713,7 @@ function RouteOption({ routeData, onClick, chains, disabled = false, isFastest =
|
|
|
1712
1713
|
size,
|
|
1713
1714
|
onClick: disabled ? undefined : handleClick,
|
|
1714
1715
|
};
|
|
1715
|
-
return (jsxs(MenuItem, { ...menuItemProps, children: [jsx(MenuItem.Label, { children: fromToken.name }), chain && (jsxs(Sticker, { position: { x: 'right', y: 'bottom' }, children: [jsx(Sticker.FramedImage, { use: jsx("img", { src: chain.iconUrl, alt: chain.name }), size: "xSmall" }), jsx(MenuItem.FramedImage, { circularFrame: true, use: jsx("img", { src: fromToken.iconUrl, alt: fromToken.name }) })] })), jsx(MenuItem.Caption, { children: `Balance
|
|
1716
|
+
return (jsxs(MenuItem, { ...menuItemProps, children: [jsx(MenuItem.Label, { children: fromToken.name }), chain && (jsxs(Sticker, { position: { x: 'right', y: 'bottom' }, children: [jsx(Sticker.FramedImage, { use: jsx("img", { src: chain.iconUrl, alt: chain.name }), size: "xSmall" }), jsx(MenuItem.FramedImage, { circularFrame: true, use: jsx("img", { src: fromToken.iconUrl, alt: fromToken.name }) })] })), jsx(MenuItem.Caption, { children: `Balance ${t('views.ADD_TOKENS.fees.fiatPricePrefix')} $${routeBalanceUsd}` }), jsx(MenuItem.PriceDisplay, { price: fromAmount, children: jsx(MenuItem.PriceDisplay.Caption, { children: `${t('views.ADD_TOKENS.fees.fiatPricePrefix')} $${fromAmountUsd}` }) }), jsxs(MenuItem.BottomSlot, { children: [jsx(MenuItem.BottomSlot.Divider, {}), jsxs(Stack, { rc: jsx("span", {}), direction: "row", justifyContent: "space-between", sx: {
|
|
1716
1717
|
w: '100%',
|
|
1717
1718
|
}, children: [jsxs(Body, { sx: {
|
|
1718
1719
|
...hFlex,
|
|
@@ -1722,7 +1723,7 @@ function RouteOption({ routeData, onClick, chains, disabled = false, isFastest =
|
|
|
1722
1723
|
}, size: "xSmall", children: [jsx(Icon, { icon: "Countdown", sx: {
|
|
1723
1724
|
w: 'base.icon.size.200',
|
|
1724
1725
|
fill: 'base.color.text.body.secondary',
|
|
1725
|
-
}, variant: "bold" }), estimatedDurationFormatted] }), jsxs(Body, { size: "xSmall", sx: { ...hFlex, ...centerFlexChildren }, children: [isFastest && (jsx(Badge, { badgeContent: "Fastest", variant: "emphasis", sx: { mr: 'base.spacing.x2' } })), `Fee
|
|
1726
|
+
}, variant: "bold" }), estimatedDurationFormatted] }), jsxs(Body, { size: "xSmall", sx: { ...hFlex, ...centerFlexChildren }, children: [isFastest && (jsx(Badge, { badgeContent: "Fastest", variant: "emphasis", sx: { mr: 'base.spacing.x2' } })), `Fee ${t('views.ADD_TOKENS.fees.fiatPricePrefix')} $${getFormattedAmounts(totalFeesUsd)}`] })] })] })] }));
|
|
1726
1727
|
}
|
|
1727
1728
|
|
|
1728
1729
|
const defaultFiatOptions = [
|
|
@@ -2425,6 +2426,7 @@ const BASE_SLIPPAGE = 0.02;
|
|
|
2425
2426
|
const useRoutes = () => {
|
|
2426
2427
|
const latestRequestIdRef = reactExports.useRef(0);
|
|
2427
2428
|
const { addTokensDispatch } = reactExports.useContext(AddTokensContext);
|
|
2429
|
+
const { providersState: { toProvider, }, } = useProvidersContext();
|
|
2428
2430
|
const { track } = useAnalytics();
|
|
2429
2431
|
const setRoutes = (routes) => {
|
|
2430
2432
|
addTokensDispatch({
|
|
@@ -2495,6 +2497,7 @@ const useRoutes = () => {
|
|
|
2495
2497
|
toAddress,
|
|
2496
2498
|
quoteOnly,
|
|
2497
2499
|
enableBoost: true,
|
|
2500
|
+
receiveGasOnDestination: !isPassportProvider(toProvider),
|
|
2498
2501
|
}), {
|
|
2499
2502
|
retryIntervalMs: 1000,
|
|
2500
2503
|
retries: 5,
|
|
@@ -2618,6 +2621,7 @@ function SelectedRouteOptionContainer({ children, onClick, selected, }) {
|
|
|
2618
2621
|
}, rc: jsx("span", { ...(onClick ? { onClick } : {}) }), children: children }));
|
|
2619
2622
|
}
|
|
2620
2623
|
function SelectedRouteOption({ checkout, routeData, chains, loading = false, withSelectedWallet = false, withSelectedToken = false, withSelectedAmount = false, insufficientBalance = false, showOnrampOption = false, onClick, }) {
|
|
2624
|
+
const { t } = useTranslation();
|
|
2621
2625
|
const { fromToken } = routeData?.amountData ?? {};
|
|
2622
2626
|
const chain = chains?.find((c) => c.id === fromToken?.chainId);
|
|
2623
2627
|
const { routeBalanceUsd, fromAmount, fromAmountUsd } = reactExports.useMemo(() => getRouteAndTokenBalances(routeData), [routeData]);
|
|
@@ -2654,7 +2658,7 @@ function SelectedRouteOption({ checkout, routeData, chains, loading = false, wit
|
|
|
2654
2658
|
}
|
|
2655
2659
|
return (jsxs(SelectedRouteOptionContainer, { onClick: handleOnClick, selected: withSelectedWallet, children: [jsx(MenuItem.FramedIcon, { icon: icon, variant: "bold", circularFrame: true, emphasized: false }), jsx(MenuItem.Caption, { children: copy })] }));
|
|
2656
2660
|
}
|
|
2657
|
-
return (jsxs(SelectedRouteOptionContainer, { onClick: handleOnClick, selected: withSelectedWallet, children: [chain && (jsxs(Sticker, { position: { x: 'right', y: 'bottom' }, children: [jsx(Sticker.FramedImage, { use: jsx("img", { src: chain.iconUrl, alt: chain.name }), size: "xSmall", sx: { bottom: 'base.spacing.x2', right: 'base.spacing.x2' } }), jsx(MenuItem.FramedImage, { circularFrame: true, padded: true, use: jsx("img", { src: fromToken?.iconUrl, alt: fromToken?.name }) })] })), jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { w: '100%' }, children: [jsxs(Stack, { gap: "0px", children: [jsx(MenuItem.Label, { children: fromToken?.name }), jsx(MenuItem.Caption, { children: `Balance
|
|
2661
|
+
return (jsxs(SelectedRouteOptionContainer, { onClick: handleOnClick, selected: withSelectedWallet, children: [chain && (jsxs(Sticker, { position: { x: 'right', y: 'bottom' }, children: [jsx(Sticker.FramedImage, { use: jsx("img", { src: chain.iconUrl, alt: chain.name }), size: "xSmall", sx: { bottom: 'base.spacing.x2', right: 'base.spacing.x2' } }), jsx(MenuItem.FramedImage, { circularFrame: true, padded: true, use: jsx("img", { src: fromToken?.iconUrl, alt: fromToken?.name }) })] })), jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { w: '100%' }, children: [jsxs(Stack, { gap: "0px", children: [jsx(MenuItem.Label, { children: fromToken?.name }), jsx(MenuItem.Caption, { children: `Balance ${t('views.ADD_TOKENS.fees.fiatPricePrefix')} $${routeBalanceUsd}` })] }), jsx(MenuItem.PriceDisplay, { price: fromAmount, children: jsx(MenuItem.PriceDisplay.Caption, { children: `${t('views.ADD_TOKENS.fees.fiatPricePrefix')} $${fromAmountUsd}` }) })] })] }));
|
|
2658
2662
|
}
|
|
2659
2663
|
|
|
2660
2664
|
const disabledStyles = {
|
|
@@ -2871,7 +2875,7 @@ function PayWithWalletDrawer({ visible, onClose, onConnect, onPayWithCard, walle
|
|
|
2871
2875
|
onPayWithCard?.();
|
|
2872
2876
|
}, children: [jsx(MenuItem.FramedIcon, { icon: "BankCard", variant: "bold", emphasized: false }), jsx(MenuItem.Label, { children: "Pay with Card" })] }));
|
|
2873
2877
|
}, [onClose, onPayWithCard]);
|
|
2874
|
-
return (jsx(ConnectWalletDrawer, { heading: insufficientBalance ? 'Choose another option' : '
|
|
2878
|
+
return (jsx(ConnectWalletDrawer, { heading: insufficientBalance ? 'Choose another option' : 'Send from', visible: visible, onClose: onClose, providerType: "from", walletOptions: walletOptions, disabledOptions: disabledOptions, bottomSlot: payWithCardItem, onConnect: handleOnConnect, onError: handleOnError }));
|
|
2875
2879
|
}
|
|
2876
2880
|
|
|
2877
2881
|
function convertToUsd(tokens, amount, token) {
|
|
@@ -5926,6 +5930,7 @@ function AddTokens({ checkout, toAmount, config, toTokenAddress, showOnrampOptio
|
|
|
5926
5930
|
const { addTokensState: { squid, chains, balances, tokens, selectedAmount, routes, selectedRouteData, selectedToken, isSwapAvailable, }, addTokensDispatch, } = reactExports.useContext(AddTokensContext);
|
|
5927
5931
|
const { viewDispatch } = reactExports.useContext(ViewContext);
|
|
5928
5932
|
const { track, page } = useAnalytics();
|
|
5933
|
+
const { t } = useTranslation();
|
|
5929
5934
|
const { eventTargetState: { eventTarget }, } = reactExports.useContext(EventTargetContext);
|
|
5930
5935
|
const [showOptionsDrawer, setShowOptionsDrawer] = reactExports.useState(false);
|
|
5931
5936
|
const [showPayWithDrawer, setShowPayWithDrawer] = reactExports.useState(false);
|
|
@@ -6086,9 +6091,9 @@ function AddTokens({ checkout, toAmount, config, toTokenAddress, showOnrampOptio
|
|
|
6086
6091
|
});
|
|
6087
6092
|
setAllowedTokens(updatedTokens);
|
|
6088
6093
|
if (toTokenAddress) {
|
|
6089
|
-
const
|
|
6090
|
-
if (
|
|
6091
|
-
setSelectedToken(
|
|
6094
|
+
const preselectedToken = updatedTokens.find((token) => token.address?.toLowerCase() === toTokenAddress.toLowerCase());
|
|
6095
|
+
if (preselectedToken) {
|
|
6096
|
+
setSelectedToken(preselectedToken);
|
|
6092
6097
|
}
|
|
6093
6098
|
}
|
|
6094
6099
|
addTokensDispatch({
|
|
@@ -6187,8 +6192,8 @@ function AddTokens({ checkout, toAmount, config, toTokenAddress, showOnrampOptio
|
|
|
6187
6192
|
};
|
|
6188
6193
|
const shouldShowOnRampOption = reactExports.useMemo(() => {
|
|
6189
6194
|
if (showOnrampOption && selectedToken) {
|
|
6190
|
-
const
|
|
6191
|
-
return !!
|
|
6195
|
+
const isAllowedToken = onRampAllowedTokens.find((token) => token.address?.toLowerCase() === selectedToken.address?.toLowerCase());
|
|
6196
|
+
return !!isAllowedToken;
|
|
6192
6197
|
}
|
|
6193
6198
|
return false;
|
|
6194
6199
|
}, [selectedToken, onRampAllowedTokens, showOnrampOption]);
|
|
@@ -6240,14 +6245,15 @@ function AddTokens({ checkout, toAmount, config, toTokenAddress, showOnrampOptio
|
|
|
6240
6245
|
boxShadow: ({ base }) => `0 0 0 ${base.border.size[200]} ${base.color.text.body.primary}`,
|
|
6241
6246
|
},
|
|
6242
6247
|
} })),
|
|
6243
|
-
}), children: tokenChoiceOptions }), showInitialEmptyState ? (jsx(Body, { children: "Add Token" })) : (jsxs(HeroFormControl, { validationStatus: inputValue === '0' ? 'error' : 'success', children: [jsxs(HeroFormControl.Label, { children: ["Add", ' ', selectedToken.symbol] }), jsx(HeroTextInput, { testId: "add-tokens-amount-input", type: "number", value: inputValue, onChange: (value) => handleOnAmountInputChange(value), placeholder: "0", maxTextSize: "xLarge" }),
|
|
6248
|
+
}), children: tokenChoiceOptions }), showInitialEmptyState ? (jsx(Body, { children: "Add Token" })) : (jsxs(HeroFormControl, { validationStatus: inputValue === '0' ? 'error' : 'success', children: [jsxs(HeroFormControl.Label, { children: ["Add", ' ', selectedToken.symbol] }), jsx(HeroTextInput, { testId: "add-tokens-amount-input", type: "number", value: inputValue, onChange: (value) => handleOnAmountInputChange(value), placeholder: "0", maxTextSize: "xLarge" }), jsx(HeroFormControl.Caption, { children: `${t('views.ADD_TOKENS.fees.fiatPricePrefix')}
|
|
6249
|
+
$${getFormattedNumberWithDecimalPlaces(selectedAmountUsd)}` })] }))] }), jsxs(Stack, { testId: "bottomSection", sx: {
|
|
6244
6250
|
alignSelf: 'stretch',
|
|
6245
6251
|
p: 'base.spacing.x3',
|
|
6246
6252
|
pb: 'base.spacing.x5',
|
|
6247
6253
|
bg: 'base.color.neutral.800',
|
|
6248
6254
|
bradtl: 'base.borderRadius.x8',
|
|
6249
6255
|
bradtr: 'base.borderRadius.x8',
|
|
6250
|
-
}, gap: "base.spacing.x4", children: [jsxs(Stack, { gap: "0px", children: [jsxs(SelectedWallet, { label: "
|
|
6256
|
+
}, gap: "base.spacing.x4", children: [jsxs(Stack, { gap: "0px", children: [jsxs(SelectedWallet, { label: "Send from", providerInfo: {
|
|
6251
6257
|
...fromProviderInfo,
|
|
6252
6258
|
address: fromAddress,
|
|
6253
6259
|
}, onClick: (event) => {
|
|
@@ -28237,11 +28243,11 @@ var fetch$2 = {};
|
|
|
28237
28243
|
|
|
28238
28244
|
var utf8$6 = {};
|
|
28239
28245
|
|
|
28240
|
-
var hasRequiredUtf8$
|
|
28246
|
+
var hasRequiredUtf8$1;
|
|
28241
28247
|
|
|
28242
|
-
function requireUtf8$
|
|
28243
|
-
if (hasRequiredUtf8$
|
|
28244
|
-
hasRequiredUtf8$
|
|
28248
|
+
function requireUtf8$1 () {
|
|
28249
|
+
if (hasRequiredUtf8$1) return utf8$6;
|
|
28250
|
+
hasRequiredUtf8$1 = 1;
|
|
28245
28251
|
(function (exports) {
|
|
28246
28252
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28247
28253
|
exports.toUtf8CodePoints = exports.toUtf8String = exports.toUtf8Bytes = exports.Utf8ErrorFuncs = void 0;
|
|
@@ -28559,7 +28565,7 @@ function requireFetch$1 () {
|
|
|
28559
28565
|
const data_js_1 = requireData$1();
|
|
28560
28566
|
const errors_js_1 = requireErrors$1();
|
|
28561
28567
|
const properties_js_1 = requireProperties$1();
|
|
28562
|
-
const utf8_js_1 = requireUtf8$
|
|
28568
|
+
const utf8_js_1 = requireUtf8$1();
|
|
28563
28569
|
const geturl_js_1 = requireGeturlBrowser$1();
|
|
28564
28570
|
const MAX_ATTEMPTS = 12;
|
|
28565
28571
|
const SLOT_INTERVAL = 250;
|
|
@@ -30283,7 +30289,7 @@ function requireUtils$5 () {
|
|
|
30283
30289
|
Object.defineProperty(exports, "parseEther", { enumerable: true, get: function () { return units_js_1.parseEther; } });
|
|
30284
30290
|
Object.defineProperty(exports, "formatUnits", { enumerable: true, get: function () { return units_js_1.formatUnits; } });
|
|
30285
30291
|
Object.defineProperty(exports, "parseUnits", { enumerable: true, get: function () { return units_js_1.parseUnits; } });
|
|
30286
|
-
var utf8_js_1 = requireUtf8$
|
|
30292
|
+
var utf8_js_1 = requireUtf8$1();
|
|
30287
30293
|
Object.defineProperty(exports, "toUtf8Bytes", { enumerable: true, get: function () { return utf8_js_1.toUtf8Bytes; } });
|
|
30288
30294
|
Object.defineProperty(exports, "toUtf8CodePoints", { enumerable: true, get: function () { return utf8_js_1.toUtf8CodePoints; } });
|
|
30289
30295
|
Object.defineProperty(exports, "toUtf8String", { enumerable: true, get: function () { return utf8_js_1.toUtf8String; } });
|
|
@@ -35077,7 +35083,7 @@ function requireString$1 () {
|
|
|
35077
35083
|
hasRequiredString$1 = 1;
|
|
35078
35084
|
Object.defineProperty(string$1, "__esModule", { value: true });
|
|
35079
35085
|
string$1.StringCoder = void 0;
|
|
35080
|
-
const utf8_js_1 = requireUtf8$
|
|
35086
|
+
const utf8_js_1 = requireUtf8$1();
|
|
35081
35087
|
const typed_js_1 = requireTyped$1();
|
|
35082
35088
|
const bytes_js_1 = requireBytes$1();
|
|
35083
35089
|
/**
|
|
@@ -43282,15 +43288,15 @@ function requireContract$3 () {
|
|
|
43282
43288
|
return contract$2;
|
|
43283
43289
|
}
|
|
43284
43290
|
|
|
43285
|
-
var factory$
|
|
43291
|
+
var factory$2 = {};
|
|
43286
43292
|
|
|
43287
43293
|
var hasRequiredFactory$1;
|
|
43288
43294
|
|
|
43289
43295
|
function requireFactory$1 () {
|
|
43290
|
-
if (hasRequiredFactory$1) return factory$
|
|
43296
|
+
if (hasRequiredFactory$1) return factory$2;
|
|
43291
43297
|
hasRequiredFactory$1 = 1;
|
|
43292
|
-
Object.defineProperty(factory$
|
|
43293
|
-
factory$
|
|
43298
|
+
Object.defineProperty(factory$2, "__esModule", { value: true });
|
|
43299
|
+
factory$2.ContractFactory = void 0;
|
|
43294
43300
|
const index_js_1 = requireAbi$1();
|
|
43295
43301
|
const index_js_2 = requireAddress$6();
|
|
43296
43302
|
const index_js_3 = requireUtils$5();
|
|
@@ -43402,9 +43408,9 @@ function requireFactory$1 () {
|
|
|
43402
43408
|
return new this(abi, bytecode, runner);
|
|
43403
43409
|
}
|
|
43404
43410
|
}
|
|
43405
|
-
factory$
|
|
43411
|
+
factory$2.ContractFactory = ContractFactory;
|
|
43406
43412
|
|
|
43407
|
-
return factory$
|
|
43413
|
+
return factory$2;
|
|
43408
43414
|
}
|
|
43409
43415
|
|
|
43410
43416
|
var hasRequiredContract$2;
|
|
@@ -54602,11 +54608,11 @@ var fetch$1 = {};
|
|
|
54602
54608
|
|
|
54603
54609
|
var utf8$5 = {};
|
|
54604
54610
|
|
|
54605
|
-
var hasRequiredUtf8
|
|
54611
|
+
var hasRequiredUtf8;
|
|
54606
54612
|
|
|
54607
|
-
function requireUtf8
|
|
54608
|
-
if (hasRequiredUtf8
|
|
54609
|
-
hasRequiredUtf8
|
|
54613
|
+
function requireUtf8 () {
|
|
54614
|
+
if (hasRequiredUtf8) return utf8$5;
|
|
54615
|
+
hasRequiredUtf8 = 1;
|
|
54610
54616
|
(function (exports) {
|
|
54611
54617
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54612
54618
|
exports.toUtf8CodePoints = exports.toUtf8String = exports.toUtf8Bytes = exports.Utf8ErrorFuncs = void 0;
|
|
@@ -54942,7 +54948,7 @@ function requireFetch () {
|
|
|
54942
54948
|
const data_js_1 = requireData();
|
|
54943
54949
|
const errors_js_1 = requireErrors();
|
|
54944
54950
|
const properties_js_1 = requireProperties();
|
|
54945
|
-
const utf8_js_1 = requireUtf8
|
|
54951
|
+
const utf8_js_1 = requireUtf8();
|
|
54946
54952
|
const geturl_js_1 = requireGeturlBrowser();
|
|
54947
54953
|
const MAX_ATTEMPTS = 12;
|
|
54948
54954
|
const SLOT_INTERVAL = 250;
|
|
@@ -56682,7 +56688,7 @@ function requireUtils$2 () {
|
|
|
56682
56688
|
Object.defineProperty(exports, "parseEther", { enumerable: true, get: function () { return units_js_1.parseEther; } });
|
|
56683
56689
|
Object.defineProperty(exports, "formatUnits", { enumerable: true, get: function () { return units_js_1.formatUnits; } });
|
|
56684
56690
|
Object.defineProperty(exports, "parseUnits", { enumerable: true, get: function () { return units_js_1.parseUnits; } });
|
|
56685
|
-
var utf8_js_1 = requireUtf8
|
|
56691
|
+
var utf8_js_1 = requireUtf8();
|
|
56686
56692
|
Object.defineProperty(exports, "toUtf8Bytes", { enumerable: true, get: function () { return utf8_js_1.toUtf8Bytes; } });
|
|
56687
56693
|
Object.defineProperty(exports, "toUtf8CodePoints", { enumerable: true, get: function () { return utf8_js_1.toUtf8CodePoints; } });
|
|
56688
56694
|
Object.defineProperty(exports, "toUtf8String", { enumerable: true, get: function () { return utf8_js_1.toUtf8String; } });
|
|
@@ -61541,7 +61547,7 @@ function requireString () {
|
|
|
61541
61547
|
hasRequiredString = 1;
|
|
61542
61548
|
Object.defineProperty(string, "__esModule", { value: true });
|
|
61543
61549
|
string.StringCoder = void 0;
|
|
61544
|
-
const utf8_js_1 = requireUtf8
|
|
61550
|
+
const utf8_js_1 = requireUtf8();
|
|
61545
61551
|
const typed_js_1 = requireTyped();
|
|
61546
61552
|
const bytes_js_1 = requireBytes();
|
|
61547
61553
|
/**
|
|
@@ -70162,15 +70168,15 @@ function requireContract$1 () {
|
|
|
70162
70168
|
return contract;
|
|
70163
70169
|
}
|
|
70164
70170
|
|
|
70165
|
-
var factory = {};
|
|
70171
|
+
var factory$1 = {};
|
|
70166
70172
|
|
|
70167
70173
|
var hasRequiredFactory;
|
|
70168
70174
|
|
|
70169
70175
|
function requireFactory () {
|
|
70170
|
-
if (hasRequiredFactory) return factory;
|
|
70176
|
+
if (hasRequiredFactory) return factory$1;
|
|
70171
70177
|
hasRequiredFactory = 1;
|
|
70172
|
-
Object.defineProperty(factory, "__esModule", { value: true });
|
|
70173
|
-
factory.ContractFactory = void 0;
|
|
70178
|
+
Object.defineProperty(factory$1, "__esModule", { value: true });
|
|
70179
|
+
factory$1.ContractFactory = void 0;
|
|
70174
70180
|
const index_js_1 = requireAbi();
|
|
70175
70181
|
const index_js_2 = requireAddress$2();
|
|
70176
70182
|
const index_js_3 = requireUtils$2();
|
|
@@ -70282,9 +70288,9 @@ function requireFactory () {
|
|
|
70282
70288
|
return new this(abi, bytecode, runner);
|
|
70283
70289
|
}
|
|
70284
70290
|
}
|
|
70285
|
-
factory.ContractFactory = ContractFactory;
|
|
70291
|
+
factory$1.ContractFactory = ContractFactory;
|
|
70286
70292
|
|
|
70287
|
-
return factory;
|
|
70293
|
+
return factory$1;
|
|
70288
70294
|
}
|
|
70289
70295
|
|
|
70290
70296
|
var hasRequiredContract;
|
|
@@ -81630,838 +81636,783 @@ var indexMinimal = {};
|
|
|
81630
81636
|
|
|
81631
81637
|
var minimal$1 = {};
|
|
81632
81638
|
|
|
81633
|
-
var aspromise;
|
|
81634
|
-
var hasRequiredAspromise;
|
|
81635
|
-
|
|
81636
|
-
function requireAspromise () {
|
|
81637
|
-
if (hasRequiredAspromise) return aspromise;
|
|
81638
|
-
hasRequiredAspromise = 1;
|
|
81639
|
-
aspromise = asPromise;
|
|
81639
|
+
var aspromise = asPromise;
|
|
81640
81640
|
|
|
81641
|
-
|
|
81642
|
-
|
|
81643
|
-
|
|
81644
|
-
|
|
81645
|
-
|
|
81646
|
-
|
|
81647
|
-
|
|
81648
|
-
|
|
81641
|
+
/**
|
|
81642
|
+
* Callback as used by {@link util.asPromise}.
|
|
81643
|
+
* @typedef asPromiseCallback
|
|
81644
|
+
* @type {function}
|
|
81645
|
+
* @param {Error|null} error Error, if any
|
|
81646
|
+
* @param {...*} params Additional arguments
|
|
81647
|
+
* @returns {undefined}
|
|
81648
|
+
*/
|
|
81649
81649
|
|
|
81650
|
-
|
|
81651
|
-
|
|
81652
|
-
|
|
81653
|
-
|
|
81654
|
-
|
|
81655
|
-
|
|
81656
|
-
|
|
81657
|
-
|
|
81658
|
-
|
|
81659
|
-
|
|
81660
|
-
|
|
81661
|
-
|
|
81662
|
-
|
|
81663
|
-
|
|
81664
|
-
|
|
81665
|
-
|
|
81666
|
-
|
|
81667
|
-
|
|
81668
|
-
|
|
81669
|
-
|
|
81670
|
-
|
|
81671
|
-
|
|
81672
|
-
|
|
81673
|
-
|
|
81674
|
-
|
|
81675
|
-
|
|
81676
|
-
|
|
81677
|
-
|
|
81678
|
-
|
|
81679
|
-
|
|
81680
|
-
|
|
81681
|
-
|
|
81682
|
-
|
|
81683
|
-
|
|
81684
|
-
|
|
81685
|
-
|
|
81686
|
-
|
|
81687
|
-
|
|
81688
|
-
|
|
81689
|
-
}
|
|
81690
|
-
return aspromise;
|
|
81650
|
+
/**
|
|
81651
|
+
* Returns a promise from a node-style callback function.
|
|
81652
|
+
* @memberof util
|
|
81653
|
+
* @param {asPromiseCallback} fn Function to call
|
|
81654
|
+
* @param {*} ctx Function context
|
|
81655
|
+
* @param {...*} params Function arguments
|
|
81656
|
+
* @returns {Promise<*>} Promisified function
|
|
81657
|
+
*/
|
|
81658
|
+
function asPromise(fn, ctx/*, varargs */) {
|
|
81659
|
+
var params = new Array(arguments.length - 1),
|
|
81660
|
+
offset = 0,
|
|
81661
|
+
index = 2,
|
|
81662
|
+
pending = true;
|
|
81663
|
+
while (index < arguments.length)
|
|
81664
|
+
params[offset++] = arguments[index++];
|
|
81665
|
+
return new Promise(function executor(resolve, reject) {
|
|
81666
|
+
params[offset] = function callback(err/*, varargs */) {
|
|
81667
|
+
if (pending) {
|
|
81668
|
+
pending = false;
|
|
81669
|
+
if (err)
|
|
81670
|
+
reject(err);
|
|
81671
|
+
else {
|
|
81672
|
+
var params = new Array(arguments.length - 1),
|
|
81673
|
+
offset = 0;
|
|
81674
|
+
while (offset < params.length)
|
|
81675
|
+
params[offset++] = arguments[offset];
|
|
81676
|
+
resolve.apply(null, params);
|
|
81677
|
+
}
|
|
81678
|
+
}
|
|
81679
|
+
};
|
|
81680
|
+
try {
|
|
81681
|
+
fn.apply(ctx || null, params);
|
|
81682
|
+
} catch (err) {
|
|
81683
|
+
if (pending) {
|
|
81684
|
+
pending = false;
|
|
81685
|
+
reject(err);
|
|
81686
|
+
}
|
|
81687
|
+
}
|
|
81688
|
+
});
|
|
81691
81689
|
}
|
|
81692
81690
|
|
|
81693
81691
|
var base64$2 = {};
|
|
81694
81692
|
|
|
81695
|
-
|
|
81696
|
-
|
|
81697
|
-
function requireBase64 () {
|
|
81698
|
-
if (hasRequiredBase64) return base64$2;
|
|
81699
|
-
hasRequiredBase64 = 1;
|
|
81700
|
-
(function (exports) {
|
|
81701
|
-
|
|
81702
|
-
/**
|
|
81703
|
-
* A minimal base64 implementation for number arrays.
|
|
81704
|
-
* @memberof util
|
|
81705
|
-
* @namespace
|
|
81706
|
-
*/
|
|
81707
|
-
var base64 = exports;
|
|
81708
|
-
|
|
81709
|
-
/**
|
|
81710
|
-
* Calculates the byte length of a base64 encoded string.
|
|
81711
|
-
* @param {string} string Base64 encoded string
|
|
81712
|
-
* @returns {number} Byte length
|
|
81713
|
-
*/
|
|
81714
|
-
base64.length = function length(string) {
|
|
81715
|
-
var p = string.length;
|
|
81716
|
-
if (!p)
|
|
81717
|
-
return 0;
|
|
81718
|
-
var n = 0;
|
|
81719
|
-
while (--p % 4 > 1 && string.charAt(p) === "=")
|
|
81720
|
-
++n;
|
|
81721
|
-
return Math.ceil(string.length * 3) / 4 - n;
|
|
81722
|
-
};
|
|
81723
|
-
|
|
81724
|
-
// Base64 encoding table
|
|
81725
|
-
var b64 = new Array(64);
|
|
81726
|
-
|
|
81727
|
-
// Base64 decoding table
|
|
81728
|
-
var s64 = new Array(123);
|
|
81729
|
-
|
|
81730
|
-
// 65..90, 97..122, 48..57, 43, 47
|
|
81731
|
-
for (var i = 0; i < 64;)
|
|
81732
|
-
s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;
|
|
81733
|
-
|
|
81734
|
-
/**
|
|
81735
|
-
* Encodes a buffer to a base64 encoded string.
|
|
81736
|
-
* @param {Uint8Array} buffer Source buffer
|
|
81737
|
-
* @param {number} start Source start
|
|
81738
|
-
* @param {number} end Source end
|
|
81739
|
-
* @returns {string} Base64 encoded string
|
|
81740
|
-
*/
|
|
81741
|
-
base64.encode = function encode(buffer, start, end) {
|
|
81742
|
-
var parts = null,
|
|
81743
|
-
chunk = [];
|
|
81744
|
-
var i = 0, // output index
|
|
81745
|
-
j = 0, // goto index
|
|
81746
|
-
t; // temporary
|
|
81747
|
-
while (start < end) {
|
|
81748
|
-
var b = buffer[start++];
|
|
81749
|
-
switch (j) {
|
|
81750
|
-
case 0:
|
|
81751
|
-
chunk[i++] = b64[b >> 2];
|
|
81752
|
-
t = (b & 3) << 4;
|
|
81753
|
-
j = 1;
|
|
81754
|
-
break;
|
|
81755
|
-
case 1:
|
|
81756
|
-
chunk[i++] = b64[t | b >> 4];
|
|
81757
|
-
t = (b & 15) << 2;
|
|
81758
|
-
j = 2;
|
|
81759
|
-
break;
|
|
81760
|
-
case 2:
|
|
81761
|
-
chunk[i++] = b64[t | b >> 6];
|
|
81762
|
-
chunk[i++] = b64[b & 63];
|
|
81763
|
-
j = 0;
|
|
81764
|
-
break;
|
|
81765
|
-
}
|
|
81766
|
-
if (i > 8191) {
|
|
81767
|
-
(parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
|
|
81768
|
-
i = 0;
|
|
81769
|
-
}
|
|
81770
|
-
}
|
|
81771
|
-
if (j) {
|
|
81772
|
-
chunk[i++] = b64[t];
|
|
81773
|
-
chunk[i++] = 61;
|
|
81774
|
-
if (j === 1)
|
|
81775
|
-
chunk[i++] = 61;
|
|
81776
|
-
}
|
|
81777
|
-
if (parts) {
|
|
81778
|
-
if (i)
|
|
81779
|
-
parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
|
|
81780
|
-
return parts.join("");
|
|
81781
|
-
}
|
|
81782
|
-
return String.fromCharCode.apply(String, chunk.slice(0, i));
|
|
81783
|
-
};
|
|
81784
|
-
|
|
81785
|
-
var invalidEncoding = "invalid encoding";
|
|
81786
|
-
|
|
81787
|
-
/**
|
|
81788
|
-
* Decodes a base64 encoded string to a buffer.
|
|
81789
|
-
* @param {string} string Source string
|
|
81790
|
-
* @param {Uint8Array} buffer Destination buffer
|
|
81791
|
-
* @param {number} offset Destination offset
|
|
81792
|
-
* @returns {number} Number of bytes written
|
|
81793
|
-
* @throws {Error} If encoding is invalid
|
|
81794
|
-
*/
|
|
81795
|
-
base64.decode = function decode(string, buffer, offset) {
|
|
81796
|
-
var start = offset;
|
|
81797
|
-
var j = 0, // goto index
|
|
81798
|
-
t; // temporary
|
|
81799
|
-
for (var i = 0; i < string.length;) {
|
|
81800
|
-
var c = string.charCodeAt(i++);
|
|
81801
|
-
if (c === 61 && j > 1)
|
|
81802
|
-
break;
|
|
81803
|
-
if ((c = s64[c]) === undefined)
|
|
81804
|
-
throw Error(invalidEncoding);
|
|
81805
|
-
switch (j) {
|
|
81806
|
-
case 0:
|
|
81807
|
-
t = c;
|
|
81808
|
-
j = 1;
|
|
81809
|
-
break;
|
|
81810
|
-
case 1:
|
|
81811
|
-
buffer[offset++] = t << 2 | (c & 48) >> 4;
|
|
81812
|
-
t = c;
|
|
81813
|
-
j = 2;
|
|
81814
|
-
break;
|
|
81815
|
-
case 2:
|
|
81816
|
-
buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;
|
|
81817
|
-
t = c;
|
|
81818
|
-
j = 3;
|
|
81819
|
-
break;
|
|
81820
|
-
case 3:
|
|
81821
|
-
buffer[offset++] = (t & 3) << 6 | c;
|
|
81822
|
-
j = 0;
|
|
81823
|
-
break;
|
|
81824
|
-
}
|
|
81825
|
-
}
|
|
81826
|
-
if (j === 1)
|
|
81827
|
-
throw Error(invalidEncoding);
|
|
81828
|
-
return offset - start;
|
|
81829
|
-
};
|
|
81830
|
-
|
|
81831
|
-
/**
|
|
81832
|
-
* Tests if the specified string appears to be base64 encoded.
|
|
81833
|
-
* @param {string} string String to test
|
|
81834
|
-
* @returns {boolean} `true` if probably base64 encoded, otherwise false
|
|
81835
|
-
*/
|
|
81836
|
-
base64.test = function test(string) {
|
|
81837
|
-
return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);
|
|
81838
|
-
};
|
|
81839
|
-
} (base64$2));
|
|
81840
|
-
return base64$2;
|
|
81841
|
-
}
|
|
81842
|
-
|
|
81843
|
-
var eventemitter;
|
|
81844
|
-
var hasRequiredEventemitter;
|
|
81845
|
-
|
|
81846
|
-
function requireEventemitter () {
|
|
81847
|
-
if (hasRequiredEventemitter) return eventemitter;
|
|
81848
|
-
hasRequiredEventemitter = 1;
|
|
81849
|
-
eventemitter = EventEmitter;
|
|
81693
|
+
(function (exports) {
|
|
81850
81694
|
|
|
81851
81695
|
/**
|
|
81852
|
-
*
|
|
81853
|
-
* @classdesc A minimal event emitter.
|
|
81696
|
+
* A minimal base64 implementation for number arrays.
|
|
81854
81697
|
* @memberof util
|
|
81855
|
-
* @
|
|
81698
|
+
* @namespace
|
|
81856
81699
|
*/
|
|
81857
|
-
|
|
81858
|
-
|
|
81859
|
-
/**
|
|
81860
|
-
* Registered listeners.
|
|
81861
|
-
* @type {Object.<string,*>}
|
|
81862
|
-
* @private
|
|
81863
|
-
*/
|
|
81864
|
-
this._listeners = {};
|
|
81865
|
-
}
|
|
81700
|
+
var base64 = exports;
|
|
81866
81701
|
|
|
81867
81702
|
/**
|
|
81868
|
-
*
|
|
81869
|
-
* @param {string}
|
|
81870
|
-
* @
|
|
81871
|
-
* @param {*} [ctx] Listener context
|
|
81872
|
-
* @returns {util.EventEmitter} `this`
|
|
81703
|
+
* Calculates the byte length of a base64 encoded string.
|
|
81704
|
+
* @param {string} string Base64 encoded string
|
|
81705
|
+
* @returns {number} Byte length
|
|
81873
81706
|
*/
|
|
81874
|
-
|
|
81875
|
-
|
|
81876
|
-
|
|
81877
|
-
|
|
81878
|
-
|
|
81879
|
-
|
|
81707
|
+
base64.length = function length(string) {
|
|
81708
|
+
var p = string.length;
|
|
81709
|
+
if (!p)
|
|
81710
|
+
return 0;
|
|
81711
|
+
var n = 0;
|
|
81712
|
+
while (--p % 4 > 1 && string.charAt(p) === "=")
|
|
81713
|
+
++n;
|
|
81714
|
+
return Math.ceil(string.length * 3) / 4 - n;
|
|
81880
81715
|
};
|
|
81881
81716
|
|
|
81717
|
+
// Base64 encoding table
|
|
81718
|
+
var b64 = new Array(64);
|
|
81719
|
+
|
|
81720
|
+
// Base64 decoding table
|
|
81721
|
+
var s64 = new Array(123);
|
|
81722
|
+
|
|
81723
|
+
// 65..90, 97..122, 48..57, 43, 47
|
|
81724
|
+
for (var i = 0; i < 64;)
|
|
81725
|
+
s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;
|
|
81726
|
+
|
|
81882
81727
|
/**
|
|
81883
|
-
*
|
|
81884
|
-
* @param {
|
|
81885
|
-
* @param {
|
|
81886
|
-
* @
|
|
81728
|
+
* Encodes a buffer to a base64 encoded string.
|
|
81729
|
+
* @param {Uint8Array} buffer Source buffer
|
|
81730
|
+
* @param {number} start Source start
|
|
81731
|
+
* @param {number} end Source end
|
|
81732
|
+
* @returns {string} Base64 encoded string
|
|
81887
81733
|
*/
|
|
81888
|
-
|
|
81889
|
-
|
|
81890
|
-
|
|
81891
|
-
|
|
81892
|
-
|
|
81893
|
-
|
|
81894
|
-
|
|
81895
|
-
|
|
81896
|
-
|
|
81897
|
-
|
|
81898
|
-
|
|
81899
|
-
|
|
81900
|
-
|
|
81734
|
+
base64.encode = function encode(buffer, start, end) {
|
|
81735
|
+
var parts = null,
|
|
81736
|
+
chunk = [];
|
|
81737
|
+
var i = 0, // output index
|
|
81738
|
+
j = 0, // goto index
|
|
81739
|
+
t; // temporary
|
|
81740
|
+
while (start < end) {
|
|
81741
|
+
var b = buffer[start++];
|
|
81742
|
+
switch (j) {
|
|
81743
|
+
case 0:
|
|
81744
|
+
chunk[i++] = b64[b >> 2];
|
|
81745
|
+
t = (b & 3) << 4;
|
|
81746
|
+
j = 1;
|
|
81747
|
+
break;
|
|
81748
|
+
case 1:
|
|
81749
|
+
chunk[i++] = b64[t | b >> 4];
|
|
81750
|
+
t = (b & 15) << 2;
|
|
81751
|
+
j = 2;
|
|
81752
|
+
break;
|
|
81753
|
+
case 2:
|
|
81754
|
+
chunk[i++] = b64[t | b >> 6];
|
|
81755
|
+
chunk[i++] = b64[b & 63];
|
|
81756
|
+
j = 0;
|
|
81757
|
+
break;
|
|
81758
|
+
}
|
|
81759
|
+
if (i > 8191) {
|
|
81760
|
+
(parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
|
|
81761
|
+
i = 0;
|
|
81901
81762
|
}
|
|
81902
81763
|
}
|
|
81903
|
-
|
|
81764
|
+
if (j) {
|
|
81765
|
+
chunk[i++] = b64[t];
|
|
81766
|
+
chunk[i++] = 61;
|
|
81767
|
+
if (j === 1)
|
|
81768
|
+
chunk[i++] = 61;
|
|
81769
|
+
}
|
|
81770
|
+
if (parts) {
|
|
81771
|
+
if (i)
|
|
81772
|
+
parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
|
|
81773
|
+
return parts.join("");
|
|
81774
|
+
}
|
|
81775
|
+
return String.fromCharCode.apply(String, chunk.slice(0, i));
|
|
81904
81776
|
};
|
|
81905
81777
|
|
|
81778
|
+
var invalidEncoding = "invalid encoding";
|
|
81779
|
+
|
|
81906
81780
|
/**
|
|
81907
|
-
*
|
|
81908
|
-
* @param {string}
|
|
81909
|
-
* @param {
|
|
81910
|
-
* @
|
|
81781
|
+
* Decodes a base64 encoded string to a buffer.
|
|
81782
|
+
* @param {string} string Source string
|
|
81783
|
+
* @param {Uint8Array} buffer Destination buffer
|
|
81784
|
+
* @param {number} offset Destination offset
|
|
81785
|
+
* @returns {number} Number of bytes written
|
|
81786
|
+
* @throws {Error} If encoding is invalid
|
|
81911
81787
|
*/
|
|
81912
|
-
|
|
81913
|
-
var
|
|
81914
|
-
|
|
81915
|
-
|
|
81916
|
-
|
|
81917
|
-
|
|
81918
|
-
|
|
81919
|
-
|
|
81920
|
-
|
|
81788
|
+
base64.decode = function decode(string, buffer, offset) {
|
|
81789
|
+
var start = offset;
|
|
81790
|
+
var j = 0, // goto index
|
|
81791
|
+
t; // temporary
|
|
81792
|
+
for (var i = 0; i < string.length;) {
|
|
81793
|
+
var c = string.charCodeAt(i++);
|
|
81794
|
+
if (c === 61 && j > 1)
|
|
81795
|
+
break;
|
|
81796
|
+
if ((c = s64[c]) === undefined)
|
|
81797
|
+
throw Error(invalidEncoding);
|
|
81798
|
+
switch (j) {
|
|
81799
|
+
case 0:
|
|
81800
|
+
t = c;
|
|
81801
|
+
j = 1;
|
|
81802
|
+
break;
|
|
81803
|
+
case 1:
|
|
81804
|
+
buffer[offset++] = t << 2 | (c & 48) >> 4;
|
|
81805
|
+
t = c;
|
|
81806
|
+
j = 2;
|
|
81807
|
+
break;
|
|
81808
|
+
case 2:
|
|
81809
|
+
buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;
|
|
81810
|
+
t = c;
|
|
81811
|
+
j = 3;
|
|
81812
|
+
break;
|
|
81813
|
+
case 3:
|
|
81814
|
+
buffer[offset++] = (t & 3) << 6 | c;
|
|
81815
|
+
j = 0;
|
|
81816
|
+
break;
|
|
81817
|
+
}
|
|
81921
81818
|
}
|
|
81922
|
-
|
|
81923
|
-
|
|
81924
|
-
|
|
81925
|
-
}
|
|
81926
|
-
|
|
81927
|
-
var float;
|
|
81928
|
-
var hasRequiredFloat;
|
|
81929
|
-
|
|
81930
|
-
function requireFloat () {
|
|
81931
|
-
if (hasRequiredFloat) return float;
|
|
81932
|
-
hasRequiredFloat = 1;
|
|
81933
|
-
|
|
81934
|
-
float = factory(factory);
|
|
81819
|
+
if (j === 1)
|
|
81820
|
+
throw Error(invalidEncoding);
|
|
81821
|
+
return offset - start;
|
|
81822
|
+
};
|
|
81935
81823
|
|
|
81936
81824
|
/**
|
|
81937
|
-
*
|
|
81938
|
-
* @
|
|
81939
|
-
* @
|
|
81825
|
+
* Tests if the specified string appears to be base64 encoded.
|
|
81826
|
+
* @param {string} string String to test
|
|
81827
|
+
* @returns {boolean} `true` if probably base64 encoded, otherwise false
|
|
81940
81828
|
*/
|
|
81829
|
+
base64.test = function test(string) {
|
|
81830
|
+
return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);
|
|
81831
|
+
};
|
|
81832
|
+
} (base64$2));
|
|
81833
|
+
|
|
81834
|
+
var eventemitter = EventEmitter;
|
|
81941
81835
|
|
|
81942
|
-
|
|
81943
|
-
|
|
81944
|
-
|
|
81945
|
-
|
|
81946
|
-
|
|
81947
|
-
|
|
81948
|
-
|
|
81949
|
-
* @returns {undefined}
|
|
81950
|
-
*/
|
|
81836
|
+
/**
|
|
81837
|
+
* Constructs a new event emitter instance.
|
|
81838
|
+
* @classdesc A minimal event emitter.
|
|
81839
|
+
* @memberof util
|
|
81840
|
+
* @constructor
|
|
81841
|
+
*/
|
|
81842
|
+
function EventEmitter() {
|
|
81951
81843
|
|
|
81952
|
-
|
|
81953
|
-
|
|
81954
|
-
|
|
81955
|
-
|
|
81956
|
-
|
|
81957
|
-
|
|
81958
|
-
|
|
81959
|
-
* @returns {undefined}
|
|
81960
|
-
*/
|
|
81844
|
+
/**
|
|
81845
|
+
* Registered listeners.
|
|
81846
|
+
* @type {Object.<string,*>}
|
|
81847
|
+
* @private
|
|
81848
|
+
*/
|
|
81849
|
+
this._listeners = {};
|
|
81850
|
+
}
|
|
81961
81851
|
|
|
81962
|
-
|
|
81963
|
-
|
|
81964
|
-
|
|
81965
|
-
|
|
81966
|
-
|
|
81967
|
-
|
|
81968
|
-
|
|
81969
|
-
|
|
81852
|
+
/**
|
|
81853
|
+
* Registers an event listener.
|
|
81854
|
+
* @param {string} evt Event name
|
|
81855
|
+
* @param {function} fn Listener
|
|
81856
|
+
* @param {*} [ctx] Listener context
|
|
81857
|
+
* @returns {util.EventEmitter} `this`
|
|
81858
|
+
*/
|
|
81859
|
+
EventEmitter.prototype.on = function on(evt, fn, ctx) {
|
|
81860
|
+
(this._listeners[evt] || (this._listeners[evt] = [])).push({
|
|
81861
|
+
fn : fn,
|
|
81862
|
+
ctx : ctx || this
|
|
81863
|
+
});
|
|
81864
|
+
return this;
|
|
81865
|
+
};
|
|
81970
81866
|
|
|
81971
|
-
|
|
81972
|
-
|
|
81973
|
-
|
|
81974
|
-
|
|
81975
|
-
|
|
81976
|
-
|
|
81977
|
-
|
|
81978
|
-
|
|
81867
|
+
/**
|
|
81868
|
+
* Removes an event listener or any matching listeners if arguments are omitted.
|
|
81869
|
+
* @param {string} [evt] Event name. Removes all listeners if omitted.
|
|
81870
|
+
* @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.
|
|
81871
|
+
* @returns {util.EventEmitter} `this`
|
|
81872
|
+
*/
|
|
81873
|
+
EventEmitter.prototype.off = function off(evt, fn) {
|
|
81874
|
+
if (evt === undefined)
|
|
81875
|
+
this._listeners = {};
|
|
81876
|
+
else {
|
|
81877
|
+
if (fn === undefined)
|
|
81878
|
+
this._listeners[evt] = [];
|
|
81879
|
+
else {
|
|
81880
|
+
var listeners = this._listeners[evt];
|
|
81881
|
+
for (var i = 0; i < listeners.length;)
|
|
81882
|
+
if (listeners[i].fn === fn)
|
|
81883
|
+
listeners.splice(i, 1);
|
|
81884
|
+
else
|
|
81885
|
+
++i;
|
|
81886
|
+
}
|
|
81887
|
+
}
|
|
81888
|
+
return this;
|
|
81889
|
+
};
|
|
81979
81890
|
|
|
81980
|
-
|
|
81981
|
-
|
|
81982
|
-
|
|
81983
|
-
|
|
81984
|
-
|
|
81985
|
-
|
|
81986
|
-
|
|
81987
|
-
|
|
81988
|
-
|
|
81891
|
+
/**
|
|
81892
|
+
* Emits an event by calling its listeners with the specified arguments.
|
|
81893
|
+
* @param {string} evt Event name
|
|
81894
|
+
* @param {...*} args Arguments
|
|
81895
|
+
* @returns {util.EventEmitter} `this`
|
|
81896
|
+
*/
|
|
81897
|
+
EventEmitter.prototype.emit = function emit(evt) {
|
|
81898
|
+
var listeners = this._listeners[evt];
|
|
81899
|
+
if (listeners) {
|
|
81900
|
+
var args = [],
|
|
81901
|
+
i = 1;
|
|
81902
|
+
for (; i < arguments.length;)
|
|
81903
|
+
args.push(arguments[i++]);
|
|
81904
|
+
for (i = 0; i < listeners.length;)
|
|
81905
|
+
listeners[i].fn.apply(listeners[i++].ctx, args);
|
|
81906
|
+
}
|
|
81907
|
+
return this;
|
|
81908
|
+
};
|
|
81909
|
+
|
|
81910
|
+
var float = factory(factory);
|
|
81989
81911
|
|
|
81990
|
-
|
|
81991
|
-
|
|
81992
|
-
|
|
81993
|
-
|
|
81994
|
-
|
|
81995
|
-
* @param {Uint8Array} buf Target buffer
|
|
81996
|
-
* @param {number} pos Target buffer offset
|
|
81997
|
-
* @returns {undefined}
|
|
81998
|
-
*/
|
|
81912
|
+
/**
|
|
81913
|
+
* Reads / writes floats / doubles from / to buffers.
|
|
81914
|
+
* @name util.float
|
|
81915
|
+
* @namespace
|
|
81916
|
+
*/
|
|
81999
81917
|
|
|
82000
|
-
|
|
82001
|
-
|
|
82002
|
-
|
|
82003
|
-
|
|
82004
|
-
|
|
82005
|
-
|
|
82006
|
-
|
|
82007
|
-
|
|
81918
|
+
/**
|
|
81919
|
+
* Writes a 32 bit float to a buffer using little endian byte order.
|
|
81920
|
+
* @name util.float.writeFloatLE
|
|
81921
|
+
* @function
|
|
81922
|
+
* @param {number} val Value to write
|
|
81923
|
+
* @param {Uint8Array} buf Target buffer
|
|
81924
|
+
* @param {number} pos Target buffer offset
|
|
81925
|
+
* @returns {undefined}
|
|
81926
|
+
*/
|
|
82008
81927
|
|
|
82009
|
-
|
|
82010
|
-
|
|
82011
|
-
|
|
82012
|
-
|
|
82013
|
-
|
|
82014
|
-
|
|
82015
|
-
|
|
82016
|
-
|
|
81928
|
+
/**
|
|
81929
|
+
* Writes a 32 bit float to a buffer using big endian byte order.
|
|
81930
|
+
* @name util.float.writeFloatBE
|
|
81931
|
+
* @function
|
|
81932
|
+
* @param {number} val Value to write
|
|
81933
|
+
* @param {Uint8Array} buf Target buffer
|
|
81934
|
+
* @param {number} pos Target buffer offset
|
|
81935
|
+
* @returns {undefined}
|
|
81936
|
+
*/
|
|
82017
81937
|
|
|
82018
|
-
|
|
82019
|
-
|
|
81938
|
+
/**
|
|
81939
|
+
* Reads a 32 bit float from a buffer using little endian byte order.
|
|
81940
|
+
* @name util.float.readFloatLE
|
|
81941
|
+
* @function
|
|
81942
|
+
* @param {Uint8Array} buf Source buffer
|
|
81943
|
+
* @param {number} pos Source buffer offset
|
|
81944
|
+
* @returns {number} Value read
|
|
81945
|
+
*/
|
|
82020
81946
|
|
|
82021
|
-
|
|
82022
|
-
|
|
81947
|
+
/**
|
|
81948
|
+
* Reads a 32 bit float from a buffer using big endian byte order.
|
|
81949
|
+
* @name util.float.readFloatBE
|
|
81950
|
+
* @function
|
|
81951
|
+
* @param {Uint8Array} buf Source buffer
|
|
81952
|
+
* @param {number} pos Source buffer offset
|
|
81953
|
+
* @returns {number} Value read
|
|
81954
|
+
*/
|
|
82023
81955
|
|
|
82024
|
-
|
|
82025
|
-
|
|
82026
|
-
|
|
81956
|
+
/**
|
|
81957
|
+
* Writes a 64 bit double to a buffer using little endian byte order.
|
|
81958
|
+
* @name util.float.writeDoubleLE
|
|
81959
|
+
* @function
|
|
81960
|
+
* @param {number} val Value to write
|
|
81961
|
+
* @param {Uint8Array} buf Target buffer
|
|
81962
|
+
* @param {number} pos Target buffer offset
|
|
81963
|
+
* @returns {undefined}
|
|
81964
|
+
*/
|
|
82027
81965
|
|
|
82028
|
-
|
|
82029
|
-
|
|
82030
|
-
|
|
82031
|
-
|
|
82032
|
-
|
|
82033
|
-
|
|
82034
|
-
|
|
81966
|
+
/**
|
|
81967
|
+
* Writes a 64 bit double to a buffer using big endian byte order.
|
|
81968
|
+
* @name util.float.writeDoubleBE
|
|
81969
|
+
* @function
|
|
81970
|
+
* @param {number} val Value to write
|
|
81971
|
+
* @param {Uint8Array} buf Target buffer
|
|
81972
|
+
* @param {number} pos Target buffer offset
|
|
81973
|
+
* @returns {undefined}
|
|
81974
|
+
*/
|
|
82035
81975
|
|
|
82036
|
-
|
|
82037
|
-
|
|
82038
|
-
|
|
82039
|
-
|
|
82040
|
-
|
|
82041
|
-
|
|
82042
|
-
|
|
81976
|
+
/**
|
|
81977
|
+
* Reads a 64 bit double from a buffer using little endian byte order.
|
|
81978
|
+
* @name util.float.readDoubleLE
|
|
81979
|
+
* @function
|
|
81980
|
+
* @param {Uint8Array} buf Source buffer
|
|
81981
|
+
* @param {number} pos Source buffer offset
|
|
81982
|
+
* @returns {number} Value read
|
|
81983
|
+
*/
|
|
82043
81984
|
|
|
82044
|
-
|
|
82045
|
-
|
|
82046
|
-
|
|
82047
|
-
|
|
81985
|
+
/**
|
|
81986
|
+
* Reads a 64 bit double from a buffer using big endian byte order.
|
|
81987
|
+
* @name util.float.readDoubleBE
|
|
81988
|
+
* @function
|
|
81989
|
+
* @param {Uint8Array} buf Source buffer
|
|
81990
|
+
* @param {number} pos Source buffer offset
|
|
81991
|
+
* @returns {number} Value read
|
|
81992
|
+
*/
|
|
82048
81993
|
|
|
82049
|
-
|
|
82050
|
-
|
|
82051
|
-
f8b[1] = buf[pos + 1];
|
|
82052
|
-
f8b[2] = buf[pos + 2];
|
|
82053
|
-
f8b[3] = buf[pos + 3];
|
|
82054
|
-
return f32[0];
|
|
82055
|
-
}
|
|
81994
|
+
// Factory function for the purpose of node-based testing in modified global environments
|
|
81995
|
+
function factory(exports) {
|
|
82056
81996
|
|
|
82057
|
-
|
|
82058
|
-
|
|
82059
|
-
f8b[2] = buf[pos + 1];
|
|
82060
|
-
f8b[1] = buf[pos + 2];
|
|
82061
|
-
f8b[0] = buf[pos + 3];
|
|
82062
|
-
return f32[0];
|
|
82063
|
-
}
|
|
81997
|
+
// float: typed array
|
|
81998
|
+
if (typeof Float32Array !== "undefined") (function() {
|
|
82064
81999
|
|
|
82065
|
-
|
|
82066
|
-
|
|
82067
|
-
|
|
82068
|
-
exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;
|
|
82000
|
+
var f32 = new Float32Array([ -0 ]),
|
|
82001
|
+
f8b = new Uint8Array(f32.buffer),
|
|
82002
|
+
le = f8b[3] === 128;
|
|
82069
82003
|
|
|
82070
|
-
|
|
82071
|
-
|
|
82004
|
+
function writeFloat_f32_cpy(val, buf, pos) {
|
|
82005
|
+
f32[0] = val;
|
|
82006
|
+
buf[pos ] = f8b[0];
|
|
82007
|
+
buf[pos + 1] = f8b[1];
|
|
82008
|
+
buf[pos + 2] = f8b[2];
|
|
82009
|
+
buf[pos + 3] = f8b[3];
|
|
82010
|
+
}
|
|
82072
82011
|
|
|
82073
|
-
|
|
82074
|
-
|
|
82075
|
-
|
|
82076
|
-
|
|
82077
|
-
|
|
82078
|
-
|
|
82079
|
-
|
|
82080
|
-
writeUint(2143289344, buf, pos);
|
|
82081
|
-
else if (val > 3.4028234663852886e+38) // +-Infinity
|
|
82082
|
-
writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);
|
|
82083
|
-
else if (val < 1.1754943508222875e-38) // denormal
|
|
82084
|
-
writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);
|
|
82085
|
-
else {
|
|
82086
|
-
var exponent = Math.floor(Math.log(val) / Math.LN2),
|
|
82087
|
-
mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;
|
|
82088
|
-
writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);
|
|
82089
|
-
}
|
|
82090
|
-
}
|
|
82012
|
+
function writeFloat_f32_rev(val, buf, pos) {
|
|
82013
|
+
f32[0] = val;
|
|
82014
|
+
buf[pos ] = f8b[3];
|
|
82015
|
+
buf[pos + 1] = f8b[2];
|
|
82016
|
+
buf[pos + 2] = f8b[1];
|
|
82017
|
+
buf[pos + 3] = f8b[0];
|
|
82018
|
+
}
|
|
82091
82019
|
|
|
82092
|
-
|
|
82093
|
-
|
|
82020
|
+
/* istanbul ignore next */
|
|
82021
|
+
exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;
|
|
82022
|
+
/* istanbul ignore next */
|
|
82023
|
+
exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;
|
|
82094
82024
|
|
|
82095
|
-
|
|
82096
|
-
|
|
82097
|
-
|
|
82098
|
-
|
|
82099
|
-
|
|
82100
|
-
|
|
82101
|
-
|
|
82102
|
-
? NaN
|
|
82103
|
-
: sign * Infinity
|
|
82104
|
-
: exponent === 0 // denormal
|
|
82105
|
-
? sign * 1.401298464324817e-45 * mantissa
|
|
82106
|
-
: sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);
|
|
82107
|
-
}
|
|
82025
|
+
function readFloat_f32_cpy(buf, pos) {
|
|
82026
|
+
f8b[0] = buf[pos ];
|
|
82027
|
+
f8b[1] = buf[pos + 1];
|
|
82028
|
+
f8b[2] = buf[pos + 2];
|
|
82029
|
+
f8b[3] = buf[pos + 3];
|
|
82030
|
+
return f32[0];
|
|
82031
|
+
}
|
|
82108
82032
|
|
|
82109
|
-
|
|
82110
|
-
|
|
82033
|
+
function readFloat_f32_rev(buf, pos) {
|
|
82034
|
+
f8b[3] = buf[pos ];
|
|
82035
|
+
f8b[2] = buf[pos + 1];
|
|
82036
|
+
f8b[1] = buf[pos + 2];
|
|
82037
|
+
f8b[0] = buf[pos + 3];
|
|
82038
|
+
return f32[0];
|
|
82039
|
+
}
|
|
82111
82040
|
|
|
82112
|
-
|
|
82041
|
+
/* istanbul ignore next */
|
|
82042
|
+
exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;
|
|
82043
|
+
/* istanbul ignore next */
|
|
82044
|
+
exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;
|
|
82113
82045
|
|
|
82114
|
-
|
|
82115
|
-
|
|
82046
|
+
// float: ieee754
|
|
82047
|
+
})(); else (function() {
|
|
82116
82048
|
|
|
82117
|
-
|
|
82118
|
-
|
|
82119
|
-
|
|
82049
|
+
function writeFloat_ieee754(writeUint, val, buf, pos) {
|
|
82050
|
+
var sign = val < 0 ? 1 : 0;
|
|
82051
|
+
if (sign)
|
|
82052
|
+
val = -val;
|
|
82053
|
+
if (val === 0)
|
|
82054
|
+
writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);
|
|
82055
|
+
else if (isNaN(val))
|
|
82056
|
+
writeUint(2143289344, buf, pos);
|
|
82057
|
+
else if (val > 3.4028234663852886e+38) // +-Infinity
|
|
82058
|
+
writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);
|
|
82059
|
+
else if (val < 1.1754943508222875e-38) // denormal
|
|
82060
|
+
writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);
|
|
82061
|
+
else {
|
|
82062
|
+
var exponent = Math.floor(Math.log(val) / Math.LN2),
|
|
82063
|
+
mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;
|
|
82064
|
+
writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);
|
|
82065
|
+
}
|
|
82066
|
+
}
|
|
82120
82067
|
|
|
82121
|
-
|
|
82122
|
-
|
|
82123
|
-
buf[pos ] = f8b[0];
|
|
82124
|
-
buf[pos + 1] = f8b[1];
|
|
82125
|
-
buf[pos + 2] = f8b[2];
|
|
82126
|
-
buf[pos + 3] = f8b[3];
|
|
82127
|
-
buf[pos + 4] = f8b[4];
|
|
82128
|
-
buf[pos + 5] = f8b[5];
|
|
82129
|
-
buf[pos + 6] = f8b[6];
|
|
82130
|
-
buf[pos + 7] = f8b[7];
|
|
82131
|
-
}
|
|
82068
|
+
exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);
|
|
82069
|
+
exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);
|
|
82132
82070
|
|
|
82133
|
-
|
|
82134
|
-
|
|
82135
|
-
|
|
82136
|
-
|
|
82137
|
-
|
|
82138
|
-
|
|
82139
|
-
|
|
82140
|
-
|
|
82141
|
-
|
|
82142
|
-
|
|
82143
|
-
|
|
82071
|
+
function readFloat_ieee754(readUint, buf, pos) {
|
|
82072
|
+
var uint = readUint(buf, pos),
|
|
82073
|
+
sign = (uint >> 31) * 2 + 1,
|
|
82074
|
+
exponent = uint >>> 23 & 255,
|
|
82075
|
+
mantissa = uint & 8388607;
|
|
82076
|
+
return exponent === 255
|
|
82077
|
+
? mantissa
|
|
82078
|
+
? NaN
|
|
82079
|
+
: sign * Infinity
|
|
82080
|
+
: exponent === 0 // denormal
|
|
82081
|
+
? sign * 1.401298464324817e-45 * mantissa
|
|
82082
|
+
: sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);
|
|
82083
|
+
}
|
|
82144
82084
|
|
|
82145
|
-
|
|
82146
|
-
|
|
82147
|
-
/* istanbul ignore next */
|
|
82148
|
-
exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;
|
|
82085
|
+
exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);
|
|
82086
|
+
exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);
|
|
82149
82087
|
|
|
82150
|
-
|
|
82151
|
-
f8b[0] = buf[pos ];
|
|
82152
|
-
f8b[1] = buf[pos + 1];
|
|
82153
|
-
f8b[2] = buf[pos + 2];
|
|
82154
|
-
f8b[3] = buf[pos + 3];
|
|
82155
|
-
f8b[4] = buf[pos + 4];
|
|
82156
|
-
f8b[5] = buf[pos + 5];
|
|
82157
|
-
f8b[6] = buf[pos + 6];
|
|
82158
|
-
f8b[7] = buf[pos + 7];
|
|
82159
|
-
return f64[0];
|
|
82160
|
-
}
|
|
82088
|
+
})();
|
|
82161
82089
|
|
|
82162
|
-
|
|
82163
|
-
|
|
82164
|
-
f8b[6] = buf[pos + 1];
|
|
82165
|
-
f8b[5] = buf[pos + 2];
|
|
82166
|
-
f8b[4] = buf[pos + 3];
|
|
82167
|
-
f8b[3] = buf[pos + 4];
|
|
82168
|
-
f8b[2] = buf[pos + 5];
|
|
82169
|
-
f8b[1] = buf[pos + 6];
|
|
82170
|
-
f8b[0] = buf[pos + 7];
|
|
82171
|
-
return f64[0];
|
|
82172
|
-
}
|
|
82090
|
+
// double: typed array
|
|
82091
|
+
if (typeof Float64Array !== "undefined") (function() {
|
|
82173
82092
|
|
|
82174
|
-
|
|
82175
|
-
|
|
82176
|
-
|
|
82177
|
-
exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;
|
|
82093
|
+
var f64 = new Float64Array([-0]),
|
|
82094
|
+
f8b = new Uint8Array(f64.buffer),
|
|
82095
|
+
le = f8b[7] === 128;
|
|
82178
82096
|
|
|
82179
|
-
|
|
82180
|
-
|
|
82097
|
+
function writeDouble_f64_cpy(val, buf, pos) {
|
|
82098
|
+
f64[0] = val;
|
|
82099
|
+
buf[pos ] = f8b[0];
|
|
82100
|
+
buf[pos + 1] = f8b[1];
|
|
82101
|
+
buf[pos + 2] = f8b[2];
|
|
82102
|
+
buf[pos + 3] = f8b[3];
|
|
82103
|
+
buf[pos + 4] = f8b[4];
|
|
82104
|
+
buf[pos + 5] = f8b[5];
|
|
82105
|
+
buf[pos + 6] = f8b[6];
|
|
82106
|
+
buf[pos + 7] = f8b[7];
|
|
82107
|
+
}
|
|
82181
82108
|
|
|
82182
|
-
|
|
82183
|
-
|
|
82184
|
-
|
|
82185
|
-
|
|
82186
|
-
|
|
82187
|
-
|
|
82188
|
-
|
|
82189
|
-
|
|
82190
|
-
|
|
82191
|
-
|
|
82192
|
-
|
|
82193
|
-
writeUint(0, buf, pos + off0);
|
|
82194
|
-
writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);
|
|
82195
|
-
} else {
|
|
82196
|
-
var mantissa;
|
|
82197
|
-
if (val < 2.2250738585072014e-308) { // denormal
|
|
82198
|
-
mantissa = val / 5e-324;
|
|
82199
|
-
writeUint(mantissa >>> 0, buf, pos + off0);
|
|
82200
|
-
writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);
|
|
82201
|
-
} else {
|
|
82202
|
-
var exponent = Math.floor(Math.log(val) / Math.LN2);
|
|
82203
|
-
if (exponent === 1024)
|
|
82204
|
-
exponent = 1023;
|
|
82205
|
-
mantissa = val * Math.pow(2, -exponent);
|
|
82206
|
-
writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);
|
|
82207
|
-
writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);
|
|
82208
|
-
}
|
|
82209
|
-
}
|
|
82210
|
-
}
|
|
82109
|
+
function writeDouble_f64_rev(val, buf, pos) {
|
|
82110
|
+
f64[0] = val;
|
|
82111
|
+
buf[pos ] = f8b[7];
|
|
82112
|
+
buf[pos + 1] = f8b[6];
|
|
82113
|
+
buf[pos + 2] = f8b[5];
|
|
82114
|
+
buf[pos + 3] = f8b[4];
|
|
82115
|
+
buf[pos + 4] = f8b[3];
|
|
82116
|
+
buf[pos + 5] = f8b[2];
|
|
82117
|
+
buf[pos + 6] = f8b[1];
|
|
82118
|
+
buf[pos + 7] = f8b[0];
|
|
82119
|
+
}
|
|
82211
82120
|
|
|
82212
|
-
|
|
82213
|
-
|
|
82121
|
+
/* istanbul ignore next */
|
|
82122
|
+
exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;
|
|
82123
|
+
/* istanbul ignore next */
|
|
82124
|
+
exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;
|
|
82214
82125
|
|
|
82215
|
-
|
|
82216
|
-
|
|
82217
|
-
|
|
82218
|
-
|
|
82219
|
-
|
|
82220
|
-
|
|
82221
|
-
|
|
82222
|
-
|
|
82223
|
-
|
|
82224
|
-
|
|
82225
|
-
|
|
82226
|
-
? sign * 5e-324 * mantissa
|
|
82227
|
-
: sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);
|
|
82228
|
-
}
|
|
82126
|
+
function readDouble_f64_cpy(buf, pos) {
|
|
82127
|
+
f8b[0] = buf[pos ];
|
|
82128
|
+
f8b[1] = buf[pos + 1];
|
|
82129
|
+
f8b[2] = buf[pos + 2];
|
|
82130
|
+
f8b[3] = buf[pos + 3];
|
|
82131
|
+
f8b[4] = buf[pos + 4];
|
|
82132
|
+
f8b[5] = buf[pos + 5];
|
|
82133
|
+
f8b[6] = buf[pos + 6];
|
|
82134
|
+
f8b[7] = buf[pos + 7];
|
|
82135
|
+
return f64[0];
|
|
82136
|
+
}
|
|
82229
82137
|
|
|
82230
|
-
|
|
82231
|
-
|
|
82138
|
+
function readDouble_f64_rev(buf, pos) {
|
|
82139
|
+
f8b[7] = buf[pos ];
|
|
82140
|
+
f8b[6] = buf[pos + 1];
|
|
82141
|
+
f8b[5] = buf[pos + 2];
|
|
82142
|
+
f8b[4] = buf[pos + 3];
|
|
82143
|
+
f8b[3] = buf[pos + 4];
|
|
82144
|
+
f8b[2] = buf[pos + 5];
|
|
82145
|
+
f8b[1] = buf[pos + 6];
|
|
82146
|
+
f8b[0] = buf[pos + 7];
|
|
82147
|
+
return f64[0];
|
|
82148
|
+
}
|
|
82232
82149
|
|
|
82233
|
-
|
|
82150
|
+
/* istanbul ignore next */
|
|
82151
|
+
exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;
|
|
82152
|
+
/* istanbul ignore next */
|
|
82153
|
+
exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;
|
|
82234
82154
|
|
|
82235
|
-
|
|
82236
|
-
|
|
82155
|
+
// double: ieee754
|
|
82156
|
+
})(); else (function() {
|
|
82237
82157
|
|
|
82238
|
-
|
|
82158
|
+
function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {
|
|
82159
|
+
var sign = val < 0 ? 1 : 0;
|
|
82160
|
+
if (sign)
|
|
82161
|
+
val = -val;
|
|
82162
|
+
if (val === 0) {
|
|
82163
|
+
writeUint(0, buf, pos + off0);
|
|
82164
|
+
writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);
|
|
82165
|
+
} else if (isNaN(val)) {
|
|
82166
|
+
writeUint(0, buf, pos + off0);
|
|
82167
|
+
writeUint(2146959360, buf, pos + off1);
|
|
82168
|
+
} else if (val > 1.7976931348623157e+308) { // +-Infinity
|
|
82169
|
+
writeUint(0, buf, pos + off0);
|
|
82170
|
+
writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);
|
|
82171
|
+
} else {
|
|
82172
|
+
var mantissa;
|
|
82173
|
+
if (val < 2.2250738585072014e-308) { // denormal
|
|
82174
|
+
mantissa = val / 5e-324;
|
|
82175
|
+
writeUint(mantissa >>> 0, buf, pos + off0);
|
|
82176
|
+
writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);
|
|
82177
|
+
} else {
|
|
82178
|
+
var exponent = Math.floor(Math.log(val) / Math.LN2);
|
|
82179
|
+
if (exponent === 1024)
|
|
82180
|
+
exponent = 1023;
|
|
82181
|
+
mantissa = val * Math.pow(2, -exponent);
|
|
82182
|
+
writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);
|
|
82183
|
+
writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);
|
|
82184
|
+
}
|
|
82185
|
+
}
|
|
82186
|
+
}
|
|
82239
82187
|
|
|
82240
|
-
|
|
82241
|
-
|
|
82242
|
-
buf[pos + 1] = val >>> 8 & 255;
|
|
82243
|
-
buf[pos + 2] = val >>> 16 & 255;
|
|
82244
|
-
buf[pos + 3] = val >>> 24;
|
|
82245
|
-
}
|
|
82188
|
+
exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);
|
|
82189
|
+
exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);
|
|
82246
82190
|
|
|
82247
|
-
|
|
82248
|
-
|
|
82249
|
-
|
|
82250
|
-
|
|
82251
|
-
|
|
82252
|
-
|
|
82191
|
+
function readDouble_ieee754(readUint, off0, off1, buf, pos) {
|
|
82192
|
+
var lo = readUint(buf, pos + off0),
|
|
82193
|
+
hi = readUint(buf, pos + off1);
|
|
82194
|
+
var sign = (hi >> 31) * 2 + 1,
|
|
82195
|
+
exponent = hi >>> 20 & 2047,
|
|
82196
|
+
mantissa = 4294967296 * (hi & 1048575) + lo;
|
|
82197
|
+
return exponent === 2047
|
|
82198
|
+
? mantissa
|
|
82199
|
+
? NaN
|
|
82200
|
+
: sign * Infinity
|
|
82201
|
+
: exponent === 0 // denormal
|
|
82202
|
+
? sign * 5e-324 * mantissa
|
|
82203
|
+
: sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);
|
|
82204
|
+
}
|
|
82253
82205
|
|
|
82254
|
-
|
|
82255
|
-
|
|
82256
|
-
| buf[pos + 1] << 8
|
|
82257
|
-
| buf[pos + 2] << 16
|
|
82258
|
-
| buf[pos + 3] << 24) >>> 0;
|
|
82259
|
-
}
|
|
82206
|
+
exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);
|
|
82207
|
+
exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);
|
|
82260
82208
|
|
|
82261
|
-
|
|
82262
|
-
return (buf[pos ] << 24
|
|
82263
|
-
| buf[pos + 1] << 16
|
|
82264
|
-
| buf[pos + 2] << 8
|
|
82265
|
-
| buf[pos + 3]) >>> 0;
|
|
82266
|
-
}
|
|
82267
|
-
return float;
|
|
82268
|
-
}
|
|
82269
|
-
|
|
82270
|
-
var inquire_1;
|
|
82271
|
-
var hasRequiredInquire;
|
|
82272
|
-
|
|
82273
|
-
function requireInquire () {
|
|
82274
|
-
if (hasRequiredInquire) return inquire_1;
|
|
82275
|
-
hasRequiredInquire = 1;
|
|
82276
|
-
inquire_1 = inquire;
|
|
82209
|
+
})();
|
|
82277
82210
|
|
|
82278
|
-
|
|
82279
|
-
|
|
82280
|
-
* @memberof util
|
|
82281
|
-
* @param {string} moduleName Module to require
|
|
82282
|
-
* @returns {?Object} Required module if available and not empty, otherwise `null`
|
|
82283
|
-
*/
|
|
82284
|
-
function inquire(moduleName) {
|
|
82285
|
-
try {
|
|
82286
|
-
var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval
|
|
82287
|
-
if (mod && (mod.length || Object.keys(mod).length))
|
|
82288
|
-
return mod;
|
|
82289
|
-
} catch (e) {} // eslint-disable-line no-empty
|
|
82290
|
-
return null;
|
|
82291
|
-
}
|
|
82292
|
-
return inquire_1;
|
|
82293
|
-
}
|
|
82294
|
-
|
|
82295
|
-
var utf8$4 = {};
|
|
82296
|
-
|
|
82297
|
-
var hasRequiredUtf8;
|
|
82298
|
-
|
|
82299
|
-
function requireUtf8 () {
|
|
82300
|
-
if (hasRequiredUtf8) return utf8$4;
|
|
82301
|
-
hasRequiredUtf8 = 1;
|
|
82302
|
-
(function (exports) {
|
|
82211
|
+
return exports;
|
|
82212
|
+
}
|
|
82303
82213
|
|
|
82304
|
-
|
|
82305
|
-
* A minimal UTF8 implementation for number arrays.
|
|
82306
|
-
* @memberof util
|
|
82307
|
-
* @namespace
|
|
82308
|
-
*/
|
|
82309
|
-
var utf8 = exports;
|
|
82214
|
+
// uint helpers
|
|
82310
82215
|
|
|
82311
|
-
|
|
82312
|
-
|
|
82313
|
-
|
|
82314
|
-
|
|
82315
|
-
|
|
82316
|
-
|
|
82317
|
-
var len = 0,
|
|
82318
|
-
c = 0;
|
|
82319
|
-
for (var i = 0; i < string.length; ++i) {
|
|
82320
|
-
c = string.charCodeAt(i);
|
|
82321
|
-
if (c < 128)
|
|
82322
|
-
len += 1;
|
|
82323
|
-
else if (c < 2048)
|
|
82324
|
-
len += 2;
|
|
82325
|
-
else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {
|
|
82326
|
-
++i;
|
|
82327
|
-
len += 4;
|
|
82328
|
-
} else
|
|
82329
|
-
len += 3;
|
|
82330
|
-
}
|
|
82331
|
-
return len;
|
|
82332
|
-
};
|
|
82216
|
+
function writeUintLE(val, buf, pos) {
|
|
82217
|
+
buf[pos ] = val & 255;
|
|
82218
|
+
buf[pos + 1] = val >>> 8 & 255;
|
|
82219
|
+
buf[pos + 2] = val >>> 16 & 255;
|
|
82220
|
+
buf[pos + 3] = val >>> 24;
|
|
82221
|
+
}
|
|
82333
82222
|
|
|
82334
|
-
|
|
82335
|
-
|
|
82336
|
-
|
|
82337
|
-
|
|
82338
|
-
|
|
82339
|
-
|
|
82340
|
-
*/
|
|
82341
|
-
utf8.read = function utf8_read(buffer, start, end) {
|
|
82342
|
-
var len = end - start;
|
|
82343
|
-
if (len < 1)
|
|
82344
|
-
return "";
|
|
82345
|
-
var parts = null,
|
|
82346
|
-
chunk = [],
|
|
82347
|
-
i = 0, // char offset
|
|
82348
|
-
t; // temporary
|
|
82349
|
-
while (start < end) {
|
|
82350
|
-
t = buffer[start++];
|
|
82351
|
-
if (t < 128)
|
|
82352
|
-
chunk[i++] = t;
|
|
82353
|
-
else if (t > 191 && t < 224)
|
|
82354
|
-
chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;
|
|
82355
|
-
else if (t > 239 && t < 365) {
|
|
82356
|
-
t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;
|
|
82357
|
-
chunk[i++] = 0xD800 + (t >> 10);
|
|
82358
|
-
chunk[i++] = 0xDC00 + (t & 1023);
|
|
82359
|
-
} else
|
|
82360
|
-
chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;
|
|
82361
|
-
if (i > 8191) {
|
|
82362
|
-
(parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
|
|
82363
|
-
i = 0;
|
|
82364
|
-
}
|
|
82365
|
-
}
|
|
82366
|
-
if (parts) {
|
|
82367
|
-
if (i)
|
|
82368
|
-
parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
|
|
82369
|
-
return parts.join("");
|
|
82370
|
-
}
|
|
82371
|
-
return String.fromCharCode.apply(String, chunk.slice(0, i));
|
|
82372
|
-
};
|
|
82223
|
+
function writeUintBE(val, buf, pos) {
|
|
82224
|
+
buf[pos ] = val >>> 24;
|
|
82225
|
+
buf[pos + 1] = val >>> 16 & 255;
|
|
82226
|
+
buf[pos + 2] = val >>> 8 & 255;
|
|
82227
|
+
buf[pos + 3] = val & 255;
|
|
82228
|
+
}
|
|
82373
82229
|
|
|
82374
|
-
|
|
82375
|
-
|
|
82376
|
-
|
|
82377
|
-
|
|
82378
|
-
|
|
82379
|
-
|
|
82380
|
-
|
|
82381
|
-
|
|
82382
|
-
|
|
82383
|
-
|
|
82384
|
-
|
|
82385
|
-
|
|
82386
|
-
c1 = string.charCodeAt(i);
|
|
82387
|
-
if (c1 < 128) {
|
|
82388
|
-
buffer[offset++] = c1;
|
|
82389
|
-
} else if (c1 < 2048) {
|
|
82390
|
-
buffer[offset++] = c1 >> 6 | 192;
|
|
82391
|
-
buffer[offset++] = c1 & 63 | 128;
|
|
82392
|
-
} else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {
|
|
82393
|
-
c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);
|
|
82394
|
-
++i;
|
|
82395
|
-
buffer[offset++] = c1 >> 18 | 240;
|
|
82396
|
-
buffer[offset++] = c1 >> 12 & 63 | 128;
|
|
82397
|
-
buffer[offset++] = c1 >> 6 & 63 | 128;
|
|
82398
|
-
buffer[offset++] = c1 & 63 | 128;
|
|
82399
|
-
} else {
|
|
82400
|
-
buffer[offset++] = c1 >> 12 | 224;
|
|
82401
|
-
buffer[offset++] = c1 >> 6 & 63 | 128;
|
|
82402
|
-
buffer[offset++] = c1 & 63 | 128;
|
|
82403
|
-
}
|
|
82404
|
-
}
|
|
82405
|
-
return offset - start;
|
|
82406
|
-
};
|
|
82407
|
-
} (utf8$4));
|
|
82408
|
-
return utf8$4;
|
|
82230
|
+
function readUintLE(buf, pos) {
|
|
82231
|
+
return (buf[pos ]
|
|
82232
|
+
| buf[pos + 1] << 8
|
|
82233
|
+
| buf[pos + 2] << 16
|
|
82234
|
+
| buf[pos + 3] << 24) >>> 0;
|
|
82235
|
+
}
|
|
82236
|
+
|
|
82237
|
+
function readUintBE(buf, pos) {
|
|
82238
|
+
return (buf[pos ] << 24
|
|
82239
|
+
| buf[pos + 1] << 16
|
|
82240
|
+
| buf[pos + 2] << 8
|
|
82241
|
+
| buf[pos + 3]) >>> 0;
|
|
82409
82242
|
}
|
|
82410
82243
|
|
|
82411
|
-
var
|
|
82412
|
-
|
|
82244
|
+
var inquire_1 = inquire;
|
|
82245
|
+
|
|
82246
|
+
/**
|
|
82247
|
+
* Requires a module only if available.
|
|
82248
|
+
* @memberof util
|
|
82249
|
+
* @param {string} moduleName Module to require
|
|
82250
|
+
* @returns {?Object} Required module if available and not empty, otherwise `null`
|
|
82251
|
+
*/
|
|
82252
|
+
function inquire(moduleName) {
|
|
82253
|
+
try {
|
|
82254
|
+
var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval
|
|
82255
|
+
if (mod && (mod.length || Object.keys(mod).length))
|
|
82256
|
+
return mod;
|
|
82257
|
+
} catch (e) {} // eslint-disable-line no-empty
|
|
82258
|
+
return null;
|
|
82259
|
+
}
|
|
82413
82260
|
|
|
82414
|
-
|
|
82415
|
-
|
|
82416
|
-
|
|
82417
|
-
|
|
82261
|
+
var utf8$4 = {};
|
|
82262
|
+
|
|
82263
|
+
(function (exports) {
|
|
82264
|
+
|
|
82265
|
+
/**
|
|
82266
|
+
* A minimal UTF8 implementation for number arrays.
|
|
82267
|
+
* @memberof util
|
|
82268
|
+
* @namespace
|
|
82269
|
+
*/
|
|
82270
|
+
var utf8 = exports;
|
|
82418
82271
|
|
|
82419
82272
|
/**
|
|
82420
|
-
*
|
|
82421
|
-
* @
|
|
82422
|
-
* @
|
|
82423
|
-
* @param {number} size Buffer size
|
|
82424
|
-
* @returns {Uint8Array} Buffer
|
|
82273
|
+
* Calculates the UTF8 byte length of a string.
|
|
82274
|
+
* @param {string} string String
|
|
82275
|
+
* @returns {number} Byte length
|
|
82425
82276
|
*/
|
|
82277
|
+
utf8.length = function utf8_length(string) {
|
|
82278
|
+
var len = 0,
|
|
82279
|
+
c = 0;
|
|
82280
|
+
for (var i = 0; i < string.length; ++i) {
|
|
82281
|
+
c = string.charCodeAt(i);
|
|
82282
|
+
if (c < 128)
|
|
82283
|
+
len += 1;
|
|
82284
|
+
else if (c < 2048)
|
|
82285
|
+
len += 2;
|
|
82286
|
+
else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {
|
|
82287
|
+
++i;
|
|
82288
|
+
len += 4;
|
|
82289
|
+
} else
|
|
82290
|
+
len += 3;
|
|
82291
|
+
}
|
|
82292
|
+
return len;
|
|
82293
|
+
};
|
|
82426
82294
|
|
|
82427
82295
|
/**
|
|
82428
|
-
*
|
|
82429
|
-
* @
|
|
82430
|
-
* @
|
|
82431
|
-
* @param {number}
|
|
82432
|
-
* @
|
|
82433
|
-
* @returns {Uint8Array} Buffer slice
|
|
82434
|
-
* @this {Uint8Array}
|
|
82296
|
+
* Reads UTF8 bytes as a string.
|
|
82297
|
+
* @param {Uint8Array} buffer Source buffer
|
|
82298
|
+
* @param {number} start Source start
|
|
82299
|
+
* @param {number} end Source end
|
|
82300
|
+
* @returns {string} String read
|
|
82435
82301
|
*/
|
|
82302
|
+
utf8.read = function utf8_read(buffer, start, end) {
|
|
82303
|
+
var len = end - start;
|
|
82304
|
+
if (len < 1)
|
|
82305
|
+
return "";
|
|
82306
|
+
var parts = null,
|
|
82307
|
+
chunk = [],
|
|
82308
|
+
i = 0, // char offset
|
|
82309
|
+
t; // temporary
|
|
82310
|
+
while (start < end) {
|
|
82311
|
+
t = buffer[start++];
|
|
82312
|
+
if (t < 128)
|
|
82313
|
+
chunk[i++] = t;
|
|
82314
|
+
else if (t > 191 && t < 224)
|
|
82315
|
+
chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;
|
|
82316
|
+
else if (t > 239 && t < 365) {
|
|
82317
|
+
t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;
|
|
82318
|
+
chunk[i++] = 0xD800 + (t >> 10);
|
|
82319
|
+
chunk[i++] = 0xDC00 + (t & 1023);
|
|
82320
|
+
} else
|
|
82321
|
+
chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;
|
|
82322
|
+
if (i > 8191) {
|
|
82323
|
+
(parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
|
|
82324
|
+
i = 0;
|
|
82325
|
+
}
|
|
82326
|
+
}
|
|
82327
|
+
if (parts) {
|
|
82328
|
+
if (i)
|
|
82329
|
+
parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
|
|
82330
|
+
return parts.join("");
|
|
82331
|
+
}
|
|
82332
|
+
return String.fromCharCode.apply(String, chunk.slice(0, i));
|
|
82333
|
+
};
|
|
82436
82334
|
|
|
82437
82335
|
/**
|
|
82438
|
-
*
|
|
82439
|
-
* @
|
|
82440
|
-
* @
|
|
82441
|
-
* @param {
|
|
82442
|
-
* @
|
|
82443
|
-
* @param {number} [size=8192] Slab size
|
|
82444
|
-
* @returns {PoolAllocator} Pooled allocator
|
|
82336
|
+
* Writes a string as UTF8 bytes.
|
|
82337
|
+
* @param {string} string Source string
|
|
82338
|
+
* @param {Uint8Array} buffer Destination buffer
|
|
82339
|
+
* @param {number} offset Destination offset
|
|
82340
|
+
* @returns {number} Bytes written
|
|
82445
82341
|
*/
|
|
82446
|
-
function
|
|
82447
|
-
var
|
|
82448
|
-
|
|
82449
|
-
|
|
82450
|
-
var
|
|
82451
|
-
|
|
82452
|
-
if (
|
|
82453
|
-
|
|
82454
|
-
if (
|
|
82455
|
-
|
|
82456
|
-
offset =
|
|
82342
|
+
utf8.write = function utf8_write(string, buffer, offset) {
|
|
82343
|
+
var start = offset,
|
|
82344
|
+
c1, // character 1
|
|
82345
|
+
c2; // character 2
|
|
82346
|
+
for (var i = 0; i < string.length; ++i) {
|
|
82347
|
+
c1 = string.charCodeAt(i);
|
|
82348
|
+
if (c1 < 128) {
|
|
82349
|
+
buffer[offset++] = c1;
|
|
82350
|
+
} else if (c1 < 2048) {
|
|
82351
|
+
buffer[offset++] = c1 >> 6 | 192;
|
|
82352
|
+
buffer[offset++] = c1 & 63 | 128;
|
|
82353
|
+
} else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {
|
|
82354
|
+
c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);
|
|
82355
|
+
++i;
|
|
82356
|
+
buffer[offset++] = c1 >> 18 | 240;
|
|
82357
|
+
buffer[offset++] = c1 >> 12 & 63 | 128;
|
|
82358
|
+
buffer[offset++] = c1 >> 6 & 63 | 128;
|
|
82359
|
+
buffer[offset++] = c1 & 63 | 128;
|
|
82360
|
+
} else {
|
|
82361
|
+
buffer[offset++] = c1 >> 12 | 224;
|
|
82362
|
+
buffer[offset++] = c1 >> 6 & 63 | 128;
|
|
82363
|
+
buffer[offset++] = c1 & 63 | 128;
|
|
82457
82364
|
}
|
|
82458
|
-
|
|
82459
|
-
|
|
82460
|
-
|
|
82461
|
-
|
|
82462
|
-
|
|
82463
|
-
|
|
82464
|
-
|
|
82365
|
+
}
|
|
82366
|
+
return offset - start;
|
|
82367
|
+
};
|
|
82368
|
+
} (utf8$4));
|
|
82369
|
+
|
|
82370
|
+
var pool_1 = pool$1;
|
|
82371
|
+
|
|
82372
|
+
/**
|
|
82373
|
+
* An allocator as used by {@link util.pool}.
|
|
82374
|
+
* @typedef PoolAllocator
|
|
82375
|
+
* @type {function}
|
|
82376
|
+
* @param {number} size Buffer size
|
|
82377
|
+
* @returns {Uint8Array} Buffer
|
|
82378
|
+
*/
|
|
82379
|
+
|
|
82380
|
+
/**
|
|
82381
|
+
* A slicer as used by {@link util.pool}.
|
|
82382
|
+
* @typedef PoolSlicer
|
|
82383
|
+
* @type {function}
|
|
82384
|
+
* @param {number} start Start offset
|
|
82385
|
+
* @param {number} end End offset
|
|
82386
|
+
* @returns {Uint8Array} Buffer slice
|
|
82387
|
+
* @this {Uint8Array}
|
|
82388
|
+
*/
|
|
82389
|
+
|
|
82390
|
+
/**
|
|
82391
|
+
* A general purpose buffer pool.
|
|
82392
|
+
* @memberof util
|
|
82393
|
+
* @function
|
|
82394
|
+
* @param {PoolAllocator} alloc Allocator
|
|
82395
|
+
* @param {PoolSlicer} slice Slicer
|
|
82396
|
+
* @param {number} [size=8192] Slab size
|
|
82397
|
+
* @returns {PoolAllocator} Pooled allocator
|
|
82398
|
+
*/
|
|
82399
|
+
function pool$1(alloc, slice, size) {
|
|
82400
|
+
var SIZE = size || 8192;
|
|
82401
|
+
var MAX = SIZE >>> 1;
|
|
82402
|
+
var slab = null;
|
|
82403
|
+
var offset = SIZE;
|
|
82404
|
+
return function pool_alloc(size) {
|
|
82405
|
+
if (size < 1 || size > MAX)
|
|
82406
|
+
return alloc(size);
|
|
82407
|
+
if (offset + size > SIZE) {
|
|
82408
|
+
slab = alloc(SIZE);
|
|
82409
|
+
offset = 0;
|
|
82410
|
+
}
|
|
82411
|
+
var buf = slice.call(slab, offset, offset += size);
|
|
82412
|
+
if (offset & 7) // align to 32 bit
|
|
82413
|
+
offset = (offset | 7) + 1;
|
|
82414
|
+
return buf;
|
|
82415
|
+
};
|
|
82465
82416
|
}
|
|
82466
82417
|
|
|
82467
82418
|
var longbits;
|
|
@@ -82681,25 +82632,25 @@ function requireMinimal () {
|
|
|
82681
82632
|
var util = exports;
|
|
82682
82633
|
|
|
82683
82634
|
// used to return a Promise where callback is omitted
|
|
82684
|
-
util.asPromise =
|
|
82635
|
+
util.asPromise = aspromise;
|
|
82685
82636
|
|
|
82686
82637
|
// converts to / from base64 encoded strings
|
|
82687
|
-
util.base64 =
|
|
82638
|
+
util.base64 = base64$2;
|
|
82688
82639
|
|
|
82689
82640
|
// base class of rpc.Service
|
|
82690
|
-
util.EventEmitter =
|
|
82641
|
+
util.EventEmitter = eventemitter;
|
|
82691
82642
|
|
|
82692
82643
|
// float handling accross browsers
|
|
82693
|
-
util.float =
|
|
82644
|
+
util.float = float;
|
|
82694
82645
|
|
|
82695
82646
|
// requires modules optionally and hides the call from bundlers
|
|
82696
|
-
util.inquire =
|
|
82647
|
+
util.inquire = inquire_1;
|
|
82697
82648
|
|
|
82698
82649
|
// converts to / from utf8 encoded strings
|
|
82699
|
-
util.utf8 =
|
|
82650
|
+
util.utf8 = utf8$4;
|
|
82700
82651
|
|
|
82701
82652
|
// provides a node-like buffer pool in the browser
|
|
82702
|
-
util.pool =
|
|
82653
|
+
util.pool = pool_1;
|
|
82703
82654
|
|
|
82704
82655
|
// utility to work with the low and high bits of a 64 bit value
|
|
82705
82656
|
util.LongBits = requireLongbits();
|
|
@@ -173493,10 +173444,11 @@ function SquidIcon({ sx = {}, className, }) {
|
|
|
173493
173444
|
}
|
|
173494
173445
|
|
|
173495
173446
|
function RouteFees({ visible, onClose, routeData, totalAmount, totalFiatAmount, }) {
|
|
173447
|
+
const { t } = useTranslation();
|
|
173496
173448
|
const feeCosts = reactExports.useMemo(() => routeData?.route.estimate.feeCosts.map((fee) => ({
|
|
173497
173449
|
label: fee.name,
|
|
173498
173450
|
amount: getFormattedNumber(fee.amount, fee.token.decimals),
|
|
173499
|
-
fiatAmount:
|
|
173451
|
+
fiatAmount: `${t('views.ADD_TOKENS.fees.fiatPricePrefix')}${getFormattedAmounts(fee.amountUsd)}`,
|
|
173500
173452
|
token: {
|
|
173501
173453
|
name: fee.token.name,
|
|
173502
173454
|
symbol: fee.token.symbol,
|
|
@@ -173509,7 +173461,7 @@ function RouteFees({ visible, onClose, routeData, totalAmount, totalFiatAmount,
|
|
|
173509
173461
|
const gasCosts = reactExports.useMemo(() => routeData?.route.estimate.gasCosts.map((fee) => ({
|
|
173510
173462
|
label: 'Gas (transaction)',
|
|
173511
173463
|
amount: getFormattedNumber(fee.amount, fee.token.decimals),
|
|
173512
|
-
fiatAmount:
|
|
173464
|
+
fiatAmount: `${t('views.ADD_TOKENS.fees.fiatPricePrefix')}${getFormattedAmounts(fee.amountUsd)}`,
|
|
173513
173465
|
token: {
|
|
173514
173466
|
name: fee.token.name,
|
|
173515
173467
|
symbol: fee.token.symbol,
|
|
@@ -173628,7 +173580,7 @@ function Review({ data, showBackButton = false, onBackButtonClick, onCloseButton
|
|
|
173628
173580
|
alignItems: 'center',
|
|
173629
173581
|
c: 'base.color.text.body.secondary',
|
|
173630
173582
|
cursor: 'pointer',
|
|
173631
|
-
}, children: ["Included fees", `
|
|
173583
|
+
}, children: ["Included fees", ` ${t('views.ADD_TOKENS.fees.fiatPricePrefix')} $${getFormattedAmounts(totalFeesUsd)}`, jsx(Icon, { icon: "ChevronExpand", sx: { ml: 'base.spacing.x2', w: 'base.icon.size.200' } })] }));
|
|
173632
173584
|
}
|
|
173633
173585
|
return (jsx(Body, { size: "small", sx: {
|
|
173634
173586
|
...hFlex,
|
|
@@ -173708,7 +173660,7 @@ function Review({ data, showBackButton = false, onBackButtonClick, onCloseButton
|
|
|
173708
173660
|
const formattedDuration = route
|
|
173709
173661
|
? getDurationFormatted(route.route.estimate.estimatedRouteDuration)
|
|
173710
173662
|
: '';
|
|
173711
|
-
return (jsxs(SimpleLayout, { header: (jsxs(Stack, { rc: jsx("header", {}), direction: "row", sx: {
|
|
173663
|
+
return (jsxs(SimpleLayout, { containerSx: { bg: 'transparent' }, header: (jsxs(Stack, { rc: jsx("header", {}), direction: "row", sx: {
|
|
173712
173664
|
pt: 'base.spacing.x4',
|
|
173713
173665
|
px: 'base.spacing.x5',
|
|
173714
173666
|
h: 'base.spacing.x18',
|
|
@@ -173725,7 +173677,7 @@ function Review({ data, showBackButton = false, onBackButtonClick, onCloseButton
|
|
|
173725
173677
|
fontSize: 'inherit',
|
|
173726
173678
|
lineHeight: 'inherit',
|
|
173727
173679
|
c: 'inherit',
|
|
173728
|
-
} })] })] }), jsx(PriceDisplay, { price: getFormattedNumber(route.route.estimate.fromAmount, route.route.estimate.fromToken.decimals), sx: { flexShrink: 0, alignSelf: 'flex-start' }, children: jsx(PriceDisplay.Caption, { size: "small", children:
|
|
173680
|
+
} })] })] }), jsx(PriceDisplay, { price: getFormattedNumber(route.route.estimate.fromAmount, route.route.estimate.fromToken.decimals), sx: { flexShrink: 0, alignSelf: 'flex-start' }, children: jsx(PriceDisplay.Caption, { size: "small", children: `${t('views.ADD_TOKENS.fees.fiatPricePrefix')} $${route?.route.estimate.fromAmountUSD ?? ''}` }) })] }), jsx(Stack, { sx: {
|
|
173729
173681
|
pos: 'relative',
|
|
173730
173682
|
w: 'base.spacing.x16',
|
|
173731
173683
|
ml: 'base.spacing.x7',
|
|
@@ -173745,7 +173697,7 @@ function Review({ data, showBackButton = false, onBackButtonClick, onCloseButton
|
|
|
173745
173697
|
top: '-26px',
|
|
173746
173698
|
h: 'base.spacing.x10',
|
|
173747
173699
|
},
|
|
173748
|
-
} }), jsxs(Stack, { direction: "row", sx: { py: 'base.spacing.x5', px: 'base.spacing.x7' }, gap: "base.spacing.x6", alignItems: "center", children: [jsxs(Sticker, { position: { x: 'right', y: 'bottom' }, children: [jsx(FramedImage, { use: (jsx("img", { src:
|
|
173700
|
+
} }), jsxs(Stack, { direction: "row", sx: { py: 'base.spacing.x5', px: 'base.spacing.x7' }, gap: "base.spacing.x6", alignItems: "center", children: [jsxs(Sticker, { position: { x: 'right', y: 'bottom' }, children: [jsx(FramedImage, { use: (jsx("img", { src: route.route.estimate.toToken.logoURI, alt: route.route.estimate.toToken.name })), circularFrame: true, size: "large" }), jsx(Sticker.FramedImage, { use: jsx("img", { src: toChain?.iconUrl, alt: toChain?.name }), emphasized: true, sx: {
|
|
173749
173701
|
bottom: 'base.spacing.x2',
|
|
173750
173702
|
right: 'base.spacing.x2',
|
|
173751
173703
|
} })] }), jsxs(Stack, { sx: { flex: 1 }, gap: "0px", children: [jsxs(Body, { weight: "bold", children: ["Receive", ' ', route?.route.estimate.toToken.name] }), jsxs(Body, { size: "small", sx: { c: 'base.color.text.body.secondary' }, children: [toChain?.name, jsx(EllipsizedText, { text: toAddress ?? '', sx: {
|
|
@@ -173753,7 +173705,7 @@ function Review({ data, showBackButton = false, onBackButtonClick, onCloseButton
|
|
|
173753
173705
|
fontSize: 'inherit',
|
|
173754
173706
|
lineHeight: 'inherit',
|
|
173755
173707
|
c: 'inherit',
|
|
173756
|
-
} })] })] }), jsx(PriceDisplay, { price: getFormattedNumber(route?.route.estimate.toAmount, route?.route.estimate.toToken.decimals), sx: { flexShrink: 0, alignSelf: 'flex-start' }, children: jsx(PriceDisplay.Caption, { size: "small", children:
|
|
173708
|
+
} })] })] }), jsx(PriceDisplay, { price: getFormattedNumber(route?.route.estimate.toAmount, route?.route.estimate.toToken.decimals), sx: { flexShrink: 0, alignSelf: 'flex-start' }, children: jsx(PriceDisplay.Caption, { size: "small", children: `${t('views.ADD_TOKENS.fees.fiatPricePrefix')} $${route?.route.estimate.toAmountUSD ?? ''}` }) })] }), jsx(Stack, { sx: {
|
|
173757
173709
|
pos: 'relative',
|
|
173758
173710
|
w: 'base.spacing.x16',
|
|
173759
173711
|
ml: 'base.spacing.x7',
|
|
@@ -173763,7 +173715,7 @@ function Review({ data, showBackButton = false, onBackButtonClick, onCloseButton
|
|
|
173763
173715
|
top: '-8px',
|
|
173764
173716
|
h: 'base.spacing.x5',
|
|
173765
173717
|
},
|
|
173766
|
-
} }), jsxs(Stack, { direction: "row", gap: "base.spacing.x6", sx: { py: 'base.spacing.x5', px: 'base.spacing.x7' }, alignItems: "center", children: [jsx(Stack, { direction: "row", sx: { w: 'base.spacing.x12' }, justifyContent: "center", children: jsx(FramedIcon, { icon: "Countdown", variant: "bold", size: "medium", circularFrame: true }) }), jsx(Body, { size: "small", sx: { flex: 1, c: 'base.color.text.body.secondary' }, children: formattedDuration }), routeFees] })] }), jsx(Button, { size: "large", onClick: handleTransaction, disabled: proceedDisabled, sx: { mx: 'base.spacing.x3' }, children: proceedDisabled ? 'Processing' : 'Proceed' }), jsx(SquidFooter, {})] })), !route && !showAddressMissmatchDrawer && jsx(LoadingView, { loadingText: "Securing quote" })] }), jsx(RouteFees, { routeData: route, visible: showFeeBreakdown, onClose: () => setShowFeeBreakdown(false), totalAmount: totalFees, totalFiatAmount: totalFeesUsd }), jsx(AddressMissmatchDrawer, { visible: showAddressMissmatchDrawer, onClick: () => {
|
|
173718
|
+
} }), jsxs(Stack, { direction: "row", gap: "base.spacing.x6", sx: { py: 'base.spacing.x5', px: 'base.spacing.x7' }, alignItems: "center", children: [jsx(Stack, { direction: "row", sx: { w: 'base.spacing.x12' }, justifyContent: "center", children: jsx(FramedIcon, { icon: "Countdown", variant: "bold", size: "medium", circularFrame: true }) }), jsx(Body, { size: "small", sx: { flex: 1, c: 'base.color.text.body.secondary' }, children: formattedDuration }), routeFees] })] }), jsx(Button, { size: "large", onClick: handleTransaction, disabled: proceedDisabled, sx: { mx: 'base.spacing.x3' }, children: proceedDisabled ? 'Processing' : 'Proceed' }), jsx(SquidFooter, {})] })), !route && !showAddressMissmatchDrawer && (jsx(LoadingView, { loadingText: "Securing quote", containerSx: { bg: 'transparent' } }))] }), jsx(RouteFees, { routeData: route, visible: showFeeBreakdown, onClose: () => setShowFeeBreakdown(false), totalAmount: totalFees, totalFiatAmount: totalFeesUsd }), jsx(AddressMissmatchDrawer, { visible: showAddressMissmatchDrawer, onClick: () => {
|
|
173767
173719
|
setShowAddressMissmatchDrawer(false);
|
|
173768
173720
|
viewDispatch({
|
|
173769
173721
|
payload: {
|