@stakekit/widget 0.0.277 → 0.0.278
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/bundle/index.bundle.css +1 -1
- package/dist/bundle/index.bundle.js +40 -40
- package/dist/package/index.package.css +1125 -1112
- package/dist/package/index.package.js +2102 -2027
- package/dist/types/components/atoms/box/index.d.ts +3 -3
- package/dist/types/domain/types/external-providers.d.ts +7 -2
- package/dist/types/domain/types/yields.d.ts +1 -0
- package/dist/types/pages/steps/hooks/errors.d.ts +3 -1
- package/dist/types/pages/steps/hooks/use-steps-machine.hook.d.ts +1 -1
- package/dist/types/pages/steps/hooks/use-steps.hook.d.ts +2 -1
- package/dist/types/pages/steps/pages/styles.css.d.ts +1 -0
- package/dist/types/pages-dashboard/overview/earn-details/earn-details-formatters.d.ts +1 -1
- package/dist/types/providers/sk-wallet/errors.d.ts +2 -1
- package/dist/types/styles/theme/atoms.css.d.ts +3 -3
- package/dist/types/styles/theme/contract.css.d.ts +1 -0
- package/dist/types/styles/theme/properties.d.ts +3 -0
- package/dist/types/styles/theme/themes.d.ts +2 -0
- package/dist/types/styles/tokens/colors/contract.d.ts +1 -0
- package/dist/types/translation/resources.d.ts +2 -0
- package/dist/website/assets/{basic-pwmIJ5Ws.js → basic-B6mp0zAt.js} +1 -1
- package/dist/website/assets/{basic-CjEpjfzf.js → basic-COtSRBWn.js} +1 -1
- package/dist/website/assets/{browser-CCqMUd7Y.js → browser-DlS057kQ.js} +1 -1
- package/dist/website/assets/{build-B7EKreOf.js → build-B42j8XfN.js} +1 -1
- package/dist/website/assets/{build-BJXYN5Yd.js → build-C3BnF_yX.js} +1 -1
- package/dist/website/assets/{cardano-connector-Cpx-YJd6.js → cardano-connector-Bhntw_t9.js} +1 -1
- package/dist/website/assets/{core-CJ6UoY0G.js → core-XcRP3coP.js} +2 -2
- package/dist/website/assets/{dist-BTQzphBJ.js → dist-Codtf9eb.js} +1 -1
- package/dist/website/assets/{dist-DUXhuB4w.js → dist-inm--arR.js} +1 -1
- package/dist/website/assets/en_US-IFPOGBSL-DmyC9Biu.js +1 -0
- package/dist/website/assets/{esm-CU6m2Mgh.js → esm-ZiJzF2A0.js} +1 -1
- package/dist/website/assets/{exports-C-Rr_VQ2.js → exports-CyYSC3cP.js} +1 -1
- package/dist/website/assets/{index-STnzu3ZH.js → index-DKvgVcnp.js} +24 -24
- package/dist/website/assets/index-DURgR3jz.css +1 -0
- package/dist/website/assets/{index.es-DfIWVmF0.js → index.es-DvvwVKcs.js} +2 -2
- package/dist/website/assets/{ledger-connector-BL2CqkDZ.js → ledger-connector-B18-WePP.js} +1 -1
- package/dist/website/assets/{receive-DbQB8Kb0.js → receive-AVnNiEqk.js} +1 -1
- package/dist/website/assets/{registry-DQZCfZdW.js → registry-DdkFsSTf.js} +1 -1
- package/dist/website/assets/{safe-connector-DpMirNdU.js → safe-connector-8xKDfpEB.js} +1 -1
- package/dist/website/assets/{socials-CVEdW2YA.js → socials-DPfvdnuK.js} +1 -1
- package/dist/website/assets/{solana-connector-D8iHz3KE.js → solana-connector-Bv33WvyR.js} +1 -1
- package/dist/website/assets/{substrate-connector-DzMk8xI3.js → substrate-connector-DlOCsOcs.js} +1 -1
- package/dist/website/assets/{ton-connector-DkGy3-Cc.js → ton-connector-D8V6GzAg.js} +1 -1
- package/dist/website/assets/{tron-connector-CK8wKQTX.js → tron-connector-DEk19bH5.js} +3 -3
- package/dist/website/assets/tx-B31H-PDz.js +1 -0
- package/dist/website/assets/{wallet-manager-_pvCvRVJ.js → wallet-manager-Buj8Wwd2.js} +3 -3
- package/dist/website/assets/{wui-qr-code-DvTvu_mf.js → wui-qr-code-CaP1gUiJ.js} +1 -1
- package/dist/website/index.html +2 -2
- package/package.json +1 -1
- package/dist/website/assets/en_US-IFPOGBSL-DiQE412U.js +0 -1
- package/dist/website/assets/index-DOaPAEx0.css +0 -1
- package/dist/website/assets/tx-4iZZqojA.js +0 -1
|
@@ -24,9 +24,9 @@ export declare const Box: import("react").ForwardRefExoticComponent<Omit<AllHTML
|
|
|
24
24
|
readonly borderWidth?: 1 | 2 | 3 | 0.5 | undefined;
|
|
25
25
|
readonly borderStyle?: "solid" | undefined;
|
|
26
26
|
readonly overflowWrap?: "normal" | "break-word" | "anywhere" | undefined;
|
|
27
|
-
readonly color?: "connectKit" | "text" | "white" | "transparent" | "primary" | "accent" | "disabled" | "textMuted" | "textDanger" | "background" | "backgroundMuted" | "tokenSelectBackground" | "tokenSelectHoverBackground" | "tokenSelectBorder" | "tokenSelect" | "skeletonLoaderBase" | "skeletonLoaderHighlight" | "tabBorder" | "stakeSectionBackground" | "dropdownBackground" | "selectValidatorMultiSelectedBackground" | "selectValidatorMultiDefaultBackground" | "warningBoxBackground" | "positionsClaimRewardsBackground" | "positionsActionRequiredBackground" | "positionsPendingBackground" | "positionsRewardRate" | "modalOverlayBackground" | "modalBodyBackground" | "tooltipBackground" | "primaryButtonColor" | "primaryButtonBackground" | "secondaryButtonColor" | "secondaryButtonBackground" | "smallButtonColor" | "smallButtonBackground" | "smallLightButtonColor" | "smallLightButtonBackground" | "disabledButtonColor" | "disabledButtonBackground" | "dashboardDetailsSectionBackground" | "summaryItemBackground" | "summaryLabelStakedBackground" | "summaryLabelStakedColor" | "summaryLabelApyBackground" | "summaryLabelApyColor" | "summaryLabelAvailableBackground" | "summaryLabelAvailableColor" | undefined;
|
|
28
|
-
readonly background?: "connectKit" | "text" | "white" | "transparent" | "primary" | "accent" | "disabled" | "textMuted" | "textDanger" | "background" | "backgroundMuted" | "tokenSelectBackground" | "tokenSelectHoverBackground" | "tokenSelectBorder" | "tokenSelect" | "skeletonLoaderBase" | "skeletonLoaderHighlight" | "tabBorder" | "stakeSectionBackground" | "dropdownBackground" | "selectValidatorMultiSelectedBackground" | "selectValidatorMultiDefaultBackground" | "warningBoxBackground" | "positionsClaimRewardsBackground" | "positionsActionRequiredBackground" | "positionsPendingBackground" | "positionsRewardRate" | "modalOverlayBackground" | "modalBodyBackground" | "tooltipBackground" | "primaryButtonColor" | "primaryButtonBackground" | "secondaryButtonColor" | "secondaryButtonBackground" | "smallButtonColor" | "smallButtonBackground" | "smallLightButtonColor" | "smallLightButtonBackground" | "disabledButtonColor" | "disabledButtonBackground" | "dashboardDetailsSectionBackground" | "summaryItemBackground" | "summaryLabelStakedBackground" | "summaryLabelStakedColor" | "summaryLabelApyBackground" | "summaryLabelApyColor" | "summaryLabelAvailableBackground" | "summaryLabelAvailableColor" | undefined;
|
|
29
|
-
readonly borderColor?: "connectKit" | "text" | "white" | "transparent" | "primary" | "accent" | "disabled" | "textMuted" | "textDanger" | "background" | "backgroundMuted" | "tokenSelectBackground" | "tokenSelectHoverBackground" | "tokenSelectBorder" | "tokenSelect" | "skeletonLoaderBase" | "skeletonLoaderHighlight" | "tabBorder" | "stakeSectionBackground" | "dropdownBackground" | "selectValidatorMultiSelectedBackground" | "selectValidatorMultiDefaultBackground" | "warningBoxBackground" | "positionsClaimRewardsBackground" | "positionsActionRequiredBackground" | "positionsPendingBackground" | "positionsRewardRate" | "modalOverlayBackground" | "modalBodyBackground" | "tooltipBackground" | "primaryButtonColor" | "primaryButtonBackground" | "secondaryButtonColor" | "secondaryButtonBackground" | "smallButtonColor" | "smallButtonBackground" | "smallLightButtonColor" | "smallLightButtonBackground" | "disabledButtonColor" | "disabledButtonBackground" | "dashboardDetailsSectionBackground" | "summaryItemBackground" | "summaryLabelStakedBackground" | "summaryLabelStakedColor" | "summaryLabelApyBackground" | "summaryLabelApyColor" | "summaryLabelAvailableBackground" | "summaryLabelAvailableColor" | undefined;
|
|
27
|
+
readonly color?: "connectKit" | "text" | "white" | "transparent" | "primary" | "accent" | "disabled" | "textMuted" | "textDanger" | "background" | "backgroundMuted" | "tokenSelectBackground" | "tokenSelectHoverBackground" | "tokenSelectBorder" | "tokenSelect" | "skeletonLoaderBase" | "skeletonLoaderHighlight" | "tabBorder" | "stakeSectionBackground" | "dropdownBackground" | "selectValidatorMultiSelectedBackground" | "selectValidatorMultiDefaultBackground" | "warningBoxBackground" | "errorBoxBackground" | "positionsClaimRewardsBackground" | "positionsActionRequiredBackground" | "positionsPendingBackground" | "positionsRewardRate" | "modalOverlayBackground" | "modalBodyBackground" | "tooltipBackground" | "primaryButtonColor" | "primaryButtonBackground" | "secondaryButtonColor" | "secondaryButtonBackground" | "smallButtonColor" | "smallButtonBackground" | "smallLightButtonColor" | "smallLightButtonBackground" | "disabledButtonColor" | "disabledButtonBackground" | "dashboardDetailsSectionBackground" | "summaryItemBackground" | "summaryLabelStakedBackground" | "summaryLabelStakedColor" | "summaryLabelApyBackground" | "summaryLabelApyColor" | "summaryLabelAvailableBackground" | "summaryLabelAvailableColor" | undefined;
|
|
28
|
+
readonly background?: "connectKit" | "text" | "white" | "transparent" | "primary" | "accent" | "disabled" | "textMuted" | "textDanger" | "background" | "backgroundMuted" | "tokenSelectBackground" | "tokenSelectHoverBackground" | "tokenSelectBorder" | "tokenSelect" | "skeletonLoaderBase" | "skeletonLoaderHighlight" | "tabBorder" | "stakeSectionBackground" | "dropdownBackground" | "selectValidatorMultiSelectedBackground" | "selectValidatorMultiDefaultBackground" | "warningBoxBackground" | "errorBoxBackground" | "positionsClaimRewardsBackground" | "positionsActionRequiredBackground" | "positionsPendingBackground" | "positionsRewardRate" | "modalOverlayBackground" | "modalBodyBackground" | "tooltipBackground" | "primaryButtonColor" | "primaryButtonBackground" | "secondaryButtonColor" | "secondaryButtonBackground" | "smallButtonColor" | "smallButtonBackground" | "smallLightButtonColor" | "smallLightButtonBackground" | "disabledButtonColor" | "disabledButtonBackground" | "dashboardDetailsSectionBackground" | "summaryItemBackground" | "summaryLabelStakedBackground" | "summaryLabelStakedColor" | "summaryLabelApyBackground" | "summaryLabelApyColor" | "summaryLabelAvailableBackground" | "summaryLabelAvailableColor" | undefined;
|
|
29
|
+
readonly borderColor?: "connectKit" | "text" | "white" | "transparent" | "primary" | "accent" | "disabled" | "textMuted" | "textDanger" | "background" | "backgroundMuted" | "tokenSelectBackground" | "tokenSelectHoverBackground" | "tokenSelectBorder" | "tokenSelect" | "skeletonLoaderBase" | "skeletonLoaderHighlight" | "tabBorder" | "stakeSectionBackground" | "dropdownBackground" | "selectValidatorMultiSelectedBackground" | "selectValidatorMultiDefaultBackground" | "warningBoxBackground" | "errorBoxBackground" | "positionsClaimRewardsBackground" | "positionsActionRequiredBackground" | "positionsPendingBackground" | "positionsRewardRate" | "modalOverlayBackground" | "modalBodyBackground" | "tooltipBackground" | "primaryButtonColor" | "primaryButtonBackground" | "secondaryButtonColor" | "secondaryButtonBackground" | "smallButtonColor" | "smallButtonBackground" | "smallLightButtonColor" | "smallLightButtonBackground" | "disabledButtonColor" | "disabledButtonBackground" | "dashboardDetailsSectionBackground" | "summaryItemBackground" | "summaryLabelStakedBackground" | "summaryLabelStakedColor" | "summaryLabelApyBackground" | "summaryLabelApyColor" | "summaryLabelAvailableBackground" | "summaryLabelAvailableColor" | undefined;
|
|
30
30
|
} & {
|
|
31
31
|
readonly display?: "none" | "flex" | "block" | "inline" | "inline-block" | "inline-flex" | {
|
|
32
32
|
mobile?: "none" | "flex" | "block" | "inline" | "inline-block" | "inline-flex" | undefined;
|
|
@@ -2,12 +2,17 @@ import { EitherAsync } from "purify-ts";
|
|
|
2
2
|
import type { RefObject } from "react";
|
|
3
3
|
import type { SKExternalProviders } from "./wallets";
|
|
4
4
|
import type { SKTx, SKTxMeta } from "./wallets/generic-wallet";
|
|
5
|
+
export declare class ExternalProviderError extends Error {
|
|
6
|
+
readonly customMessage: string | null;
|
|
7
|
+
_tag: string;
|
|
8
|
+
constructor(customMessage: string | null, cause?: unknown);
|
|
9
|
+
}
|
|
5
10
|
export declare class ExternalProvider {
|
|
6
11
|
private variantProvider;
|
|
7
12
|
constructor(variantProvider: RefObject<SKExternalProviders>);
|
|
8
|
-
sendTransaction(tx: SKTx, txMeta: SKTxMeta): EitherAsync<
|
|
13
|
+
sendTransaction(tx: SKTx, txMeta: SKTxMeta): EitherAsync<Error | ExternalProviderError, string>;
|
|
9
14
|
switchChain({ chainId }: {
|
|
10
15
|
chainId: number;
|
|
11
16
|
}): EitherAsync<Error, void>;
|
|
12
|
-
signMessage(messageHash: string): EitherAsync<
|
|
17
|
+
signMessage(messageHash: string): EitherAsync<ExternalProviderError, string>;
|
|
13
18
|
}
|
|
@@ -89,6 +89,7 @@ export declare const getYieldOutputToken: (yieldDto: YieldBase) => import("purif
|
|
|
89
89
|
readonly isPoints?: boolean;
|
|
90
90
|
readonly coinGeckoId?: string;
|
|
91
91
|
}>;
|
|
92
|
+
export declare const hasYieldBearingOutputToken: (yieldDto: YieldBase) => boolean;
|
|
92
93
|
export declare const isUnstakeYieldType: (yieldType: ExtendedYieldType) => yieldType is "native_staking" | "staking" | "restaking" | "pooled_staking";
|
|
93
94
|
export declare const isDepositYieldType: (yieldType: ExtendedYieldType) => yieldType is "vault" | "lending" | "fixed_yield" | "real_world_asset" | "concentrated_liquidity_pool" | "liquidity_pool";
|
|
94
95
|
export declare const getYieldTypeLabels: (yieldDto: YieldBase, t: TFunction) => YieldTypeLabelsMap[keyof YieldTypeLabelsMap];
|
|
@@ -2,7 +2,9 @@ export declare class SignError extends Error {
|
|
|
2
2
|
_tag: string;
|
|
3
3
|
txId: string;
|
|
4
4
|
network: string;
|
|
5
|
-
|
|
5
|
+
customMessage: string | null;
|
|
6
|
+
constructor({ customMessage, network, txId, }: {
|
|
7
|
+
customMessage?: string | null;
|
|
6
8
|
txId: string;
|
|
7
9
|
network: string;
|
|
8
10
|
});
|
|
@@ -8,7 +8,7 @@ type TxMeta = {
|
|
|
8
8
|
url: string | null;
|
|
9
9
|
signedTx: string | null;
|
|
10
10
|
broadcasted: boolean | null;
|
|
11
|
-
signError: SendTransactionError | TransactionDecodeError | null;
|
|
11
|
+
signError: SendTransactionError | TransactionDecodeError | SignError | null;
|
|
12
12
|
txCheckError: GetStakeSessionError | null;
|
|
13
13
|
done: boolean;
|
|
14
14
|
};
|
|
@@ -16,12 +16,13 @@ export declare const useSteps: ({ inputToken, session, onSignSuccess, providersD
|
|
|
16
16
|
url: string | null;
|
|
17
17
|
signedTx: string | null;
|
|
18
18
|
broadcasted: boolean | null;
|
|
19
|
-
signError: import("../../../providers/sk-wallet/errors").SendTransactionError | import("../../../providers/sk-wallet/errors").TransactionDecodeError | null;
|
|
19
|
+
signError: import("../../../providers/sk-wallet/errors").SendTransactionError | import("../../../providers/sk-wallet/errors").TransactionDecodeError | import("./errors").SignError | null;
|
|
20
20
|
txCheckError: import("./errors").GetStakeSessionError | null;
|
|
21
21
|
done: boolean;
|
|
22
22
|
};
|
|
23
23
|
}[];
|
|
24
24
|
cta: PageCta;
|
|
25
|
+
customSignErrorMessage: string | null;
|
|
25
26
|
};
|
|
26
27
|
export declare enum TxStateEnum {
|
|
27
28
|
SIGN_IDLE = 0,
|
|
@@ -16,7 +16,7 @@ export declare const formatProviderTvl: (tvl: string | number | null | undefined
|
|
|
16
16
|
export declare const formatProviderStatus: (status: string | null | undefined) => string | null;
|
|
17
17
|
export declare const formatProviderWebsite: (website: string) => string;
|
|
18
18
|
export declare const formatProviderWebsiteHref: (website: string) => string;
|
|
19
|
-
export declare const formatRewardTokenLabel: (yieldDto: Yield) => string;
|
|
19
|
+
export declare const formatRewardTokenLabel: (yieldDto: Yield, t: TFunction) => string;
|
|
20
20
|
export declare const formatPricePerShare: (yieldDto: Yield) => string | null;
|
|
21
21
|
export declare const formatCooldownDays: (days: number, t: TFunction) => string;
|
|
22
22
|
export declare const formatRewardClaiming: (yieldDto: Yield, t: TFunction) => string;
|
|
@@ -4,8 +4,9 @@ export declare class SafeFailedError extends Error {
|
|
|
4
4
|
constructor(type: SafeFailedError["type"]);
|
|
5
5
|
}
|
|
6
6
|
export declare class SendTransactionError extends Error {
|
|
7
|
+
readonly customMessage: string | null;
|
|
7
8
|
_tag: string;
|
|
8
|
-
constructor(cause?: unknown);
|
|
9
|
+
constructor(cause?: unknown, customMessage?: string | null);
|
|
9
10
|
}
|
|
10
11
|
export declare class TransactionDecodeError extends Error {
|
|
11
12
|
_tag: string;
|
|
@@ -14,9 +14,9 @@ export declare const atoms: ((props: {
|
|
|
14
14
|
readonly borderWidth?: 1 | 2 | 3 | 0.5 | undefined;
|
|
15
15
|
readonly borderStyle?: "solid" | undefined;
|
|
16
16
|
readonly overflowWrap?: "normal" | "break-word" | "anywhere" | undefined;
|
|
17
|
-
readonly color?: "connectKit" | "text" | "white" | "transparent" | "primary" | "accent" | "disabled" | "textMuted" | "textDanger" | "background" | "backgroundMuted" | "tokenSelectBackground" | "tokenSelectHoverBackground" | "tokenSelectBorder" | "tokenSelect" | "skeletonLoaderBase" | "skeletonLoaderHighlight" | "tabBorder" | "stakeSectionBackground" | "dropdownBackground" | "selectValidatorMultiSelectedBackground" | "selectValidatorMultiDefaultBackground" | "warningBoxBackground" | "positionsClaimRewardsBackground" | "positionsActionRequiredBackground" | "positionsPendingBackground" | "positionsRewardRate" | "modalOverlayBackground" | "modalBodyBackground" | "tooltipBackground" | "primaryButtonColor" | "primaryButtonBackground" | "secondaryButtonColor" | "secondaryButtonBackground" | "smallButtonColor" | "smallButtonBackground" | "smallLightButtonColor" | "smallLightButtonBackground" | "disabledButtonColor" | "disabledButtonBackground" | "dashboardDetailsSectionBackground" | "summaryItemBackground" | "summaryLabelStakedBackground" | "summaryLabelStakedColor" | "summaryLabelApyBackground" | "summaryLabelApyColor" | "summaryLabelAvailableBackground" | "summaryLabelAvailableColor" | undefined;
|
|
18
|
-
readonly background?: "connectKit" | "text" | "white" | "transparent" | "primary" | "accent" | "disabled" | "textMuted" | "textDanger" | "background" | "backgroundMuted" | "tokenSelectBackground" | "tokenSelectHoverBackground" | "tokenSelectBorder" | "tokenSelect" | "skeletonLoaderBase" | "skeletonLoaderHighlight" | "tabBorder" | "stakeSectionBackground" | "dropdownBackground" | "selectValidatorMultiSelectedBackground" | "selectValidatorMultiDefaultBackground" | "warningBoxBackground" | "positionsClaimRewardsBackground" | "positionsActionRequiredBackground" | "positionsPendingBackground" | "positionsRewardRate" | "modalOverlayBackground" | "modalBodyBackground" | "tooltipBackground" | "primaryButtonColor" | "primaryButtonBackground" | "secondaryButtonColor" | "secondaryButtonBackground" | "smallButtonColor" | "smallButtonBackground" | "smallLightButtonColor" | "smallLightButtonBackground" | "disabledButtonColor" | "disabledButtonBackground" | "dashboardDetailsSectionBackground" | "summaryItemBackground" | "summaryLabelStakedBackground" | "summaryLabelStakedColor" | "summaryLabelApyBackground" | "summaryLabelApyColor" | "summaryLabelAvailableBackground" | "summaryLabelAvailableColor" | undefined;
|
|
19
|
-
readonly borderColor?: "connectKit" | "text" | "white" | "transparent" | "primary" | "accent" | "disabled" | "textMuted" | "textDanger" | "background" | "backgroundMuted" | "tokenSelectBackground" | "tokenSelectHoverBackground" | "tokenSelectBorder" | "tokenSelect" | "skeletonLoaderBase" | "skeletonLoaderHighlight" | "tabBorder" | "stakeSectionBackground" | "dropdownBackground" | "selectValidatorMultiSelectedBackground" | "selectValidatorMultiDefaultBackground" | "warningBoxBackground" | "positionsClaimRewardsBackground" | "positionsActionRequiredBackground" | "positionsPendingBackground" | "positionsRewardRate" | "modalOverlayBackground" | "modalBodyBackground" | "tooltipBackground" | "primaryButtonColor" | "primaryButtonBackground" | "secondaryButtonColor" | "secondaryButtonBackground" | "smallButtonColor" | "smallButtonBackground" | "smallLightButtonColor" | "smallLightButtonBackground" | "disabledButtonColor" | "disabledButtonBackground" | "dashboardDetailsSectionBackground" | "summaryItemBackground" | "summaryLabelStakedBackground" | "summaryLabelStakedColor" | "summaryLabelApyBackground" | "summaryLabelApyColor" | "summaryLabelAvailableBackground" | "summaryLabelAvailableColor" | undefined;
|
|
17
|
+
readonly color?: "connectKit" | "text" | "white" | "transparent" | "primary" | "accent" | "disabled" | "textMuted" | "textDanger" | "background" | "backgroundMuted" | "tokenSelectBackground" | "tokenSelectHoverBackground" | "tokenSelectBorder" | "tokenSelect" | "skeletonLoaderBase" | "skeletonLoaderHighlight" | "tabBorder" | "stakeSectionBackground" | "dropdownBackground" | "selectValidatorMultiSelectedBackground" | "selectValidatorMultiDefaultBackground" | "warningBoxBackground" | "errorBoxBackground" | "positionsClaimRewardsBackground" | "positionsActionRequiredBackground" | "positionsPendingBackground" | "positionsRewardRate" | "modalOverlayBackground" | "modalBodyBackground" | "tooltipBackground" | "primaryButtonColor" | "primaryButtonBackground" | "secondaryButtonColor" | "secondaryButtonBackground" | "smallButtonColor" | "smallButtonBackground" | "smallLightButtonColor" | "smallLightButtonBackground" | "disabledButtonColor" | "disabledButtonBackground" | "dashboardDetailsSectionBackground" | "summaryItemBackground" | "summaryLabelStakedBackground" | "summaryLabelStakedColor" | "summaryLabelApyBackground" | "summaryLabelApyColor" | "summaryLabelAvailableBackground" | "summaryLabelAvailableColor" | undefined;
|
|
18
|
+
readonly background?: "connectKit" | "text" | "white" | "transparent" | "primary" | "accent" | "disabled" | "textMuted" | "textDanger" | "background" | "backgroundMuted" | "tokenSelectBackground" | "tokenSelectHoverBackground" | "tokenSelectBorder" | "tokenSelect" | "skeletonLoaderBase" | "skeletonLoaderHighlight" | "tabBorder" | "stakeSectionBackground" | "dropdownBackground" | "selectValidatorMultiSelectedBackground" | "selectValidatorMultiDefaultBackground" | "warningBoxBackground" | "errorBoxBackground" | "positionsClaimRewardsBackground" | "positionsActionRequiredBackground" | "positionsPendingBackground" | "positionsRewardRate" | "modalOverlayBackground" | "modalBodyBackground" | "tooltipBackground" | "primaryButtonColor" | "primaryButtonBackground" | "secondaryButtonColor" | "secondaryButtonBackground" | "smallButtonColor" | "smallButtonBackground" | "smallLightButtonColor" | "smallLightButtonBackground" | "disabledButtonColor" | "disabledButtonBackground" | "dashboardDetailsSectionBackground" | "summaryItemBackground" | "summaryLabelStakedBackground" | "summaryLabelStakedColor" | "summaryLabelApyBackground" | "summaryLabelApyColor" | "summaryLabelAvailableBackground" | "summaryLabelAvailableColor" | undefined;
|
|
19
|
+
readonly borderColor?: "connectKit" | "text" | "white" | "transparent" | "primary" | "accent" | "disabled" | "textMuted" | "textDanger" | "background" | "backgroundMuted" | "tokenSelectBackground" | "tokenSelectHoverBackground" | "tokenSelectBorder" | "tokenSelect" | "skeletonLoaderBase" | "skeletonLoaderHighlight" | "tabBorder" | "stakeSectionBackground" | "dropdownBackground" | "selectValidatorMultiSelectedBackground" | "selectValidatorMultiDefaultBackground" | "warningBoxBackground" | "errorBoxBackground" | "positionsClaimRewardsBackground" | "positionsActionRequiredBackground" | "positionsPendingBackground" | "positionsRewardRate" | "modalOverlayBackground" | "modalBodyBackground" | "tooltipBackground" | "primaryButtonColor" | "primaryButtonBackground" | "secondaryButtonColor" | "secondaryButtonBackground" | "smallButtonColor" | "smallButtonBackground" | "smallLightButtonColor" | "smallLightButtonBackground" | "disabledButtonColor" | "disabledButtonBackground" | "dashboardDetailsSectionBackground" | "summaryItemBackground" | "summaryLabelStakedBackground" | "summaryLabelStakedColor" | "summaryLabelApyBackground" | "summaryLabelApyColor" | "summaryLabelAvailableBackground" | "summaryLabelAvailableColor" | undefined;
|
|
20
20
|
} & {
|
|
21
21
|
readonly display?: "none" | "flex" | "block" | "inline" | "inline-block" | "inline-flex" | {
|
|
22
22
|
mobile?: "none" | "flex" | "block" | "inline" | "inline-block" | "inline-flex" | undefined;
|
|
@@ -22,6 +22,7 @@ export declare const vars: {
|
|
|
22
22
|
selectValidatorMultiSelectedBackground: `var(--${string})`;
|
|
23
23
|
selectValidatorMultiDefaultBackground: `var(--${string})`;
|
|
24
24
|
warningBoxBackground: `var(--${string})`;
|
|
25
|
+
errorBoxBackground: `var(--${string})`;
|
|
25
26
|
positionsClaimRewardsBackground: `var(--${string})`;
|
|
26
27
|
positionsActionRequiredBackground: `var(--${string})`;
|
|
27
28
|
positionsPendingBackground: `var(--${string})`;
|
|
@@ -98,6 +98,7 @@ export declare const unresponsiveProperties: {
|
|
|
98
98
|
selectValidatorMultiSelectedBackground: `var(--${string})`;
|
|
99
99
|
selectValidatorMultiDefaultBackground: `var(--${string})`;
|
|
100
100
|
warningBoxBackground: `var(--${string})`;
|
|
101
|
+
errorBoxBackground: `var(--${string})`;
|
|
101
102
|
positionsClaimRewardsBackground: `var(--${string})`;
|
|
102
103
|
positionsActionRequiredBackground: `var(--${string})`;
|
|
103
104
|
positionsPendingBackground: `var(--${string})`;
|
|
@@ -179,6 +180,7 @@ export declare const unresponsiveProperties: {
|
|
|
179
180
|
selectValidatorMultiSelectedBackground: `var(--${string})`;
|
|
180
181
|
selectValidatorMultiDefaultBackground: `var(--${string})`;
|
|
181
182
|
warningBoxBackground: `var(--${string})`;
|
|
183
|
+
errorBoxBackground: `var(--${string})`;
|
|
182
184
|
positionsClaimRewardsBackground: `var(--${string})`;
|
|
183
185
|
positionsActionRequiredBackground: `var(--${string})`;
|
|
184
186
|
positionsPendingBackground: `var(--${string})`;
|
|
@@ -260,6 +262,7 @@ export declare const unresponsiveProperties: {
|
|
|
260
262
|
selectValidatorMultiSelectedBackground: `var(--${string})`;
|
|
261
263
|
selectValidatorMultiDefaultBackground: `var(--${string})`;
|
|
262
264
|
warningBoxBackground: `var(--${string})`;
|
|
265
|
+
errorBoxBackground: `var(--${string})`;
|
|
263
266
|
positionsClaimRewardsBackground: `var(--${string})`;
|
|
264
267
|
positionsActionRequiredBackground: `var(--${string})`;
|
|
265
268
|
positionsPendingBackground: `var(--${string})`;
|
|
@@ -22,6 +22,7 @@ export declare const lightTheme: {
|
|
|
22
22
|
selectValidatorMultiSelectedBackground: string;
|
|
23
23
|
selectValidatorMultiDefaultBackground: string;
|
|
24
24
|
warningBoxBackground: string;
|
|
25
|
+
errorBoxBackground: string;
|
|
25
26
|
positionsClaimRewardsBackground: string;
|
|
26
27
|
positionsActionRequiredBackground: string;
|
|
27
28
|
positionsPendingBackground: string;
|
|
@@ -249,6 +250,7 @@ export declare const darkTheme: {
|
|
|
249
250
|
selectValidatorMultiSelectedBackground: string;
|
|
250
251
|
selectValidatorMultiDefaultBackground: string;
|
|
251
252
|
warningBoxBackground: string;
|
|
253
|
+
errorBoxBackground: string;
|
|
252
254
|
positionsClaimRewardsBackground: string;
|
|
253
255
|
positionsActionRequiredBackground: string;
|
|
254
256
|
positionsPendingBackground: string;
|
|
@@ -22,6 +22,7 @@ declare const baseColorsContract: {
|
|
|
22
22
|
selectValidatorMultiSelectedBackground: string;
|
|
23
23
|
selectValidatorMultiDefaultBackground: string;
|
|
24
24
|
warningBoxBackground: string;
|
|
25
|
+
errorBoxBackground: string;
|
|
25
26
|
positionsClaimRewardsBackground: string;
|
|
26
27
|
positionsActionRequiredBackground: string;
|
|
27
28
|
positionsPendingBackground: string;
|
|
@@ -289,6 +289,7 @@ export declare const localResources: {
|
|
|
289
289
|
network: string;
|
|
290
290
|
provider: string;
|
|
291
291
|
reward_token: string;
|
|
292
|
+
yield_bearing_reward_token: string;
|
|
292
293
|
price_per_share: string;
|
|
293
294
|
type: string;
|
|
294
295
|
reward_schedule: string;
|
|
@@ -1608,6 +1609,7 @@ export declare const localResources: {
|
|
|
1608
1609
|
network: string;
|
|
1609
1610
|
provider: string;
|
|
1610
1611
|
reward_token: string;
|
|
1612
|
+
yield_bearing_reward_token: string;
|
|
1611
1613
|
price_per_share: string;
|
|
1612
1614
|
type: string;
|
|
1613
1615
|
reward_schedule: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as e}from"./chunk-CzyJ72yW.js";import{A as t,C as n,D as r,E as i,O as a,S as o,T as s,_ as c,b as l,h as u,i as d,j as f,k as ee,n as p,o as m,p as te,r as ne,t as h,u as re,x as g,y as _}from"./exports-CHrRDjNC.js";import{i as v,l as y,o as ie,t as b}from"./lit-element-CPGuB_v8.js";import"./lit-CDbVcvTE.js";import{d as ae,f as oe}from"./index-
|
|
1
|
+
import{s as e}from"./chunk-CzyJ72yW.js";import{A as t,C as n,D as r,E as i,O as a,S as o,T as s,_ as c,b as l,h as u,i as d,j as f,k as ee,n as p,o as m,p as te,r as ne,t as h,u as re,x as g,y as _}from"./exports-CHrRDjNC.js";import{i as v,l as y,o as ie,t as b}from"./lit-element-CPGuB_v8.js";import"./lit-CDbVcvTE.js";import{d as ae,f as oe}from"./index-DKvgVcnp.js";import{a as x,o as S,s as C,t as se}from"./class-map-BhcOy3ep.js";import{n as ce,t as le}from"./ref-CQce-LA_.js";import{t as ue}from"./browser-DlS057kQ.js";import"./wui-text-C_lTk8eD.js";var de=y`
|
|
2
2
|
:host {
|
|
3
3
|
position: relative;
|
|
4
4
|
background-color: var(--wui-color-gray-glass-002);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as e}from"./chunk-CzyJ72yW.js";import{i as t,l as n,o as r,t as i}from"./lit-element-CPGuB_v8.js";import"./lit-CVrrzrGA.js";import{a,o,s,t as c}from"./class-map-BhcOy3ep.js";import"./class-map-fHNEycfA.js";import{n as l,t as u}from"./ref-CQce-LA_.js";import"./ref-Cjfeo2-0.js";import{t as ee}from"./browser-
|
|
1
|
+
import{s as e}from"./chunk-CzyJ72yW.js";import{i as t,l as n,o as r,t as i}from"./lit-element-CPGuB_v8.js";import"./lit-CVrrzrGA.js";import{a,o,s,t as c}from"./class-map-BhcOy3ep.js";import"./class-map-fHNEycfA.js";import{n as l,t as u}from"./ref-CQce-LA_.js";import"./ref-Cjfeo2-0.js";import{t as ee}from"./browser-DlS057kQ.js";import{A as d,C as f,E as te,F as ne,O as p,S as m,T as h,_ as re,a as g,b as ie,g as _,i as ae,j as oe,k as v,n as y,p as se,r as b,s as x,u as ce,x as S,y as C}from"./ConstantsUtil-BucnOgVd.js";import"./wui-text-D1LKVPJb.js";import{n as le,t as ue}from"./ConnectorUtil-Dbdhp6gz.js";var de=n`
|
|
2
2
|
:host {
|
|
3
3
|
position: relative;
|
|
4
4
|
background-color: var(--wui-color-gray-glass-002);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./chunk-CzyJ72yW.js";import{i as t}from"./index-
|
|
1
|
+
import{t as e}from"./chunk-CzyJ72yW.js";import{i as t}from"./index-DKvgVcnp.js";var n=e(((e,t)=>{t.exports=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then}})),r=e((e=>{var t,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(e){if(!e)throw Error(`"version" cannot be null or undefined`);if(e<1||e>40)throw Error(`"version" should be in range from 1 to 40`);return e*4+17},e.getSymbolTotalCodewords=function(e){return n[e]},e.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},e.setToSJISFunction=function(e){if(typeof e!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);t=e},e.isKanjiModeEnabled=function(){return t!==void 0},e.toSJIS=function(e){return t(e)}})),i=e((e=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}e.isValid=function(e){return e&&e.bit!==void 0&&e.bit>=0&&e.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})),a=e(((e,t)=>{function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=n})),o=e(((e,t)=>{function n(e){if(!e||e<1)throw Error(`BitMatrix size must be defined and greater than 0`);this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n})),s=e((e=>{var t=r().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}})),c=e((e=>{var t=r().getSymbolSize,n=7;e.getPositions=function(e){let r=t(e);return[[0,0],[r-n,0],[0,r-n]]}})),l=e((e=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let n=e.size,r=0,i=0,a=0,o=null,s=null;for(let c=0;c<n;c++){i=a=0,o=s=null;for(let l=0;l<n;l++){let n=e.get(c,l);n===o?i++:(i>=5&&(r+=t.N1+(i-5)),o=n,i=1),n=e.get(l,c),n===s?a++:(a>=5&&(r+=t.N1+(a-5)),s=n,a=1)}i>=5&&(r+=t.N1+(i-5)),a>=5&&(r+=t.N1+(a-5))}return r},e.getPenaltyN2=function(e){let n=e.size,r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){let n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);(n===4||n===0)&&r++}return r*t.N2},e.getPenaltyN3=function(e){let n=e.size,r=0,i=0,a=0;for(let t=0;t<n;t++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(t,o),o>=10&&(i===1488||i===93)&&r++,a=a<<1&2047|e.get(o,t),o>=10&&(a===1488||a===93)&&r++}return r*t.N3},e.getPenaltyN4=function(e){let n=0,r=e.data.length;for(let t=0;t<r;t++)n+=e.data[t];return Math.abs(Math.ceil(n*100/r/5)-10)*t.N4};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,n(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}})),u=e((e=>{var t=i(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(e,r){switch(r){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},e.getTotalCodewordsCount=function(e,n){switch(n){case t.L:return r[(e-1)*4+0];case t.M:return r[(e-1)*4+1];case t.Q:return r[(e-1)*4+2];case t.H:return r[(e-1)*4+3];default:return}}})),d=e((e=>{var t=new Uint8Array(512),n=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)t[r]=e,n[e]=r,e<<=1,e&256&&(e^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),e.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return n[e]},e.exp=function(e){return t[e]},e.mul=function(e,r){return e===0||r===0?0:t[n[e]+n[r]]}})),f=e((e=>{var t=d();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}})),p=e(((e,t)=>{var n=f();function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error(`Encoder not initialized`);let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},t.exports=r})),m=e((e=>{e.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}})),h=e((e=>{var t=`[0-9]+`,n=`[A-Z $%*+\\-./:]+`,r=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;r=r.replace(/u/g,`\\u`);var i=`(?:(?![A-Z0-9 $%*+\\-./:]|`+r+`)(?:.|[\r
|
|
2
2
|
]))+`;e.KANJI=new RegExp(r,`g`),e.BYTE_KANJI=RegExp(`[^A-Z0-9 $%*+\\-./:]+`,`g`),e.BYTE=new RegExp(i,`g`),e.NUMERIC=new RegExp(t,`g`),e.ALPHANUMERIC=new RegExp(n,`g`);var a=RegExp(`^`+r+`$`),o=RegExp(`^`+t+`$`),s=RegExp(`^[A-Z0-9 $%*+\\-./:]+$`);e.testKanji=function(e){return a.test(e)},e.testNumeric=function(e){return o.test(e)},e.testAlphanumeric=function(e){return s.test(e)}})),g=e((e=>{var t=m(),n=h();e.NUMERIC={id:`Numeric`,bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:`Alphanumeric`,bit:2,ccBits:[9,11,13]},e.BYTE={id:`Byte`,bit:4,ccBits:[8,16,16]},e.KANJI={id:`Kanji`,bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw Error(`Invalid mode: `+e);if(!t.isValid(n))throw Error(`Invalid version: `+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw Error(`Invalid mode`)},e.isValid=function(e){return e&&e.bit&&e.ccBits};function r(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`numeric`:return e.NUMERIC;case`alphanumeric`:return e.ALPHANUMERIC;case`kanji`:return e.KANJI;case`byte`:return e.BYTE;default:throw Error(`Unknown mode: `+t)}}e.from=function(t,n){if(e.isValid(t))return t;try{return r(t)}catch{return n}}})),_=e((e=>{var t=r(),n=u(),a=i(),o=g(),s=m(),c=7973,l=t.getBCHDigit(c);function d(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}function f(e,t){return o.getCharCountIndicator(e,t)+4}function p(e,t){let n=0;return e.forEach(function(e){let r=f(e.mode,t);n+=r+e.getBitsLength()}),n}function h(t,n){for(let r=1;r<=40;r++)if(p(t,r)<=e.getCapacity(r,n,o.MIXED))return r}e.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,i){if(!s.isValid(e))throw Error(`Invalid QR Code version`);i===void 0&&(i=o.BYTE);let a=(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r))*8;if(i===o.MIXED)return a;let c=a-f(i,e);switch(i){case o.NUMERIC:return Math.floor(c/10*3);case o.ALPHANUMERIC:return Math.floor(c/11*2);case o.KANJI:return Math.floor(c/13);case o.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(e,t){let n,r=a.from(t,a.M);if(Array.isArray(e)){if(e.length>1)return h(e,r);if(e.length===0)return 1;n=e[0]}else n=e;return d(n.mode,n.getLength(),r)},e.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw Error(`Invalid QR Code version`);let n=e<<12;for(;t.getBCHDigit(n)-l>=0;)n^=c<<t.getBCHDigit(n)-l;return e<<12|n}})),v=e((e=>{var t=r(),n=1335,i=21522,a=t.getBCHDigit(n);e.getEncodedBits=function(e,r){let o=e.bit<<3|r,s=o<<10;for(;t.getBCHDigit(s)-a>=0;)s^=n<<t.getBCHDigit(s)-a;return(o<<10|s)^i}})),y=e(((e,t)=>{var n=g();function r(e){this.mode=n.NUMERIC,this.data=e.toString()}r.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);let i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,i*3+1))},t.exports=r})),b=e(((e,t)=>{var n=g(),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`.split(``);function i(e){this.mode=n.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=r.indexOf(this.data[t])*45;n+=r.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(r.indexOf(this.data[t]),6)},t.exports=i})),x=e(((e,t)=>{t.exports=function(e){for(var t=[],n=e.length,r=0;r<n;r++){var i=e.charCodeAt(r);if(i>=55296&&i<=56319&&n>r+1){var a=e.charCodeAt(r+1);a>=56320&&a<=57343&&(i=(i-55296)*1024+a-56320+65536,r+=1)}if(i<128){t.push(i);continue}if(i<2048){t.push(i>>6|192),t.push(i&63|128);continue}if(i<55296||i>=57344&&i<65536){t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128);continue}if(i>=65536&&i<=1114111){t.push(i>>18|240),t.push(i>>12&63|128),t.push(i>>6&63|128),t.push(i&63|128);continue}t.push(239,191,189)}return new Uint8Array(t).buffer}})),S=e(((e,t)=>{var n=x(),r=g();function i(e){this.mode=r.BYTE,typeof e==`string`&&(e=n(e)),this.data=new Uint8Array(e)}i.getBitsLength=function(e){return e*8},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},t.exports=i})),C=e(((e,t)=>{var n=g(),i=r();function a(e){this.mode=n.KANJI,this.data=e}a.getBitsLength=function(e){return e*13},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=i.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error(`Invalid SJIS character: `+this.data[t]+`
|
|
3
3
|
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}},t.exports=a})),w=e((e=>{var n=g(),i=y(),a=b(),o=S(),s=C(),c=h(),l=r(),u=t();function d(e){return unescape(encodeURIComponent(e)).length}function f(e,t,n){let r=[],i;for(;(i=e.exec(n))!==null;)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function p(e){let t=f(c.NUMERIC,n.NUMERIC,e),r=f(c.ALPHANUMERIC,n.ALPHANUMERIC,e),i,a;return l.isKanjiModeEnabled()?(i=f(c.BYTE,n.BYTE,e),a=f(c.KANJI,n.KANJI,e)):(i=f(c.BYTE_KANJI,n.BYTE,e),a=[]),t.concat(r,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function m(e,t){switch(t){case n.NUMERIC:return i.getBitsLength(e);case n.ALPHANUMERIC:return a.getBitsLength(e);case n.KANJI:return s.getBitsLength(e);case n.BYTE:return o.getBitsLength(e)}}function _(e){return e.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}function v(e){let t=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.mode){case n.NUMERIC:t.push([i,{data:i.data,mode:n.ALPHANUMERIC,length:i.length},{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.ALPHANUMERIC:t.push([i,{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.KANJI:t.push([i,{data:i.data,mode:n.BYTE,length:d(i.data)}]);break;case n.BYTE:t.push([{data:i.data,mode:n.BYTE,length:d(i.data)}])}}return t}function x(e,t){let r={},i={start:{}},a=[`start`];for(let o=0;o<e.length;o++){let s=e[o],c=[];for(let e=0;e<s.length;e++){let l=s[e],u=``+o+e;c.push(u),r[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){let o=a[e];r[o]&&r[o].node.mode===l.mode?(i[o][u]=m(r[o].lastCount+l.length,l.mode)-m(r[o].lastCount,l.mode),r[o].lastCount+=l.length):(r[o]&&(r[o].lastCount=l.length),i[o][u]=m(l.length,l.mode)+4+n.getCharCountIndicator(l.mode,t))}}a=c}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}function w(e,t){let r,c=n.getBestModeForData(e);if(r=n.from(t,c),r!==n.BYTE&&r.bit<c.bit)throw Error(`"`+e+`" cannot be encoded with mode `+n.toString(r)+`.
|
|
4
4
|
Suggested mode is: `+n.toString(c));switch(r===n.KANJI&&!l.isKanjiModeEnabled()&&(r=n.BYTE),r){case n.NUMERIC:return new i(e);case n.ALPHANUMERIC:return new a(e);case n.KANJI:return new s(e);case n.BYTE:return new o(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return typeof t==`string`?e.push(w(t,null)):t.data&&e.push(w(t.data,t.mode)),e},[])},e.fromString=function(t,n){let r=x(v(p(t,l.isKanjiModeEnabled())),n),i=u.find_path(r.map,`start`,`end`),a=[];for(let e=1;e<i.length-1;e++)a.push(r.table[i[e]].node);return e.fromArray(_(a))},e.rawSplit=function(t){return e.fromArray(p(t,l.isKanjiModeEnabled()))}})),T=e((e=>{var t=r(),n=i(),d=a(),f=o(),m=s(),h=c(),y=l(),b=u(),x=p(),S=_(),C=v(),T=g(),E=w();function D(e,t){let n=e.size,r=h.getPositions(t);for(let t=0;t<r.length;t++){let i=r[t][0],a=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)a+r<=-1||n<=a+r||(t>=0&&t<=6&&(r===0||r===6)||r>=0&&r<=6&&(t===0||t===6)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,a+r,!0,!0):e.set(i+t,a+r,!1,!0))}}function O(e){let t=e.size;for(let n=8;n<t-8;n++){let t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}function k(e,t){let n=m.getPositions(t);for(let t=0;t<n.length;t++){let r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)t===-2||t===2||n===-2||n===2||t===0&&n===0?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}function A(e,t){let n=e.size,r=S.getEncodedBits(t),i,a,o;for(let t=0;t<18;t++)i=Math.floor(t/3),a=t%3+n-8-3,o=(r>>t&1)==1,e.set(i,a,o,!0),e.set(a,i,o,!0)}function j(e,t,n){let r=e.size,i=C.getEncodedBits(t,n),a,o;for(a=0;a<15;a++)o=(i>>a&1)==1,a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function M(e,t){let n=e.size,r=-1,i=n-1,a=7,o=0;for(let s=n-1;s>0;s-=2)for(s===6&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,s-n)){let r=!1;o<t.length&&(r=(t[o]>>>a&1)==1),e.set(i,s-n,r),a--,a===-1&&(o++,a=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}function N(e,n,r){let i=new d;r.forEach(function(t){i.put(t.mode.bit,4),i.put(t.getLength(),T.getCharCountIndicator(t.mode,e)),t.write(i)});let a=(t.getSymbolTotalCodewords(e)-b.getTotalCodewordsCount(e,n))*8;for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);let o=(a-i.getLengthInBits())/8;for(let e=0;e<o;e++)i.put(e%2?17:236,8);return P(i,e,n)}function P(e,n,r){let i=t.getSymbolTotalCodewords(n),a=i-b.getTotalCodewordsCount(n,r),o=b.getBlocksCount(n,r),s=o-i%o,c=Math.floor(i/o),l=Math.floor(a/o),u=l+1,d=c-l,f=new x(d),p=0,m=Array(o),h=Array(o),g=0,_=new Uint8Array(e.buffer);for(let e=0;e<o;e++){let t=e<s?l:u;m[e]=_.slice(p,p+t),h[e]=f.encode(m[e]),p+=t,g=Math.max(g,t)}let v=new Uint8Array(i),y=0,S,C;for(S=0;S<g;S++)for(C=0;C<o;C++)S<m[C].length&&(v[y++]=m[C][S]);for(S=0;S<d;S++)for(C=0;C<o;C++)v[y++]=h[C][S];return v}function F(e,n,r,i){let a;if(Array.isArray(e))a=E.fromArray(e);else if(typeof e==`string`){let t=n;if(!t){let n=E.rawSplit(e);t=S.getBestVersionForData(n,r)}a=E.fromString(e,t||40)}else throw Error(`Invalid data`);let o=S.getBestVersionForData(a,r);if(!o)throw Error(`The amount of data is too big to be stored in a QR Code`);if(!n)n=o;else if(n<o)throw Error(`
|