@imtbl/checkout-widgets 2.0.0-alpha.9 → 2.0.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.
Files changed (48) hide show
  1. package/dist/browser/{AddTokensWidget-DF8aiUpz.js → AddTokensWidget-C32-7Pge.js} +16 -396
  2. package/dist/browser/{BridgeWidget-DIU9Cxmn.js → BridgeWidget-DHmmZrLe.js} +23 -23
  3. package/dist/browser/{CommerceWidget-CKAKFkix.js → CommerceWidget-DinG6S2H.js} +161 -161
  4. package/dist/browser/{FeesBreakdown-BgEzlEIT.js → FeesBreakdown-CVvm1-Ei.js} +1 -1
  5. package/dist/browser/{OnRampWidget-Bve5vLzE.js → OnRampWidget-B54_6G-f.js} +5 -5
  6. package/dist/browser/{SaleWidget-CKWdID6Y.js → SaleWidget-Cuen5aW7.js} +53 -53
  7. package/dist/browser/{SpendingCapHero-HDVNFS4r.js → SpendingCapHero-DQtmoqNL.js} +1 -1
  8. package/dist/browser/SwapWidget-j_nEgqk4.js +1907 -0
  9. package/dist/browser/{TokenImage-DU_Cg9yk.js → TokenImage-Bc62Xkzv.js} +1 -1
  10. package/dist/browser/{TopUpView-DbE6wlUQ.js → TopUpView-Q4_Glu5-.js} +4 -4
  11. package/dist/browser/{WalletApproveHero-BKgdFRbV.js → WalletApproveHero-B6YvvCmA.js} +25 -5
  12. package/dist/browser/{WalletWidget-D370JeUN.js → WalletWidget-B0Up4Cre.js} +14 -14
  13. package/dist/browser/{auto-track-gJcTpwWh.js → auto-track-CaL-84Ic.js} +1 -1
  14. package/dist/browser/{index-BzdV0KgJ.js → index-BI7vXlHL.js} +1 -1
  15. package/dist/browser/{index-DeP8dLpv.js → index-BVzeDoH7.js} +1 -1
  16. package/dist/browser/{index-CcF1_qRd.js → index-BtnAkpe9.js} +1 -1
  17. package/dist/browser/{index-BB_EeO8_.js → index-CBO9u-8Q.js} +1 -12
  18. package/dist/browser/{index-C_yzaB0L.js → index-Cl7BUGHV.js} +2 -2
  19. package/dist/browser/{index-Q-a_-G_9.js → index-Hh-ME3UA.js} +1 -1
  20. package/dist/browser/{index-CSHKiSiI.js → index-JHffH8Bm.js} +1 -1
  21. package/dist/browser/{index-Bizu61HY.js → index-Skcajiao.js} +14521 -50813
  22. package/dist/browser/index.cdn.js +3262 -39764
  23. package/dist/browser/index.js +1 -1
  24. package/dist/browser/{index.umd-oUBivosK.js → index.umd-C0PZl9Xk.js} +1 -1
  25. package/dist/browser/{useInterval-D7lTeYwU.js → useInterval-D2CM0YwW.js} +1 -1
  26. package/dist/types/widgets/purchase/components/PurchaseRouteOptionsDrawer/RouteOptions.d.ts +2 -1
  27. package/dist/types/widgets/purchase/components/PurchaseRouteOptionsDrawer/RouteOptionsDrawer.d.ts +2 -1
  28. package/dist/types/widgets/swap/GeoblockLoader.d.ts +1 -1
  29. package/dist/types/widgets/swap/SwapWidget.d.ts +1 -1
  30. package/dist/types/widgets/swap/SwapWidgetRoot.d.ts +0 -2
  31. package/package.json +13 -14
  32. package/rollup.config.js +42 -23
  33. package/src/components/CoinSelector/CoinSelector.tsx +63 -16
  34. package/src/lib/metrics.ts +4 -3
  35. package/src/locales/en.json +2 -1
  36. package/src/locales/ja.json +2 -1
  37. package/src/locales/ko.json +1 -0
  38. package/src/locales/zh.json +2 -1
  39. package/src/widgets/purchase/components/PurchaseRouteOptionsDrawer/FiatOption.tsx +0 -1
  40. package/src/widgets/purchase/components/PurchaseRouteOptionsDrawer/RouteOptions.tsx +18 -1
  41. package/src/widgets/purchase/components/PurchaseRouteOptionsDrawer/RouteOptionsDrawer.tsx +8 -1
  42. package/src/widgets/purchase/views/Purchase.tsx +2 -0
  43. package/src/widgets/swap/GeoblockLoader.tsx +3 -1
  44. package/src/widgets/swap/SwapWidget.tsx +216 -153
  45. package/src/widgets/swap/SwapWidgetRoot.tsx +17 -80
  46. package/src/widgets/swap/components/SwapForm.tsx +66 -4
  47. package/dist/browser/SwapWidget-CPcceA1Y.js +0 -1738
  48. package/tsup.config.js +0 -58
@@ -1,4 +1,4 @@
1
- import { r as reactExports, ap as getDefaultTokenImage, j as jsx } from './index-Bizu61HY.js';
1
+ import { r as reactExports, ai as getDefaultTokenImage, l as jsx } from './index-Skcajiao.js';
2
2
 
3
3
  function TokenImage({ src, name, environment, theme, defaultImage, ...forwardedProps }) {
4
4
  const [error, setError] = reactExports.useState(false);
@@ -1,4 +1,4 @@
1
- import { r as reactExports, bT as formatUnits, j as jsx, l as jsxs, dk as isDualVariantIcon, a3 as MenuItem, D as Box, bo as K, u as useTranslation, a9 as ViewContext, b$ as CryptoFiatContext, ac as EventTargetContext, N as useAnalytics, c6 as CryptoFiatActions, dl as DEFAULT_TOKEN_SYMBOLS, cC as st, bJ as HeaderNavigation, H as Heading, aA as Body, a_ as SimpleLayout, m as mo, V as ViewActions, b0 as orchestrationEvents } from './index-Bizu61HY.js';
1
+ import { r as reactExports, bM as formatUnits, l as jsx, n as jsxs, dd as isDualVariantIcon, a3 as MenuItem, B as Box, bh as K, c as useTranslation, a9 as ViewContext, bU as CryptoFiatContext, ac as EventTargetContext, K as useAnalytics, b$ as CryptoFiatActions, de as DEFAULT_TOKEN_SYMBOLS, cv as st, bC as HeaderNavigation, H as Heading, at as Body, aT as SimpleLayout, u as uo, V as ViewActions, aV as orchestrationEvents } from './index-Skcajiao.js';
2
2
 
3
3
  var BridgeWidgetViews;
4
4
  (function (BridgeWidgetViews) {
@@ -216,7 +216,7 @@ showOnrampOption, showSwapOption, showBridgeOption, tokenAddress, amount, analyt
216
216
  });
217
217
  };
218
218
  const onClickSwap = () => {
219
- if (widgetEvent === mo.IMTBL_SWAP_WIDGET_EVENT) {
219
+ if (widgetEvent === uo.IMTBL_SWAP_WIDGET_EVENT) {
220
220
  const data = {
221
221
  toTokenAddress: '',
222
222
  fromAmount: '',
@@ -243,7 +243,7 @@ showOnrampOption, showSwapOption, showBridgeOption, tokenAddress, amount, analyt
243
243
  localTrack('Swap', { ...data, widgetEvent });
244
244
  };
245
245
  const onClickBridge = () => {
246
- if (widgetEvent === mo.IMTBL_BRIDGE_WIDGET_EVENT) {
246
+ if (widgetEvent === uo.IMTBL_BRIDGE_WIDGET_EVENT) {
247
247
  const data = {
248
248
  fromTokenAddress: '',
249
249
  fromAmount: '',
@@ -268,7 +268,7 @@ showOnrampOption, showSwapOption, showBridgeOption, tokenAddress, amount, analyt
268
268
  localTrack('Bridge', { ...data, widgetEvent });
269
269
  };
270
270
  const onClickOnRamp = () => {
271
- if (widgetEvent === mo.IMTBL_ONRAMP_WIDGET_EVENT) {
271
+ if (widgetEvent === uo.IMTBL_ONRAMP_WIDGET_EVENT) {
272
272
  const data = {
273
273
  tokenAddress: '',
274
274
  amount: '',
@@ -1,6 +1,6 @@
1
- import { j as jsx, ay as TextInput, dg as FormControlWrapper, u as useTranslation, l as jsxs, a3 as MenuItem, F as Drawer, D as Box, aA as Body, r as reactExports, dh as Select, bo as K, d2 as Bo, di as DuoCon, H as Heading, K as Button, cp as retry, cz as NATIVE, as as getTokenImageByAddress, ar as isNativeToken, db as DEFAULT_BALANCE_RETRY_POLICY, a6 as getRemoteImage, ct as getChainNameById, b as getL1ChainId, ck as isWalletConnectProvider, cv as isMetaMaskProvider, bt as CloudImage, ax as ButtCon, bM as FooterLogo, cy as formatZeroAmount, bP as tokenValueFormat, ci as Accordion, cd as ShimmerBox, bh as PriceDisplay, O as Fragment, cK as heroBackGroundStyles, cL as heroImageStyles, dj as heroImageBottomAlign } from './index-Bizu61HY.js';
2
- import { T as TokenImage } from './TokenImage-DU_Cg9yk.js';
3
- import { F as FeesBreakdown } from './FeesBreakdown-BgEzlEIT.js';
1
+ import { l as jsx, ar as TextInput, d9 as FormControlWrapper, c as useTranslation, n as jsxs, a3 as MenuItem, r as reactExports, D as Drawer, B as Box, at as Body, M as Fragment, da as Select, bh as K, cX as xo, db as DuoCon, H as Heading, F as Button, ci as retry, cs as NATIVE, al as getTokenImageByAddress, ak as isNativeToken, d4 as DEFAULT_BALANCE_RETRY_POLICY, a6 as getRemoteImage, cm as getChainNameById, b as getL1ChainId, cd as isWalletConnectProvider, co as isMetaMaskProvider, bm as CloudImage, aq as ButtCon, bF as FooterLogo, cr as formatZeroAmount, bI as tokenValueFormat, cb as Accordion, c6 as ShimmerBox, ba as PriceDisplay, cD as heroBackGroundStyles, cE as heroImageStyles, dc as heroImageBottomAlign } from './index-Skcajiao.js';
2
+ import { T as TokenImage } from './TokenImage-Bc62Xkzv.js';
3
+ import { F as FeesBreakdown } from './FeesBreakdown-CVvm1-Ei.js';
4
4
 
5
5
  function TextInputForm({ testId, value, placeholder, errorMessage, validator, onTextInputChange, onTextInputBlur, onTextInputFocus, onTextInputEnter, textAlign, type, subtext, maxButtonClick, disabled, inputMode, }) {
6
6
  const handleOnChange = (event, previousValue) => {
@@ -59,12 +59,32 @@ const selectOptionsLoadingIconStyles = {
59
59
  rowGap: 'base.spacing.x2',
60
60
  };
61
61
 
62
+ const filterOptions = (filterBy, options) => {
63
+ const filterByLower = filterBy.toLowerCase();
64
+ return options.filter((option) => option.name.toLowerCase().includes(filterByLower)
65
+ || option.symbol.toLowerCase().includes(filterByLower)
66
+ || option.id.toLowerCase().endsWith(filterByLower));
67
+ };
62
68
  function CoinSelector({ heading, options, defaultTokenImage, optionsLoading, children, onCloseDrawer, visible, }) {
63
69
  const { t } = useTranslation();
64
- return (jsxs(Drawer, { headerBarTitle: heading, size: "full", onCloseDrawer: onCloseDrawer, visible: visible, children: [jsx(Drawer.Target, { children: children }), jsx(Drawer.Content, { children: jsxs(Box, { sx: selectOptionsContainerStyles, children: [optionsLoading && options.length === 0 && (jsxs(Box, { sx: selectOptionsLoadingIconStyles, children: [jsx(MenuItem, { shimmer: true, emphasized: true, testId: "balance-item-shimmer--1" }), jsx(MenuItem, { shimmer: true, emphasized: true, testId: "balance-item-shimmer--2" }), jsx(MenuItem, { shimmer: true, emphasized: true, testId: "balance-item-shimmer--3" })] })), !optionsLoading && options.length === 0 && (jsx(Body, { sx: { padding: 'base.spacing.x4' }, children: t('drawers.coinSelector.noCoins') })), !optionsLoading && options.map(({ onClick, icon, name, symbol, balance, id, testId, }) => (jsx(CoinSelectorOption, { id: id, testId: testId, onClick: onClick, icon: icon, name: name, symbol: symbol, balance: balance, defaultTokenImage: defaultTokenImage }, `${symbol}-${name}`)))] }) })] }));
70
+ const [searchValue, setSearchValue] = reactExports.useState('');
71
+ const handleOnChange = (event) => {
72
+ setSearchValue(event.target.value);
73
+ };
74
+ const filteredOptions = reactExports.useMemo(() => {
75
+ if (!searchValue) {
76
+ return options;
77
+ }
78
+ return filterOptions(searchValue, options);
79
+ }, [options, searchValue, filterOptions]);
80
+ const handleCloseDrawer = () => {
81
+ setSearchValue('');
82
+ onCloseDrawer?.();
83
+ };
84
+ return (jsxs(Drawer, { headerBarTitle: heading, size: "full", onCloseDrawer: handleCloseDrawer, visible: visible, children: [jsx(Drawer.Target, { children: children }), jsx(Drawer.Content, { children: jsxs(Box, { sx: selectOptionsContainerStyles, children: [optionsLoading && options.length === 0 && (jsxs(Box, { sx: selectOptionsLoadingIconStyles, children: [jsx(MenuItem, { shimmer: true, emphasized: true, testId: "balance-item-shimmer--1" }), jsx(MenuItem, { shimmer: true, emphasized: true, testId: "balance-item-shimmer--2" }), jsx(MenuItem, { shimmer: true, emphasized: true, testId: "balance-item-shimmer--3" })] })), !optionsLoading && options.length === 0 && (jsx(Body, { sx: { padding: 'base.spacing.x4' }, children: t('drawers.coinSelector.noCoins') })), !optionsLoading ? (jsxs(Fragment, { children: [jsx(TextInput, { sx: { marginBottom: 'base.spacing.x4', minWidth: '100%' }, testId: "search-text", onChange: (event) => handleOnChange(event), sizeVariant: "large", value: searchValue, inputMode: "search", placeholder: "name/symbol/contract address", onClearValue: () => setSearchValue(''), hideClearValueButton: false, autoFocus: true, children: jsx(TextInput.Icon, { icon: "Search" }) }), filteredOptions.map(({ onClick, icon, name, symbol, balance, id, testId, }) => (jsx(CoinSelectorOption, { id: id, testId: testId, onClick: onClick, icon: icon, name: name, symbol: symbol, balance: balance, defaultTokenImage: defaultTokenImage }, `${symbol}-${name}`)))] })) : null] }) })] }));
65
85
  }
66
86
 
67
- function SelectForm({ testId, options, optionsLoading, subtext, onSelectChange, textAlign, errorMessage, disabled, selectedOption, coinSelectorHeading, defaultTokenImage, environment = K.PRODUCTION, theme = Bo.DARK, }) {
87
+ function SelectForm({ testId, options, optionsLoading, subtext, onSelectChange, textAlign, errorMessage, disabled, selectedOption, coinSelectorHeading, defaultTokenImage, environment = K.PRODUCTION, theme = xo.DARK, }) {
68
88
  const [coinSelectorOpen, setCoinSelectorOpen] = reactExports.useState(false);
69
89
  const coinSelectorOptions = reactExports.useMemo(() => options.map((option) => ({
70
90
  ...option,
@@ -1,6 +1,6 @@
1
- import { r as reactExports, aq as ae, u as useTranslation, a9 as ViewContext, l as jsxs, D as Box, j as jsx, aA as Body, ax as ButtCon, V as ViewActions, c0 as ConnectLoaderContext, N as useAnalytics, cy as formatZeroAmount, ac as EventTargetContext, _ as isPassportProvider, a as getL2ChainId, b as getL1ChainId, bo as K, a3 as MenuItem, bP as tokenValueFormat, T as UserJourney, b0 as orchestrationEvents, m as mo, dm as ZERO_BALANCE_STRING, ar as isNativeToken, dn as sendNetworkSwitchEvent, cb as k, e as SharedViews, dp as me, dq as sortNetworksCompareFn, dr as HorizontalMenu, cg as getChainImage, cp as retry, db as DEFAULT_BALANCE_RETRY_POLICY, ds as sortTokensByAmount, as as getTokenImageByAddress, bA as calculateCryptoToFiat, b$ as CryptoFiatContext, c6 as CryptoFiatActions, bJ as HeaderNavigation, cx as ButtonNavigationStyles, dt as sendWalletWidgetCloseEvent, bM as FooterLogo, a_ as SimpleLayout, cw as ge, cu as getWalletProviderNameByProvider, dk as isDualVariantIcon, bS as abbreviateWalletAddress, H as Heading, F as Drawer, cj as useWalletConnect, du as sendDisconnectWalletEvent, K as Button, ck as isWalletConnectProvider, cK as heroBackGroundStyles, cL as heroImageStyles, dj as heroImageBottomAlign, cM as SimpleTextBody, dv as FAQS_LINK, ba as Link, bj as viewReducer, bk as initialViewState, c9 as CryptoFiatProvider, L as LoadingView, n as ErrorView } from './index-Bizu61HY.js';
2
- import { T as TokenImage } from './TokenImage-DU_Cg9yk.js';
3
- import { u as useInterval } from './useInterval-D7lTeYwU.js';
1
+ import { r as reactExports, aj as ie, c as useTranslation, a9 as ViewContext, n as jsxs, B as Box, l as jsx, at as Body, aq as ButtCon, V as ViewActions, bV as ConnectLoaderContext, K as useAnalytics, cr as formatZeroAmount, ac as EventTargetContext, _ as isPassportProvider, a as getL2ChainId, b as getL1ChainId, bh as K, a3 as MenuItem, bI as tokenValueFormat, Q as UserJourney, aV as orchestrationEvents, u as uo, df as ZERO_BALANCE_STRING, ak as isNativeToken, dg as sendNetworkSwitchEvent, c4 as k, i as SharedViews, dh as ue, di as sortNetworksCompareFn, dj as HorizontalMenu, c9 as getChainImage, ci as retry, d4 as DEFAULT_BALANCE_RETRY_POLICY, dk as sortTokensByAmount, al as getTokenImageByAddress, bt as calculateCryptoToFiat, bU as CryptoFiatContext, b$ as CryptoFiatActions, bC as HeaderNavigation, cq as ButtonNavigationStyles, dl as sendWalletWidgetCloseEvent, bF as FooterLogo, aT as SimpleLayout, cp as me, cn as getWalletProviderNameByProvider, dd as isDualVariantIcon, bL as abbreviateWalletAddress, H as Heading, D as Drawer, cc as useWalletConnect, dm as sendDisconnectWalletEvent, F as Button, cd as isWalletConnectProvider, cD as heroBackGroundStyles, cE as heroImageStyles, dc as heroImageBottomAlign, cF as SimpleTextBody, dn as FAQS_LINK, b3 as Link, bc as viewReducer, bd as initialViewState, c2 as CryptoFiatProvider, L as LoadingView, o as ErrorView } from './index-Skcajiao.js';
2
+ import { T as TokenImage } from './TokenImage-Bc62Xkzv.js';
3
+ import { u as useInterval } from './useInterval-D2CM0YwW.js';
4
4
 
5
5
  const initialWalletState = {
6
6
  walletProviderName: null,
@@ -61,7 +61,7 @@ const walletReducer = (state, action) => {
61
61
 
62
62
  const fetchTokenSymbols = async (checkout, chainId) => {
63
63
  const tokenAllowList = await checkout.getTokenAllowList({
64
- type: ae.ALL,
64
+ type: ie.ALL,
65
65
  chainId,
66
66
  });
67
67
  const symbolSet = new Set();
@@ -137,11 +137,11 @@ function BalanceItem({ balanceInfo, theme, bridgeToL2OnClick, }) {
137
137
  if (!checkout)
138
138
  return;
139
139
  const onRampTokens = checkout.getTokenAllowList({
140
- type: ae.ONRAMP,
140
+ type: ie.ONRAMP,
141
141
  chainId: getL2ChainId(checkout.config),
142
142
  });
143
143
  const swapTokens = checkout.getTokenAllowList({
144
- type: ae.SWAP,
144
+ type: ie.SWAP,
145
145
  chainId: getL2ChainId(checkout.config),
146
146
  });
147
147
  const [onRampAllowedTokensResult, swapAllowedTokensResult] = await Promise.all([onRampTokens, swapTokens]);
@@ -197,13 +197,13 @@ function BalanceItem({ balanceInfo, theme, bridgeToL2OnClick, }) {
197
197
  },
198
198
  });
199
199
  if (isAddTokensEnabled) {
200
- orchestrationEvents.sendRequestAddTokensEvent(eventTarget, mo.IMTBL_WALLET_WIDGET_EVENT, {
200
+ orchestrationEvents.sendRequestAddTokensEvent(eventTarget, uo.IMTBL_WALLET_WIDGET_EVENT, {
201
201
  toAmount: '',
202
202
  toTokenAddress: balanceInfo.address ?? '',
203
203
  });
204
204
  return;
205
205
  }
206
- orchestrationEvents.sendRequestOnrampEvent(eventTarget, mo.IMTBL_WALLET_WIDGET_EVENT, {
206
+ orchestrationEvents.sendRequestOnrampEvent(eventTarget, uo.IMTBL_WALLET_WIDGET_EVENT, {
207
207
  tokenAddress: balanceInfo.address ?? '',
208
208
  amount: '',
209
209
  });
@@ -230,7 +230,7 @@ function BalanceItem({ balanceInfo, theme, bridgeToL2OnClick, }) {
230
230
  tokenAddress: balanceInfo.address,
231
231
  },
232
232
  });
233
- orchestrationEvents.sendRequestSwapEvent(eventTarget, mo.IMTBL_WALLET_WIDGET_EVENT, {
233
+ orchestrationEvents.sendRequestSwapEvent(eventTarget, uo.IMTBL_WALLET_WIDGET_EVENT, {
234
234
  fromTokenAddress: balanceInfo.address ?? '',
235
235
  toTokenAddress: '',
236
236
  amount: '',
@@ -341,7 +341,7 @@ function NetworkMenu() {
341
341
  (async () => {
342
342
  if (checkout) {
343
343
  const allowedNetworksResponse = await checkout.getNetworkAllowList({
344
- type: me.ALL,
344
+ type: ue.ALL,
345
345
  });
346
346
  setNetworks(allowedNetworksResponse?.networks ?? []);
347
347
  }
@@ -501,10 +501,10 @@ function WalletBalances({ balancesLoading, theme, showNetworkMenu, }) {
501
501
  control: 'AddCoins',
502
502
  controlType: 'Button',
503
503
  });
504
- orchestrationEvents.sendRequestAddTokensEvent(eventTarget, mo.IMTBL_WALLET_WIDGET_EVENT, {});
504
+ orchestrationEvents.sendRequestAddTokensEvent(eventTarget, uo.IMTBL_WALLET_WIDGET_EVENT, {});
505
505
  };
506
506
  const handleBridgeToL2OnClick = (address) => {
507
- orchestrationEvents.sendRequestBridgeEvent(eventTarget, mo.IMTBL_WALLET_WIDGET_EVENT, {
507
+ orchestrationEvents.sendRequestBridgeEvent(eventTarget, uo.IMTBL_WALLET_WIDGET_EVENT, {
508
508
  tokenAddress: address ?? '',
509
509
  amount: '',
510
510
  });
@@ -527,8 +527,8 @@ function WalletBalances({ balancesLoading, theme, showNetworkMenu, }) {
527
527
 
528
528
  function getWalletLogoByName(walletProviderName) {
529
529
  switch (walletProviderName) {
530
- case ge.METAMASK: return 'MetaMaskSymbol';
531
- case ge.PASSPORT: return 'PassportSymbolOutlined';
530
+ case me.METAMASK: return 'MetaMaskSymbol';
531
+ case me.PASSPORT: return 'PassportSymbolOutlined';
532
532
  case 'walletconnect': return 'WalletConnectSymbol';
533
533
  default: return 'MetaMaskSymbol';
534
534
  }
@@ -1,4 +1,4 @@
1
- import { d$ as pTimeout } from './index-Bizu61HY.js';
1
+ import { dU as pTimeout } from './index-Skcajiao.js';
2
2
 
3
3
  // Check if a user is opening the link in a new tab
4
4
  function userNewTab(event) {
@@ -1,4 +1,4 @@
1
- import { dH as __awaiter, dI as __generator, dS as isServer, dK as getNextIntegrationsURL, dJ as loadScript } from './index-Bizu61HY.js';
1
+ import { dA as __awaiter, dB as __generator, dL as isServer, dD as getNextIntegrationsURL, dC as loadScript } from './index-Skcajiao.js';
2
2
 
3
3
  function remoteMiddlewares(ctx, settings, obfuscate) {
4
4
  var _a;
@@ -1,4 +1,4 @@
1
- import { dH as __awaiter, dI as __generator, dJ as loadScript, dK as getNextIntegrationsURL, dL as unloadScript, dM as __spreadArray, dN as isOffline, dO as __assign, dP as ContextCancelation, dQ as applyDestinationMiddleware, dR as dist, dS as isServer, dT as mergedOptions, dU as isPlainObject, dV as pWhile, dW as PriorityQueue, dX as PersistedPriorityQueue, dY as attempt, dZ as isOnline, d_ as Context } from './index-Bizu61HY.js';
1
+ import { dA as __awaiter, dB as __generator, dC as loadScript, dD as getNextIntegrationsURL, dE as unloadScript, dF as __spreadArray, dG as isOffline, dH as __assign, dI as ContextCancelation, dJ as applyDestinationMiddleware, dK as dist, dL as isServer, dM as mergedOptions, dN as isPlainObject, dO as pWhile, dP as PriorityQueue, dQ as PersistedPriorityQueue, dR as attempt, dS as isOnline, dT as Context } from './index-Skcajiao.js';
2
2
  import { i as isPlanEventEnabled } from './is-plan-event-enabled-mXX0dwl-.js';
3
3
 
4
4
  function normalizeName(name) {
@@ -1,4 +1,4 @@
1
- import { e0 as gracefulDecodeURIComponent, dU as isPlainObject } from './index-Bizu61HY.js';
1
+ import { dV as gracefulDecodeURIComponent, dN as isPlainObject } from './index-Skcajiao.js';
2
2
 
3
3
  /**
4
4
  * Returns an object containing only the properties prefixed by the input
@@ -1,4 +1,4 @@
1
- import { dx as ne$1, dy as se$1, dz as T$2, dA as oe$1, dB as R$1, dC as a$2, dD as te$1, dE as p$1, dF as y$1 } from './index-Bizu61HY.js';
1
+ import { dq as ne$1, dr as se$1, ds as T$2, dt as oe$1, du as R$1, dv as a$2, dw as te$1, dx as p$1, dy as y$1 } from './index-Skcajiao.js';
2
2
 
3
3
  /**
4
4
  * @license
@@ -398,15 +398,6 @@ class Animation {
398
398
  }
399
399
  }
400
400
 
401
- var invariant = function () { };
402
- if (production !== 'production') {
403
- invariant = function (check, message) {
404
- if (!check) {
405
- throw new Error(message);
406
- }
407
- };
408
- }
409
-
410
401
  /**
411
402
  * The MotionValue tracks the state of a single animatable
412
403
  * value. Currently, updatedAt and current are unused. The
@@ -941,8 +932,6 @@ function createAnimate(AnimatePolyfill) {
941
932
  return function animate(elements, keyframes, options = {}) {
942
933
  elements = resolveElements(elements);
943
934
  const numElements = elements.length;
944
- invariant(Boolean(numElements), "No valid element provided.");
945
- invariant(Boolean(keyframes), "No keyframes defined.");
946
935
  /**
947
936
  * Create and start new animations
948
937
  */
@@ -1,4 +1,4 @@
1
- import { dH as __awaiter, dI as __generator } from './index-Bizu61HY.js';
1
+ import { dA as __awaiter, dB as __generator } from './index-Skcajiao.js';
2
2
 
3
3
  function loadLegacyVideoPlugins(analytics) {
4
4
  return __awaiter(this, void 0, void 0, function () {
@@ -7,7 +7,7 @@ function loadLegacyVideoPlugins(analytics) {
7
7
  switch (_a.label) {
8
8
  case 0: return [4 /*yield*/, import(
9
9
  // @ts-expect-error
10
- './index.umd-oUBivosK.js').then(function (n) { return n.i; })
10
+ './index.umd-C0PZl9Xk.js').then(function (n) { return n.i; })
11
11
  // This is super gross, but we need to support the `window.analytics.plugins` namespace
12
12
  // that is linked in the segment docs in order to be backwards compatible with ajs-classic
13
13
  // @ts-expect-error
@@ -1,4 +1,4 @@
1
- import { dG as getAugmentedNamespace, z as commonjsGlobal } from './index-Bizu61HY.js';
1
+ import { dz as getAugmentedNamespace, v as commonjsGlobal } from './index-Skcajiao.js';
2
2
 
3
3
  var dist$1 = {};
4
4
 
@@ -1,4 +1,4 @@
1
- import { dO as __assign } from './index-Bizu61HY.js';
1
+ import { dH as __assign } from './index-Skcajiao.js';
2
2
  import { i as isPlanEventEnabled } from './is-plan-event-enabled-mXX0dwl-.js';
3
3
 
4
4
  function disabledActionDestinations(plan, settings) {