From bcf8f6a8f065cc685df43e3cd9d21a3ffe77a56a Mon Sep 17 00:00:00 2001 From: Aleix Date: Tue, 9 May 2023 17:55:59 +0200 Subject: [PATCH 1/5] + Organization component SDK upgrade changes. + Signer generation on Client Provider + Added CSP voting to the Election component --- packages/chakra-components/src/client.tsx | 21 +- .../src/components/Election/Election.tsx | 185 +- packages/components/dist/client.d.ts | 53 + .../dist/components/Account/Balance.d.ts | 2 + .../dist/components/Account/index.d.ts | 1 + .../dist/components/Election/Election.d.ts | 72 + .../components/Election/QuestionField.d.ts | 10 + .../components/Election/QuestionsForm.d.ts | 1 + .../dist/components/Election/VoteButton.d.ts | 2 + .../dist/components/Election/index.d.ts | 5 + .../dist/components/Election/parts.d.ts | 13 + .../dist/components/Organization/Avatar.d.ts | 2 + .../components/Organization/Description.d.ts | 3 + .../dist/components/Organization/Header.d.ts | 2 + .../dist/components/Organization/Name.d.ts | 2 + .../components/Organization/Organization.d.ts | 38 + .../dist/components/Organization/index.d.ts | 5 + .../components/dist/components/index.d.ts | 4 + .../components/dist/components/layout/HR.d.ts | 9 + .../dist/components/layout/Image.d.ts | 6 + .../dist/components/layout/Markdown.d.ts | 6 + .../dist/components/layout/index.d.ts | 3 + packages/components/dist/index.d.ts | 3 + packages/components/dist/index.es.js | 10540 ++++++++++++++++ packages/components/dist/index.es.js.map | 1 + packages/components/dist/theme/election.d.ts | 3 + packages/components/dist/theme/index.d.ts | 5 + packages/components/dist/theme/layout.d.ts | 20 + packages/components/dist/theme/questions.d.ts | 32 + 29 files changed, 11035 insertions(+), 14 deletions(-) create mode 100644 packages/components/dist/client.d.ts create mode 100644 packages/components/dist/components/Account/Balance.d.ts create mode 100644 packages/components/dist/components/Account/index.d.ts create mode 100644 packages/components/dist/components/Election/Election.d.ts create mode 100644 packages/components/dist/components/Election/QuestionField.d.ts create mode 100644 packages/components/dist/components/Election/QuestionsForm.d.ts create mode 100644 packages/components/dist/components/Election/VoteButton.d.ts create mode 100644 packages/components/dist/components/Election/index.d.ts create mode 100644 packages/components/dist/components/Election/parts.d.ts create mode 100644 packages/components/dist/components/Organization/Avatar.d.ts create mode 100644 packages/components/dist/components/Organization/Description.d.ts create mode 100644 packages/components/dist/components/Organization/Header.d.ts create mode 100644 packages/components/dist/components/Organization/Name.d.ts create mode 100644 packages/components/dist/components/Organization/Organization.d.ts create mode 100644 packages/components/dist/components/Organization/index.d.ts create mode 100644 packages/components/dist/components/index.d.ts create mode 100644 packages/components/dist/components/layout/HR.d.ts create mode 100644 packages/components/dist/components/layout/Image.d.ts create mode 100644 packages/components/dist/components/layout/Markdown.d.ts create mode 100644 packages/components/dist/components/layout/index.d.ts create mode 100644 packages/components/dist/index.d.ts create mode 100644 packages/components/dist/index.es.js create mode 100644 packages/components/dist/index.es.js.map create mode 100644 packages/components/dist/theme/election.d.ts create mode 100644 packages/components/dist/theme/index.d.ts create mode 100644 packages/components/dist/theme/layout.d.ts create mode 100644 packages/components/dist/theme/questions.d.ts diff --git a/packages/chakra-components/src/client.tsx b/packages/chakra-components/src/client.tsx index 3c580651..6c4f749d 100644 --- a/packages/chakra-components/src/client.tsx +++ b/packages/chakra-components/src/client.tsx @@ -31,7 +31,9 @@ export const useClientProvider = ({ env: e, client: c, signer: s }: ClientProvid const opts: ClientOptions = { env: env as EnvOptions, - } + // TODO: REMOVE THE FOLLOWING csp_url when https://github.com/vocdoni/vocdoni-sdk/issues/163 is ready + csp_url: "http://localhost:5000/v1" + } if (signer) { opts.wallet = signer @@ -147,12 +149,29 @@ export const useClientProvider = ({ env: e, client: c, signer: s }: ClientProvid client.wallet = signer } + const generateSigner = (seed?: string | string[]) => { + if (!client) { + throw new Error('No client initialized') + } + + let signer: Wallet + if (!seed) { + client.generateRandomWallet() + signer = client.wallet as Wallet + } else { + signer = VocdoniSDKClient.generateWalletFromData(seed) + } + + return signer + } + return { account, balance, client, env, signer, + generateSigner, fetchAccount, fetchBalance, setClient, diff --git a/packages/chakra-components/src/components/Election/Election.tsx b/packages/chakra-components/src/components/Election/Election.tsx index dd542050..456d605c 100644 --- a/packages/chakra-components/src/components/Election/Election.tsx +++ b/packages/chakra-components/src/components/Election/Election.tsx @@ -1,7 +1,7 @@ import { ChakraProps } from '@chakra-ui/system' import { Signer } from '@ethersproject/abstract-signer' import { Wallet } from '@ethersproject/wallet' -import { PublishedElection, Vote } from '@vocdoni/sdk' +import { CensusType, CspVote, ElectionStatus, PublishedElection, Vote } from '@vocdoni/sdk' import { ComponentType, PropsWithChildren, createContext, useContext, useEffect, useState } from 'react' import { FieldValues } from 'react-hook-form' import { useClient } from '../../client' @@ -43,6 +43,10 @@ export const useElectionProvider = ({ const [isAbleToVote, setIsAbleToVote] = useState(undefined) const [votesLeft, setVotesLeft] = useState(0) const [isInCensus, setIsInCensus] = useState(false) + const [censusType, setCensusType] = useState(undefined) + const [voteInstance, setVoteInstance] = useState(undefined) + const [authToken, setAuthToken] = useState(null) + const [handler, setHandler] = useState("facebook") // Hardcoded until we let to choose // set signer in case it has been specified in the election // provider (rather than the client provider). Not sure if this is useful tho... @@ -80,9 +84,10 @@ export const useElectionProvider = ({ useEffect(() => { if (!fetchCensus || !signer || !election || !loaded || !client || isAbleToVote !== undefined) return ;(async () => { + const censusType: CensusType = election.census.type const isIn = await client.isInCensus(election.id) let left = 0 - if (isIn) { + if (isIn || censusType == CensusType.WEIGHTED) { // no need to check votes left if member ain't in census left = await client.votesLeftCount(election.id) setVotesLeft(left) @@ -90,11 +95,45 @@ export const useElectionProvider = ({ const voted = await client.hasAlreadyVoted(election.id) setVoted(voted) } + setCensusType(censusType) setIsInCensus(isIn) - setIsAbleToVote(left > 0 && isIn) + setIsAbleToVote((left > 0 && isIn) || censusType == CensusType.CSP) })() }, [fetchCensus, election, loaded, client, isAbleToVote, signer]) + // Listening for the popup window meessage (oauth flows) + useEffect(() => { + ;(async () => { + if(window.opener) return + if(!client) return + if(censusType != CensusType.CSP) return + + window.addEventListener('message', (event) => { + if(event.data.code && event.data.handler){ + getOAuthToken(client, event.data.code, event.data.handler) + } + }) + })() + },[client, censusType]) + + // Posting the message to the main window + useEffect(() => { + (async () => { + if (typeof window == 'undefined') return + if (window.location.href.split('?').length < 2) return + + const code = window.location.href.split('?')[1].split('&').find((param: string) => param.startsWith('code='))?.split('=')[1] + const handler = window.location.href.split('?')[1].split('&').find((param: string) => param.startsWith('handler='))?.split('=')[1] + if(!code || !handler) return + + if(window.opener) { + // If it is, send the code to the parent window and close the popup + window.opener.postMessage({ code, handler }, '*') + window.close() + } + })() + },[]) + // context vote function (the one to be used with the given components) const vote = async (values: FieldValues) => { if (!client) { @@ -114,18 +153,22 @@ export const useElectionProvider = ({ // map questions back to expected Vote[] values const mapped = election.questions.map((q, k) => parseInt(values[k.toString()], 10)) + let vote = new Vote(mapped) + setVoteInstance(vote) + if (typeof beforeSubmit === 'function' && !beforeSubmit(vote)) { + return + } + try { - const vote = new Vote(mapped) - if (typeof beforeSubmit === 'function' && !beforeSubmit(vote)) { - return + let vid; + if (censusType == CensusType.CSP) { + await cspAuthAndVote(vote) + }else if (censusType == CensusType.WEIGHTED) { + vid = await weightedVote(vote) + setVoted(vid) + setVotesLeft(votesLeft - 1) + setIsAbleToVote(isInCensus && votesLeft - 1 > 0) } - - const vid = await client.submitVote(vote) - setVoted(vid) - setVotesLeft(votesLeft - 1) - setIsAbleToVote(isInCensus && votesLeft - 1 > 0) - - return vid } catch (e: any) { if ('reason' in e) { return setError(e.reason as string) @@ -139,6 +182,122 @@ export const useElectionProvider = ({ } } + const weightedVote = async (vote: Vote): Promise => { + if (!vote) { + throw new Error('no vote instance') + } + if( censusType != CensusType.WEIGHTED ){ + throw new Error('not a Weighted election') + } + + return await client.submitVote(vote) + } + + const cspAuthAndVote = async (vote: Vote) => { + if ( !client ) { + throw new Error('no client initialized') + } + if (!election) { + throw new Error('no election initialized') + } + if( censusType != CensusType.CSP ){ + throw new Error('not a CSP election') + } + + let redirectURL = `${window.location.href}` + // Add electionId and handler to the redirectURL if it is not there + if(!redirectURL.includes(`electionId=${election.id}`)){ + redirectURL.includes('?') ? redirectURL += `&electionId=${election.id}` : redirectURL += `?electionId=${election.id}` + } + if(!redirectURL.includes(`handler=${handler}`)){ + redirectURL.includes('?') ? redirectURL += `&handler=${handler}` : redirectURL += `?handler=${handler}` + } + + let step0: any; + try { + step0 = await client.cspStep(0, [handler, redirectURL]) + } catch (e: any) { + if ('reason' in e) { + return setError(e.reason as string) + } + } + + setAuthToken(step0.authToken) + openLoginPopup(handler, step0['response'][0]) + } + + // Opens a popup window to the service login page + const openLoginPopup = (handler: string, url: string) => { + const width = 600 + const height = 600 + const left = (window.outerWidth / 2) - (width / 2) + const top = (window.outerHeight / 2) - (height / 2) + const params = [ + `width=${width}`, + `height=${height}`, + `top=${top}`, + `left=${left}`, + `status=no`, + `resizable=yes`, + `scrollbars=yes`, + ].join(',') + + window.open(url, handler, params) + } + + const getOAuthToken = async (vocdoniClient: any, code: string, handler: string) => { + if (!code) { + throw new Error('no code provided') + } + if (!handler) { + throw new Error('no handler provided') + } + + // Extract the electionId query param from the redirectURL + const electionId = window.location.href.split('?')[1].split('&').find((param: string) => param.startsWith('electionId='))?.split('=')[1] + let redirectURL = `${window.location.href.split('?')[0]}?electionId=${electionId}&handler=${handler}` + + let step1; + try { + step1 = await vocdoniClient.cspStep(1, [handler, code, redirectURL], authToken) + cspVote(step1.token); + } catch(e) { + setError("Not authorized to vote") + return false; + } + } + + const cspVote = async (token: string) => { + if (!client) { + throw new Error('no client initialized') + } + + if(!voteInstance){ + throw new Error('no vote instance') + } + + if(!token){ + throw new Error('no token provided') + } + + if( censusType != CensusType.CSP ){ + throw new Error('not a CSP election') + } + + try { + const walletAddress: string = await client.wallet?.getAddress() as string + const signature: string = await client.cspSign(walletAddress, token) + const cspVote: CspVote = client.cspVote(voteInstance as Vote, signature) + const vid: string = await client.submitVote(cspVote) + setVoted(vid) + setVotesLeft(votesLeft - 1) + return vid + } catch(e) { + setError("Error submitting vote") + return false; + } + } + return { ...rest, election, diff --git a/packages/components/dist/client.d.ts b/packages/components/dist/client.d.ts new file mode 100644 index 00000000..84d380b6 --- /dev/null +++ b/packages/components/dist/client.d.ts @@ -0,0 +1,53 @@ +import { Signer } from '@ethersproject/abstract-signer'; +import { Wallet } from '@ethersproject/wallet'; +import { AccountData, ClientOptions, EnvOptions, VocdoniSDKClient } from '@vocdoni/sdk'; +import { ReactNode } from 'react'; +export interface ClientSettings extends ClientOptions { +} +type ClientProviderProps = { + env?: Lowercase; + client?: VocdoniSDKClient; + signer?: Wallet | Signer; +}; +export declare const useClientProvider: ({ env: e, client: c, signer: s }: ClientProviderProps) => { + account: AccountData | undefined; + balance: number; + client: VocdoniSDKClient; + env: string; + signer: Wallet | Signer; + generateSigner: (seed?: string | string[]) => Wallet; + fetchAccount: () => Promise; + fetchBalance: () => Promise; + setClient: import("react").Dispatch>; + setSigner: (signer: Wallet | Signer) => void; +}; +export type ClientState = ReturnType; +export declare const ClientContext: import("react").Context<{ + account: AccountData | undefined; + balance: number; + client: VocdoniSDKClient; + env: string; + signer: Wallet | Signer; + generateSigner: (seed?: string | string[]) => Wallet; + fetchAccount: () => Promise; + fetchBalance: () => Promise; + setClient: import("react").Dispatch>; + setSigner: (signer: Wallet | Signer) => void; +} | undefined>; +export declare const useClientContext: () => { + client: T; + account: AccountData | undefined; + balance: number; + env: string; + signer: Wallet | Signer; + generateSigner: (seed?: string | string[]) => Wallet; + fetchAccount: () => Promise; + fetchBalance: () => Promise; + setClient: import("react").Dispatch>; + setSigner: (signer: Wallet | Signer) => void; +}; +type ClientProviderComponentProps = ClientProviderProps & { + children?: ReactNode; +}; +export declare const ClientProvider: ({ env, client, signer, ...rest }: ClientProviderComponentProps) => JSX.Element; +export {}; diff --git a/packages/components/dist/components/Account/Balance.d.ts b/packages/components/dist/components/Account/Balance.d.ts new file mode 100644 index 00000000..5a312478 --- /dev/null +++ b/packages/components/dist/components/Account/Balance.d.ts @@ -0,0 +1,2 @@ +import { TagProps } from '@chakra-ui/tag'; +export declare const Balance: (props: TagProps) => JSX.Element | null; diff --git a/packages/components/dist/components/Account/index.d.ts b/packages/components/dist/components/Account/index.d.ts new file mode 100644 index 00000000..de9bb089 --- /dev/null +++ b/packages/components/dist/components/Account/index.d.ts @@ -0,0 +1 @@ +export * from './Balance'; diff --git a/packages/components/dist/components/Election/Election.d.ts b/packages/components/dist/components/Election/Election.d.ts new file mode 100644 index 00000000..b917db6e --- /dev/null +++ b/packages/components/dist/components/Election/Election.d.ts @@ -0,0 +1,72 @@ +import { ChakraProps } from '@chakra-ui/system'; +import { Signer } from '@ethersproject/abstract-signer'; +import { Wallet } from '@ethersproject/wallet'; +import { ElectionStatus, PublishedElection } from '@vocdoni/sdk'; +import { ComponentType, PropsWithChildren } from 'react'; +import { FieldValues } from 'react-hook-form'; +export type ElectionProviderProps = { + id?: string; + election?: PublishedElection; + signer?: Wallet | Signer; + ConnectButton?: ComponentType; + fetchCensus?: boolean; + texts?: ElectionTextsType; +}; +export type ElectionTextsType = Record & { + required?: string; + empty?: string; + vote?: string; + voted?: string; +}; +export declare const useElectionProvider: ({ id, election: data, signer: s, fetchCensus, texts, ...rest }: ElectionProviderProps) => { + election: PublishedElection | undefined; + error: string; + isAbleToVote: boolean | undefined; + isInCensus: boolean; + loading: boolean; + signer: Wallet | Signer; + trans: (key: keyof ElectionTextsType, def: string) => string | undefined; + vote: (values: FieldValues) => Promise; + voted: string | null; + votesLeft: number; + voting: boolean; + ConnectButton?: ComponentType | undefined; +}; +export type ElectionState = ReturnType; +export declare const ElectionContext: import("react").Context<{ + election: PublishedElection | undefined; + error: string; + isAbleToVote: boolean | undefined; + isInCensus: boolean; + loading: boolean; + signer: Wallet | Signer; + trans: (key: keyof ElectionTextsType, def: string) => string | undefined; + vote: (values: FieldValues) => Promise; + voted: string | null; + votesLeft: number; + voting: boolean; + ConnectButton?: ComponentType | undefined; +} | undefined>; +export declare const useElection: () => { + election: PublishedElection | undefined; + error: string; + isAbleToVote: boolean | undefined; + isInCensus: boolean; + loading: boolean; + signer: Wallet | Signer; + trans: (key: keyof ElectionTextsType, def: string) => string | undefined; + vote: (values: FieldValues) => Promise; + voted: string | null; + votesLeft: number; + voting: boolean; + ConnectButton?: ComponentType | undefined; +}; +export type ElectionProviderComponentProps = ElectionProviderProps & ChakraProps; +export declare const ElectionProvider: { + ({ children, ...rest }: PropsWithChildren): JSX.Element; + displayName: string; +}; +export declare const Election: { + (props: ElectionProviderComponentProps): JSX.Element; + displayName: string; +}; diff --git a/packages/components/dist/components/Election/QuestionField.d.ts b/packages/components/dist/components/Election/QuestionField.d.ts new file mode 100644 index 00000000..b19b654f --- /dev/null +++ b/packages/components/dist/components/Election/QuestionField.d.ts @@ -0,0 +1,10 @@ +import { ChakraProps } from '@chakra-ui/system'; +import { IQuestion } from '@vocdoni/sdk'; +type QuestionFieldProps = ChakraProps & { + question: IQuestion; +}; +export declare const QuestionField: { + ({ question, ...rest }: QuestionFieldProps): JSX.Element; + displayName: string; +}; +export {}; diff --git a/packages/components/dist/components/Election/QuestionsForm.d.ts b/packages/components/dist/components/Election/QuestionsForm.d.ts new file mode 100644 index 00000000..90d2b6b6 --- /dev/null +++ b/packages/components/dist/components/Election/QuestionsForm.d.ts @@ -0,0 +1 @@ +export declare const QuestionsForm: () => JSX.Element; diff --git a/packages/components/dist/components/Election/VoteButton.d.ts b/packages/components/dist/components/Election/VoteButton.d.ts new file mode 100644 index 00000000..220ea78a --- /dev/null +++ b/packages/components/dist/components/Election/VoteButton.d.ts @@ -0,0 +1,2 @@ +import { ButtonProps } from '@chakra-ui/button'; +export declare const VoteButton: (props: ButtonProps) => JSX.Element | null; diff --git a/packages/components/dist/components/Election/index.d.ts b/packages/components/dist/components/Election/index.d.ts new file mode 100644 index 00000000..5813f769 --- /dev/null +++ b/packages/components/dist/components/Election/index.d.ts @@ -0,0 +1,5 @@ +export * from './Election'; +export * from './parts'; +export * from './QuestionField'; +export * from './QuestionsForm'; +export * from './VoteButton'; diff --git a/packages/components/dist/components/Election/parts.d.ts b/packages/components/dist/components/Election/parts.d.ts new file mode 100644 index 00000000..daaf9ee4 --- /dev/null +++ b/packages/components/dist/components/Election/parts.d.ts @@ -0,0 +1,13 @@ +import { HeadingProps } from '@chakra-ui/layout'; +import { ChakraProps } from '@chakra-ui/system'; +import { TagProps } from '@chakra-ui/tag'; +import { ReactMarkdownProps } from 'react-markdown/lib/complex-types'; +import { IPFSImageProps } from '../layout'; +export declare const ElectionTitle: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"h1", HeadingProps>; +export declare const ElectionHeader: (props: IPFSImageProps) => JSX.Element | null; +export declare const ElectionDescription: (props: Omit & ChakraProps) => JSX.Element | null; +export type ElectionScheduleProps = HeadingProps & { + format?: string; +}; +export declare const ElectionSchedule: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"h2", ElectionScheduleProps>; +export declare const ElectionStatusBadge: (props: TagProps) => JSX.Element | null; diff --git a/packages/components/dist/components/Organization/Avatar.d.ts b/packages/components/dist/components/Organization/Avatar.d.ts new file mode 100644 index 00000000..451a7994 --- /dev/null +++ b/packages/components/dist/components/Organization/Avatar.d.ts @@ -0,0 +1,2 @@ +import { IPFSImageProps } from '../layout'; +export declare const OrganizationAvatar: (props: IPFSImageProps) => JSX.Element | null; diff --git a/packages/components/dist/components/Organization/Description.d.ts b/packages/components/dist/components/Organization/Description.d.ts new file mode 100644 index 00000000..710251b5 --- /dev/null +++ b/packages/components/dist/components/Organization/Description.d.ts @@ -0,0 +1,3 @@ +import { ChakraProps } from '@chakra-ui/system'; +import { ReactMarkdownProps } from 'react-markdown/lib/complex-types'; +export declare const OrganizationDescription: (props: Omit & ChakraProps) => JSX.Element | null; diff --git a/packages/components/dist/components/Organization/Header.d.ts b/packages/components/dist/components/Organization/Header.d.ts new file mode 100644 index 00000000..9ca435f9 --- /dev/null +++ b/packages/components/dist/components/Organization/Header.d.ts @@ -0,0 +1,2 @@ +import { IPFSImageProps } from '../layout'; +export declare const OrganizationHeader: (props: IPFSImageProps) => JSX.Element | null; diff --git a/packages/components/dist/components/Organization/Name.d.ts b/packages/components/dist/components/Organization/Name.d.ts new file mode 100644 index 00000000..30fbdbbf --- /dev/null +++ b/packages/components/dist/components/Organization/Name.d.ts @@ -0,0 +1,2 @@ +import { HeadingProps } from '@chakra-ui/layout'; +export declare const OrganizationName: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"h1", HeadingProps>; diff --git a/packages/components/dist/components/Organization/Organization.d.ts b/packages/components/dist/components/Organization/Organization.d.ts new file mode 100644 index 00000000..229927f0 --- /dev/null +++ b/packages/components/dist/components/Organization/Organization.d.ts @@ -0,0 +1,38 @@ +import { ChakraProps } from '@chakra-ui/system'; +import { Account, AccountData } from '@vocdoni/sdk'; +import { PropsWithChildren } from 'react'; +export type OrganizationProviderProps = { + id?: string; + organization?: AccountData; +}; +export declare const useOrganizationProvider: ({ id, organization: data, ...rest }: OrganizationProviderProps) => { + organization: AccountData | undefined; + error: string; + loading: boolean; + loaded: boolean; + update: (account: Account, faucetPackage?: string) => Promise; +}; +export type OrganizationState = ReturnType; +export declare const OrganizationContext: import("react").Context<{ + organization: AccountData | undefined; + error: string; + loading: boolean; + loaded: boolean; + update: (account: Account, faucetPackage?: string) => Promise; +} | undefined>; +export declare const useOrganization: () => { + organization: AccountData | undefined; + error: string; + loading: boolean; + loaded: boolean; + update: (account: Account, faucetPackage?: string) => Promise; +}; +export type OrganizationProviderComponentProps = OrganizationProviderProps & ChakraProps; +export declare const OrganizationProvider: { + ({ children, ...rest }: PropsWithChildren): JSX.Element; + displayName: string; +}; +export declare const Organization: { + (props: OrganizationProviderComponentProps): JSX.Element; + displayName: string; +}; diff --git a/packages/components/dist/components/Organization/index.d.ts b/packages/components/dist/components/Organization/index.d.ts new file mode 100644 index 00000000..49806952 --- /dev/null +++ b/packages/components/dist/components/Organization/index.d.ts @@ -0,0 +1,5 @@ +export * from './Avatar'; +export * from './Description'; +export * from './Header'; +export * from './Name'; +export * from './Organization'; diff --git a/packages/components/dist/components/index.d.ts b/packages/components/dist/components/index.d.ts new file mode 100644 index 00000000..0d947783 --- /dev/null +++ b/packages/components/dist/components/index.d.ts @@ -0,0 +1,4 @@ +export * from './Account'; +export * from './Election'; +export * from './layout'; +export * from './Organization'; diff --git a/packages/components/dist/components/layout/HR.d.ts b/packages/components/dist/components/layout/HR.d.ts new file mode 100644 index 00000000..0d4e3dbd --- /dev/null +++ b/packages/components/dist/components/layout/HR.d.ts @@ -0,0 +1,9 @@ +import { ChakraProps } from '@chakra-ui/system'; +type HRProps = ChakraProps & { + variant?: string; +}; +export declare const HR: { + (props: HRProps): JSX.Element; + displayName: string; +}; +export {}; diff --git a/packages/components/dist/components/layout/Image.d.ts b/packages/components/dist/components/layout/Image.d.ts new file mode 100644 index 00000000..028f117b --- /dev/null +++ b/packages/components/dist/components/layout/Image.d.ts @@ -0,0 +1,6 @@ +import { ImageProps } from '@chakra-ui/image'; +export type IPFSImageProps = ImageProps & { + gateway?: string; +}; +export declare const linkify: (link: string | undefined, gateway: string) => string | undefined; +export declare const Image: ({ src, ...props }: IPFSImageProps) => JSX.Element | null; diff --git a/packages/components/dist/components/layout/Markdown.d.ts b/packages/components/dist/components/layout/Markdown.d.ts new file mode 100644 index 00000000..02b628fa --- /dev/null +++ b/packages/components/dist/components/layout/Markdown.d.ts @@ -0,0 +1,6 @@ +import { Options } from 'react-markdown'; +type MarkdownProps = Options & { + children?: string; +}; +export declare const Markdown: import("@chakra-ui/system/dist/system.types").ChakraComponent<({ children, ...rest }: MarkdownProps) => JSX.Element | null, {}>; +export {}; diff --git a/packages/components/dist/components/layout/index.d.ts b/packages/components/dist/components/layout/index.d.ts new file mode 100644 index 00000000..6fb15179 --- /dev/null +++ b/packages/components/dist/components/layout/index.d.ts @@ -0,0 +1,3 @@ +export * from './HR'; +export * from './Image'; +export * from './Markdown'; diff --git a/packages/components/dist/index.d.ts b/packages/components/dist/index.d.ts new file mode 100644 index 00000000..9321649e --- /dev/null +++ b/packages/components/dist/index.d.ts @@ -0,0 +1,3 @@ +export * from './client'; +export * from './components'; +export * from './theme'; diff --git a/packages/components/dist/index.es.js b/packages/components/dist/index.es.js new file mode 100644 index 00000000..635b13e9 --- /dev/null +++ b/packages/components/dist/index.es.js @@ -0,0 +1,10540 @@ +import Be, { createContext as da, useState as ge, useEffect as Ke, useContext as ua, useLayoutEffect as Zl, useRef as ns, useCallback as Ze, Children as ec, isValidElement as as, useMemo as pt, cloneElement as os, Fragment as rc, useId as bo } from "react"; +import { VocdoniSDKClient as Yo, ElectionStatus as on, CensusType as rt, Vote as qo, Account as Go } from "@vocdoni/sdk"; +import { forwardRef as ve, useStyleConfig as ir, chakra as ne, useMultiStyleConfig as Mr, omitThemingProps as sr, keyframes as tc, layoutPropNames as nc, defineStyleConfig as ac, createMultiStyleConfigHelpers as oc } from "@chakra-ui/system"; +import ic from "react-markdown"; +import sc from "remark-gfm"; +var Rn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ja = {}, lc = { + get exports() { + return Ja; + }, + set exports(e) { + Ja = e; + } +}, Pn = {}; +/** + * @license React + * react-jsx-dev-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +var Xo; +function cc() { + if (Xo) + return Pn; + Xo = 1; + var e = Symbol.for("react.fragment"); + return Pn.Fragment = e, Pn.jsxDEV = void 0, Pn; +} +var Fn = {}; +/** + * @license React + * react-jsx-dev-runtime.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +var Qo; +function dc() { + return Qo || (Qo = 1, process.env.NODE_ENV !== "production" && function() { + var e = Be, r = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), u = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), R = Symbol.iterator, Y = "@@iterator"; + function L(c) { + if (c === null || typeof c != "object") + return null; + var T = R && c[R] || c[Y]; + return typeof T == "function" ? T : null; + } + var O = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + function w(c) { + { + for (var T = arguments.length, P = new Array(T > 1 ? T - 1 : 0), l = 1; l < T; l++) + P[l - 1] = arguments[l]; + q("error", c, P); + } + } + function q(c, T, P) { + { + var l = O.ReactDebugCurrentFrame, y = l.getStackAddendum(); + y !== "" && (T += "%s", P = P.concat([y])); + var k = P.map(function($) { + return String($); + }); + k.unshift("Warning: " + T), Function.prototype.apply.call(console[c], console, k); + } + } + var ie = !1, M = !1, Q = !1, K = !1, re = !1, fe; + fe = Symbol.for("react.module.reference"); + function Ee(c) { + return !!(typeof c == "string" || typeof c == "function" || c === n || c === o || re || c === a || c === v || c === S || K || c === C || ie || M || Q || typeof c == "object" && c !== null && (c.$$typeof === _ || c.$$typeof === b || c.$$typeof === i || c.$$typeof === u || c.$$typeof === h || // This needs to include all possible module reference object + // types supported by any Flight configuration anywhere since + // we don't know which Flight build this will end up being used + // with. + c.$$typeof === fe || c.getModuleId !== void 0)); + } + function me(c, T, P) { + var l = c.displayName; + if (l) + return l; + var y = T.displayName || T.name || ""; + return y !== "" ? P + "(" + y + ")" : P; + } + function J(c) { + return c.displayName || "Context"; + } + function I(c) { + if (c == null) + return null; + if (typeof c.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof c == "function") + return c.displayName || c.name || null; + if (typeof c == "string") + return c; + switch (c) { + case n: + return "Fragment"; + case t: + return "Portal"; + case o: + return "Profiler"; + case a: + return "StrictMode"; + case v: + return "Suspense"; + case S: + return "SuspenseList"; + } + if (typeof c == "object") + switch (c.$$typeof) { + case u: + var T = c; + return J(T) + ".Consumer"; + case i: + var P = c; + return J(P._context) + ".Provider"; + case h: + return me(c, c.render, "ForwardRef"); + case b: + var l = c.displayName || null; + return l !== null ? l : I(c.type) || "Memo"; + case _: { + var y = c, k = y._payload, $ = y._init; + try { + return I($(k)); + } catch { + return null; + } + } + } + return null; + } + var Z = Object.assign, ee = 0, se, ye, Ye, Ve, Me, er, rr; + function le() { + } + le.__reactDisabledLog = !0; + function ur() { + { + if (ee === 0) { + se = console.log, ye = console.info, Ye = console.warn, Ve = console.error, Me = console.group, er = console.groupCollapsed, rr = console.groupEnd; + var c = { + configurable: !0, + enumerable: !0, + value: le, + writable: !0 + }; + Object.defineProperties(console, { + info: c, + log: c, + warn: c, + error: c, + group: c, + groupCollapsed: c, + groupEnd: c + }); + } + ee++; + } + } + function br() { + { + if (ee--, ee === 0) { + var c = { + configurable: !0, + enumerable: !0, + writable: !0 + }; + Object.defineProperties(console, { + log: Z({}, c, { + value: se + }), + info: Z({}, c, { + value: ye + }), + warn: Z({}, c, { + value: Ye + }), + error: Z({}, c, { + value: Ve + }), + group: Z({}, c, { + value: Me + }), + groupCollapsed: Z({}, c, { + value: er + }), + groupEnd: Z({}, c, { + value: rr + }) + }); + } + ee < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + } + } + var j = O.ReactCurrentDispatcher, ce; + function ae(c, T, P) { + { + if (ce === void 0) + try { + throw Error(); + } catch (y) { + var l = y.stack.trim().match(/\n( *(at )?)/); + ce = l && l[1] || ""; + } + return ` +` + ce + c; + } + } + var be = !1, Pe; + { + var te = typeof WeakMap == "function" ? WeakMap : Map; + Pe = new te(); + } + function $e(c, T) { + if (!c || be) + return ""; + { + var P = Pe.get(c); + if (P !== void 0) + return P; + } + var l; + be = !0; + var y = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var k; + k = j.current, j.current = null, ur(); + try { + if (T) { + var $ = function() { + throw Error(); + }; + if (Object.defineProperty($.prototype, "props", { + set: function() { + throw Error(); + } + }), typeof Reflect == "object" && Reflect.construct) { + try { + Reflect.construct($, []); + } catch (ze) { + l = ze; + } + Reflect.construct(c, [], $); + } else { + try { + $.call(); + } catch (ze) { + l = ze; + } + c.call($.prototype); + } + } else { + try { + throw Error(); + } catch (ze) { + l = ze; + } + c(); + } + } catch (ze) { + if (ze && l && typeof ze.stack == "string") { + for (var D = ze.stack.split(` +`), X = l.stack.split(` +`), H = D.length - 1, V = X.length - 1; H >= 1 && V >= 0 && D[H] !== X[V]; ) + V--; + for (; H >= 1 && V >= 0; H--, V--) + if (D[H] !== X[V]) { + if (H !== 1 || V !== 1) + do + if (H--, V--, V < 0 || D[H] !== X[V]) { + var _e = ` +` + D[H].replace(" at new ", " at "); + return c.displayName && _e.includes("") && (_e = _e.replace("", c.displayName)), typeof c == "function" && Pe.set(c, _e), _e; + } + while (H >= 1 && V >= 0); + break; + } + } + } finally { + be = !1, j.current = k, br(), Error.prepareStackTrace = y; + } + var we = c ? c.displayName || c.name : "", Ne = we ? ae(we) : ""; + return typeof c == "function" && Pe.set(c, Ne), Ne; + } + function pr(c, T, P) { + return $e(c, !1); + } + function kt(c) { + var T = c.prototype; + return !!(T && T.isReactComponent); + } + function yr(c, T, P) { + if (c == null) + return ""; + if (typeof c == "function") + return $e(c, kt(c)); + if (typeof c == "string") + return ae(c); + switch (c) { + case v: + return ae("Suspense"); + case S: + return ae("SuspenseList"); + } + if (typeof c == "object") + switch (c.$$typeof) { + case h: + return pr(c.render); + case b: + return yr(c.type, T, P); + case _: { + var l = c, y = l._payload, k = l._init; + try { + return yr(k(y), T, P); + } catch { + } + } + } + return ""; + } + var d = Object.prototype.hasOwnProperty, p = {}, x = O.ReactDebugCurrentFrame; + function A(c) { + if (c) { + var T = c._owner, P = yr(c.type, c._source, T ? T.type : null); + x.setExtraStackFrame(P); + } else + x.setExtraStackFrame(null); + } + function F(c, T, P, l, y) { + { + var k = Function.call.bind(d); + for (var $ in c) + if (k(c, $)) { + var D = void 0; + try { + if (typeof c[$] != "function") { + var X = Error((l || "React class") + ": " + P + " type `" + $ + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof c[$] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); + throw X.name = "Invariant Violation", X; + } + D = c[$](T, $, l, P, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); + } catch (H) { + D = H; + } + D && !(D instanceof Error) && (A(y), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", l || "React class", P, $, typeof D), A(null)), D instanceof Error && !(D.message in p) && (p[D.message] = !0, A(y), w("Failed %s type: %s", P, D.message), A(null)); + } + } + } + var E = Array.isArray; + function W(c) { + return E(c); + } + function de(c) { + { + var T = typeof Symbol == "function" && Symbol.toStringTag, P = T && c[Symbol.toStringTag] || c.constructor.name || "Object"; + return P; + } + } + function Te(c) { + try { + return tr(c), !1; + } catch { + return !0; + } + } + function tr(c) { + return "" + c; + } + function jr(c) { + if (Te(c)) + return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", de(c)), tr(c); + } + var Ge = O.ReactCurrentOwner, Sr = { + key: !0, + ref: !0, + __self: !0, + __source: !0 + }, Fr, Tr, xr; + xr = {}; + function Vr(c) { + if (d.call(c, "ref")) { + var T = Object.getOwnPropertyDescriptor(c, "ref").get; + if (T && T.isReactWarning) + return !1; + } + return c.ref !== void 0; + } + function Ct(c) { + if (d.call(c, "key")) { + var T = Object.getOwnPropertyDescriptor(c, "key").get; + if (T && T.isReactWarning) + return !1; + } + return c.key !== void 0; + } + function Lt(c, T) { + if (typeof c.ref == "string" && Ge.current && T && Ge.current.stateNode !== T) { + var P = I(Ge.current.type); + xr[P] || (w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', I(Ge.current.type), c.ref), xr[P] = !0); + } + } + function jt(c, T) { + { + var P = function() { + Fr || (Fr = !0, w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T)); + }; + P.isReactWarning = !0, Object.defineProperty(c, "key", { + get: P, + configurable: !0 + }); + } + } + function Er(c, T) { + { + var P = function() { + Tr || (Tr = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T)); + }; + P.isReactWarning = !0, Object.defineProperty(c, "ref", { + get: P, + configurable: !0 + }); + } + } + var et = function(c, T, P, l, y, k, $) { + var D = { + // This tag allows us to uniquely identify this as a React Element + $$typeof: r, + // Built-in properties that belong on the element + type: c, + key: T, + ref: P, + props: $, + // Record the component responsible for creating this element. + _owner: k + }; + return D._store = {}, Object.defineProperty(D._store, "validated", { + configurable: !1, + enumerable: !1, + writable: !0, + value: !1 + }), Object.defineProperty(D, "_self", { + configurable: !1, + enumerable: !1, + writable: !1, + value: l + }), Object.defineProperty(D, "_source", { + configurable: !1, + enumerable: !1, + writable: !1, + value: y + }), Object.freeze && (Object.freeze(D.props), Object.freeze(D)), D; + }; + function Vt(c, T, P, l, y) { + { + var k, $ = {}, D = null, X = null; + P !== void 0 && (jr(P), D = "" + P), Ct(T) && (jr(T.key), D = "" + T.key), Vr(T) && (X = T.ref, Lt(T, y)); + for (k in T) + d.call(T, k) && !Sr.hasOwnProperty(k) && ($[k] = T[k]); + if (c && c.defaultProps) { + var H = c.defaultProps; + for (k in H) + $[k] === void 0 && ($[k] = H[k]); + } + if (D || X) { + var V = typeof c == "function" ? c.displayName || c.name || "Unknown" : c; + D && jt($, V), X && Er($, V); + } + return et(c, D, X, y, l, Ge.current, $); + } + } + var Ar = O.ReactCurrentOwner, ct = O.ReactDebugCurrentFrame; + function Je(c) { + if (c) { + var T = c._owner, P = yr(c.type, c._source, T ? T.type : null); + ct.setExtraStackFrame(P); + } else + ct.setExtraStackFrame(null); + } + var fr; + fr = !1; + function Ur(c) { + return typeof c == "object" && c !== null && c.$$typeof === r; + } + function mr() { + { + if (Ar.current) { + var c = I(Ar.current.type); + if (c) + return ` + +Check the render method of \`` + c + "`."; + } + return ""; + } + } + function Ut(c) { + { + if (c !== void 0) { + var T = c.fileName.replace(/^.*[\\\/]/, ""), P = c.lineNumber; + return ` + +Check your code at ` + T + ":" + P + "."; + } + return ""; + } + } + var dt = {}; + function Ht(c) { + { + var T = mr(); + if (!T) { + var P = typeof c == "string" ? c : c.displayName || c.name; + P && (T = ` + +Check the top-level render call using <` + P + ">."); + } + return T; + } + } + function ut(c, T) { + { + if (!c._store || c._store.validated || c.key != null) + return; + c._store.validated = !0; + var P = Ht(T); + if (dt[P]) + return; + dt[P] = !0; + var l = ""; + c && c._owner && c._owner !== Ar.current && (l = " It was passed a child from " + I(c._owner.type) + "."), Je(c), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', P, l), Je(null); + } + } + function ft(c, T) { + { + if (typeof c != "object") + return; + if (W(c)) + for (var P = 0; P < c.length; P++) { + var l = c[P]; + Ur(l) && ut(l, T); + } + else if (Ur(c)) + c._store && (c._store.validated = !0); + else if (c) { + var y = L(c); + if (typeof y == "function" && y !== c.entries) + for (var k = y.call(c), $; !($ = k.next()).done; ) + Ur($.value) && ut($.value, T); + } + } + } + function hr(c) { + { + var T = c.type; + if (T == null || typeof T == "string") + return; + var P; + if (typeof T == "function") + P = T.propTypes; + else if (typeof T == "object" && (T.$$typeof === h || // Note: Memo only checks outer props here. + // Inner props are checked in the reconciler. + T.$$typeof === b)) + P = T.propTypes; + else + return; + if (P) { + var l = I(T); + F(P, c.props, "prop", l, c); + } else if (T.PropTypes !== void 0 && !fr) { + fr = !0; + var y = I(T); + w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", y || "Unknown"); + } + typeof T.getDefaultProps == "function" && !T.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); + } + } + function Yt(c) { + { + for (var T = Object.keys(c.props), P = 0; P < T.length; P++) { + var l = T[P]; + if (l !== "children" && l !== "key") { + Je(c), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", l), Je(null); + break; + } + } + c.ref !== null && (Je(c), w("Invalid attribute `ref` supplied to `React.Fragment`."), Je(null)); + } + } + function Tt(c, T, P, l, y, k) { + { + var $ = Ee(c); + if (!$) { + var D = ""; + (c === void 0 || typeof c == "object" && c !== null && Object.keys(c).length === 0) && (D += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."); + var X = Ut(y); + X ? D += X : D += mr(); + var H; + c === null ? H = "null" : W(c) ? H = "array" : c !== void 0 && c.$$typeof === r ? (H = "<" + (I(c.type) || "Unknown") + " />", D = " Did you accidentally export a JSX literal instead of a component?") : H = typeof c, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", H, D); + } + var V = Vt(c, T, P, y, k); + if (V == null) + return V; + if ($) { + var _e = T.children; + if (_e !== void 0) + if (l) + if (W(_e)) { + for (var we = 0; we < _e.length; we++) + ft(_e[we], c); + Object.freeze && Object.freeze(_e); + } else + w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); + else + ft(_e, c); + } + return c === n ? Yt(V) : hr(V), V; + } + } + var qt = Tt; + Fn.Fragment = n, Fn.jsxDEV = qt; + }()), Fn; +} +(function(e) { + process.env.NODE_ENV === "production" ? e.exports = cc() : e.exports = dc(); +})(lc); +const U = Ja.jsxDEV, uc = ({ env: e, client: r, signer: t }) => { + const [n, a] = ge(r), [o, i] = ge(t), [u, h] = ge(e), [v, S] = ge(), [b, _] = ge(-1); + Ke(() => { + if (n) + return; + if ((!u || u && !u.length) && !n) + throw new Error("You must provide a valid env or client to the ClientProvider"); + const O = { + env: u, + // TODO: REMOVE THE FOLLOWING csp_url when https://github.com/vocdoni/vocdoni-sdk/issues/163 is ready + csp_url: "http://localhost:5000/v1" + }; + o && (O.wallet = o), a(new Yo(O)); + }, [u, r]), Ke(() => { + e && h(e); + }, [e]), Ke(() => { + t && Y(t); + }, [t]), Ke(() => { + !n || v || !o || (async () => await C())(); + }, [n, v, o]), Ke(() => { + !n || !v || !o || (async () => await R())(); + }, [n, v, o]), Ke(() => { + if (!("ethereum" in window)) + return; + const O = async (w) => { + S(void 0); + }; + return window.ethereum.on("accountsChanged", O), () => { + window.ethereum.removeListener("accountsChanged", O); + }; + }, []); + const C = async () => { + let O; + try { + return O = await n.createAccount(), S(O), O; + } catch (w) { + console.error("could not fetch account:", w); + } + }, R = async () => { + try { + if (!v) + throw new Error("Account not available"); + if (v.balance <= 10 && u !== "prod") { + await n.collectFaucetTokens(); + const O = await n.fetchAccountInfo(); + _(O.balance); + return; + } + _(v.balance); + } catch (O) { + console.error("could not fetch balance:", O); + } + }, Y = (O) => { + if (!n) + throw new Error("No client initialized"); + i(O), n.wallet = O; + }; + return { + account: v, + balance: b, + client: n, + env: u, + signer: o, + generateSigner: (O) => { + if (!n) + throw new Error("No client initialized"); + let w; + return O ? w = Yo.generateWalletFromData(O) : (n.generateRandomWallet(), w = n.wallet), w; + }, + fetchAccount: C, + fetchBalance: R, + setClient: a, + setSigner: Y + }; +}, is = da(void 0), po = () => { + const e = ua(is); + if (!e) + throw new Error( + "useClientContext returned `undefined`, maybe you forgot to wrap the component within ?" + ); + return { + ...e, + // Allow client extensions + client: e.client + }; +}, P0 = ({ env: e, client: r, signer: t, ...n }) => { + const a = uc({ env: e, client: r, signer: t }); + return /* @__PURE__ */ U(is.Provider, { value: a, ...n }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/client.tsx", + lineNumber: 187, + columnNumber: 10 + }, globalThis); +}; +var qe = (...e) => e.filter(Boolean).join(" "); +function Mt(e) { + const r = typeof e; + return e != null && (r === "object" || r === "function") && !Array.isArray(e); +} +var We = (e) => e ? "" : void 0, Ra = (e) => e ? !0 : void 0; +function Dr(...e) { + return function(t) { + e.some((n) => (n == null || n(t), t == null ? void 0 : t.defaultPrevented)); + }; +} +function fc(...e) { + return function(t) { + e.forEach((n) => { + n == null || n(t); + }); + }; +} +var gn = {}, mc = { + get exports() { + return gn; + }, + set exports(e) { + gn = e; + } +}, Qt = {}; +/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +var Ko; +function hc() { + if (Ko) + return Qt; + Ko = 1; + var e = Be, r = Symbol.for("react.element"), t = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 }; + function i(u, h, v) { + var S, b = {}, _ = null, C = null; + v !== void 0 && (_ = "" + v), h.key !== void 0 && (_ = "" + h.key), h.ref !== void 0 && (C = h.ref); + for (S in h) + n.call(h, S) && !o.hasOwnProperty(S) && (b[S] = h[S]); + if (u && u.defaultProps) + for (S in h = u.defaultProps, h) + b[S] === void 0 && (b[S] = h[S]); + return { $$typeof: r, type: u, key: _, ref: C, props: b, _owner: a.current }; + } + return Qt.Fragment = t, Qt.jsx = i, Qt.jsxs = i, Qt; +} +var Kt = {}; +/** + * @license React + * react-jsx-runtime.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +var Jo; +function vc() { + return Jo || (Jo = 1, process.env.NODE_ENV !== "production" && function() { + var e = Be, r = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), u = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), R = Symbol.iterator, Y = "@@iterator"; + function L(l) { + if (l === null || typeof l != "object") + return null; + var y = R && l[R] || l[Y]; + return typeof y == "function" ? y : null; + } + var O = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + function w(l) { + { + for (var y = arguments.length, k = new Array(y > 1 ? y - 1 : 0), $ = 1; $ < y; $++) + k[$ - 1] = arguments[$]; + q("error", l, k); + } + } + function q(l, y, k) { + { + var $ = O.ReactDebugCurrentFrame, D = $.getStackAddendum(); + D !== "" && (y += "%s", k = k.concat([D])); + var X = k.map(function(H) { + return String(H); + }); + X.unshift("Warning: " + y), Function.prototype.apply.call(console[l], console, X); + } + } + var ie = !1, M = !1, Q = !1, K = !1, re = !1, fe; + fe = Symbol.for("react.module.reference"); + function Ee(l) { + return !!(typeof l == "string" || typeof l == "function" || l === n || l === o || re || l === a || l === v || l === S || K || l === C || ie || M || Q || typeof l == "object" && l !== null && (l.$$typeof === _ || l.$$typeof === b || l.$$typeof === i || l.$$typeof === u || l.$$typeof === h || // This needs to include all possible module reference object + // types supported by any Flight configuration anywhere since + // we don't know which Flight build this will end up being used + // with. + l.$$typeof === fe || l.getModuleId !== void 0)); + } + function me(l, y, k) { + var $ = l.displayName; + if ($) + return $; + var D = y.displayName || y.name || ""; + return D !== "" ? k + "(" + D + ")" : k; + } + function J(l) { + return l.displayName || "Context"; + } + function I(l) { + if (l == null) + return null; + if (typeof l.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof l == "function") + return l.displayName || l.name || null; + if (typeof l == "string") + return l; + switch (l) { + case n: + return "Fragment"; + case t: + return "Portal"; + case o: + return "Profiler"; + case a: + return "StrictMode"; + case v: + return "Suspense"; + case S: + return "SuspenseList"; + } + if (typeof l == "object") + switch (l.$$typeof) { + case u: + var y = l; + return J(y) + ".Consumer"; + case i: + var k = l; + return J(k._context) + ".Provider"; + case h: + return me(l, l.render, "ForwardRef"); + case b: + var $ = l.displayName || null; + return $ !== null ? $ : I(l.type) || "Memo"; + case _: { + var D = l, X = D._payload, H = D._init; + try { + return I(H(X)); + } catch { + return null; + } + } + } + return null; + } + var Z = Object.assign, ee = 0, se, ye, Ye, Ve, Me, er, rr; + function le() { + } + le.__reactDisabledLog = !0; + function ur() { + { + if (ee === 0) { + se = console.log, ye = console.info, Ye = console.warn, Ve = console.error, Me = console.group, er = console.groupCollapsed, rr = console.groupEnd; + var l = { + configurable: !0, + enumerable: !0, + value: le, + writable: !0 + }; + Object.defineProperties(console, { + info: l, + log: l, + warn: l, + error: l, + group: l, + groupCollapsed: l, + groupEnd: l + }); + } + ee++; + } + } + function br() { + { + if (ee--, ee === 0) { + var l = { + configurable: !0, + enumerable: !0, + writable: !0 + }; + Object.defineProperties(console, { + log: Z({}, l, { + value: se + }), + info: Z({}, l, { + value: ye + }), + warn: Z({}, l, { + value: Ye + }), + error: Z({}, l, { + value: Ve + }), + group: Z({}, l, { + value: Me + }), + groupCollapsed: Z({}, l, { + value: er + }), + groupEnd: Z({}, l, { + value: rr + }) + }); + } + ee < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + } + } + var j = O.ReactCurrentDispatcher, ce; + function ae(l, y, k) { + { + if (ce === void 0) + try { + throw Error(); + } catch (D) { + var $ = D.stack.trim().match(/\n( *(at )?)/); + ce = $ && $[1] || ""; + } + return ` +` + ce + l; + } + } + var be = !1, Pe; + { + var te = typeof WeakMap == "function" ? WeakMap : Map; + Pe = new te(); + } + function $e(l, y) { + if (!l || be) + return ""; + { + var k = Pe.get(l); + if (k !== void 0) + return k; + } + var $; + be = !0; + var D = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var X; + X = j.current, j.current = null, ur(); + try { + if (y) { + var H = function() { + throw Error(); + }; + if (Object.defineProperty(H.prototype, "props", { + set: function() { + throw Error(); + } + }), typeof Reflect == "object" && Reflect.construct) { + try { + Reflect.construct(H, []); + } catch (cr) { + $ = cr; + } + Reflect.construct(l, [], H); + } else { + try { + H.call(); + } catch (cr) { + $ = cr; + } + l.call(H.prototype); + } + } else { + try { + throw Error(); + } catch (cr) { + $ = cr; + } + l(); + } + } catch (cr) { + if (cr && $ && typeof cr.stack == "string") { + for (var V = cr.stack.split(` +`), _e = $.stack.split(` +`), we = V.length - 1, Ne = _e.length - 1; we >= 1 && Ne >= 0 && V[we] !== _e[Ne]; ) + Ne--; + for (; we >= 1 && Ne >= 0; we--, Ne--) + if (V[we] !== _e[Ne]) { + if (we !== 1 || Ne !== 1) + do + if (we--, Ne--, Ne < 0 || V[we] !== _e[Ne]) { + var ze = ` +` + V[we].replace(" at new ", " at "); + return l.displayName && ze.includes("") && (ze = ze.replace("", l.displayName)), typeof l == "function" && Pe.set(l, ze), ze; + } + while (we >= 1 && Ne >= 0); + break; + } + } + } finally { + be = !1, j.current = X, br(), Error.prepareStackTrace = D; + } + var Nr = l ? l.displayName || l.name : "", Cn = Nr ? ae(Nr) : ""; + return typeof l == "function" && Pe.set(l, Cn), Cn; + } + function pr(l, y, k) { + return $e(l, !1); + } + function kt(l) { + var y = l.prototype; + return !!(y && y.isReactComponent); + } + function yr(l, y, k) { + if (l == null) + return ""; + if (typeof l == "function") + return $e(l, kt(l)); + if (typeof l == "string") + return ae(l); + switch (l) { + case v: + return ae("Suspense"); + case S: + return ae("SuspenseList"); + } + if (typeof l == "object") + switch (l.$$typeof) { + case h: + return pr(l.render); + case b: + return yr(l.type, y, k); + case _: { + var $ = l, D = $._payload, X = $._init; + try { + return yr(X(D), y, k); + } catch { + } + } + } + return ""; + } + var d = Object.prototype.hasOwnProperty, p = {}, x = O.ReactDebugCurrentFrame; + function A(l) { + if (l) { + var y = l._owner, k = yr(l.type, l._source, y ? y.type : null); + x.setExtraStackFrame(k); + } else + x.setExtraStackFrame(null); + } + function F(l, y, k, $, D) { + { + var X = Function.call.bind(d); + for (var H in l) + if (X(l, H)) { + var V = void 0; + try { + if (typeof l[H] != "function") { + var _e = Error(($ || "React class") + ": " + k + " type `" + H + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof l[H] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); + throw _e.name = "Invariant Violation", _e; + } + V = l[H](y, H, $, k, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); + } catch (we) { + V = we; + } + V && !(V instanceof Error) && (A(D), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", $ || "React class", k, H, typeof V), A(null)), V instanceof Error && !(V.message in p) && (p[V.message] = !0, A(D), w("Failed %s type: %s", k, V.message), A(null)); + } + } + } + var E = Array.isArray; + function W(l) { + return E(l); + } + function de(l) { + { + var y = typeof Symbol == "function" && Symbol.toStringTag, k = y && l[Symbol.toStringTag] || l.constructor.name || "Object"; + return k; + } + } + function Te(l) { + try { + return tr(l), !1; + } catch { + return !0; + } + } + function tr(l) { + return "" + l; + } + function jr(l) { + if (Te(l)) + return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", de(l)), tr(l); + } + var Ge = O.ReactCurrentOwner, Sr = { + key: !0, + ref: !0, + __self: !0, + __source: !0 + }, Fr, Tr, xr; + xr = {}; + function Vr(l) { + if (d.call(l, "ref")) { + var y = Object.getOwnPropertyDescriptor(l, "ref").get; + if (y && y.isReactWarning) + return !1; + } + return l.ref !== void 0; + } + function Ct(l) { + if (d.call(l, "key")) { + var y = Object.getOwnPropertyDescriptor(l, "key").get; + if (y && y.isReactWarning) + return !1; + } + return l.key !== void 0; + } + function Lt(l, y) { + if (typeof l.ref == "string" && Ge.current && y && Ge.current.stateNode !== y) { + var k = I(Ge.current.type); + xr[k] || (w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', I(Ge.current.type), l.ref), xr[k] = !0); + } + } + function jt(l, y) { + { + var k = function() { + Fr || (Fr = !0, w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", y)); + }; + k.isReactWarning = !0, Object.defineProperty(l, "key", { + get: k, + configurable: !0 + }); + } + } + function Er(l, y) { + { + var k = function() { + Tr || (Tr = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", y)); + }; + k.isReactWarning = !0, Object.defineProperty(l, "ref", { + get: k, + configurable: !0 + }); + } + } + var et = function(l, y, k, $, D, X, H) { + var V = { + // This tag allows us to uniquely identify this as a React Element + $$typeof: r, + // Built-in properties that belong on the element + type: l, + key: y, + ref: k, + props: H, + // Record the component responsible for creating this element. + _owner: X + }; + return V._store = {}, Object.defineProperty(V._store, "validated", { + configurable: !1, + enumerable: !1, + writable: !0, + value: !1 + }), Object.defineProperty(V, "_self", { + configurable: !1, + enumerable: !1, + writable: !1, + value: $ + }), Object.defineProperty(V, "_source", { + configurable: !1, + enumerable: !1, + writable: !1, + value: D + }), Object.freeze && (Object.freeze(V.props), Object.freeze(V)), V; + }; + function Vt(l, y, k, $, D) { + { + var X, H = {}, V = null, _e = null; + k !== void 0 && (jr(k), V = "" + k), Ct(y) && (jr(y.key), V = "" + y.key), Vr(y) && (_e = y.ref, Lt(y, D)); + for (X in y) + d.call(y, X) && !Sr.hasOwnProperty(X) && (H[X] = y[X]); + if (l && l.defaultProps) { + var we = l.defaultProps; + for (X in we) + H[X] === void 0 && (H[X] = we[X]); + } + if (V || _e) { + var Ne = typeof l == "function" ? l.displayName || l.name || "Unknown" : l; + V && jt(H, Ne), _e && Er(H, Ne); + } + return et(l, V, _e, D, $, Ge.current, H); + } + } + var Ar = O.ReactCurrentOwner, ct = O.ReactDebugCurrentFrame; + function Je(l) { + if (l) { + var y = l._owner, k = yr(l.type, l._source, y ? y.type : null); + ct.setExtraStackFrame(k); + } else + ct.setExtraStackFrame(null); + } + var fr; + fr = !1; + function Ur(l) { + return typeof l == "object" && l !== null && l.$$typeof === r; + } + function mr() { + { + if (Ar.current) { + var l = I(Ar.current.type); + if (l) + return ` + +Check the render method of \`` + l + "`."; + } + return ""; + } + } + function Ut(l) { + { + if (l !== void 0) { + var y = l.fileName.replace(/^.*[\\\/]/, ""), k = l.lineNumber; + return ` + +Check your code at ` + y + ":" + k + "."; + } + return ""; + } + } + var dt = {}; + function Ht(l) { + { + var y = mr(); + if (!y) { + var k = typeof l == "string" ? l : l.displayName || l.name; + k && (y = ` + +Check the top-level render call using <` + k + ">."); + } + return y; + } + } + function ut(l, y) { + { + if (!l._store || l._store.validated || l.key != null) + return; + l._store.validated = !0; + var k = Ht(y); + if (dt[k]) + return; + dt[k] = !0; + var $ = ""; + l && l._owner && l._owner !== Ar.current && ($ = " It was passed a child from " + I(l._owner.type) + "."), Je(l), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', k, $), Je(null); + } + } + function ft(l, y) { + { + if (typeof l != "object") + return; + if (W(l)) + for (var k = 0; k < l.length; k++) { + var $ = l[k]; + Ur($) && ut($, y); + } + else if (Ur(l)) + l._store && (l._store.validated = !0); + else if (l) { + var D = L(l); + if (typeof D == "function" && D !== l.entries) + for (var X = D.call(l), H; !(H = X.next()).done; ) + Ur(H.value) && ut(H.value, y); + } + } + } + function hr(l) { + { + var y = l.type; + if (y == null || typeof y == "string") + return; + var k; + if (typeof y == "function") + k = y.propTypes; + else if (typeof y == "object" && (y.$$typeof === h || // Note: Memo only checks outer props here. + // Inner props are checked in the reconciler. + y.$$typeof === b)) + k = y.propTypes; + else + return; + if (k) { + var $ = I(y); + F(k, l.props, "prop", $, l); + } else if (y.PropTypes !== void 0 && !fr) { + fr = !0; + var D = I(y); + w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", D || "Unknown"); + } + typeof y.getDefaultProps == "function" && !y.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); + } + } + function Yt(l) { + { + for (var y = Object.keys(l.props), k = 0; k < y.length; k++) { + var $ = y[k]; + if ($ !== "children" && $ !== "key") { + Je(l), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", $), Je(null); + break; + } + } + l.ref !== null && (Je(l), w("Invalid attribute `ref` supplied to `React.Fragment`."), Je(null)); + } + } + function Tt(l, y, k, $, D, X) { + { + var H = Ee(l); + if (!H) { + var V = ""; + (l === void 0 || typeof l == "object" && l !== null && Object.keys(l).length === 0) && (V += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."); + var _e = Ut(D); + _e ? V += _e : V += mr(); + var we; + l === null ? we = "null" : W(l) ? we = "array" : l !== void 0 && l.$$typeof === r ? (we = "<" + (I(l.type) || "Unknown") + " />", V = " Did you accidentally export a JSX literal instead of a component?") : we = typeof l, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", we, V); + } + var Ne = Vt(l, y, k, D, X); + if (Ne == null) + return Ne; + if (H) { + var ze = y.children; + if (ze !== void 0) + if ($) + if (W(ze)) { + for (var Nr = 0; Nr < ze.length; Nr++) + ft(ze[Nr], l); + Object.freeze && Object.freeze(ze); + } else + w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); + else + ft(ze, l); + } + return l === n ? Yt(Ne) : hr(Ne), Ne; + } + } + function qt(l, y, k) { + return Tt(l, y, k, !0); + } + function c(l, y, k) { + return Tt(l, y, k, !1); + } + var T = c, P = qt; + Kt.Fragment = n, Kt.jsx = T, Kt.jsxs = P; + }()), Kt; +} +(function(e) { + process.env.NODE_ENV === "production" ? e.exports = hc() : e.exports = vc(); +})(mc); +const gc = gn.Fragment, N = gn.jsx, Sn = gn.jsxs; +var Zo = { + path: /* @__PURE__ */ Sn("g", { stroke: "currentColor", strokeWidth: "1.5", children: [ + /* @__PURE__ */ N( + "path", + { + strokeLinecap: "round", + fill: "none", + d: "M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25" + } + ), + /* @__PURE__ */ N( + "path", + { + fill: "currentColor", + strokeLinecap: "round", + d: "M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0" + } + ), + /* @__PURE__ */ N("circle", { fill: "none", strokeMiterlimit: "10", cx: "12", cy: "12", r: "11.25" }) + ] }), + viewBox: "0 0 24 24" +}, Zr = ve((e, r) => { + const { + as: t, + viewBox: n, + color: a = "currentColor", + focusable: o = !1, + children: i, + className: u, + __css: h, + ...v + } = e, S = qe("chakra-icon", u), b = ir("Icon", e), _ = { + w: "1em", + h: "1em", + display: "inline-block", + lineHeight: "1em", + flexShrink: 0, + color: a, + ...h, + ...b + }, C = { + ref: r, + focusable: o, + className: S, + __css: _ + }, R = n ?? Zo.viewBox; + if (t && typeof t != "string") + return /* @__PURE__ */ N(ne.svg, { as: t, ...C, ...v }); + const Y = i ?? Zo.path; + return /* @__PURE__ */ N(ne.svg, { verticalAlign: "middle", viewBox: R, ...C, ...v, children: Y }); +}); +Zr.displayName = "Icon"; +function bc(e, r) { + return `${e} returned \`undefined\`. Seems you forgot to wrap component within ${r}`; +} +function Wr(e = {}) { + const { + name: r, + strict: t = !0, + hookName: n = "useContext", + providerName: a = "Provider", + errorMessage: o, + defaultValue: i + } = e, u = da(i); + u.displayName = r; + function h() { + var v; + const S = ua(u); + if (!S && t) { + const b = new Error( + o ?? bc(n, a) + ); + throw b.name = "ContextError", (v = Error.captureStackTrace) == null || v.call(Error, b, h), b; + } + return S; + } + return [u.Provider, h, u]; +} +var [pc, ss] = Wr({ + name: "TagStylesContext", + errorMessage: `useTagStyles returned is 'undefined'. Seems you forgot to wrap the components in "" ` +}), yo = ve((e, r) => { + const t = Mr("Tag", e), n = sr(e), a = { + display: "inline-flex", + verticalAlign: "top", + alignItems: "center", + maxWidth: "100%", + ...t.container + }; + return /* @__PURE__ */ N(pc, { value: t, children: /* @__PURE__ */ N(ne.span, { ref: r, ...n, __css: a }) }); +}); +yo.displayName = "Tag"; +var yc = ve((e, r) => { + const t = ss(); + return /* @__PURE__ */ N(ne.span, { ref: r, noOfLines: 1, ...e, __css: t.label }); +}); +yc.displayName = "TagLabel"; +var Sc = ve((e, r) => /* @__PURE__ */ N(Zr, { ref: r, verticalAlign: "top", marginEnd: "0.5rem", ...e })); +Sc.displayName = "TagLeftIcon"; +var xc = ve((e, r) => /* @__PURE__ */ N(Zr, { ref: r, verticalAlign: "top", marginStart: "0.5rem", ...e })); +xc.displayName = "TagRightIcon"; +var ls = (e) => /* @__PURE__ */ N(Zr, { verticalAlign: "inherit", viewBox: "0 0 512 512", ...e, children: /* @__PURE__ */ N( + "path", + { + fill: "currentColor", + d: "M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z" + } +) }); +ls.displayName = "TagCloseIcon"; +var _c = ve( + (e, r) => { + const { isDisabled: t, children: n, ...a } = e, i = { + display: "flex", + alignItems: "center", + justifyContent: "center", + outline: "0", + ...ss().closeButton + }; + return /* @__PURE__ */ N( + ne.button, + { + ref: r, + "aria-label": "close", + ...a, + type: "button", + disabled: t, + __css: i, + children: n || /* @__PURE__ */ N(ls, {}) + } + ); + } +); +_c.displayName = "TagCloseButton"; +const F0 = (e) => { + const { balance: r } = po(); + if (r < 0) + return null; + let t = "teal"; + return r < 50 && r > 20 ? t = "yellow" : r <= 20 && (t = "red"), /* @__PURE__ */ U(yo, { size: "sm", colorScheme: t, ...e, children: [ + r, + " votokens" + ] }, void 0, !0, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Account/Balance.tsx", + lineNumber: 20, + columnNumber: 5 + }, globalThis); +}, cs = (e) => { + const { variant: r, ...t } = e, n = ir("HorizontalRuler", { variant: r }); + return /* @__PURE__ */ U(ne.div, { __css: n, ...t, as: "hr" }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/HR.tsx", + lineNumber: 11, + columnNumber: 10 + }, globalThis); +}; +cs.displayName = "HorizontalRuler"; +var Za = ve(function(r, t) { + const { htmlWidth: n, htmlHeight: a, alt: o, ...i } = r; + return /* @__PURE__ */ N("img", { width: n, height: a, ref: t, alt: o, ...i }); +}); +Za.displayName = "NativeImage"; +var wc = globalThis != null && globalThis.document ? Zl : Ke; +function kc(e) { + const { + loading: r, + src: t, + srcSet: n, + onLoad: a, + onError: o, + crossOrigin: i, + sizes: u, + ignoreFallback: h + } = e, [v, S] = ge("pending"); + Ke(() => { + S(t ? "loading" : "pending"); + }, [t]); + const b = ns(), _ = Ze(() => { + if (!t) + return; + C(); + const R = new Image(); + R.src = t, i && (R.crossOrigin = i), n && (R.srcset = n), u && (R.sizes = u), r && (R.loading = r), R.onload = (Y) => { + C(), S("loaded"), a == null || a(Y); + }, R.onerror = (Y) => { + C(), S("failed"), o == null || o(Y); + }, b.current = R; + }, [t, i, n, u, a, o, r]), C = () => { + b.current && (b.current.onload = null, b.current.onerror = null, b.current = null); + }; + return wc(() => { + if (!h) + return v === "loading" && _(), () => { + C(); + }; + }, [v, _, h]), h ? "loaded" : v; +} +var Cc = (e, r) => e !== "loaded" && r === "beforeLoadOrError" || e === "failed" && r === "onError"; +function Tc(e, r = []) { + const t = Object.assign({}, e); + for (const n of r) + n in t && delete t[n]; + return t; +} +var ds = ve(function(r, t) { + const { + fallbackSrc: n, + fallback: a, + src: o, + srcSet: i, + align: u, + fit: h, + loading: v, + ignoreFallback: S, + crossOrigin: b, + fallbackStrategy: _ = "beforeLoadOrError", + referrerPolicy: C, + ...R + } = r, Y = n !== void 0 || a !== void 0, L = v != null || S || !Y, O = kc({ + ...r, + crossOrigin: b, + ignoreFallback: L + }), w = Cc(O, _), q = { + ref: t, + objectFit: h, + objectPosition: u, + ...L ? R : Tc(R, ["onError", "onLoad"]) + }; + return w ? a || /* @__PURE__ */ N( + ne.img, + { + as: Za, + className: "chakra-image__placeholder", + src: n, + ...q + } + ) : /* @__PURE__ */ N( + ne.img, + { + as: Za, + src: o, + srcSet: i, + crossOrigin: b, + loading: v, + referrerPolicy: C, + className: "chakra-image", + ...q + } + ); +}); +ds.displayName = "Image"; +const Ec = (e, r) => { + if (typeof e > "u") + return; + if (!e.startsWith("ipfs")) + return e; + const t = e.match(/(?:ipfs:\/\/)?(.*)/); + if (!t) + return e; + const [, n] = t; + return r + n; +}, So = ({ src: e, ...r }) => { + if (!e) + return null; + const t = Ec(e, r.gateway || "https://infura-ipfs.io/ipfs/"); + return /* @__PURE__ */ U(ds, { src: t, ...r }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Image.tsx", + lineNumber: 35, + columnNumber: 10 + }, globalThis); +}; +function us(e) { + return ec.toArray(e).filter( + (r) => as(r) + ); +} +var [$c, fs] = Wr({ + name: "ListStylesContext", + errorMessage: `useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" ` +}), xo = ve(function(r, t) { + const n = Mr("List", r), { + children: a, + styleType: o = "none", + stylePosition: i, + spacing: u, + ...h + } = sr(r), v = us(a), b = u ? { ["& > *:not(style) ~ *:not(style)"]: { mt: u } } : {}; + return /* @__PURE__ */ N($c, { value: n, children: /* @__PURE__ */ N( + ne.ul, + { + ref: t, + listStyleType: o, + listStylePosition: i, + role: "list", + __css: { ...n.container, ...b }, + ...h, + children: v + } + ) }); +}); +xo.displayName = "List"; +var ms = ve((e, r) => { + const { as: t, ...n } = e; + return /* @__PURE__ */ N(xo, { ref: r, as: "ol", styleType: "decimal", marginStart: "1em", ...n }); +}); +ms.displayName = "OrderedList"; +var hs = ve(function(r, t) { + const { as: n, ...a } = r; + return /* @__PURE__ */ N(xo, { ref: t, as: "ul", styleType: "initial", marginStart: "1em", ...a }); +}); +hs.displayName = "UnorderedList"; +var vs = ve(function(r, t) { + const n = fs(); + return /* @__PURE__ */ N(ne.li, { ref: t, ...r, __css: n.item }); +}); +vs.displayName = "ListItem"; +var Rc = ve(function(r, t) { + const n = fs(); + return /* @__PURE__ */ N(Zr, { ref: t, role: "presentation", ...r, __css: n.icon }); +}); +Rc.displayName = "ListIcon"; +function gs(e, r) { + return Array.isArray(e) ? e.map((t) => t === null ? null : r(t)) : Mt(e) ? Object.keys(e).reduce((t, n) => (t[n] = r(e[n]), t), {}) : e != null ? r(e) : null; +} +function Pc(e) { + const r = Object.assign({}, e); + for (let t in r) + r[t] === void 0 && delete r[t]; + return r; +} +var bs = ve(function(r, t) { + const n = ir("Text", r), { className: a, align: o, decoration: i, casing: u, ...h } = sr(r), v = Pc({ + textAlign: r.align, + textDecoration: r.decoration, + textTransform: r.casing + }); + return /* @__PURE__ */ N( + ne.p, + { + ref: t, + className: qe("chakra-text", r.className), + ...v, + ...h, + __css: n + } + ); +}); +bs.displayName = "Text"; +var ps = (e) => /* @__PURE__ */ N( + ne.div, + { + className: "chakra-stack__item", + ...e, + __css: { + display: "inline-block", + flex: "0 0 auto", + minWidth: 0, + ...e.__css + } + } +); +ps.displayName = "StackItem"; +var eo = "& > *:not(style) ~ *:not(style)"; +function Fc(e) { + const { spacing: r, direction: t } = e, n = { + column: { + marginTop: r, + marginEnd: 0, + marginBottom: 0, + marginStart: 0 + }, + row: { marginTop: 0, marginEnd: 0, marginBottom: 0, marginStart: r }, + "column-reverse": { + marginTop: 0, + marginEnd: 0, + marginBottom: r, + marginStart: 0 + }, + "row-reverse": { + marginTop: 0, + marginEnd: r, + marginBottom: 0, + marginStart: 0 + } + }; + return { + flexDirection: t, + [eo]: gs( + t, + (a) => n[a] + ) + }; +} +function Ac(e) { + const { spacing: r, direction: t } = e, n = { + column: { + my: r, + mx: 0, + borderLeftWidth: 0, + borderBottomWidth: "1px" + }, + "column-reverse": { + my: r, + mx: 0, + borderLeftWidth: 0, + borderBottomWidth: "1px" + }, + row: { + mx: r, + my: 0, + borderLeftWidth: "1px", + borderBottomWidth: 0 + }, + "row-reverse": { + mx: r, + my: 0, + borderLeftWidth: "1px", + borderBottomWidth: 0 + } + }; + return { + "&": gs( + t, + (a) => n[a] + ) + }; +} +var ys = ve((e, r) => { + const { + isInline: t, + direction: n, + align: a, + justify: o, + spacing: i = "0.5rem", + wrap: u, + children: h, + divider: v, + className: S, + shouldWrapChildren: b, + ..._ + } = e, C = t ? "row" : n ?? "column", R = pt( + () => Fc({ direction: C, spacing: i }), + [C, i] + ), Y = pt( + () => Ac({ spacing: i, direction: C }), + [i, C] + ), L = !!v, O = !b && !L, w = pt(() => { + const ie = us(h); + return O ? ie : ie.map((M, Q) => { + const K = typeof M.key < "u" ? M.key : Q, re = Q + 1 === ie.length, Ee = b ? /* @__PURE__ */ N(ps, { children: M }, K) : M; + if (!L) + return Ee; + const me = os( + v, + { + __css: Y + } + ); + return /* @__PURE__ */ Sn(rc, { children: [ + Ee, + re ? null : me + ] }, K); + }); + }, [ + v, + Y, + L, + O, + b, + h + ]), q = qe("chakra-stack", S); + return /* @__PURE__ */ N( + ne.div, + { + ref: r, + display: "flex", + alignItems: a, + justifyContent: o, + flexDirection: R.flexDirection, + flexWrap: u, + className: q, + __css: L ? {} : { [eo]: R[eo] }, + ..._, + children: w + } + ); +}); +ys.displayName = "Stack"; +var Mn = ve(function(r, t) { + const n = ir("Heading", r), { className: a, ...o } = sr(r); + return /* @__PURE__ */ N( + ne.h2, + { + ref: t, + className: qe("chakra-heading", r.className), + ...o, + __css: n + } + ); +}); +Mn.displayName = "Heading"; +var _o = ne("div"); +_o.displayName = "Box"; +var Ss = ve(function(r, t) { + const { size: n, centerContent: a = !0, ...o } = r; + return /* @__PURE__ */ N( + _o, + { + ref: t, + boxSize: n, + __css: { + ...a ? { display: "flex", alignItems: "center", justifyContent: "center" } : {}, + flexShrink: 0, + flexGrow: 0 + }, + ...o + } + ); +}); +Ss.displayName = "Square"; +var Nc = ve(function(r, t) { + const { size: n, ...a } = r; + return /* @__PURE__ */ N(Ss, { size: n, ref: t, borderRadius: "9999px", ...a }); +}); +Nc.displayName = "Circle"; +var xs = ve(function(r, t) { + const n = ir("Link", r), { className: a, isExternal: o, ...i } = sr(r); + return /* @__PURE__ */ N( + ne.a, + { + target: o ? "_blank" : void 0, + rel: o ? "noopener" : void 0, + ref: t, + className: qe("chakra-link", a), + ...i, + __css: n + } + ); +}); +xs.displayName = "Link"; +var _s = ve(function(r, t) { + const n = ir("Code", r), { className: a, ...o } = sr(r); + return /* @__PURE__ */ N( + ne.code, + { + ref: t, + className: qe("chakra-code", r.className), + ...o, + __css: { + display: "inline-block", + ...n + } + } + ); +}); +_s.displayName = "Code"; +var [Dc, zc] = Wr({ + name: "TableStylesContext", + errorMessage: `useTableStyles returned is 'undefined'. Seems you forgot to wrap the components in "" ` +}), ws = ve((e, r) => { + const t = Mr("Table", e), { className: n, layout: a, ...o } = sr(e); + return /* @__PURE__ */ N(Dc, { value: t, children: /* @__PURE__ */ N( + ne.table, + { + ref: r, + __css: { tableLayout: a, ...t.table }, + className: qe("chakra-table", n), + ...o + } + ) }); +}); +ws.displayName = "Table"; +var Oc = ve((e, r) => { + const t = zc(); + return /* @__PURE__ */ N(ne.tr, { ...e, ref: r, __css: t.tr }); +}); +const Ic = ({ children: e, ...r }) => e ? /* @__PURE__ */ U( + ic, + { + children: e, + remarkPlugins: [sc], + components: { + a: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(xs, { ...a, target: "_blank", children: n }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", + lineNumber: 22, + columnNumber: 11 + }, globalThis), + h1: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(Mn, { size: "lg", mt: 5, mb: 4, ...a, children: n }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", + lineNumber: 27, + columnNumber: 11 + }, globalThis), + h2: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(Mn, { size: "md", mt: 5, mb: 4, ...a, children: n }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", + lineNumber: 32, + columnNumber: 11 + }, globalThis), + h3: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(Mn, { as: "h3", size: "sm", mt: 5, mb: 4, ...a, children: n }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", + lineNumber: 37, + columnNumber: 11 + }, globalThis), + ol: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(ms, { ...a, children: n }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", + lineNumber: 41, + columnNumber: 47 + }, globalThis), + ul: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(hs, { ...a, children: n }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", + lineNumber: 42, + columnNumber: 47 + }, globalThis), + li: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(vs, { ...a, children: n }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", + lineNumber: 43, + columnNumber: 47 + }, globalThis), + p: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(bs, { fontWeight: "medium", mb: 4, children: n }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", + lineNumber: 45, + columnNumber: 11 + }, globalThis), + table: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(_o, { overflowX: "auto", maxW: "full", children: /* @__PURE__ */ U(ws, { ...a, children: n }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", + lineNumber: 51, + columnNumber: 13 + }, globalThis) }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", + lineNumber: 50, + columnNumber: 11 + }, globalThis), + tr: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(Oc, { ...a, children: n }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", + lineNumber: 54, + columnNumber: 47 + }, globalThis), + code: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(_s, { ...a, children: n }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", + lineNumber: 55, + columnNumber: 49 + }, globalThis) + }, + ...r + }, + void 0, + !1, + { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", + lineNumber: 17, + columnNumber: 5 + }, + globalThis +) : null, fa = ne(Ic); +fa.displayName = "Markdown"; +function _t(e) { + if (e === null || e === !0 || e === !1) + return NaN; + var r = Number(e); + return isNaN(r) ? r : r < 0 ? Math.ceil(r) : Math.floor(r); +} +function lr(e, r) { + if (r.length < e) + throw new TypeError(e + " argument" + (e > 1 ? "s" : "") + " required, but only " + r.length + " present"); +} +function Wn(e) { + return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Wn = function(t) { + return typeof t; + } : Wn = function(t) { + return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; + }, Wn(e); +} +function Lr(e) { + lr(1, arguments); + var r = Object.prototype.toString.call(e); + return e instanceof Date || Wn(e) === "object" && r === "[object Date]" ? new Date(e.getTime()) : typeof e == "number" || r === "[object Number]" ? new Date(e) : ((typeof e == "string" || r === "[object String]") && typeof console < "u" && (console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"), console.warn(new Error().stack)), /* @__PURE__ */ new Date(NaN)); +} +function Bc(e, r) { + lr(2, arguments); + var t = Lr(e).getTime(), n = _t(r); + return new Date(t + n); +} +var Mc = {}; +function ma() { + return Mc; +} +function Wc(e) { + var r = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds())); + return r.setUTCFullYear(e.getFullYear()), e.getTime() - r.getTime(); +} +function Ln(e) { + return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Ln = function(t) { + return typeof t; + } : Ln = function(t) { + return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; + }, Ln(e); +} +function Lc(e) { + return lr(1, arguments), e instanceof Date || Ln(e) === "object" && Object.prototype.toString.call(e) === "[object Date]"; +} +function jc(e) { + if (lr(1, arguments), !Lc(e) && typeof e != "number") + return !1; + var r = Lr(e); + return !isNaN(Number(r)); +} +function Vc(e, r) { + lr(2, arguments); + var t = _t(r); + return Bc(e, -t); +} +var Uc = 864e5; +function Hc(e) { + lr(1, arguments); + var r = Lr(e), t = r.getTime(); + r.setUTCMonth(0, 1), r.setUTCHours(0, 0, 0, 0); + var n = r.getTime(), a = t - n; + return Math.floor(a / Uc) + 1; +} +function Qn(e) { + lr(1, arguments); + var r = 1, t = Lr(e), n = t.getUTCDay(), a = (n < r ? 7 : 0) + n - r; + return t.setUTCDate(t.getUTCDate() - a), t.setUTCHours(0, 0, 0, 0), t; +} +function ks(e) { + lr(1, arguments); + var r = Lr(e), t = r.getUTCFullYear(), n = /* @__PURE__ */ new Date(0); + n.setUTCFullYear(t + 1, 0, 4), n.setUTCHours(0, 0, 0, 0); + var a = Qn(n), o = /* @__PURE__ */ new Date(0); + o.setUTCFullYear(t, 0, 4), o.setUTCHours(0, 0, 0, 0); + var i = Qn(o); + return r.getTime() >= a.getTime() ? t + 1 : r.getTime() >= i.getTime() ? t : t - 1; +} +function Yc(e) { + lr(1, arguments); + var r = ks(e), t = /* @__PURE__ */ new Date(0); + t.setUTCFullYear(r, 0, 4), t.setUTCHours(0, 0, 0, 0); + var n = Qn(t); + return n; +} +var qc = 6048e5; +function Gc(e) { + lr(1, arguments); + var r = Lr(e), t = Qn(r).getTime() - Yc(r).getTime(); + return Math.round(t / qc) + 1; +} +function Kn(e, r) { + var t, n, a, o, i, u, h, v; + lr(1, arguments); + var S = ma(), b = _t((t = (n = (a = (o = r == null ? void 0 : r.weekStartsOn) !== null && o !== void 0 ? o : r == null || (i = r.locale) === null || i === void 0 || (u = i.options) === null || u === void 0 ? void 0 : u.weekStartsOn) !== null && a !== void 0 ? a : S.weekStartsOn) !== null && n !== void 0 ? n : (h = S.locale) === null || h === void 0 || (v = h.options) === null || v === void 0 ? void 0 : v.weekStartsOn) !== null && t !== void 0 ? t : 0); + if (!(b >= 0 && b <= 6)) + throw new RangeError("weekStartsOn must be between 0 and 6 inclusively"); + var _ = Lr(e), C = _.getUTCDay(), R = (C < b ? 7 : 0) + C - b; + return _.setUTCDate(_.getUTCDate() - R), _.setUTCHours(0, 0, 0, 0), _; +} +function Cs(e, r) { + var t, n, a, o, i, u, h, v; + lr(1, arguments); + var S = Lr(e), b = S.getUTCFullYear(), _ = ma(), C = _t((t = (n = (a = (o = r == null ? void 0 : r.firstWeekContainsDate) !== null && o !== void 0 ? o : r == null || (i = r.locale) === null || i === void 0 || (u = i.options) === null || u === void 0 ? void 0 : u.firstWeekContainsDate) !== null && a !== void 0 ? a : _.firstWeekContainsDate) !== null && n !== void 0 ? n : (h = _.locale) === null || h === void 0 || (v = h.options) === null || v === void 0 ? void 0 : v.firstWeekContainsDate) !== null && t !== void 0 ? t : 1); + if (!(C >= 1 && C <= 7)) + throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively"); + var R = /* @__PURE__ */ new Date(0); + R.setUTCFullYear(b + 1, 0, C), R.setUTCHours(0, 0, 0, 0); + var Y = Kn(R, r), L = /* @__PURE__ */ new Date(0); + L.setUTCFullYear(b, 0, C), L.setUTCHours(0, 0, 0, 0); + var O = Kn(L, r); + return S.getTime() >= Y.getTime() ? b + 1 : S.getTime() >= O.getTime() ? b : b - 1; +} +function Xc(e, r) { + var t, n, a, o, i, u, h, v; + lr(1, arguments); + var S = ma(), b = _t((t = (n = (a = (o = r == null ? void 0 : r.firstWeekContainsDate) !== null && o !== void 0 ? o : r == null || (i = r.locale) === null || i === void 0 || (u = i.options) === null || u === void 0 ? void 0 : u.firstWeekContainsDate) !== null && a !== void 0 ? a : S.firstWeekContainsDate) !== null && n !== void 0 ? n : (h = S.locale) === null || h === void 0 || (v = h.options) === null || v === void 0 ? void 0 : v.firstWeekContainsDate) !== null && t !== void 0 ? t : 1), _ = Cs(e, r), C = /* @__PURE__ */ new Date(0); + C.setUTCFullYear(_, 0, b), C.setUTCHours(0, 0, 0, 0); + var R = Kn(C, r); + return R; +} +var Qc = 6048e5; +function Kc(e, r) { + lr(1, arguments); + var t = Lr(e), n = Kn(t, r).getTime() - Xc(t, r).getTime(); + return Math.round(n / Qc) + 1; +} +function Ce(e, r) { + for (var t = e < 0 ? "-" : "", n = Math.abs(e).toString(); n.length < r; ) + n = "0" + n; + return t + n; +} +var Jc = { + // Year + y: function(r, t) { + var n = r.getUTCFullYear(), a = n > 0 ? n : 1 - n; + return Ce(t === "yy" ? a % 100 : a, t.length); + }, + // Month + M: function(r, t) { + var n = r.getUTCMonth(); + return t === "M" ? String(n + 1) : Ce(n + 1, 2); + }, + // Day of the month + d: function(r, t) { + return Ce(r.getUTCDate(), t.length); + }, + // AM or PM + a: function(r, t) { + var n = r.getUTCHours() / 12 >= 1 ? "pm" : "am"; + switch (t) { + case "a": + case "aa": + return n.toUpperCase(); + case "aaa": + return n; + case "aaaaa": + return n[0]; + case "aaaa": + default: + return n === "am" ? "a.m." : "p.m."; + } + }, + // Hour [1-12] + h: function(r, t) { + return Ce(r.getUTCHours() % 12 || 12, t.length); + }, + // Hour [0-23] + H: function(r, t) { + return Ce(r.getUTCHours(), t.length); + }, + // Minute + m: function(r, t) { + return Ce(r.getUTCMinutes(), t.length); + }, + // Second + s: function(r, t) { + return Ce(r.getUTCSeconds(), t.length); + }, + // Fraction of second + S: function(r, t) { + var n = t.length, a = r.getUTCMilliseconds(), o = Math.floor(a * Math.pow(10, n - 3)); + return Ce(o, t.length); + } +}; +const tt = Jc; +var Et = { + am: "am", + pm: "pm", + midnight: "midnight", + noon: "noon", + morning: "morning", + afternoon: "afternoon", + evening: "evening", + night: "night" +}, Zc = { + // Era + G: function(r, t, n) { + var a = r.getUTCFullYear() > 0 ? 1 : 0; + switch (t) { + case "G": + case "GG": + case "GGG": + return n.era(a, { + width: "abbreviated" + }); + case "GGGGG": + return n.era(a, { + width: "narrow" + }); + case "GGGG": + default: + return n.era(a, { + width: "wide" + }); + } + }, + // Year + y: function(r, t, n) { + if (t === "yo") { + var a = r.getUTCFullYear(), o = a > 0 ? a : 1 - a; + return n.ordinalNumber(o, { + unit: "year" + }); + } + return tt.y(r, t); + }, + // Local week-numbering year + Y: function(r, t, n, a) { + var o = Cs(r, a), i = o > 0 ? o : 1 - o; + if (t === "YY") { + var u = i % 100; + return Ce(u, 2); + } + return t === "Yo" ? n.ordinalNumber(i, { + unit: "year" + }) : Ce(i, t.length); + }, + // ISO week-numbering year + R: function(r, t) { + var n = ks(r); + return Ce(n, t.length); + }, + // Extended year. This is a single number designating the year of this calendar system. + // The main difference between `y` and `u` localizers are B.C. years: + // | Year | `y` | `u` | + // |------|-----|-----| + // | AC 1 | 1 | 1 | + // | BC 1 | 1 | 0 | + // | BC 2 | 2 | -1 | + // Also `yy` always returns the last two digits of a year, + // while `uu` pads single digit years to 2 characters and returns other years unchanged. + u: function(r, t) { + var n = r.getUTCFullYear(); + return Ce(n, t.length); + }, + // Quarter + Q: function(r, t, n) { + var a = Math.ceil((r.getUTCMonth() + 1) / 3); + switch (t) { + case "Q": + return String(a); + case "QQ": + return Ce(a, 2); + case "Qo": + return n.ordinalNumber(a, { + unit: "quarter" + }); + case "QQQ": + return n.quarter(a, { + width: "abbreviated", + context: "formatting" + }); + case "QQQQQ": + return n.quarter(a, { + width: "narrow", + context: "formatting" + }); + case "QQQQ": + default: + return n.quarter(a, { + width: "wide", + context: "formatting" + }); + } + }, + // Stand-alone quarter + q: function(r, t, n) { + var a = Math.ceil((r.getUTCMonth() + 1) / 3); + switch (t) { + case "q": + return String(a); + case "qq": + return Ce(a, 2); + case "qo": + return n.ordinalNumber(a, { + unit: "quarter" + }); + case "qqq": + return n.quarter(a, { + width: "abbreviated", + context: "standalone" + }); + case "qqqqq": + return n.quarter(a, { + width: "narrow", + context: "standalone" + }); + case "qqqq": + default: + return n.quarter(a, { + width: "wide", + context: "standalone" + }); + } + }, + // Month + M: function(r, t, n) { + var a = r.getUTCMonth(); + switch (t) { + case "M": + case "MM": + return tt.M(r, t); + case "Mo": + return n.ordinalNumber(a + 1, { + unit: "month" + }); + case "MMM": + return n.month(a, { + width: "abbreviated", + context: "formatting" + }); + case "MMMMM": + return n.month(a, { + width: "narrow", + context: "formatting" + }); + case "MMMM": + default: + return n.month(a, { + width: "wide", + context: "formatting" + }); + } + }, + // Stand-alone month + L: function(r, t, n) { + var a = r.getUTCMonth(); + switch (t) { + case "L": + return String(a + 1); + case "LL": + return Ce(a + 1, 2); + case "Lo": + return n.ordinalNumber(a + 1, { + unit: "month" + }); + case "LLL": + return n.month(a, { + width: "abbreviated", + context: "standalone" + }); + case "LLLLL": + return n.month(a, { + width: "narrow", + context: "standalone" + }); + case "LLLL": + default: + return n.month(a, { + width: "wide", + context: "standalone" + }); + } + }, + // Local week of year + w: function(r, t, n, a) { + var o = Kc(r, a); + return t === "wo" ? n.ordinalNumber(o, { + unit: "week" + }) : Ce(o, t.length); + }, + // ISO week of year + I: function(r, t, n) { + var a = Gc(r); + return t === "Io" ? n.ordinalNumber(a, { + unit: "week" + }) : Ce(a, t.length); + }, + // Day of the month + d: function(r, t, n) { + return t === "do" ? n.ordinalNumber(r.getUTCDate(), { + unit: "date" + }) : tt.d(r, t); + }, + // Day of year + D: function(r, t, n) { + var a = Hc(r); + return t === "Do" ? n.ordinalNumber(a, { + unit: "dayOfYear" + }) : Ce(a, t.length); + }, + // Day of week + E: function(r, t, n) { + var a = r.getUTCDay(); + switch (t) { + case "E": + case "EE": + case "EEE": + return n.day(a, { + width: "abbreviated", + context: "formatting" + }); + case "EEEEE": + return n.day(a, { + width: "narrow", + context: "formatting" + }); + case "EEEEEE": + return n.day(a, { + width: "short", + context: "formatting" + }); + case "EEEE": + default: + return n.day(a, { + width: "wide", + context: "formatting" + }); + } + }, + // Local day of week + e: function(r, t, n, a) { + var o = r.getUTCDay(), i = (o - a.weekStartsOn + 8) % 7 || 7; + switch (t) { + case "e": + return String(i); + case "ee": + return Ce(i, 2); + case "eo": + return n.ordinalNumber(i, { + unit: "day" + }); + case "eee": + return n.day(o, { + width: "abbreviated", + context: "formatting" + }); + case "eeeee": + return n.day(o, { + width: "narrow", + context: "formatting" + }); + case "eeeeee": + return n.day(o, { + width: "short", + context: "formatting" + }); + case "eeee": + default: + return n.day(o, { + width: "wide", + context: "formatting" + }); + } + }, + // Stand-alone local day of week + c: function(r, t, n, a) { + var o = r.getUTCDay(), i = (o - a.weekStartsOn + 8) % 7 || 7; + switch (t) { + case "c": + return String(i); + case "cc": + return Ce(i, t.length); + case "co": + return n.ordinalNumber(i, { + unit: "day" + }); + case "ccc": + return n.day(o, { + width: "abbreviated", + context: "standalone" + }); + case "ccccc": + return n.day(o, { + width: "narrow", + context: "standalone" + }); + case "cccccc": + return n.day(o, { + width: "short", + context: "standalone" + }); + case "cccc": + default: + return n.day(o, { + width: "wide", + context: "standalone" + }); + } + }, + // ISO day of week + i: function(r, t, n) { + var a = r.getUTCDay(), o = a === 0 ? 7 : a; + switch (t) { + case "i": + return String(o); + case "ii": + return Ce(o, t.length); + case "io": + return n.ordinalNumber(o, { + unit: "day" + }); + case "iii": + return n.day(a, { + width: "abbreviated", + context: "formatting" + }); + case "iiiii": + return n.day(a, { + width: "narrow", + context: "formatting" + }); + case "iiiiii": + return n.day(a, { + width: "short", + context: "formatting" + }); + case "iiii": + default: + return n.day(a, { + width: "wide", + context: "formatting" + }); + } + }, + // AM or PM + a: function(r, t, n) { + var a = r.getUTCHours(), o = a / 12 >= 1 ? "pm" : "am"; + switch (t) { + case "a": + case "aa": + return n.dayPeriod(o, { + width: "abbreviated", + context: "formatting" + }); + case "aaa": + return n.dayPeriod(o, { + width: "abbreviated", + context: "formatting" + }).toLowerCase(); + case "aaaaa": + return n.dayPeriod(o, { + width: "narrow", + context: "formatting" + }); + case "aaaa": + default: + return n.dayPeriod(o, { + width: "wide", + context: "formatting" + }); + } + }, + // AM, PM, midnight, noon + b: function(r, t, n) { + var a = r.getUTCHours(), o; + switch (a === 12 ? o = Et.noon : a === 0 ? o = Et.midnight : o = a / 12 >= 1 ? "pm" : "am", t) { + case "b": + case "bb": + return n.dayPeriod(o, { + width: "abbreviated", + context: "formatting" + }); + case "bbb": + return n.dayPeriod(o, { + width: "abbreviated", + context: "formatting" + }).toLowerCase(); + case "bbbbb": + return n.dayPeriod(o, { + width: "narrow", + context: "formatting" + }); + case "bbbb": + default: + return n.dayPeriod(o, { + width: "wide", + context: "formatting" + }); + } + }, + // in the morning, in the afternoon, in the evening, at night + B: function(r, t, n) { + var a = r.getUTCHours(), o; + switch (a >= 17 ? o = Et.evening : a >= 12 ? o = Et.afternoon : a >= 4 ? o = Et.morning : o = Et.night, t) { + case "B": + case "BB": + case "BBB": + return n.dayPeriod(o, { + width: "abbreviated", + context: "formatting" + }); + case "BBBBB": + return n.dayPeriod(o, { + width: "narrow", + context: "formatting" + }); + case "BBBB": + default: + return n.dayPeriod(o, { + width: "wide", + context: "formatting" + }); + } + }, + // Hour [1-12] + h: function(r, t, n) { + if (t === "ho") { + var a = r.getUTCHours() % 12; + return a === 0 && (a = 12), n.ordinalNumber(a, { + unit: "hour" + }); + } + return tt.h(r, t); + }, + // Hour [0-23] + H: function(r, t, n) { + return t === "Ho" ? n.ordinalNumber(r.getUTCHours(), { + unit: "hour" + }) : tt.H(r, t); + }, + // Hour [0-11] + K: function(r, t, n) { + var a = r.getUTCHours() % 12; + return t === "Ko" ? n.ordinalNumber(a, { + unit: "hour" + }) : Ce(a, t.length); + }, + // Hour [1-24] + k: function(r, t, n) { + var a = r.getUTCHours(); + return a === 0 && (a = 24), t === "ko" ? n.ordinalNumber(a, { + unit: "hour" + }) : Ce(a, t.length); + }, + // Minute + m: function(r, t, n) { + return t === "mo" ? n.ordinalNumber(r.getUTCMinutes(), { + unit: "minute" + }) : tt.m(r, t); + }, + // Second + s: function(r, t, n) { + return t === "so" ? n.ordinalNumber(r.getUTCSeconds(), { + unit: "second" + }) : tt.s(r, t); + }, + // Fraction of second + S: function(r, t) { + return tt.S(r, t); + }, + // Timezone (ISO-8601. If offset is 0, output is always `'Z'`) + X: function(r, t, n, a) { + var o = a._originalDate || r, i = o.getTimezoneOffset(); + if (i === 0) + return "Z"; + switch (t) { + case "X": + return ri(i); + case "XXXX": + case "XX": + return ht(i); + case "XXXXX": + case "XXX": + default: + return ht(i, ":"); + } + }, + // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent) + x: function(r, t, n, a) { + var o = a._originalDate || r, i = o.getTimezoneOffset(); + switch (t) { + case "x": + return ri(i); + case "xxxx": + case "xx": + return ht(i); + case "xxxxx": + case "xxx": + default: + return ht(i, ":"); + } + }, + // Timezone (GMT) + O: function(r, t, n, a) { + var o = a._originalDate || r, i = o.getTimezoneOffset(); + switch (t) { + case "O": + case "OO": + case "OOO": + return "GMT" + ei(i, ":"); + case "OOOO": + default: + return "GMT" + ht(i, ":"); + } + }, + // Timezone (specific non-location) + z: function(r, t, n, a) { + var o = a._originalDate || r, i = o.getTimezoneOffset(); + switch (t) { + case "z": + case "zz": + case "zzz": + return "GMT" + ei(i, ":"); + case "zzzz": + default: + return "GMT" + ht(i, ":"); + } + }, + // Seconds timestamp + t: function(r, t, n, a) { + var o = a._originalDate || r, i = Math.floor(o.getTime() / 1e3); + return Ce(i, t.length); + }, + // Milliseconds timestamp + T: function(r, t, n, a) { + var o = a._originalDate || r, i = o.getTime(); + return Ce(i, t.length); + } +}; +function ei(e, r) { + var t = e > 0 ? "-" : "+", n = Math.abs(e), a = Math.floor(n / 60), o = n % 60; + if (o === 0) + return t + String(a); + var i = r || ""; + return t + String(a) + i + Ce(o, 2); +} +function ri(e, r) { + if (e % 60 === 0) { + var t = e > 0 ? "-" : "+"; + return t + Ce(Math.abs(e) / 60, 2); + } + return ht(e, r); +} +function ht(e, r) { + var t = r || "", n = e > 0 ? "-" : "+", a = Math.abs(e), o = Ce(Math.floor(a / 60), 2), i = Ce(a % 60, 2); + return n + o + t + i; +} +const ed = Zc; +var ti = function(r, t) { + switch (r) { + case "P": + return t.date({ + width: "short" + }); + case "PP": + return t.date({ + width: "medium" + }); + case "PPP": + return t.date({ + width: "long" + }); + case "PPPP": + default: + return t.date({ + width: "full" + }); + } +}, Ts = function(r, t) { + switch (r) { + case "p": + return t.time({ + width: "short" + }); + case "pp": + return t.time({ + width: "medium" + }); + case "ppp": + return t.time({ + width: "long" + }); + case "pppp": + default: + return t.time({ + width: "full" + }); + } +}, rd = function(r, t) { + var n = r.match(/(P+)(p+)?/) || [], a = n[1], o = n[2]; + if (!o) + return ti(r, t); + var i; + switch (a) { + case "P": + i = t.dateTime({ + width: "short" + }); + break; + case "PP": + i = t.dateTime({ + width: "medium" + }); + break; + case "PPP": + i = t.dateTime({ + width: "long" + }); + break; + case "PPPP": + default: + i = t.dateTime({ + width: "full" + }); + break; + } + return i.replace("{{date}}", ti(a, t)).replace("{{time}}", Ts(o, t)); +}, td = { + p: Ts, + P: rd +}; +const nd = td; +var ad = ["D", "DD"], od = ["YY", "YYYY"]; +function id(e) { + return ad.indexOf(e) !== -1; +} +function sd(e) { + return od.indexOf(e) !== -1; +} +function ni(e, r, t) { + if (e === "YYYY") + throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(r, "`) for formatting years to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md")); + if (e === "YY") + throw new RangeError("Use `yy` instead of `YY` (in `".concat(r, "`) for formatting years to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md")); + if (e === "D") + throw new RangeError("Use `d` instead of `D` (in `".concat(r, "`) for formatting days of the month to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md")); + if (e === "DD") + throw new RangeError("Use `dd` instead of `DD` (in `".concat(r, "`) for formatting days of the month to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md")); +} +var ld = { + lessThanXSeconds: { + one: "less than a second", + other: "less than {{count}} seconds" + }, + xSeconds: { + one: "1 second", + other: "{{count}} seconds" + }, + halfAMinute: "half a minute", + lessThanXMinutes: { + one: "less than a minute", + other: "less than {{count}} minutes" + }, + xMinutes: { + one: "1 minute", + other: "{{count}} minutes" + }, + aboutXHours: { + one: "about 1 hour", + other: "about {{count}} hours" + }, + xHours: { + one: "1 hour", + other: "{{count}} hours" + }, + xDays: { + one: "1 day", + other: "{{count}} days" + }, + aboutXWeeks: { + one: "about 1 week", + other: "about {{count}} weeks" + }, + xWeeks: { + one: "1 week", + other: "{{count}} weeks" + }, + aboutXMonths: { + one: "about 1 month", + other: "about {{count}} months" + }, + xMonths: { + one: "1 month", + other: "{{count}} months" + }, + aboutXYears: { + one: "about 1 year", + other: "about {{count}} years" + }, + xYears: { + one: "1 year", + other: "{{count}} years" + }, + overXYears: { + one: "over 1 year", + other: "over {{count}} years" + }, + almostXYears: { + one: "almost 1 year", + other: "almost {{count}} years" + } +}, cd = function(r, t, n) { + var a, o = ld[r]; + return typeof o == "string" ? a = o : t === 1 ? a = o.one : a = o.other.replace("{{count}}", t.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + a : a + " ago" : a; +}; +const dd = cd; +function Pa(e) { + return function() { + var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = r.width ? String(r.width) : e.defaultWidth, n = e.formats[t] || e.formats[e.defaultWidth]; + return n; + }; +} +var ud = { + full: "EEEE, MMMM do, y", + long: "MMMM do, y", + medium: "MMM d, y", + short: "MM/dd/yyyy" +}, fd = { + full: "h:mm:ss a zzzz", + long: "h:mm:ss a z", + medium: "h:mm:ss a", + short: "h:mm a" +}, md = { + full: "{{date}} 'at' {{time}}", + long: "{{date}} 'at' {{time}}", + medium: "{{date}}, {{time}}", + short: "{{date}}, {{time}}" +}, hd = { + date: Pa({ + formats: ud, + defaultWidth: "full" + }), + time: Pa({ + formats: fd, + defaultWidth: "full" + }), + dateTime: Pa({ + formats: md, + defaultWidth: "full" + }) +}; +const vd = hd; +var gd = { + lastWeek: "'last' eeee 'at' p", + yesterday: "'yesterday at' p", + today: "'today at' p", + tomorrow: "'tomorrow at' p", + nextWeek: "eeee 'at' p", + other: "P" +}, bd = function(r, t, n, a) { + return gd[r]; +}; +const pd = bd; +function Jt(e) { + return function(r, t) { + var n = t != null && t.context ? String(t.context) : "standalone", a; + if (n === "formatting" && e.formattingValues) { + var o = e.defaultFormattingWidth || e.defaultWidth, i = t != null && t.width ? String(t.width) : o; + a = e.formattingValues[i] || e.formattingValues[o]; + } else { + var u = e.defaultWidth, h = t != null && t.width ? String(t.width) : e.defaultWidth; + a = e.values[h] || e.values[u]; + } + var v = e.argumentCallback ? e.argumentCallback(r) : r; + return a[v]; + }; +} +var yd = { + narrow: ["B", "A"], + abbreviated: ["BC", "AD"], + wide: ["Before Christ", "Anno Domini"] +}, Sd = { + narrow: ["1", "2", "3", "4"], + abbreviated: ["Q1", "Q2", "Q3", "Q4"], + wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"] +}, xd = { + narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], + abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] +}, _d = { + narrow: ["S", "M", "T", "W", "T", "F", "S"], + short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] +}, wd = { + narrow: { + am: "a", + pm: "p", + midnight: "mi", + noon: "n", + morning: "morning", + afternoon: "afternoon", + evening: "evening", + night: "night" + }, + abbreviated: { + am: "AM", + pm: "PM", + midnight: "midnight", + noon: "noon", + morning: "morning", + afternoon: "afternoon", + evening: "evening", + night: "night" + }, + wide: { + am: "a.m.", + pm: "p.m.", + midnight: "midnight", + noon: "noon", + morning: "morning", + afternoon: "afternoon", + evening: "evening", + night: "night" + } +}, kd = { + narrow: { + am: "a", + pm: "p", + midnight: "mi", + noon: "n", + morning: "in the morning", + afternoon: "in the afternoon", + evening: "in the evening", + night: "at night" + }, + abbreviated: { + am: "AM", + pm: "PM", + midnight: "midnight", + noon: "noon", + morning: "in the morning", + afternoon: "in the afternoon", + evening: "in the evening", + night: "at night" + }, + wide: { + am: "a.m.", + pm: "p.m.", + midnight: "midnight", + noon: "noon", + morning: "in the morning", + afternoon: "in the afternoon", + evening: "in the evening", + night: "at night" + } +}, Cd = function(r, t) { + var n = Number(r), a = n % 100; + if (a > 20 || a < 10) + switch (a % 10) { + case 1: + return n + "st"; + case 2: + return n + "nd"; + case 3: + return n + "rd"; + } + return n + "th"; +}, Td = { + ordinalNumber: Cd, + era: Jt({ + values: yd, + defaultWidth: "wide" + }), + quarter: Jt({ + values: Sd, + defaultWidth: "wide", + argumentCallback: function(r) { + return r - 1; + } + }), + month: Jt({ + values: xd, + defaultWidth: "wide" + }), + day: Jt({ + values: _d, + defaultWidth: "wide" + }), + dayPeriod: Jt({ + values: wd, + defaultWidth: "wide", + formattingValues: kd, + defaultFormattingWidth: "wide" + }) +}; +const Ed = Td; +function Zt(e) { + return function(r) { + var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.width, a = n && e.matchPatterns[n] || e.matchPatterns[e.defaultMatchWidth], o = r.match(a); + if (!o) + return null; + var i = o[0], u = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], h = Array.isArray(u) ? Rd(u, function(b) { + return b.test(i); + }) : $d(u, function(b) { + return b.test(i); + }), v; + v = e.valueCallback ? e.valueCallback(h) : h, v = t.valueCallback ? t.valueCallback(v) : v; + var S = r.slice(i.length); + return { + value: v, + rest: S + }; + }; +} +function $d(e, r) { + for (var t in e) + if (e.hasOwnProperty(t) && r(e[t])) + return t; +} +function Rd(e, r) { + for (var t = 0; t < e.length; t++) + if (r(e[t])) + return t; +} +function Pd(e) { + return function(r) { + var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = r.match(e.matchPattern); + if (!n) + return null; + var a = n[0], o = r.match(e.parsePattern); + if (!o) + return null; + var i = e.valueCallback ? e.valueCallback(o[0]) : o[0]; + i = t.valueCallback ? t.valueCallback(i) : i; + var u = r.slice(a.length); + return { + value: i, + rest: u + }; + }; +} +var Fd = /^(\d+)(th|st|nd|rd)?/i, Ad = /\d+/i, Nd = { + narrow: /^(b|a)/i, + abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i, + wide: /^(before christ|before common era|anno domini|common era)/i +}, Dd = { + any: [/^b/i, /^(a|c)/i] +}, zd = { + narrow: /^[1234]/i, + abbreviated: /^q[1234]/i, + wide: /^[1234](th|st|nd|rd)? quarter/i +}, Od = { + any: [/1/i, /2/i, /3/i, /4/i] +}, Id = { + narrow: /^[jfmasond]/i, + abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i, + wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i +}, Bd = { + narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i], + any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i] +}, Md = { + narrow: /^[smtwf]/i, + short: /^(su|mo|tu|we|th|fr|sa)/i, + abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i, + wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i +}, Wd = { + narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i], + any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i] +}, Ld = { + narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i, + any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i +}, jd = { + any: { + am: /^a/i, + pm: /^p/i, + midnight: /^mi/i, + noon: /^no/i, + morning: /morning/i, + afternoon: /afternoon/i, + evening: /evening/i, + night: /night/i + } +}, Vd = { + ordinalNumber: Pd({ + matchPattern: Fd, + parsePattern: Ad, + valueCallback: function(r) { + return parseInt(r, 10); + } + }), + era: Zt({ + matchPatterns: Nd, + defaultMatchWidth: "wide", + parsePatterns: Dd, + defaultParseWidth: "any" + }), + quarter: Zt({ + matchPatterns: zd, + defaultMatchWidth: "wide", + parsePatterns: Od, + defaultParseWidth: "any", + valueCallback: function(r) { + return r + 1; + } + }), + month: Zt({ + matchPatterns: Id, + defaultMatchWidth: "wide", + parsePatterns: Bd, + defaultParseWidth: "any" + }), + day: Zt({ + matchPatterns: Md, + defaultMatchWidth: "wide", + parsePatterns: Wd, + defaultParseWidth: "any" + }), + dayPeriod: Zt({ + matchPatterns: Ld, + defaultMatchWidth: "any", + parsePatterns: jd, + defaultParseWidth: "any" + }) +}; +const Ud = Vd; +var Hd = { + code: "en-US", + formatDistance: dd, + formatLong: vd, + formatRelative: pd, + localize: Ed, + match: Ud, + options: { + weekStartsOn: 0, + firstWeekContainsDate: 1 + } +}; +const Yd = Hd; +var qd = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Gd = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Xd = /^'([^]*?)'?$/, Qd = /''/g, Kd = /[a-zA-Z]/; +function ai(e, r, t) { + var n, a, o, i, u, h, v, S, b, _, C, R, Y, L, O, w, q, ie; + lr(2, arguments); + var M = String(r), Q = ma(), K = (n = (a = t == null ? void 0 : t.locale) !== null && a !== void 0 ? a : Q.locale) !== null && n !== void 0 ? n : Yd, re = _t((o = (i = (u = (h = t == null ? void 0 : t.firstWeekContainsDate) !== null && h !== void 0 ? h : t == null || (v = t.locale) === null || v === void 0 || (S = v.options) === null || S === void 0 ? void 0 : S.firstWeekContainsDate) !== null && u !== void 0 ? u : Q.firstWeekContainsDate) !== null && i !== void 0 ? i : (b = Q.locale) === null || b === void 0 || (_ = b.options) === null || _ === void 0 ? void 0 : _.firstWeekContainsDate) !== null && o !== void 0 ? o : 1); + if (!(re >= 1 && re <= 7)) + throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively"); + var fe = _t((C = (R = (Y = (L = t == null ? void 0 : t.weekStartsOn) !== null && L !== void 0 ? L : t == null || (O = t.locale) === null || O === void 0 || (w = O.options) === null || w === void 0 ? void 0 : w.weekStartsOn) !== null && Y !== void 0 ? Y : Q.weekStartsOn) !== null && R !== void 0 ? R : (q = Q.locale) === null || q === void 0 || (ie = q.options) === null || ie === void 0 ? void 0 : ie.weekStartsOn) !== null && C !== void 0 ? C : 0); + if (!(fe >= 0 && fe <= 6)) + throw new RangeError("weekStartsOn must be between 0 and 6 inclusively"); + if (!K.localize) + throw new RangeError("locale must contain localize property"); + if (!K.formatLong) + throw new RangeError("locale must contain formatLong property"); + var Ee = Lr(e); + if (!jc(Ee)) + throw new RangeError("Invalid time value"); + var me = Wc(Ee), J = Vc(Ee, me), I = { + firstWeekContainsDate: re, + weekStartsOn: fe, + locale: K, + _originalDate: Ee + }, Z = M.match(Gd).map(function(ee) { + var se = ee[0]; + if (se === "p" || se === "P") { + var ye = nd[se]; + return ye(ee, K.formatLong); + } + return ee; + }).join("").match(qd).map(function(ee) { + if (ee === "''") + return "'"; + var se = ee[0]; + if (se === "'") + return Jd(ee); + var ye = ed[se]; + if (ye) + return !(t != null && t.useAdditionalWeekYearTokens) && sd(ee) && ni(ee, r, String(e)), !(t != null && t.useAdditionalDayOfYearTokens) && id(ee) && ni(ee, r, String(e)), ye(J, ee, K.localize, I); + if (se.match(Kd)) + throw new RangeError("Format string contains an unescaped latin alphabet character `" + se + "`"); + return ee; + }).join(""); + return Z; +} +function Jd(e) { + var r = e.match(Xd); + return r ? r[1].replace(Qd, "'") : e; +} +const Es = ve((e, r) => { + const { election: t } = lt(), n = ir("ElectionTitle", e), a = sr(e); + return t ? /* @__PURE__ */ U(ne.h1, { ref: r, ...a, __css: n, children: t.title.default }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/parts.tsx", + lineNumber: 26, + columnNumber: 5 + }, globalThis) : null; +}); +Es.displayName = "ElectionTitle"; +const Zd = (e) => { + const r = ir("ElectionHeader", e), { election: t } = lt(); + return !t || t && !t.header ? null : /* @__PURE__ */ U(So, { src: t.header, sx: r, ...e }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/parts.tsx", + lineNumber: 39, + columnNumber: 10 + }, globalThis); +}, eu = (e) => { + const r = ir("ElectionDescription", e), { election: t } = lt(); + return !t || t && !t.description ? null : /* @__PURE__ */ U(fa, { ...e, sx: r, children: t.description.default }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/parts.tsx", + lineNumber: 49, + columnNumber: 5 + }, globalThis); +}, $s = ve(({ format: e, ...r }, t) => { + const n = Mr("ElectionSchedule", r), { election: a } = lt(); + let o = e; + return o || (o = "d-L-y HH:mm"), a ? /* @__PURE__ */ U(ne.h2, { __css: n, ...r, children: [ + "Voting period ", + ai(new Date(a.startDate), o), + " ~ ", + ai(new Date(a.endDate), o) + ] }, void 0, !0, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/parts.tsx", + lineNumber: 71, + columnNumber: 5 + }, globalThis) : null; +}); +$s.displayName = "ElectionSchedule"; +const ru = (e) => { + const { election: r, trans: t } = lt(); + if (!r) + return null; + const n = { + PROCESS_UNKNOWN: "Unknown", + UPCOMING: "Upcoming", + ONGOING: "Ongoing", + ENDED: "Ended", + CANCELED: "Canceled", + PAUSED: "Paused", + RESULTS: "Results" + }; + let { colorScheme: a } = e; + return a || (a = "green", [on.PAUSED, on.ENDED].includes(r.status) && (a = "yellow"), [on.CANCELED, on.PROCESS_UNKNOWN].includes(r.status) && (a = "red")), /* @__PURE__ */ U(yo, { sx: { textTransform: "capitalize" }, colorScheme: a, ...e, children: t(r.status, n[r.status]) }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/parts.tsx", + lineNumber: 107, + columnNumber: 5 + }, globalThis); +}; +function tu(e) { + return /* @__PURE__ */ N(Zr, { viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ N( + "path", + { + fill: "currentColor", + d: "M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z" + } + ) }); +} +function nu(e) { + return /* @__PURE__ */ N(Zr, { viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ N( + "path", + { + fill: "currentColor", + d: "M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z" + } + ) }); +} +function oi(e) { + return /* @__PURE__ */ N(Zr, { viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ N( + "path", + { + fill: "currentColor", + d: "M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z" + } + ) }); +} +var au = tc({ + "0%": { + transform: "rotate(0deg)" + }, + "100%": { + transform: "rotate(360deg)" + } +}), wo = ve((e, r) => { + const t = ir("Spinner", e), { + label: n = "Loading...", + thickness: a = "2px", + speed: o = "0.45s", + emptyColor: i = "transparent", + className: u, + ...h + } = sr(e), v = qe("chakra-spinner", u), S = { + display: "inline-block", + borderColor: "currentColor", + borderStyle: "solid", + borderRadius: "99999px", + borderWidth: a, + borderBottomColor: i, + borderLeftColor: i, + animation: `${au} ${o} linear infinite`, + ...t + }; + return /* @__PURE__ */ N( + ne.div, + { + ref: r, + __css: S, + className: v, + ...h, + children: n && /* @__PURE__ */ N(ne.span, { srOnly: !0, children: n }) + } + ); +}); +wo.displayName = "Spinner"; +var [ou, iu] = Wr({ + name: "AlertContext", + hookName: "useAlertContext", + providerName: "" +}), [su, lu] = Wr({ + name: "AlertStylesContext", + hookName: "useAlertStyles", + providerName: "" +}), Rs = { + info: { icon: nu, colorScheme: "blue" }, + warning: { icon: oi, colorScheme: "orange" }, + success: { icon: tu, colorScheme: "green" }, + error: { icon: oi, colorScheme: "red" }, + loading: { icon: wo, colorScheme: "blue" } +}; +function cu(e) { + return Rs[e].colorScheme; +} +function du(e) { + return Rs[e].icon; +} +function ro(e) { + const { status: r } = iu(), t = du(r), n = lu(), a = r === "loading" ? n.spinner : n.icon; + return /* @__PURE__ */ N( + ne.span, + { + display: "inherit", + "data-status": r, + ...e, + className: qe("chakra-alert__icon", e.className), + __css: a, + children: e.children || /* @__PURE__ */ N(t, { h: "100%", w: "100%" }) + } + ); +} +ro.displayName = "AlertIcon"; +var jn = ve(function(r, t) { + var n; + const { status: a = "info", addRole: o = !0, ...i } = sr(r), u = (n = r.colorScheme) != null ? n : cu(a), h = Mr("Alert", { ...r, colorScheme: u }), v = { + width: "100%", + display: "flex", + alignItems: "center", + position: "relative", + overflow: "hidden", + ...h.container + }; + return /* @__PURE__ */ N(ou, { value: { status: a }, children: /* @__PURE__ */ N(su, { value: h, children: /* @__PURE__ */ N( + ne.div, + { + "data-status": a, + role: o ? "alert" : void 0, + ref: t, + ...i, + className: qe("chakra-alert", r.className), + __css: v + } + ) }) }); +}); +jn.displayName = "Alert"; +var xn = (e) => e.type === "checkbox", Ft = (e) => e instanceof Date, nr = (e) => e == null; +const Ps = (e) => typeof e == "object"; +var Ue = (e) => !nr(e) && !Array.isArray(e) && Ps(e) && !Ft(e), Fs = (e) => Ue(e) && e.target ? xn(e.target) ? e.target.checked : e.target.value : e, uu = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, As = (e, r) => e.has(uu(r)), fu = (e) => { + const r = e.constructor && e.constructor.prototype; + return Ue(r) && r.hasOwnProperty("isPrototypeOf"); +}, ko = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u"; +function qr(e) { + let r; + const t = Array.isArray(e); + if (e instanceof Date) + r = new Date(e); + else if (e instanceof Set) + r = new Set(e); + else if (!(ko && (e instanceof Blob || e instanceof FileList)) && (t || Ue(e))) + if (r = t ? [] : {}, !Array.isArray(e) && !fu(e)) + r = e; + else + for (const n in e) + r[n] = qr(e[n]); + else + return e; + return r; +} +var _n = (e) => Array.isArray(e) ? e.filter(Boolean) : [], Le = (e) => e === void 0, z = (e, r, t) => { + if (!r || !Ue(e)) + return t; + const n = _n(r.split(/[,[\].]+?/)).reduce((a, o) => nr(a) ? a : a[o], e); + return Le(n) || n === e ? Le(e[r]) ? t : e[r] : n; +}; +const Jn = { + BLUR: "blur", + FOCUS_OUT: "focusout", + CHANGE: "change" +}, Rr = { + onBlur: "onBlur", + onChange: "onChange", + onSubmit: "onSubmit", + onTouched: "onTouched", + all: "all" +}, Hr = { + max: "max", + min: "min", + maxLength: "maxLength", + minLength: "minLength", + pattern: "pattern", + required: "required", + validate: "validate" +}, Ns = Be.createContext(null), ha = () => Be.useContext(Ns), mu = (e) => { + const { children: r, ...t } = e; + return Be.createElement(Ns.Provider, { value: t }, r); +}; +var Ds = (e, r, t, n = !0) => { + const a = { + defaultValues: r._defaultValues + }; + for (const o in e) + Object.defineProperty(a, o, { + get: () => { + const i = o; + return r._proxyFormState[i] !== Rr.all && (r._proxyFormState[i] = !n || Rr.all), t && (t[i] = !0), e[i]; + } + }); + return a; +}, Cr = (e) => Ue(e) && !Object.keys(e).length, zs = (e, r, t, n) => { + t(e); + const { name: a, ...o } = e; + return Cr(o) || Object.keys(o).length >= Object.keys(r).length || Object.keys(o).find((i) => r[i] === (!n || Rr.all)); +}, Vn = (e) => Array.isArray(e) ? e : [e], Os = (e, r, t) => t && r ? e === r : !e || !r || e === r || Vn(e).some((n) => n && (n.startsWith(r) || r.startsWith(n))); +function Co(e) { + const r = Be.useRef(e); + r.current = e, Be.useEffect(() => { + const t = !e.disabled && r.current.subject && r.current.subject.subscribe({ + next: r.current.next + }); + return () => { + t && t.unsubscribe(); + }; + }, [e.disabled]); +} +function hu(e) { + const r = ha(), { control: t = r.control, disabled: n, name: a, exact: o } = e || {}, [i, u] = Be.useState(t._formState), h = Be.useRef(!0), v = Be.useRef({ + isDirty: !1, + isLoading: !1, + dirtyFields: !1, + touchedFields: !1, + isValidating: !1, + isValid: !1, + errors: !1 + }), S = Be.useRef(a); + return S.current = a, Co({ + disabled: n, + next: (b) => h.current && Os(S.current, b.name, o) && zs(b, v.current, t._updateFormState) && u({ + ...t._formState, + ...b + }), + subject: t._subjects.state + }), Be.useEffect(() => (h.current = !0, v.current.isValid && t._updateValid(!0), () => { + h.current = !1; + }), [t]), Ds(i, t, v.current, !1); +} +var Ir = (e) => typeof e == "string", Is = (e, r, t, n, a) => Ir(e) ? (n && r.watch.add(e), z(t, e, a)) : Array.isArray(e) ? e.map((o) => (n && r.watch.add(o), z(t, o))) : (n && (r.watchAll = !0), t); +function vu(e) { + const r = ha(), { control: t = r.control, name: n, defaultValue: a, disabled: o, exact: i } = e || {}, u = Be.useRef(n); + u.current = n, Co({ + disabled: o, + subject: t._subjects.values, + next: (S) => { + Os(u.current, S.name, i) && v(qr(Is(u.current, t._names, S.values || t._formValues, !1, a))); + } + }); + const [h, v] = Be.useState(t._getWatch(n, a)); + return Be.useEffect(() => t._removeUnmounted()), h; +} +var To = (e) => /^\w*$/.test(e), Bs = (e) => _n(e.replace(/["|']|\]/g, "").split(/\.|\[/)); +function Fe(e, r, t) { + let n = -1; + const a = To(r) ? [r] : Bs(r), o = a.length, i = o - 1; + for (; ++n < o; ) { + const u = a[n]; + let h = t; + if (n !== i) { + const v = e[u]; + h = Ue(v) || Array.isArray(v) ? v : isNaN(+a[n + 1]) ? {} : []; + } + e[u] = h, e = e[u]; + } + return e; +} +function gu(e) { + const r = ha(), { name: t, control: n = r.control, shouldUnregister: a } = e, o = As(n._names.array, t), i = vu({ + control: n, + name: t, + defaultValue: z(n._formValues, t, z(n._defaultValues, t, e.defaultValue)), + exact: !0 + }), u = hu({ + control: n, + name: t + }), h = Be.useRef(n.register(t, { + ...e.rules, + value: i + })); + return Be.useEffect(() => { + const v = n._options.shouldUnregister || a, S = (b, _) => { + const C = z(n._fields, b); + C && (C._f.mount = _); + }; + if (S(t, !0), v) { + const b = qr(z(n._options.defaultValues, t)); + Fe(n._defaultValues, t, b), Le(z(n._formValues, t)) && Fe(n._formValues, t, b); + } + return () => { + (o ? v && !n._state.action : v) ? n.unregister(t) : S(t, !1); + }; + }, [t, n, o, a]), { + field: { + name: t, + value: i, + onChange: Be.useCallback((v) => h.current.onChange({ + target: { + value: Fs(v), + name: t + }, + type: Jn.CHANGE + }), [t]), + onBlur: Be.useCallback(() => h.current.onBlur({ + target: { + value: z(n._formValues, t), + name: t + }, + type: Jn.BLUR + }), [t, n]), + ref: (v) => { + const S = z(n._fields, t); + S && v && (S._f.ref = { + focus: () => v.focus(), + select: () => v.select(), + setCustomValidity: (b) => v.setCustomValidity(b), + reportValidity: () => v.reportValidity() + }); + } + }, + formState: u, + fieldState: Object.defineProperties({}, { + invalid: { + enumerable: !0, + get: () => !!z(u.errors, t) + }, + isDirty: { + enumerable: !0, + get: () => !!z(u.dirtyFields, t) + }, + isTouched: { + enumerable: !0, + get: () => !!z(u.touchedFields, t) + }, + error: { + enumerable: !0, + get: () => z(u.errors, t) + } + }) + }; +} +const bu = (e) => e.render(gu(e)); +var pu = (e, r, t, n, a) => r ? { + ...t[e], + types: { + ...t[e] && t[e].types ? t[e].types : {}, + [n]: a || !0 + } +} : {}; +const to = (e, r, t) => { + for (const n of t || Object.keys(e)) { + const a = z(e, n); + if (a) { + const { _f: o, ...i } = a; + if (o && r(o.name)) { + if (o.ref.focus) { + o.ref.focus(); + break; + } else if (o.refs && o.refs[0].focus) { + o.refs[0].focus(); + break; + } + } else + Ue(i) && to(i, r); + } + } +}; +var ii = (e) => ({ + isOnSubmit: !e || e === Rr.onSubmit, + isOnBlur: e === Rr.onBlur, + isOnChange: e === Rr.onChange, + isOnAll: e === Rr.all, + isOnTouch: e === Rr.onTouched +}), si = (e, r, t) => !t && (r.watchAll || r.watch.has(e) || [...r.watch].some((n) => e.startsWith(n) && /^\.\w+/.test(e.slice(n.length)))), yu = (e, r, t) => { + const n = _n(z(e, t)); + return Fe(n, "root", r[t]), Fe(e, t, n), e; +}, Dt = (e) => typeof e == "boolean", Eo = (e) => e.type === "file", st = (e) => typeof e == "function", Zn = (e) => { + if (!ko) + return !1; + const r = e ? e.ownerDocument : 0; + return e instanceof (r && r.defaultView ? r.defaultView.HTMLElement : HTMLElement); +}, Un = (e) => Ir(e), $o = (e) => e.type === "radio", ea = (e) => e instanceof RegExp; +const li = { + value: !1, + isValid: !1 +}, ci = { value: !0, isValid: !0 }; +var Ms = (e) => { + if (Array.isArray(e)) { + if (e.length > 1) { + const r = e.filter((t) => t && t.checked && !t.disabled).map((t) => t.value); + return { value: r, isValid: !!r.length }; + } + return e[0].checked && !e[0].disabled ? ( + // @ts-expect-error expected to work in the browser + e[0].attributes && !Le(e[0].attributes.value) ? Le(e[0].value) || e[0].value === "" ? ci : { value: e[0].value, isValid: !0 } : ci + ) : li; + } + return li; +}; +const di = { + isValid: !1, + value: null +}; +var Ws = (e) => Array.isArray(e) ? e.reduce((r, t) => t && t.checked && !t.disabled ? { + isValid: !0, + value: t.value +} : r, di) : di; +function ui(e, r, t = "validate") { + if (Un(e) || Array.isArray(e) && e.every(Un) || Dt(e) && !e) + return { + type: t, + message: Un(e) ? e : "", + ref: r + }; +} +var $t = (e) => Ue(e) && !ea(e) ? e : { + value: e, + message: "" +}, fi = async (e, r, t, n, a) => { + const { ref: o, refs: i, required: u, maxLength: h, minLength: v, min: S, max: b, pattern: _, validate: C, name: R, valueAsNumber: Y, mount: L, disabled: O } = e._f, w = z(r, R); + if (!L || O) + return {}; + const q = i ? i[0] : o, ie = (J) => { + n && q.reportValidity && (q.setCustomValidity(Dt(J) ? "" : J || ""), q.reportValidity()); + }, M = {}, Q = $o(o), K = xn(o), re = Q || K, fe = (Y || Eo(o)) && Le(o.value) && Le(w) || Zn(o) && o.value === "" || w === "" || Array.isArray(w) && !w.length, Ee = pu.bind(null, R, t, M), me = (J, I, Z, ee = Hr.maxLength, se = Hr.minLength) => { + const ye = J ? I : Z; + M[R] = { + type: J ? ee : se, + message: ye, + ref: o, + ...Ee(J ? ee : se, ye) + }; + }; + if (a ? !Array.isArray(w) || !w.length : u && (!re && (fe || nr(w)) || Dt(w) && !w || K && !Ms(i).isValid || Q && !Ws(i).isValid)) { + const { value: J, message: I } = Un(u) ? { value: !!u, message: u } : $t(u); + if (J && (M[R] = { + type: Hr.required, + message: I, + ref: q, + ...Ee(Hr.required, I) + }, !t)) + return ie(I), M; + } + if (!fe && (!nr(S) || !nr(b))) { + let J, I; + const Z = $t(b), ee = $t(S); + if (!nr(w) && !isNaN(w)) { + const se = o.valueAsNumber || w && +w; + nr(Z.value) || (J = se > Z.value), nr(ee.value) || (I = se < ee.value); + } else { + const se = o.valueAsDate || new Date(w), ye = (Me) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + Me), Ye = o.type == "time", Ve = o.type == "week"; + Ir(Z.value) && w && (J = Ye ? ye(w) > ye(Z.value) : Ve ? w > Z.value : se > new Date(Z.value)), Ir(ee.value) && w && (I = Ye ? ye(w) < ye(ee.value) : Ve ? w < ee.value : se < new Date(ee.value)); + } + if ((J || I) && (me(!!J, Z.message, ee.message, Hr.max, Hr.min), !t)) + return ie(M[R].message), M; + } + if ((h || v) && !fe && (Ir(w) || a && Array.isArray(w))) { + const J = $t(h), I = $t(v), Z = !nr(J.value) && w.length > +J.value, ee = !nr(I.value) && w.length < +I.value; + if ((Z || ee) && (me(Z, J.message, I.message), !t)) + return ie(M[R].message), M; + } + if (_ && !fe && Ir(w)) { + const { value: J, message: I } = $t(_); + if (ea(J) && !w.match(J) && (M[R] = { + type: Hr.pattern, + message: I, + ref: o, + ...Ee(Hr.pattern, I) + }, !t)) + return ie(I), M; + } + if (C) { + if (st(C)) { + const J = await C(w, r), I = ui(J, q); + if (I && (M[R] = { + ...I, + ...Ee(Hr.validate, I.message) + }, !t)) + return ie(I.message), M; + } else if (Ue(C)) { + let J = {}; + for (const I in C) { + if (!Cr(J) && !t) + break; + const Z = ui(await C[I](w, r), q, I); + Z && (J = { + ...Z, + ...Ee(I, Z.message) + }, ie(Z.message), t && (M[R] = J)); + } + if (!Cr(J) && (M[R] = { + ref: q, + ...J + }, !t)) + return M; + } + } + return ie(!0), M; +}; +function Su(e, r) { + const t = r.slice(0, -1).length; + let n = 0; + for (; n < t; ) + e = Le(e) ? n++ : e[r[n++]]; + return e; +} +function xu(e) { + for (const r in e) + if (!Le(e[r])) + return !1; + return !0; +} +function Qe(e, r) { + const t = Array.isArray(r) ? r : To(r) ? [r] : Bs(r), n = t.length === 1 ? e : Su(e, t), a = t.length - 1, o = t[a]; + return n && delete n[o], a !== 0 && (Ue(n) && Cr(n) || Array.isArray(n) && xu(n)) && Qe(e, t.slice(0, -1)), e; +} +function Fa() { + let e = []; + return { + get observers() { + return e; + }, + next: (a) => { + for (const o of e) + o.next && o.next(a); + }, + subscribe: (a) => (e.push(a), { + unsubscribe: () => { + e = e.filter((o) => o !== a); + } + }), + unsubscribe: () => { + e = []; + } + }; +} +var ra = (e) => nr(e) || !Ps(e); +function gt(e, r) { + if (ra(e) || ra(r)) + return e === r; + if (Ft(e) && Ft(r)) + return e.getTime() === r.getTime(); + const t = Object.keys(e), n = Object.keys(r); + if (t.length !== n.length) + return !1; + for (const a of t) { + const o = e[a]; + if (!n.includes(a)) + return !1; + if (a !== "ref") { + const i = r[a]; + if (Ft(o) && Ft(i) || Ue(o) && Ue(i) || Array.isArray(o) && Array.isArray(i) ? !gt(o, i) : o !== i) + return !1; + } + } + return !0; +} +var Ls = (e) => e.type === "select-multiple", _u = (e) => $o(e) || xn(e), Aa = (e) => Zn(e) && e.isConnected, js = (e) => { + for (const r in e) + if (st(e[r])) + return !0; + return !1; +}; +function ta(e, r = {}) { + const t = Array.isArray(e); + if (Ue(e) || t) + for (const n in e) + Array.isArray(e[n]) || Ue(e[n]) && !js(e[n]) ? (r[n] = Array.isArray(e[n]) ? [] : {}, ta(e[n], r[n])) : nr(e[n]) || (r[n] = !0); + return r; +} +function Vs(e, r, t) { + const n = Array.isArray(e); + if (Ue(e) || n) + for (const a in e) + Array.isArray(e[a]) || Ue(e[a]) && !js(e[a]) ? Le(r) || ra(t[a]) ? t[a] = Array.isArray(e[a]) ? ta(e[a], []) : { ...ta(e[a]) } : Vs(e[a], nr(r) ? {} : r[a], t[a]) : t[a] = !gt(e[a], r[a]); + return t; +} +var Na = (e, r) => Vs(e, r, ta(r)), Us = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: n }) => Le(e) ? e : r ? e === "" ? NaN : e && +e : t && Ir(e) ? new Date(e) : n ? n(e) : e; +function Da(e) { + const r = e.ref; + if (!(e.refs ? e.refs.every((t) => t.disabled) : r.disabled)) + return Eo(r) ? r.files : $o(r) ? Ws(e.refs).value : Ls(r) ? [...r.selectedOptions].map(({ value: t }) => t) : xn(r) ? Ms(e.refs).value : Us(Le(r.value) ? e.ref.value : r.value, e); +} +var wu = (e, r, t, n) => { + const a = {}; + for (const o of e) { + const i = z(r, o); + i && Fe(a, o, i._f); + } + return { + criteriaMode: t, + names: [...e], + fields: a, + shouldUseNativeValidation: n + }; +}, en = (e) => Le(e) ? e : ea(e) ? e.source : Ue(e) ? ea(e.value) ? e.value.source : e.value : e, ku = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate); +function mi(e, r, t) { + const n = z(e, t); + if (n || To(t)) + return { + error: n, + name: t + }; + const a = t.split("."); + for (; a.length; ) { + const o = a.join("."), i = z(r, o), u = z(e, o); + if (i && !Array.isArray(i) && t !== o) + return { name: t }; + if (u && u.type) + return { + name: o, + error: u + }; + a.pop(); + } + return { + name: t + }; +} +var Cu = (e, r, t, n, a) => a.isOnAll ? !1 : !t && a.isOnTouch ? !(r || e) : (t ? n.isOnBlur : a.isOnBlur) ? !e : (t ? n.isOnChange : a.isOnChange) ? e : !0, Tu = (e, r) => !_n(z(e, r)).length && Qe(e, r); +const Eu = { + mode: Rr.onSubmit, + reValidateMode: Rr.onChange, + shouldFocusError: !0 +}; +function $u(e = {}, r) { + let t = { + ...Eu, + ...e + }, n = { + submitCount: 0, + isDirty: !1, + isLoading: st(t.defaultValues), + isValidating: !1, + isSubmitted: !1, + isSubmitting: !1, + isSubmitSuccessful: !1, + isValid: !1, + touchedFields: {}, + dirtyFields: {}, + errors: {} + }, a = {}, o = Ue(t.defaultValues) || Ue(t.values) ? qr(t.defaultValues || t.values) || {} : {}, i = t.shouldUnregister ? {} : qr(o), u = { + action: !1, + mount: !1, + watch: !1 + }, h = { + mount: /* @__PURE__ */ new Set(), + unMount: /* @__PURE__ */ new Set(), + array: /* @__PURE__ */ new Set(), + watch: /* @__PURE__ */ new Set() + }, v, S = 0; + const b = { + isDirty: !1, + dirtyFields: !1, + touchedFields: !1, + isValidating: !1, + isValid: !1, + errors: !1 + }, _ = { + values: Fa(), + array: Fa(), + state: Fa() + }, C = e.resetOptions && e.resetOptions.keepDirtyValues, R = ii(t.mode), Y = ii(t.reValidateMode), L = t.criteriaMode === Rr.all, O = (d) => (p) => { + clearTimeout(S), S = setTimeout(d, p); + }, w = async (d) => { + if (b.isValid || d) { + const p = t.resolver ? Cr((await fe()).errors) : await me(a, !0); + p !== n.isValid && _.state.next({ + isValid: p + }); + } + }, q = (d) => b.isValidating && _.state.next({ + isValidating: d + }), ie = (d, p = [], x, A, F = !0, E = !0) => { + if (A && x) { + if (u.action = !0, E && Array.isArray(z(a, d))) { + const W = x(z(a, d), A.argA, A.argB); + F && Fe(a, d, W); + } + if (E && Array.isArray(z(n.errors, d))) { + const W = x(z(n.errors, d), A.argA, A.argB); + F && Fe(n.errors, d, W), Tu(n.errors, d); + } + if (b.touchedFields && E && Array.isArray(z(n.touchedFields, d))) { + const W = x(z(n.touchedFields, d), A.argA, A.argB); + F && Fe(n.touchedFields, d, W); + } + b.dirtyFields && (n.dirtyFields = Na(o, i)), _.state.next({ + name: d, + isDirty: I(d, p), + dirtyFields: n.dirtyFields, + errors: n.errors, + isValid: n.isValid + }); + } else + Fe(i, d, p); + }, M = (d, p) => { + Fe(n.errors, d, p), _.state.next({ + errors: n.errors + }); + }, Q = (d, p, x, A) => { + const F = z(a, d); + if (F) { + const E = z(i, d, Le(x) ? z(o, d) : x); + Le(E) || A && A.defaultChecked || p ? Fe(i, d, p ? E : Da(F._f)) : se(d, E), u.mount && w(); + } + }, K = (d, p, x, A, F) => { + let E = !1, W = !1; + const de = { + name: d + }; + if (!x || A) { + b.isDirty && (W = n.isDirty, n.isDirty = de.isDirty = I(), E = W !== de.isDirty); + const Te = gt(z(o, d), p); + W = z(n.dirtyFields, d), Te ? Qe(n.dirtyFields, d) : Fe(n.dirtyFields, d, !0), de.dirtyFields = n.dirtyFields, E = E || b.dirtyFields && W !== !Te; + } + if (x) { + const Te = z(n.touchedFields, d); + Te || (Fe(n.touchedFields, d, x), de.touchedFields = n.touchedFields, E = E || b.touchedFields && Te !== x); + } + return E && F && _.state.next(de), E ? de : {}; + }, re = (d, p, x, A) => { + const F = z(n.errors, d), E = b.isValid && Dt(p) && n.isValid !== p; + if (e.delayError && x ? (v = O(() => M(d, x)), v(e.delayError)) : (clearTimeout(S), v = null, x ? Fe(n.errors, d, x) : Qe(n.errors, d)), (x ? !gt(F, x) : F) || !Cr(A) || E) { + const W = { + ...A, + ...E && Dt(p) ? { isValid: p } : {}, + errors: n.errors, + name: d + }; + n = { + ...n, + ...W + }, _.state.next(W); + } + q(!1); + }, fe = async (d) => t.resolver(i, t.context, wu(d || h.mount, a, t.criteriaMode, t.shouldUseNativeValidation)), Ee = async (d) => { + const { errors: p } = await fe(); + if (d) + for (const x of d) { + const A = z(p, x); + A ? Fe(n.errors, x, A) : Qe(n.errors, x); + } + else + n.errors = p; + return p; + }, me = async (d, p, x = { + valid: !0 + }) => { + for (const A in d) { + const F = d[A]; + if (F) { + const { _f: E, ...W } = F; + if (E) { + const de = h.array.has(E.name), Te = await fi(F, i, L, t.shouldUseNativeValidation && !p, de); + if (Te[E.name] && (x.valid = !1, p)) + break; + !p && (z(Te, E.name) ? de ? yu(n.errors, Te, E.name) : Fe(n.errors, E.name, Te[E.name]) : Qe(n.errors, E.name)); + } + W && await me(W, p, x); + } + } + return x.valid; + }, J = () => { + for (const d of h.unMount) { + const p = z(a, d); + p && (p._f.refs ? p._f.refs.every((x) => !Aa(x)) : !Aa(p._f.ref)) && j(d); + } + h.unMount = /* @__PURE__ */ new Set(); + }, I = (d, p) => (d && p && Fe(i, d, p), !gt(er(), o)), Z = (d, p, x) => Is(d, h, { + ...u.mount ? i : Le(p) ? o : Ir(d) ? { [d]: p } : p + }, x, p), ee = (d) => _n(z(u.mount ? i : o, d, e.shouldUnregister ? z(o, d, []) : [])), se = (d, p, x = {}) => { + const A = z(a, d); + let F = p; + if (A) { + const E = A._f; + E && (!E.disabled && Fe(i, d, Us(p, E)), F = Zn(E.ref) && nr(p) ? "" : p, Ls(E.ref) ? [...E.ref.options].forEach((W) => W.selected = F.includes(W.value)) : E.refs ? xn(E.ref) ? E.refs.length > 1 ? E.refs.forEach((W) => (!W.defaultChecked || !W.disabled) && (W.checked = Array.isArray(F) ? !!F.find((de) => de === W.value) : F === W.value)) : E.refs[0] && (E.refs[0].checked = !!F) : E.refs.forEach((W) => W.checked = W.value === F) : Eo(E.ref) ? E.ref.value = "" : (E.ref.value = F, E.ref.type || _.values.next({ + name: d, + values: { ...i } + }))); + } + (x.shouldDirty || x.shouldTouch) && K(d, F, x.shouldTouch, x.shouldDirty, !0), x.shouldValidate && Me(d); + }, ye = (d, p, x) => { + for (const A in p) { + const F = p[A], E = `${d}.${A}`, W = z(a, E); + (h.array.has(d) || !ra(F) || W && !W._f) && !Ft(F) ? ye(E, F, x) : se(E, F, x); + } + }, Ye = (d, p, x = {}) => { + const A = z(a, d), F = h.array.has(d), E = qr(p); + Fe(i, d, E), F ? (_.array.next({ + name: d, + values: { ...i } + }), (b.isDirty || b.dirtyFields) && x.shouldDirty && _.state.next({ + name: d, + dirtyFields: Na(o, i), + isDirty: I(d, E) + })) : A && !A._f && !nr(E) ? ye(d, E, x) : se(d, E, x), si(d, h) && _.state.next({ ...n }), _.values.next({ + name: d, + values: { ...i } + }), !u.mount && r(); + }, Ve = async (d) => { + const p = d.target; + let x = p.name, A = !0; + const F = z(a, x), E = () => p.type ? Da(F._f) : Fs(d); + if (F) { + let W, de; + const Te = E(), tr = d.type === Jn.BLUR || d.type === Jn.FOCUS_OUT, jr = !ku(F._f) && !t.resolver && !z(n.errors, x) && !F._f.deps || Cu(tr, z(n.touchedFields, x), n.isSubmitted, Y, R), Ge = si(x, h, tr); + Fe(i, x, Te), tr ? (F._f.onBlur && F._f.onBlur(d), v && v(0)) : F._f.onChange && F._f.onChange(d); + const Sr = K(x, Te, tr, !1), Fr = !Cr(Sr) || Ge; + if (!tr && _.values.next({ + name: x, + type: d.type, + values: { ...i } + }), jr) + return b.isValid && w(), Fr && _.state.next({ name: x, ...Ge ? {} : Sr }); + if (!tr && Ge && _.state.next({ ...n }), q(!0), t.resolver) { + const { errors: Tr } = await fe([x]), xr = mi(n.errors, a, x), Vr = mi(Tr, a, xr.name || x); + W = Vr.error, x = Vr.name, de = Cr(Tr); + } else + W = (await fi(F, i, L, t.shouldUseNativeValidation))[x], A = isNaN(Te) || Te === z(i, x, Te), A && (W ? de = !1 : b.isValid && (de = await me(a, !0))); + A && (F._f.deps && Me(F._f.deps), re(x, de, W, Sr)); + } + }, Me = async (d, p = {}) => { + let x, A; + const F = Vn(d); + if (q(!0), t.resolver) { + const E = await Ee(Le(d) ? d : F); + x = Cr(E), A = d ? !F.some((W) => z(E, W)) : x; + } else + d ? (A = (await Promise.all(F.map(async (E) => { + const W = z(a, E); + return await me(W && W._f ? { [E]: W } : W); + }))).every(Boolean), !(!A && !n.isValid) && w()) : A = x = await me(a); + return _.state.next({ + ...!Ir(d) || b.isValid && x !== n.isValid ? {} : { name: d }, + ...t.resolver || !d ? { isValid: x } : {}, + errors: n.errors, + isValidating: !1 + }), p.shouldFocus && !A && to(a, (E) => E && z(n.errors, E), d ? F : h.mount), A; + }, er = (d) => { + const p = { + ...o, + ...u.mount ? i : {} + }; + return Le(d) ? p : Ir(d) ? z(p, d) : d.map((x) => z(p, x)); + }, rr = (d, p) => ({ + invalid: !!z((p || n).errors, d), + isDirty: !!z((p || n).dirtyFields, d), + isTouched: !!z((p || n).touchedFields, d), + error: z((p || n).errors, d) + }), le = (d) => { + d && Vn(d).forEach((p) => Qe(n.errors, p)), _.state.next({ + errors: d ? n.errors : {} + }); + }, ur = (d, p, x) => { + const A = (z(a, d, { _f: {} })._f || {}).ref; + Fe(n.errors, d, { + ...p, + ref: A + }), _.state.next({ + name: d, + errors: n.errors, + isValid: !1 + }), x && x.shouldFocus && A && A.focus && A.focus(); + }, br = (d, p) => st(d) ? _.values.subscribe({ + next: (x) => d(Z(void 0, p), x) + }) : Z(d, p, !0), j = (d, p = {}) => { + for (const x of d ? Vn(d) : h.mount) + h.mount.delete(x), h.array.delete(x), p.keepValue || (Qe(a, x), Qe(i, x)), !p.keepError && Qe(n.errors, x), !p.keepDirty && Qe(n.dirtyFields, x), !p.keepTouched && Qe(n.touchedFields, x), !t.shouldUnregister && !p.keepDefaultValue && Qe(o, x); + _.values.next({ + values: { ...i } + }), _.state.next({ + ...n, + ...p.keepDirty ? { isDirty: I() } : {} + }), !p.keepIsValid && w(); + }, ce = (d, p = {}) => { + let x = z(a, d); + const A = Dt(p.disabled); + return Fe(a, d, { + ...x || {}, + _f: { + ...x && x._f ? x._f : { ref: { name: d } }, + name: d, + mount: !0, + ...p + } + }), h.mount.add(d), x ? A && Fe(i, d, p.disabled ? void 0 : z(i, d, Da(x._f))) : Q(d, !0, p.value), { + ...A ? { disabled: p.disabled } : {}, + ...t.shouldUseNativeValidation ? { + required: !!p.required, + min: en(p.min), + max: en(p.max), + minLength: en(p.minLength), + maxLength: en(p.maxLength), + pattern: en(p.pattern) + } : {}, + name: d, + onChange: Ve, + onBlur: Ve, + ref: (F) => { + if (F) { + ce(d, p), x = z(a, d); + const E = Le(F.value) && F.querySelectorAll && F.querySelectorAll("input,select,textarea")[0] || F, W = _u(E), de = x._f.refs || []; + if (W ? de.find((Te) => Te === E) : E === x._f.ref) + return; + Fe(a, d, { + _f: { + ...x._f, + ...W ? { + refs: [ + ...de.filter(Aa), + E, + ...Array.isArray(z(o, d)) ? [{}] : [] + ], + ref: { type: E.type, name: d } + } : { ref: E } + } + }), Q(d, !1, void 0, E); + } else + x = z(a, d, {}), x._f && (x._f.mount = !1), (t.shouldUnregister || p.shouldUnregister) && !(As(h.array, d) && u.action) && h.unMount.add(d); + } + }; + }, ae = () => t.shouldFocusError && to(a, (d) => d && z(n.errors, d), h.mount), be = (d, p) => async (x) => { + x && (x.preventDefault && x.preventDefault(), x.persist && x.persist()); + let A = qr(i); + if (_.state.next({ + isSubmitting: !0 + }), t.resolver) { + const { errors: F, values: E } = await fe(); + n.errors = F, A = E; + } else + await me(a); + Qe(n.errors, "root"), Cr(n.errors) ? (_.state.next({ + errors: {} + }), await d(A, x)) : (p && await p({ ...n.errors }, x), ae(), setTimeout(ae)), _.state.next({ + isSubmitted: !0, + isSubmitting: !1, + isSubmitSuccessful: Cr(n.errors), + submitCount: n.submitCount + 1, + errors: n.errors + }); + }, Pe = (d, p = {}) => { + z(a, d) && (Le(p.defaultValue) ? Ye(d, z(o, d)) : (Ye(d, p.defaultValue), Fe(o, d, p.defaultValue)), p.keepTouched || Qe(n.touchedFields, d), p.keepDirty || (Qe(n.dirtyFields, d), n.isDirty = p.defaultValue ? I(d, z(o, d)) : I()), p.keepError || (Qe(n.errors, d), b.isValid && w()), _.state.next({ ...n })); + }, te = (d, p = {}) => { + const x = d || o, A = qr(x), F = d && !Cr(d) ? A : o; + if (p.keepDefaultValues || (o = x), !p.keepValues) { + if (p.keepDirtyValues || C) + for (const E of h.mount) + z(n.dirtyFields, E) ? Fe(F, E, z(i, E)) : Ye(E, z(F, E)); + else { + if (ko && Le(d)) + for (const E of h.mount) { + const W = z(a, E); + if (W && W._f) { + const de = Array.isArray(W._f.refs) ? W._f.refs[0] : W._f.ref; + if (Zn(de)) { + const Te = de.closest("form"); + if (Te) { + Te.reset(); + break; + } + } + } + } + a = {}; + } + i = e.shouldUnregister ? p.keepDefaultValues ? qr(o) : {} : A, _.array.next({ + values: { ...F } + }), _.values.next({ + values: { ...F } + }); + } + h = { + mount: /* @__PURE__ */ new Set(), + unMount: /* @__PURE__ */ new Set(), + array: /* @__PURE__ */ new Set(), + watch: /* @__PURE__ */ new Set(), + watchAll: !1, + focus: "" + }, !u.mount && r(), u.mount = !b.isValid || !!p.keepIsValid, u.watch = !!e.shouldUnregister, _.state.next({ + submitCount: p.keepSubmitCount ? n.submitCount : 0, + isDirty: p.keepDirty ? n.isDirty : !!(p.keepDefaultValues && !gt(d, o)), + isSubmitted: p.keepIsSubmitted ? n.isSubmitted : !1, + dirtyFields: p.keepDirtyValues ? n.dirtyFields : p.keepDefaultValues && d ? Na(o, d) : {}, + touchedFields: p.keepTouched ? n.touchedFields : {}, + errors: p.keepErrors ? n.errors : {}, + isSubmitting: !1, + isSubmitSuccessful: !1 + }); + }, $e = (d, p) => te(st(d) ? d(i) : d, p); + return { + control: { + register: ce, + unregister: j, + getFieldState: rr, + _executeSchema: fe, + _getWatch: Z, + _getDirty: I, + _updateValid: w, + _removeUnmounted: J, + _updateFieldArray: ie, + _getFieldArray: ee, + _reset: te, + _resetDefaultValues: () => st(t.defaultValues) && t.defaultValues().then((d) => { + $e(d, t.resetOptions), _.state.next({ + isLoading: !1 + }); + }), + _updateFormState: (d) => { + n = { + ...n, + ...d + }; + }, + _subjects: _, + _proxyFormState: b, + get _fields() { + return a; + }, + get _formValues() { + return i; + }, + get _state() { + return u; + }, + set _state(d) { + u = d; + }, + get _defaultValues() { + return o; + }, + get _names() { + return h; + }, + set _names(d) { + h = d; + }, + get _formState() { + return n; + }, + set _formState(d) { + n = d; + }, + get _options() { + return t; + }, + set _options(d) { + t = { + ...t, + ...d + }; + } + }, + trigger: Me, + register: ce, + handleSubmit: be, + watch: br, + setValue: Ye, + getValues: er, + reset: $e, + resetField: Pe, + clearErrors: le, + unregister: j, + setError: ur, + setFocus: (d, p = {}) => { + const x = z(a, d), A = x && x._f; + if (A) { + const F = A.refs ? A.refs[0] : A.ref; + F.focus && (F.focus(), p.shouldSelect && F.select()); + } + }, + getFieldState: rr + }; +} +function Ru(e = {}) { + const r = Be.useRef(), [t, n] = Be.useState({ + isDirty: !1, + isValidating: !1, + isLoading: st(e.defaultValues), + isSubmitted: !1, + isSubmitting: !1, + isSubmitSuccessful: !1, + isValid: !1, + submitCount: 0, + dirtyFields: {}, + touchedFields: {}, + errors: {}, + defaultValues: st(e.defaultValues) ? void 0 : e.defaultValues + }); + r.current || (r.current = { + ...$u(e, () => n((o) => ({ ...o }))), + formState: t + }); + const a = r.current.control; + return a._options = e, Co({ + subject: a._subjects.state, + next: (o) => { + zs(o, a._proxyFormState, a._updateFormState, !0) && n({ ...a._formState }); + } + }), Be.useEffect(() => { + e.values && !gt(e.values, a._defaultValues) ? a._reset(e.values, a._options.resetOptions) : a._resetDefaultValues(); + }, [e.values, a]), Be.useEffect(() => { + a._state.mount || (a._updateValid(), a._state.mount = !0), a._state.watch && (a._state.watch = !1, a._subjects.state.next({ ...a._formState })), a._removeUnmounted(); + }), r.current.formState = Ds(t, a), r.current; +} +function Pu(e, r) { + if (e != null) { + if (typeof e == "function") { + e(r); + return; + } + try { + e.current = r; + } catch { + throw new Error(`Cannot assign value '${r}' to ref '${e}'`); + } + } +} +function na(...e) { + return (r) => { + e.forEach((t) => { + Pu(t, r); + }); + }; +} +function Fu(...e) { + return pt(() => na(...e), e); +} +var [Au, Nu] = Wr({ + name: "FormControlStylesContext", + errorMessage: `useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" ` +}), [Du, va] = Wr({ + strict: !1, + name: "FormControlContext" +}); +function zu(e) { + const { + id: r, + isRequired: t, + isInvalid: n, + isDisabled: a, + isReadOnly: o, + ...i + } = e, u = bo(), h = r || `field-${u}`, v = `${h}-label`, S = `${h}-feedback`, b = `${h}-helptext`, [_, C] = ge(!1), [R, Y] = ge(!1), [L, O] = ge(!1), w = Ze( + (K = {}, re = null) => ({ + id: b, + ...K, + ref: na(re, (fe) => { + fe && Y(!0); + }) + }), + [b] + ), q = Ze( + (K = {}, re = null) => ({ + ...K, + ref: re, + "data-focus": We(L), + "data-disabled": We(a), + "data-invalid": We(n), + "data-readonly": We(o), + id: K.id !== void 0 ? K.id : v, + htmlFor: K.htmlFor !== void 0 ? K.htmlFor : h + }), + [h, a, L, n, o, v] + ), ie = Ze( + (K = {}, re = null) => ({ + id: S, + ...K, + ref: na(re, (fe) => { + fe && C(!0); + }), + "aria-live": "polite" + }), + [S] + ), M = Ze( + (K = {}, re = null) => ({ + ...K, + ...i, + ref: re, + role: "group" + }), + [i] + ), Q = Ze( + (K = {}, re = null) => ({ + ...K, + ref: re, + role: "presentation", + "aria-hidden": !0, + children: K.children || "*" + }), + [] + ); + return { + isRequired: !!t, + isInvalid: !!n, + isReadOnly: !!o, + isDisabled: !!a, + isFocused: !!L, + onFocus: () => O(!0), + onBlur: () => O(!1), + hasFeedbackText: _, + setHasFeedbackText: C, + hasHelpText: R, + setHasHelpText: Y, + id: h, + labelId: v, + feedbackId: S, + helpTextId: b, + htmlProps: i, + getHelpTextProps: w, + getErrorMessageProps: ie, + getRootProps: M, + getLabelProps: q, + getRequiredIndicatorProps: Q + }; +} +var Hs = ve( + function(r, t) { + const n = Mr("Form", r), a = sr(r), { + getRootProps: o, + htmlProps: i, + ...u + } = zu(a), h = qe("chakra-form-control", r.className); + return /* @__PURE__ */ N(Du, { value: u, children: /* @__PURE__ */ N(Au, { value: n, children: /* @__PURE__ */ N( + ne.div, + { + ...o({}, t), + className: h, + __css: n.container + } + ) }) }); + } +); +Hs.displayName = "FormControl"; +var Ou = ve( + function(r, t) { + const n = va(), a = Nu(), o = qe("chakra-form__helper-text", r.className); + return /* @__PURE__ */ N( + ne.div, + { + ...n == null ? void 0 : n.getHelpTextProps(r, t), + __css: a.helperText, + className: o + } + ); + } +); +Ou.displayName = "FormHelperText"; +var [Iu, Bu] = Wr({ + name: "FormErrorStylesContext", + errorMessage: `useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" ` +}), Ys = ve( + (e, r) => { + const t = Mr("FormError", e), n = sr(e), a = va(); + return a != null && a.isInvalid ? /* @__PURE__ */ N(Iu, { value: t, children: /* @__PURE__ */ N( + ne.div, + { + ...a == null ? void 0 : a.getErrorMessageProps(n, r), + className: qe("chakra-form__error-message", e.className), + __css: { + display: "flex", + alignItems: "center", + ...t.text + } + } + ) }) : null; + } +); +Ys.displayName = "FormErrorMessage"; +var Mu = ve((e, r) => { + const t = Bu(), n = va(); + if (!(n != null && n.isInvalid)) + return null; + const a = qe("chakra-form__error-icon", e.className); + return /* @__PURE__ */ N( + Zr, + { + ref: r, + "aria-hidden": !0, + ...e, + __css: t.icon, + className: a, + children: /* @__PURE__ */ N( + "path", + { + fill: "currentColor", + d: "M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z" + } + ) + } + ); +}); +Mu.displayName = "FormErrorIcon"; +function Wu(e) { + return e && Mt(e) && Mt(e.target); +} +function Lu(e = {}) { + const { + onChange: r, + value: t, + defaultValue: n, + name: a, + isDisabled: o, + isFocusable: i, + isNative: u, + ...h + } = e, [v, S] = ge(n || ""), b = typeof t < "u", _ = b ? t : v, C = ns(null), R = Ze(() => { + const M = C.current; + if (!M) + return; + let Q = "input:not(:disabled):checked"; + const K = M.querySelector( + Q + ); + if (K) { + K.focus(); + return; + } + Q = "input:not(:disabled)"; + const re = M.querySelector(Q); + re == null || re.focus(); + }, []), L = `radio-${bo()}`, O = a || L, w = Ze( + (M) => { + const Q = Wu(M) ? M.target.value : M; + b || S(Q), r == null || r(String(Q)); + }, + [r, b] + ), q = Ze( + (M = {}, Q = null) => ({ + ...M, + ref: na(Q, C), + role: "radiogroup" + }), + [] + ), ie = Ze( + (M = {}, Q = null) => ({ + ...M, + ref: Q, + name: O, + [u ? "checked" : "isChecked"]: _ != null ? M.value === _ : void 0, + onChange(re) { + w(re); + }, + "data-radiogroup": !0 + }), + [u, O, w, _] + ); + return { + getRootProps: q, + getRadioProps: ie, + name: O, + ref: C, + focus: R, + setValue: S, + value: _, + onChange: w, + isDisabled: o, + isFocusable: i, + htmlProps: h + }; +} +var [ju, qs] = Wr({ + name: "RadioGroupContext", + strict: !1 +}), Gs = ve((e, r) => { + const { + colorScheme: t, + size: n, + variant: a, + children: o, + className: i, + isDisabled: u, + isFocusable: h, + ...v + } = e, { value: S, onChange: b, getRootProps: _, name: C, htmlProps: R } = Lu(v), Y = pt( + () => ({ + name: C, + size: n, + onChange: b, + colorScheme: t, + value: S, + variant: a, + isDisabled: u, + isFocusable: h + }), + [ + C, + n, + b, + t, + S, + a, + u, + h + ] + ); + return /* @__PURE__ */ N(ju, { value: Y, children: /* @__PURE__ */ N( + ne.div, + { + ..._(R, r), + className: qe("chakra-radio-group", i), + children: o + } + ) }); +}); +Gs.displayName = "RadioGroup"; +var hi = !1, wn = null, wt = !1, no = !1, ao = /* @__PURE__ */ new Set(); +function Ro(e, r) { + ao.forEach((t) => t(e, r)); +} +var Vu = typeof window < "u" && window.navigator != null ? /^Mac/.test(window.navigator.platform) : !1; +function Uu(e) { + return !(e.metaKey || !Vu && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta"); +} +function vi(e) { + wt = !0, Uu(e) && (wn = "keyboard", Ro("keyboard", e)); +} +function Rt(e) { + if (wn = "pointer", e.type === "mousedown" || e.type === "pointerdown") { + wt = !0; + const r = e.composedPath ? e.composedPath()[0] : e.target; + let t = !1; + try { + t = r.matches(":focus-visible"); + } catch { + } + if (t) + return; + Ro("pointer", e); + } +} +function Hu(e) { + return e.mozInputSource === 0 && e.isTrusted ? !0 : e.detail === 0 && !e.pointerType; +} +function Yu(e) { + Hu(e) && (wt = !0, wn = "virtual"); +} +function qu(e) { + e.target === window || e.target === document || (!wt && !no && (wn = "virtual", Ro("virtual", e)), wt = !1, no = !1); +} +function Gu() { + wt = !1, no = !0; +} +function gi() { + return wn !== "pointer"; +} +function Xu() { + if (typeof window > "u" || hi) + return; + const { focus: e } = HTMLElement.prototype; + HTMLElement.prototype.focus = function(...t) { + wt = !0, e.apply(this, t); + }, document.addEventListener("keydown", vi, !0), document.addEventListener("keyup", vi, !0), document.addEventListener("click", Yu, !0), window.addEventListener("focus", qu, !0), window.addEventListener("blur", Gu, !1), typeof PointerEvent < "u" ? (document.addEventListener("pointerdown", Rt, !0), document.addEventListener("pointermove", Rt, !0), document.addEventListener("pointerup", Rt, !0)) : (document.addEventListener("mousedown", Rt, !0), document.addEventListener("mousemove", Rt, !0), document.addEventListener("mouseup", Rt, !0)), hi = !0; +} +function Qu(e) { + Xu(), e(gi()); + const r = () => e(gi()); + return ao.add(r), () => { + ao.delete(r); + }; +} +var Ku = { + border: "0", + clip: "rect(0, 0, 0, 0)", + height: "1px", + width: "1px", + margin: "-1px", + padding: "0", + overflow: "hidden", + whiteSpace: "nowrap", + position: "absolute" +}; +function Ju(e = {}) { + const { + defaultChecked: r, + isChecked: t, + isFocusable: n, + isDisabled: a, + isReadOnly: o, + isRequired: i, + onChange: u, + isInvalid: h, + name: v, + value: S, + id: b, + "data-radiogroup": _, + "aria-describedby": C, + ...R + } = e, Y = `radio-${bo()}`, L = va(), w = !!qs() || !!_; + let ie = !!L && !w ? L.id : Y; + ie = b ?? ie; + const M = a ?? (L == null ? void 0 : L.isDisabled), Q = o ?? (L == null ? void 0 : L.isReadOnly), K = i ?? (L == null ? void 0 : L.isRequired), re = h ?? (L == null ? void 0 : L.isInvalid), [fe, Ee] = ge(!1), [me, J] = ge(!1), [I, Z] = ge(!1), [ee, se] = ge(!1), [ye, Ye] = ge(!!r), Ve = typeof t < "u", Me = Ve ? t : ye; + Ke(() => Qu(Ee), []); + const er = Ze( + (te) => { + if (Q || M) { + te.preventDefault(); + return; + } + Ve || Ye(te.target.checked), u == null || u(te); + }, + [Ve, M, Q, u] + ), rr = Ze( + (te) => { + te.key === " " && se(!0); + }, + [se] + ), le = Ze( + (te) => { + te.key === " " && se(!1); + }, + [se] + ), ur = Ze( + (te = {}, $e = null) => ({ + ...te, + ref: $e, + "data-active": We(ee), + "data-hover": We(I), + "data-disabled": We(M), + "data-invalid": We(re), + "data-checked": We(Me), + "data-focus": We(me), + "data-focus-visible": We(me && fe), + "data-readonly": We(Q), + "aria-hidden": !0, + onMouseDown: Dr(te.onMouseDown, () => se(!0)), + onMouseUp: Dr(te.onMouseUp, () => se(!1)), + onMouseEnter: Dr( + te.onMouseEnter, + () => Z(!0) + ), + onMouseLeave: Dr( + te.onMouseLeave, + () => Z(!1) + ) + }), + [ + ee, + I, + M, + re, + Me, + me, + Q, + fe + ] + ), { onFocus: br, onBlur: j } = L ?? {}, ce = Ze( + (te = {}, $e = null) => { + const pr = M && !n; + return { + ...te, + id: ie, + ref: $e, + type: "radio", + name: v, + value: S, + onChange: Dr(te.onChange, er), + onBlur: Dr( + j, + te.onBlur, + () => J(!1) + ), + onFocus: Dr( + br, + te.onFocus, + () => J(!0) + ), + onKeyDown: Dr(te.onKeyDown, rr), + onKeyUp: Dr(te.onKeyUp, le), + checked: Me, + disabled: pr, + readOnly: Q, + required: K, + "aria-invalid": Ra(re), + "aria-disabled": Ra(pr), + "aria-required": Ra(K), + "data-readonly": We(Q), + "aria-describedby": C, + style: Ku + }; + }, + [ + M, + n, + ie, + v, + S, + er, + j, + br, + rr, + le, + Me, + Q, + K, + re, + C + ] + ); + return { + state: { + isInvalid: re, + isFocused: me, + isChecked: Me, + isActive: ee, + isHovered: I, + isDisabled: M, + isReadOnly: Q, + isRequired: K + }, + getCheckboxProps: ur, + getRadioProps: ur, + getInputProps: ce, + getLabelProps: (te = {}, $e = null) => ({ + ...te, + ref: $e, + onMouseDown: Dr(te.onMouseDown, Zu), + "data-disabled": We(M), + "data-checked": We(Me), + "data-invalid": We(re) + }), + getRootProps: (te, $e = null) => ({ + ...te, + ref: $e, + "data-disabled": We(M), + "data-checked": We(Me), + "data-invalid": We(re) + }), + htmlProps: R + }; +} +function Zu(e) { + e.preventDefault(), e.stopPropagation(); +} +function ef(e, r) { + const t = {}, n = {}; + for (const [a, o] of Object.entries(e)) + r.includes(a) ? t[a] = o : n[a] = o; + return [t, n]; +} +var Xs = ve((e, r) => { + var t; + const n = qs(), { onChange: a, value: o } = e, i = Mr("Radio", { ...n, ...e }), u = sr(e), { + spacing: h = "0.5rem", + children: v, + isDisabled: S = n == null ? void 0 : n.isDisabled, + isFocusable: b = n == null ? void 0 : n.isFocusable, + inputProps: _, + ...C + } = u; + let R = e.isChecked; + (n == null ? void 0 : n.value) != null && o != null && (R = n.value === o); + let Y = a; + n != null && n.onChange && o != null && (Y = fc(n.onChange, a)); + const L = (t = e == null ? void 0 : e.name) != null ? t : n == null ? void 0 : n.name, { + getInputProps: O, + getCheckboxProps: w, + getLabelProps: q, + getRootProps: ie, + htmlProps: M + } = Ju({ + ...C, + isChecked: R, + isFocusable: b, + isDisabled: S, + onChange: Y, + name: L + }), [Q, K] = ef(M, nc), re = w(K), fe = O(_, r), Ee = q(), me = Object.assign({}, Q, ie()), J = { + display: "inline-flex", + alignItems: "center", + verticalAlign: "top", + cursor: "pointer", + position: "relative", + ...i.container + }, I = { + display: "inline-flex", + alignItems: "center", + justifyContent: "center", + flexShrink: 0, + ...i.control + }, Z = { + userSelect: "none", + marginStart: h, + ...i.label + }; + return /* @__PURE__ */ Sn(ne.label, { className: "chakra-radio", ...me, __css: J, children: [ + /* @__PURE__ */ N("input", { className: "chakra-radio__input", ...fe }), + /* @__PURE__ */ N( + ne.span, + { + className: "chakra-radio__control", + ...re, + __css: I + } + ), + v && /* @__PURE__ */ N( + ne.span, + { + className: "chakra-radio__label", + ...Ee, + __css: Z, + children: v + } + ) + ] }); +}); +Xs.displayName = "Radio"; +const Qs = ({ question: e, ...r }) => { + const t = Mr("Questions"), { isAbleToVote: n, trans: a } = lt(), { + formState: { errors: o } + } = ha(); + return /* @__PURE__ */ U(ne.div, { __css: t.question, ...r, children: /* @__PURE__ */ U(Hs, { isInvalid: !!o[e.title.default], children: [ + /* @__PURE__ */ U(ne.label, { __css: t.title, children: e.title.default }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionField.tsx", + lineNumber: 24, + columnNumber: 9 + }, globalThis), + e.description && /* @__PURE__ */ U(ne.div, { __css: t.description, children: /* @__PURE__ */ U(fa, { children: e.description.default }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionField.tsx", + lineNumber: 27, + columnNumber: 13 + }, globalThis) }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionField.tsx", + lineNumber: 26, + columnNumber: 11 + }, globalThis), + /* @__PURE__ */ U( + bu, + { + rules: { required: a("required", "This field is required") }, + name: e.title.default, + render: ({ field: i }) => { + var u; + return /* @__PURE__ */ U(Gs, { sx: t.radioGroup, ...i, isDisabled: !n, children: [ + /* @__PURE__ */ U(ys, { direction: "column", sx: t.stack, children: e.choices.map((h, v) => /* @__PURE__ */ U(Xs, { sx: t.radio, value: h.title.default, children: h.title.default }, v, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionField.tsx", + lineNumber: 37, + columnNumber: 19 + }, globalThis)) }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionField.tsx", + lineNumber: 35, + columnNumber: 15 + }, globalThis), + /* @__PURE__ */ U(Ys, { sx: t.error, children: (u = o[e.title.default]) == null ? void 0 : u.message }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionField.tsx", + lineNumber: 42, + columnNumber: 15 + }, globalThis) + ] }, void 0, !0, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionField.tsx", + lineNumber: 34, + columnNumber: 13 + }, globalThis); + } + }, + void 0, + !1, + { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionField.tsx", + lineNumber: 30, + columnNumber: 9 + }, + globalThis + ) + ] }, void 0, !0, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionField.tsx", + lineNumber: 23, + columnNumber: 7 + }, globalThis) }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionField.tsx", + lineNumber: 22, + columnNumber: 5 + }, globalThis); +}; +Qs.displayName = "Question"; +const rf = () => { + var _; + const { election: e, signer: r, vote: t, voted: n, ConnectButton: a, error: o, loading: i, trans: u } = lt(), h = Ru(), v = Mr("Questions"), S = e == null ? void 0 : e.questions; + if (n) + return /* @__PURE__ */ U(jn, { variant: "solid", status: "info", children: (_ = u("voted", "You already voted. Your vote id is %id")) == null ? void 0 : _.replace("%id", n) }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionsForm.tsx", + lineNumber: 15, + columnNumber: 7 + }, globalThis); + if (!S || S && !(S != null && S.length)) + return /* @__PURE__ */ U(jn, { variant: "solid", status: "warning", sx: v.alert, children: [ + /* @__PURE__ */ U(ro, {}, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionsForm.tsx", + lineNumber: 24, + columnNumber: 9 + }, globalThis), + u("empty", "Apparently this process has no questions 🤔") + ] }, void 0, !0, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionsForm.tsx", + lineNumber: 23, + columnNumber: 7 + }, globalThis); + S.reduce( + (C, R) => ({ + ...C, + [R.title.default]: "" + }), + {} + ); + const b = async (C) => await t(C); + return /* @__PURE__ */ U(mu, { ...h, children: /* @__PURE__ */ U("form", { onSubmit: h.handleSubmit(b), id: "election-questions-form", children: [ + S.map((C, R) => /* @__PURE__ */ U(Qs, { question: C }, R, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionsForm.tsx", + lineNumber: 44, + columnNumber: 11 + }, globalThis)), + o && /* @__PURE__ */ U(jn, { status: "error", variant: "solid", mb: 3, children: [ + /* @__PURE__ */ U(ro, {}, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionsForm.tsx", + lineNumber: 48, + columnNumber: 13 + }, globalThis), + o + ] }, void 0, !0, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionsForm.tsx", + lineNumber: 47, + columnNumber: 11 + }, globalThis) + ] }, void 0, !0, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionsForm.tsx", + lineNumber: 42, + columnNumber: 7 + }, globalThis) }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionsForm.tsx", + lineNumber: 41, + columnNumber: 5 + }, globalThis); +}; +var [A0, tf] = Wr({ + strict: !1, + name: "ButtonGroupContext" +}); +function nf(e) { + const [r, t] = ge(!e); + return { ref: Ze((o) => { + o && t(o.tagName === "BUTTON"); + }, []), type: r ? "button" : void 0 }; +} +function oo(e) { + const { children: r, className: t, ...n } = e, a = as(r) ? os(r, { + "aria-hidden": !0, + focusable: !1 + }) : r, o = qe("chakra-button__icon", t); + return /* @__PURE__ */ N( + ne.span, + { + display: "inline-flex", + alignSelf: "center", + flexShrink: 0, + ...n, + className: o, + children: a + } + ); +} +oo.displayName = "ButtonIcon"; +function io(e) { + const { + label: r, + placement: t, + spacing: n = "0.5rem", + children: a = /* @__PURE__ */ N(wo, { color: "currentColor", width: "1em", height: "1em" }), + className: o, + __css: i, + ...u + } = e, h = qe("chakra-button__spinner", o), v = t === "start" ? "marginEnd" : "marginStart", S = pt( + () => ({ + display: "flex", + alignItems: "center", + position: r ? "relative" : "absolute", + [v]: r ? n : 0, + fontSize: "1em", + lineHeight: "normal", + ...i + }), + [i, r, v, n] + ); + return /* @__PURE__ */ N(ne.div, { className: h, ...u, __css: S, children: a }); +} +io.displayName = "ButtonSpinner"; +var Ks = ve((e, r) => { + const t = tf(), n = ir("Button", { ...t, ...e }), { + isDisabled: a = t == null ? void 0 : t.isDisabled, + isLoading: o, + isActive: i, + children: u, + leftIcon: h, + rightIcon: v, + loadingText: S, + iconSpacing: b = "0.5rem", + type: _, + spinner: C, + spinnerPlacement: R = "start", + className: Y, + as: L, + ...O + } = sr(e), w = pt(() => { + const Q = { ...n == null ? void 0 : n._focus, zIndex: 1 }; + return { + display: "inline-flex", + appearance: "none", + alignItems: "center", + justifyContent: "center", + userSelect: "none", + position: "relative", + whiteSpace: "nowrap", + verticalAlign: "middle", + outline: "none", + ...n, + ...!!t && { _focus: Q } + }; + }, [n, t]), { ref: q, type: ie } = nf(L), M = { rightIcon: v, leftIcon: h, iconSpacing: b, children: u }; + return /* @__PURE__ */ Sn( + ne.button, + { + ref: Fu(r, q), + as: L, + type: _ ?? ie, + "data-active": We(i), + "data-loading": We(o), + __css: w, + className: qe("chakra-button", Y), + ...O, + disabled: a || o, + children: [ + o && R === "start" && /* @__PURE__ */ N( + io, + { + className: "chakra-button__spinner--start", + label: S, + placement: "start", + spacing: b, + children: C + } + ), + o ? S || /* @__PURE__ */ N(ne.span, { opacity: 0, children: /* @__PURE__ */ N(bi, { ...M }) }) : /* @__PURE__ */ N(bi, { ...M }), + o && R === "end" && /* @__PURE__ */ N( + io, + { + className: "chakra-button__spinner--end", + label: S, + placement: "end", + spacing: b, + children: C + } + ) + ] + } + ); +}); +Ks.displayName = "Button"; +function bi(e) { + const { leftIcon: r, rightIcon: t, children: n, iconSpacing: a } = e; + return /* @__PURE__ */ Sn(gc, { children: [ + r && /* @__PURE__ */ N(oo, { marginEnd: a, children: r }), + n, + t && /* @__PURE__ */ N(oo, { marginStart: a, children: t }) + ] }); +} +const af = (e) => { + const { signer: r, loading: t, voting: n, ConnectButton: a, isAbleToVote: o, election: i, voted: u, trans: h } = lt(), v = !r || !o || (i == null ? void 0 : i.status) !== on.ONGOING; + return u ? null : !r && a ? /* @__PURE__ */ U(a, {}, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/VoteButton.tsx", + lineNumber: 12, + columnNumber: 12 + }, globalThis) : /* @__PURE__ */ U( + Ks, + { + type: "submit", + ...e, + form: "election-questions-form", + isDisabled: v, + isLoading: t || n, + children: h("vote", "Vote") + }, + void 0, + !1, + { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/VoteButton.tsx", + lineNumber: 16, + columnNumber: 5 + }, + globalThis + ); +}, of = ({ + id: e, + election: r, + signer: t, + fetchCensus: n, + texts: a, + ...o +}) => { + const { client: i, signer: u, setSigner: h } = po(), [v, S] = ge(!1), [b, _] = ge(!1), [C, R] = ge(!1), [Y, L] = ge(null), [O, w] = ge(""), [q, ie] = ge(r), [M, Q] = ge(void 0), [K, re] = ge(0), [fe, Ee] = ge(!1), [me, J] = ge(void 0), [I, Z] = ge(void 0), [ee, se] = ge(null), [ye, Ye] = ge("facebook"), Ve = (j, ce) => a && a[j] ? a[j] : ce; + Ke(() => { + !i || u || !t || h(t); + }, [u, i, t]), Ke(() => { + q || !e || C || !i || (async () => { + S(!0); + try { + const j = await i.fetchElection(e); + R(!0), ie(j); + } catch (j) { + w(j.message); + } finally { + S(!1); + } + })(); + }, [q, e, C, i]), Ke(() => { + C || !r || R(!0); + }, [r, C]), Ke(() => { + !n || !u || !q || !C || !i || M !== void 0 || (async () => { + const j = q.census.type, ce = await i.isInCensus(q.id); + let ae = 0; + if (ce || j == rt.WEIGHTED) { + ae = await i.votesLeftCount(q.id), re(ae); + const be = await i.hasAlreadyVoted(q.id); + L(be); + } + J(j), Ee(ce), Q(ae > 0 && ce || j == rt.CSP); + })(); + }, [n, q, C, i, M, u]), Ke(() => { + (async () => window.opener || i && me == rt.CSP && window.addEventListener("message", (j) => { + j.data.code && j.data.handler && ur(i, j.data.code, j.data.handler); + }))(); + }, [i, me]), Ke(() => { + (async () => { + var ae, be; + if (typeof window > "u") + return; + const j = (ae = window.location.href.split("?")[1].split("&").find((Pe) => Pe.startsWith("code="))) == null ? void 0 : ae.split("=")[1], ce = (be = window.location.href.split("?")[1].split("&").find((Pe) => Pe.startsWith("handler="))) == null ? void 0 : be.split("=")[1]; + !j || !ce || window.opener && (window.opener.postMessage({ code: j, handler: ce }, "*"), window.close()); + })(); + }, []); + const Me = async (j) => { + if (!i) + throw new Error("no client initialized"); + if (!u) + throw new Error("no signer provided"); + if (!q) + throw new Error("no election initialized"); + _(!0), w(""), i.setElectionId(q.id); + const ce = q.questions.map((be) => parseInt(j[be.title.default], 10)); + let ae = new qo(ce); + Z(ae); + try { + me == rt.CSP ? await rr() : me == rt.WEIGHTED && await er(); + } catch (be) { + if ("reason" in be) + return w(be.reason); + if ("message" in be) + return w(be.message); + console.error("could not vote:", be); + } finally { + _(!1); + } + }, er = async () => { + if (!I) + throw new Error("no vote instance"); + if (me != rt.WEIGHTED) + throw new Error("not a Weighted election"); + const j = await i.submitVote(I); + return L(j), j; + }, rr = async () => { + if (!i) + throw new Error("no client initialized"); + if (!q) + throw new Error("no election initialized"); + if (me != rt.CSP) + throw new Error("not a CSP election"); + let j = `${window.location.href}`; + j.includes(`electionId=${q.id}`) || (j.includes("?") ? j += `&electionId=${q.id}` : j += `?electionId=${q.id}`), j.includes(`handler=${ye}`) || (j.includes("?") ? j += `&handler=${ye}` : j += `?handler=${ye}`); + let ce; + try { + ce = await i.cspStep(0, [ye, j]); + } catch (ae) { + if ("reason" in ae) + return w(ae.reason); + } + se(ce.authToken), le(ye, ce.response[0]); + }, le = (j, ce) => { + const Pe = window.outerWidth / 2 - 300, $e = [ + "width=600", + "height=600", + `top=${window.outerHeight / 2 - 600 / 2}`, + `left=${Pe}`, + "status=no", + "resizable=yes", + "scrollbars=yes" + ].join(","); + window.open(ce, j, $e); + }, ur = async (j, ce, ae) => { + var $e; + if (!ce) + throw new Error("no code provided"); + if (!ae) + throw new Error("no handler provided"); + const be = ($e = window.location.href.split("?")[1].split("&").find((pr) => pr.startsWith("electionId="))) == null ? void 0 : $e.split("=")[1]; + let Pe = `${window.location.href.split("?")[0]}?electionId=${be}&handler=${ae}`, te; + try { + te = await j.cspStep(1, [ae, ce, Pe], ee), br(te.token); + } catch { + return w("Not authorized to vote"), !1; + } + }, br = async (j) => { + var ae; + if (!i) + throw new Error("no client initialized"); + let ce = new qo([1]); + if (me != rt.CSP) + throw new Error("not a CSP election"); + try { + const be = await ((ae = i.wallet) == null ? void 0 : ae.getAddress()), Pe = await i.cspSign(be, j), te = i.cspVote(ce, Pe), $e = await i.submitVote(te); + return L($e), $e; + } catch { + return w("Error submitting vote"), !1; + } + }; + return { + ...o, + election: q, + error: O, + isAbleToVote: M, + isInCensus: fe, + loading: v, + signer: u, + trans: Ve, + vote: Me, + voted: Y, + votesLeft: K, + voting: b + }; +}, Js = da(void 0), lt = () => { + const e = ua(Js); + if (!e) + throw new Error( + "useElection returned `undefined`, maybe you forgot to wrap the component within ?" + ); + return e; +}, Zs = ({ children: e, ...r }) => { + const t = of(r); + return /* @__PURE__ */ U(Js.Provider, { value: t, children: e }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/Election.tsx", + lineNumber: 334, + columnNumber: 10 + }, globalThis); +}; +Zs.displayName = "ElectionProvider"; +const sf = (e) => /* @__PURE__ */ U(Zs, { ...e, fetchCensus: !0, children: [ + /* @__PURE__ */ U(Zd, {}, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/Election.tsx", + lineNumber: 340, + columnNumber: 5 + }, globalThis), + /* @__PURE__ */ U(Es, {}, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/Election.tsx", + lineNumber: 341, + columnNumber: 5 + }, globalThis), + /* @__PURE__ */ U($s, {}, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/Election.tsx", + lineNumber: 342, + columnNumber: 5 + }, globalThis), + /* @__PURE__ */ U(ru, {}, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/Election.tsx", + lineNumber: 343, + columnNumber: 5 + }, globalThis), + /* @__PURE__ */ U(eu, {}, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/Election.tsx", + lineNumber: 344, + columnNumber: 5 + }, globalThis), + /* @__PURE__ */ U(cs, {}, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/Election.tsx", + lineNumber: 345, + columnNumber: 5 + }, globalThis), + /* @__PURE__ */ U(rf, {}, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/Election.tsx", + lineNumber: 346, + columnNumber: 5 + }, globalThis), + /* @__PURE__ */ U(af, {}, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/Election.tsx", + lineNumber: 347, + columnNumber: 5 + }, globalThis) +] }, void 0, !0, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/Election.tsx", + lineNumber: 339, + columnNumber: 3 +}, globalThis); +sf.displayName = "Election"; +const el = ve((e, r) => { + const { organization: t } = ga(), n = ir("OrganizationName", e), a = sr(e); + return t ? /* @__PURE__ */ U(ne.h1, { ref: r, ...a, __css: n, children: t.metadata.name.default }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Organization/Name.tsx", + lineNumber: 14, + columnNumber: 5 + }, globalThis) : null; +}); +el.displayName = "OrganizationName"; +const lf = ({ id: e, organization: r, ...t }) => { + const { client: n, signer: a, setSigner: o } = po(), [i, u] = ge(!1), [h, v] = ge(!1), [S, b] = ge(""), [_, C] = ge(r), R = async (Y, L) => { + u(!0); + try { + Y instanceof Go ? await n.updateAccountInfo(Y) : await n.createAccountInfo({ account: new Go(Y), faucetPackage: L }); + } catch (O) { + b(O.message); + } finally { + u(!1); + } + }; + return Ke(() => { + _ || !e || h || !n || (async () => { + u(!0); + try { + C(await n.fetchAccountInfo(e)), v(!0); + } catch (Y) { + b(Y.message); + } finally { + u(!1); + } + })(); + }, [_, e, h, n]), Ke(() => { + h || !r || v(!0); + }, [r, h]), { + ...t, + organization: _, + error: S, + loading: i, + loaded: h, + update: R + }; +}, rl = da(void 0), ga = () => { + const e = ua(rl); + if (!e) + throw new Error( + "useElection returned `undefined`, maybe you forgot to wrap the component within ?" + ); + return e; +}, tl = ({ children: e, ...r }) => { + const t = lf(r); + return /* @__PURE__ */ U(rl.Provider, { value: t, children: e }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Organization/Organization.tsx", + lineNumber: 87, + columnNumber: 10 + }, globalThis); +}; +tl.displayName = "OrganizationProvider"; +const cf = (e) => /* @__PURE__ */ U(tl, { ...e, children: /* @__PURE__ */ U(el, {}, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Organization/Organization.tsx", + lineNumber: 93, + columnNumber: 5 +}, globalThis) }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Organization/Organization.tsx", + lineNumber: 92, + columnNumber: 3 +}, globalThis); +cf.displayName = "Election"; +const N0 = (e) => { + const r = ir("OrganizationAvatar", e), { organization: t } = ga(); + if (!t) + return null; + let n = t.metadata.media.avatar; + return n || (n = t.metadata.media.logo), n ? /* @__PURE__ */ U(So, { src: n, sx: r, ...e }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Organization/Avatar.tsx", + lineNumber: 18, + columnNumber: 10 + }, globalThis) : null; +}, D0 = (e) => { + const r = ir("OrganizationDescription", e), { organization: t } = ga(); + return !t || t && !t.metadata.description ? null : /* @__PURE__ */ U(fa, { ...e, sx: r, children: t.metadata.description.default }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Organization/Description.tsx", + lineNumber: 14, + columnNumber: 5 + }, globalThis); +}, z0 = (e) => { + const r = ir("OrganizationHeader", e), { organization: t } = ga(); + if (!t) + return null; + const { header: n } = t.metadata.media; + return n ? /* @__PURE__ */ U(So, { src: n, sx: r, ...e }, void 0, !1, { + fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Organization/Header.tsx", + lineNumber: 15, + columnNumber: 10 + }, globalThis) : null; +}; +var df = { + common: "background-color, border-color, color, fill, stroke, opacity, box-shadow, transform", + colors: "background-color, border-color, color, fill, stroke", + dimensions: "width, height", + position: "left, right, top, bottom", + background: "background-color, background-image, background-position" +}, uf = { + "ease-in": "cubic-bezier(0.4, 0, 1, 1)", + "ease-out": "cubic-bezier(0, 0, 0.2, 1)", + "ease-in-out": "cubic-bezier(0.4, 0, 0.2, 1)" +}, ff = { + "ultra-fast": "50ms", + faster: "100ms", + fast: "150ms", + normal: "200ms", + slow: "300ms", + slower: "400ms", + "ultra-slow": "500ms" +}, mf = { + property: df, + easing: uf, + duration: ff +}, hf = mf, vf = { + hide: -1, + auto: "auto", + base: 0, + docked: 10, + dropdown: 1e3, + sticky: 1100, + banner: 1200, + overlay: 1300, + modal: 1400, + popover: 1500, + skipLink: 1600, + toast: 1700, + tooltip: 1800 +}, gf = vf, bf = { + none: 0, + "1px": "1px solid", + "2px": "2px solid", + "4px": "4px solid", + "8px": "8px solid" +}, pf = bf, yf = { + base: "0em", + sm: "30em", + md: "48em", + lg: "62em", + xl: "80em", + "2xl": "96em" +}, Sf = yf, xf = { + transparent: "transparent", + current: "currentColor", + black: "#000000", + white: "#FFFFFF", + whiteAlpha: { + 50: "rgba(255, 255, 255, 0.04)", + 100: "rgba(255, 255, 255, 0.06)", + 200: "rgba(255, 255, 255, 0.08)", + 300: "rgba(255, 255, 255, 0.16)", + 400: "rgba(255, 255, 255, 0.24)", + 500: "rgba(255, 255, 255, 0.36)", + 600: "rgba(255, 255, 255, 0.48)", + 700: "rgba(255, 255, 255, 0.64)", + 800: "rgba(255, 255, 255, 0.80)", + 900: "rgba(255, 255, 255, 0.92)" + }, + blackAlpha: { + 50: "rgba(0, 0, 0, 0.04)", + 100: "rgba(0, 0, 0, 0.06)", + 200: "rgba(0, 0, 0, 0.08)", + 300: "rgba(0, 0, 0, 0.16)", + 400: "rgba(0, 0, 0, 0.24)", + 500: "rgba(0, 0, 0, 0.36)", + 600: "rgba(0, 0, 0, 0.48)", + 700: "rgba(0, 0, 0, 0.64)", + 800: "rgba(0, 0, 0, 0.80)", + 900: "rgba(0, 0, 0, 0.92)" + }, + gray: { + 50: "#F7FAFC", + 100: "#EDF2F7", + 200: "#E2E8F0", + 300: "#CBD5E0", + 400: "#A0AEC0", + 500: "#718096", + 600: "#4A5568", + 700: "#2D3748", + 800: "#1A202C", + 900: "#171923" + }, + red: { + 50: "#FFF5F5", + 100: "#FED7D7", + 200: "#FEB2B2", + 300: "#FC8181", + 400: "#F56565", + 500: "#E53E3E", + 600: "#C53030", + 700: "#9B2C2C", + 800: "#822727", + 900: "#63171B" + }, + orange: { + 50: "#FFFAF0", + 100: "#FEEBC8", + 200: "#FBD38D", + 300: "#F6AD55", + 400: "#ED8936", + 500: "#DD6B20", + 600: "#C05621", + 700: "#9C4221", + 800: "#7B341E", + 900: "#652B19" + }, + yellow: { + 50: "#FFFFF0", + 100: "#FEFCBF", + 200: "#FAF089", + 300: "#F6E05E", + 400: "#ECC94B", + 500: "#D69E2E", + 600: "#B7791F", + 700: "#975A16", + 800: "#744210", + 900: "#5F370E" + }, + green: { + 50: "#F0FFF4", + 100: "#C6F6D5", + 200: "#9AE6B4", + 300: "#68D391", + 400: "#48BB78", + 500: "#38A169", + 600: "#2F855A", + 700: "#276749", + 800: "#22543D", + 900: "#1C4532" + }, + teal: { + 50: "#E6FFFA", + 100: "#B2F5EA", + 200: "#81E6D9", + 300: "#4FD1C5", + 400: "#38B2AC", + 500: "#319795", + 600: "#2C7A7B", + 700: "#285E61", + 800: "#234E52", + 900: "#1D4044" + }, + blue: { + 50: "#ebf8ff", + 100: "#bee3f8", + 200: "#90cdf4", + 300: "#63b3ed", + 400: "#4299e1", + 500: "#3182ce", + 600: "#2b6cb0", + 700: "#2c5282", + 800: "#2a4365", + 900: "#1A365D" + }, + cyan: { + 50: "#EDFDFD", + 100: "#C4F1F9", + 200: "#9DECF9", + 300: "#76E4F7", + 400: "#0BC5EA", + 500: "#00B5D8", + 600: "#00A3C4", + 700: "#0987A0", + 800: "#086F83", + 900: "#065666" + }, + purple: { + 50: "#FAF5FF", + 100: "#E9D8FD", + 200: "#D6BCFA", + 300: "#B794F4", + 400: "#9F7AEA", + 500: "#805AD5", + 600: "#6B46C1", + 700: "#553C9A", + 800: "#44337A", + 900: "#322659" + }, + pink: { + 50: "#FFF5F7", + 100: "#FED7E2", + 200: "#FBB6CE", + 300: "#F687B3", + 400: "#ED64A6", + 500: "#D53F8C", + 600: "#B83280", + 700: "#97266D", + 800: "#702459", + 900: "#521B41" + }, + linkedin: { + 50: "#E8F4F9", + 100: "#CFEDFB", + 200: "#9BDAF3", + 300: "#68C7EC", + 400: "#34B3E4", + 500: "#00A0DC", + 600: "#008CC9", + 700: "#0077B5", + 800: "#005E93", + 900: "#004471" + }, + facebook: { + 50: "#E8F4F9", + 100: "#D9DEE9", + 200: "#B7C2DA", + 300: "#6482C0", + 400: "#4267B2", + 500: "#385898", + 600: "#314E89", + 700: "#29487D", + 800: "#223B67", + 900: "#1E355B" + }, + messenger: { + 50: "#D0E6FF", + 100: "#B9DAFF", + 200: "#A2CDFF", + 300: "#7AB8FF", + 400: "#2E90FF", + 500: "#0078FF", + 600: "#0063D1", + 700: "#0052AC", + 800: "#003C7E", + 900: "#002C5C" + }, + whatsapp: { + 50: "#dffeec", + 100: "#b9f5d0", + 200: "#90edb3", + 300: "#65e495", + 400: "#3cdd78", + 500: "#22c35e", + 600: "#179848", + 700: "#0c6c33", + 800: "#01421c", + 900: "#001803" + }, + twitter: { + 50: "#E5F4FD", + 100: "#C8E9FB", + 200: "#A8DCFA", + 300: "#83CDF7", + 400: "#57BBF5", + 500: "#1DA1F2", + 600: "#1A94DA", + 700: "#1681BF", + 800: "#136B9E", + 900: "#0D4D71" + }, + telegram: { + 50: "#E3F2F9", + 100: "#C5E4F3", + 200: "#A2D4EC", + 300: "#7AC1E4", + 400: "#47A9DA", + 500: "#0088CC", + 600: "#007AB8", + 700: "#006BA1", + 800: "#005885", + 900: "#003F5E" + } +}, _f = xf, wf = { + none: "0", + sm: "0.125rem", + base: "0.25rem", + md: "0.375rem", + lg: "0.5rem", + xl: "0.75rem", + "2xl": "1rem", + "3xl": "1.5rem", + full: "9999px" +}, kf = wf, Cf = { + xs: "0 0 0 1px rgba(0, 0, 0, 0.05)", + sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)", + base: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)", + md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)", + lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)", + xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)", + "2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.25)", + outline: "0 0 0 3px rgba(66, 153, 225, 0.6)", + inner: "inset 0 2px 4px 0 rgba(0,0,0,0.06)", + none: "none", + "dark-lg": "rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px" +}, Tf = Cf, Ef = { + none: 0, + sm: "4px", + base: "8px", + md: "12px", + lg: "16px", + xl: "24px", + "2xl": "40px", + "3xl": "64px" +}, $f = Ef, Rf = { + letterSpacings: { + tighter: "-0.05em", + tight: "-0.025em", + normal: "0", + wide: "0.025em", + wider: "0.05em", + widest: "0.1em" + }, + lineHeights: { + normal: "normal", + none: 1, + shorter: 1.25, + short: 1.375, + base: 1.5, + tall: 1.625, + taller: "2", + 3: ".75rem", + 4: "1rem", + 5: "1.25rem", + 6: "1.5rem", + 7: "1.75rem", + 8: "2rem", + 9: "2.25rem", + 10: "2.5rem" + }, + fontWeights: { + hairline: 100, + thin: 200, + light: 300, + normal: 400, + medium: 500, + semibold: 600, + bold: 700, + extrabold: 800, + black: 900 + }, + fonts: { + heading: '-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', + body: '-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', + mono: 'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace' + }, + fontSizes: { + "3xs": "0.45rem", + "2xs": "0.625rem", + xs: "0.75rem", + sm: "0.875rem", + md: "1rem", + lg: "1.125rem", + xl: "1.25rem", + "2xl": "1.5rem", + "3xl": "1.875rem", + "4xl": "2.25rem", + "5xl": "3rem", + "6xl": "3.75rem", + "7xl": "4.5rem", + "8xl": "6rem", + "9xl": "8rem" + } +}, nl = Rf, al = { + px: "1px", + 0.5: "0.125rem", + 1: "0.25rem", + 1.5: "0.375rem", + 2: "0.5rem", + 2.5: "0.625rem", + 3: "0.75rem", + 3.5: "0.875rem", + 4: "1rem", + 5: "1.25rem", + 6: "1.5rem", + 7: "1.75rem", + 8: "2rem", + 9: "2.25rem", + 10: "2.5rem", + 12: "3rem", + 14: "3.5rem", + 16: "4rem", + 20: "5rem", + 24: "6rem", + 28: "7rem", + 32: "8rem", + 36: "9rem", + 40: "10rem", + 44: "11rem", + 48: "12rem", + 52: "13rem", + 56: "14rem", + 60: "15rem", + 64: "16rem", + 72: "18rem", + 80: "20rem", + 96: "24rem" +}, Pf = { + max: "max-content", + min: "min-content", + full: "100%", + "3xs": "14rem", + "2xs": "16rem", + xs: "20rem", + sm: "24rem", + md: "28rem", + lg: "32rem", + xl: "36rem", + "2xl": "42rem", + "3xl": "48rem", + "4xl": "56rem", + "5xl": "64rem", + "6xl": "72rem", + "7xl": "80rem", + "8xl": "90rem", + prose: "60ch" +}, Ff = { + sm: "640px", + md: "768px", + lg: "1024px", + xl: "1280px" +}, Af = { + ...al, + ...Pf, + container: Ff +}, ol = Af, Nf = { + breakpoints: Sf, + zIndices: gf, + radii: kf, + blur: $f, + colors: _f, + ...nl, + sizes: ol, + shadows: Tf, + space: al, + borders: pf, + transition: hf +}, aa = {}, Df = { + get exports() { + return aa; + }, + set exports(e) { + aa = e; + } +}; +(function(e, r) { + var t = 200, n = "__lodash_hash_undefined__", a = 800, o = 16, i = 9007199254740991, u = "[object Arguments]", h = "[object Array]", v = "[object AsyncFunction]", S = "[object Boolean]", b = "[object Date]", _ = "[object Error]", C = "[object Function]", R = "[object GeneratorFunction]", Y = "[object Map]", L = "[object Number]", O = "[object Null]", w = "[object Object]", q = "[object Proxy]", ie = "[object RegExp]", M = "[object Set]", Q = "[object String]", K = "[object Undefined]", re = "[object WeakMap]", fe = "[object ArrayBuffer]", Ee = "[object DataView]", me = "[object Float32Array]", J = "[object Float64Array]", I = "[object Int8Array]", Z = "[object Int16Array]", ee = "[object Int32Array]", se = "[object Uint8Array]", ye = "[object Uint8ClampedArray]", Ye = "[object Uint16Array]", Ve = "[object Uint32Array]", Me = /[\\^$.*+?()[\]{}|]/g, er = /^\[object .+?Constructor\]$/, rr = /^(?:0|[1-9]\d*)$/, le = {}; + le[me] = le[J] = le[I] = le[Z] = le[ee] = le[se] = le[ye] = le[Ye] = le[Ve] = !0, le[u] = le[h] = le[fe] = le[S] = le[Ee] = le[b] = le[_] = le[C] = le[Y] = le[L] = le[w] = le[ie] = le[M] = le[Q] = le[re] = !1; + var ur = typeof Rn == "object" && Rn && Rn.Object === Object && Rn, br = typeof self == "object" && self && self.Object === Object && self, j = ur || br || Function("return this")(), ce = r && !r.nodeType && r, ae = ce && !0 && e && !e.nodeType && e, be = ae && ae.exports === ce, Pe = be && ur.process, te = function() { + try { + var s = ae && ae.require && ae.require("util").types; + return s || Pe && Pe.binding && Pe.binding("util"); + } catch { + } + }(), $e = te && te.isTypedArray; + function pr(s, f, g) { + switch (g.length) { + case 0: + return s.call(f); + case 1: + return s.call(f, g[0]); + case 2: + return s.call(f, g[0], g[1]); + case 3: + return s.call(f, g[0], g[1], g[2]); + } + return s.apply(f, g); + } + function kt(s, f) { + for (var g = -1, B = Array(s); ++g < s; ) + B[g] = f(g); + return B; + } + function yr(s) { + return function(f) { + return s(f); + }; + } + function d(s, f) { + return s == null ? void 0 : s[f]; + } + function p(s, f) { + return function(g) { + return s(f(g)); + }; + } + var x = Array.prototype, A = Function.prototype, F = Object.prototype, E = j["__core-js_shared__"], W = A.toString, de = F.hasOwnProperty, Te = function() { + var s = /[^.]+$/.exec(E && E.keys && E.keys.IE_PROTO || ""); + return s ? "Symbol(src)_1." + s : ""; + }(), tr = F.toString, jr = W.call(Object), Ge = RegExp( + "^" + W.call(de).replace(Me, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ), Sr = be ? j.Buffer : void 0, Fr = j.Symbol, Tr = j.Uint8Array, xr = Sr ? Sr.allocUnsafe : void 0, Vr = p(Object.getPrototypeOf, Object), Ct = Object.create, Lt = F.propertyIsEnumerable, jt = x.splice, Er = Fr ? Fr.toStringTag : void 0, et = function() { + try { + var s = xa(Object, "defineProperty"); + return s({}, "", {}), s; + } catch { + } + }(), Vt = Sr ? Sr.isBuffer : void 0, Ar = Math.max, ct = Date.now, Je = xa(j, "Map"), fr = xa(Object, "create"), Ur = function() { + function s() { + } + return function(f) { + if (!mt(f)) + return {}; + if (Ct) + return Ct(f); + s.prototype = f; + var g = new s(); + return s.prototype = void 0, g; + }; + }(); + function mr(s) { + var f = -1, g = s == null ? 0 : s.length; + for (this.clear(); ++f < g; ) { + var B = s[f]; + this.set(B[0], B[1]); + } + } + function Ut() { + this.__data__ = fr ? fr(null) : {}, this.size = 0; + } + function dt(s) { + var f = this.has(s) && delete this.__data__[s]; + return this.size -= f ? 1 : 0, f; + } + function Ht(s) { + var f = this.__data__; + if (fr) { + var g = f[s]; + return g === n ? void 0 : g; + } + return de.call(f, s) ? f[s] : void 0; + } + function ut(s) { + var f = this.__data__; + return fr ? f[s] !== void 0 : de.call(f, s); + } + function ft(s, f) { + var g = this.__data__; + return this.size += this.has(s) ? 0 : 1, g[s] = fr && f === void 0 ? n : f, this; + } + mr.prototype.clear = Ut, mr.prototype.delete = dt, mr.prototype.get = Ht, mr.prototype.has = ut, mr.prototype.set = ft; + function hr(s) { + var f = -1, g = s == null ? 0 : s.length; + for (this.clear(); ++f < g; ) { + var B = s[f]; + this.set(B[0], B[1]); + } + } + function Yt() { + this.__data__ = [], this.size = 0; + } + function Tt(s) { + var f = this.__data__, g = cr(f, s); + if (g < 0) + return !1; + var B = f.length - 1; + return g == B ? f.pop() : jt.call(f, g, 1), --this.size, !0; + } + function qt(s) { + var f = this.__data__, g = cr(f, s); + return g < 0 ? void 0 : f[g][1]; + } + function c(s) { + return cr(this.__data__, s) > -1; + } + function T(s, f) { + var g = this.__data__, B = cr(g, s); + return B < 0 ? (++this.size, g.push([s, f])) : g[B][1] = f, this; + } + hr.prototype.clear = Yt, hr.prototype.delete = Tt, hr.prototype.get = qt, hr.prototype.has = c, hr.prototype.set = T; + function P(s) { + var f = -1, g = s == null ? 0 : s.length; + for (this.clear(); ++f < g; ) { + var B = s[f]; + this.set(B[0], B[1]); + } + } + function l() { + this.size = 0, this.__data__ = { + hash: new mr(), + map: new (Je || hr)(), + string: new mr() + }; + } + function y(s) { + var f = En(this, s).delete(s); + return this.size -= f ? 1 : 0, f; + } + function k(s) { + return En(this, s).get(s); + } + function $(s) { + return En(this, s).has(s); + } + function D(s, f) { + var g = En(this, s), B = g.size; + return g.set(s, f), this.size += g.size == B ? 0 : 1, this; + } + P.prototype.clear = l, P.prototype.delete = y, P.prototype.get = k, P.prototype.has = $, P.prototype.set = D; + function X(s) { + var f = this.__data__ = new hr(s); + this.size = f.size; + } + function H() { + this.__data__ = new hr(), this.size = 0; + } + function V(s) { + var f = this.__data__, g = f.delete(s); + return this.size = f.size, g; + } + function _e(s) { + return this.__data__.get(s); + } + function we(s) { + return this.__data__.has(s); + } + function Ne(s, f) { + var g = this.__data__; + if (g instanceof hr) { + var B = g.__data__; + if (!Je || B.length < t - 1) + return B.push([s, f]), this.size = ++g.size, this; + g = this.__data__ = new P(B); + } + return g.set(s, f), this.size = g.size, this; + } + X.prototype.clear = H, X.prototype.delete = V, X.prototype.get = _e, X.prototype.has = we, X.prototype.set = Ne; + function ze(s, f) { + var g = ka(s), B = !g && wa(s), he = !g && !B && Wo(s), Re = !g && !B && !he && jo(s), Oe = g || B || he || Re, ue = Oe ? kt(s.length, String) : [], Ie = ue.length; + for (var _r in s) + (f || de.call(s, _r)) && !(Oe && // Safari 9 has enumerable `arguments.length` in strict mode. + (_r == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. + he && (_r == "offset" || _r == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. + Re && (_r == "buffer" || _r == "byteLength" || _r == "byteOffset") || // Skip index properties. + Bo(_r, Ie))) && ue.push(_r); + return ue; + } + function Nr(s, f, g) { + (g !== void 0 && !$n(s[f], g) || g === void 0 && !(f in s)) && Sa(s, f, g); + } + function Cn(s, f, g) { + var B = s[f]; + (!(de.call(s, f) && $n(B, g)) || g === void 0 && !(f in s)) && Sa(s, f, g); + } + function cr(s, f) { + for (var g = s.length; g--; ) + if ($n(s[g][0], f)) + return g; + return -1; + } + function Sa(s, f, g) { + f == "__proto__" && et ? et(s, f, { + configurable: !0, + enumerable: !0, + value: g, + writable: !0 + }) : s[f] = g; + } + var _l = zl(); + function Tn(s) { + return s == null ? s === void 0 ? K : O : Er && Er in Object(s) ? Ol(s) : jl(s); + } + function Oo(s) { + return Gt(s) && Tn(s) == u; + } + function wl(s) { + if (!mt(s) || Wl(s)) + return !1; + var f = Ta(s) ? Ge : er; + return f.test(Yl(s)); + } + function kl(s) { + return Gt(s) && Lo(s.length) && !!le[Tn(s)]; + } + function Cl(s) { + if (!mt(s)) + return Ll(s); + var f = Mo(s), g = []; + for (var B in s) + B == "constructor" && (f || !de.call(s, B)) || g.push(B); + return g; + } + function Io(s, f, g, B, he) { + s !== f && _l(f, function(Re, Oe) { + if (he || (he = new X()), mt(Re)) + Tl(s, f, Oe, g, Io, B, he); + else { + var ue = B ? B(_a(s, Oe), Re, Oe + "", s, f, he) : void 0; + ue === void 0 && (ue = Re), Nr(s, Oe, ue); + } + }, Vo); + } + function Tl(s, f, g, B, he, Re, Oe) { + var ue = _a(s, g), Ie = _a(f, g), _r = Oe.get(Ie); + if (_r) { + Nr(s, g, _r); + return; + } + var vr = Re ? Re(ue, Ie, g + "", s, f, Oe) : void 0, Xt = vr === void 0; + if (Xt) { + var Ea = ka(Ie), $a = !Ea && Wo(Ie), Ho = !Ea && !$a && jo(Ie); + vr = Ie, Ea || $a || Ho ? ka(ue) ? vr = ue : ql(ue) ? vr = Al(ue) : $a ? (Xt = !1, vr = Rl(Ie, !0)) : Ho ? (Xt = !1, vr = Fl(Ie, !0)) : vr = [] : Gl(Ie) || wa(Ie) ? (vr = ue, wa(ue) ? vr = Xl(ue) : (!mt(ue) || Ta(ue)) && (vr = Il(Ie))) : Xt = !1; + } + Xt && (Oe.set(Ie, vr), he(vr, Ie, B, Re, Oe), Oe.delete(Ie)), Nr(s, g, vr); + } + function El(s, f) { + return Ul(Vl(s, f, Uo), s + ""); + } + var $l = et ? function(s, f) { + return et(s, "toString", { + configurable: !0, + enumerable: !1, + value: Kl(f), + writable: !0 + }); + } : Uo; + function Rl(s, f) { + if (f) + return s.slice(); + var g = s.length, B = xr ? xr(g) : new s.constructor(g); + return s.copy(B), B; + } + function Pl(s) { + var f = new s.constructor(s.byteLength); + return new Tr(f).set(new Tr(s)), f; + } + function Fl(s, f) { + var g = f ? Pl(s.buffer) : s.buffer; + return new s.constructor(g, s.byteOffset, s.length); + } + function Al(s, f) { + var g = -1, B = s.length; + for (f || (f = Array(B)); ++g < B; ) + f[g] = s[g]; + return f; + } + function Nl(s, f, g, B) { + var he = !g; + g || (g = {}); + for (var Re = -1, Oe = f.length; ++Re < Oe; ) { + var ue = f[Re], Ie = B ? B(g[ue], s[ue], ue, g, s) : void 0; + Ie === void 0 && (Ie = s[ue]), he ? Sa(g, ue, Ie) : Cn(g, ue, Ie); + } + return g; + } + function Dl(s) { + return El(function(f, g) { + var B = -1, he = g.length, Re = he > 1 ? g[he - 1] : void 0, Oe = he > 2 ? g[2] : void 0; + for (Re = s.length > 3 && typeof Re == "function" ? (he--, Re) : void 0, Oe && Bl(g[0], g[1], Oe) && (Re = he < 3 ? void 0 : Re, he = 1), f = Object(f); ++B < he; ) { + var ue = g[B]; + ue && s(f, ue, B, Re); + } + return f; + }); + } + function zl(s) { + return function(f, g, B) { + for (var he = -1, Re = Object(f), Oe = B(f), ue = Oe.length; ue--; ) { + var Ie = Oe[s ? ue : ++he]; + if (g(Re[Ie], Ie, Re) === !1) + break; + } + return f; + }; + } + function En(s, f) { + var g = s.__data__; + return Ml(f) ? g[typeof f == "string" ? "string" : "hash"] : g.map; + } + function xa(s, f) { + var g = d(s, f); + return wl(g) ? g : void 0; + } + function Ol(s) { + var f = de.call(s, Er), g = s[Er]; + try { + s[Er] = void 0; + var B = !0; + } catch { + } + var he = tr.call(s); + return B && (f ? s[Er] = g : delete s[Er]), he; + } + function Il(s) { + return typeof s.constructor == "function" && !Mo(s) ? Ur(Vr(s)) : {}; + } + function Bo(s, f) { + var g = typeof s; + return f = f ?? i, !!f && (g == "number" || g != "symbol" && rr.test(s)) && s > -1 && s % 1 == 0 && s < f; + } + function Bl(s, f, g) { + if (!mt(g)) + return !1; + var B = typeof f; + return (B == "number" ? Ca(g) && Bo(f, g.length) : B == "string" && f in g) ? $n(g[f], s) : !1; + } + function Ml(s) { + var f = typeof s; + return f == "string" || f == "number" || f == "symbol" || f == "boolean" ? s !== "__proto__" : s === null; + } + function Wl(s) { + return !!Te && Te in s; + } + function Mo(s) { + var f = s && s.constructor, g = typeof f == "function" && f.prototype || F; + return s === g; + } + function Ll(s) { + var f = []; + if (s != null) + for (var g in Object(s)) + f.push(g); + return f; + } + function jl(s) { + return tr.call(s); + } + function Vl(s, f, g) { + return f = Ar(f === void 0 ? s.length - 1 : f, 0), function() { + for (var B = arguments, he = -1, Re = Ar(B.length - f, 0), Oe = Array(Re); ++he < Re; ) + Oe[he] = B[f + he]; + he = -1; + for (var ue = Array(f + 1); ++he < f; ) + ue[he] = B[he]; + return ue[f] = g(Oe), pr(s, this, ue); + }; + } + function _a(s, f) { + if (!(f === "constructor" && typeof s[f] == "function") && f != "__proto__") + return s[f]; + } + var Ul = Hl($l); + function Hl(s) { + var f = 0, g = 0; + return function() { + var B = ct(), he = o - (B - g); + if (g = B, he > 0) { + if (++f >= a) + return arguments[0]; + } else + f = 0; + return s.apply(void 0, arguments); + }; + } + function Yl(s) { + if (s != null) { + try { + return W.call(s); + } catch { + } + try { + return s + ""; + } catch { + } + } + return ""; + } + function $n(s, f) { + return s === f || s !== s && f !== f; + } + var wa = Oo(function() { + return arguments; + }()) ? Oo : function(s) { + return Gt(s) && de.call(s, "callee") && !Lt.call(s, "callee"); + }, ka = Array.isArray; + function Ca(s) { + return s != null && Lo(s.length) && !Ta(s); + } + function ql(s) { + return Gt(s) && Ca(s); + } + var Wo = Vt || Jl; + function Ta(s) { + if (!mt(s)) + return !1; + var f = Tn(s); + return f == C || f == R || f == v || f == q; + } + function Lo(s) { + return typeof s == "number" && s > -1 && s % 1 == 0 && s <= i; + } + function mt(s) { + var f = typeof s; + return s != null && (f == "object" || f == "function"); + } + function Gt(s) { + return s != null && typeof s == "object"; + } + function Gl(s) { + if (!Gt(s) || Tn(s) != w) + return !1; + var f = Vr(s); + if (f === null) + return !0; + var g = de.call(f, "constructor") && f.constructor; + return typeof g == "function" && g instanceof g && W.call(g) == jr; + } + var jo = $e ? yr($e) : kl; + function Xl(s) { + return Nl(s, Vo(s)); + } + function Vo(s) { + return Ca(s) ? ze(s, !0) : Cl(s); + } + var Ql = Dl(function(s, f, g, B) { + Io(s, f, g, B); + }); + function Kl(s) { + return function() { + return s; + }; + } + function Uo(s) { + return s; + } + function Jl() { + return !1; + } + e.exports = Ql; +})(Df, aa); +const zf = aa; +var Of = (e) => /!(important)?$/.test(e), pi = (e) => typeof e == "string" ? e.replace(/!(important)?$/, "").trim() : e, If = (e, r) => (t) => { + const n = String(r), a = Of(n), o = pi(n), i = e ? `${e}.${o}` : o; + let u = Mt(t.__cssMap) && i in t.__cssMap ? t.__cssMap[i].varRef : r; + return u = pi(u), a ? `${u} !important` : u; +}; +function Po(e) { + const { scale: r, transform: t, compose: n } = e; + return (o, i) => { + var u; + const h = If(r, o)(i); + let v = (u = t == null ? void 0 : t(h, i)) != null ? u : h; + return n && (v = n(v, i)), v; + }; +} +var An = (...e) => (r) => e.reduce((t, n) => n(t), r); +function wr(e, r) { + return (t) => { + const n = { property: t, scale: e }; + return n.transform = Po({ + scale: e, + transform: r + }), n; + }; +} +var Bf = ({ rtl: e, ltr: r }) => (t) => t.direction === "rtl" ? e : r; +function Mf(e) { + const { property: r, scale: t, transform: n } = e; + return { + scale: t, + property: Bf(r), + transform: t ? Po({ + scale: t, + compose: n + }) : n + }; +} +var il = [ + "rotate(var(--chakra-rotate, 0))", + "scaleX(var(--chakra-scale-x, 1))", + "scaleY(var(--chakra-scale-y, 1))", + "skewX(var(--chakra-skew-x, 0))", + "skewY(var(--chakra-skew-y, 0))" +]; +function Wf() { + return [ + "translateX(var(--chakra-translate-x, 0))", + "translateY(var(--chakra-translate-y, 0))", + ...il + ].join(" "); +} +function Lf() { + return [ + "translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)", + ...il + ].join(" "); +} +var jf = { + "--chakra-blur": "var(--chakra-empty,/*!*/ /*!*/)", + "--chakra-brightness": "var(--chakra-empty,/*!*/ /*!*/)", + "--chakra-contrast": "var(--chakra-empty,/*!*/ /*!*/)", + "--chakra-grayscale": "var(--chakra-empty,/*!*/ /*!*/)", + "--chakra-hue-rotate": "var(--chakra-empty,/*!*/ /*!*/)", + "--chakra-invert": "var(--chakra-empty,/*!*/ /*!*/)", + "--chakra-saturate": "var(--chakra-empty,/*!*/ /*!*/)", + "--chakra-sepia": "var(--chakra-empty,/*!*/ /*!*/)", + "--chakra-drop-shadow": "var(--chakra-empty,/*!*/ /*!*/)", + filter: [ + "var(--chakra-blur)", + "var(--chakra-brightness)", + "var(--chakra-contrast)", + "var(--chakra-grayscale)", + "var(--chakra-hue-rotate)", + "var(--chakra-invert)", + "var(--chakra-saturate)", + "var(--chakra-sepia)", + "var(--chakra-drop-shadow)" + ].join(" ") +}, Vf = { + backdropFilter: [ + "var(--chakra-backdrop-blur)", + "var(--chakra-backdrop-brightness)", + "var(--chakra-backdrop-contrast)", + "var(--chakra-backdrop-grayscale)", + "var(--chakra-backdrop-hue-rotate)", + "var(--chakra-backdrop-invert)", + "var(--chakra-backdrop-opacity)", + "var(--chakra-backdrop-saturate)", + "var(--chakra-backdrop-sepia)" + ].join(" "), + "--chakra-backdrop-blur": "var(--chakra-empty,/*!*/ /*!*/)", + "--chakra-backdrop-brightness": "var(--chakra-empty,/*!*/ /*!*/)", + "--chakra-backdrop-contrast": "var(--chakra-empty,/*!*/ /*!*/)", + "--chakra-backdrop-grayscale": "var(--chakra-empty,/*!*/ /*!*/)", + "--chakra-backdrop-hue-rotate": "var(--chakra-empty,/*!*/ /*!*/)", + "--chakra-backdrop-invert": "var(--chakra-empty,/*!*/ /*!*/)", + "--chakra-backdrop-opacity": "var(--chakra-empty,/*!*/ /*!*/)", + "--chakra-backdrop-saturate": "var(--chakra-empty,/*!*/ /*!*/)", + "--chakra-backdrop-sepia": "var(--chakra-empty,/*!*/ /*!*/)" +}; +function Uf(e) { + return { + "--chakra-ring-offset-shadow": "var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)", + "--chakra-ring-shadow": "var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)", + "--chakra-ring-width": e, + boxShadow: [ + "var(--chakra-ring-offset-shadow)", + "var(--chakra-ring-shadow)", + "var(--chakra-shadow, 0 0 #0000)" + ].join(", ") + }; +} +var Hf = { + "row-reverse": { + space: "--chakra-space-x-reverse", + divide: "--chakra-divide-x-reverse" + }, + "column-reverse": { + space: "--chakra-space-y-reverse", + divide: "--chakra-divide-y-reverse" + } +}, so = { + "to-t": "to top", + "to-tr": "to top right", + "to-r": "to right", + "to-br": "to bottom right", + "to-b": "to bottom", + "to-bl": "to bottom left", + "to-l": "to left", + "to-tl": "to top left" +}, Yf = new Set(Object.values(so)), lo = /* @__PURE__ */ new Set([ + "none", + "-moz-initial", + "inherit", + "initial", + "revert", + "unset" +]), qf = (e) => e.trim(); +function Gf(e, r) { + if (e == null || lo.has(e)) + return e; + if (!(co(e) || lo.has(e))) + return `url('${e}')`; + const a = /(^[a-z-A-Z]+)\((.*)\)/g.exec(e), o = a == null ? void 0 : a[1], i = a == null ? void 0 : a[2]; + if (!o || !i) + return e; + const u = o.includes("-gradient") ? o : `${o}-gradient`, [h, ...v] = i.split(",").map(qf).filter(Boolean); + if ((v == null ? void 0 : v.length) === 0) + return e; + const S = h in so ? so[h] : h; + v.unshift(S); + const b = v.map((_) => { + if (Yf.has(_)) + return _; + const C = _.indexOf(" "), [R, Y] = C !== -1 ? [_.substr(0, C), _.substr(C + 1)] : [_], L = co(Y) ? Y : Y && Y.split(" "), O = `colors.${R}`, w = O in r.__cssMap ? r.__cssMap[O].varRef : R; + return L ? [ + w, + ...Array.isArray(L) ? L : [L] + ].join(" ") : w; + }); + return `${u}(${b.join(", ")})`; +} +var co = (e) => typeof e == "string" && e.includes("(") && e.includes(")"), Xf = (e, r) => Gf(e, r ?? {}); +function Qf(e) { + return /^var\(--.+\)$/.test(e); +} +var Kf = (e) => { + const r = parseFloat(e.toString()), t = e.toString().replace(String(r), ""); + return { unitless: !t, value: r, unit: t }; +}, zr = (e) => (r) => `${e}(${r})`, pe = { + filter(e) { + return e !== "auto" ? e : jf; + }, + backdropFilter(e) { + return e !== "auto" ? e : Vf; + }, + ring(e) { + return Uf(pe.px(e)); + }, + bgClip(e) { + return e === "text" ? { color: "transparent", backgroundClip: "text" } : { backgroundClip: e }; + }, + transform(e) { + return e === "auto" ? Wf() : e === "auto-gpu" ? Lf() : e; + }, + vh(e) { + return e === "$100vh" ? "var(--chakra-vh)" : e; + }, + px(e) { + if (e == null) + return e; + const { unitless: r } = Kf(e); + return r || typeof e == "number" ? `${e}px` : e; + }, + fraction(e) { + return typeof e != "number" || e > 1 ? e : `${e * 100}%`; + }, + float(e, r) { + const t = { left: "right", right: "left" }; + return r.direction === "rtl" ? t[e] : e; + }, + degree(e) { + if (Qf(e) || e == null) + return e; + const r = typeof e == "string" && !e.endsWith("deg"); + return typeof e == "number" || r ? `${e}deg` : e; + }, + gradient: Xf, + blur: zr("blur"), + opacity: zr("opacity"), + brightness: zr("brightness"), + contrast: zr("contrast"), + dropShadow: zr("drop-shadow"), + grayscale: zr("grayscale"), + hueRotate: zr("hue-rotate"), + invert: zr("invert"), + saturate: zr("saturate"), + sepia: zr("sepia"), + bgImage(e) { + return e == null || co(e) || lo.has(e) ? e : `url(${e})`; + }, + outline(e) { + const r = String(e) === "0" || String(e) === "none"; + return e !== null && r ? { outline: "2px solid transparent", outlineOffset: "2px" } : { outline: e }; + }, + flexDirection(e) { + var r; + const { space: t, divide: n } = (r = Hf[e]) != null ? r : {}, a = { flexDirection: e }; + return t && (a[t] = 1), n && (a[n] = 1), a; + } +}, m = { + borderWidths: wr("borderWidths"), + borderStyles: wr("borderStyles"), + colors: wr("colors"), + borders: wr("borders"), + gradients: wr("gradients", pe.gradient), + radii: wr("radii", pe.px), + space: wr("space", An(pe.vh, pe.px)), + spaceT: wr("space", An(pe.vh, pe.px)), + degreeT(e) { + return { property: e, transform: pe.degree }; + }, + prop(e, r, t) { + return { + property: e, + scale: r, + ...r && { + transform: Po({ scale: r, transform: t }) + } + }; + }, + propT(e, r) { + return { property: e, transform: r }; + }, + sizes: wr("sizes", An(pe.vh, pe.px)), + sizesT: wr("sizes", An(pe.vh, pe.fraction)), + shadows: wr("shadows"), + logical: Mf, + blur: wr("blur", pe.blur) +}, Hn = { + background: m.colors("background"), + backgroundColor: m.colors("backgroundColor"), + backgroundImage: m.gradients("backgroundImage"), + backgroundSize: !0, + backgroundPosition: !0, + backgroundRepeat: !0, + backgroundAttachment: !0, + backgroundClip: { transform: pe.bgClip }, + bgSize: m.prop("backgroundSize"), + bgPosition: m.prop("backgroundPosition"), + bg: m.colors("background"), + bgColor: m.colors("backgroundColor"), + bgPos: m.prop("backgroundPosition"), + bgRepeat: m.prop("backgroundRepeat"), + bgAttachment: m.prop("backgroundAttachment"), + bgGradient: m.gradients("backgroundImage"), + bgClip: { transform: pe.bgClip } +}; +Object.assign(Hn, { + bgImage: Hn.backgroundImage, + bgImg: Hn.backgroundImage +}); +var Se = { + border: m.borders("border"), + borderWidth: m.borderWidths("borderWidth"), + borderStyle: m.borderStyles("borderStyle"), + borderColor: m.colors("borderColor"), + borderRadius: m.radii("borderRadius"), + borderTop: m.borders("borderTop"), + borderBlockStart: m.borders("borderBlockStart"), + borderTopLeftRadius: m.radii("borderTopLeftRadius"), + borderStartStartRadius: m.logical({ + scale: "radii", + property: { + ltr: "borderTopLeftRadius", + rtl: "borderTopRightRadius" + } + }), + borderEndStartRadius: m.logical({ + scale: "radii", + property: { + ltr: "borderBottomLeftRadius", + rtl: "borderBottomRightRadius" + } + }), + borderTopRightRadius: m.radii("borderTopRightRadius"), + borderStartEndRadius: m.logical({ + scale: "radii", + property: { + ltr: "borderTopRightRadius", + rtl: "borderTopLeftRadius" + } + }), + borderEndEndRadius: m.logical({ + scale: "radii", + property: { + ltr: "borderBottomRightRadius", + rtl: "borderBottomLeftRadius" + } + }), + borderRight: m.borders("borderRight"), + borderInlineEnd: m.borders("borderInlineEnd"), + borderBottom: m.borders("borderBottom"), + borderBlockEnd: m.borders("borderBlockEnd"), + borderBottomLeftRadius: m.radii("borderBottomLeftRadius"), + borderBottomRightRadius: m.radii("borderBottomRightRadius"), + borderLeft: m.borders("borderLeft"), + borderInlineStart: { + property: "borderInlineStart", + scale: "borders" + }, + borderInlineStartRadius: m.logical({ + scale: "radii", + property: { + ltr: ["borderTopLeftRadius", "borderBottomLeftRadius"], + rtl: ["borderTopRightRadius", "borderBottomRightRadius"] + } + }), + borderInlineEndRadius: m.logical({ + scale: "radii", + property: { + ltr: ["borderTopRightRadius", "borderBottomRightRadius"], + rtl: ["borderTopLeftRadius", "borderBottomLeftRadius"] + } + }), + borderX: m.borders(["borderLeft", "borderRight"]), + borderInline: m.borders("borderInline"), + borderY: m.borders(["borderTop", "borderBottom"]), + borderBlock: m.borders("borderBlock"), + borderTopWidth: m.borderWidths("borderTopWidth"), + borderBlockStartWidth: m.borderWidths("borderBlockStartWidth"), + borderTopColor: m.colors("borderTopColor"), + borderBlockStartColor: m.colors("borderBlockStartColor"), + borderTopStyle: m.borderStyles("borderTopStyle"), + borderBlockStartStyle: m.borderStyles("borderBlockStartStyle"), + borderBottomWidth: m.borderWidths("borderBottomWidth"), + borderBlockEndWidth: m.borderWidths("borderBlockEndWidth"), + borderBottomColor: m.colors("borderBottomColor"), + borderBlockEndColor: m.colors("borderBlockEndColor"), + borderBottomStyle: m.borderStyles("borderBottomStyle"), + borderBlockEndStyle: m.borderStyles("borderBlockEndStyle"), + borderLeftWidth: m.borderWidths("borderLeftWidth"), + borderInlineStartWidth: m.borderWidths("borderInlineStartWidth"), + borderLeftColor: m.colors("borderLeftColor"), + borderInlineStartColor: m.colors("borderInlineStartColor"), + borderLeftStyle: m.borderStyles("borderLeftStyle"), + borderInlineStartStyle: m.borderStyles("borderInlineStartStyle"), + borderRightWidth: m.borderWidths("borderRightWidth"), + borderInlineEndWidth: m.borderWidths("borderInlineEndWidth"), + borderRightColor: m.colors("borderRightColor"), + borderInlineEndColor: m.colors("borderInlineEndColor"), + borderRightStyle: m.borderStyles("borderRightStyle"), + borderInlineEndStyle: m.borderStyles("borderInlineEndStyle"), + borderTopRadius: m.radii(["borderTopLeftRadius", "borderTopRightRadius"]), + borderBottomRadius: m.radii([ + "borderBottomLeftRadius", + "borderBottomRightRadius" + ]), + borderLeftRadius: m.radii(["borderTopLeftRadius", "borderBottomLeftRadius"]), + borderRightRadius: m.radii([ + "borderTopRightRadius", + "borderBottomRightRadius" + ]) +}; +Object.assign(Se, { + rounded: Se.borderRadius, + roundedTop: Se.borderTopRadius, + roundedTopLeft: Se.borderTopLeftRadius, + roundedTopRight: Se.borderTopRightRadius, + roundedTopStart: Se.borderStartStartRadius, + roundedTopEnd: Se.borderStartEndRadius, + roundedBottom: Se.borderBottomRadius, + roundedBottomLeft: Se.borderBottomLeftRadius, + roundedBottomRight: Se.borderBottomRightRadius, + roundedBottomStart: Se.borderEndStartRadius, + roundedBottomEnd: Se.borderEndEndRadius, + roundedLeft: Se.borderLeftRadius, + roundedRight: Se.borderRightRadius, + roundedStart: Se.borderInlineStartRadius, + roundedEnd: Se.borderInlineEndRadius, + borderStart: Se.borderInlineStart, + borderEnd: Se.borderInlineEnd, + borderTopStartRadius: Se.borderStartStartRadius, + borderTopEndRadius: Se.borderStartEndRadius, + borderBottomStartRadius: Se.borderEndStartRadius, + borderBottomEndRadius: Se.borderEndEndRadius, + borderStartRadius: Se.borderInlineStartRadius, + borderEndRadius: Se.borderInlineEndRadius, + borderStartWidth: Se.borderInlineStartWidth, + borderEndWidth: Se.borderInlineEndWidth, + borderStartColor: Se.borderInlineStartColor, + borderEndColor: Se.borderInlineEndColor, + borderStartStyle: Se.borderInlineStartStyle, + borderEndStyle: Se.borderInlineEndStyle +}); +var Jf = { + color: m.colors("color"), + textColor: m.colors("color"), + fill: m.colors("fill"), + stroke: m.colors("stroke") +}, uo = { + boxShadow: m.shadows("boxShadow"), + mixBlendMode: !0, + blendMode: m.prop("mixBlendMode"), + backgroundBlendMode: !0, + bgBlendMode: m.prop("backgroundBlendMode"), + opacity: !0 +}; +Object.assign(uo, { + shadow: uo.boxShadow +}); +var Zf = { + filter: { transform: pe.filter }, + blur: m.blur("--chakra-blur"), + brightness: m.propT("--chakra-brightness", pe.brightness), + contrast: m.propT("--chakra-contrast", pe.contrast), + hueRotate: m.degreeT("--chakra-hue-rotate"), + invert: m.propT("--chakra-invert", pe.invert), + saturate: m.propT("--chakra-saturate", pe.saturate), + dropShadow: m.propT("--chakra-drop-shadow", pe.dropShadow), + backdropFilter: { transform: pe.backdropFilter }, + backdropBlur: m.blur("--chakra-backdrop-blur"), + backdropBrightness: m.propT( + "--chakra-backdrop-brightness", + pe.brightness + ), + backdropContrast: m.propT("--chakra-backdrop-contrast", pe.contrast), + backdropHueRotate: m.degreeT("--chakra-backdrop-hue-rotate"), + backdropInvert: m.propT("--chakra-backdrop-invert", pe.invert), + backdropSaturate: m.propT("--chakra-backdrop-saturate", pe.saturate) +}, oa = { + alignItems: !0, + alignContent: !0, + justifyItems: !0, + justifyContent: !0, + flexWrap: !0, + flexDirection: { transform: pe.flexDirection }, + flex: !0, + flexFlow: !0, + flexGrow: !0, + flexShrink: !0, + flexBasis: m.sizes("flexBasis"), + justifySelf: !0, + alignSelf: !0, + order: !0, + placeItems: !0, + placeContent: !0, + placeSelf: !0, + gap: m.space("gap"), + rowGap: m.space("rowGap"), + columnGap: m.space("columnGap") +}; +Object.assign(oa, { + flexDir: oa.flexDirection +}); +var sl = { + gridGap: m.space("gridGap"), + gridColumnGap: m.space("gridColumnGap"), + gridRowGap: m.space("gridRowGap"), + gridColumn: !0, + gridRow: !0, + gridAutoFlow: !0, + gridAutoColumns: !0, + gridColumnStart: !0, + gridColumnEnd: !0, + gridRowStart: !0, + gridRowEnd: !0, + gridAutoRows: !0, + gridTemplate: !0, + gridTemplateColumns: !0, + gridTemplateRows: !0, + gridTemplateAreas: !0, + gridArea: !0 +}, em = { + appearance: !0, + cursor: !0, + resize: !0, + userSelect: !0, + pointerEvents: !0, + outline: { transform: pe.outline }, + outlineOffset: !0, + outlineColor: m.colors("outlineColor") +}, kr = { + width: m.sizesT("width"), + inlineSize: m.sizesT("inlineSize"), + height: m.sizes("height"), + blockSize: m.sizes("blockSize"), + boxSize: m.sizes(["width", "height"]), + minWidth: m.sizes("minWidth"), + minInlineSize: m.sizes("minInlineSize"), + minHeight: m.sizes("minHeight"), + minBlockSize: m.sizes("minBlockSize"), + maxWidth: m.sizes("maxWidth"), + maxInlineSize: m.sizes("maxInlineSize"), + maxHeight: m.sizes("maxHeight"), + maxBlockSize: m.sizes("maxBlockSize"), + overflow: !0, + overflowX: !0, + overflowY: !0, + overscrollBehavior: !0, + overscrollBehaviorX: !0, + overscrollBehaviorY: !0, + display: !0, + hideFrom: { + scale: "breakpoints", + transform: (e, r) => { + var t, n, a; + return { [`@media screen and (min-width: ${(a = (n = (t = r.__breakpoints) == null ? void 0 : t.get(e)) == null ? void 0 : n.minW) != null ? a : e})`]: { display: "none" } }; + } + }, + hideBelow: { + scale: "breakpoints", + transform: (e, r) => { + var t, n, a; + return { [`@media screen and (max-width: ${(a = (n = (t = r.__breakpoints) == null ? void 0 : t.get(e)) == null ? void 0 : n._minW) != null ? a : e})`]: { display: "none" } }; + } + }, + verticalAlign: !0, + boxSizing: !0, + boxDecorationBreak: !0, + float: m.propT("float", pe.float), + objectFit: !0, + objectPosition: !0, + visibility: !0, + isolation: !0 +}; +Object.assign(kr, { + w: kr.width, + h: kr.height, + minW: kr.minWidth, + maxW: kr.maxWidth, + minH: kr.minHeight, + maxH: kr.maxHeight, + overscroll: kr.overscrollBehavior, + overscrollX: kr.overscrollBehaviorX, + overscrollY: kr.overscrollBehaviorY +}); +var rm = { + listStyleType: !0, + listStylePosition: !0, + listStylePos: m.prop("listStylePosition"), + listStyleImage: !0, + listStyleImg: m.prop("listStyleImage") +}; +function tm(e, r, t, n) { + const a = typeof r == "string" ? r.split(".") : [r]; + for (n = 0; n < a.length && e; n += 1) + e = e[a[n]]; + return e === void 0 ? t : e; +} +var nm = (e) => { + const r = /* @__PURE__ */ new WeakMap(); + return (n, a, o, i) => { + if (typeof n > "u") + return e(n, a, o); + r.has(n) || r.set(n, /* @__PURE__ */ new Map()); + const u = r.get(n); + if (u.has(a)) + return u.get(a); + const h = e(n, a, o, i); + return u.set(a, h), h; + }; +}, am = nm(tm), om = { + border: "0px", + clip: "rect(0, 0, 0, 0)", + width: "1px", + height: "1px", + margin: "-1px", + padding: "0px", + overflow: "hidden", + whiteSpace: "nowrap", + position: "absolute" +}, im = { + position: "static", + width: "auto", + height: "auto", + clip: "auto", + padding: "0", + margin: "0", + overflow: "visible", + whiteSpace: "normal" +}, za = (e, r, t) => { + const n = {}, a = am(e, r, {}); + for (const o in a) + o in t && t[o] != null || (n[o] = a[o]); + return n; +}, sm = { + srOnly: { + transform(e) { + return e === !0 ? om : e === "focusable" ? im : {}; + } + }, + layerStyle: { + processResult: !0, + transform: (e, r, t) => za(r, `layerStyles.${e}`, t) + }, + textStyle: { + processResult: !0, + transform: (e, r, t) => za(r, `textStyles.${e}`, t) + }, + apply: { + processResult: !0, + transform: (e, r, t) => za(r, e, t) + } +}, un = { + position: !0, + pos: m.prop("position"), + zIndex: m.prop("zIndex", "zIndices"), + inset: m.spaceT("inset"), + insetX: m.spaceT(["left", "right"]), + insetInline: m.spaceT("insetInline"), + insetY: m.spaceT(["top", "bottom"]), + insetBlock: m.spaceT("insetBlock"), + top: m.spaceT("top"), + insetBlockStart: m.spaceT("insetBlockStart"), + bottom: m.spaceT("bottom"), + insetBlockEnd: m.spaceT("insetBlockEnd"), + left: m.spaceT("left"), + insetInlineStart: m.logical({ + scale: "space", + property: { ltr: "left", rtl: "right" } + }), + right: m.spaceT("right"), + insetInlineEnd: m.logical({ + scale: "space", + property: { ltr: "right", rtl: "left" } + }) +}; +Object.assign(un, { + insetStart: un.insetInlineStart, + insetEnd: un.insetInlineEnd +}); +var lm = { + ring: { transform: pe.ring }, + ringColor: m.colors("--chakra-ring-color"), + ringOffset: m.prop("--chakra-ring-offset-width"), + ringOffsetColor: m.colors("--chakra-ring-offset-color"), + ringInset: m.prop("--chakra-ring-inset") +}, De = { + margin: m.spaceT("margin"), + marginTop: m.spaceT("marginTop"), + marginBlockStart: m.spaceT("marginBlockStart"), + marginRight: m.spaceT("marginRight"), + marginInlineEnd: m.spaceT("marginInlineEnd"), + marginBottom: m.spaceT("marginBottom"), + marginBlockEnd: m.spaceT("marginBlockEnd"), + marginLeft: m.spaceT("marginLeft"), + marginInlineStart: m.spaceT("marginInlineStart"), + marginX: m.spaceT(["marginInlineStart", "marginInlineEnd"]), + marginInline: m.spaceT("marginInline"), + marginY: m.spaceT(["marginTop", "marginBottom"]), + marginBlock: m.spaceT("marginBlock"), + padding: m.space("padding"), + paddingTop: m.space("paddingTop"), + paddingBlockStart: m.space("paddingBlockStart"), + paddingRight: m.space("paddingRight"), + paddingBottom: m.space("paddingBottom"), + paddingBlockEnd: m.space("paddingBlockEnd"), + paddingLeft: m.space("paddingLeft"), + paddingInlineStart: m.space("paddingInlineStart"), + paddingInlineEnd: m.space("paddingInlineEnd"), + paddingX: m.space(["paddingInlineStart", "paddingInlineEnd"]), + paddingInline: m.space("paddingInline"), + paddingY: m.space(["paddingTop", "paddingBottom"]), + paddingBlock: m.space("paddingBlock") +}; +Object.assign(De, { + m: De.margin, + mt: De.marginTop, + mr: De.marginRight, + me: De.marginInlineEnd, + marginEnd: De.marginInlineEnd, + mb: De.marginBottom, + ml: De.marginLeft, + ms: De.marginInlineStart, + marginStart: De.marginInlineStart, + mx: De.marginX, + my: De.marginY, + p: De.padding, + pt: De.paddingTop, + py: De.paddingY, + px: De.paddingX, + pb: De.paddingBottom, + pl: De.paddingLeft, + ps: De.paddingInlineStart, + paddingStart: De.paddingInlineStart, + pr: De.paddingRight, + pe: De.paddingInlineEnd, + paddingEnd: De.paddingInlineEnd +}); +var cm = { + textDecorationColor: m.colors("textDecorationColor"), + textDecoration: !0, + textDecor: { property: "textDecoration" }, + textDecorationLine: !0, + textDecorationStyle: !0, + textDecorationThickness: !0, + textUnderlineOffset: !0, + textShadow: m.shadows("textShadow") +}, dm = { + clipPath: !0, + transform: m.propT("transform", pe.transform), + transformOrigin: !0, + translateX: m.spaceT("--chakra-translate-x"), + translateY: m.spaceT("--chakra-translate-y"), + skewX: m.degreeT("--chakra-skew-x"), + skewY: m.degreeT("--chakra-skew-y"), + scaleX: m.prop("--chakra-scale-x"), + scaleY: m.prop("--chakra-scale-y"), + scale: m.prop(["--chakra-scale-x", "--chakra-scale-y"]), + rotate: m.degreeT("--chakra-rotate") +}, um = { + transition: !0, + transitionDelay: !0, + animation: !0, + willChange: !0, + transitionDuration: m.prop("transitionDuration", "transition.duration"), + transitionProperty: m.prop("transitionProperty", "transition.property"), + transitionTimingFunction: m.prop( + "transitionTimingFunction", + "transition.easing" + ) +}, fm = { + fontFamily: m.prop("fontFamily", "fonts"), + fontSize: m.prop("fontSize", "fontSizes", pe.px), + fontWeight: m.prop("fontWeight", "fontWeights"), + lineHeight: m.prop("lineHeight", "lineHeights"), + letterSpacing: m.prop("letterSpacing", "letterSpacings"), + textAlign: !0, + fontStyle: !0, + textIndent: !0, + wordBreak: !0, + overflowWrap: !0, + textOverflow: !0, + textTransform: !0, + whiteSpace: !0, + isTruncated: { + transform(e) { + if (e === !0) + return { + overflow: "hidden", + textOverflow: "ellipsis", + whiteSpace: "nowrap" + }; + } + }, + noOfLines: { + static: { + overflow: "hidden", + textOverflow: "ellipsis", + display: "-webkit-box", + WebkitBoxOrient: "vertical", + WebkitLineClamp: "var(--chakra-line-clamp)" + }, + property: "--chakra-line-clamp" + } +}, mm = { + scrollBehavior: !0, + scrollSnapAlign: !0, + scrollSnapStop: !0, + scrollSnapType: !0, + scrollMargin: m.spaceT("scrollMargin"), + scrollMarginTop: m.spaceT("scrollMarginTop"), + scrollMarginBottom: m.spaceT("scrollMarginBottom"), + scrollMarginLeft: m.spaceT("scrollMarginLeft"), + scrollMarginRight: m.spaceT("scrollMarginRight"), + scrollMarginX: m.spaceT(["scrollMarginLeft", "scrollMarginRight"]), + scrollMarginY: m.spaceT(["scrollMarginTop", "scrollMarginBottom"]), + scrollPadding: m.spaceT("scrollPadding"), + scrollPaddingTop: m.spaceT("scrollPaddingTop"), + scrollPaddingBottom: m.spaceT("scrollPaddingBottom"), + scrollPaddingLeft: m.spaceT("scrollPaddingLeft"), + scrollPaddingRight: m.spaceT("scrollPaddingRight"), + scrollPaddingX: m.spaceT(["scrollPaddingLeft", "scrollPaddingRight"]), + scrollPaddingY: m.spaceT(["scrollPaddingTop", "scrollPaddingBottom"]) +}; +function ll(e) { + return Mt(e) && e.reference ? e.reference : String(e); +} +var ba = (e, ...r) => r.map(ll).join(` ${e} `).replace(/calc/g, ""), yi = (...e) => `calc(${ba("+", ...e)})`, Si = (...e) => `calc(${ba("-", ...e)})`, fo = (...e) => `calc(${ba("*", ...e)})`, xi = (...e) => `calc(${ba("/", ...e)})`, _i = (e) => { + const r = ll(e); + return r != null && !Number.isNaN(parseFloat(r)) ? String(r).startsWith("-") ? String(r).slice(1) : `-${r}` : fo(r, -1); +}, rn = Object.assign( + (e) => ({ + add: (...r) => rn(yi(e, ...r)), + subtract: (...r) => rn(Si(e, ...r)), + multiply: (...r) => rn(fo(e, ...r)), + divide: (...r) => rn(xi(e, ...r)), + negate: () => rn(_i(e)), + toString: () => e.toString() + }), + { + add: yi, + subtract: Si, + multiply: fo, + divide: xi, + negate: _i + } +); +function hm(e, r = "-") { + return e.replace(/\s+/g, r); +} +function vm(e) { + const r = hm(e.toString()); + return bm(gm(r)); +} +function gm(e) { + return e.includes("\\.") ? e : !Number.isInteger(parseFloat(e.toString())) ? e.replace(".", "\\.") : e; +} +function bm(e) { + return e.replace(/[!-,/:-@[-^`{-~]/g, "\\$&"); +} +function pm(e, r = "") { + return [r, e].filter(Boolean).join("-"); +} +function ym(e, r) { + return `var(${e}${r ? `, ${r}` : ""})`; +} +function Sm(e, r = "") { + return vm(`--${pm(e, r)}`); +} +function oe(e, r, t) { + const n = Sm(e, t); + return { + variable: n, + reference: ym(n, r) + }; +} +function xm(e, r) { + const t = {}; + for (const n of r) { + if (Array.isArray(n)) { + const [a, o] = n; + t[a] = oe(`${e}-${a}`, o); + continue; + } + t[n] = oe(`${e}-${n}`); + } + return t; +} +var Xe = { + hover: (e, r) => `${e}:hover ${r}, ${e}[data-hover] ${r}`, + focus: (e, r) => `${e}:focus ${r}, ${e}[data-focus] ${r}`, + focusVisible: (e, r) => `${e}:focus-visible ${r}`, + focusWithin: (e, r) => `${e}:focus-within ${r}`, + active: (e, r) => `${e}:active ${r}, ${e}[data-active] ${r}`, + disabled: (e, r) => `${e}:disabled ${r}, ${e}[data-disabled] ${r}`, + invalid: (e, r) => `${e}:invalid ${r}, ${e}[data-invalid] ${r}`, + checked: (e, r) => `${e}:checked ${r}, ${e}[data-checked] ${r}`, + indeterminate: (e, r) => `${e}:indeterminate ${r}, ${e}[aria-checked=mixed] ${r}, ${e}[data-indeterminate] ${r}`, + readOnly: (e, r) => `${e}:read-only ${r}, ${e}[readonly] ${r}, ${e}[data-read-only] ${r}`, + expanded: (e, r) => `${e}:read-only ${r}, ${e}[aria-expanded=true] ${r}, ${e}[data-expanded] ${r}`, + placeholderShown: (e, r) => `${e}:placeholder-shown ${r}` +}, nt = (e) => cl((r) => e(r, "&"), "[role=group]", "[data-group]", ".group"), Yr = (e) => cl((r) => e(r, "~ &"), "[data-peer]", ".peer"), cl = (e, ...r) => r.map(e).join(", "), dl = { + _hover: "&:hover, &[data-hover]", + _active: "&:active, &[data-active]", + _focus: "&:focus, &[data-focus]", + _highlighted: "&[data-highlighted]", + _focusWithin: "&:focus-within", + _focusVisible: "&:focus-visible, &[data-focus-visible]", + _disabled: "&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]", + _readOnly: "&[aria-readonly=true], &[readonly], &[data-readonly]", + _before: "&::before", + _after: "&::after", + _empty: "&:empty", + _expanded: "&[aria-expanded=true], &[data-expanded]", + _checked: "&[aria-checked=true], &[data-checked]", + _grabbed: "&[aria-grabbed=true], &[data-grabbed]", + _pressed: "&[aria-pressed=true], &[data-pressed]", + _invalid: "&[aria-invalid=true], &[data-invalid]", + _valid: "&[data-valid], &[data-state=valid]", + _loading: "&[data-loading], &[aria-busy=true]", + _selected: "&[aria-selected=true], &[data-selected]", + _hidden: "&[hidden], &[data-hidden]", + _autofill: "&:-webkit-autofill", + _even: "&:nth-of-type(even)", + _odd: "&:nth-of-type(odd)", + _first: "&:first-of-type", + _firstLetter: "&::first-letter", + _last: "&:last-of-type", + _notFirst: "&:not(:first-of-type)", + _notLast: "&:not(:last-of-type)", + _visited: "&:visited", + _activeLink: "&[aria-current=page]", + _activeStep: "&[aria-current=step]", + _indeterminate: "&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]", + _groupHover: nt(Xe.hover), + _peerHover: Yr(Xe.hover), + _groupFocus: nt(Xe.focus), + _peerFocus: Yr(Xe.focus), + _groupFocusVisible: nt(Xe.focusVisible), + _peerFocusVisible: Yr(Xe.focusVisible), + _groupActive: nt(Xe.active), + _peerActive: Yr(Xe.active), + _groupDisabled: nt(Xe.disabled), + _peerDisabled: Yr(Xe.disabled), + _groupInvalid: nt(Xe.invalid), + _peerInvalid: Yr(Xe.invalid), + _groupChecked: nt(Xe.checked), + _peerChecked: Yr(Xe.checked), + _groupFocusWithin: nt(Xe.focusWithin), + _peerFocusWithin: Yr(Xe.focusWithin), + _peerPlaceholderShown: Yr(Xe.placeholderShown), + _placeholder: "&::placeholder", + _placeholderShown: "&:placeholder-shown", + _fullScreen: "&:fullscreen", + _selection: "&::selection", + _rtl: "[dir=rtl] &, &[dir=rtl]", + _ltr: "[dir=ltr] &, &[dir=ltr]", + _mediaDark: "@media (prefers-color-scheme: dark)", + _mediaReduceMotion: "@media (prefers-reduced-motion: reduce)", + _dark: ".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]", + _light: ".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]" +}, _m = Object.keys( + dl +), ul = zf( + {}, + Hn, + Se, + Jf, + oa, + kr, + Zf, + lm, + em, + sl, + sm, + un, + uo, + De, + mm, + fm, + cm, + dm, + rm, + um +); +Object.assign({}, De, kr, oa, sl, un); +[...Object.keys(ul), ..._m]; +({ ...ul, ...dl }); +function Ae(e) { + return { + definePartsStyle(r) { + return r; + }, + defineMultiStyleConfig(r) { + return { parts: e, ...r }; + } + }; +} +var { defineMultiStyleConfig: wm, definePartsStyle: sn } = Ae([ + "stepper", + "step", + "title", + "description", + "indicator", + "separator", + "icon", + "number" +]), Gr = oe("stepper-indicator-size"), At = oe("stepper-icon-size"), Nt = oe("stepper-title-font-size"), ln = oe("stepper-description-font-size"), tn = oe("stepper-accent-color"), km = sn(({ colorScheme: e }) => ({ + stepper: { + display: "flex", + justifyContent: "space-between", + gap: "4", + "&[data-orientation=vertical]": { + flexDirection: "column", + alignItems: "flex-start" + }, + "&[data-orientation=horizontal]": { + flexDirection: "row", + alignItems: "center" + }, + [tn.variable]: `colors.${e}.500`, + _dark: { + [tn.variable]: `colors.${e}.200` + } + }, + title: { + fontSize: Nt.reference, + fontWeight: "medium" + }, + description: { + fontSize: ln.reference, + color: "chakra-subtle-text" + }, + number: { + fontSize: Nt.reference + }, + step: { + flexShrink: 0, + position: "relative", + display: "flex", + gap: "2", + "&[data-orientation=horizontal]": { + alignItems: "center" + }, + "&:not(:last-of-type)": { + flex: "1" + } + }, + icon: { + flexShrink: 0, + width: At.reference, + height: At.reference + }, + indicator: { + flexShrink: 0, + borderRadius: "full", + width: Gr.reference, + height: Gr.reference, + display: "flex", + justifyContent: "center", + alignItems: "center", + "&[data-status=active]": { + borderWidth: "2px", + borderColor: tn.reference + }, + "&[data-status=complete]": { + bg: tn.reference, + color: "chakra-inverse-text" + }, + "&[data-status=incomplete]": { + borderWidth: "2px" + } + }, + separator: { + bg: "chakra-border-color", + flex: "1", + "&[data-status=complete]": { + bg: tn.reference + }, + "&[data-orientation=horizontal]": { + width: "100%", + height: "2px", + marginStart: "2" + }, + "&[data-orientation=vertical]": { + width: "2px", + position: "absolute", + height: "100%", + maxHeight: `calc(100% - ${Gr.reference} - 8px)`, + top: `calc(${Gr.reference} + 4px)`, + insetStart: `calc(${Gr.reference} / 2 - 1px)` + } + } +})), Cm = wm({ + baseStyle: km, + sizes: { + xs: sn({ + stepper: { + [Gr.variable]: "sizes.4", + [At.variable]: "sizes.3", + [Nt.variable]: "fontSizes.xs", + [ln.variable]: "fontSizes.xs" + } + }), + sm: sn({ + stepper: { + [Gr.variable]: "sizes.6", + [At.variable]: "sizes.4", + [Nt.variable]: "fontSizes.sm", + [ln.variable]: "fontSizes.xs" + } + }), + md: sn({ + stepper: { + [Gr.variable]: "sizes.8", + [At.variable]: "sizes.5", + [Nt.variable]: "fontSizes.md", + [ln.variable]: "fontSizes.sm" + } + }), + lg: sn({ + stepper: { + [Gr.variable]: "sizes.10", + [At.variable]: "sizes.6", + [Nt.variable]: "fontSizes.lg", + [ln.variable]: "fontSizes.md" + } + }) + }, + defaultProps: { + size: "md", + colorScheme: "blue" + } +}); +function ke(e, r = {}) { + let t = !1; + function n() { + if (!t) { + t = !0; + return; + } + throw new Error( + "[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?" + ); + } + function a(...S) { + n(); + for (const b of S) + r[b] = h(b); + return ke(e, r); + } + function o(...S) { + for (const b of S) + b in r || (r[b] = h(b)); + return ke(e, r); + } + function i() { + return Object.fromEntries( + Object.entries(r).map(([b, _]) => [b, _.selector]) + ); + } + function u() { + return Object.fromEntries( + Object.entries(r).map(([b, _]) => [b, _.className]) + ); + } + function h(S) { + const C = `chakra-${(["container", "root"].includes(S ?? "") ? [e] : [e, S]).filter(Boolean).join("__")}`; + return { + className: C, + selector: `.${C}`, + toString: () => S + }; + } + return { + parts: a, + toPart: h, + extend: o, + selectors: i, + classnames: u, + get keys() { + return Object.keys(r); + }, + __type: {} + }; +} +var Tm = ke("accordion").parts("root", "container", "button", "panel").extend("icon"), Em = ke("alert").parts("title", "description", "container").extend("icon", "spinner"), $m = ke("avatar").parts("label", "badge", "container").extend("excessLabel", "group"), Rm = ke("breadcrumb").parts("link", "item", "container").extend("separator"); +ke("button").parts(); +var Pm = ke("checkbox").parts("control", "icon", "container").extend("label"); +ke("progress").parts("track", "filledTrack").extend("label"); +var Fm = ke("drawer").parts("overlay", "dialogContainer", "dialog").extend("header", "closeButton", "body", "footer"), Am = ke("editable").parts( + "preview", + "input", + "textarea" +), Nm = ke("form").parts( + "container", + "requiredIndicator", + "helperText" +), Dm = ke("formError").parts("text", "icon"), zm = ke("input").parts("addon", "field", "element"), Om = ke("list").parts("container", "item", "icon"), Im = ke("menu").parts("button", "list", "item").extend("groupTitle", "command", "divider"), Bm = ke("modal").parts("overlay", "dialogContainer", "dialog").extend("header", "closeButton", "body", "footer"), Mm = ke("numberinput").parts( + "root", + "field", + "stepperGroup", + "stepper" +); +ke("pininput").parts("field"); +var Wm = ke("popover").parts("content", "header", "body", "footer").extend("popper", "arrow", "closeButton"), Lm = ke("progress").parts( + "label", + "filledTrack", + "track" +), jm = ke("radio").parts( + "container", + "control", + "label" +), Vm = ke("select").parts("field", "icon"), Um = ke("slider").parts( + "container", + "track", + "thumb", + "filledTrack", + "mark" +), Hm = ke("stat").parts( + "container", + "label", + "helpText", + "number", + "icon" +), Ym = ke("switch").parts( + "container", + "track", + "thumb" +), qm = ke("table").parts( + "table", + "thead", + "tbody", + "tr", + "th", + "td", + "tfoot", + "caption" +), Gm = ke("tabs").parts( + "root", + "tab", + "tablist", + "tabpanel", + "tabpanels", + "indicator" +), Xm = ke("tag").parts( + "container", + "label", + "closeButton" +), Qm = ke("card").parts( + "container", + "header", + "body", + "footer" +); +function bt(e, r, t) { + return Math.min(Math.max(e, t), r); +} +class Km extends Error { + constructor(r) { + super(`Failed to parse color: "${r}"`); + } +} +var cn = Km; +function Fo(e) { + if (typeof e != "string") + throw new cn(e); + if (e.trim().toLowerCase() === "transparent") + return [0, 0, 0, 0]; + let r = e.trim(); + r = oh.test(e) ? eh(e) : e; + const t = rh.exec(r); + if (t) { + const i = Array.from(t).slice(1); + return [...i.slice(0, 3).map((u) => parseInt(bn(u, 2), 16)), parseInt(bn(i[3] || "f", 2), 16) / 255]; + } + const n = th.exec(r); + if (n) { + const i = Array.from(n).slice(1); + return [...i.slice(0, 3).map((u) => parseInt(u, 16)), parseInt(i[3] || "ff", 16) / 255]; + } + const a = nh.exec(r); + if (a) { + const i = Array.from(a).slice(1); + return [...i.slice(0, 3).map((u) => parseInt(u, 10)), parseFloat(i[3] || "1")]; + } + const o = ah.exec(r); + if (o) { + const [i, u, h, v] = Array.from(o).slice(1).map(parseFloat); + if (bt(0, 100, u) !== u) + throw new cn(e); + if (bt(0, 100, h) !== h) + throw new cn(e); + return [...ih(i, u, h), Number.isNaN(v) ? 1 : v]; + } + throw new cn(e); +} +function Jm(e) { + let r = 5381, t = e.length; + for (; t; ) + r = r * 33 ^ e.charCodeAt(--t); + return (r >>> 0) % 2341; +} +const wi = (e) => parseInt(e.replace(/_/g, ""), 36), Zm = "1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e, r) => { + const t = wi(r.substring(0, 3)), n = wi(r.substring(3)).toString(16); + let a = ""; + for (let o = 0; o < 6 - n.length; o++) + a += "0"; + return e[t] = `${a}${n}`, e; +}, {}); +function eh(e) { + const r = e.toLowerCase().trim(), t = Zm[Jm(r)]; + if (!t) + throw new cn(e); + return `#${t}`; +} +const bn = (e, r) => Array.from(Array(r)).map(() => e).join(""), rh = new RegExp(`^#${bn("([a-f0-9])", 3)}([a-f0-9])?$`, "i"), th = new RegExp(`^#${bn("([a-f0-9]{2})", 3)}([a-f0-9]{2})?$`, "i"), nh = new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${bn(",\\s*(\\d+)\\s*", 2)}(?:,\\s*([\\d.]+))?\\s*\\)$`, "i"), ah = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i, oh = /^[a-z]+$/i, ki = (e) => Math.round(e * 255), ih = (e, r, t) => { + let n = t / 100; + if (r === 0) + return [n, n, n].map(ki); + const a = (e % 360 + 360) % 360 / 60, o = (1 - Math.abs(2 * n - 1)) * (r / 100), i = o * (1 - Math.abs(a % 2 - 1)); + let u = 0, h = 0, v = 0; + a >= 0 && a < 1 ? (u = o, h = i) : a >= 1 && a < 2 ? (u = i, h = o) : a >= 2 && a < 3 ? (h = o, v = i) : a >= 3 && a < 4 ? (h = i, v = o) : a >= 4 && a < 5 ? (u = i, v = o) : a >= 5 && a < 6 && (u = o, v = i); + const S = n - o / 2, b = u + S, _ = h + S, C = v + S; + return [b, _, C].map(ki); +}; +function sh(e, r, t, n) { + return `rgba(${bt(0, 255, e).toFixed()}, ${bt(0, 255, r).toFixed()}, ${bt(0, 255, t).toFixed()}, ${parseFloat(bt(0, 1, n).toFixed(3))})`; +} +function lh(e, r) { + const [t, n, a, o] = Fo(e); + return sh(t, n, a, o - r); +} +function ch(e) { + const [r, t, n, a] = Fo(e); + let o = (i) => { + const u = bt(0, 255, i).toString(16); + return u.length === 1 ? `0${u}` : u; + }; + return `#${o(r)}${o(t)}${o(n)}${a < 1 ? o(Math.round(a * 255)) : ""}`; +} +function dh(e, r, t, n, a) { + for (r = r.split ? r.split(".") : r, n = 0; n < r.length; n++) + e = e ? e[r[n]] : a; + return e === a ? t : e; +} +var uh = (e) => Object.keys(e).length === 0, ar = (e, r, t) => { + const n = dh(e, `colors.${r}`, r); + try { + return ch(n), n; + } catch { + return t ?? "#000000"; + } +}, fh = (e) => { + const [r, t, n] = Fo(e); + return (r * 299 + t * 587 + n * 114) / 1e3; +}, mh = (e) => (r) => { + const t = ar(r, e); + return fh(t) < 128 ? "dark" : "light"; +}, hh = (e) => (r) => mh(e)(r) === "dark", Wt = (e, r) => (t) => { + const n = ar(t, e); + return lh(n, 1 - r); +}; +function Ci(e = "1rem", r = "rgba(255, 255, 255, 0.15)") { + return { + backgroundImage: `linear-gradient( + 45deg, + ${r} 25%, + transparent 25%, + transparent 50%, + ${r} 50%, + ${r} 75%, + transparent 75%, + transparent + )`, + backgroundSize: `${e} ${e}` + }; +} +var vh = () => `#${Math.floor(Math.random() * 16777215).toString(16).padEnd(6, "0")}`; +function gh(e) { + const r = vh(); + return !e || uh(e) ? r : e.string && e.colors ? ph(e.string, e.colors) : e.string && !e.colors ? bh(e.string) : e.colors && !e.string ? yh(e.colors) : r; +} +function bh(e) { + let r = 0; + if (e.length === 0) + return r.toString(); + for (let n = 0; n < e.length; n += 1) + r = e.charCodeAt(n) + ((r << 5) - r), r = r & r; + let t = "#"; + for (let n = 0; n < 3; n += 1) { + const a = r >> n * 8 & 255; + t += `00${a.toString(16)}`.substr(-2); + } + return t; +} +function ph(e, r) { + let t = 0; + if (e.length === 0) + return r[0]; + for (let n = 0; n < e.length; n += 1) + t = e.charCodeAt(n) + ((t << 5) - t), t = t & t; + return t = (t % r.length + r.length) % r.length, r[t]; +} +function yh(e) { + return e[Math.floor(Math.random() * e.length)]; +} +function G(e, r) { + return (t) => t.colorMode === "dark" ? r : e; +} +function Ao(e) { + const { orientation: r, vertical: t, horizontal: n } = e; + return r ? r === "vertical" ? t : n : {}; +} +function fl(e) { + return Mt(e) && e.reference ? e.reference : String(e); +} +var pa = (e, ...r) => r.map(fl).join(` ${e} `).replace(/calc/g, ""), Ti = (...e) => `calc(${pa("+", ...e)})`, Ei = (...e) => `calc(${pa("-", ...e)})`, mo = (...e) => `calc(${pa("*", ...e)})`, $i = (...e) => `calc(${pa("/", ...e)})`, Ri = (e) => { + const r = fl(e); + return r != null && !Number.isNaN(parseFloat(r)) ? String(r).startsWith("-") ? String(r).slice(1) : `-${r}` : mo(r, -1); +}, Xr = Object.assign( + (e) => ({ + add: (...r) => Xr(Ti(e, ...r)), + subtract: (...r) => Xr(Ei(e, ...r)), + multiply: (...r) => Xr(mo(e, ...r)), + divide: (...r) => Xr($i(e, ...r)), + negate: () => Xr(Ri(e)), + toString: () => e.toString() + }), + { + add: Ti, + subtract: Ei, + multiply: mo, + divide: $i, + negate: Ri + } +); +function Sh(e) { + return !Number.isInteger(parseFloat(e.toString())); +} +function xh(e, r = "-") { + return e.replace(/\s+/g, r); +} +function ml(e) { + const r = xh(e.toString()); + return r.includes("\\.") ? e : Sh(e) ? r.replace(".", "\\.") : e; +} +function _h(e, r = "") { + return [r, ml(e)].filter(Boolean).join("-"); +} +function wh(e, r) { + return `var(${ml(e)}${r ? `, ${r}` : ""})`; +} +function kh(e, r = "") { + return `--${_h(e, r)}`; +} +function He(e, r) { + const t = kh(e, r == null ? void 0 : r.prefix); + return { + variable: t, + reference: wh(t, Ch(r == null ? void 0 : r.fallback)) + }; +} +function Ch(e) { + return typeof e == "string" ? e : e == null ? void 0 : e.reference; +} +var { defineMultiStyleConfig: Th, definePartsStyle: Yn } = Ae(Ym.keys), fn = He("switch-track-width"), yt = He("switch-track-height"), Oa = He("switch-track-diff"), Eh = Xr.subtract(fn, yt), ho = He("switch-thumb-x"), nn = He("switch-bg"), $h = (e) => { + const { colorScheme: r } = e; + return { + borderRadius: "full", + p: "0.5", + width: [fn.reference], + height: [yt.reference], + transitionProperty: "common", + transitionDuration: "fast", + [nn.variable]: "colors.gray.300", + _dark: { + [nn.variable]: "colors.whiteAlpha.400" + }, + _focusVisible: { + boxShadow: "outline" + }, + _disabled: { + opacity: 0.4, + cursor: "not-allowed" + }, + _checked: { + [nn.variable]: `colors.${r}.500`, + _dark: { + [nn.variable]: `colors.${r}.200` + } + }, + bg: nn.reference + }; +}, Rh = { + bg: "white", + transitionProperty: "transform", + transitionDuration: "normal", + borderRadius: "inherit", + width: [yt.reference], + height: [yt.reference], + _checked: { + transform: `translateX(${ho.reference})` + } +}, Ph = Yn((e) => ({ + container: { + [Oa.variable]: Eh, + [ho.variable]: Oa.reference, + _rtl: { + [ho.variable]: Xr(Oa).negate().toString() + } + }, + track: $h(e), + thumb: Rh +})), Fh = { + sm: Yn({ + container: { + [fn.variable]: "1.375rem", + [yt.variable]: "sizes.3" + } + }), + md: Yn({ + container: { + [fn.variable]: "1.875rem", + [yt.variable]: "sizes.4" + } + }), + lg: Yn({ + container: { + [fn.variable]: "2.875rem", + [yt.variable]: "sizes.6" + } + }) +}, Ah = Th({ + baseStyle: Ph, + sizes: Fh, + defaultProps: { + size: "md", + colorScheme: "blue" + } +}), { defineMultiStyleConfig: Nh, definePartsStyle: zt } = Ae(qm.keys), Dh = zt({ + table: { + fontVariantNumeric: "lining-nums tabular-nums", + borderCollapse: "collapse", + width: "full" + }, + th: { + fontFamily: "heading", + fontWeight: "bold", + textTransform: "uppercase", + letterSpacing: "wider", + textAlign: "start" + }, + td: { + textAlign: "start" + }, + caption: { + mt: 4, + fontFamily: "heading", + textAlign: "center", + fontWeight: "medium" + } +}), ia = { + "&[data-is-numeric=true]": { + textAlign: "end" + } +}, zh = zt((e) => { + const { colorScheme: r } = e; + return { + th: { + color: G("gray.600", "gray.400")(e), + borderBottom: "1px", + borderColor: G(`${r}.100`, `${r}.700`)(e), + ...ia + }, + td: { + borderBottom: "1px", + borderColor: G(`${r}.100`, `${r}.700`)(e), + ...ia + }, + caption: { + color: G("gray.600", "gray.100")(e) + }, + tfoot: { + tr: { + "&:last-of-type": { + th: { borderBottomWidth: 0 } + } + } + } + }; +}), Oh = zt((e) => { + const { colorScheme: r } = e; + return { + th: { + color: G("gray.600", "gray.400")(e), + borderBottom: "1px", + borderColor: G(`${r}.100`, `${r}.700`)(e), + ...ia + }, + td: { + borderBottom: "1px", + borderColor: G(`${r}.100`, `${r}.700`)(e), + ...ia + }, + caption: { + color: G("gray.600", "gray.100")(e) + }, + tbody: { + tr: { + "&:nth-of-type(odd)": { + "th, td": { + borderBottomWidth: "1px", + borderColor: G(`${r}.100`, `${r}.700`)(e) + }, + td: { + background: G(`${r}.100`, `${r}.700`)(e) + } + } + } + }, + tfoot: { + tr: { + "&:last-of-type": { + th: { borderBottomWidth: 0 } + } + } + } + }; +}), Ih = { + simple: zh, + striped: Oh, + unstyled: {} +}, Bh = { + sm: zt({ + th: { + px: "4", + py: "1", + lineHeight: "4", + fontSize: "xs" + }, + td: { + px: "4", + py: "2", + fontSize: "sm", + lineHeight: "4" + }, + caption: { + px: "4", + py: "2", + fontSize: "xs" + } + }), + md: zt({ + th: { + px: "6", + py: "3", + lineHeight: "4", + fontSize: "xs" + }, + td: { + px: "6", + py: "4", + lineHeight: "5" + }, + caption: { + px: "6", + py: "2", + fontSize: "sm" + } + }), + lg: zt({ + th: { + px: "8", + py: "4", + lineHeight: "5", + fontSize: "sm" + }, + td: { + px: "8", + py: "5", + lineHeight: "6" + }, + caption: { + px: "6", + py: "2", + fontSize: "md" + } + }) +}, Mh = Nh({ + baseStyle: Dh, + variants: Ih, + sizes: Bh, + defaultProps: { + variant: "simple", + size: "md", + colorScheme: "gray" + } +}), dr = oe("tabs-color"), Pr = oe("tabs-bg"), Nn = oe("tabs-border-color"), { defineMultiStyleConfig: Wh, definePartsStyle: Br } = Ae(Gm.keys), Lh = (e) => { + const { orientation: r } = e; + return { + display: r === "vertical" ? "flex" : "block" + }; +}, jh = (e) => { + const { isFitted: r } = e; + return { + flex: r ? 1 : void 0, + transitionProperty: "common", + transitionDuration: "normal", + _focusVisible: { + zIndex: 1, + boxShadow: "outline" + }, + _disabled: { + cursor: "not-allowed", + opacity: 0.4 + } + }; +}, Vh = (e) => { + const { align: r = "start", orientation: t } = e; + return { + justifyContent: { + end: "flex-end", + center: "center", + start: "flex-start" + }[r], + flexDirection: t === "vertical" ? "column" : "row" + }; +}, Uh = { + p: 4 +}, Hh = Br((e) => ({ + root: Lh(e), + tab: jh(e), + tablist: Vh(e), + tabpanel: Uh +})), Yh = { + sm: Br({ + tab: { + py: 1, + px: 4, + fontSize: "sm" + } + }), + md: Br({ + tab: { + fontSize: "md", + py: 2, + px: 4 + } + }), + lg: Br({ + tab: { + fontSize: "lg", + py: 3, + px: 4 + } + }) +}, qh = Br((e) => { + const { colorScheme: r, orientation: t } = e, n = t === "vertical", a = t === "vertical" ? "borderStart" : "borderBottom", o = n ? "marginStart" : "marginBottom"; + return { + tablist: { + [a]: "2px solid", + borderColor: "inherit" + }, + tab: { + [a]: "2px solid", + borderColor: "transparent", + [o]: "-2px", + _selected: { + [dr.variable]: `colors.${r}.600`, + _dark: { + [dr.variable]: `colors.${r}.300` + }, + borderColor: "currentColor" + }, + _active: { + [Pr.variable]: "colors.gray.200", + _dark: { + [Pr.variable]: "colors.whiteAlpha.300" + } + }, + _disabled: { + _active: { bg: "none" } + }, + color: dr.reference, + bg: Pr.reference + } + }; +}), Gh = Br((e) => { + const { colorScheme: r } = e; + return { + tab: { + borderTopRadius: "md", + border: "1px solid", + borderColor: "transparent", + mb: "-1px", + [Nn.variable]: "transparent", + _selected: { + [dr.variable]: `colors.${r}.600`, + [Nn.variable]: "colors.white", + _dark: { + [dr.variable]: `colors.${r}.300`, + [Nn.variable]: "colors.gray.800" + }, + borderColor: "inherit", + borderBottomColor: Nn.reference + }, + color: dr.reference + }, + tablist: { + mb: "-1px", + borderBottom: "1px solid", + borderColor: "inherit" + } + }; +}), Xh = Br((e) => { + const { colorScheme: r } = e; + return { + tab: { + border: "1px solid", + borderColor: "inherit", + [Pr.variable]: "colors.gray.50", + _dark: { + [Pr.variable]: "colors.whiteAlpha.50" + }, + mb: "-1px", + _notLast: { + marginEnd: "-1px" + }, + _selected: { + [Pr.variable]: "colors.white", + [dr.variable]: `colors.${r}.600`, + _dark: { + [Pr.variable]: "colors.gray.800", + [dr.variable]: `colors.${r}.300` + }, + borderColor: "inherit", + borderTopColor: "currentColor", + borderBottomColor: "transparent" + }, + color: dr.reference, + bg: Pr.reference + }, + tablist: { + mb: "-1px", + borderBottom: "1px solid", + borderColor: "inherit" + } + }; +}), Qh = Br((e) => { + const { colorScheme: r, theme: t } = e; + return { + tab: { + borderRadius: "full", + fontWeight: "semibold", + color: "gray.600", + _selected: { + color: ar(t, `${r}.700`), + bg: ar(t, `${r}.100`) + } + } + }; +}), Kh = Br((e) => { + const { colorScheme: r } = e; + return { + tab: { + borderRadius: "full", + fontWeight: "semibold", + [dr.variable]: "colors.gray.600", + _dark: { + [dr.variable]: "inherit" + }, + _selected: { + [dr.variable]: "colors.white", + [Pr.variable]: `colors.${r}.600`, + _dark: { + [dr.variable]: "colors.gray.800", + [Pr.variable]: `colors.${r}.300` + } + }, + color: dr.reference, + bg: Pr.reference + } + }; +}), Jh = Br({}), Zh = { + line: qh, + enclosed: Gh, + "enclosed-colored": Xh, + "soft-rounded": Qh, + "solid-rounded": Kh, + unstyled: Jh +}, ev = Wh({ + baseStyle: Hh, + sizes: Yh, + variants: Zh, + defaultProps: { + size: "md", + variant: "line", + colorScheme: "blue" + } +}), je = xm("badge", ["bg", "color", "shadow"]), rv = { + px: 1, + textTransform: "uppercase", + fontSize: "xs", + borderRadius: "sm", + fontWeight: "bold", + bg: je.bg.reference, + color: je.color.reference, + boxShadow: je.shadow.reference +}, tv = (e) => { + const { colorScheme: r, theme: t } = e, n = Wt(`${r}.500`, 0.6)(t); + return { + [je.bg.variable]: `colors.${r}.500`, + [je.color.variable]: "colors.white", + _dark: { + [je.bg.variable]: n, + [je.color.variable]: "colors.whiteAlpha.800" + } + }; +}, nv = (e) => { + const { colorScheme: r, theme: t } = e, n = Wt(`${r}.200`, 0.16)(t); + return { + [je.bg.variable]: `colors.${r}.100`, + [je.color.variable]: `colors.${r}.800`, + _dark: { + [je.bg.variable]: n, + [je.color.variable]: `colors.${r}.200` + } + }; +}, av = (e) => { + const { colorScheme: r, theme: t } = e, n = Wt(`${r}.200`, 0.8)(t); + return { + [je.color.variable]: `colors.${r}.500`, + _dark: { + [je.color.variable]: n + }, + [je.shadow.variable]: `inset 0 0 0px 1px ${je.color.reference}` + }; +}, ov = { + solid: tv, + subtle: nv, + outline: av +}, mn = { + baseStyle: rv, + variants: ov, + defaultProps: { + variant: "subtle", + colorScheme: "gray" + } +}, { defineMultiStyleConfig: iv, definePartsStyle: St } = Ae(Xm.keys), sv = { + fontWeight: "medium", + lineHeight: 1.2, + outline: 0, + color: je.color.reference, + bg: je.bg.reference, + boxShadow: je.shadow.reference, + borderRadius: "md", + _focusVisible: { + boxShadow: "outline" + } +}, lv = { + lineHeight: 1.2, + overflow: "visible" +}, cv = { + fontSize: "lg", + w: "5", + h: "5", + transitionProperty: "common", + transitionDuration: "normal", + borderRadius: "full", + marginStart: "1.5", + marginEnd: "-1", + opacity: 0.5, + _disabled: { + opacity: 0.4 + }, + _focusVisible: { + boxShadow: "outline", + bg: "rgba(0, 0, 0, 0.14)" + }, + _hover: { + opacity: 0.8 + }, + _active: { + opacity: 1 + } +}, dv = St({ + container: sv, + label: lv, + closeButton: cv +}), uv = { + sm: St({ + container: { + minH: "5", + minW: "5", + fontSize: "xs", + px: "2" + }, + closeButton: { + marginEnd: "-2px", + marginStart: "0.35rem" + } + }), + md: St({ + container: { + minH: "6", + minW: "6", + fontSize: "sm", + px: "2" + } + }), + lg: St({ + container: { + minH: "8", + minW: "8", + fontSize: "md", + px: "3" + } + }) +}, fv = { + subtle: St((e) => { + var r; + return { + container: (r = mn.variants) == null ? void 0 : r.subtle(e) + }; + }), + solid: St((e) => { + var r; + return { + container: (r = mn.variants) == null ? void 0 : r.solid(e) + }; + }), + outline: St((e) => { + var r; + return { + container: (r = mn.variants) == null ? void 0 : r.outline(e) + }; + }) +}, mv = iv({ + variants: fv, + baseStyle: dv, + sizes: uv, + defaultProps: { + size: "md", + variant: "subtle", + colorScheme: "gray" + } +}), { definePartsStyle: Qr, defineMultiStyleConfig: hv } = Ae(zm.keys), vv = Qr({ + field: { + width: "100%", + minWidth: 0, + outline: 0, + position: "relative", + appearance: "none", + transitionProperty: "common", + transitionDuration: "normal", + _disabled: { + opacity: 0.4, + cursor: "not-allowed" + } + } +}), at = { + lg: { + fontSize: "lg", + px: "4", + h: "12", + borderRadius: "md" + }, + md: { + fontSize: "md", + px: "4", + h: "10", + borderRadius: "md" + }, + sm: { + fontSize: "sm", + px: "3", + h: "8", + borderRadius: "sm" + }, + xs: { + fontSize: "xs", + px: "2", + h: "6", + borderRadius: "sm" + } +}, gv = { + lg: Qr({ + field: at.lg, + addon: at.lg + }), + md: Qr({ + field: at.md, + addon: at.md + }), + sm: Qr({ + field: at.sm, + addon: at.sm + }), + xs: Qr({ + field: at.xs, + addon: at.xs + }) +}; +function No(e) { + const { focusBorderColor: r, errorBorderColor: t } = e; + return { + focusBorderColor: r || G("blue.500", "blue.300")(e), + errorBorderColor: t || G("red.500", "red.300")(e) + }; +} +var bv = Qr((e) => { + const { theme: r } = e, { focusBorderColor: t, errorBorderColor: n } = No(e); + return { + field: { + border: "1px solid", + borderColor: "inherit", + bg: "inherit", + _hover: { + borderColor: G("gray.300", "whiteAlpha.400")(e) + }, + _readOnly: { + boxShadow: "none !important", + userSelect: "all" + }, + _invalid: { + borderColor: ar(r, n), + boxShadow: `0 0 0 1px ${ar(r, n)}` + }, + _focusVisible: { + zIndex: 1, + borderColor: ar(r, t), + boxShadow: `0 0 0 1px ${ar(r, t)}` + } + }, + addon: { + border: "1px solid", + borderColor: G("inherit", "whiteAlpha.50")(e), + bg: G("gray.100", "whiteAlpha.300")(e) + } + }; +}), pv = Qr((e) => { + const { theme: r } = e, { focusBorderColor: t, errorBorderColor: n } = No(e); + return { + field: { + border: "2px solid", + borderColor: "transparent", + bg: G("gray.100", "whiteAlpha.50")(e), + _hover: { + bg: G("gray.200", "whiteAlpha.100")(e) + }, + _readOnly: { + boxShadow: "none !important", + userSelect: "all" + }, + _invalid: { + borderColor: ar(r, n) + }, + _focusVisible: { + bg: "transparent", + borderColor: ar(r, t) + } + }, + addon: { + border: "2px solid", + borderColor: "transparent", + bg: G("gray.100", "whiteAlpha.50")(e) + } + }; +}), yv = Qr((e) => { + const { theme: r } = e, { focusBorderColor: t, errorBorderColor: n } = No(e); + return { + field: { + borderBottom: "1px solid", + borderColor: "inherit", + borderRadius: "0", + px: "0", + bg: "transparent", + _readOnly: { + boxShadow: "none !important", + userSelect: "all" + }, + _invalid: { + borderColor: ar(r, n), + boxShadow: `0px 1px 0px 0px ${ar(r, n)}` + }, + _focusVisible: { + borderColor: ar(r, t), + boxShadow: `0px 1px 0px 0px ${ar(r, t)}` + } + }, + addon: { + borderBottom: "2px solid", + borderColor: "inherit", + borderRadius: "0", + px: "0", + bg: "transparent" + } + }; +}), Sv = Qr({ + field: { + bg: "transparent", + px: "0", + height: "auto" + }, + addon: { + bg: "transparent", + px: "0", + height: "auto" + } +}), xv = { + outline: bv, + filled: pv, + flushed: yv, + unstyled: Sv +}, xe = hv({ + baseStyle: vv, + sizes: gv, + variants: xv, + defaultProps: { + size: "md", + variant: "outline" + } +}), Pi, _v = { + ...(Pi = xe.baseStyle) == null ? void 0 : Pi.field, + paddingY: "2", + minHeight: "20", + lineHeight: "short", + verticalAlign: "top" +}, Fi, Ai, wv = { + outline: (e) => { + var r, t; + return (t = (r = xe.variants) == null ? void 0 : r.outline(e).field) != null ? t : {}; + }, + flushed: (e) => { + var r, t; + return (t = (r = xe.variants) == null ? void 0 : r.flushed(e).field) != null ? t : {}; + }, + filled: (e) => { + var r, t; + return (t = (r = xe.variants) == null ? void 0 : r.filled(e).field) != null ? t : {}; + }, + unstyled: (Ai = (Fi = xe.variants) == null ? void 0 : Fi.unstyled.field) != null ? Ai : {} +}, Ni, Di, zi, Oi, Ii, Bi, Mi, Wi, kv = { + xs: (Di = (Ni = xe.sizes) == null ? void 0 : Ni.xs.field) != null ? Di : {}, + sm: (Oi = (zi = xe.sizes) == null ? void 0 : zi.sm.field) != null ? Oi : {}, + md: (Bi = (Ii = xe.sizes) == null ? void 0 : Ii.md.field) != null ? Bi : {}, + lg: (Wi = (Mi = xe.sizes) == null ? void 0 : Mi.lg.field) != null ? Wi : {} +}, Cv = { + baseStyle: _v, + sizes: kv, + variants: wv, + defaultProps: { + size: "md", + variant: "outline" + } +}, Dn = He("tooltip-bg"), Ia = He("tooltip-fg"), Tv = He("popper-arrow-bg"), Ev = { + bg: Dn.reference, + color: Ia.reference, + [Dn.variable]: "colors.gray.700", + [Ia.variable]: "colors.whiteAlpha.900", + _dark: { + [Dn.variable]: "colors.gray.300", + [Ia.variable]: "colors.gray.900" + }, + [Tv.variable]: Dn.reference, + px: "2", + py: "0.5", + borderRadius: "sm", + fontWeight: "medium", + fontSize: "sm", + boxShadow: "md", + maxW: "xs", + zIndex: "tooltip" +}, $v = { + baseStyle: Ev +}, { defineMultiStyleConfig: Rv, definePartsStyle: dn } = Ae(Lm.keys), Pv = (e) => { + const { colorScheme: r, theme: t, isIndeterminate: n, hasStripe: a } = e, o = G( + Ci(), + Ci("1rem", "rgba(0,0,0,0.1)") + )(e), i = G(`${r}.500`, `${r}.200`)(e), u = `linear-gradient( + to right, + transparent 0%, + ${ar(t, i)} 50%, + transparent 100% + )`; + return { + ...!n && a && o, + ...n ? { bgImage: u } : { bgColor: i } + }; +}, Fv = { + lineHeight: "1", + fontSize: "0.25em", + fontWeight: "bold", + color: "white" +}, Av = (e) => ({ + bg: G("gray.100", "whiteAlpha.300")(e) +}), Nv = (e) => ({ + transitionProperty: "common", + transitionDuration: "slow", + ...Pv(e) +}), Dv = dn((e) => ({ + label: Fv, + filledTrack: Nv(e), + track: Av(e) +})), zv = { + xs: dn({ + track: { h: "1" } + }), + sm: dn({ + track: { h: "2" } + }), + md: dn({ + track: { h: "3" } + }), + lg: dn({ + track: { h: "4" } + }) +}, Ov = Rv({ + sizes: zv, + baseStyle: Dv, + defaultProps: { + size: "md", + colorScheme: "blue" + } +}), Iv = (e) => typeof e == "function"; +function or(e, ...r) { + return Iv(e) ? e(...r) : e; +} +var { definePartsStyle: qn, defineMultiStyleConfig: Bv } = Ae(Pm.keys), hn = oe("checkbox-size"), Mv = (e) => { + const { colorScheme: r } = e; + return { + w: hn.reference, + h: hn.reference, + transitionProperty: "box-shadow", + transitionDuration: "normal", + border: "2px solid", + borderRadius: "sm", + borderColor: "inherit", + color: "white", + _checked: { + bg: G(`${r}.500`, `${r}.200`)(e), + borderColor: G(`${r}.500`, `${r}.200`)(e), + color: G("white", "gray.900")(e), + _hover: { + bg: G(`${r}.600`, `${r}.300`)(e), + borderColor: G(`${r}.600`, `${r}.300`)(e) + }, + _disabled: { + borderColor: G("gray.200", "transparent")(e), + bg: G("gray.200", "whiteAlpha.300")(e), + color: G("gray.500", "whiteAlpha.500")(e) + } + }, + _indeterminate: { + bg: G(`${r}.500`, `${r}.200`)(e), + borderColor: G(`${r}.500`, `${r}.200`)(e), + color: G("white", "gray.900")(e) + }, + _disabled: { + bg: G("gray.100", "whiteAlpha.100")(e), + borderColor: G("gray.100", "transparent")(e) + }, + _focusVisible: { + boxShadow: "outline" + }, + _invalid: { + borderColor: G("red.500", "red.300")(e) + } + }; +}, Wv = { + _disabled: { cursor: "not-allowed" } +}, Lv = { + userSelect: "none", + _disabled: { opacity: 0.4 } +}, jv = { + transitionProperty: "transform", + transitionDuration: "normal" +}, Vv = qn((e) => ({ + icon: jv, + container: Wv, + control: or(Mv, e), + label: Lv +})), Uv = { + sm: qn({ + control: { [hn.variable]: "sizes.3" }, + label: { fontSize: "sm" }, + icon: { fontSize: "3xs" } + }), + md: qn({ + control: { [hn.variable]: "sizes.4" }, + label: { fontSize: "md" }, + icon: { fontSize: "2xs" } + }), + lg: qn({ + control: { [hn.variable]: "sizes.5" }, + label: { fontSize: "lg" }, + icon: { fontSize: "2xs" } + }) +}, sa = Bv({ + baseStyle: Vv, + sizes: Uv, + defaultProps: { + size: "md", + colorScheme: "blue" + } +}), { defineMultiStyleConfig: Hv, definePartsStyle: Gn } = Ae(jm.keys), Yv = (e) => { + var r; + const t = (r = or(sa.baseStyle, e)) == null ? void 0 : r.control; + return { + ...t, + borderRadius: "full", + _checked: { + ...t == null ? void 0 : t._checked, + _before: { + content: '""', + display: "inline-block", + pos: "relative", + w: "50%", + h: "50%", + borderRadius: "50%", + bg: "currentColor" + } + } + }; +}, qv = Gn((e) => { + var r, t, n, a; + return { + label: (t = (r = sa).baseStyle) == null ? void 0 : t.call(r, e).label, + container: (a = (n = sa).baseStyle) == null ? void 0 : a.call(n, e).container, + control: Yv(e) + }; +}), Gv = { + md: Gn({ + control: { w: "4", h: "4" }, + label: { fontSize: "md" } + }), + lg: Gn({ + control: { w: "5", h: "5" }, + label: { fontSize: "lg" } + }), + sm: Gn({ + control: { width: "3", height: "3" }, + label: { fontSize: "sm" } + }) +}, Xv = Hv({ + baseStyle: qv, + sizes: Gv, + defaultProps: { + size: "md", + colorScheme: "blue" + } +}), { defineMultiStyleConfig: Qv, definePartsStyle: Kv } = Ae(Vm.keys), zn = oe("select-bg"), Li, Jv = { + ...(Li = xe.baseStyle) == null ? void 0 : Li.field, + appearance: "none", + paddingBottom: "1px", + lineHeight: "normal", + bg: zn.reference, + [zn.variable]: "colors.white", + _dark: { + [zn.variable]: "colors.gray.700" + }, + "> option, > optgroup": { + bg: zn.reference + } +}, Zv = { + width: "6", + height: "100%", + insetEnd: "2", + position: "relative", + color: "currentColor", + fontSize: "xl", + _disabled: { + opacity: 0.5 + } +}, eg = Kv({ + field: Jv, + icon: Zv +}), On = { + paddingInlineEnd: "8" +}, ji, Vi, Ui, Hi, Yi, qi, Gi, Xi, rg = { + lg: { + ...(ji = xe.sizes) == null ? void 0 : ji.lg, + field: { + ...(Vi = xe.sizes) == null ? void 0 : Vi.lg.field, + ...On + } + }, + md: { + ...(Ui = xe.sizes) == null ? void 0 : Ui.md, + field: { + ...(Hi = xe.sizes) == null ? void 0 : Hi.md.field, + ...On + } + }, + sm: { + ...(Yi = xe.sizes) == null ? void 0 : Yi.sm, + field: { + ...(qi = xe.sizes) == null ? void 0 : qi.sm.field, + ...On + } + }, + xs: { + ...(Gi = xe.sizes) == null ? void 0 : Gi.xs, + field: { + ...(Xi = xe.sizes) == null ? void 0 : Xi.xs.field, + ...On + }, + icon: { + insetEnd: "1" + } + } +}, tg = Qv({ + baseStyle: eg, + sizes: rg, + variants: xe.variants, + defaultProps: xe.defaultProps +}), Ba = oe("skeleton-start-color"), Ma = oe("skeleton-end-color"), ng = { + [Ba.variable]: "colors.gray.100", + [Ma.variable]: "colors.gray.400", + _dark: { + [Ba.variable]: "colors.gray.800", + [Ma.variable]: "colors.gray.600" + }, + background: Ba.reference, + borderColor: Ma.reference, + opacity: 0.7, + borderRadius: "sm" +}, ag = { + baseStyle: ng +}, Wa = oe("skip-link-bg"), og = { + borderRadius: "md", + fontWeight: "semibold", + _focusVisible: { + boxShadow: "outline", + padding: "4", + position: "fixed", + top: "6", + insetStart: "6", + [Wa.variable]: "colors.white", + _dark: { + [Wa.variable]: "colors.gray.700" + }, + bg: Wa.reference + } +}, ig = { + baseStyle: og +}, { defineMultiStyleConfig: sg, definePartsStyle: ya } = Ae(Um.keys), pn = oe("slider-thumb-size"), yn = oe("slider-track-size"), it = oe("slider-bg"), lg = (e) => { + const { orientation: r } = e; + return { + display: "inline-block", + position: "relative", + cursor: "pointer", + _disabled: { + opacity: 0.6, + cursor: "default", + pointerEvents: "none" + }, + ...Ao({ + orientation: r, + vertical: { h: "100%" }, + horizontal: { w: "100%" } + }) + }; +}, cg = (e) => ({ + ...Ao({ + orientation: e.orientation, + horizontal: { h: yn.reference }, + vertical: { w: yn.reference } + }), + overflow: "hidden", + borderRadius: "sm", + [it.variable]: "colors.gray.200", + _dark: { + [it.variable]: "colors.whiteAlpha.200" + }, + _disabled: { + [it.variable]: "colors.gray.300", + _dark: { + [it.variable]: "colors.whiteAlpha.300" + } + }, + bg: it.reference +}), dg = (e) => { + const { orientation: r } = e; + return { + ...Ao({ + orientation: r, + vertical: { + left: "50%", + transform: "translateX(-50%)", + _active: { + transform: "translateX(-50%) scale(1.15)" + } + }, + horizontal: { + top: "50%", + transform: "translateY(-50%)", + _active: { + transform: "translateY(-50%) scale(1.15)" + } + } + }), + w: pn.reference, + h: pn.reference, + display: "flex", + alignItems: "center", + justifyContent: "center", + position: "absolute", + outline: 0, + zIndex: 1, + borderRadius: "full", + bg: "white", + boxShadow: "base", + border: "1px solid", + borderColor: "transparent", + transitionProperty: "transform", + transitionDuration: "normal", + _focusVisible: { + boxShadow: "outline" + }, + _disabled: { + bg: "gray.300" + } + }; +}, ug = (e) => { + const { colorScheme: r } = e; + return { + width: "inherit", + height: "inherit", + [it.variable]: `colors.${r}.500`, + _dark: { + [it.variable]: `colors.${r}.200` + }, + bg: it.reference + }; +}, fg = ya((e) => ({ + container: lg(e), + track: cg(e), + thumb: dg(e), + filledTrack: ug(e) +})), mg = ya({ + container: { + [pn.variable]: "sizes.4", + [yn.variable]: "sizes.1" + } +}), hg = ya({ + container: { + [pn.variable]: "sizes.3.5", + [yn.variable]: "sizes.1" + } +}), vg = ya({ + container: { + [pn.variable]: "sizes.2.5", + [yn.variable]: "sizes.0.5" + } +}), gg = { + lg: mg, + md: hg, + sm: vg +}, bg = sg({ + baseStyle: fg, + sizes: gg, + defaultProps: { + size: "md", + colorScheme: "blue" + } +}), vt = He("spinner-size"), pg = { + width: [vt.reference], + height: [vt.reference] +}, yg = { + xs: { + [vt.variable]: "sizes.3" + }, + sm: { + [vt.variable]: "sizes.4" + }, + md: { + [vt.variable]: "sizes.6" + }, + lg: { + [vt.variable]: "sizes.8" + }, + xl: { + [vt.variable]: "sizes.12" + } +}, Sg = { + baseStyle: pg, + sizes: yg, + defaultProps: { + size: "md" + } +}, { defineMultiStyleConfig: xg, definePartsStyle: hl } = Ae(Hm.keys), _g = { + fontWeight: "medium" +}, wg = { + opacity: 0.8, + marginBottom: "2" +}, kg = { + verticalAlign: "baseline", + fontWeight: "semibold" +}, Cg = { + marginEnd: 1, + w: "3.5", + h: "3.5", + verticalAlign: "middle" +}, Tg = hl({ + container: {}, + label: _g, + helpText: wg, + number: kg, + icon: Cg +}), Eg = { + md: hl({ + label: { fontSize: "sm" }, + helpText: { fontSize: "sm" }, + number: { fontSize: "2xl" } + }) +}, $g = xg({ + baseStyle: Tg, + sizes: Eg, + defaultProps: { + size: "md" + } +}), La = oe("kbd-bg"), Rg = { + [La.variable]: "colors.gray.100", + _dark: { + [La.variable]: "colors.whiteAlpha.100" + }, + bg: La.reference, + borderRadius: "md", + borderWidth: "1px", + borderBottomWidth: "3px", + fontSize: "0.8em", + fontWeight: "bold", + lineHeight: "normal", + px: "0.4em", + whiteSpace: "nowrap" +}, Pg = { + baseStyle: Rg +}, Fg = { + transitionProperty: "common", + transitionDuration: "fast", + transitionTimingFunction: "ease-out", + cursor: "pointer", + textDecoration: "none", + outline: "none", + color: "inherit", + _hover: { + textDecoration: "underline" + }, + _focusVisible: { + boxShadow: "outline" + } +}, Ag = { + baseStyle: Fg +}, { defineMultiStyleConfig: Ng, definePartsStyle: Dg } = Ae(Om.keys), zg = { + marginEnd: "2", + display: "inline", + verticalAlign: "text-bottom" +}, Og = Dg({ + icon: zg +}), Ig = Ng({ + baseStyle: Og +}), { defineMultiStyleConfig: Bg, definePartsStyle: Mg } = Ae(Im.keys), Or = oe("menu-bg"), ja = oe("menu-shadow"), Wg = { + [Or.variable]: "#fff", + [ja.variable]: "shadows.sm", + _dark: { + [Or.variable]: "colors.gray.700", + [ja.variable]: "shadows.dark-lg" + }, + color: "inherit", + minW: "3xs", + py: "2", + zIndex: 1, + borderRadius: "md", + borderWidth: "1px", + bg: Or.reference, + boxShadow: ja.reference +}, Lg = { + py: "1.5", + px: "3", + transitionProperty: "background", + transitionDuration: "ultra-fast", + transitionTimingFunction: "ease-in", + _focus: { + [Or.variable]: "colors.gray.100", + _dark: { + [Or.variable]: "colors.whiteAlpha.100" + } + }, + _active: { + [Or.variable]: "colors.gray.200", + _dark: { + [Or.variable]: "colors.whiteAlpha.200" + } + }, + _expanded: { + [Or.variable]: "colors.gray.100", + _dark: { + [Or.variable]: "colors.whiteAlpha.100" + } + }, + _disabled: { + opacity: 0.4, + cursor: "not-allowed" + }, + bg: Or.reference +}, jg = { + mx: 4, + my: 2, + fontWeight: "semibold", + fontSize: "sm" +}, Vg = { + opacity: 0.6 +}, Ug = { + border: 0, + borderBottom: "1px solid", + borderColor: "inherit", + my: "2", + opacity: 0.6 +}, Hg = { + transitionProperty: "common", + transitionDuration: "normal" +}, Yg = Mg({ + button: Hg, + list: Wg, + item: Lg, + groupTitle: jg, + command: Vg, + divider: Ug +}), qg = Bg({ + baseStyle: Yg +}), { defineMultiStyleConfig: Gg, definePartsStyle: vo } = Ae(Bm.keys), Va = oe("modal-bg"), Ua = oe("modal-shadow"), Xg = { + bg: "blackAlpha.600", + zIndex: "modal" +}, Qg = (e) => { + const { isCentered: r, scrollBehavior: t } = e; + return { + display: "flex", + zIndex: "modal", + justifyContent: "center", + alignItems: r ? "center" : "flex-start", + overflow: t === "inside" ? "hidden" : "auto", + overscrollBehaviorY: "none" + }; +}, Kg = (e) => { + const { isCentered: r, scrollBehavior: t } = e; + return { + borderRadius: "md", + color: "inherit", + my: r ? "auto" : "16", + mx: r ? "auto" : void 0, + zIndex: "modal", + maxH: t === "inside" ? "calc(100% - 7.5rem)" : void 0, + [Va.variable]: "colors.white", + [Ua.variable]: "shadows.lg", + _dark: { + [Va.variable]: "colors.gray.700", + [Ua.variable]: "shadows.dark-lg" + }, + bg: Va.reference, + boxShadow: Ua.reference + }; +}, Jg = { + px: "6", + py: "4", + fontSize: "xl", + fontWeight: "semibold" +}, Zg = { + position: "absolute", + top: "2", + insetEnd: "3" +}, eb = (e) => { + const { scrollBehavior: r } = e; + return { + px: "6", + py: "2", + flex: "1", + overflow: r === "inside" ? "auto" : void 0 + }; +}, rb = { + px: "6", + py: "4" +}, tb = vo((e) => ({ + overlay: Xg, + dialogContainer: or(Qg, e), + dialog: or(Kg, e), + header: Jg, + closeButton: Zg, + body: or(eb, e), + footer: rb +})); +function $r(e) { + return vo(e === "full" ? { + dialog: { + maxW: "100vw", + minH: "$100vh", + my: "0", + borderRadius: "0" + } + } : { + dialog: { maxW: e } + }); +} +var nb = { + xs: $r("xs"), + sm: $r("sm"), + md: $r("md"), + lg: $r("lg"), + xl: $r("xl"), + "2xl": $r("2xl"), + "3xl": $r("3xl"), + "4xl": $r("4xl"), + "5xl": $r("5xl"), + "6xl": $r("6xl"), + full: $r("full") +}, ab = Gg({ + baseStyle: tb, + sizes: nb, + defaultProps: { size: "md" } +}), { defineMultiStyleConfig: ob, definePartsStyle: vl } = Ae(Mm.keys), Do = He("number-input-stepper-width"), gl = He("number-input-input-padding"), ib = Xr(Do).add("0.5rem").toString(), Ha = He("number-input-bg"), Ya = He("number-input-color"), qa = He("number-input-border-color"), sb = { + [Do.variable]: "sizes.6", + [gl.variable]: ib +}, lb = (e) => { + var r, t; + return (t = (r = or(xe.baseStyle, e)) == null ? void 0 : r.field) != null ? t : {}; +}, cb = { + width: Do.reference +}, db = { + borderStart: "1px solid", + borderStartColor: qa.reference, + color: Ya.reference, + bg: Ha.reference, + [Ya.variable]: "colors.chakra-body-text", + [qa.variable]: "colors.chakra-border-color", + _dark: { + [Ya.variable]: "colors.whiteAlpha.800", + [qa.variable]: "colors.whiteAlpha.300" + }, + _active: { + [Ha.variable]: "colors.gray.200", + _dark: { + [Ha.variable]: "colors.whiteAlpha.300" + } + }, + _disabled: { + opacity: 0.4, + cursor: "not-allowed" + } +}, ub = vl((e) => { + var r; + return { + root: sb, + field: (r = or(lb, e)) != null ? r : {}, + stepperGroup: cb, + stepper: db + }; +}); +function In(e) { + var r, t, n; + const a = (r = xe.sizes) == null ? void 0 : r[e], o = { + lg: "md", + md: "md", + sm: "sm", + xs: "sm" + }, i = (n = (t = a.field) == null ? void 0 : t.fontSize) != null ? n : "md", u = nl.fontSizes[i]; + return vl({ + field: { + ...a.field, + paddingInlineEnd: gl.reference, + verticalAlign: "top" + }, + stepper: { + fontSize: Xr(u).multiply(0.75).toString(), + _first: { + borderTopEndRadius: o[e] + }, + _last: { + borderBottomEndRadius: o[e], + mt: "-1px", + borderTopWidth: 1 + } + } + }); +} +var fb = { + xs: In("xs"), + sm: In("sm"), + md: In("md"), + lg: In("lg") +}, mb = ob({ + baseStyle: ub, + sizes: fb, + variants: xe.variants, + defaultProps: xe.defaultProps +}), Qi, hb = { + ...(Qi = xe.baseStyle) == null ? void 0 : Qi.field, + textAlign: "center" +}, vb = { + lg: { + fontSize: "lg", + w: 12, + h: 12, + borderRadius: "md" + }, + md: { + fontSize: "md", + w: 10, + h: 10, + borderRadius: "md" + }, + sm: { + fontSize: "sm", + w: 8, + h: 8, + borderRadius: "sm" + }, + xs: { + fontSize: "xs", + w: 6, + h: 6, + borderRadius: "sm" + } +}, Ki, Ji, gb = { + outline: (e) => { + var r, t, n; + return (n = (t = or((r = xe.variants) == null ? void 0 : r.outline, e)) == null ? void 0 : t.field) != null ? n : {}; + }, + flushed: (e) => { + var r, t, n; + return (n = (t = or((r = xe.variants) == null ? void 0 : r.flushed, e)) == null ? void 0 : t.field) != null ? n : {}; + }, + filled: (e) => { + var r, t, n; + return (n = (t = or((r = xe.variants) == null ? void 0 : r.filled, e)) == null ? void 0 : t.field) != null ? n : {}; + }, + unstyled: (Ji = (Ki = xe.variants) == null ? void 0 : Ki.unstyled.field) != null ? Ji : {} +}, bb = { + baseStyle: hb, + sizes: vb, + variants: gb, + defaultProps: xe.defaultProps +}, { defineMultiStyleConfig: pb, definePartsStyle: yb } = Ae(Wm.keys), Bn = He("popper-bg"), Sb = He("popper-arrow-bg"), Zi = He("popper-arrow-shadow-color"), xb = { zIndex: 10 }, _b = { + [Bn.variable]: "colors.white", + bg: Bn.reference, + [Sb.variable]: Bn.reference, + [Zi.variable]: "colors.gray.200", + _dark: { + [Bn.variable]: "colors.gray.700", + [Zi.variable]: "colors.whiteAlpha.300" + }, + width: "xs", + border: "1px solid", + borderColor: "inherit", + borderRadius: "md", + boxShadow: "sm", + zIndex: "inherit", + _focusVisible: { + outline: 0, + boxShadow: "outline" + } +}, wb = { + px: 3, + py: 2, + borderBottomWidth: "1px" +}, kb = { + px: 3, + py: 2 +}, Cb = { + px: 3, + py: 2, + borderTopWidth: "1px" +}, Tb = { + position: "absolute", + borderRadius: "md", + top: 1, + insetEnd: 2, + padding: 2 +}, Eb = yb({ + popper: xb, + content: _b, + header: wb, + body: kb, + footer: Cb, + closeButton: Tb +}), $b = pb({ + baseStyle: Eb +}), { definePartsStyle: go, defineMultiStyleConfig: Rb } = Ae(Fm.keys), Ga = oe("drawer-bg"), Xa = oe("drawer-box-shadow"); +function Pt(e) { + return go(e === "full" ? { + dialog: { maxW: "100vw", h: "100vh" } + } : { + dialog: { maxW: e } + }); +} +var Pb = { + bg: "blackAlpha.600", + zIndex: "overlay" +}, Fb = { + display: "flex", + zIndex: "modal", + justifyContent: "center" +}, Ab = (e) => { + const { isFullHeight: r } = e; + return { + ...r && { height: "100vh" }, + zIndex: "modal", + maxH: "100vh", + color: "inherit", + [Ga.variable]: "colors.white", + [Xa.variable]: "shadows.lg", + _dark: { + [Ga.variable]: "colors.gray.700", + [Xa.variable]: "shadows.dark-lg" + }, + bg: Ga.reference, + boxShadow: Xa.reference + }; +}, Nb = { + px: "6", + py: "4", + fontSize: "xl", + fontWeight: "semibold" +}, Db = { + position: "absolute", + top: "2", + insetEnd: "3" +}, zb = { + px: "6", + py: "2", + flex: "1", + overflow: "auto" +}, Ob = { + px: "6", + py: "4" +}, Ib = go((e) => ({ + overlay: Pb, + dialogContainer: Fb, + dialog: or(Ab, e), + header: Nb, + closeButton: Db, + body: zb, + footer: Ob +})), Bb = { + xs: Pt("xs"), + sm: Pt("md"), + md: Pt("lg"), + lg: Pt("2xl"), + xl: Pt("4xl"), + full: Pt("full") +}, Mb = Rb({ + baseStyle: Ib, + sizes: Bb, + defaultProps: { + size: "xs" + } +}), { definePartsStyle: Wb, defineMultiStyleConfig: Lb } = Ae(Am.keys), jb = { + borderRadius: "md", + py: "1", + transitionProperty: "common", + transitionDuration: "normal" +}, Vb = { + borderRadius: "md", + py: "1", + transitionProperty: "common", + transitionDuration: "normal", + width: "full", + _focusVisible: { boxShadow: "outline" }, + _placeholder: { opacity: 0.6 } +}, Ub = { + borderRadius: "md", + py: "1", + transitionProperty: "common", + transitionDuration: "normal", + width: "full", + _focusVisible: { boxShadow: "outline" }, + _placeholder: { opacity: 0.6 } +}, Hb = Wb({ + preview: jb, + input: Vb, + textarea: Ub +}), Yb = Lb({ + baseStyle: Hb +}), { definePartsStyle: qb, defineMultiStyleConfig: Gb } = Ae(Nm.keys), Ot = oe("form-control-color"), Xb = { + marginStart: "1", + [Ot.variable]: "colors.red.500", + _dark: { + [Ot.variable]: "colors.red.300" + }, + color: Ot.reference +}, Qb = { + mt: "2", + [Ot.variable]: "colors.gray.600", + _dark: { + [Ot.variable]: "colors.whiteAlpha.600" + }, + color: Ot.reference, + lineHeight: "normal", + fontSize: "sm" +}, Kb = qb({ + container: { + width: "100%", + position: "relative" + }, + requiredIndicator: Xb, + helperText: Qb +}), Jb = Gb({ + baseStyle: Kb +}), { definePartsStyle: Zb, defineMultiStyleConfig: ep } = Ae(Dm.keys), It = oe("form-error-color"), rp = { + [It.variable]: "colors.red.500", + _dark: { + [It.variable]: "colors.red.300" + }, + color: It.reference, + mt: "2", + fontSize: "sm", + lineHeight: "normal" +}, tp = { + marginEnd: "0.5em", + [It.variable]: "colors.red.500", + _dark: { + [It.variable]: "colors.red.300" + }, + color: It.reference +}, np = Zb({ + text: rp, + icon: tp +}), ap = ep({ + baseStyle: np +}), op = { + fontSize: "md", + marginEnd: "3", + mb: "2", + fontWeight: "medium", + transitionProperty: "common", + transitionDuration: "normal", + opacity: 1, + _disabled: { + opacity: 0.4 + } +}, ip = { + baseStyle: op +}, sp = { + fontFamily: "heading", + fontWeight: "bold" +}, lp = { + "4xl": { + fontSize: ["6xl", null, "7xl"], + lineHeight: 1 + }, + "3xl": { + fontSize: ["5xl", null, "6xl"], + lineHeight: 1 + }, + "2xl": { + fontSize: ["4xl", null, "5xl"], + lineHeight: [1.2, null, 1] + }, + xl: { + fontSize: ["3xl", null, "4xl"], + lineHeight: [1.33, null, 1.2] + }, + lg: { + fontSize: ["2xl", null, "3xl"], + lineHeight: [1.33, null, 1.2] + }, + md: { + fontSize: "xl", + lineHeight: 1.2 + }, + sm: { + fontSize: "md", + lineHeight: 1.2 + }, + xs: { + fontSize: "sm", + lineHeight: 1.2 + } +}, cp = { + baseStyle: sp, + sizes: lp, + defaultProps: { + size: "xl" + } +}, { defineMultiStyleConfig: dp, definePartsStyle: up } = Ae(Rm.keys), Qa = oe("breadcrumb-link-decor"), fp = { + transitionProperty: "common", + transitionDuration: "fast", + transitionTimingFunction: "ease-out", + outline: "none", + color: "inherit", + textDecoration: Qa.reference, + [Qa.variable]: "none", + "&:not([aria-current=page])": { + cursor: "pointer", + _hover: { + [Qa.variable]: "underline" + }, + _focusVisible: { + boxShadow: "outline" + } + } +}, mp = up({ + link: fp +}), hp = dp({ + baseStyle: mp +}), vp = { + lineHeight: "1.2", + borderRadius: "md", + fontWeight: "semibold", + transitionProperty: "common", + transitionDuration: "normal", + _focusVisible: { + boxShadow: "outline" + }, + _disabled: { + opacity: 0.4, + cursor: "not-allowed", + boxShadow: "none" + }, + _hover: { + _disabled: { + bg: "initial" + } + } +}, bl = (e) => { + const { colorScheme: r, theme: t } = e; + if (r === "gray") + return { + color: G("inherit", "whiteAlpha.900")(e), + _hover: { + bg: G("gray.100", "whiteAlpha.200")(e) + }, + _active: { bg: G("gray.200", "whiteAlpha.300")(e) } + }; + const n = Wt(`${r}.200`, 0.12)(t), a = Wt(`${r}.200`, 0.24)(t); + return { + color: G(`${r}.600`, `${r}.200`)(e), + bg: "transparent", + _hover: { + bg: G(`${r}.50`, n)(e) + }, + _active: { + bg: G(`${r}.100`, a)(e) + } + }; +}, gp = (e) => { + const { colorScheme: r } = e, t = G("gray.200", "whiteAlpha.300")(e); + return { + border: "1px solid", + borderColor: r === "gray" ? t : "currentColor", + ".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)": { marginEnd: "-1px" }, + ".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)": { marginBottom: "-1px" }, + ...or(bl, e) + }; +}, bp = { + yellow: { + bg: "yellow.400", + color: "black", + hoverBg: "yellow.500", + activeBg: "yellow.600" + }, + cyan: { + bg: "cyan.400", + color: "black", + hoverBg: "cyan.500", + activeBg: "cyan.600" + } +}, pp = (e) => { + var r; + const { colorScheme: t } = e; + if (t === "gray") { + const h = G("gray.100", "whiteAlpha.200")(e); + return { + bg: h, + _hover: { + bg: G("gray.200", "whiteAlpha.300")(e), + _disabled: { + bg: h + } + }, + _active: { bg: G("gray.300", "whiteAlpha.400")(e) } + }; + } + const { + bg: n = `${t}.500`, + color: a = "white", + hoverBg: o = `${t}.600`, + activeBg: i = `${t}.700` + } = (r = bp[t]) != null ? r : {}, u = G(n, `${t}.200`)(e); + return { + bg: u, + color: G(a, "gray.800")(e), + _hover: { + bg: G(o, `${t}.300`)(e), + _disabled: { + bg: u + } + }, + _active: { bg: G(i, `${t}.400`)(e) } + }; +}, yp = (e) => { + const { colorScheme: r } = e; + return { + padding: 0, + height: "auto", + lineHeight: "normal", + verticalAlign: "baseline", + color: G(`${r}.500`, `${r}.200`)(e), + _hover: { + textDecoration: "underline", + _disabled: { + textDecoration: "none" + } + }, + _active: { + color: G(`${r}.700`, `${r}.500`)(e) + } + }; +}, Sp = { + bg: "none", + color: "inherit", + display: "inline", + lineHeight: "inherit", + m: "0", + p: "0" +}, xp = { + ghost: bl, + outline: gp, + solid: pp, + link: yp, + unstyled: Sp +}, _p = { + lg: { + h: "12", + minW: "12", + fontSize: "lg", + px: "6" + }, + md: { + h: "10", + minW: "10", + fontSize: "md", + px: "4" + }, + sm: { + h: "8", + minW: "8", + fontSize: "sm", + px: "3" + }, + xs: { + h: "6", + minW: "6", + fontSize: "xs", + px: "2" + } +}, wp = { + baseStyle: vp, + variants: xp, + sizes: _p, + defaultProps: { + variant: "solid", + size: "md", + colorScheme: "gray" + } +}, { definePartsStyle: xt, defineMultiStyleConfig: kp } = Ae(Qm.keys), la = oe("card-bg"), Kr = oe("card-padding"), pl = oe("card-shadow"), Xn = oe("card-radius"), yl = oe("card-border-width", "0"), Sl = oe("card-border-color"), Cp = xt({ + container: { + [la.variable]: "colors.chakra-body-bg", + backgroundColor: la.reference, + boxShadow: pl.reference, + borderRadius: Xn.reference, + color: "chakra-body-text", + borderWidth: yl.reference, + borderColor: Sl.reference + }, + body: { + padding: Kr.reference, + flex: "1 1 0%" + }, + header: { + padding: Kr.reference + }, + footer: { + padding: Kr.reference + } +}), Tp = { + sm: xt({ + container: { + [Xn.variable]: "radii.base", + [Kr.variable]: "space.3" + } + }), + md: xt({ + container: { + [Xn.variable]: "radii.md", + [Kr.variable]: "space.5" + } + }), + lg: xt({ + container: { + [Xn.variable]: "radii.xl", + [Kr.variable]: "space.7" + } + }) +}, Ep = { + elevated: xt({ + container: { + [pl.variable]: "shadows.base", + _dark: { + [la.variable]: "colors.gray.700" + } + } + }), + outline: xt({ + container: { + [yl.variable]: "1px", + [Sl.variable]: "colors.chakra-border-color" + } + }), + filled: xt({ + container: { + [la.variable]: "colors.chakra-subtle-bg" + } + }), + unstyled: { + body: { + [Kr.variable]: 0 + }, + header: { + [Kr.variable]: 0 + }, + footer: { + [Kr.variable]: 0 + } + } +}, $p = kp({ + baseStyle: Cp, + variants: Ep, + sizes: Tp, + defaultProps: { + variant: "elevated", + size: "md" + } +}), vn = He("close-button-size"), an = He("close-button-bg"), Rp = { + w: [vn.reference], + h: [vn.reference], + borderRadius: "md", + transitionProperty: "common", + transitionDuration: "normal", + _disabled: { + opacity: 0.4, + cursor: "not-allowed", + boxShadow: "none" + }, + _hover: { + [an.variable]: "colors.blackAlpha.100", + _dark: { + [an.variable]: "colors.whiteAlpha.100" + } + }, + _active: { + [an.variable]: "colors.blackAlpha.200", + _dark: { + [an.variable]: "colors.whiteAlpha.200" + } + }, + _focusVisible: { + boxShadow: "outline" + }, + bg: an.reference +}, Pp = { + lg: { + [vn.variable]: "sizes.10", + fontSize: "md" + }, + md: { + [vn.variable]: "sizes.8", + fontSize: "xs" + }, + sm: { + [vn.variable]: "sizes.6", + fontSize: "2xs" + } +}, Fp = { + baseStyle: Rp, + sizes: Pp, + defaultProps: { + size: "md" + } +}, { variants: Ap, defaultProps: Np } = mn, Dp = { + fontFamily: "mono", + fontSize: "sm", + px: "0.2em", + borderRadius: "sm", + bg: je.bg.reference, + color: je.color.reference, + boxShadow: je.shadow.reference +}, zp = { + baseStyle: Dp, + variants: Ap, + defaultProps: Np +}, Op = { + w: "100%", + mx: "auto", + maxW: "prose", + px: "4" +}, Ip = { + baseStyle: Op +}, Bp = { + opacity: 0.6, + borderColor: "inherit" +}, Mp = { + borderStyle: "solid" +}, Wp = { + borderStyle: "dashed" +}, Lp = { + solid: Mp, + dashed: Wp +}, jp = { + baseStyle: Bp, + variants: Lp, + defaultProps: { + variant: "solid" + } +}, { definePartsStyle: Vp, defineMultiStyleConfig: Up } = Ae(Tm.keys), Hp = { + borderTopWidth: "1px", + borderColor: "inherit", + _last: { + borderBottomWidth: "1px" + } +}, Yp = { + transitionProperty: "common", + transitionDuration: "normal", + fontSize: "md", + _focusVisible: { + boxShadow: "outline" + }, + _hover: { + bg: "blackAlpha.50" + }, + _disabled: { + opacity: 0.4, + cursor: "not-allowed" + }, + px: "4", + py: "2" +}, qp = { + pt: "2", + px: "4", + pb: "5" +}, Gp = { + fontSize: "1.25em" +}, Xp = Vp({ + container: Hp, + button: Yp, + panel: qp, + icon: Gp +}), Qp = Up({ baseStyle: Xp }), { definePartsStyle: kn, defineMultiStyleConfig: Kp } = Ae(Em.keys), gr = oe("alert-fg"), Jr = oe("alert-bg"), Jp = kn({ + container: { + bg: Jr.reference, + px: "4", + py: "3" + }, + title: { + fontWeight: "bold", + lineHeight: "6", + marginEnd: "2" + }, + description: { + lineHeight: "6" + }, + icon: { + color: gr.reference, + flexShrink: 0, + marginEnd: "3", + w: "5", + h: "6" + }, + spinner: { + color: gr.reference, + flexShrink: 0, + marginEnd: "3", + w: "5", + h: "5" + } +}); +function zo(e) { + const { theme: r, colorScheme: t } = e, n = Wt(`${t}.200`, 0.16)(r); + return { + light: `colors.${t}.100`, + dark: n + }; +} +var Zp = kn((e) => { + const { colorScheme: r } = e, t = zo(e); + return { + container: { + [gr.variable]: `colors.${r}.500`, + [Jr.variable]: t.light, + _dark: { + [gr.variable]: `colors.${r}.200`, + [Jr.variable]: t.dark + } + } + }; +}), e0 = kn((e) => { + const { colorScheme: r } = e, t = zo(e); + return { + container: { + [gr.variable]: `colors.${r}.500`, + [Jr.variable]: t.light, + _dark: { + [gr.variable]: `colors.${r}.200`, + [Jr.variable]: t.dark + }, + paddingStart: "3", + borderStartWidth: "4px", + borderStartColor: gr.reference + } + }; +}), r0 = kn((e) => { + const { colorScheme: r } = e, t = zo(e); + return { + container: { + [gr.variable]: `colors.${r}.500`, + [Jr.variable]: t.light, + _dark: { + [gr.variable]: `colors.${r}.200`, + [Jr.variable]: t.dark + }, + pt: "2", + borderTopWidth: "4px", + borderTopColor: gr.reference + } + }; +}), t0 = kn((e) => { + const { colorScheme: r } = e; + return { + container: { + [gr.variable]: "colors.white", + [Jr.variable]: `colors.${r}.500`, + _dark: { + [gr.variable]: "colors.gray.900", + [Jr.variable]: `colors.${r}.200` + }, + color: gr.reference + } + }; +}), n0 = { + subtle: Zp, + "left-accent": e0, + "top-accent": r0, + solid: t0 +}, a0 = Kp({ + baseStyle: Jp, + variants: n0, + defaultProps: { + variant: "subtle", + colorScheme: "blue" + } +}), { definePartsStyle: xl, defineMultiStyleConfig: o0 } = Ae($m.keys), Bt = oe("avatar-border-color"), Ka = oe("avatar-bg"), i0 = { + borderRadius: "full", + border: "0.2em solid", + [Bt.variable]: "white", + _dark: { + [Bt.variable]: "colors.gray.800" + }, + borderColor: Bt.reference +}, s0 = { + [Ka.variable]: "colors.gray.200", + _dark: { + [Ka.variable]: "colors.whiteAlpha.400" + }, + bgColor: Ka.reference +}, es = oe("avatar-background"), l0 = (e) => { + const { name: r, theme: t } = e, n = r ? gh({ string: r }) : "colors.gray.400", a = hh(n)(t); + let o = "white"; + return a || (o = "gray.800"), { + bg: es.reference, + "&:not([data-loaded])": { + [es.variable]: n + }, + color: o, + [Bt.variable]: "colors.white", + _dark: { + [Bt.variable]: "colors.gray.800" + }, + borderColor: Bt.reference, + verticalAlign: "top" + }; +}, c0 = xl((e) => ({ + badge: or(i0, e), + excessLabel: or(s0, e), + container: or(l0, e) +})); +function ot(e) { + const r = e !== "100%" ? ol[e] : void 0; + return xl({ + container: { + width: e, + height: e, + fontSize: `calc(${r ?? e} / 2.5)` + }, + excessLabel: { + width: e, + height: e + }, + label: { + fontSize: `calc(${r ?? e} / 2.5)`, + lineHeight: e !== "100%" ? r ?? e : void 0 + } + }); +} +var d0 = { + "2xs": ot(4), + xs: ot(6), + sm: ot(8), + md: ot(12), + lg: ot(16), + xl: ot(24), + "2xl": ot(32), + full: ot("100%") +}, u0 = o0({ + baseStyle: c0, + sizes: d0, + defaultProps: { size: "md" } +}), f0 = { + Accordion: Qp, + Alert: a0, + Avatar: u0, + Badge: mn, + Breadcrumb: hp, + Button: wp, + Checkbox: sa, + CloseButton: Fp, + Code: zp, + Container: Ip, + Divider: jp, + Drawer: Mb, + Editable: Yb, + Form: Jb, + FormError: ap, + FormLabel: ip, + Heading: cp, + Input: xe, + Kbd: Pg, + Link: Ag, + List: Ig, + Menu: qg, + Modal: ab, + NumberInput: mb, + PinInput: bb, + Popover: $b, + Progress: Ov, + Radio: Xv, + Select: tg, + Skeleton: ag, + SkipLink: ig, + Slider: bg, + Spinner: Sg, + Stat: $g, + Switch: Ah, + Table: Mh, + Tabs: ev, + Tag: mv, + Textarea: Cv, + Tooltip: $v, + Card: $p, + Stepper: Cm +}, m0 = { + colors: { + "chakra-body-text": { _light: "gray.800", _dark: "whiteAlpha.900" }, + "chakra-body-bg": { _light: "white", _dark: "gray.800" }, + "chakra-border-color": { _light: "gray.200", _dark: "whiteAlpha.300" }, + "chakra-inverse-text": { _light: "white", _dark: "gray.800" }, + "chakra-subtle-bg": { _light: "gray.100", _dark: "gray.700" }, + "chakra-subtle-text": { _light: "gray.600", _dark: "gray.400" }, + "chakra-placeholder-color": { _light: "gray.500", _dark: "whiteAlpha.400" } + } +}, h0 = { + global: { + body: { + fontFamily: "body", + color: "chakra-body-text", + bg: "chakra-body-bg", + transitionProperty: "background-color", + transitionDuration: "normal", + lineHeight: "base" + }, + "*::placeholder": { + color: "chakra-placeholder-color" + }, + "*, *::before, &::after": { + borderColor: "chakra-border-color" + } + } +}, v0 = "ltr", g0 = { + useSystemColorMode: !1, + initialColorMode: "light", + cssVarPrefix: "chakra" +}, ca = { + semanticTokens: m0, + direction: v0, + ...Nf, + components: f0, + styles: h0, + config: g0 +}, rs; +const b0 = { + baseStyle: { + ...ca.components.Heading.baseStyle, + ...(rs = ca.components.Heading.sizes) == null ? void 0 : rs.xl, + textAlign: "center", + lineHeight: 1.1, + mb: 3 + } +}; +var ts; +const p0 = { + baseStyle: { + ...ca.components.Heading.baseStyle, + ...(ts = ca.components.Heading.sizes) == null ? void 0 : ts.sm, + textAlign: "center", + fontStyle: "italic", + color: "gray.400" + } +}, y0 = ac({ + baseStyle: { + width: "100%", + height: "2px", + backgroundColor: "gray.300", + marginTop: "1.2em", + marginBottom: "1.5em" + } +}), S0 = [ + // alert message (when no questions are available) + "alert", + // question wrapper + "question", + // question title + "title", + // question description + "description", + // form radio group + "radioGroup", + // questions stack + "stack", + // form radio + "radio", + // form error message + "error" +], { defineMultiStyleConfig: x0, definePartsStyle: _0 } = oc(S0), w0 = _0({ + question: { + marginBottom: 8 + }, + title: { + fontWeight: "bold", + fontSize: "xl", + marginBottom: 1 + }, + description: { + marginBottom: 4 + } +}), k0 = x0({ + baseStyle: w0 +}), O0 = { + components: { + ElectionTitle: b0, + ElectionSchedule: p0, + HorizontalRuler: y0, + Questions: k0 + } +}; +export { + F0 as Balance, + is as ClientContext, + P0 as ClientProvider, + sf as Election, + Js as ElectionContext, + eu as ElectionDescription, + Zd as ElectionHeader, + Zs as ElectionProvider, + $s as ElectionSchedule, + p0 as ElectionScheduleTheme, + ru as ElectionStatusBadge, + Es as ElectionTitle, + b0 as ElectionTitleTheme, + cs as HR, + So as Image, + fa as Markdown, + cf as Organization, + N0 as OrganizationAvatar, + rl as OrganizationContext, + D0 as OrganizationDescription, + z0 as OrganizationHeader, + el as OrganizationName, + tl as OrganizationProvider, + Qs as QuestionField, + rf as QuestionsForm, + k0 as QuestionsTheme, + af as VoteButton, + Ec as linkify, + S0 as questionsAnatomy, + O0 as theme, + po as useClientContext, + uc as useClientProvider, + lt as useElection, + of as useElectionProvider, + ga as useOrganization, + lf as useOrganizationProvider +}; +//# sourceMappingURL=index.es.js.map diff --git a/packages/components/dist/index.es.js.map b/packages/components/dist/index.es.js.map new file mode 100644 index 00000000..ce497ffb --- /dev/null +++ b/packages/components/dist/index.es.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.es.js","sources":["../../../node_modules/react/cjs/react-jsx-dev-runtime.production.min.js","../../../node_modules/react/cjs/react-jsx-dev-runtime.development.js","../../../node_modules/react/jsx-dev-runtime.js","../src/client.tsx","../../../node_modules/@chakra-ui/shared-utils/dist/index.mjs","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/@chakra-ui/icon/dist/chunk-DKFDJSXF.mjs","../../../node_modules/@chakra-ui/react-context/dist/index.mjs","../../../node_modules/@chakra-ui/tag/dist/chunk-IXKZFKRY.mjs","../src/components/Account/Balance.tsx","../src/components/layout/HR.tsx","../../../node_modules/@chakra-ui/image/dist/chunk-QBIO4VEB.mjs","../../../node_modules/@chakra-ui/react-use-safe-layout-effect/dist/index.mjs","../../../node_modules/@chakra-ui/image/dist/chunk-HR33I6FK.mjs","../../../node_modules/@chakra-ui/image/dist/chunk-SMHKDLMK.mjs","../src/components/layout/Image.tsx","../../../node_modules/@chakra-ui/react-children-utils/dist/index.mjs","../../../node_modules/@chakra-ui/layout/dist/chunk-Z47J5YMH.mjs","../../../node_modules/@chakra-ui/breakpoint-utils/dist/chunk-G72KV6MB.mjs","../../../node_modules/@chakra-ui/layout/node_modules/@chakra-ui/object-utils/dist/chunk-R3DH46PF.mjs","../../../node_modules/@chakra-ui/layout/dist/chunk-P74GIWPW.mjs","../../../node_modules/@chakra-ui/layout/dist/chunk-AMDSPU3E.mjs","../../../node_modules/@chakra-ui/layout/dist/chunk-V4DIVZKN.mjs","../../../node_modules/@chakra-ui/layout/dist/chunk-O5CRURSQ.mjs","../../../node_modules/@chakra-ui/layout/dist/chunk-B2MGPQRJ.mjs","../../../node_modules/@chakra-ui/layout/dist/chunk-6CSUKJP7.mjs","../../../node_modules/@chakra-ui/layout/dist/chunk-YTV6DHKL.mjs","../../../node_modules/@chakra-ui/layout/dist/chunk-MVNZWEQB.mjs","../../../node_modules/@chakra-ui/table/dist/chunk-B3MS3L3D.mjs","../../../node_modules/@chakra-ui/table/dist/chunk-L7UVV2ML.mjs","../src/components/layout/Markdown.tsx","../../../node_modules/date-fns/esm/_lib/toInteger/index.js","../../../node_modules/date-fns/esm/_lib/requiredArgs/index.js","../../../node_modules/date-fns/esm/toDate/index.js","../../../node_modules/date-fns/esm/addMilliseconds/index.js","../../../node_modules/date-fns/esm/_lib/defaultOptions/index.js","../../../node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js","../../../node_modules/date-fns/esm/isDate/index.js","../../../node_modules/date-fns/esm/isValid/index.js","../../../node_modules/date-fns/esm/subMilliseconds/index.js","../../../node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js","../../../node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js","../../../node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js","../../../node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js","../../../node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js","../../../node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js","../../../node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js","../../../node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js","../../../node_modules/date-fns/esm/_lib/getUTCWeek/index.js","../../../node_modules/date-fns/esm/_lib/addLeadingZeros/index.js","../../../node_modules/date-fns/esm/_lib/format/lightFormatters/index.js","../../../node_modules/date-fns/esm/_lib/format/formatters/index.js","../../../node_modules/date-fns/esm/_lib/format/longFormatters/index.js","../../../node_modules/date-fns/esm/_lib/protectedTokens/index.js","../../../node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js","../../../node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js","../../../node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js","../../../node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js","../../../node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js","../../../node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js","../../../node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js","../../../node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js","../../../node_modules/date-fns/esm/locale/en-US/_lib/match/index.js","../../../node_modules/date-fns/esm/locale/en-US/index.js","../../../node_modules/date-fns/esm/format/index.js","../src/components/Election/parts.tsx","../../../node_modules/@chakra-ui/alert/dist/chunk-R7JICMEA.mjs","../../../node_modules/@chakra-ui/spinner/dist/chunk-NO6MRLPK.mjs","../../../node_modules/@chakra-ui/alert/dist/chunk-FZCW3KO4.mjs","../../../node_modules/@chakra-ui/alert/dist/chunk-TEHNKISS.mjs","../../../node_modules/@chakra-ui/alert/dist/chunk-RWQIUCJP.mjs","../../../node_modules/react-hook-form/dist/index.esm.mjs","../../../node_modules/@chakra-ui/react-use-merge-refs/dist/index.mjs","../../../node_modules/@chakra-ui/form-control/dist/chunk-6ZNYZUDD.mjs","../../../node_modules/@chakra-ui/form-control/dist/chunk-3GP7MWMA.mjs","../../../node_modules/@chakra-ui/radio/dist/chunk-ROBJ47HJ.mjs","../../../node_modules/@chakra-ui/radio/dist/chunk-QUJ23J4G.mjs","../../../node_modules/@zag-js/focus-visible/dist/index.mjs","../../../node_modules/@chakra-ui/radio/dist/chunk-5XCGGO7V.mjs","../../../node_modules/@chakra-ui/radio/dist/chunk-MEU4ZZ42.mjs","../src/components/Election/QuestionField.tsx","../src/components/Election/QuestionsForm.tsx","../../../node_modules/@chakra-ui/button/dist/chunk-DGWZA2DU.mjs","../../../node_modules/@chakra-ui/button/dist/chunk-FRFD4OXU.mjs","../../../node_modules/@chakra-ui/button/dist/chunk-HCASMTTF.mjs","../../../node_modules/@chakra-ui/button/dist/chunk-HNNHG6RU.mjs","../../../node_modules/@chakra-ui/button/dist/chunk-NAA7TEES.mjs","../src/components/Election/VoteButton.tsx","../src/components/Election/Election.tsx","../src/components/Organization/Name.tsx","../src/components/Organization/Organization.tsx","../src/components/Organization/Avatar.tsx","../src/components/Organization/Description.tsx","../src/components/Organization/Header.tsx","../../../node_modules/@chakra-ui/theme/dist/chunk-AU77DZXY.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-7OKLMD4V.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-ZV5E32CG.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-DDAHWWWN.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-C7H5GWRZ.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-4REDROSM.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-DJNGX4VH.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-OLDNEXT6.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-HOOF7HHD.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-G3IFUAY5.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-X4JBRTE2.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-VYR6F67Y.mjs","../../../node_modules/lodash.mergewith/index.js","../../../node_modules/@chakra-ui/styled-system/dist/index.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-TMUG4XNV.mjs","../../../node_modules/@chakra-ui/anatomy/dist/chunk-ZN6IUO2A.mjs","../../../node_modules/@chakra-ui/anatomy/dist/chunk-HAKT6JCA.mjs","../../../node_modules/color2k/dist/index.exports.import.es.mjs","../../../node_modules/@chakra-ui/theme-tools/dist/chunk-H4E5VM26.mjs","../../../node_modules/@chakra-ui/theme-tools/dist/chunk-7P3W45AB.mjs","../../../node_modules/@chakra-ui/theme-tools/dist/chunk-E3OBLH5E.mjs","../../../node_modules/@chakra-ui/theme-tools/dist/chunk-7SOXEYKO.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-KGFPXNP4.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-WHSEAAWU.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-RBQSCDLK.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-IBJP6BGU.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-CZP5TVGH.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-WFLWAEKG.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-OIGZPHLT.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-6Y3UQESG.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-VGCCECBM.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-EBS47JIL.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-3XG4KRSA.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-JDPWIQ7H.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-V3RHVDKJ.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-YSULOCDF.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-RSEFU3LC.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-IBL46MNN.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-Y6RR3LE6.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-EY6ACYQS.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-VQ2DUS6J.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-2T5TO72C.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-AQJ6AIMN.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-FIWRYWVW.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-XHTV2ZQR.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-XNRZTTJ2.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-QW3Z4V42.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-YJYMWHG4.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-PQSF5PVS.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-YZVOF4MP.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-RUW3STUO.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-D55YRTLZ.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-OYCZTG3L.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-X4O3JXYB.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-OZJFUHHJ.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-AP3MTUHH.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-PZHBQTKY.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-C4P5PUHY.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-CAKKPKRW.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-NDGGJV23.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-5Z4IVOU3.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-T276HDLM.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-YOXAUO7A.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-O7XTKHT6.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-KCPP2OFG.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-BF6JLLXF.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-VHIIIDDT.mjs","../../../node_modules/@chakra-ui/theme/dist/index.mjs","../src/theme/election.ts","../src/theme/layout.ts","../src/theme/questions.ts","../src/theme/index.ts"],"sourcesContent":["/**\n * @license React\n * react-jsx-dev-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var a=Symbol.for(\"react.fragment\");exports.Fragment=a;exports.jsxDEV=void 0;\n","/**\n * @license React\n * react-jsx-dev-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('')) {\n _frame = _frame.replace('', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie.
\n // or
). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n //
, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n\nvar jsxDEV$1 = jsxWithValidation ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsxDEV = jsxDEV$1;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-dev-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-dev-runtime.development.js');\n}\n","import { Signer } from '@ethersproject/abstract-signer'\nimport { Wallet } from '@ethersproject/wallet'\nimport { AccountData, ClientOptions, EnvOptions, VocdoniSDKClient } from '@vocdoni/sdk'\nimport { createContext, useContext, useEffect, useState } from 'react'\n\nimport { ReactNode } from 'react'\n\nexport interface ClientSettings extends ClientOptions {}\n\ntype ClientProviderProps = {\n env?: Lowercase\n client?: VocdoniSDKClient\n signer?: Wallet | Signer\n}\n\nexport const useClientProvider = ({ env: e, client: c, signer: s }: ClientProviderProps) => {\n const [client, setClient] = useState(c as VocdoniSDKClient)\n const [signer, setSigner] = useState(s as Wallet | Signer)\n const [env, setEnv] = useState(e as string)\n const [account, setAccount] = useState()\n const [balance, setBalance] = useState(-1)\n\n // initialize client\n useEffect(() => {\n if (client) return\n\n if ((!env || (env && !env.length)) && !client) {\n throw new Error('You must provide a valid env or client to the ClientProvider')\n }\n\n const opts: ClientOptions = {\n env: env as EnvOptions,\n // TODO: REMOVE THE FOLLOWING csp_url when https://github.com/vocdoni/vocdoni-sdk/issues/163 is ready\n csp_url: \"http://localhost:5000/v1\"\n }\n\n if (signer) {\n opts.wallet = signer\n }\n\n setClient(new VocdoniSDKClient(opts))\n }, [env, c])\n\n // update env\n useEffect(() => {\n if (!e) return\n setEnv(e)\n }, [e])\n\n // update signer\n useEffect(() => {\n if (!s) return\n changeSigner(s)\n }, [s])\n\n // fetch account\n useEffect(() => {\n if (!client || account || !signer) return\n ;(async () => {\n await fetchAccount()\n })()\n }, [client, account, signer])\n\n // fetch balance\n useEffect(() => {\n if (!client || !account || !signer) return\n ;(async () => {\n await fetchBalance()\n })()\n }, [client, account, signer])\n\n // switch account behavior handler\n useEffect(() => {\n if (!('ethereum' in window)) return\n\n const accChanged = async (accs: string[]) => {\n // set to null so other effects do their job\n setAccount(undefined)\n }\n\n ;(window as any).ethereum.on('accountsChanged', accChanged)\n\n return () => {\n ;(window as any).ethereum.removeListener('accountsChanged', accChanged)\n }\n }, [])\n\n const fetchAccount = async () => {\n let acc: AccountData\n\n try {\n acc = await client.createAccount()\n setAccount(acc)\n\n return acc\n } catch (e) {\n console.error('could not fetch account:', e)\n }\n }\n\n const fetchBalance = async () => {\n try {\n if (!account) {\n throw new Error('Account not available')\n }\n\n if (account.balance <= 10 && env !== 'prod') {\n await client.collectFaucetTokens()\n const acc = await client.fetchAccountInfo()\n setBalance(acc.balance)\n\n return\n }\n\n setBalance(account.balance)\n } catch (e) {\n console.error('could not fetch balance:', e)\n }\n }\n\n const changeSigner = (signer: Wallet | Signer) => {\n if (!client) {\n throw new Error('No client initialized')\n }\n\n setSigner(signer)\n client.wallet = signer\n }\n\n const generateSigner = (seed?: string | string[]) => {\n if (!client) {\n throw new Error('No client initialized')\n }\n\n let signer: Wallet\n if (!seed) {\n client.generateRandomWallet()\n signer = client.wallet as Wallet\n } else {\n signer = VocdoniSDKClient.generateWalletFromData(seed)\n }\n\n return signer\n }\n\n return {\n account,\n balance,\n client,\n env,\n signer,\n generateSigner,\n fetchAccount,\n fetchBalance,\n setClient,\n setSigner: changeSigner,\n }\n}\n\nexport type ClientState = ReturnType\n\nexport const ClientContext = createContext(undefined)\n\nexport const useClientContext = () => {\n const ctxt = useContext(ClientContext)\n\n if (!ctxt) {\n throw new Error(\n 'useClientContext returned `undefined`, maybe you forgot to wrap the component within ?'\n )\n }\n\n return {\n ...ctxt,\n // Allow client extensions\n client: ctxt.client as T,\n }\n}\n\ntype ClientProviderComponentProps = ClientProviderProps & {\n children?: ReactNode\n}\n\nexport const ClientProvider = ({ env, client, signer, ...rest }: ClientProviderComponentProps) => {\n const value = useClientProvider({ env, client, signer })\n\n return \n}\n","// src/index.ts\nvar cx = (...classNames) => classNames.filter(Boolean).join(\" \");\nfunction isDev() {\n return process.env.NODE_ENV !== \"production\";\n}\nfunction isObject(value) {\n const type = typeof value;\n return value != null && (type === \"object\" || type === \"function\") && !Array.isArray(value);\n}\nvar warn = (options) => {\n const { condition, message } = options;\n if (condition && isDev()) {\n console.warn(message);\n }\n};\nfunction runIfFn(valueOrFn, ...args) {\n return isFunction(valueOrFn) ? valueOrFn(...args) : valueOrFn;\n}\nvar isFunction = (value) => typeof value === \"function\";\nvar dataAttr = (condition) => condition ? \"\" : void 0;\nvar ariaAttr = (condition) => condition ? true : void 0;\nfunction callAllHandlers(...fns) {\n return function func(event) {\n fns.some((fn) => {\n fn == null ? void 0 : fn(event);\n return event == null ? void 0 : event.defaultPrevented;\n });\n };\n}\nfunction callAll(...fns) {\n return function mergedFn(arg) {\n fns.forEach((fn) => {\n fn == null ? void 0 : fn(arg);\n });\n };\n}\nexport {\n ariaAttr,\n callAll,\n callAllHandlers,\n cx,\n dataAttr,\n isObject,\n runIfFn,\n warn\n};\n","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('')) {\n _frame = _frame.replace('', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie.
\n // or
). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n //
, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","// src/icon.tsx\nimport {\n chakra,\n forwardRef,\n useStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar fallbackIcon = {\n path: /* @__PURE__ */ jsxs(\"g\", { stroke: \"currentColor\", strokeWidth: \"1.5\", children: [\n /* @__PURE__ */ jsx(\n \"path\",\n {\n strokeLinecap: \"round\",\n fill: \"none\",\n d: \"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25\"\n }\n ),\n /* @__PURE__ */ jsx(\n \"path\",\n {\n fill: \"currentColor\",\n strokeLinecap: \"round\",\n d: \"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0\"\n }\n ),\n /* @__PURE__ */ jsx(\"circle\", { fill: \"none\", strokeMiterlimit: \"10\", cx: \"12\", cy: \"12\", r: \"11.25\" })\n ] }),\n viewBox: \"0 0 24 24\"\n};\nvar Icon = forwardRef((props, ref) => {\n const {\n as: element,\n viewBox,\n color = \"currentColor\",\n focusable = false,\n children,\n className,\n __css,\n ...rest\n } = props;\n const _className = cx(\"chakra-icon\", className);\n const customStyles = useStyleConfig(\"Icon\", props);\n const styles = {\n w: \"1em\",\n h: \"1em\",\n display: \"inline-block\",\n lineHeight: \"1em\",\n flexShrink: 0,\n color,\n ...__css,\n ...customStyles\n };\n const shared = {\n ref,\n focusable,\n className: _className,\n __css: styles\n };\n const _viewBox = viewBox != null ? viewBox : fallbackIcon.viewBox;\n if (element && typeof element !== \"string\") {\n return /* @__PURE__ */ jsx(chakra.svg, { as: element, ...shared, ...rest });\n }\n const _path = children != null ? children : fallbackIcon.path;\n return /* @__PURE__ */ jsx(chakra.svg, { verticalAlign: \"middle\", viewBox: _viewBox, ...shared, ...rest, children: _path });\n});\nIcon.displayName = \"Icon\";\nvar icon_default = Icon;\n\nexport {\n Icon,\n icon_default\n};\n","// src/index.ts\nimport {\n createContext as createReactContext,\n useContext as useReactContext\n} from \"react\";\nfunction getErrorMessage(hook, provider) {\n return `${hook} returned \\`undefined\\`. Seems you forgot to wrap component within ${provider}`;\n}\nfunction createContext(options = {}) {\n const {\n name,\n strict = true,\n hookName = \"useContext\",\n providerName = \"Provider\",\n errorMessage,\n defaultValue\n } = options;\n const Context = createReactContext(defaultValue);\n Context.displayName = name;\n function useContext() {\n var _a;\n const context = useReactContext(Context);\n if (!context && strict) {\n const error = new Error(\n errorMessage != null ? errorMessage : getErrorMessage(hookName, providerName)\n );\n error.name = \"ContextError\";\n (_a = Error.captureStackTrace) == null ? void 0 : _a.call(Error, error, useContext);\n throw error;\n }\n return context;\n }\n return [Context.Provider, useContext, Context];\n}\nexport {\n createContext\n};\n","// src/tag.tsx\nimport { Icon } from \"@chakra-ui/icon\";\nimport { createContext } from \"@chakra-ui/react-context\";\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useMultiStyleConfig\n} from \"@chakra-ui/system\";\nimport { jsx } from \"react/jsx-runtime\";\nvar [TagStylesProvider, useTagStyles] = createContext({\n name: `TagStylesContext`,\n errorMessage: `useTagStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" `\n});\nvar Tag = forwardRef((props, ref) => {\n const styles = useMultiStyleConfig(\"Tag\", props);\n const ownProps = omitThemingProps(props);\n const containerStyles = {\n display: \"inline-flex\",\n verticalAlign: \"top\",\n alignItems: \"center\",\n maxWidth: \"100%\",\n ...styles.container\n };\n return /* @__PURE__ */ jsx(TagStylesProvider, { value: styles, children: /* @__PURE__ */ jsx(chakra.span, { ref, ...ownProps, __css: containerStyles }) });\n});\nTag.displayName = \"Tag\";\nvar TagLabel = forwardRef((props, ref) => {\n const styles = useTagStyles();\n return /* @__PURE__ */ jsx(chakra.span, { ref, noOfLines: 1, ...props, __css: styles.label });\n});\nTagLabel.displayName = \"TagLabel\";\nvar TagLeftIcon = forwardRef((props, ref) => /* @__PURE__ */ jsx(Icon, { ref, verticalAlign: \"top\", marginEnd: \"0.5rem\", ...props }));\nTagLeftIcon.displayName = \"TagLeftIcon\";\nvar TagRightIcon = forwardRef((props, ref) => /* @__PURE__ */ jsx(Icon, { ref, verticalAlign: \"top\", marginStart: \"0.5rem\", ...props }));\nTagRightIcon.displayName = \"TagRightIcon\";\nvar TagCloseIcon = (props) => /* @__PURE__ */ jsx(Icon, { verticalAlign: \"inherit\", viewBox: \"0 0 512 512\", ...props, children: /* @__PURE__ */ jsx(\n \"path\",\n {\n fill: \"currentColor\",\n d: \"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z\"\n }\n) });\nTagCloseIcon.displayName = \"TagCloseIcon\";\nvar TagCloseButton = forwardRef(\n (props, ref) => {\n const { isDisabled, children, ...rest } = props;\n const styles = useTagStyles();\n const btnStyles = {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n outline: \"0\",\n ...styles.closeButton\n };\n return /* @__PURE__ */ jsx(\n chakra.button,\n {\n ref,\n \"aria-label\": \"close\",\n ...rest,\n type: \"button\",\n disabled: isDisabled,\n __css: btnStyles,\n children: children || /* @__PURE__ */ jsx(TagCloseIcon, {})\n }\n );\n }\n);\nTagCloseButton.displayName = \"TagCloseButton\";\n\nexport {\n useTagStyles,\n Tag,\n TagLabel,\n TagLeftIcon,\n TagRightIcon,\n TagCloseButton\n};\n","import { Tag, TagProps } from '@chakra-ui/tag'\nimport { useClientContext } from '../../client'\n\nexport const Balance = (props: TagProps) => {\n const { balance } = useClientContext()\n\n if (balance < 0) {\n // maybe return the connectbutton here?\n return null\n }\n\n let color = 'teal'\n if (balance < 50 && balance > 20) {\n color = 'yellow'\n } else if (balance <= 20) {\n color = 'red'\n }\n\n return (\n \n {balance} votokens\n \n )\n}\n","import { chakra, ChakraProps, useStyleConfig } from '@chakra-ui/system'\n\ntype HRProps = ChakraProps & {\n variant?: string\n}\n\nexport const HR = (props: HRProps) => {\n const { variant, ...rest } = props\n const styles = useStyleConfig('HorizontalRuler', { variant })\n\n return \n}\n\nHR.displayName = 'HorizontalRuler'\n","// src/native-image.tsx\nimport { forwardRef } from \"@chakra-ui/system\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NativeImage = forwardRef(function NativeImage2(props, ref) {\n const { htmlWidth, htmlHeight, alt, ...rest } = props;\n return /* @__PURE__ */ jsx(\"img\", { width: htmlWidth, height: htmlHeight, ref, alt, ...rest });\n});\nNativeImage.displayName = \"NativeImage\";\n\nexport {\n NativeImage\n};\n","// src/index.ts\nimport { useEffect, useLayoutEffect } from \"react\";\nvar useSafeLayoutEffect = Boolean(globalThis == null ? void 0 : globalThis.document) ? useLayoutEffect : useEffect;\nexport {\n useSafeLayoutEffect\n};\n","// src/use-image.ts\nimport { useSafeLayoutEffect } from \"@chakra-ui/react-use-safe-layout-effect\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nfunction useImage(props) {\n const {\n loading,\n src,\n srcSet,\n onLoad,\n onError,\n crossOrigin,\n sizes,\n ignoreFallback\n } = props;\n const [status, setStatus] = useState(\"pending\");\n useEffect(() => {\n setStatus(src ? \"loading\" : \"pending\");\n }, [src]);\n const imageRef = useRef();\n const load = useCallback(() => {\n if (!src)\n return;\n flush();\n const img = new Image();\n img.src = src;\n if (crossOrigin)\n img.crossOrigin = crossOrigin;\n if (srcSet)\n img.srcset = srcSet;\n if (sizes)\n img.sizes = sizes;\n if (loading)\n img.loading = loading;\n img.onload = (event) => {\n flush();\n setStatus(\"loaded\");\n onLoad == null ? void 0 : onLoad(event);\n };\n img.onerror = (error) => {\n flush();\n setStatus(\"failed\");\n onError == null ? void 0 : onError(error);\n };\n imageRef.current = img;\n }, [src, crossOrigin, srcSet, sizes, onLoad, onError, loading]);\n const flush = () => {\n if (imageRef.current) {\n imageRef.current.onload = null;\n imageRef.current.onerror = null;\n imageRef.current = null;\n }\n };\n useSafeLayoutEffect(() => {\n if (ignoreFallback)\n return void 0;\n if (status === \"loading\") {\n load();\n }\n return () => {\n flush();\n };\n }, [status, load, ignoreFallback]);\n return ignoreFallback ? \"loaded\" : status;\n}\nvar shouldShowFallbackImage = (status, fallbackStrategy) => status !== \"loaded\" && fallbackStrategy === \"beforeLoadOrError\" || status === \"failed\" && fallbackStrategy === \"onError\";\n\nexport {\n useImage,\n shouldShowFallbackImage\n};\n","import {\n NativeImage\n} from \"./chunk-QBIO4VEB.mjs\";\nimport {\n shouldShowFallbackImage,\n useImage\n} from \"./chunk-HR33I6FK.mjs\";\n\n// src/image.tsx\nimport {\n chakra,\n forwardRef\n} from \"@chakra-ui/system\";\n\n// ../../utilities/object-utils/src/omit.ts\nfunction omit(object, keysToOmit = []) {\n const clone = Object.assign({}, object);\n for (const key of keysToOmit) {\n if (key in clone) {\n delete clone[key];\n }\n }\n return clone;\n}\n\n// src/image.tsx\nimport { jsx } from \"react/jsx-runtime\";\nvar Image = forwardRef(function Image2(props, ref) {\n const {\n fallbackSrc,\n fallback,\n src,\n srcSet,\n align,\n fit,\n loading,\n ignoreFallback,\n crossOrigin,\n fallbackStrategy = \"beforeLoadOrError\",\n referrerPolicy,\n ...rest\n } = props;\n const providedFallback = fallbackSrc !== void 0 || fallback !== void 0;\n const shouldIgnoreFallbackImage = loading != null || ignoreFallback || !providedFallback;\n const status = useImage({\n ...props,\n crossOrigin,\n ignoreFallback: shouldIgnoreFallbackImage\n });\n const showFallbackImage = shouldShowFallbackImage(status, fallbackStrategy);\n const shared = {\n ref,\n objectFit: fit,\n objectPosition: align,\n ...shouldIgnoreFallbackImage ? rest : omit(rest, [\"onError\", \"onLoad\"])\n };\n if (showFallbackImage) {\n if (fallback)\n return fallback;\n return /* @__PURE__ */ jsx(\n chakra.img,\n {\n as: NativeImage,\n className: \"chakra-image__placeholder\",\n src: fallbackSrc,\n ...shared\n }\n );\n }\n return /* @__PURE__ */ jsx(\n chakra.img,\n {\n as: NativeImage,\n src,\n srcSet,\n crossOrigin,\n loading,\n referrerPolicy,\n className: \"chakra-image\",\n ...shared\n }\n );\n});\nImage.displayName = \"Image\";\n\nexport {\n Image\n};\n","import { Image as CImage, ImageProps } from '@chakra-ui/image'\n\nexport type IPFSImageProps = ImageProps & {\n gateway?: string\n}\n\nexport const linkify = (link: string | undefined, gateway: string) => {\n if (typeof link === 'undefined') {\n return\n }\n\n if (!link.startsWith('ipfs')) {\n return link\n }\n\n const matches = link.match(/(?:ipfs:\\/\\/)?(.*)/)\n\n if (!matches) {\n // probably a wrong ipfs formatted link\n return link\n }\n\n const [, pin] = matches\n\n return gateway + pin\n}\n\nexport const Image = ({ src, ...props }: IPFSImageProps) => {\n if (!src) {\n return null\n }\n\n const link = linkify(src, props.gateway || 'https://infura-ipfs.io/ipfs/')\n\n return \n}\n","// src/index.ts\nimport { Children, isValidElement } from \"react\";\nfunction getValidChildren(children) {\n return Children.toArray(children).filter(\n (child) => isValidElement(child)\n );\n}\nexport {\n getValidChildren\n};\n","// src/list.tsx\nimport { Icon } from \"@chakra-ui/icon\";\nimport { createContext } from \"@chakra-ui/react-context\";\nimport { getValidChildren } from \"@chakra-ui/react-children-utils\";\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useMultiStyleConfig\n} from \"@chakra-ui/system\";\nimport { jsx } from \"react/jsx-runtime\";\nvar [ListStylesProvider, useListStyles] = createContext({\n name: `ListStylesContext`,\n errorMessage: `useListStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" `\n});\nvar List = forwardRef(function List2(props, ref) {\n const styles = useMultiStyleConfig(\"List\", props);\n const {\n children,\n styleType = \"none\",\n stylePosition,\n spacing,\n ...rest\n } = omitThemingProps(props);\n const validChildren = getValidChildren(children);\n const selector = \"& > *:not(style) ~ *:not(style)\";\n const spacingStyle = spacing ? { [selector]: { mt: spacing } } : {};\n return /* @__PURE__ */ jsx(ListStylesProvider, { value: styles, children: /* @__PURE__ */ jsx(\n chakra.ul,\n {\n ref,\n listStyleType: styleType,\n listStylePosition: stylePosition,\n role: \"list\",\n __css: { ...styles.container, ...spacingStyle },\n ...rest,\n children: validChildren\n }\n ) });\n});\nList.displayName = \"List\";\nvar OrderedList = forwardRef((props, ref) => {\n const { as, ...rest } = props;\n return /* @__PURE__ */ jsx(List, { ref, as: \"ol\", styleType: \"decimal\", marginStart: \"1em\", ...rest });\n});\nOrderedList.displayName = \"OrderedList\";\nvar UnorderedList = forwardRef(function UnorderedList2(props, ref) {\n const { as, ...rest } = props;\n return /* @__PURE__ */ jsx(List, { ref, as: \"ul\", styleType: \"initial\", marginStart: \"1em\", ...rest });\n});\nUnorderedList.displayName = \"UnorderedList\";\nvar ListItem = forwardRef(function ListItem2(props, ref) {\n const styles = useListStyles();\n return /* @__PURE__ */ jsx(chakra.li, { ref, ...props, __css: styles.item });\n});\nListItem.displayName = \"ListItem\";\nvar ListIcon = forwardRef(function ListIcon2(props, ref) {\n const styles = useListStyles();\n return /* @__PURE__ */ jsx(Icon, { ref, role: \"presentation\", ...props, __css: styles.icon });\n});\nListIcon.displayName = \"ListIcon\";\n\nexport {\n useListStyles,\n List,\n OrderedList,\n UnorderedList,\n ListItem,\n ListIcon\n};\n","// src/responsive.ts\nimport { isObject } from \"@chakra-ui/shared-utils\";\nvar breakpoints = Object.freeze([\n \"base\",\n \"sm\",\n \"md\",\n \"lg\",\n \"xl\",\n \"2xl\"\n]);\nfunction mapResponsive(prop, mapper) {\n if (Array.isArray(prop)) {\n return prop.map((item) => item === null ? null : mapper(item));\n }\n if (isObject(prop)) {\n return Object.keys(prop).reduce((result, key) => {\n result[key] = mapper(prop[key]);\n return result;\n }, {});\n }\n if (prop != null) {\n return mapper(prop);\n }\n return null;\n}\nfunction objectToArrayNotation(obj, bps = breakpoints) {\n const result = bps.map((br) => {\n var _a;\n return (_a = obj[br]) != null ? _a : null;\n });\n const lastItem = result[result.length - 1];\n while (lastItem === null)\n result.pop();\n return result;\n}\nfunction arrayToObjectNotation(values, bps = breakpoints) {\n const result = {};\n values.forEach((value, index) => {\n const key = bps[index];\n if (value == null)\n return;\n result[key] = value;\n });\n return result;\n}\nfunction isResponsiveObjectLike(obj, bps = breakpoints) {\n const keys = Object.keys(obj);\n return keys.length > 0 && keys.every((key) => bps.includes(key));\n}\nvar isCustomBreakpoint = (v) => Number.isNaN(Number(v));\n\nexport {\n breakpoints,\n mapResponsive,\n objectToArrayNotation,\n arrayToObjectNotation,\n isResponsiveObjectLike,\n isCustomBreakpoint\n};\n","// src/compact.ts\nfunction compact(object) {\n const clone = Object.assign({}, object);\n for (let key in clone) {\n if (clone[key] === void 0)\n delete clone[key];\n }\n return clone;\n}\n\nexport {\n compact\n};\n","// src/text.tsx\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { compact } from \"@chakra-ui/object-utils\";\nimport { jsx } from \"react/jsx-runtime\";\nvar Text = forwardRef(function Text2(props, ref) {\n const styles = useStyleConfig(\"Text\", props);\n const { className, align, decoration, casing, ...rest } = omitThemingProps(props);\n const aliasedProps = compact({\n textAlign: props.align,\n textDecoration: props.decoration,\n textTransform: props.casing\n });\n return /* @__PURE__ */ jsx(\n chakra.p,\n {\n ref,\n className: cx(\"chakra-text\", props.className),\n ...aliasedProps,\n ...rest,\n __css: styles\n }\n );\n});\nText.displayName = \"Text\";\n\nexport {\n Text\n};\n","// src/stack/stack-item.tsx\nimport { chakra } from \"@chakra-ui/system\";\nimport { jsx } from \"react/jsx-runtime\";\nvar StackItem = (props) => /* @__PURE__ */ jsx(\n chakra.div,\n {\n className: \"chakra-stack__item\",\n ...props,\n __css: {\n display: \"inline-block\",\n flex: \"0 0 auto\",\n minWidth: 0,\n ...props[\"__css\"]\n }\n }\n);\nStackItem.displayName = \"StackItem\";\n\nexport {\n StackItem\n};\n","// src/stack/stack.utils.tsx\nimport { mapResponsive } from \"@chakra-ui/breakpoint-utils\";\nvar selector = \"& > *:not(style) ~ *:not(style)\";\nfunction getStackStyles(options) {\n const { spacing, direction } = options;\n const directionStyles = {\n column: {\n marginTop: spacing,\n marginEnd: 0,\n marginBottom: 0,\n marginStart: 0\n },\n row: { marginTop: 0, marginEnd: 0, marginBottom: 0, marginStart: spacing },\n \"column-reverse\": {\n marginTop: 0,\n marginEnd: 0,\n marginBottom: spacing,\n marginStart: 0\n },\n \"row-reverse\": {\n marginTop: 0,\n marginEnd: spacing,\n marginBottom: 0,\n marginStart: 0\n }\n };\n return {\n flexDirection: direction,\n [selector]: mapResponsive(\n direction,\n (value) => directionStyles[value]\n )\n };\n}\nfunction getDividerStyles(options) {\n const { spacing, direction } = options;\n const dividerStyles = {\n column: {\n my: spacing,\n mx: 0,\n borderLeftWidth: 0,\n borderBottomWidth: \"1px\"\n },\n \"column-reverse\": {\n my: spacing,\n mx: 0,\n borderLeftWidth: 0,\n borderBottomWidth: \"1px\"\n },\n row: {\n mx: spacing,\n my: 0,\n borderLeftWidth: \"1px\",\n borderBottomWidth: 0\n },\n \"row-reverse\": {\n mx: spacing,\n my: 0,\n borderLeftWidth: \"1px\",\n borderBottomWidth: 0\n }\n };\n return {\n \"&\": mapResponsive(\n direction,\n (value) => dividerStyles[value]\n )\n };\n}\n\nexport {\n selector,\n getStackStyles,\n getDividerStyles\n};\n","import {\n StackItem\n} from \"./chunk-AMDSPU3E.mjs\";\nimport {\n getDividerStyles,\n getStackStyles,\n selector\n} from \"./chunk-V4DIVZKN.mjs\";\n\n// src/stack/stack.tsx\nimport {\n chakra,\n forwardRef\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { getValidChildren } from \"@chakra-ui/react-children-utils\";\nimport { cloneElement, Fragment, useMemo } from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar Stack = forwardRef((props, ref) => {\n const {\n isInline,\n direction: directionProp,\n align,\n justify,\n spacing = \"0.5rem\",\n wrap,\n children,\n divider,\n className,\n shouldWrapChildren,\n ...rest\n } = props;\n const direction = isInline ? \"row\" : directionProp != null ? directionProp : \"column\";\n const styles = useMemo(\n () => getStackStyles({ direction, spacing }),\n [direction, spacing]\n );\n const dividerStyle = useMemo(\n () => getDividerStyles({ spacing, direction }),\n [spacing, direction]\n );\n const hasDivider = !!divider;\n const shouldUseChildren = !shouldWrapChildren && !hasDivider;\n const clones = useMemo(() => {\n const validChildren = getValidChildren(children);\n return shouldUseChildren ? validChildren : validChildren.map((child, index) => {\n const key = typeof child.key !== \"undefined\" ? child.key : index;\n const isLast = index + 1 === validChildren.length;\n const wrappedChild = /* @__PURE__ */ jsx(StackItem, { children: child }, key);\n const _child = shouldWrapChildren ? wrappedChild : child;\n if (!hasDivider)\n return _child;\n const clonedDivider = cloneElement(\n divider,\n {\n __css: dividerStyle\n }\n );\n const _divider = isLast ? null : clonedDivider;\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n _child,\n _divider\n ] }, key);\n });\n }, [\n divider,\n dividerStyle,\n hasDivider,\n shouldUseChildren,\n shouldWrapChildren,\n children\n ]);\n const _className = cx(\"chakra-stack\", className);\n return /* @__PURE__ */ jsx(\n chakra.div,\n {\n ref,\n display: \"flex\",\n alignItems: align,\n justifyContent: justify,\n flexDirection: styles.flexDirection,\n flexWrap: wrap,\n className: _className,\n __css: hasDivider ? {} : { [selector]: styles[selector] },\n ...rest,\n children: clones\n }\n );\n});\nStack.displayName = \"Stack\";\n\nexport {\n Stack\n};\n","// src/heading.tsx\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { jsx } from \"react/jsx-runtime\";\nvar Heading = forwardRef(function Heading2(props, ref) {\n const styles = useStyleConfig(\"Heading\", props);\n const { className, ...rest } = omitThemingProps(props);\n return /* @__PURE__ */ jsx(\n chakra.h2,\n {\n ref,\n className: cx(\"chakra-heading\", props.className),\n ...rest,\n __css: styles\n }\n );\n});\nHeading.displayName = \"Heading\";\n\nexport {\n Heading\n};\n","// src/box.tsx\nimport {\n chakra,\n forwardRef\n} from \"@chakra-ui/system\";\nimport { jsx } from \"react/jsx-runtime\";\nvar Box = chakra(\"div\");\nBox.displayName = \"Box\";\nvar Square = forwardRef(function Square2(props, ref) {\n const { size, centerContent = true, ...rest } = props;\n const styles = centerContent ? { display: \"flex\", alignItems: \"center\", justifyContent: \"center\" } : {};\n return /* @__PURE__ */ jsx(\n Box,\n {\n ref,\n boxSize: size,\n __css: {\n ...styles,\n flexShrink: 0,\n flexGrow: 0\n },\n ...rest\n }\n );\n});\nSquare.displayName = \"Square\";\nvar Circle = forwardRef(function Circle2(props, ref) {\n const { size, ...rest } = props;\n return /* @__PURE__ */ jsx(Square, { size, ref, borderRadius: \"9999px\", ...rest });\n});\nCircle.displayName = \"Circle\";\n\nexport {\n Box,\n Square,\n Circle\n};\n","// src/link.tsx\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { jsx } from \"react/jsx-runtime\";\nvar Link = forwardRef(function Link2(props, ref) {\n const styles = useStyleConfig(\"Link\", props);\n const { className, isExternal, ...rest } = omitThemingProps(props);\n return /* @__PURE__ */ jsx(\n chakra.a,\n {\n target: isExternal ? \"_blank\" : void 0,\n rel: isExternal ? \"noopener\" : void 0,\n ref,\n className: cx(\"chakra-link\", className),\n ...rest,\n __css: styles\n }\n );\n});\nLink.displayName = \"Link\";\n\nexport {\n Link\n};\n","// src/code.tsx\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { jsx } from \"react/jsx-runtime\";\nvar Code = forwardRef(function Code2(props, ref) {\n const styles = useStyleConfig(\"Code\", props);\n const { className, ...rest } = omitThemingProps(props);\n return /* @__PURE__ */ jsx(\n chakra.code,\n {\n ref,\n className: cx(\"chakra-code\", props.className),\n ...rest,\n __css: {\n display: \"inline-block\",\n ...styles\n }\n }\n );\n});\nCode.displayName = \"Code\";\n\nexport {\n Code\n};\n","// src/table.tsx\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useMultiStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { createContext } from \"@chakra-ui/react-context\";\nimport { jsx } from \"react/jsx-runtime\";\nvar [TableStylesProvider, useTableStyles] = createContext({\n name: `TableStylesContext`,\n errorMessage: `useTableStyles returned is 'undefined'. Seems you forgot to wrap the components in \"
\" `\n});\nvar Table = forwardRef((props, ref) => {\n const styles = useMultiStyleConfig(\"Table\", props);\n const { className, layout, ...tableProps } = omitThemingProps(props);\n return /* @__PURE__ */ jsx(TableStylesProvider, { value: styles, children: /* @__PURE__ */ jsx(\n chakra.table,\n {\n ref,\n __css: { tableLayout: layout, ...styles.table },\n className: cx(\"chakra-table\", className),\n ...tableProps\n }\n ) });\n});\nTable.displayName = \"Table\";\n\nexport {\n useTableStyles,\n Table\n};\n","import {\n useTableStyles\n} from \"./chunk-B3MS3L3D.mjs\";\n\n// src/tr.tsx\nimport { chakra, forwardRef } from \"@chakra-ui/system\";\nimport { jsx } from \"react/jsx-runtime\";\nvar Tr = forwardRef((props, ref) => {\n const styles = useTableStyles();\n return /* @__PURE__ */ jsx(chakra.tr, { ...props, ref, __css: styles.tr });\n});\n\nexport {\n Tr\n};\n","import { Box, Code, Heading, Link, ListItem, OrderedList, Text, UnorderedList } from '@chakra-ui/layout'\nimport { chakra } from '@chakra-ui/system'\nimport { Table, Tr } from '@chakra-ui/table'\nimport ReactMarkdown, { Options } from 'react-markdown'\nimport remarkGfm from 'remark-gfm'\n\ntype MarkdownProps = Options & {\n children?: string\n}\n\nconst MD = ({ children, ...rest }: MarkdownProps) => {\n if (!children) {\n return null\n }\n\n return (\n (\n \n {children}\n \n ),\n h1: ({ node, children, ...props }) => (\n \n {children}\n \n ),\n h2: ({ node, children, ...props }) => (\n \n {children}\n \n ),\n h3: ({ node, children, ...props }) => (\n \n {children}\n \n ),\n ol: ({ node, children, ...props }) => {children},\n ul: ({ node, children, ...props }) => {children},\n li: ({ node, children, ...props }) => {children},\n p: ({ node, children, ...props }) => (\n \n {children}\n \n ),\n table: ({ node, children, ...props }) => (\n \n
{children}
\n \n ),\n tr: ({ node, children, ...props }) => {children},\n code: ({ node, children, ...props }) => {children},\n }}\n {...rest}\n />\n )\n}\n\nexport const Markdown = chakra(MD)\nMarkdown.displayName = 'Markdown'\n","export default function toInteger(dirtyNumber) {\n if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {\n return NaN;\n }\n\n var number = Number(dirtyNumber);\n\n if (isNaN(number)) {\n return number;\n }\n\n return number < 0 ? Math.ceil(number) : Math.floor(number);\n}","export default function requiredArgs(required, args) {\n if (args.length < required) {\n throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');\n }\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @param {Date|Number} argument - the value to convert\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\n\nexport default function toDate(argument) {\n requiredArgs(1, arguments);\n var argStr = Object.prototype.toString.call(argument); // Clone the date\n\n if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime());\n } else if (typeof argument === 'number' || argStr === '[object Number]') {\n return new Date(argument);\n } else {\n if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn(\"Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments\"); // eslint-disable-next-line no-console\n\n console.warn(new Error().stack);\n }\n\n return new Date(NaN);\n }\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMilliseconds\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\n\nexport default function addMilliseconds(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var timestamp = toDate(dirtyDate).getTime();\n var amount = toInteger(dirtyAmount);\n return new Date(timestamp + amount);\n}","var defaultOptions = {};\nexport function getDefaultOptions() {\n return defaultOptions;\n}\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}","/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport default function getTimezoneOffsetInMilliseconds(date) {\n var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));\n utcDate.setUTCFullYear(date.getFullYear());\n return date.getTime() - utcDate.getTime();\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param {*} value - the value to check\n * @returns {boolean} true if the given value is a date\n * @throws {TypeError} 1 arguments required\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\n\nexport default function isDate(value) {\n requiredArgs(1, arguments);\n return value instanceof Date || _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';\n}","import isDate from \"../isDate/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {*} date - the date to check\n * @returns {Boolean} the date is valid\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertable into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\n\nexport default function isValid(dirtyDate) {\n requiredArgs(1, arguments);\n\n if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {\n return false;\n }\n\n var date = toDate(dirtyDate);\n return !isNaN(Number(date));\n}","import addMilliseconds from \"../addMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name subMilliseconds\n * @category Millisecond Helpers\n * @summary Subtract the specified number of milliseconds from the given date.\n *\n * @description\n * Subtract the specified number of milliseconds from the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\n * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:29.250\n */\n\nexport default function subMilliseconds(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMilliseconds(dirtyDate, -amount);\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_DAY = 86400000;\nexport default function getUTCDayOfYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var timestamp = date.getTime();\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n var startOfYearTimestamp = date.getTime();\n var difference = timestamp - startOfYearTimestamp;\n return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function startOfUTCISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var weekStartsOn = 1;\n var date = toDate(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nexport default function getUTCISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getUTCFullYear();\n var fourthOfJanuaryOfNextYear = new Date(0);\n fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);\n var fourthOfJanuaryOfThisYear = new Date(0);\n fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","import getUTCISOWeekYear from \"../getUTCISOWeekYear/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function startOfUTCISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var year = getUTCISOWeekYear(dirtyDate);\n var fourthOfJanuary = new Date(0);\n fourthOfJanuary.setUTCFullYear(year, 0, 4);\n fourthOfJanuary.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCISOWeek(fourthOfJanuary);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport startOfUTCISOWeekYear from \"../startOfUTCISOWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\nexport default function getUTCISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function startOfUTCWeek(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n requiredArgs(1, arguments);\n var defaultOptions = getDefaultOptions();\n var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = toDate(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function getUTCWeekYear(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getUTCFullYear();\n var defaultOptions = getDefaultOptions();\n var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var firstWeekOfNextYear = new Date(0);\n firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);\n var firstWeekOfThisYear = new Date(0);\n firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","import getUTCWeekYear from \"../getUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function startOfUTCWeekYear(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n requiredArgs(1, arguments);\n var defaultOptions = getDefaultOptions();\n var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);\n var year = getUTCWeekYear(dirtyDate, options);\n var firstWeek = new Date(0);\n firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCWeek(firstWeek, options);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport startOfUTCWeekYear from \"../startOfUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\nexport default function getUTCWeek(dirtyDate, options) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","export default function addLeadingZeros(number, targetLength) {\n var sign = number < 0 ? '-' : '';\n var output = Math.abs(number).toString();\n\n while (output.length < targetLength) {\n output = '0' + output;\n }\n\n return sign + output;\n}","import addLeadingZeros from \"../../addLeadingZeros/index.js\";\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nvar formatters = {\n // Year\n y: function y(date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);\n },\n // Month\n M: function M(date, token) {\n var month = date.getUTCMonth();\n return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n // Day of the month\n d: function d(date, token) {\n return addLeadingZeros(date.getUTCDate(), token.length);\n },\n // AM or PM\n a: function a(date, token) {\n var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';\n\n switch (token) {\n case 'a':\n case 'aa':\n return dayPeriodEnumValue.toUpperCase();\n\n case 'aaa':\n return dayPeriodEnumValue;\n\n case 'aaaaa':\n return dayPeriodEnumValue[0];\n\n case 'aaaa':\n default:\n return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';\n }\n },\n // Hour [1-12]\n h: function h(date, token) {\n return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);\n },\n // Hour [0-23]\n H: function H(date, token) {\n return addLeadingZeros(date.getUTCHours(), token.length);\n },\n // Minute\n m: function m(date, token) {\n return addLeadingZeros(date.getUTCMinutes(), token.length);\n },\n // Second\n s: function s(date, token) {\n return addLeadingZeros(date.getUTCSeconds(), token.length);\n },\n // Fraction of second\n S: function S(date, token) {\n var numberOfDigits = token.length;\n var milliseconds = date.getUTCMilliseconds();\n var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));\n return addLeadingZeros(fractionalSeconds, token.length);\n }\n};\nexport default formatters;","import getUTCDayOfYear from \"../../../_lib/getUTCDayOfYear/index.js\";\nimport getUTCISOWeek from \"../../../_lib/getUTCISOWeek/index.js\";\nimport getUTCISOWeekYear from \"../../../_lib/getUTCISOWeekYear/index.js\";\nimport getUTCWeek from \"../../../_lib/getUTCWeek/index.js\";\nimport getUTCWeekYear from \"../../../_lib/getUTCWeekYear/index.js\";\nimport addLeadingZeros from \"../../addLeadingZeros/index.js\";\nimport lightFormatters from \"../lightFormatters/index.js\";\nvar dayPeriodEnum = {\n am: 'am',\n pm: 'pm',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n};\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\nvar formatters = {\n // Era\n G: function G(date, token, localize) {\n var era = date.getUTCFullYear() > 0 ? 1 : 0;\n\n switch (token) {\n // AD, BC\n case 'G':\n case 'GG':\n case 'GGG':\n return localize.era(era, {\n width: 'abbreviated'\n });\n // A, B\n\n case 'GGGGG':\n return localize.era(era, {\n width: 'narrow'\n });\n // Anno Domini, Before Christ\n\n case 'GGGG':\n default:\n return localize.era(era, {\n width: 'wide'\n });\n }\n },\n // Year\n y: function y(date, token, localize) {\n // Ordinal number\n if (token === 'yo') {\n var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, {\n unit: 'year'\n });\n }\n\n return lightFormatters.y(date, token);\n },\n // Local week-numbering year\n Y: function Y(date, token, localize, options) {\n var signedWeekYear = getUTCWeekYear(date, options); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; // Two digit year\n\n if (token === 'YY') {\n var twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n } // Ordinal number\n\n\n if (token === 'Yo') {\n return localize.ordinalNumber(weekYear, {\n unit: 'year'\n });\n } // Padding\n\n\n return addLeadingZeros(weekYear, token.length);\n },\n // ISO week-numbering year\n R: function R(date, token) {\n var isoWeekYear = getUTCISOWeekYear(date); // Padding\n\n return addLeadingZeros(isoWeekYear, token.length);\n },\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function u(date, token) {\n var year = date.getUTCFullYear();\n return addLeadingZeros(year, token.length);\n },\n // Quarter\n Q: function Q(date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n switch (token) {\n // 1, 2, 3, 4\n case 'Q':\n return String(quarter);\n // 01, 02, 03, 04\n\n case 'QQ':\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n\n case 'Qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'QQQ':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'QQQQQ':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'QQQQ':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone quarter\n q: function q(date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n switch (token) {\n // 1, 2, 3, 4\n case 'q':\n return String(quarter);\n // 01, 02, 03, 04\n\n case 'qq':\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n\n case 'qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'qqq':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'qqqqq':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'qqqq':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Month\n M: function M(date, token, localize) {\n var month = date.getUTCMonth();\n\n switch (token) {\n case 'M':\n case 'MM':\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n\n case 'Mo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n\n case 'MMM':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // J, F, ..., D\n\n case 'MMMMM':\n return localize.month(month, {\n width: 'narrow',\n context: 'formatting'\n });\n // January, February, ..., December\n\n case 'MMMM':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone month\n L: function L(date, token, localize) {\n var month = date.getUTCMonth();\n\n switch (token) {\n // 1, 2, ..., 12\n case 'L':\n return String(month + 1);\n // 01, 02, ..., 12\n\n case 'LL':\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n\n case 'Lo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n\n case 'LLL':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // J, F, ..., D\n\n case 'LLLLL':\n return localize.month(month, {\n width: 'narrow',\n context: 'standalone'\n });\n // January, February, ..., December\n\n case 'LLLL':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Local week of year\n w: function w(date, token, localize, options) {\n var week = getUTCWeek(date, options);\n\n if (token === 'wo') {\n return localize.ordinalNumber(week, {\n unit: 'week'\n });\n }\n\n return addLeadingZeros(week, token.length);\n },\n // ISO week of year\n I: function I(date, token, localize) {\n var isoWeek = getUTCISOWeek(date);\n\n if (token === 'Io') {\n return localize.ordinalNumber(isoWeek, {\n unit: 'week'\n });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n // Day of the month\n d: function d(date, token, localize) {\n if (token === 'do') {\n return localize.ordinalNumber(date.getUTCDate(), {\n unit: 'date'\n });\n }\n\n return lightFormatters.d(date, token);\n },\n // Day of year\n D: function D(date, token, localize) {\n var dayOfYear = getUTCDayOfYear(date);\n\n if (token === 'Do') {\n return localize.ordinalNumber(dayOfYear, {\n unit: 'dayOfYear'\n });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n // Day of week\n E: function E(date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n\n switch (token) {\n // Tue\n case 'E':\n case 'EE':\n case 'EEE':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'EEEEE':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'EEEEEE':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'EEEE':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Local day of week\n e: function e(date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case 'e':\n return String(localDayOfWeek);\n // Padded numerical value\n\n case 'ee':\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n\n case 'eo':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n\n case 'eee':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'eeeee':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'eeeeee':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'eeee':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone local day of week\n c: function c(date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n switch (token) {\n // Numerical value (same as in `e`)\n case 'c':\n return String(localDayOfWeek);\n // Padded numerical value\n\n case 'cc':\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n\n case 'co':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n\n case 'ccc':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // T\n\n case 'ccccc':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tu\n\n case 'cccccc':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'standalone'\n });\n // Tuesday\n\n case 'cccc':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // ISO day of week\n i: function i(date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n\n switch (token) {\n // 2\n case 'i':\n return String(isoDayOfWeek);\n // 02\n\n case 'ii':\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n\n case 'io':\n return localize.ordinalNumber(isoDayOfWeek, {\n unit: 'day'\n });\n // Tue\n\n case 'iii':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'iiiii':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'iiiiii':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'iiii':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM or PM\n a: function a(date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n\n switch (token) {\n case 'a':\n case 'aa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'aaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n }).toLowerCase();\n\n case 'aaaaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'aaaa':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM, PM, midnight, noon\n b: function b(date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n }\n\n switch (token) {\n case 'b':\n case 'bb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'bbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n }).toLowerCase();\n\n case 'bbbbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'bbbb':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // in the morning, in the afternoon, in the evening, at night\n B: function B(date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case 'B':\n case 'BB':\n case 'BBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'BBBBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'BBBB':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Hour [1-12]\n h: function h(date, token, localize) {\n if (token === 'ho') {\n var hours = date.getUTCHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return lightFormatters.h(date, token);\n },\n // Hour [0-23]\n H: function H(date, token, localize) {\n if (token === 'Ho') {\n return localize.ordinalNumber(date.getUTCHours(), {\n unit: 'hour'\n });\n }\n\n return lightFormatters.H(date, token);\n },\n // Hour [0-11]\n K: function K(date, token, localize) {\n var hours = date.getUTCHours() % 12;\n\n if (token === 'Ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n // Hour [1-24]\n k: function k(date, token, localize) {\n var hours = date.getUTCHours();\n if (hours === 0) hours = 24;\n\n if (token === 'ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n // Minute\n m: function m(date, token, localize) {\n if (token === 'mo') {\n return localize.ordinalNumber(date.getUTCMinutes(), {\n unit: 'minute'\n });\n }\n\n return lightFormatters.m(date, token);\n },\n // Second\n s: function s(date, token, localize) {\n if (token === 'so') {\n return localize.ordinalNumber(date.getUTCSeconds(), {\n unit: 'second'\n });\n }\n\n return lightFormatters.s(date, token);\n },\n // Fraction of second\n S: function S(date, token) {\n return lightFormatters.S(date, token);\n },\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function X(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return 'Z';\n }\n\n switch (token) {\n // Hours and optional minutes\n case 'X':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n\n case 'XXXX':\n case 'XX':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n\n case 'XXXXX':\n case 'XXX': // Hours and minutes with `:` delimiter\n\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function x(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case 'x':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n\n case 'xxxx':\n case 'xx':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n\n case 'xxxxx':\n case 'xxx': // Hours and minutes with `:` delimiter\n\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (GMT)\n O: function O(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Short\n case 'O':\n case 'OO':\n case 'OOO':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n\n case 'OOOO':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (specific non-location)\n z: function z(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Short\n case 'z':\n case 'zz':\n case 'zzz':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n\n case 'zzzz':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Seconds timestamp\n t: function t(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = Math.floor(originalDate.getTime() / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n // Milliseconds timestamp\n T: function T(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = originalDate.getTime();\n return addLeadingZeros(timestamp, token.length);\n }\n};\n\nfunction formatTimezoneShort(offset, dirtyDelimiter) {\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = Math.floor(absOffset / 60);\n var minutes = absOffset % 60;\n\n if (minutes === 0) {\n return sign + String(hours);\n }\n\n var delimiter = dirtyDelimiter || '';\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {\n if (offset % 60 === 0) {\n var sign = offset > 0 ? '-' : '+';\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n\n return formatTimezone(offset, dirtyDelimiter);\n}\n\nfunction formatTimezone(offset, dirtyDelimiter) {\n var delimiter = dirtyDelimiter || '';\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);\n var minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n\nexport default formatters;","var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'P':\n return formatLong.date({\n width: 'short'\n });\n\n case 'PP':\n return formatLong.date({\n width: 'medium'\n });\n\n case 'PPP':\n return formatLong.date({\n width: 'long'\n });\n\n case 'PPPP':\n default:\n return formatLong.date({\n width: 'full'\n });\n }\n};\n\nvar timeLongFormatter = function timeLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'p':\n return formatLong.time({\n width: 'short'\n });\n\n case 'pp':\n return formatLong.time({\n width: 'medium'\n });\n\n case 'ppp':\n return formatLong.time({\n width: 'long'\n });\n\n case 'pppp':\n default:\n return formatLong.time({\n width: 'full'\n });\n }\n};\n\nvar dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) {\n var matchResult = pattern.match(/(P+)(p+)?/) || [];\n var datePattern = matchResult[1];\n var timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n\n var dateTimeFormat;\n\n switch (datePattern) {\n case 'P':\n dateTimeFormat = formatLong.dateTime({\n width: 'short'\n });\n break;\n\n case 'PP':\n dateTimeFormat = formatLong.dateTime({\n width: 'medium'\n });\n break;\n\n case 'PPP':\n dateTimeFormat = formatLong.dateTime({\n width: 'long'\n });\n break;\n\n case 'PPPP':\n default:\n dateTimeFormat = formatLong.dateTime({\n width: 'full'\n });\n break;\n }\n\n return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));\n};\n\nvar longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter\n};\nexport default longFormatters;","var protectedDayOfYearTokens = ['D', 'DD'];\nvar protectedWeekYearTokens = ['YY', 'YYYY'];\nexport function isProtectedDayOfYearToken(token) {\n return protectedDayOfYearTokens.indexOf(token) !== -1;\n}\nexport function isProtectedWeekYearToken(token) {\n return protectedWeekYearTokens.indexOf(token) !== -1;\n}\nexport function throwProtectedError(token, format, input) {\n if (token === 'YYYY') {\n throw new RangeError(\"Use `yyyy` instead of `YYYY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n } else if (token === 'YY') {\n throw new RangeError(\"Use `yy` instead of `YY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n } else if (token === 'D') {\n throw new RangeError(\"Use `d` instead of `D` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n } else if (token === 'DD') {\n throw new RangeError(\"Use `dd` instead of `DD` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n }\n}","var formatDistanceLocale = {\n lessThanXSeconds: {\n one: 'less than a second',\n other: 'less than {{count}} seconds'\n },\n xSeconds: {\n one: '1 second',\n other: '{{count}} seconds'\n },\n halfAMinute: 'half a minute',\n lessThanXMinutes: {\n one: 'less than a minute',\n other: 'less than {{count}} minutes'\n },\n xMinutes: {\n one: '1 minute',\n other: '{{count}} minutes'\n },\n aboutXHours: {\n one: 'about 1 hour',\n other: 'about {{count}} hours'\n },\n xHours: {\n one: '1 hour',\n other: '{{count}} hours'\n },\n xDays: {\n one: '1 day',\n other: '{{count}} days'\n },\n aboutXWeeks: {\n one: 'about 1 week',\n other: 'about {{count}} weeks'\n },\n xWeeks: {\n one: '1 week',\n other: '{{count}} weeks'\n },\n aboutXMonths: {\n one: 'about 1 month',\n other: 'about {{count}} months'\n },\n xMonths: {\n one: '1 month',\n other: '{{count}} months'\n },\n aboutXYears: {\n one: 'about 1 year',\n other: 'about {{count}} years'\n },\n xYears: {\n one: '1 year',\n other: '{{count}} years'\n },\n overXYears: {\n one: 'over 1 year',\n other: 'over {{count}} years'\n },\n almostXYears: {\n one: 'almost 1 year',\n other: 'almost {{count}} years'\n }\n};\n\nvar formatDistance = function formatDistance(token, count, options) {\n var result;\n var tokenValue = formatDistanceLocale[token];\n\n if (typeof tokenValue === 'string') {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace('{{count}}', count.toString());\n }\n\n if (options !== null && options !== void 0 && options.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return 'in ' + result;\n } else {\n return result + ' ago';\n }\n }\n\n return result;\n};\n\nexport default formatDistance;","export default function buildFormatLongFn(args) {\n return function () {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // TODO: Remove String()\n var width = options.width ? String(options.width) : args.defaultWidth;\n var format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n full: 'EEEE, MMMM do, y',\n long: 'MMMM do, y',\n medium: 'MMM d, y',\n short: 'MM/dd/yyyy'\n};\nvar timeFormats = {\n full: 'h:mm:ss a zzzz',\n long: 'h:mm:ss a z',\n medium: 'h:mm:ss a',\n short: 'h:mm a'\n};\nvar dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: '{{date}}, {{time}}',\n short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: 'full'\n }),\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: 'full'\n }),\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: 'full'\n })\n};\nexport default formatLong;","var formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: 'P'\n};\n\nvar formatRelative = function formatRelative(token, _date, _baseDate, _options) {\n return formatRelativeLocale[token];\n};\n\nexport default formatRelative;","export default function buildLocalizeFn(args) {\n return function (dirtyIndex, options) {\n var context = options !== null && options !== void 0 && options.context ? String(options.context) : 'standalone';\n var valuesArray;\n\n if (context === 'formatting' && args.formattingValues) {\n var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;\n valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n var _defaultWidth = args.defaultWidth;\n\n var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[_width] || args.values[_defaultWidth];\n }\n\n var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n\n return valuesArray[index];\n };\n}","import buildLocalizeFn from \"../../../_lib/buildLocalizeFn/index.js\";\nvar eraValues = {\n narrow: ['B', 'A'],\n abbreviated: ['BC', 'AD'],\n wide: ['Before Christ', 'Anno Domini']\n};\nvar quarterValues = {\n narrow: ['1', '2', '3', '4'],\n abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],\n wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']\n}; // Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\n\nvar monthValues = {\n narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n};\nvar dayValues = {\n narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n};\nvar dayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n }\n};\nvar formattingDayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n }\n};\n\nvar ordinalNumber = function ordinalNumber(dirtyNumber, _options) {\n var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n var rem100 = number % 100;\n\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + 'st';\n\n case 2:\n return number + 'nd';\n\n case 3:\n return number + 'rd';\n }\n }\n\n return number + 'th';\n};\n\nvar localize = {\n ordinalNumber: ordinalNumber,\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: 'wide'\n }),\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: 'wide',\n argumentCallback: function argumentCallback(quarter) {\n return quarter - 1;\n }\n }),\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: 'wide'\n }),\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: 'wide'\n }),\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: 'wide',\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: 'wide'\n })\n};\nexport default localize;","export default function buildMatchFn(args) {\n return function (string) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var width = options.width;\n var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];\n var matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n\n var matchedString = matchResult[0];\n var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];\n var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {\n return pattern.test(matchedString);\n }) : findKey(parsePatterns, function (pattern) {\n return pattern.test(matchedString);\n });\n var value;\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback ? options.valueCallback(value) : value;\n var rest = string.slice(matchedString.length);\n return {\n value: value,\n rest: rest\n };\n };\n}\n\nfunction findKey(object, predicate) {\n for (var key in object) {\n if (object.hasOwnProperty(key) && predicate(object[key])) {\n return key;\n }\n }\n\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (var key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n\n return undefined;\n}","export default function buildMatchPatternFn(args) {\n return function (string) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n var matchedString = matchResult[0];\n var parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];\n value = options.valueCallback ? options.valueCallback(value) : value;\n var rest = string.slice(matchedString.length);\n return {\n value: value,\n rest: rest\n };\n };\n}","import buildMatchFn from \"../../../_lib/buildMatchFn/index.js\";\nimport buildMatchPatternFn from \"../../../_lib/buildMatchPatternFn/index.js\";\nvar matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i\n};\nvar parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i]\n};\nvar matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i\n};\nvar parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i\n};\nvar parseMonthPatterns = {\n narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],\n any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]\n};\nvar matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i\n};\nvar parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]\n};\nvar matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i\n};\nvar parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i\n }\n};\nvar match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: function valueCallback(value) {\n return parseInt(value, 10);\n }\n }),\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseEraPatterns,\n defaultParseWidth: 'any'\n }),\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: 'any',\n valueCallback: function valueCallback(index) {\n return index + 1;\n }\n }),\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: 'any'\n }),\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseDayPatterns,\n defaultParseWidth: 'any'\n }),\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: 'any',\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: 'any'\n })\n};\nexport default match;","import formatDistance from \"./_lib/formatDistance/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\nimport formatRelative from \"./_lib/formatRelative/index.js\";\nimport localize from \"./_lib/localize/index.js\";\nimport match from \"./_lib/match/index.js\";\n\n/**\n * @type {Locale}\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}\n * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}\n */\nvar locale = {\n code: 'en-US',\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0\n /* Sunday */\n ,\n firstWeekContainsDate: 1\n }\n};\nexport default locale;","import isValid from \"../isValid/index.js\";\nimport subMilliseconds from \"../subMilliseconds/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport formatters from \"../_lib/format/formatters/index.js\";\nimport longFormatters from \"../_lib/format/longFormatters/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport { isProtectedDayOfYearToken, isProtectedWeekYearToken, throwProtectedError } from \"../_lib/protectedTokens/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\nimport defaultLocale from \"../_lib/defaultLocale/index.js\"; // This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\n\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\n\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n/**\n * @name format\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}\n * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param {Date|Number} date - the original date\n * @param {String} format - the string of tokens\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @returns {String} the formatted date string\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `localize` property\n * @throws {RangeError} `options.locale` must contain `formatLong` property\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\n\nexport default function format(dirtyDate, dirtyFormatStr, options) {\n var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;\n\n requiredArgs(2, arguments);\n var formatStr = String(dirtyFormatStr);\n var defaultOptions = getDefaultOptions();\n var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;\n var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n if (!locale.localize) {\n throw new RangeError('locale must contain localize property');\n }\n\n if (!locale.formatLong) {\n throw new RangeError('locale must contain formatLong property');\n }\n\n var originalDate = toDate(dirtyDate);\n\n if (!isValid(originalDate)) {\n throw new RangeError('Invalid time value');\n } // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n // This ensures that when UTC functions will be implemented, locales will be compatible with them.\n // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376\n\n\n var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);\n var utcDate = subMilliseconds(originalDate, timezoneOffset);\n var formatterOptions = {\n firstWeekContainsDate: firstWeekContainsDate,\n weekStartsOn: weekStartsOn,\n locale: locale,\n _originalDate: originalDate\n };\n var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {\n var firstCharacter = substring[0];\n\n if (firstCharacter === 'p' || firstCharacter === 'P') {\n var longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n\n return substring;\n }).join('').match(formattingTokensRegExp).map(function (substring) {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return \"'\";\n }\n\n var firstCharacter = substring[0];\n\n if (firstCharacter === \"'\") {\n return cleanEscapedString(substring);\n }\n\n var formatter = formatters[firstCharacter];\n\n if (formatter) {\n if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {\n throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));\n }\n\n if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {\n throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));\n }\n\n return formatter(utcDate, substring, locale.localize, formatterOptions);\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n }\n\n return substring;\n }).join('');\n return result;\n}\n\nfunction cleanEscapedString(input) {\n var matched = input.match(escapedStringRegExp);\n\n if (!matched) {\n return input;\n }\n\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}","import { HeadingProps } from '@chakra-ui/layout'\nimport {\n chakra,\n ChakraProps,\n forwardRef,\n omitThemingProps,\n useMultiStyleConfig,\n useStyleConfig,\n} from '@chakra-ui/system'\nimport { Tag, TagProps } from '@chakra-ui/tag'\nimport { ElectionStatus } from '@vocdoni/sdk'\nimport { format as dformat } from 'date-fns'\nimport { ReactMarkdownProps } from 'react-markdown/lib/complex-types'\n\nimport { Image, IPFSImageProps, Markdown } from '../layout'\nimport { useElection } from './Election'\n\nexport const ElectionTitle = forwardRef((props, ref) => {\n const { election } = useElection()\n const styles = useStyleConfig('ElectionTitle', props)\n const rest = omitThemingProps(props)\n\n if (!election) return null\n\n return (\n \n {election.title.default}\n \n )\n})\nElectionTitle.displayName = 'ElectionTitle'\n\nexport const ElectionHeader = (props: IPFSImageProps) => {\n const styles = useStyleConfig('ElectionHeader', props)\n const { election } = useElection()\n\n if (!election || (election && !election.header)) return null\n\n return \n}\n\nexport const ElectionDescription = (props: Omit & ChakraProps) => {\n const styles = useStyleConfig('ElectionDescription', props)\n const { election } = useElection()\n\n if (!election || (election && !election.description)) return null\n\n return (\n \n {election.description.default}\n \n )\n}\n\nexport type ElectionScheduleProps = HeadingProps & {\n format?: string\n}\n\nexport const ElectionSchedule = forwardRef(({ format, ...rest }, ref) => {\n const styles = useMultiStyleConfig('ElectionSchedule', rest)\n const { election } = useElection()\n\n let f = format\n if (!f) {\n f = 'd-L-y HH:mm'\n }\n\n if (!election) return null\n\n return (\n \n Voting period {dformat(new Date(election.startDate), f)} ~ \n {dformat(new Date(election.endDate), f)}\n \n )\n})\nElectionSchedule.displayName = 'ElectionSchedule'\n\nexport const ElectionStatusBadge = (props: TagProps) => {\n const { election, trans } = useElection()\n\n if (!election) return null\n\n const defaults: Record = {\n PROCESS_UNKNOWN: 'Unknown',\n UPCOMING: 'Upcoming',\n ONGOING: 'Ongoing',\n ENDED: 'Ended',\n CANCELED: 'Canceled',\n PAUSED: 'Paused',\n RESULTS: 'Results',\n }\n\n let { colorScheme } = props\n if (!colorScheme) {\n colorScheme = 'green'\n\n if ([ElectionStatus.PAUSED, ElectionStatus.ENDED].includes(election.status)) {\n colorScheme = 'yellow'\n }\n if ([ElectionStatus.CANCELED, ElectionStatus.PROCESS_UNKNOWN].includes(election.status)) {\n colorScheme = 'red'\n }\n }\n\n return (\n \n {trans(election.status, defaults[election.status])}\n \n )\n}\n","// src/icons.tsx\nimport { Icon } from \"@chakra-ui/icon\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction CheckIcon(props) {\n return /* @__PURE__ */ jsx(Icon, { viewBox: \"0 0 24 24\", ...props, children: /* @__PURE__ */ jsx(\n \"path\",\n {\n fill: \"currentColor\",\n d: \"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z\"\n }\n ) });\n}\nfunction InfoIcon(props) {\n return /* @__PURE__ */ jsx(Icon, { viewBox: \"0 0 24 24\", ...props, children: /* @__PURE__ */ jsx(\n \"path\",\n {\n fill: \"currentColor\",\n d: \"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z\"\n }\n ) });\n}\nfunction WarningIcon(props) {\n return /* @__PURE__ */ jsx(Icon, { viewBox: \"0 0 24 24\", ...props, children: /* @__PURE__ */ jsx(\n \"path\",\n {\n fill: \"currentColor\",\n d: \"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z\"\n }\n ) });\n}\n\nexport {\n CheckIcon,\n InfoIcon,\n WarningIcon\n};\n","// src/spinner.tsx\nimport {\n chakra,\n forwardRef,\n keyframes,\n omitThemingProps,\n useStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { jsx } from \"react/jsx-runtime\";\nvar spin = keyframes({\n \"0%\": {\n transform: \"rotate(0deg)\"\n },\n \"100%\": {\n transform: \"rotate(360deg)\"\n }\n});\nvar Spinner = forwardRef((props, ref) => {\n const styles = useStyleConfig(\"Spinner\", props);\n const {\n label = \"Loading...\",\n thickness = \"2px\",\n speed = \"0.45s\",\n emptyColor = \"transparent\",\n className,\n ...rest\n } = omitThemingProps(props);\n const _className = cx(\"chakra-spinner\", className);\n const spinnerStyles = {\n display: \"inline-block\",\n borderColor: \"currentColor\",\n borderStyle: \"solid\",\n borderRadius: \"99999px\",\n borderWidth: thickness,\n borderBottomColor: emptyColor,\n borderLeftColor: emptyColor,\n animation: `${spin} ${speed} linear infinite`,\n ...styles\n };\n return /* @__PURE__ */ jsx(\n chakra.div,\n {\n ref,\n __css: spinnerStyles,\n className: _className,\n ...rest,\n children: label && /* @__PURE__ */ jsx(chakra.span, { srOnly: true, children: label })\n }\n );\n});\nSpinner.displayName = \"Spinner\";\n\nexport {\n Spinner\n};\n","import {\n CheckIcon,\n InfoIcon,\n WarningIcon\n} from \"./chunk-R7JICMEA.mjs\";\n\n// src/alert-context.ts\nimport { createContext } from \"@chakra-ui/react-context\";\nimport { Spinner } from \"@chakra-ui/spinner\";\nvar [AlertProvider, useAlertContext] = createContext({\n name: \"AlertContext\",\n hookName: \"useAlertContext\",\n providerName: \"\"\n});\nvar [AlertStylesProvider, useAlertStyles] = createContext({\n name: `AlertStylesContext`,\n hookName: `useAlertStyles`,\n providerName: \"\"\n});\nvar STATUSES = {\n info: { icon: InfoIcon, colorScheme: \"blue\" },\n warning: { icon: WarningIcon, colorScheme: \"orange\" },\n success: { icon: CheckIcon, colorScheme: \"green\" },\n error: { icon: WarningIcon, colorScheme: \"red\" },\n loading: { icon: Spinner, colorScheme: \"blue\" }\n};\nfunction getStatusColorScheme(status) {\n return STATUSES[status].colorScheme;\n}\nfunction getStatusIcon(status) {\n return STATUSES[status].icon;\n}\n\nexport {\n AlertProvider,\n useAlertContext,\n AlertStylesProvider,\n useAlertStyles,\n getStatusColorScheme,\n getStatusIcon\n};\n","import {\n getStatusIcon,\n useAlertContext,\n useAlertStyles\n} from \"./chunk-FZCW3KO4.mjs\";\n\n// src/alert-icon.tsx\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { chakra } from \"@chakra-ui/system\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction AlertIcon(props) {\n const { status } = useAlertContext();\n const BaseIcon = getStatusIcon(status);\n const styles = useAlertStyles();\n const css = status === \"loading\" ? styles.spinner : styles.icon;\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n display: \"inherit\",\n \"data-status\": status,\n ...props,\n className: cx(\"chakra-alert__icon\", props.className),\n __css: css,\n children: props.children || /* @__PURE__ */ jsx(BaseIcon, { h: \"100%\", w: \"100%\" })\n }\n );\n}\nAlertIcon.displayName = \"AlertIcon\";\n\nexport {\n AlertIcon\n};\n","import {\n AlertProvider,\n AlertStylesProvider,\n getStatusColorScheme\n} from \"./chunk-FZCW3KO4.mjs\";\n\n// src/alert.tsx\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useMultiStyleConfig\n} from \"@chakra-ui/system\";\nimport { jsx } from \"react/jsx-runtime\";\nvar Alert = forwardRef(function Alert2(props, ref) {\n var _a;\n const { status = \"info\", addRole = true, ...rest } = omitThemingProps(props);\n const colorScheme = (_a = props.colorScheme) != null ? _a : getStatusColorScheme(status);\n const styles = useMultiStyleConfig(\"Alert\", { ...props, colorScheme });\n const alertStyles = {\n width: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n position: \"relative\",\n overflow: \"hidden\",\n ...styles.container\n };\n return /* @__PURE__ */ jsx(AlertProvider, { value: { status }, children: /* @__PURE__ */ jsx(AlertStylesProvider, { value: styles, children: /* @__PURE__ */ jsx(\n chakra.div,\n {\n \"data-status\": status,\n role: addRole ? \"alert\" : void 0,\n ref,\n ...rest,\n className: cx(\"chakra-alert\", props.className),\n __css: alertStyles\n }\n ) }) });\n});\nAlert.displayName = \"Alert\";\n\nexport {\n Alert\n};\n","import React from 'react';\n\nvar isCheckBoxInput = (element) => element.type === 'checkbox';\n\nvar isDateObject = (value) => value instanceof Date;\n\nvar isNullOrUndefined = (value) => value == null;\n\nconst isObjectType = (value) => typeof value === 'object';\nvar isObject = (value) => !isNullOrUndefined(value) &&\n !Array.isArray(value) &&\n isObjectType(value) &&\n !isDateObject(value);\n\nvar getEventValue = (event) => isObject(event) && event.target\n ? isCheckBoxInput(event.target)\n ? event.target.checked\n : event.target.value\n : event;\n\nvar getNodeParentName = (name) => name.substring(0, name.search(/\\.\\d+(\\.|$)/)) || name;\n\nvar isNameInFieldArray = (names, name) => names.has(getNodeParentName(name));\n\nvar isPlainObject = (tempObject) => {\n const prototypeCopy = tempObject.constructor && tempObject.constructor.prototype;\n return (isObject(prototypeCopy) && prototypeCopy.hasOwnProperty('isPrototypeOf'));\n};\n\nvar isWeb = typeof window !== 'undefined' &&\n typeof window.HTMLElement !== 'undefined' &&\n typeof document !== 'undefined';\n\nfunction cloneObject(data) {\n let copy;\n const isArray = Array.isArray(data);\n if (data instanceof Date) {\n copy = new Date(data);\n }\n else if (data instanceof Set) {\n copy = new Set(data);\n }\n else if (!(isWeb && (data instanceof Blob || data instanceof FileList)) &&\n (isArray || isObject(data))) {\n copy = isArray ? [] : {};\n if (!Array.isArray(data) && !isPlainObject(data)) {\n copy = data;\n }\n else {\n for (const key in data) {\n copy[key] = cloneObject(data[key]);\n }\n }\n }\n else {\n return data;\n }\n return copy;\n}\n\nvar compact = (value) => Array.isArray(value) ? value.filter(Boolean) : [];\n\nvar isUndefined = (val) => val === undefined;\n\nvar get = (obj, path, defaultValue) => {\n if (!path || !isObject(obj)) {\n return defaultValue;\n }\n const result = compact(path.split(/[,[\\].]+?/)).reduce((result, key) => isNullOrUndefined(result) ? result : result[key], obj);\n return isUndefined(result) || result === obj\n ? isUndefined(obj[path])\n ? defaultValue\n : obj[path]\n : result;\n};\n\nconst EVENTS = {\n BLUR: 'blur',\n FOCUS_OUT: 'focusout',\n CHANGE: 'change',\n};\nconst VALIDATION_MODE = {\n onBlur: 'onBlur',\n onChange: 'onChange',\n onSubmit: 'onSubmit',\n onTouched: 'onTouched',\n all: 'all',\n};\nconst INPUT_VALIDATION_RULES = {\n max: 'max',\n min: 'min',\n maxLength: 'maxLength',\n minLength: 'minLength',\n pattern: 'pattern',\n required: 'required',\n validate: 'validate',\n};\n\nconst HookFormContext = React.createContext(null);\n/**\n * This custom hook allows you to access the form context. useFormContext is intended to be used in deeply nested structures, where it would become inconvenient to pass the context as a prop. To be used with {@link FormProvider}.\n *\n * @remarks\n * [API](https://react-hook-form.com/api/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)\n *\n * @returns return all useForm methods\n *\n * @example\n * ```tsx\n * function App() {\n * const methods = useForm();\n * const onSubmit = data => console.log(data);\n *\n * return (\n * \n *
\n * \n * \n * \n *
\n * );\n * }\n *\n * function NestedInput() {\n * const { register } = useFormContext(); // retrieve all hook methods\n * return ;\n * }\n * ```\n */\nconst useFormContext = () => React.useContext(HookFormContext);\n/**\n * A provider component that propagates the `useForm` methods to all children components via [React Context](https://reactjs.org/docs/context.html) API. To be used with {@link useFormContext}.\n *\n * @remarks\n * [API](https://react-hook-form.com/api/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)\n *\n * @param props - all useFrom methods\n *\n * @example\n * ```tsx\n * function App() {\n * const methods = useForm();\n * const onSubmit = data => console.log(data);\n *\n * return (\n * \n *
\n * \n * \n * \n *
\n * );\n * }\n *\n * function NestedInput() {\n * const { register } = useFormContext(); // retrieve all hook methods\n * return ;\n * }\n * ```\n */\nconst FormProvider = (props) => {\n const { children, ...data } = props;\n return (React.createElement(HookFormContext.Provider, { value: data }, children));\n};\n\nvar getProxyFormState = (formState, control, localProxyFormState, isRoot = true) => {\n const result = {\n defaultValues: control._defaultValues,\n };\n for (const key in formState) {\n Object.defineProperty(result, key, {\n get: () => {\n const _key = key;\n if (control._proxyFormState[_key] !== VALIDATION_MODE.all) {\n control._proxyFormState[_key] = !isRoot || VALIDATION_MODE.all;\n }\n localProxyFormState && (localProxyFormState[_key] = true);\n return formState[_key];\n },\n });\n }\n return result;\n};\n\nvar isEmptyObject = (value) => isObject(value) && !Object.keys(value).length;\n\nvar shouldRenderFormState = (formStateData, _proxyFormState, updateFormState, isRoot) => {\n updateFormState(formStateData);\n const { name, ...formState } = formStateData;\n return (isEmptyObject(formState) ||\n Object.keys(formState).length >= Object.keys(_proxyFormState).length ||\n Object.keys(formState).find((key) => _proxyFormState[key] ===\n (!isRoot || VALIDATION_MODE.all)));\n};\n\nvar convertToArrayPayload = (value) => (Array.isArray(value) ? value : [value]);\n\nvar shouldSubscribeByName = (name, signalName, exact) => exact && signalName\n ? name === signalName\n : !name ||\n !signalName ||\n name === signalName ||\n convertToArrayPayload(name).some((currentName) => currentName &&\n (currentName.startsWith(signalName) ||\n signalName.startsWith(currentName)));\n\nfunction useSubscribe(props) {\n const _props = React.useRef(props);\n _props.current = props;\n React.useEffect(() => {\n const subscription = !props.disabled &&\n _props.current.subject &&\n _props.current.subject.subscribe({\n next: _props.current.next,\n });\n return () => {\n subscription && subscription.unsubscribe();\n };\n }, [props.disabled]);\n}\n\n/**\n * This custom hook allows you to subscribe to each form state, and isolate the re-render at the custom hook level. It has its scope in terms of form state subscription, so it would not affect other useFormState and useForm. Using this hook can reduce the re-render impact on large and complex form application.\n *\n * @remarks\n * [API](https://react-hook-form.com/api/useformstate) • [Demo](https://codesandbox.io/s/useformstate-75xly)\n *\n * @param props - include options on specify fields to subscribe. {@link UseFormStateReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, handleSubmit, control } = useForm({\n * defaultValues: {\n * firstName: \"firstName\"\n * }});\n * const { dirtyFields } = useFormState({\n * control\n * });\n * const onSubmit = (data) => console.log(data);\n *\n * return (\n *
\n * \n * {dirtyFields.firstName &&

Field is dirty.

}\n * \n *
\n * );\n * }\n * ```\n */\nfunction useFormState(props) {\n const methods = useFormContext();\n const { control = methods.control, disabled, name, exact } = props || {};\n const [formState, updateFormState] = React.useState(control._formState);\n const _mounted = React.useRef(true);\n const _localProxyFormState = React.useRef({\n isDirty: false,\n isLoading: false,\n dirtyFields: false,\n touchedFields: false,\n isValidating: false,\n isValid: false,\n errors: false,\n });\n const _name = React.useRef(name);\n _name.current = name;\n useSubscribe({\n disabled,\n next: (value) => _mounted.current &&\n shouldSubscribeByName(_name.current, value.name, exact) &&\n shouldRenderFormState(value, _localProxyFormState.current, control._updateFormState) &&\n updateFormState({\n ...control._formState,\n ...value,\n }),\n subject: control._subjects.state,\n });\n React.useEffect(() => {\n _mounted.current = true;\n _localProxyFormState.current.isValid && control._updateValid(true);\n return () => {\n _mounted.current = false;\n };\n }, [control]);\n return getProxyFormState(formState, control, _localProxyFormState.current, false);\n}\n\nvar isString = (value) => typeof value === 'string';\n\nvar generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) => {\n if (isString(names)) {\n isGlobal && _names.watch.add(names);\n return get(formValues, names, defaultValue);\n }\n if (Array.isArray(names)) {\n return names.map((fieldName) => (isGlobal && _names.watch.add(fieldName), get(formValues, fieldName)));\n }\n isGlobal && (_names.watchAll = true);\n return formValues;\n};\n\n/**\n * Custom hook to subscribe to field change and isolate re-rendering at the component level.\n *\n * @remarks\n *\n * [API](https://react-hook-form.com/api/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e)\n *\n * @example\n * ```tsx\n * const { watch } = useForm();\n * const values = useWatch({\n * name: \"fieldName\"\n * control,\n * })\n * ```\n */\nfunction useWatch(props) {\n const methods = useFormContext();\n const { control = methods.control, name, defaultValue, disabled, exact, } = props || {};\n const _name = React.useRef(name);\n _name.current = name;\n useSubscribe({\n disabled,\n subject: control._subjects.values,\n next: (formState) => {\n if (shouldSubscribeByName(_name.current, formState.name, exact)) {\n updateValue(cloneObject(generateWatchOutput(_name.current, control._names, formState.values || control._formValues, false, defaultValue)));\n }\n },\n });\n const [value, updateValue] = React.useState(control._getWatch(name, defaultValue));\n React.useEffect(() => control._removeUnmounted());\n return value;\n}\n\nvar isKey = (value) => /^\\w*$/.test(value);\n\nvar stringToPath = (input) => compact(input.replace(/[\"|']|\\]/g, '').split(/\\.|\\[/));\n\nfunction set(object, path, value) {\n let index = -1;\n const tempPath = isKey(path) ? [path] : stringToPath(path);\n const length = tempPath.length;\n const lastIndex = length - 1;\n while (++index < length) {\n const key = tempPath[index];\n let newValue = value;\n if (index !== lastIndex) {\n const objValue = object[key];\n newValue =\n isObject(objValue) || Array.isArray(objValue)\n ? objValue\n : !isNaN(+tempPath[index + 1])\n ? []\n : {};\n }\n object[key] = newValue;\n object = object[key];\n }\n return object;\n}\n\n/**\n * Custom hook to work with controlled component, this function provide you with both form and field level state. Re-render is isolated at the hook level.\n *\n * @remarks\n * [API](https://react-hook-form.com/api/usecontroller) • [Demo](https://codesandbox.io/s/usecontroller-0o8px)\n *\n * @param props - the path name to the form field value, and validation rules.\n *\n * @returns field properties, field and form state. {@link UseControllerReturn}\n *\n * @example\n * ```tsx\n * function Input(props) {\n * const { field, fieldState, formState } = useController(props);\n * return (\n *
\n * \n *

{fieldState.isTouched && \"Touched\"}

\n *

{formState.isSubmitted ? \"submitted\" : \"\"}

\n *
\n * );\n * }\n * ```\n */\nfunction useController(props) {\n const methods = useFormContext();\n const { name, control = methods.control, shouldUnregister } = props;\n const isArrayField = isNameInFieldArray(control._names.array, name);\n const value = useWatch({\n control,\n name,\n defaultValue: get(control._formValues, name, get(control._defaultValues, name, props.defaultValue)),\n exact: true,\n });\n const formState = useFormState({\n control,\n name,\n });\n const _registerProps = React.useRef(control.register(name, {\n ...props.rules,\n value,\n }));\n React.useEffect(() => {\n const _shouldUnregisterField = control._options.shouldUnregister || shouldUnregister;\n const updateMounted = (name, value) => {\n const field = get(control._fields, name);\n if (field) {\n field._f.mount = value;\n }\n };\n updateMounted(name, true);\n if (_shouldUnregisterField) {\n const value = cloneObject(get(control._options.defaultValues, name));\n set(control._defaultValues, name, value);\n if (isUndefined(get(control._formValues, name))) {\n set(control._formValues, name, value);\n }\n }\n return () => {\n (isArrayField\n ? _shouldUnregisterField && !control._state.action\n : _shouldUnregisterField)\n ? control.unregister(name)\n : updateMounted(name, false);\n };\n }, [name, control, isArrayField, shouldUnregister]);\n return {\n field: {\n name,\n value,\n onChange: React.useCallback((event) => _registerProps.current.onChange({\n target: {\n value: getEventValue(event),\n name: name,\n },\n type: EVENTS.CHANGE,\n }), [name]),\n onBlur: React.useCallback(() => _registerProps.current.onBlur({\n target: {\n value: get(control._formValues, name),\n name: name,\n },\n type: EVENTS.BLUR,\n }), [name, control]),\n ref: (elm) => {\n const field = get(control._fields, name);\n if (field && elm) {\n field._f.ref = {\n focus: () => elm.focus(),\n select: () => elm.select(),\n setCustomValidity: (message) => elm.setCustomValidity(message),\n reportValidity: () => elm.reportValidity(),\n };\n }\n },\n },\n formState,\n fieldState: Object.defineProperties({}, {\n invalid: {\n enumerable: true,\n get: () => !!get(formState.errors, name),\n },\n isDirty: {\n enumerable: true,\n get: () => !!get(formState.dirtyFields, name),\n },\n isTouched: {\n enumerable: true,\n get: () => !!get(formState.touchedFields, name),\n },\n error: {\n enumerable: true,\n get: () => get(formState.errors, name),\n },\n }),\n };\n}\n\n/**\n * Component based on `useController` hook to work with controlled component.\n *\n * @remarks\n * [API](https://react-hook-form.com/api/usecontroller/controller) • [Demo](https://codesandbox.io/s/react-hook-form-v6-controller-ts-jwyzw) • [Video](https://www.youtube.com/watch?v=N2UNk_UCVyA)\n *\n * @param props - the path name to the form field value, and validation rules.\n *\n * @returns provide field handler functions, field and form state.\n *\n * @example\n * ```tsx\n * function App() {\n * const { control } = useForm({\n * defaultValues: {\n * test: \"\"\n * }\n * });\n *\n * return (\n *
\n * (\n * <>\n * \n *

{formState.isSubmitted ? \"submitted\" : \"\"}

\n *

{fieldState.isTouched ? \"touched\" : \"\"}

\n * \n * )}\n * />\n * \n * );\n * }\n * ```\n */\nconst Controller = (props) => props.render(useController(props));\n\nvar appendErrors = (name, validateAllFieldCriteria, errors, type, message) => validateAllFieldCriteria\n ? {\n ...errors[name],\n types: {\n ...(errors[name] && errors[name].types ? errors[name].types : {}),\n [type]: message || true,\n },\n }\n : {};\n\nconst focusFieldBy = (fields, callback, fieldsNames) => {\n for (const key of fieldsNames || Object.keys(fields)) {\n const field = get(fields, key);\n if (field) {\n const { _f, ...currentField } = field;\n if (_f && callback(_f.name)) {\n if (_f.ref.focus) {\n _f.ref.focus();\n break;\n }\n else if (_f.refs && _f.refs[0].focus) {\n _f.refs[0].focus();\n break;\n }\n }\n else if (isObject(currentField)) {\n focusFieldBy(currentField, callback);\n }\n }\n }\n};\n\nvar generateId = () => {\n const d = typeof performance === 'undefined' ? Date.now() : performance.now() * 1000;\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = (Math.random() * 16 + d) % 16 | 0;\n return (c == 'x' ? r : (r & 0x3) | 0x8).toString(16);\n });\n};\n\nvar getFocusFieldName = (name, index, options = {}) => options.shouldFocus || isUndefined(options.shouldFocus)\n ? options.focusName ||\n `${name}.${isUndefined(options.focusIndex) ? index : options.focusIndex}.`\n : '';\n\nvar getValidationModes = (mode) => ({\n isOnSubmit: !mode || mode === VALIDATION_MODE.onSubmit,\n isOnBlur: mode === VALIDATION_MODE.onBlur,\n isOnChange: mode === VALIDATION_MODE.onChange,\n isOnAll: mode === VALIDATION_MODE.all,\n isOnTouch: mode === VALIDATION_MODE.onTouched,\n});\n\nvar isWatched = (name, _names, isBlurEvent) => !isBlurEvent &&\n (_names.watchAll ||\n _names.watch.has(name) ||\n [..._names.watch].some((watchName) => name.startsWith(watchName) &&\n /^\\.\\w+/.test(name.slice(watchName.length))));\n\nvar updateFieldArrayRootError = (errors, error, name) => {\n const fieldArrayErrors = compact(get(errors, name));\n set(fieldArrayErrors, 'root', error[name]);\n set(errors, name, fieldArrayErrors);\n return errors;\n};\n\nvar isBoolean = (value) => typeof value === 'boolean';\n\nvar isFileInput = (element) => element.type === 'file';\n\nvar isFunction = (value) => typeof value === 'function';\n\nvar isHTMLElement = (value) => {\n if (!isWeb) {\n return false;\n }\n const owner = value ? value.ownerDocument : 0;\n return (value instanceof\n (owner && owner.defaultView ? owner.defaultView.HTMLElement : HTMLElement));\n};\n\nvar isMessage = (value) => isString(value);\n\nvar isRadioInput = (element) => element.type === 'radio';\n\nvar isRegex = (value) => value instanceof RegExp;\n\nconst defaultResult = {\n value: false,\n isValid: false,\n};\nconst validResult = { value: true, isValid: true };\nvar getCheckboxValue = (options) => {\n if (Array.isArray(options)) {\n if (options.length > 1) {\n const values = options\n .filter((option) => option && option.checked && !option.disabled)\n .map((option) => option.value);\n return { value: values, isValid: !!values.length };\n }\n return options[0].checked && !options[0].disabled\n ? // @ts-expect-error expected to work in the browser\n options[0].attributes && !isUndefined(options[0].attributes.value)\n ? isUndefined(options[0].value) || options[0].value === ''\n ? validResult\n : { value: options[0].value, isValid: true }\n : validResult\n : defaultResult;\n }\n return defaultResult;\n};\n\nconst defaultReturn = {\n isValid: false,\n value: null,\n};\nvar getRadioValue = (options) => Array.isArray(options)\n ? options.reduce((previous, option) => option && option.checked && !option.disabled\n ? {\n isValid: true,\n value: option.value,\n }\n : previous, defaultReturn)\n : defaultReturn;\n\nfunction getValidateError(result, ref, type = 'validate') {\n if (isMessage(result) ||\n (Array.isArray(result) && result.every(isMessage)) ||\n (isBoolean(result) && !result)) {\n return {\n type,\n message: isMessage(result) ? result : '',\n ref,\n };\n }\n}\n\nvar getValueAndMessage = (validationData) => isObject(validationData) && !isRegex(validationData)\n ? validationData\n : {\n value: validationData,\n message: '',\n };\n\nvar validateField = async (field, formValues, validateAllFieldCriteria, shouldUseNativeValidation, isFieldArray) => {\n const { ref, refs, required, maxLength, minLength, min, max, pattern, validate, name, valueAsNumber, mount, disabled, } = field._f;\n const inputValue = get(formValues, name);\n if (!mount || disabled) {\n return {};\n }\n const inputRef = refs ? refs[0] : ref;\n const setCustomValidity = (message) => {\n if (shouldUseNativeValidation && inputRef.reportValidity) {\n inputRef.setCustomValidity(isBoolean(message) ? '' : message || '');\n inputRef.reportValidity();\n }\n };\n const error = {};\n const isRadio = isRadioInput(ref);\n const isCheckBox = isCheckBoxInput(ref);\n const isRadioOrCheckbox = isRadio || isCheckBox;\n const isEmpty = ((valueAsNumber || isFileInput(ref)) &&\n isUndefined(ref.value) &&\n isUndefined(inputValue)) ||\n (isHTMLElement(ref) && ref.value === '') ||\n inputValue === '' ||\n (Array.isArray(inputValue) && !inputValue.length);\n const appendErrorsCurry = appendErrors.bind(null, name, validateAllFieldCriteria, error);\n const getMinMaxMessage = (exceedMax, maxLengthMessage, minLengthMessage, maxType = INPUT_VALIDATION_RULES.maxLength, minType = INPUT_VALIDATION_RULES.minLength) => {\n const message = exceedMax ? maxLengthMessage : minLengthMessage;\n error[name] = {\n type: exceedMax ? maxType : minType,\n message,\n ref,\n ...appendErrorsCurry(exceedMax ? maxType : minType, message),\n };\n };\n if (isFieldArray\n ? !Array.isArray(inputValue) || !inputValue.length\n : required &&\n ((!isRadioOrCheckbox && (isEmpty || isNullOrUndefined(inputValue))) ||\n (isBoolean(inputValue) && !inputValue) ||\n (isCheckBox && !getCheckboxValue(refs).isValid) ||\n (isRadio && !getRadioValue(refs).isValid))) {\n const { value, message } = isMessage(required)\n ? { value: !!required, message: required }\n : getValueAndMessage(required);\n if (value) {\n error[name] = {\n type: INPUT_VALIDATION_RULES.required,\n message,\n ref: inputRef,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.required, message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(message);\n return error;\n }\n }\n }\n if (!isEmpty && (!isNullOrUndefined(min) || !isNullOrUndefined(max))) {\n let exceedMax;\n let exceedMin;\n const maxOutput = getValueAndMessage(max);\n const minOutput = getValueAndMessage(min);\n if (!isNullOrUndefined(inputValue) && !isNaN(inputValue)) {\n const valueNumber = ref.valueAsNumber ||\n (inputValue ? +inputValue : inputValue);\n if (!isNullOrUndefined(maxOutput.value)) {\n exceedMax = valueNumber > maxOutput.value;\n }\n if (!isNullOrUndefined(minOutput.value)) {\n exceedMin = valueNumber < minOutput.value;\n }\n }\n else {\n const valueDate = ref.valueAsDate || new Date(inputValue);\n const convertTimeToDate = (time) => new Date(new Date().toDateString() + ' ' + time);\n const isTime = ref.type == 'time';\n const isWeek = ref.type == 'week';\n if (isString(maxOutput.value) && inputValue) {\n exceedMax = isTime\n ? convertTimeToDate(inputValue) > convertTimeToDate(maxOutput.value)\n : isWeek\n ? inputValue > maxOutput.value\n : valueDate > new Date(maxOutput.value);\n }\n if (isString(minOutput.value) && inputValue) {\n exceedMin = isTime\n ? convertTimeToDate(inputValue) < convertTimeToDate(minOutput.value)\n : isWeek\n ? inputValue < minOutput.value\n : valueDate < new Date(minOutput.value);\n }\n }\n if (exceedMax || exceedMin) {\n getMinMaxMessage(!!exceedMax, maxOutput.message, minOutput.message, INPUT_VALIDATION_RULES.max, INPUT_VALIDATION_RULES.min);\n if (!validateAllFieldCriteria) {\n setCustomValidity(error[name].message);\n return error;\n }\n }\n }\n if ((maxLength || minLength) &&\n !isEmpty &&\n (isString(inputValue) || (isFieldArray && Array.isArray(inputValue)))) {\n const maxLengthOutput = getValueAndMessage(maxLength);\n const minLengthOutput = getValueAndMessage(minLength);\n const exceedMax = !isNullOrUndefined(maxLengthOutput.value) &&\n inputValue.length > +maxLengthOutput.value;\n const exceedMin = !isNullOrUndefined(minLengthOutput.value) &&\n inputValue.length < +minLengthOutput.value;\n if (exceedMax || exceedMin) {\n getMinMaxMessage(exceedMax, maxLengthOutput.message, minLengthOutput.message);\n if (!validateAllFieldCriteria) {\n setCustomValidity(error[name].message);\n return error;\n }\n }\n }\n if (pattern && !isEmpty && isString(inputValue)) {\n const { value: patternValue, message } = getValueAndMessage(pattern);\n if (isRegex(patternValue) && !inputValue.match(patternValue)) {\n error[name] = {\n type: INPUT_VALIDATION_RULES.pattern,\n message,\n ref,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.pattern, message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(message);\n return error;\n }\n }\n }\n if (validate) {\n if (isFunction(validate)) {\n const result = await validate(inputValue, formValues);\n const validateError = getValidateError(result, inputRef);\n if (validateError) {\n error[name] = {\n ...validateError,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.validate, validateError.message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(validateError.message);\n return error;\n }\n }\n }\n else if (isObject(validate)) {\n let validationResult = {};\n for (const key in validate) {\n if (!isEmptyObject(validationResult) && !validateAllFieldCriteria) {\n break;\n }\n const validateError = getValidateError(await validate[key](inputValue, formValues), inputRef, key);\n if (validateError) {\n validationResult = {\n ...validateError,\n ...appendErrorsCurry(key, validateError.message),\n };\n setCustomValidity(validateError.message);\n if (validateAllFieldCriteria) {\n error[name] = validationResult;\n }\n }\n }\n if (!isEmptyObject(validationResult)) {\n error[name] = {\n ref: inputRef,\n ...validationResult,\n };\n if (!validateAllFieldCriteria) {\n return error;\n }\n }\n }\n }\n setCustomValidity(true);\n return error;\n};\n\nfunction append(data, value) {\n return [...data, ...convertToArrayPayload(value)];\n}\n\nvar fillEmptyArray = (value) => Array.isArray(value) ? value.map(() => undefined) : undefined;\n\nfunction insert(data, index, value) {\n return [\n ...data.slice(0, index),\n ...convertToArrayPayload(value),\n ...data.slice(index),\n ];\n}\n\nvar moveArrayAt = (data, from, to) => {\n if (!Array.isArray(data)) {\n return [];\n }\n if (isUndefined(data[to])) {\n data[to] = undefined;\n }\n data.splice(to, 0, data.splice(from, 1)[0]);\n return data;\n};\n\nfunction prepend(data, value) {\n return [...convertToArrayPayload(value), ...convertToArrayPayload(data)];\n}\n\nfunction removeAtIndexes(data, indexes) {\n let i = 0;\n const temp = [...data];\n for (const index of indexes) {\n temp.splice(index - i, 1);\n i++;\n }\n return compact(temp).length ? temp : [];\n}\nvar removeArrayAt = (data, index) => isUndefined(index)\n ? []\n : removeAtIndexes(data, convertToArrayPayload(index).sort((a, b) => a - b));\n\nvar swapArrayAt = (data, indexA, indexB) => {\n data[indexA] = [data[indexB], (data[indexB] = data[indexA])][0];\n};\n\nfunction baseGet(object, updatePath) {\n const length = updatePath.slice(0, -1).length;\n let index = 0;\n while (index < length) {\n object = isUndefined(object) ? index++ : object[updatePath[index++]];\n }\n return object;\n}\nfunction isEmptyArray(obj) {\n for (const key in obj) {\n if (!isUndefined(obj[key])) {\n return false;\n }\n }\n return true;\n}\nfunction unset(object, path) {\n const paths = Array.isArray(path)\n ? path\n : isKey(path)\n ? [path]\n : stringToPath(path);\n const childObject = paths.length === 1 ? object : baseGet(object, paths);\n const index = paths.length - 1;\n const key = paths[index];\n if (childObject) {\n delete childObject[key];\n }\n if (index !== 0 &&\n ((isObject(childObject) && isEmptyObject(childObject)) ||\n (Array.isArray(childObject) && isEmptyArray(childObject)))) {\n unset(object, paths.slice(0, -1));\n }\n return object;\n}\n\nvar updateAt = (fieldValues, index, value) => {\n fieldValues[index] = value;\n return fieldValues;\n};\n\n/**\n * A custom hook that exposes convenient methods to perform operations with a list of dynamic inputs that need to be appended, updated, removed etc. • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn) • [Video](https://youtu.be/4MrbfGSFY2A)\n *\n * @remarks\n * [API](https://react-hook-form.com/api/usefieldarray) • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn)\n *\n * @param props - useFieldArray props\n *\n * @returns methods - functions to manipulate with the Field Arrays (dynamic inputs) {@link UseFieldArrayReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, control, handleSubmit, reset, trigger, setError } = useForm({\n * defaultValues: {\n * test: []\n * }\n * });\n * const { fields, append } = useFieldArray({\n * control,\n * name: \"test\"\n * });\n *\n * return (\n *
console.log(data))}>\n * {fields.map((item, index) => (\n * \n * ))}\n * \n * \n *
\n * );\n * }\n * ```\n */\nfunction useFieldArray(props) {\n const methods = useFormContext();\n const { control = methods.control, name, keyName = 'id', shouldUnregister, } = props;\n const [fields, setFields] = React.useState(control._getFieldArray(name));\n const ids = React.useRef(control._getFieldArray(name).map(generateId));\n const _fieldIds = React.useRef(fields);\n const _name = React.useRef(name);\n const _actioned = React.useRef(false);\n _name.current = name;\n _fieldIds.current = fields;\n control._names.array.add(name);\n props.rules &&\n control.register(name, props.rules);\n useSubscribe({\n next: ({ values, name: fieldArrayName, }) => {\n if (fieldArrayName === _name.current || !fieldArrayName) {\n const fieldValues = get(values, _name.current);\n if (Array.isArray(fieldValues)) {\n setFields(fieldValues);\n ids.current = fieldValues.map(generateId);\n }\n }\n },\n subject: control._subjects.array,\n });\n const updateValues = React.useCallback((updatedFieldArrayValues) => {\n _actioned.current = true;\n control._updateFieldArray(name, updatedFieldArrayValues);\n }, [control, name]);\n const append$1 = (value, options) => {\n const appendValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = append(control._getFieldArray(name), appendValue);\n control._names.focus = getFocusFieldName(name, updatedFieldArrayValues.length - 1, options);\n ids.current = append(ids.current, appendValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, append, {\n argA: fillEmptyArray(value),\n });\n };\n const prepend$1 = (value, options) => {\n const prependValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = prepend(control._getFieldArray(name), prependValue);\n control._names.focus = getFocusFieldName(name, 0, options);\n ids.current = prepend(ids.current, prependValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, prepend, {\n argA: fillEmptyArray(value),\n });\n };\n const remove = (index) => {\n const updatedFieldArrayValues = removeArrayAt(control._getFieldArray(name), index);\n ids.current = removeArrayAt(ids.current, index);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, removeArrayAt, {\n argA: index,\n });\n };\n const insert$1 = (index, value, options) => {\n const insertValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = insert(control._getFieldArray(name), index, insertValue);\n control._names.focus = getFocusFieldName(name, index, options);\n ids.current = insert(ids.current, index, insertValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, insert, {\n argA: index,\n argB: fillEmptyArray(value),\n });\n };\n const swap = (indexA, indexB) => {\n const updatedFieldArrayValues = control._getFieldArray(name);\n swapArrayAt(updatedFieldArrayValues, indexA, indexB);\n swapArrayAt(ids.current, indexA, indexB);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, swapArrayAt, {\n argA: indexA,\n argB: indexB,\n }, false);\n };\n const move = (from, to) => {\n const updatedFieldArrayValues = control._getFieldArray(name);\n moveArrayAt(updatedFieldArrayValues, from, to);\n moveArrayAt(ids.current, from, to);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, moveArrayAt, {\n argA: from,\n argB: to,\n }, false);\n };\n const update = (index, value) => {\n const updateValue = cloneObject(value);\n const updatedFieldArrayValues = updateAt(control._getFieldArray(name), index, updateValue);\n ids.current = [...updatedFieldArrayValues].map((item, i) => !item || i === index ? generateId() : ids.current[i]);\n updateValues(updatedFieldArrayValues);\n setFields([...updatedFieldArrayValues]);\n control._updateFieldArray(name, updatedFieldArrayValues, updateAt, {\n argA: index,\n argB: updateValue,\n }, true, false);\n };\n const replace = (value) => {\n const updatedFieldArrayValues = convertToArrayPayload(cloneObject(value));\n ids.current = updatedFieldArrayValues.map(generateId);\n updateValues([...updatedFieldArrayValues]);\n setFields([...updatedFieldArrayValues]);\n control._updateFieldArray(name, [...updatedFieldArrayValues], (data) => data, {}, true, false);\n };\n React.useEffect(() => {\n control._state.action = false;\n isWatched(name, control._names) &&\n control._subjects.state.next({\n ...control._formState,\n });\n if (_actioned.current &&\n (!getValidationModes(control._options.mode).isOnSubmit ||\n control._formState.isSubmitted)) {\n if (control._options.resolver) {\n control._executeSchema([name]).then((result) => {\n const error = get(result.errors, name);\n const existingError = get(control._formState.errors, name);\n if (existingError ? !error && existingError.type : error && error.type) {\n error\n ? set(control._formState.errors, name, error)\n : unset(control._formState.errors, name);\n control._subjects.state.next({\n errors: control._formState.errors,\n });\n }\n });\n }\n else {\n const field = get(control._fields, name);\n if (field && field._f) {\n validateField(field, control._formValues, control._options.criteriaMode === VALIDATION_MODE.all, control._options.shouldUseNativeValidation, true).then((error) => !isEmptyObject(error) &&\n control._subjects.state.next({\n errors: updateFieldArrayRootError(control._formState.errors, error, name),\n }));\n }\n }\n }\n control._subjects.values.next({\n name,\n values: { ...control._formValues },\n });\n control._names.focus &&\n focusFieldBy(control._fields, (key) => !!key && key.startsWith(control._names.focus || ''));\n control._names.focus = '';\n control._updateValid();\n }, [fields, name, control]);\n React.useEffect(() => {\n !get(control._formValues, name) && control._updateFieldArray(name);\n return () => {\n (control._options.shouldUnregister || shouldUnregister) &&\n control.unregister(name);\n };\n }, [name, control, keyName, shouldUnregister]);\n return {\n swap: React.useCallback(swap, [updateValues, name, control]),\n move: React.useCallback(move, [updateValues, name, control]),\n prepend: React.useCallback(prepend$1, [updateValues, name, control]),\n append: React.useCallback(append$1, [updateValues, name, control]),\n remove: React.useCallback(remove, [updateValues, name, control]),\n insert: React.useCallback(insert$1, [updateValues, name, control]),\n update: React.useCallback(update, [updateValues, name, control]),\n replace: React.useCallback(replace, [updateValues, name, control]),\n fields: React.useMemo(() => fields.map((field, index) => ({\n ...field,\n [keyName]: ids.current[index] || generateId(),\n })), [fields, keyName]),\n };\n}\n\nfunction createSubject() {\n let _observers = [];\n const next = (value) => {\n for (const observer of _observers) {\n observer.next && observer.next(value);\n }\n };\n const subscribe = (observer) => {\n _observers.push(observer);\n return {\n unsubscribe: () => {\n _observers = _observers.filter((o) => o !== observer);\n },\n };\n };\n const unsubscribe = () => {\n _observers = [];\n };\n return {\n get observers() {\n return _observers;\n },\n next,\n subscribe,\n unsubscribe,\n };\n}\n\nvar isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);\n\nfunction deepEqual(object1, object2) {\n if (isPrimitive(object1) || isPrimitive(object2)) {\n return object1 === object2;\n }\n if (isDateObject(object1) && isDateObject(object2)) {\n return object1.getTime() === object2.getTime();\n }\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n if (keys1.length !== keys2.length) {\n return false;\n }\n for (const key of keys1) {\n const val1 = object1[key];\n if (!keys2.includes(key)) {\n return false;\n }\n if (key !== 'ref') {\n const val2 = object2[key];\n if ((isDateObject(val1) && isDateObject(val2)) ||\n (isObject(val1) && isObject(val2)) ||\n (Array.isArray(val1) && Array.isArray(val2))\n ? !deepEqual(val1, val2)\n : val1 !== val2) {\n return false;\n }\n }\n }\n return true;\n}\n\nvar isMultipleSelect = (element) => element.type === `select-multiple`;\n\nvar isRadioOrCheckbox = (ref) => isRadioInput(ref) || isCheckBoxInput(ref);\n\nvar live = (ref) => isHTMLElement(ref) && ref.isConnected;\n\nvar objectHasFunction = (data) => {\n for (const key in data) {\n if (isFunction(data[key])) {\n return true;\n }\n }\n return false;\n};\n\nfunction markFieldsDirty(data, fields = {}) {\n const isParentNodeArray = Array.isArray(data);\n if (isObject(data) || isParentNodeArray) {\n for (const key in data) {\n if (Array.isArray(data[key]) ||\n (isObject(data[key]) && !objectHasFunction(data[key]))) {\n fields[key] = Array.isArray(data[key]) ? [] : {};\n markFieldsDirty(data[key], fields[key]);\n }\n else if (!isNullOrUndefined(data[key])) {\n fields[key] = true;\n }\n }\n }\n return fields;\n}\nfunction getDirtyFieldsFromDefaultValues(data, formValues, dirtyFieldsFromValues) {\n const isParentNodeArray = Array.isArray(data);\n if (isObject(data) || isParentNodeArray) {\n for (const key in data) {\n if (Array.isArray(data[key]) ||\n (isObject(data[key]) && !objectHasFunction(data[key]))) {\n if (isUndefined(formValues) ||\n isPrimitive(dirtyFieldsFromValues[key])) {\n dirtyFieldsFromValues[key] = Array.isArray(data[key])\n ? markFieldsDirty(data[key], [])\n : { ...markFieldsDirty(data[key]) };\n }\n else {\n getDirtyFieldsFromDefaultValues(data[key], isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);\n }\n }\n else {\n dirtyFieldsFromValues[key] = !deepEqual(data[key], formValues[key]);\n }\n }\n }\n return dirtyFieldsFromValues;\n}\nvar getDirtyFields = (defaultValues, formValues) => getDirtyFieldsFromDefaultValues(defaultValues, formValues, markFieldsDirty(formValues));\n\nvar getFieldValueAs = (value, { valueAsNumber, valueAsDate, setValueAs }) => isUndefined(value)\n ? value\n : valueAsNumber\n ? value === ''\n ? NaN\n : value\n ? +value\n : value\n : valueAsDate && isString(value)\n ? new Date(value)\n : setValueAs\n ? setValueAs(value)\n : value;\n\nfunction getFieldValue(_f) {\n const ref = _f.ref;\n if (_f.refs ? _f.refs.every((ref) => ref.disabled) : ref.disabled) {\n return;\n }\n if (isFileInput(ref)) {\n return ref.files;\n }\n if (isRadioInput(ref)) {\n return getRadioValue(_f.refs).value;\n }\n if (isMultipleSelect(ref)) {\n return [...ref.selectedOptions].map(({ value }) => value);\n }\n if (isCheckBoxInput(ref)) {\n return getCheckboxValue(_f.refs).value;\n }\n return getFieldValueAs(isUndefined(ref.value) ? _f.ref.value : ref.value, _f);\n}\n\nvar getResolverOptions = (fieldsNames, _fields, criteriaMode, shouldUseNativeValidation) => {\n const fields = {};\n for (const name of fieldsNames) {\n const field = get(_fields, name);\n field && set(fields, name, field._f);\n }\n return {\n criteriaMode,\n names: [...fieldsNames],\n fields,\n shouldUseNativeValidation,\n };\n};\n\nvar getRuleValue = (rule) => isUndefined(rule)\n ? rule\n : isRegex(rule)\n ? rule.source\n : isObject(rule)\n ? isRegex(rule.value)\n ? rule.value.source\n : rule.value\n : rule;\n\nvar hasValidation = (options) => options.mount &&\n (options.required ||\n options.min ||\n options.max ||\n options.maxLength ||\n options.minLength ||\n options.pattern ||\n options.validate);\n\nfunction schemaErrorLookup(errors, _fields, name) {\n const error = get(errors, name);\n if (error || isKey(name)) {\n return {\n error,\n name,\n };\n }\n const names = name.split('.');\n while (names.length) {\n const fieldName = names.join('.');\n const field = get(_fields, fieldName);\n const foundError = get(errors, fieldName);\n if (field && !Array.isArray(field) && name !== fieldName) {\n return { name };\n }\n if (foundError && foundError.type) {\n return {\n name: fieldName,\n error: foundError,\n };\n }\n names.pop();\n }\n return {\n name,\n };\n}\n\nvar skipValidation = (isBlurEvent, isTouched, isSubmitted, reValidateMode, mode) => {\n if (mode.isOnAll) {\n return false;\n }\n else if (!isSubmitted && mode.isOnTouch) {\n return !(isTouched || isBlurEvent);\n }\n else if (isSubmitted ? reValidateMode.isOnBlur : mode.isOnBlur) {\n return !isBlurEvent;\n }\n else if (isSubmitted ? reValidateMode.isOnChange : mode.isOnChange) {\n return isBlurEvent;\n }\n return true;\n};\n\nvar unsetEmptyArray = (ref, name) => !compact(get(ref, name)).length && unset(ref, name);\n\nconst defaultOptions = {\n mode: VALIDATION_MODE.onSubmit,\n reValidateMode: VALIDATION_MODE.onChange,\n shouldFocusError: true,\n};\nfunction createFormControl(props = {}, flushRootRender) {\n let _options = {\n ...defaultOptions,\n ...props,\n };\n let _formState = {\n submitCount: 0,\n isDirty: false,\n isLoading: isFunction(_options.defaultValues),\n isValidating: false,\n isSubmitted: false,\n isSubmitting: false,\n isSubmitSuccessful: false,\n isValid: false,\n touchedFields: {},\n dirtyFields: {},\n errors: {},\n };\n let _fields = {};\n let _defaultValues = isObject(_options.defaultValues) || isObject(_options.values)\n ? cloneObject(_options.defaultValues || _options.values) || {}\n : {};\n let _formValues = _options.shouldUnregister\n ? {}\n : cloneObject(_defaultValues);\n let _state = {\n action: false,\n mount: false,\n watch: false,\n };\n let _names = {\n mount: new Set(),\n unMount: new Set(),\n array: new Set(),\n watch: new Set(),\n };\n let delayErrorCallback;\n let timer = 0;\n const _proxyFormState = {\n isDirty: false,\n dirtyFields: false,\n touchedFields: false,\n isValidating: false,\n isValid: false,\n errors: false,\n };\n const _subjects = {\n values: createSubject(),\n array: createSubject(),\n state: createSubject(),\n };\n const shouldCaptureDirtyFields = props.resetOptions && props.resetOptions.keepDirtyValues;\n const validationModeBeforeSubmit = getValidationModes(_options.mode);\n const validationModeAfterSubmit = getValidationModes(_options.reValidateMode);\n const shouldDisplayAllAssociatedErrors = _options.criteriaMode === VALIDATION_MODE.all;\n const debounce = (callback) => (wait) => {\n clearTimeout(timer);\n timer = setTimeout(callback, wait);\n };\n const _updateValid = async (shouldUpdateValid) => {\n if (_proxyFormState.isValid || shouldUpdateValid) {\n const isValid = _options.resolver\n ? isEmptyObject((await _executeSchema()).errors)\n : await executeBuiltInValidation(_fields, true);\n if (isValid !== _formState.isValid) {\n _subjects.state.next({\n isValid,\n });\n }\n }\n };\n const _updateIsValidating = (value) => _proxyFormState.isValidating &&\n _subjects.state.next({\n isValidating: value,\n });\n const _updateFieldArray = (name, values = [], method, args, shouldSetValues = true, shouldUpdateFieldsAndState = true) => {\n if (args && method) {\n _state.action = true;\n if (shouldUpdateFieldsAndState && Array.isArray(get(_fields, name))) {\n const fieldValues = method(get(_fields, name), args.argA, args.argB);\n shouldSetValues && set(_fields, name, fieldValues);\n }\n if (shouldUpdateFieldsAndState &&\n Array.isArray(get(_formState.errors, name))) {\n const errors = method(get(_formState.errors, name), args.argA, args.argB);\n shouldSetValues && set(_formState.errors, name, errors);\n unsetEmptyArray(_formState.errors, name);\n }\n if (_proxyFormState.touchedFields &&\n shouldUpdateFieldsAndState &&\n Array.isArray(get(_formState.touchedFields, name))) {\n const touchedFields = method(get(_formState.touchedFields, name), args.argA, args.argB);\n shouldSetValues && set(_formState.touchedFields, name, touchedFields);\n }\n if (_proxyFormState.dirtyFields) {\n _formState.dirtyFields = getDirtyFields(_defaultValues, _formValues);\n }\n _subjects.state.next({\n name,\n isDirty: _getDirty(name, values),\n dirtyFields: _formState.dirtyFields,\n errors: _formState.errors,\n isValid: _formState.isValid,\n });\n }\n else {\n set(_formValues, name, values);\n }\n };\n const updateErrors = (name, error) => {\n set(_formState.errors, name, error);\n _subjects.state.next({\n errors: _formState.errors,\n });\n };\n const updateValidAndValue = (name, shouldSkipSetValueAs, value, ref) => {\n const field = get(_fields, name);\n if (field) {\n const defaultValue = get(_formValues, name, isUndefined(value) ? get(_defaultValues, name) : value);\n isUndefined(defaultValue) ||\n (ref && ref.defaultChecked) ||\n shouldSkipSetValueAs\n ? set(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f))\n : setFieldValue(name, defaultValue);\n _state.mount && _updateValid();\n }\n };\n const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender) => {\n let shouldUpdateField = false;\n let isPreviousDirty = false;\n const output = {\n name,\n };\n if (!isBlurEvent || shouldDirty) {\n if (_proxyFormState.isDirty) {\n isPreviousDirty = _formState.isDirty;\n _formState.isDirty = output.isDirty = _getDirty();\n shouldUpdateField = isPreviousDirty !== output.isDirty;\n }\n const isCurrentFieldPristine = deepEqual(get(_defaultValues, name), fieldValue);\n isPreviousDirty = get(_formState.dirtyFields, name);\n isCurrentFieldPristine\n ? unset(_formState.dirtyFields, name)\n : set(_formState.dirtyFields, name, true);\n output.dirtyFields = _formState.dirtyFields;\n shouldUpdateField =\n shouldUpdateField ||\n (_proxyFormState.dirtyFields &&\n isPreviousDirty !== !isCurrentFieldPristine);\n }\n if (isBlurEvent) {\n const isPreviousFieldTouched = get(_formState.touchedFields, name);\n if (!isPreviousFieldTouched) {\n set(_formState.touchedFields, name, isBlurEvent);\n output.touchedFields = _formState.touchedFields;\n shouldUpdateField =\n shouldUpdateField ||\n (_proxyFormState.touchedFields &&\n isPreviousFieldTouched !== isBlurEvent);\n }\n }\n shouldUpdateField && shouldRender && _subjects.state.next(output);\n return shouldUpdateField ? output : {};\n };\n const shouldRenderByError = (name, isValid, error, fieldState) => {\n const previousFieldError = get(_formState.errors, name);\n const shouldUpdateValid = _proxyFormState.isValid &&\n isBoolean(isValid) &&\n _formState.isValid !== isValid;\n if (props.delayError && error) {\n delayErrorCallback = debounce(() => updateErrors(name, error));\n delayErrorCallback(props.delayError);\n }\n else {\n clearTimeout(timer);\n delayErrorCallback = null;\n error\n ? set(_formState.errors, name, error)\n : unset(_formState.errors, name);\n }\n if ((error ? !deepEqual(previousFieldError, error) : previousFieldError) ||\n !isEmptyObject(fieldState) ||\n shouldUpdateValid) {\n const updatedFormState = {\n ...fieldState,\n ...(shouldUpdateValid && isBoolean(isValid) ? { isValid } : {}),\n errors: _formState.errors,\n name,\n };\n _formState = {\n ..._formState,\n ...updatedFormState,\n };\n _subjects.state.next(updatedFormState);\n }\n _updateIsValidating(false);\n };\n const _executeSchema = async (name) => _options.resolver(_formValues, _options.context, getResolverOptions(name || _names.mount, _fields, _options.criteriaMode, _options.shouldUseNativeValidation));\n const executeSchemaAndUpdateState = async (names) => {\n const { errors } = await _executeSchema();\n if (names) {\n for (const name of names) {\n const error = get(errors, name);\n error\n ? set(_formState.errors, name, error)\n : unset(_formState.errors, name);\n }\n }\n else {\n _formState.errors = errors;\n }\n return errors;\n };\n const executeBuiltInValidation = async (fields, shouldOnlyCheckValid, context = {\n valid: true,\n }) => {\n for (const name in fields) {\n const field = fields[name];\n if (field) {\n const { _f, ...fieldValue } = field;\n if (_f) {\n const isFieldArrayRoot = _names.array.has(_f.name);\n const fieldError = await validateField(field, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation && !shouldOnlyCheckValid, isFieldArrayRoot);\n if (fieldError[_f.name]) {\n context.valid = false;\n if (shouldOnlyCheckValid) {\n break;\n }\n }\n !shouldOnlyCheckValid &&\n (get(fieldError, _f.name)\n ? isFieldArrayRoot\n ? updateFieldArrayRootError(_formState.errors, fieldError, _f.name)\n : set(_formState.errors, _f.name, fieldError[_f.name])\n : unset(_formState.errors, _f.name));\n }\n fieldValue &&\n (await executeBuiltInValidation(fieldValue, shouldOnlyCheckValid, context));\n }\n }\n return context.valid;\n };\n const _removeUnmounted = () => {\n for (const name of _names.unMount) {\n const field = get(_fields, name);\n field &&\n (field._f.refs\n ? field._f.refs.every((ref) => !live(ref))\n : !live(field._f.ref)) &&\n unregister(name);\n }\n _names.unMount = new Set();\n };\n const _getDirty = (name, data) => (name && data && set(_formValues, name, data),\n !deepEqual(getValues(), _defaultValues));\n const _getWatch = (names, defaultValue, isGlobal) => generateWatchOutput(names, _names, {\n ...(_state.mount\n ? _formValues\n : isUndefined(defaultValue)\n ? _defaultValues\n : isString(names)\n ? { [names]: defaultValue }\n : defaultValue),\n }, isGlobal, defaultValue);\n const _getFieldArray = (name) => compact(get(_state.mount ? _formValues : _defaultValues, name, props.shouldUnregister ? get(_defaultValues, name, []) : []));\n const setFieldValue = (name, value, options = {}) => {\n const field = get(_fields, name);\n let fieldValue = value;\n if (field) {\n const fieldReference = field._f;\n if (fieldReference) {\n !fieldReference.disabled &&\n set(_formValues, name, getFieldValueAs(value, fieldReference));\n fieldValue =\n isHTMLElement(fieldReference.ref) && isNullOrUndefined(value)\n ? ''\n : value;\n if (isMultipleSelect(fieldReference.ref)) {\n [...fieldReference.ref.options].forEach((optionRef) => (optionRef.selected = fieldValue.includes(optionRef.value)));\n }\n else if (fieldReference.refs) {\n if (isCheckBoxInput(fieldReference.ref)) {\n fieldReference.refs.length > 1\n ? fieldReference.refs.forEach((checkboxRef) => (!checkboxRef.defaultChecked || !checkboxRef.disabled) &&\n (checkboxRef.checked = Array.isArray(fieldValue)\n ? !!fieldValue.find((data) => data === checkboxRef.value)\n : fieldValue === checkboxRef.value))\n : fieldReference.refs[0] &&\n (fieldReference.refs[0].checked = !!fieldValue);\n }\n else {\n fieldReference.refs.forEach((radioRef) => (radioRef.checked = radioRef.value === fieldValue));\n }\n }\n else if (isFileInput(fieldReference.ref)) {\n fieldReference.ref.value = '';\n }\n else {\n fieldReference.ref.value = fieldValue;\n if (!fieldReference.ref.type) {\n _subjects.values.next({\n name,\n values: { ..._formValues },\n });\n }\n }\n }\n }\n (options.shouldDirty || options.shouldTouch) &&\n updateTouchAndDirty(name, fieldValue, options.shouldTouch, options.shouldDirty, true);\n options.shouldValidate && trigger(name);\n };\n const setValues = (name, value, options) => {\n for (const fieldKey in value) {\n const fieldValue = value[fieldKey];\n const fieldName = `${name}.${fieldKey}`;\n const field = get(_fields, fieldName);\n (_names.array.has(name) ||\n !isPrimitive(fieldValue) ||\n (field && !field._f)) &&\n !isDateObject(fieldValue)\n ? setValues(fieldName, fieldValue, options)\n : setFieldValue(fieldName, fieldValue, options);\n }\n };\n const setValue = (name, value, options = {}) => {\n const field = get(_fields, name);\n const isFieldArray = _names.array.has(name);\n const cloneValue = cloneObject(value);\n set(_formValues, name, cloneValue);\n if (isFieldArray) {\n _subjects.array.next({\n name,\n values: { ..._formValues },\n });\n if ((_proxyFormState.isDirty || _proxyFormState.dirtyFields) &&\n options.shouldDirty) {\n _subjects.state.next({\n name,\n dirtyFields: getDirtyFields(_defaultValues, _formValues),\n isDirty: _getDirty(name, cloneValue),\n });\n }\n }\n else {\n field && !field._f && !isNullOrUndefined(cloneValue)\n ? setValues(name, cloneValue, options)\n : setFieldValue(name, cloneValue, options);\n }\n isWatched(name, _names) && _subjects.state.next({ ..._formState });\n _subjects.values.next({\n name,\n values: { ..._formValues },\n });\n !_state.mount && flushRootRender();\n };\n const onChange = async (event) => {\n const target = event.target;\n let name = target.name;\n let isFieldValueUpdated = true;\n const field = get(_fields, name);\n const getCurrentFieldValue = () => target.type ? getFieldValue(field._f) : getEventValue(event);\n if (field) {\n let error;\n let isValid;\n const fieldValue = getCurrentFieldValue();\n const isBlurEvent = event.type === EVENTS.BLUR || event.type === EVENTS.FOCUS_OUT;\n const shouldSkipValidation = (!hasValidation(field._f) &&\n !_options.resolver &&\n !get(_formState.errors, name) &&\n !field._f.deps) ||\n skipValidation(isBlurEvent, get(_formState.touchedFields, name), _formState.isSubmitted, validationModeAfterSubmit, validationModeBeforeSubmit);\n const watched = isWatched(name, _names, isBlurEvent);\n set(_formValues, name, fieldValue);\n if (isBlurEvent) {\n field._f.onBlur && field._f.onBlur(event);\n delayErrorCallback && delayErrorCallback(0);\n }\n else if (field._f.onChange) {\n field._f.onChange(event);\n }\n const fieldState = updateTouchAndDirty(name, fieldValue, isBlurEvent, false);\n const shouldRender = !isEmptyObject(fieldState) || watched;\n !isBlurEvent &&\n _subjects.values.next({\n name,\n type: event.type,\n values: { ..._formValues },\n });\n if (shouldSkipValidation) {\n _proxyFormState.isValid && _updateValid();\n return (shouldRender &&\n _subjects.state.next({ name, ...(watched ? {} : fieldState) }));\n }\n !isBlurEvent && watched && _subjects.state.next({ ..._formState });\n _updateIsValidating(true);\n if (_options.resolver) {\n const { errors } = await _executeSchema([name]);\n const previousErrorLookupResult = schemaErrorLookup(_formState.errors, _fields, name);\n const errorLookupResult = schemaErrorLookup(errors, _fields, previousErrorLookupResult.name || name);\n error = errorLookupResult.error;\n name = errorLookupResult.name;\n isValid = isEmptyObject(errors);\n }\n else {\n error = (await validateField(field, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation))[name];\n isFieldValueUpdated =\n isNaN(fieldValue) ||\n fieldValue === get(_formValues, name, fieldValue);\n if (isFieldValueUpdated) {\n if (error) {\n isValid = false;\n }\n else if (_proxyFormState.isValid) {\n isValid = await executeBuiltInValidation(_fields, true);\n }\n }\n }\n if (isFieldValueUpdated) {\n field._f.deps &&\n trigger(field._f.deps);\n shouldRenderByError(name, isValid, error, fieldState);\n }\n }\n };\n const trigger = async (name, options = {}) => {\n let isValid;\n let validationResult;\n const fieldNames = convertToArrayPayload(name);\n _updateIsValidating(true);\n if (_options.resolver) {\n const errors = await executeSchemaAndUpdateState(isUndefined(name) ? name : fieldNames);\n isValid = isEmptyObject(errors);\n validationResult = name\n ? !fieldNames.some((name) => get(errors, name))\n : isValid;\n }\n else if (name) {\n validationResult = (await Promise.all(fieldNames.map(async (fieldName) => {\n const field = get(_fields, fieldName);\n return await executeBuiltInValidation(field && field._f ? { [fieldName]: field } : field);\n }))).every(Boolean);\n !(!validationResult && !_formState.isValid) && _updateValid();\n }\n else {\n validationResult = isValid = await executeBuiltInValidation(_fields);\n }\n _subjects.state.next({\n ...(!isString(name) ||\n (_proxyFormState.isValid && isValid !== _formState.isValid)\n ? {}\n : { name }),\n ...(_options.resolver || !name ? { isValid } : {}),\n errors: _formState.errors,\n isValidating: false,\n });\n options.shouldFocus &&\n !validationResult &&\n focusFieldBy(_fields, (key) => key && get(_formState.errors, key), name ? fieldNames : _names.mount);\n return validationResult;\n };\n const getValues = (fieldNames) => {\n const values = {\n ..._defaultValues,\n ...(_state.mount ? _formValues : {}),\n };\n return isUndefined(fieldNames)\n ? values\n : isString(fieldNames)\n ? get(values, fieldNames)\n : fieldNames.map((name) => get(values, name));\n };\n const getFieldState = (name, formState) => ({\n invalid: !!get((formState || _formState).errors, name),\n isDirty: !!get((formState || _formState).dirtyFields, name),\n isTouched: !!get((formState || _formState).touchedFields, name),\n error: get((formState || _formState).errors, name),\n });\n const clearErrors = (name) => {\n name &&\n convertToArrayPayload(name).forEach((inputName) => unset(_formState.errors, inputName));\n _subjects.state.next({\n errors: name ? _formState.errors : {},\n });\n };\n const setError = (name, error, options) => {\n const ref = (get(_fields, name, { _f: {} })._f || {}).ref;\n set(_formState.errors, name, {\n ...error,\n ref,\n });\n _subjects.state.next({\n name,\n errors: _formState.errors,\n isValid: false,\n });\n options && options.shouldFocus && ref && ref.focus && ref.focus();\n };\n const watch = (name, defaultValue) => isFunction(name)\n ? _subjects.values.subscribe({\n next: (payload) => name(_getWatch(undefined, defaultValue), payload),\n })\n : _getWatch(name, defaultValue, true);\n const unregister = (name, options = {}) => {\n for (const fieldName of name ? convertToArrayPayload(name) : _names.mount) {\n _names.mount.delete(fieldName);\n _names.array.delete(fieldName);\n if (!options.keepValue) {\n unset(_fields, fieldName);\n unset(_formValues, fieldName);\n }\n !options.keepError && unset(_formState.errors, fieldName);\n !options.keepDirty && unset(_formState.dirtyFields, fieldName);\n !options.keepTouched && unset(_formState.touchedFields, fieldName);\n !_options.shouldUnregister &&\n !options.keepDefaultValue &&\n unset(_defaultValues, fieldName);\n }\n _subjects.values.next({\n values: { ..._formValues },\n });\n _subjects.state.next({\n ..._formState,\n ...(!options.keepDirty ? {} : { isDirty: _getDirty() }),\n });\n !options.keepIsValid && _updateValid();\n };\n const register = (name, options = {}) => {\n let field = get(_fields, name);\n const disabledIsDefined = isBoolean(options.disabled);\n set(_fields, name, {\n ...(field || {}),\n _f: {\n ...(field && field._f ? field._f : { ref: { name } }),\n name,\n mount: true,\n ...options,\n },\n });\n _names.mount.add(name);\n field\n ? disabledIsDefined &&\n set(_formValues, name, options.disabled\n ? undefined\n : get(_formValues, name, getFieldValue(field._f)))\n : updateValidAndValue(name, true, options.value);\n return {\n ...(disabledIsDefined ? { disabled: options.disabled } : {}),\n ...(_options.shouldUseNativeValidation\n ? {\n required: !!options.required,\n min: getRuleValue(options.min),\n max: getRuleValue(options.max),\n minLength: getRuleValue(options.minLength),\n maxLength: getRuleValue(options.maxLength),\n pattern: getRuleValue(options.pattern),\n }\n : {}),\n name,\n onChange,\n onBlur: onChange,\n ref: (ref) => {\n if (ref) {\n register(name, options);\n field = get(_fields, name);\n const fieldRef = isUndefined(ref.value)\n ? ref.querySelectorAll\n ? ref.querySelectorAll('input,select,textarea')[0] || ref\n : ref\n : ref;\n const radioOrCheckbox = isRadioOrCheckbox(fieldRef);\n const refs = field._f.refs || [];\n if (radioOrCheckbox\n ? refs.find((option) => option === fieldRef)\n : fieldRef === field._f.ref) {\n return;\n }\n set(_fields, name, {\n _f: {\n ...field._f,\n ...(radioOrCheckbox\n ? {\n refs: [\n ...refs.filter(live),\n fieldRef,\n ...(Array.isArray(get(_defaultValues, name)) ? [{}] : []),\n ],\n ref: { type: fieldRef.type, name },\n }\n : { ref: fieldRef }),\n },\n });\n updateValidAndValue(name, false, undefined, fieldRef);\n }\n else {\n field = get(_fields, name, {});\n if (field._f) {\n field._f.mount = false;\n }\n (_options.shouldUnregister || options.shouldUnregister) &&\n !(isNameInFieldArray(_names.array, name) && _state.action) &&\n _names.unMount.add(name);\n }\n },\n };\n };\n const _focusError = () => _options.shouldFocusError &&\n focusFieldBy(_fields, (key) => key && get(_formState.errors, key), _names.mount);\n const handleSubmit = (onValid, onInvalid) => async (e) => {\n if (e) {\n e.preventDefault && e.preventDefault();\n e.persist && e.persist();\n }\n let fieldValues = cloneObject(_formValues);\n _subjects.state.next({\n isSubmitting: true,\n });\n if (_options.resolver) {\n const { errors, values } = await _executeSchema();\n _formState.errors = errors;\n fieldValues = values;\n }\n else {\n await executeBuiltInValidation(_fields);\n }\n unset(_formState.errors, 'root');\n if (isEmptyObject(_formState.errors)) {\n _subjects.state.next({\n errors: {},\n });\n await onValid(fieldValues, e);\n }\n else {\n if (onInvalid) {\n await onInvalid({ ..._formState.errors }, e);\n }\n _focusError();\n setTimeout(_focusError);\n }\n _subjects.state.next({\n isSubmitted: true,\n isSubmitting: false,\n isSubmitSuccessful: isEmptyObject(_formState.errors),\n submitCount: _formState.submitCount + 1,\n errors: _formState.errors,\n });\n };\n const resetField = (name, options = {}) => {\n if (get(_fields, name)) {\n if (isUndefined(options.defaultValue)) {\n setValue(name, get(_defaultValues, name));\n }\n else {\n setValue(name, options.defaultValue);\n set(_defaultValues, name, options.defaultValue);\n }\n if (!options.keepTouched) {\n unset(_formState.touchedFields, name);\n }\n if (!options.keepDirty) {\n unset(_formState.dirtyFields, name);\n _formState.isDirty = options.defaultValue\n ? _getDirty(name, get(_defaultValues, name))\n : _getDirty();\n }\n if (!options.keepError) {\n unset(_formState.errors, name);\n _proxyFormState.isValid && _updateValid();\n }\n _subjects.state.next({ ..._formState });\n }\n };\n const _reset = (formValues, keepStateOptions = {}) => {\n const updatedValues = formValues || _defaultValues;\n const cloneUpdatedValues = cloneObject(updatedValues);\n const values = formValues && !isEmptyObject(formValues)\n ? cloneUpdatedValues\n : _defaultValues;\n if (!keepStateOptions.keepDefaultValues) {\n _defaultValues = updatedValues;\n }\n if (!keepStateOptions.keepValues) {\n if (keepStateOptions.keepDirtyValues || shouldCaptureDirtyFields) {\n for (const fieldName of _names.mount) {\n get(_formState.dirtyFields, fieldName)\n ? set(values, fieldName, get(_formValues, fieldName))\n : setValue(fieldName, get(values, fieldName));\n }\n }\n else {\n if (isWeb && isUndefined(formValues)) {\n for (const name of _names.mount) {\n const field = get(_fields, name);\n if (field && field._f) {\n const fieldReference = Array.isArray(field._f.refs)\n ? field._f.refs[0]\n : field._f.ref;\n if (isHTMLElement(fieldReference)) {\n const form = fieldReference.closest('form');\n if (form) {\n form.reset();\n break;\n }\n }\n }\n }\n }\n _fields = {};\n }\n _formValues = props.shouldUnregister\n ? keepStateOptions.keepDefaultValues\n ? cloneObject(_defaultValues)\n : {}\n : cloneUpdatedValues;\n _subjects.array.next({\n values: { ...values },\n });\n _subjects.values.next({\n values: { ...values },\n });\n }\n _names = {\n mount: new Set(),\n unMount: new Set(),\n array: new Set(),\n watch: new Set(),\n watchAll: false,\n focus: '',\n };\n !_state.mount && flushRootRender();\n _state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid;\n _state.watch = !!props.shouldUnregister;\n _subjects.state.next({\n submitCount: keepStateOptions.keepSubmitCount\n ? _formState.submitCount\n : 0,\n isDirty: keepStateOptions.keepDirty\n ? _formState.isDirty\n : !!(keepStateOptions.keepDefaultValues &&\n !deepEqual(formValues, _defaultValues)),\n isSubmitted: keepStateOptions.keepIsSubmitted\n ? _formState.isSubmitted\n : false,\n dirtyFields: keepStateOptions.keepDirtyValues\n ? _formState.dirtyFields\n : keepStateOptions.keepDefaultValues && formValues\n ? getDirtyFields(_defaultValues, formValues)\n : {},\n touchedFields: keepStateOptions.keepTouched\n ? _formState.touchedFields\n : {},\n errors: keepStateOptions.keepErrors ? _formState.errors : {},\n isSubmitting: false,\n isSubmitSuccessful: false,\n });\n };\n const reset = (formValues, keepStateOptions) => _reset(isFunction(formValues)\n ? formValues(_formValues)\n : formValues, keepStateOptions);\n const setFocus = (name, options = {}) => {\n const field = get(_fields, name);\n const fieldReference = field && field._f;\n if (fieldReference) {\n const fieldRef = fieldReference.refs\n ? fieldReference.refs[0]\n : fieldReference.ref;\n if (fieldRef.focus) {\n fieldRef.focus();\n options.shouldSelect && fieldRef.select();\n }\n }\n };\n const _updateFormState = (updatedFormState) => {\n _formState = {\n ..._formState,\n ...updatedFormState,\n };\n };\n const _resetDefaultValues = () => isFunction(_options.defaultValues) &&\n _options.defaultValues().then((values) => {\n reset(values, _options.resetOptions);\n _subjects.state.next({\n isLoading: false,\n });\n });\n return {\n control: {\n register,\n unregister,\n getFieldState,\n _executeSchema,\n _getWatch,\n _getDirty,\n _updateValid,\n _removeUnmounted,\n _updateFieldArray,\n _getFieldArray,\n _reset,\n _resetDefaultValues,\n _updateFormState,\n _subjects,\n _proxyFormState,\n get _fields() {\n return _fields;\n },\n get _formValues() {\n return _formValues;\n },\n get _state() {\n return _state;\n },\n set _state(value) {\n _state = value;\n },\n get _defaultValues() {\n return _defaultValues;\n },\n get _names() {\n return _names;\n },\n set _names(value) {\n _names = value;\n },\n get _formState() {\n return _formState;\n },\n set _formState(value) {\n _formState = value;\n },\n get _options() {\n return _options;\n },\n set _options(value) {\n _options = {\n ..._options,\n ...value,\n };\n },\n },\n trigger,\n register,\n handleSubmit,\n watch,\n setValue,\n getValues,\n reset,\n resetField,\n clearErrors,\n unregister,\n setError,\n setFocus,\n getFieldState,\n };\n}\n\n/**\n * Custom hook to manage the entire form.\n *\n * @remarks\n * [API](https://react-hook-form.com/api/useform) • [Demo](https://codesandbox.io/s/react-hook-form-get-started-ts-5ksmm) • [Video](https://www.youtube.com/watch?v=RkXv4AXXC_4)\n *\n * @param props - form configuration and validation parameters.\n *\n * @returns methods - individual functions to manage the form state. {@link UseFormReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, handleSubmit, watch, formState: { errors } } = useForm();\n * const onSubmit = data => console.log(data);\n *\n * console.log(watch(\"example\"));\n *\n * return (\n *
\n * \n * \n * {errors.exampleRequired && This field is required}\n * \n *
\n * );\n * }\n * ```\n */\nfunction useForm(props = {}) {\n const _formControl = React.useRef();\n const [formState, updateFormState] = React.useState({\n isDirty: false,\n isValidating: false,\n isLoading: isFunction(props.defaultValues),\n isSubmitted: false,\n isSubmitting: false,\n isSubmitSuccessful: false,\n isValid: false,\n submitCount: 0,\n dirtyFields: {},\n touchedFields: {},\n errors: {},\n defaultValues: isFunction(props.defaultValues)\n ? undefined\n : props.defaultValues,\n });\n if (!_formControl.current) {\n _formControl.current = {\n ...createFormControl(props, () => updateFormState((formState) => ({ ...formState }))),\n formState,\n };\n }\n const control = _formControl.current.control;\n control._options = props;\n useSubscribe({\n subject: control._subjects.state,\n next: (value) => {\n if (shouldRenderFormState(value, control._proxyFormState, control._updateFormState, true)) {\n updateFormState({ ...control._formState });\n }\n },\n });\n React.useEffect(() => {\n if (props.values && !deepEqual(props.values, control._defaultValues)) {\n control._reset(props.values, control._options.resetOptions);\n }\n else {\n control._resetDefaultValues();\n }\n }, [props.values, control]);\n React.useEffect(() => {\n if (!control._state.mount) {\n control._updateValid();\n control._state.mount = true;\n }\n if (control._state.watch) {\n control._state.watch = false;\n control._subjects.state.next({ ...control._formState });\n }\n control._removeUnmounted();\n });\n _formControl.current.formState = getProxyFormState(formState, control);\n return _formControl.current;\n}\n\nexport { Controller, FormProvider, appendErrors, get, set, useController, useFieldArray, useForm, useFormContext, useFormState, useWatch };\n//# sourceMappingURL=index.esm.mjs.map\n","// src/index.ts\nimport { useMemo } from \"react\";\nfunction assignRef(ref, value) {\n if (ref == null)\n return;\n if (typeof ref === \"function\") {\n ref(value);\n return;\n }\n try {\n ref.current = value;\n } catch (error) {\n throw new Error(`Cannot assign value '${value}' to ref '${ref}'`);\n }\n}\nfunction mergeRefs(...refs) {\n return (node) => {\n refs.forEach((ref) => {\n assignRef(ref, node);\n });\n };\n}\nfunction useMergeRefs(...refs) {\n return useMemo(() => mergeRefs(...refs), refs);\n}\nexport {\n assignRef,\n mergeRefs,\n useMergeRefs\n};\n","// src/form-control.tsx\nimport { createContext } from \"@chakra-ui/react-context\";\nimport { mergeRefs } from \"@chakra-ui/react-use-merge-refs\";\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useMultiStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx, dataAttr } from \"@chakra-ui/shared-utils\";\nimport { useCallback, useId, useState } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar [FormControlStylesProvider, useFormControlStyles] = createContext({\n name: `FormControlStylesContext`,\n errorMessage: `useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" `\n});\nvar [FormControlProvider, useFormControlContext] = createContext({\n strict: false,\n name: \"FormControlContext\"\n});\nfunction useFormControlProvider(props) {\n const {\n id: idProp,\n isRequired,\n isInvalid,\n isDisabled,\n isReadOnly,\n ...htmlProps\n } = props;\n const uuid = useId();\n const id = idProp || `field-${uuid}`;\n const labelId = `${id}-label`;\n const feedbackId = `${id}-feedback`;\n const helpTextId = `${id}-helptext`;\n const [hasFeedbackText, setHasFeedbackText] = useState(false);\n const [hasHelpText, setHasHelpText] = useState(false);\n const [isFocused, setFocus] = useState(false);\n const getHelpTextProps = useCallback(\n (props2 = {}, forwardedRef = null) => ({\n id: helpTextId,\n ...props2,\n ref: mergeRefs(forwardedRef, (node) => {\n if (!node)\n return;\n setHasHelpText(true);\n })\n }),\n [helpTextId]\n );\n const getLabelProps = useCallback(\n (props2 = {}, forwardedRef = null) => ({\n ...props2,\n ref: forwardedRef,\n \"data-focus\": dataAttr(isFocused),\n \"data-disabled\": dataAttr(isDisabled),\n \"data-invalid\": dataAttr(isInvalid),\n \"data-readonly\": dataAttr(isReadOnly),\n id: props2.id !== void 0 ? props2.id : labelId,\n htmlFor: props2.htmlFor !== void 0 ? props2.htmlFor : id\n }),\n [id, isDisabled, isFocused, isInvalid, isReadOnly, labelId]\n );\n const getErrorMessageProps = useCallback(\n (props2 = {}, forwardedRef = null) => ({\n id: feedbackId,\n ...props2,\n ref: mergeRefs(forwardedRef, (node) => {\n if (!node)\n return;\n setHasFeedbackText(true);\n }),\n \"aria-live\": \"polite\"\n }),\n [feedbackId]\n );\n const getRootProps = useCallback(\n (props2 = {}, forwardedRef = null) => ({\n ...props2,\n ...htmlProps,\n ref: forwardedRef,\n role: \"group\"\n }),\n [htmlProps]\n );\n const getRequiredIndicatorProps = useCallback(\n (props2 = {}, forwardedRef = null) => ({\n ...props2,\n ref: forwardedRef,\n role: \"presentation\",\n \"aria-hidden\": true,\n children: props2.children || \"*\"\n }),\n []\n );\n return {\n isRequired: !!isRequired,\n isInvalid: !!isInvalid,\n isReadOnly: !!isReadOnly,\n isDisabled: !!isDisabled,\n isFocused: !!isFocused,\n onFocus: () => setFocus(true),\n onBlur: () => setFocus(false),\n hasFeedbackText,\n setHasFeedbackText,\n hasHelpText,\n setHasHelpText,\n id,\n labelId,\n feedbackId,\n helpTextId,\n htmlProps,\n getHelpTextProps,\n getErrorMessageProps,\n getRootProps,\n getLabelProps,\n getRequiredIndicatorProps\n };\n}\nvar FormControl = forwardRef(\n function FormControl2(props, ref) {\n const styles = useMultiStyleConfig(\"Form\", props);\n const ownProps = omitThemingProps(props);\n const {\n getRootProps,\n htmlProps: _,\n ...context\n } = useFormControlProvider(ownProps);\n const className = cx(\"chakra-form-control\", props.className);\n return /* @__PURE__ */ jsx(FormControlProvider, { value: context, children: /* @__PURE__ */ jsx(FormControlStylesProvider, { value: styles, children: /* @__PURE__ */ jsx(\n chakra.div,\n {\n ...getRootProps({}, ref),\n className,\n __css: styles[\"container\"]\n }\n ) }) });\n }\n);\nFormControl.displayName = \"FormControl\";\nvar FormHelperText = forwardRef(\n function FormHelperText2(props, ref) {\n const field = useFormControlContext();\n const styles = useFormControlStyles();\n const className = cx(\"chakra-form__helper-text\", props.className);\n return /* @__PURE__ */ jsx(\n chakra.div,\n {\n ...field == null ? void 0 : field.getHelpTextProps(props, ref),\n __css: styles.helperText,\n className\n }\n );\n }\n);\nFormHelperText.displayName = \"FormHelperText\";\n\nexport {\n useFormControlStyles,\n useFormControlContext,\n FormControl,\n FormHelperText\n};\n","import {\n useFormControlContext\n} from \"./chunk-6ZNYZUDD.mjs\";\n\n// src/form-error.tsx\nimport { Icon } from \"@chakra-ui/icon\";\nimport { createContext } from \"@chakra-ui/react-context\";\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useMultiStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { jsx } from \"react/jsx-runtime\";\nvar [FormErrorStylesProvider, useFormErrorStyles] = createContext({\n name: `FormErrorStylesContext`,\n errorMessage: `useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" `\n});\nvar FormErrorMessage = forwardRef(\n (props, ref) => {\n const styles = useMultiStyleConfig(\"FormError\", props);\n const ownProps = omitThemingProps(props);\n const field = useFormControlContext();\n if (!(field == null ? void 0 : field.isInvalid))\n return null;\n return /* @__PURE__ */ jsx(FormErrorStylesProvider, { value: styles, children: /* @__PURE__ */ jsx(\n chakra.div,\n {\n ...field == null ? void 0 : field.getErrorMessageProps(ownProps, ref),\n className: cx(\"chakra-form__error-message\", props.className),\n __css: {\n display: \"flex\",\n alignItems: \"center\",\n ...styles.text\n }\n }\n ) });\n }\n);\nFormErrorMessage.displayName = \"FormErrorMessage\";\nvar FormErrorIcon = forwardRef((props, ref) => {\n const styles = useFormErrorStyles();\n const field = useFormControlContext();\n if (!(field == null ? void 0 : field.isInvalid))\n return null;\n const _className = cx(\"chakra-form__error-icon\", props.className);\n return /* @__PURE__ */ jsx(\n Icon,\n {\n ref,\n \"aria-hidden\": true,\n ...props,\n __css: styles.icon,\n className: _className,\n children: /* @__PURE__ */ jsx(\n \"path\",\n {\n fill: \"currentColor\",\n d: \"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z\"\n }\n )\n }\n );\n});\nFormErrorIcon.displayName = \"FormErrorIcon\";\n\nexport {\n useFormErrorStyles,\n FormErrorMessage,\n FormErrorIcon\n};\n","// src/use-radio-group.ts\nimport { isObject } from \"@chakra-ui/shared-utils\";\nimport { mergeRefs } from \"@chakra-ui/react-use-merge-refs\";\nimport { useCallback, useRef, useState, useId } from \"react\";\nfunction isInputEvent(value) {\n return value && isObject(value) && isObject(value.target);\n}\nfunction useRadioGroup(props = {}) {\n const {\n onChange: onChangeProp,\n value: valueProp,\n defaultValue,\n name: nameProp,\n isDisabled,\n isFocusable,\n isNative,\n ...htmlProps\n } = props;\n const [valueState, setValue] = useState(defaultValue || \"\");\n const isControlled = typeof valueProp !== \"undefined\";\n const value = isControlled ? valueProp : valueState;\n const ref = useRef(null);\n const focus = useCallback(() => {\n const rootNode = ref.current;\n if (!rootNode)\n return;\n let query = `input:not(:disabled):checked`;\n const firstEnabledAndCheckedInput = rootNode.querySelector(\n query\n );\n if (firstEnabledAndCheckedInput) {\n firstEnabledAndCheckedInput.focus();\n return;\n }\n query = `input:not(:disabled)`;\n const firstEnabledInput = rootNode.querySelector(query);\n firstEnabledInput == null ? void 0 : firstEnabledInput.focus();\n }, []);\n const uuid = useId();\n const fallbackName = `radio-${uuid}`;\n const name = nameProp || fallbackName;\n const onChange = useCallback(\n (eventOrValue) => {\n const nextValue = isInputEvent(eventOrValue) ? eventOrValue.target.value : eventOrValue;\n if (!isControlled) {\n setValue(nextValue);\n }\n onChangeProp == null ? void 0 : onChangeProp(String(nextValue));\n },\n [onChangeProp, isControlled]\n );\n const getRootProps = useCallback(\n (props2 = {}, forwardedRef = null) => ({\n ...props2,\n ref: mergeRefs(forwardedRef, ref),\n role: \"radiogroup\"\n }),\n []\n );\n const getRadioProps = useCallback(\n (props2 = {}, ref2 = null) => {\n const checkedKey = isNative ? \"checked\" : \"isChecked\";\n return {\n ...props2,\n ref: ref2,\n name,\n [checkedKey]: value != null ? props2.value === value : void 0,\n onChange(event) {\n onChange(event);\n },\n \"data-radiogroup\": true\n };\n },\n [isNative, name, onChange, value]\n );\n return {\n getRootProps,\n getRadioProps,\n name,\n ref,\n focus,\n setValue,\n value,\n onChange,\n isDisabled,\n isFocusable,\n htmlProps\n };\n}\n\nexport {\n useRadioGroup\n};\n","import {\n useRadioGroup\n} from \"./chunk-ROBJ47HJ.mjs\";\n\n// src/radio-group.tsx\nimport {\n chakra,\n forwardRef\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { createContext } from \"@chakra-ui/react-context\";\nimport { useMemo } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar [RadioGroupProvider, useRadioGroupContext] = createContext({\n name: \"RadioGroupContext\",\n strict: false\n});\nvar RadioGroup = forwardRef((props, ref) => {\n const {\n colorScheme,\n size,\n variant,\n children,\n className,\n isDisabled,\n isFocusable,\n ...rest\n } = props;\n const { value, onChange, getRootProps, name, htmlProps } = useRadioGroup(rest);\n const group = useMemo(\n () => ({\n name,\n size,\n onChange,\n colorScheme,\n value,\n variant,\n isDisabled,\n isFocusable\n }),\n [\n name,\n size,\n onChange,\n colorScheme,\n value,\n variant,\n isDisabled,\n isFocusable\n ]\n );\n return /* @__PURE__ */ jsx(RadioGroupProvider, { value: group, children: /* @__PURE__ */ jsx(\n chakra.div,\n {\n ...getRootProps(htmlProps, ref),\n className: cx(\"chakra-radio-group\", className),\n children\n }\n ) });\n});\nRadioGroup.displayName = \"RadioGroup\";\n\nexport {\n useRadioGroupContext,\n RadioGroup\n};\n","// src/index.ts\nvar hasSetup = false;\nvar modality = null;\nvar hasEventBeforeFocus = false;\nvar hasBlurredWindowRecently = false;\nvar handlers = /* @__PURE__ */ new Set();\nfunction trigger(modality2, event) {\n handlers.forEach((handler) => handler(modality2, event));\n}\nvar isMac = typeof window !== \"undefined\" && window.navigator != null ? /^Mac/.test(window.navigator.platform) : false;\nfunction isValidKey(e) {\n return !(e.metaKey || !isMac && e.altKey || e.ctrlKey || e.key === \"Control\" || e.key === \"Shift\" || e.key === \"Meta\");\n}\nfunction onKeyboardEvent(event) {\n hasEventBeforeFocus = true;\n if (isValidKey(event)) {\n modality = \"keyboard\";\n trigger(\"keyboard\", event);\n }\n}\nfunction onPointerEvent(event) {\n modality = \"pointer\";\n if (event.type === \"mousedown\" || event.type === \"pointerdown\") {\n hasEventBeforeFocus = true;\n const target = event.composedPath ? event.composedPath()[0] : event.target;\n let matches = false;\n try {\n matches = target.matches(\":focus-visible\");\n } catch {\n }\n if (matches)\n return;\n trigger(\"pointer\", event);\n }\n}\nfunction isVirtualClick(event) {\n if (event.mozInputSource === 0 && event.isTrusted)\n return true;\n return event.detail === 0 && !event.pointerType;\n}\nfunction onClickEvent(e) {\n if (isVirtualClick(e)) {\n hasEventBeforeFocus = true;\n modality = \"virtual\";\n }\n}\nfunction onWindowFocus(event) {\n if (event.target === window || event.target === document) {\n return;\n }\n if (!hasEventBeforeFocus && !hasBlurredWindowRecently) {\n modality = \"virtual\";\n trigger(\"virtual\", event);\n }\n hasEventBeforeFocus = false;\n hasBlurredWindowRecently = false;\n}\nfunction onWindowBlur() {\n hasEventBeforeFocus = false;\n hasBlurredWindowRecently = true;\n}\nfunction isFocusVisible() {\n return modality !== \"pointer\";\n}\nfunction setupGlobalFocusEvents() {\n if (typeof window === \"undefined\" || hasSetup) {\n return;\n }\n const { focus } = HTMLElement.prototype;\n HTMLElement.prototype.focus = function focusElement(...args) {\n hasEventBeforeFocus = true;\n focus.apply(this, args);\n };\n document.addEventListener(\"keydown\", onKeyboardEvent, true);\n document.addEventListener(\"keyup\", onKeyboardEvent, true);\n document.addEventListener(\"click\", onClickEvent, true);\n window.addEventListener(\"focus\", onWindowFocus, true);\n window.addEventListener(\"blur\", onWindowBlur, false);\n if (typeof PointerEvent !== \"undefined\") {\n document.addEventListener(\"pointerdown\", onPointerEvent, true);\n document.addEventListener(\"pointermove\", onPointerEvent, true);\n document.addEventListener(\"pointerup\", onPointerEvent, true);\n } else {\n document.addEventListener(\"mousedown\", onPointerEvent, true);\n document.addEventListener(\"mousemove\", onPointerEvent, true);\n document.addEventListener(\"mouseup\", onPointerEvent, true);\n }\n hasSetup = true;\n}\nfunction trackFocusVisible(fn) {\n setupGlobalFocusEvents();\n fn(isFocusVisible());\n const handler = () => fn(isFocusVisible());\n handlers.add(handler);\n return () => {\n handlers.delete(handler);\n };\n}\nfunction trackInteractionModality(fn) {\n setupGlobalFocusEvents();\n fn(modality);\n const handler = () => fn(modality);\n handlers.add(handler);\n return () => {\n handlers.delete(handler);\n };\n}\nfunction setInteractionModality(value) {\n modality = value;\n trigger(value, null);\n}\nfunction getInteractionModality() {\n return modality;\n}\nexport {\n getInteractionModality,\n setInteractionModality,\n trackFocusVisible,\n trackInteractionModality\n};\n","import {\n useRadioGroupContext\n} from \"./chunk-QUJ23J4G.mjs\";\n\n// src/use-radio.ts\nimport { useFormControlContext } from \"@chakra-ui/form-control\";\nimport { ariaAttr, callAllHandlers, dataAttr } from \"@chakra-ui/shared-utils\";\n\n// ../visually-hidden/src/visually-hidden.style.ts\nvar visuallyHiddenStyle = {\n border: \"0\",\n clip: \"rect(0, 0, 0, 0)\",\n height: \"1px\",\n width: \"1px\",\n margin: \"-1px\",\n padding: \"0\",\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n position: \"absolute\"\n};\n\n// src/use-radio.ts\nimport { trackFocusVisible } from \"@zag-js/focus-visible\";\nimport { useCallback, useEffect, useState, useId } from \"react\";\nfunction useRadio(props = {}) {\n const {\n defaultChecked,\n isChecked: isCheckedProp,\n isFocusable,\n isDisabled: isDisabledProp,\n isReadOnly: isReadOnlyProp,\n isRequired: isRequiredProp,\n onChange,\n isInvalid: isInvalidProp,\n name,\n value,\n id: idProp,\n \"data-radiogroup\": dataRadioGroup,\n \"aria-describedby\": ariaDescribedBy,\n ...htmlProps\n } = props;\n const uuid = `radio-${useId()}`;\n const formControl = useFormControlContext();\n const group = useRadioGroupContext();\n const isWithinRadioGroup = !!group || !!dataRadioGroup;\n const isWithinFormControl = !!formControl;\n let id = isWithinFormControl && !isWithinRadioGroup ? formControl.id : uuid;\n id = idProp != null ? idProp : id;\n const isDisabled = isDisabledProp != null ? isDisabledProp : formControl == null ? void 0 : formControl.isDisabled;\n const isReadOnly = isReadOnlyProp != null ? isReadOnlyProp : formControl == null ? void 0 : formControl.isReadOnly;\n const isRequired = isRequiredProp != null ? isRequiredProp : formControl == null ? void 0 : formControl.isRequired;\n const isInvalid = isInvalidProp != null ? isInvalidProp : formControl == null ? void 0 : formControl.isInvalid;\n const [isFocusVisible, setIsFocusVisible] = useState(false);\n const [isFocused, setFocused] = useState(false);\n const [isHovered, setHovering] = useState(false);\n const [isActive, setActive] = useState(false);\n const [isCheckedState, setChecked] = useState(Boolean(defaultChecked));\n const isControlled = typeof isCheckedProp !== \"undefined\";\n const isChecked = isControlled ? isCheckedProp : isCheckedState;\n useEffect(() => {\n return trackFocusVisible(setIsFocusVisible);\n }, []);\n const handleChange = useCallback(\n (event) => {\n if (isReadOnly || isDisabled) {\n event.preventDefault();\n return;\n }\n if (!isControlled) {\n setChecked(event.target.checked);\n }\n onChange == null ? void 0 : onChange(event);\n },\n [isControlled, isDisabled, isReadOnly, onChange]\n );\n const onKeyDown = useCallback(\n (event) => {\n if (event.key === \" \") {\n setActive(true);\n }\n },\n [setActive]\n );\n const onKeyUp = useCallback(\n (event) => {\n if (event.key === \" \") {\n setActive(false);\n }\n },\n [setActive]\n );\n const getRadioProps = useCallback(\n (props2 = {}, ref = null) => ({\n ...props2,\n ref,\n \"data-active\": dataAttr(isActive),\n \"data-hover\": dataAttr(isHovered),\n \"data-disabled\": dataAttr(isDisabled),\n \"data-invalid\": dataAttr(isInvalid),\n \"data-checked\": dataAttr(isChecked),\n \"data-focus\": dataAttr(isFocused),\n \"data-focus-visible\": dataAttr(isFocused && isFocusVisible),\n \"data-readonly\": dataAttr(isReadOnly),\n \"aria-hidden\": true,\n onMouseDown: callAllHandlers(props2.onMouseDown, () => setActive(true)),\n onMouseUp: callAllHandlers(props2.onMouseUp, () => setActive(false)),\n onMouseEnter: callAllHandlers(\n props2.onMouseEnter,\n () => setHovering(true)\n ),\n onMouseLeave: callAllHandlers(\n props2.onMouseLeave,\n () => setHovering(false)\n )\n }),\n [\n isActive,\n isHovered,\n isDisabled,\n isInvalid,\n isChecked,\n isFocused,\n isReadOnly,\n isFocusVisible\n ]\n );\n const { onFocus, onBlur } = formControl != null ? formControl : {};\n const getInputProps = useCallback(\n (props2 = {}, ref = null) => {\n const trulyDisabled = isDisabled && !isFocusable;\n return {\n ...props2,\n id,\n ref,\n type: \"radio\",\n name,\n value,\n onChange: callAllHandlers(props2.onChange, handleChange),\n onBlur: callAllHandlers(\n onBlur,\n props2.onBlur,\n () => setFocused(false)\n ),\n onFocus: callAllHandlers(\n onFocus,\n props2.onFocus,\n () => setFocused(true)\n ),\n onKeyDown: callAllHandlers(props2.onKeyDown, onKeyDown),\n onKeyUp: callAllHandlers(props2.onKeyUp, onKeyUp),\n checked: isChecked,\n disabled: trulyDisabled,\n readOnly: isReadOnly,\n required: isRequired,\n \"aria-invalid\": ariaAttr(isInvalid),\n \"aria-disabled\": ariaAttr(trulyDisabled),\n \"aria-required\": ariaAttr(isRequired),\n \"data-readonly\": dataAttr(isReadOnly),\n \"aria-describedby\": ariaDescribedBy,\n style: visuallyHiddenStyle\n };\n },\n [\n isDisabled,\n isFocusable,\n id,\n name,\n value,\n handleChange,\n onBlur,\n onFocus,\n onKeyDown,\n onKeyUp,\n isChecked,\n isReadOnly,\n isRequired,\n isInvalid,\n ariaDescribedBy\n ]\n );\n const getLabelProps = (props2 = {}, ref = null) => ({\n ...props2,\n ref,\n onMouseDown: callAllHandlers(props2.onMouseDown, stopEvent),\n \"data-disabled\": dataAttr(isDisabled),\n \"data-checked\": dataAttr(isChecked),\n \"data-invalid\": dataAttr(isInvalid)\n });\n const getRootProps = (props2, ref = null) => ({\n ...props2,\n ref,\n \"data-disabled\": dataAttr(isDisabled),\n \"data-checked\": dataAttr(isChecked),\n \"data-invalid\": dataAttr(isInvalid)\n });\n const state = {\n isInvalid,\n isFocused,\n isChecked,\n isActive,\n isHovered,\n isDisabled,\n isReadOnly,\n isRequired\n };\n return {\n state,\n getCheckboxProps: getRadioProps,\n getRadioProps,\n getInputProps,\n getLabelProps,\n getRootProps,\n htmlProps\n };\n}\nfunction stopEvent(event) {\n event.preventDefault();\n event.stopPropagation();\n}\n\nexport {\n useRadio\n};\n","import {\n useRadio\n} from \"./chunk-5XCGGO7V.mjs\";\nimport {\n useRadioGroupContext\n} from \"./chunk-QUJ23J4G.mjs\";\n\n// src/radio.tsx\nimport {\n chakra,\n forwardRef,\n layoutPropNames,\n omitThemingProps,\n useMultiStyleConfig\n} from \"@chakra-ui/system\";\nimport { callAll } from \"@chakra-ui/shared-utils\";\n\n// ../../utilities/object-utils/src/index.ts\nfunction split(object, keys) {\n const picked = {};\n const omitted = {};\n for (const [key, value] of Object.entries(object)) {\n if (keys.includes(key))\n picked[key] = value;\n else\n omitted[key] = value;\n }\n return [picked, omitted];\n}\n\n// src/radio.tsx\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar Radio = forwardRef((props, ref) => {\n var _a;\n const group = useRadioGroupContext();\n const { onChange: onChangeProp, value: valueProp } = props;\n const styles = useMultiStyleConfig(\"Radio\", { ...group, ...props });\n const ownProps = omitThemingProps(props);\n const {\n spacing = \"0.5rem\",\n children,\n isDisabled = group == null ? void 0 : group.isDisabled,\n isFocusable = group == null ? void 0 : group.isFocusable,\n inputProps: htmlInputProps,\n ...rest\n } = ownProps;\n let isChecked = props.isChecked;\n if ((group == null ? void 0 : group.value) != null && valueProp != null) {\n isChecked = group.value === valueProp;\n }\n let onChange = onChangeProp;\n if ((group == null ? void 0 : group.onChange) && valueProp != null) {\n onChange = callAll(group.onChange, onChangeProp);\n }\n const name = (_a = props == null ? void 0 : props.name) != null ? _a : group == null ? void 0 : group.name;\n const {\n getInputProps,\n getCheckboxProps,\n getLabelProps,\n getRootProps,\n htmlProps\n } = useRadio({\n ...rest,\n isChecked,\n isFocusable,\n isDisabled,\n onChange,\n name\n });\n const [layoutProps, otherProps] = split(htmlProps, layoutPropNames);\n const checkboxProps = getCheckboxProps(otherProps);\n const inputProps = getInputProps(htmlInputProps, ref);\n const labelProps = getLabelProps();\n const rootProps = Object.assign({}, layoutProps, getRootProps());\n const rootStyles = {\n display: \"inline-flex\",\n alignItems: \"center\",\n verticalAlign: \"top\",\n cursor: \"pointer\",\n position: \"relative\",\n ...styles.container\n };\n const checkboxStyles = {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n flexShrink: 0,\n ...styles.control\n };\n const labelStyles = {\n userSelect: \"none\",\n marginStart: spacing,\n ...styles.label\n };\n return /* @__PURE__ */ jsxs(chakra.label, { className: \"chakra-radio\", ...rootProps, __css: rootStyles, children: [\n /* @__PURE__ */ jsx(\"input\", { className: \"chakra-radio__input\", ...inputProps }),\n /* @__PURE__ */ jsx(\n chakra.span,\n {\n className: \"chakra-radio__control\",\n ...checkboxProps,\n __css: checkboxStyles\n }\n ),\n children && /* @__PURE__ */ jsx(\n chakra.span,\n {\n className: \"chakra-radio__label\",\n ...labelProps,\n __css: labelStyles,\n children\n }\n )\n ] });\n});\nRadio.displayName = \"Radio\";\n\nexport {\n Radio\n};\n","import { FormControl, FormErrorMessage } from '@chakra-ui/form-control'\nimport { Stack } from '@chakra-ui/layout'\nimport { Radio, RadioGroup } from '@chakra-ui/radio'\nimport { ChakraProps, chakra, useMultiStyleConfig } from '@chakra-ui/system'\nimport { IQuestion } from '@vocdoni/sdk'\nimport { Controller, useFormContext } from 'react-hook-form'\nimport { Markdown } from '../layout'\nimport { useElection } from './Election'\n\ntype QuestionFieldProps = ChakraProps & {\n question: IQuestion\n}\n\nexport const QuestionField = ({ question, ...rest }: QuestionFieldProps) => {\n const styles = useMultiStyleConfig('Questions')\n const { isAbleToVote, trans } = useElection()\n const {\n formState: { errors },\n } = useFormContext()\n\n return (\n \n \n {question.title.default}\n {question.description && (\n \n {question.description.default}\n \n )}\n (\n \n \n {question.choices.map((choice, ck) => (\n \n {choice.title.default}\n \n ))}\n \n {errors[question.title.default]?.message as string}\n \n )}\n />\n \n \n )\n}\n\nQuestionField.displayName = 'Question'\n","import { Alert, AlertIcon } from '@chakra-ui/alert'\nimport { useMultiStyleConfig } from '@chakra-ui/system'\nimport { FieldValues, FormProvider, useForm } from 'react-hook-form'\nimport { useElection } from './Election'\nimport { QuestionField } from './QuestionField'\n\nexport const QuestionsForm = () => {\n const { election, signer, vote, voted, ConnectButton, error, loading, trans } = useElection()\n const fmethods = useForm()\n const styles = useMultiStyleConfig('Questions')\n const questions = election?.questions\n\n if (voted) {\n return (\n \n {trans('voted', 'You already voted. Your vote id is %id')?.replace('%id', voted)}\n \n )\n }\n\n if (!questions || (questions && !questions?.length)) {\n return (\n \n \n {trans('empty', 'Apparently this process has no questions 🤔')}\n \n )\n }\n\n const initialValues: any = questions.reduce(\n (prev, curr) => ({\n ...prev,\n [curr.title.default]: '',\n }),\n {}\n )\n\n const onSubmit = async (values: FieldValues) => await vote(values)\n\n return (\n \n
\n {questions.map((question, qk) => (\n \n ))}\n {error && (\n \n \n {error}\n \n )}\n \n
\n )\n}\n","// src/button-context.ts\nimport { createContext } from \"@chakra-ui/react-context\";\nvar [ButtonGroupProvider, useButtonGroup] = createContext({\n strict: false,\n name: \"ButtonGroupContext\"\n});\n\nexport {\n ButtonGroupProvider,\n useButtonGroup\n};\n","// src/use-button-type.tsx\nimport { useCallback, useState } from \"react\";\nfunction useButtonType(value) {\n const [isButton, setIsButton] = useState(!value);\n const refCallback = useCallback((node) => {\n if (!node)\n return;\n setIsButton(node.tagName === \"BUTTON\");\n }, []);\n const type = isButton ? \"button\" : void 0;\n return { ref: refCallback, type };\n}\n\nexport {\n useButtonType\n};\n","// src/button-icon.tsx\nimport { chakra } from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { cloneElement, isValidElement } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction ButtonIcon(props) {\n const { children, className, ...rest } = props;\n const _children = isValidElement(children) ? cloneElement(children, {\n \"aria-hidden\": true,\n focusable: false\n }) : children;\n const _className = cx(\"chakra-button__icon\", className);\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n display: \"inline-flex\",\n alignSelf: \"center\",\n flexShrink: 0,\n ...rest,\n className: _className,\n children: _children\n }\n );\n}\nButtonIcon.displayName = \"ButtonIcon\";\n\nexport {\n ButtonIcon\n};\n","// src/button-spinner.tsx\nimport { Spinner } from \"@chakra-ui/spinner\";\nimport { chakra } from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { useMemo } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction ButtonSpinner(props) {\n const {\n label,\n placement,\n spacing = \"0.5rem\",\n children = /* @__PURE__ */ jsx(Spinner, { color: \"currentColor\", width: \"1em\", height: \"1em\" }),\n className,\n __css,\n ...rest\n } = props;\n const _className = cx(\"chakra-button__spinner\", className);\n const marginProp = placement === \"start\" ? \"marginEnd\" : \"marginStart\";\n const spinnerStyles = useMemo(\n () => ({\n display: \"flex\",\n alignItems: \"center\",\n position: label ? \"relative\" : \"absolute\",\n [marginProp]: label ? spacing : 0,\n fontSize: \"1em\",\n lineHeight: \"normal\",\n ...__css\n }),\n [__css, label, marginProp, spacing]\n );\n return /* @__PURE__ */ jsx(chakra.div, { className: _className, ...rest, __css: spinnerStyles, children });\n}\nButtonSpinner.displayName = \"ButtonSpinner\";\n\nexport {\n ButtonSpinner\n};\n","import {\n useButtonType\n} from \"./chunk-FRFD4OXU.mjs\";\nimport {\n useButtonGroup\n} from \"./chunk-DGWZA2DU.mjs\";\nimport {\n ButtonIcon\n} from \"./chunk-HCASMTTF.mjs\";\nimport {\n ButtonSpinner\n} from \"./chunk-HNNHG6RU.mjs\";\n\n// src/button.tsx\nimport { useMergeRefs } from \"@chakra-ui/react-use-merge-refs\";\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx, dataAttr } from \"@chakra-ui/shared-utils\";\nimport { useMemo } from \"react\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar Button = forwardRef((props, ref) => {\n const group = useButtonGroup();\n const styles = useStyleConfig(\"Button\", { ...group, ...props });\n const {\n isDisabled = group == null ? void 0 : group.isDisabled,\n isLoading,\n isActive,\n children,\n leftIcon,\n rightIcon,\n loadingText,\n iconSpacing = \"0.5rem\",\n type,\n spinner,\n spinnerPlacement = \"start\",\n className,\n as,\n ...rest\n } = omitThemingProps(props);\n const buttonStyles = useMemo(() => {\n const _focus = { ...styles == null ? void 0 : styles[\"_focus\"], zIndex: 1 };\n return {\n display: \"inline-flex\",\n appearance: \"none\",\n alignItems: \"center\",\n justifyContent: \"center\",\n userSelect: \"none\",\n position: \"relative\",\n whiteSpace: \"nowrap\",\n verticalAlign: \"middle\",\n outline: \"none\",\n ...styles,\n ...!!group && { _focus }\n };\n }, [styles, group]);\n const { ref: _ref, type: defaultType } = useButtonType(as);\n const contentProps = { rightIcon, leftIcon, iconSpacing, children };\n return /* @__PURE__ */ jsxs(\n chakra.button,\n {\n ref: useMergeRefs(ref, _ref),\n as,\n type: type != null ? type : defaultType,\n \"data-active\": dataAttr(isActive),\n \"data-loading\": dataAttr(isLoading),\n __css: buttonStyles,\n className: cx(\"chakra-button\", className),\n ...rest,\n disabled: isDisabled || isLoading,\n children: [\n isLoading && spinnerPlacement === \"start\" && /* @__PURE__ */ jsx(\n ButtonSpinner,\n {\n className: \"chakra-button__spinner--start\",\n label: loadingText,\n placement: \"start\",\n spacing: iconSpacing,\n children: spinner\n }\n ),\n isLoading ? loadingText || /* @__PURE__ */ jsx(chakra.span, { opacity: 0, children: /* @__PURE__ */ jsx(ButtonContent, { ...contentProps }) }) : /* @__PURE__ */ jsx(ButtonContent, { ...contentProps }),\n isLoading && spinnerPlacement === \"end\" && /* @__PURE__ */ jsx(\n ButtonSpinner,\n {\n className: \"chakra-button__spinner--end\",\n label: loadingText,\n placement: \"end\",\n spacing: iconSpacing,\n children: spinner\n }\n )\n ]\n }\n );\n});\nButton.displayName = \"Button\";\nfunction ButtonContent(props) {\n const { leftIcon, rightIcon, children, iconSpacing } = props;\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n leftIcon && /* @__PURE__ */ jsx(ButtonIcon, { marginEnd: iconSpacing, children: leftIcon }),\n children,\n rightIcon && /* @__PURE__ */ jsx(ButtonIcon, { marginStart: iconSpacing, children: rightIcon })\n ] });\n}\n\nexport {\n Button\n};\n","import { Button, ButtonProps } from '@chakra-ui/button'\nimport { ElectionStatus } from '@vocdoni/sdk'\nimport { useElection } from './Election'\n\nexport const VoteButton = (props: ButtonProps) => {\n const { signer, loading, voting, ConnectButton, isAbleToVote, election, voted, trans } = useElection()\n const isDisabled = !signer || !isAbleToVote || election?.status !== ElectionStatus.ONGOING\n\n if (voted) return null\n\n if (!signer && ConnectButton) {\n return \n }\n\n return (\n \n {trans('vote', 'Vote')}\n \n )\n}\n","import { ChakraProps } from '@chakra-ui/system'\nimport { Signer } from '@ethersproject/abstract-signer'\nimport { Wallet } from '@ethersproject/wallet'\nimport { CensusType, CspVote, ElectionStatus, PublishedElection, Vote } from '@vocdoni/sdk'\nimport { ComponentType, createContext, PropsWithChildren, useContext, useEffect, useState } from 'react'\nimport { FieldValues } from 'react-hook-form'\nimport { useClientContext } from '../../client'\nimport { HR } from '../layout'\nimport { ElectionDescription, ElectionHeader, ElectionSchedule, ElectionStatusBadge, ElectionTitle } from './parts'\nimport { QuestionsForm } from './QuestionsForm'\nimport { VoteButton } from './VoteButton'\n\nexport type ElectionProviderProps = {\n id?: string\n election?: PublishedElection\n signer?: Wallet | Signer\n ConnectButton?: ComponentType\n fetchCensus?: boolean\n texts?: ElectionTextsType\n}\n\nexport type ElectionTextsType = Record & {\n required?: string\n empty?: string\n vote?: string\n voted?: string\n}\n\nexport const useElectionProvider = ({\n id,\n election: data,\n signer: s,\n fetchCensus,\n texts,\n ...rest\n}: ElectionProviderProps) => {\n const { client, signer, setSigner } = useClientContext()\n const [loading, setLoading] = useState(false)\n const [voting, setVoting] = useState(false)\n const [loaded, setLoaded] = useState(false)\n const [voted, setVoted] = useState(null)\n const [error, setError] = useState('')\n const [election, setElection] = useState(data)\n const [isAbleToVote, setIsAbleToVote] = useState(undefined)\n const [votesLeft, setVotesLeft] = useState(0)\n const [isInCensus, setIsInCensus] = useState(false)\n const [censusType, setCensusType] = useState(undefined)\n const [voteInstance, setVoteInstance] = useState(undefined)\n const [authToken, setAuthToken] = useState(null)\n const [handler, setHandler] = useState(\"facebook\") // Hardcoded github until we let to choose\n\n const trans = (key: keyof ElectionTextsType, def: string) => {\n if (texts && texts[key]) {\n return texts[key]\n }\n return def\n }\n\n // set signer in case it has been specified in the election\n // provider (rather than the client provider)\n useEffect(() => {\n if (!client || signer || !s) return\n\n setSigner(s)\n }, [signer, client, s])\n\n // fetch election\n useEffect(() => {\n if (election || !id || loaded || !client) return\n ;(async () => {\n setLoading(true)\n try {\n const e = await client.fetchElection(id)\n setLoaded(true)\n setElection(e)\n } catch (e) {\n setError((e as Error).message)\n } finally {\n setLoading(false)\n }\n })()\n }, [election, id, loaded, client])\n\n // set loaded in case election comes from props\n useEffect(() => {\n if (loaded || !data) return\n\n setLoaded(true)\n }, [data, loaded])\n\n // check if logged in user is able to vote\n useEffect(() => {\n if (!fetchCensus || !signer || !election || !loaded || !client || isAbleToVote !== undefined) return\n ;(async () => {\n const censusType: CensusType = election.census.type\n const isIn = await client.isInCensus(election.id)\n\n let left = 0\n if (isIn || censusType == CensusType.WEIGHTED) {\n // no need to check votes left if member ain't in census\n left = await client.votesLeftCount(election.id)\n setVotesLeft(left)\n\n const voted = await client.hasAlreadyVoted(election.id)\n setVoted(voted)\n }\n setCensusType(censusType)\n setIsInCensus(isIn)\n setIsAbleToVote((left > 0 && isIn) || censusType == CensusType.CSP)\n })()\n }, [fetchCensus, election, loaded, client, isAbleToVote, signer])\n\n // Listening for the popup window meessage (oauth flows)\n useEffect(() => {\n ;(async () => {\n if(window.opener) return\n if(!client) return\n if(censusType != CensusType.CSP) return;\n\n window.addEventListener('message', (event) => {\n if(event.data.code && event.data.handler){\n getOAuthToken(client, event.data.code, event.data.handler)\n }\n });\n })()\n },[client, censusType]);\n\n // Posting the message to the main window\n useEffect(() => {\n (async () => {\n if (typeof window == 'undefined') return\n\n const code = window.location.href.split('?')[1].split('&').find((param: string) => param.startsWith('code='))?.split('=')[1]\n const handler = window.location.href.split('?')[1].split('&').find((param: string) => param.startsWith('handler='))?.split('=')[1]\n if(!code || !handler) return;\n\n if(window.opener) {\n // If it is, send the code to the parent window and close the popup\n window.opener.postMessage({ code, handler }, '*');\n window.close();\n }\n })()\n },[]); \n\n // context vote function (the one to be used with the given components)\n const vote = async (values: FieldValues) => {\n if (!client) {\n throw new Error('no client initialized')\n }\n if (!signer) {\n throw new Error('no signer provided')\n }\n if (!election) {\n throw new Error('no election initialized')\n }\n\n setVoting(true)\n setError('')\n\n client.setElectionId(election.id)\n\n // TODO: Modify the following for a working vote!\n\n // map questions back to expected Vote[] values\n const mapped = election.questions.map((q) => parseInt(values[q.title.default], 10))\n let vi = new Vote(mapped)\n setVoteInstance(vi)\n try {\n if (censusType == CensusType.CSP) {\n await cspAuthAndVote()\n }else if (censusType == CensusType.WEIGHTED) {\n await weightedVote()\n }\n } catch (e: any) {\n if ('reason' in e) {\n return setError(e.reason as string)\n }\n if ('message' in e) {\n return setError(e.message as string)\n }\n console.error('could not vote:', e)\n } finally {\n setVoting(false)\n }\n }\n\n const weightedVote = async () => {\n if (!voteInstance) {\n throw new Error('no vote instance')\n }\n if( censusType != CensusType.WEIGHTED ){\n throw new Error('not a Weighted election')\n }\n\n const vid = await client.submitVote(voteInstance)\n setVoted(vid)\n return vid\n }\n\n const cspAuthAndVote = async () => {\n if ( !client ) {\n throw new Error('no client initialized')\n }\n if (!election) {\n throw new Error('no election initialized')\n }\n if( censusType != CensusType.CSP ){\n throw new Error('not a CSP election')\n }\n\n let redirectURL = `${window.location.href}`\n // Add electionId and handler to the redirectURL if it is not there\n if(!redirectURL.includes(`electionId=${election.id}`)){\n redirectURL.includes('?') ? redirectURL += `&electionId=${election.id}` : redirectURL += `?electionId=${election.id}`\n }\n if(!redirectURL.includes(`handler=${handler}`)){\n redirectURL.includes('?') ? redirectURL += `&handler=${handler}` : redirectURL += `?handler=${handler}`\n }\n \n let step0: any;\n try {\n step0 = await client.cspStep(0, [handler, redirectURL])\n } catch (e: any) {\n if ('reason' in e) {\n return setError(e.reason as string)\n }\n }\n\n setAuthToken(step0.authToken)\n openLoginPopup(handler, step0['response'][0])\n }\n\n // Opens a popup window to the service login page\n const openLoginPopup = (handler: string, url: string) => {\n const width = 600\n const height = 600\n const left = (window.outerWidth / 2) - (width / 2)\n const top = (window.outerHeight / 2) - (height / 2)\n const params = [\n `width=${width}`,\n `height=${height}`,\n `top=${top}`,\n `left=${left}`,\n `status=no`,\n `resizable=yes`,\n `scrollbars=yes`,\n ].join(',')\n\n window.open(url, handler, params)\n }\n\n const getOAuthToken = async (vocdoniClient: any, code: string, handler: string) => {\n if (!code) {\n throw new Error('no code provided')\n }\n if (!handler) {\n throw new Error('no handler provided')\n }\n\n // Extract the electionId query param from the redirectURL\n const electionId = window.location.href.split('?')[1].split('&').find((param: string) => param.startsWith('electionId='))?.split('=')[1]\n let redirectURL = `${window.location.href.split('?')[0]}?electionId=${electionId}&handler=${handler}`\n\n let step1;\n try {\n step1 = await vocdoniClient.cspStep(1, [handler, code, redirectURL], authToken)\n cspVote(step1.token);\n } catch(e) {\n setError(\"Not authorized to vote\")\n return false;\n }\n }\n\n const cspVote = async (token: string) => {\n if (!client) {\n throw new Error('no client initialized')\n }\n\n let voteInstance = new Vote([1])\n\n if( censusType != CensusType.CSP ){\n throw new Error('not a CSP election')\n }\n\n try {\n const walletAddress: string = await client.wallet?.getAddress() as string\n const signature: string = await client.cspSign(walletAddress, token)\n const cspVote: CspVote = client.cspVote(voteInstance, signature)\n const vid: string = await client.submitVote(cspVote)\n setVoted(vid)\n return vid\n } catch(e) {\n setError(\"Error submitting vote\")\n return false;\n }\n }\n\n return {\n ...rest,\n election,\n error,\n isAbleToVote,\n isInCensus,\n loading,\n signer,\n trans,\n vote,\n voted,\n votesLeft,\n voting,\n }\n}\n\nexport type ElectionState = ReturnType\n\nexport const ElectionContext = createContext(undefined)\n\nexport const useElection = () => {\n const ctxt = useContext(ElectionContext)\n if (!ctxt) {\n throw new Error(\n 'useElection returned `undefined`, maybe you forgot to wrap the component within ?'\n )\n }\n\n return ctxt\n}\n\nexport type ElectionProviderComponentProps = ElectionProviderProps & ChakraProps\n\nexport const ElectionProvider = ({ children, ...rest }: PropsWithChildren) => {\n const value = useElectionProvider(rest)\n\n return {children}\n}\nElectionProvider.displayName = 'ElectionProvider'\n\nexport const Election = (props: ElectionProviderComponentProps) => (\n \n \n \n \n \n \n
\n \n \n
\n)\nElection.displayName = 'Election'\n","import { HeadingProps } from '@chakra-ui/layout'\nimport { chakra, forwardRef, omitThemingProps, useStyleConfig } from '@chakra-ui/system'\nimport { Account } from '@vocdoni/sdk'\nimport { useOrganization } from './Organization'\n\nexport const OrganizationName = forwardRef((props, ref) => {\n const { organization } = useOrganization()\n const styles = useStyleConfig('OrganizationName', props)\n const rest = omitThemingProps(props)\n\n if (!organization) return null\n\n return (\n \n {((organization as any).metadata as Account).name.default}\n \n )\n})\nOrganizationName.displayName = 'OrganizationName'\n","import { ChakraProps } from '@chakra-ui/system'\nimport { Account, AccountData } from '@vocdoni/sdk'\nimport { createContext, PropsWithChildren, useContext, useEffect, useState } from 'react'\nimport { useClientContext } from '../../client'\nimport { OrganizationName } from './Name'\n\nexport type OrganizationProviderProps = {\n id?: string\n organization?: AccountData\n}\n\nexport const useOrganizationProvider = ({ id, organization: data, ...rest }: OrganizationProviderProps) => {\n const { client, signer, setSigner } = useClientContext()\n const [loading, setLoading] = useState(false)\n const [loaded, setLoaded] = useState(false)\n const [error, setError] = useState('')\n const [organization, setOrganization] = useState(data)\n\n const update = async (account: Account, faucetPackage?: string) => {\n setLoading(true)\n try {\n if (account instanceof Account) {\n await client.updateAccountInfo(account);\n } else {\n await client.createAccountInfo({ account: new Account(account), faucetPackage });\n }\n } catch (e) {\n setError((e as Error).message)\n } finally {\n setLoading(false)\n }\n }\n\n // fetch organization\n useEffect(() => {\n if (organization || !id || loaded || !client) return\n ;(async () => {\n setLoading(true)\n try {\n setOrganization(await client.fetchAccountInfo(id))\n setLoaded(true)\n } catch (e) {\n setError((e as Error).message)\n } finally {\n setLoading(false)\n }\n })()\n }, [organization, id, loaded, client])\n\n // set loaded in case organization comes from props\n useEffect(() => {\n if (loaded || !data) return\n\n setLoaded(true)\n }, [data, loaded])\n\n return {\n ...rest,\n organization,\n error,\n loading,\n loaded,\n update,\n }\n}\n\nexport type OrganizationState = ReturnType\n\nexport const OrganizationContext = createContext(undefined)\n\nexport const useOrganization = () => {\n const ctxt = useContext(OrganizationContext)\n if (!ctxt) {\n throw new Error(\n 'useElection returned `undefined`, maybe you forgot to wrap the component within ?'\n )\n }\n\n return ctxt\n}\n\nexport type OrganizationProviderComponentProps = OrganizationProviderProps & ChakraProps\n\nexport const OrganizationProvider = ({ children, ...rest }: PropsWithChildren) => {\n const value = useOrganizationProvider(rest)\n\n return {children}\n}\nOrganizationProvider.displayName = 'OrganizationProvider'\n\nexport const Organization = (props: OrganizationProviderComponentProps) => (\n \n \n \n)\nOrganization.displayName = 'Election'\n","import { useStyleConfig } from '@chakra-ui/system'\nimport { Image, IPFSImageProps } from '../layout'\nimport { useOrganization } from './Organization'\n\nexport const OrganizationAvatar = (props: IPFSImageProps) => {\n const styles = useStyleConfig('OrganizationAvatar', props)\n\n const { organization } = useOrganization()\n if (!organization) return null\n\n let avatar = ((organization as any).metadata as any).media.avatar\n if (!avatar) {\n // fallback to deprecated logo field\n avatar = ((organization as any).metadata as any).media.logo\n }\n if (!avatar) return null\n\n return \n}\n","import { ChakraProps, useStyleConfig } from '@chakra-ui/system'\nimport { Account } from '@vocdoni/sdk'\nimport { ReactMarkdownProps } from 'react-markdown/lib/complex-types'\nimport { Markdown } from '../layout'\nimport { useOrganization } from './Organization'\n\nexport const OrganizationDescription = (props: Omit & ChakraProps) => {\n const styles = useStyleConfig('OrganizationDescription', props)\n const { organization } = useOrganization()\n\n if (!organization || (organization && !((organization as any).metadata as Account).description)) return null\n\n return (\n \n {((organization as any).metadata as Account).description.default}\n \n )\n}\n","import { useStyleConfig } from '@chakra-ui/system'\nimport { Image, IPFSImageProps } from '../layout'\nimport { useOrganization } from './Organization'\n\nexport const OrganizationHeader = (props: IPFSImageProps) => {\n const styles = useStyleConfig('OrganizationHeader', props)\n\n const { organization } = useOrganization()\n\n if (!organization) return null\n\n const { header } = ((organization as any).metadata as any).media\n if (!header) return null\n\n return \n}\n","// src/foundations/transition.ts\nvar transitionProperty = {\n common: \"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform\",\n colors: \"background-color, border-color, color, fill, stroke\",\n dimensions: \"width, height\",\n position: \"left, right, top, bottom\",\n background: \"background-color, background-image, background-position\"\n};\nvar transitionTimingFunction = {\n \"ease-in\": \"cubic-bezier(0.4, 0, 1, 1)\",\n \"ease-out\": \"cubic-bezier(0, 0, 0.2, 1)\",\n \"ease-in-out\": \"cubic-bezier(0.4, 0, 0.2, 1)\"\n};\nvar transitionDuration = {\n \"ultra-fast\": \"50ms\",\n faster: \"100ms\",\n fast: \"150ms\",\n normal: \"200ms\",\n slow: \"300ms\",\n slower: \"400ms\",\n \"ultra-slow\": \"500ms\"\n};\nvar transition = {\n property: transitionProperty,\n easing: transitionTimingFunction,\n duration: transitionDuration\n};\nvar transition_default = transition;\n\nexport {\n transition_default\n};\n","// src/foundations/z-index.ts\nvar zIndices = {\n hide: -1,\n auto: \"auto\",\n base: 0,\n docked: 10,\n dropdown: 1e3,\n sticky: 1100,\n banner: 1200,\n overlay: 1300,\n modal: 1400,\n popover: 1500,\n skipLink: 1600,\n toast: 1700,\n tooltip: 1800\n};\nvar z_index_default = zIndices;\n\nexport {\n z_index_default\n};\n","// src/foundations/borders.ts\nvar borders = {\n none: 0,\n \"1px\": \"1px solid\",\n \"2px\": \"2px solid\",\n \"4px\": \"4px solid\",\n \"8px\": \"8px solid\"\n};\nvar borders_default = borders;\n\nexport {\n borders_default\n};\n","// src/foundations/breakpoints.ts\nvar breakpoints = {\n base: \"0em\",\n sm: \"30em\",\n md: \"48em\",\n lg: \"62em\",\n xl: \"80em\",\n \"2xl\": \"96em\"\n};\nvar breakpoints_default = breakpoints;\n\nexport {\n breakpoints_default\n};\n","// src/foundations/colors.ts\nvar colors = {\n transparent: \"transparent\",\n current: \"currentColor\",\n black: \"#000000\",\n white: \"#FFFFFF\",\n whiteAlpha: {\n 50: \"rgba(255, 255, 255, 0.04)\",\n 100: \"rgba(255, 255, 255, 0.06)\",\n 200: \"rgba(255, 255, 255, 0.08)\",\n 300: \"rgba(255, 255, 255, 0.16)\",\n 400: \"rgba(255, 255, 255, 0.24)\",\n 500: \"rgba(255, 255, 255, 0.36)\",\n 600: \"rgba(255, 255, 255, 0.48)\",\n 700: \"rgba(255, 255, 255, 0.64)\",\n 800: \"rgba(255, 255, 255, 0.80)\",\n 900: \"rgba(255, 255, 255, 0.92)\"\n },\n blackAlpha: {\n 50: \"rgba(0, 0, 0, 0.04)\",\n 100: \"rgba(0, 0, 0, 0.06)\",\n 200: \"rgba(0, 0, 0, 0.08)\",\n 300: \"rgba(0, 0, 0, 0.16)\",\n 400: \"rgba(0, 0, 0, 0.24)\",\n 500: \"rgba(0, 0, 0, 0.36)\",\n 600: \"rgba(0, 0, 0, 0.48)\",\n 700: \"rgba(0, 0, 0, 0.64)\",\n 800: \"rgba(0, 0, 0, 0.80)\",\n 900: \"rgba(0, 0, 0, 0.92)\"\n },\n gray: {\n 50: \"#F7FAFC\",\n 100: \"#EDF2F7\",\n 200: \"#E2E8F0\",\n 300: \"#CBD5E0\",\n 400: \"#A0AEC0\",\n 500: \"#718096\",\n 600: \"#4A5568\",\n 700: \"#2D3748\",\n 800: \"#1A202C\",\n 900: \"#171923\"\n },\n red: {\n 50: \"#FFF5F5\",\n 100: \"#FED7D7\",\n 200: \"#FEB2B2\",\n 300: \"#FC8181\",\n 400: \"#F56565\",\n 500: \"#E53E3E\",\n 600: \"#C53030\",\n 700: \"#9B2C2C\",\n 800: \"#822727\",\n 900: \"#63171B\"\n },\n orange: {\n 50: \"#FFFAF0\",\n 100: \"#FEEBC8\",\n 200: \"#FBD38D\",\n 300: \"#F6AD55\",\n 400: \"#ED8936\",\n 500: \"#DD6B20\",\n 600: \"#C05621\",\n 700: \"#9C4221\",\n 800: \"#7B341E\",\n 900: \"#652B19\"\n },\n yellow: {\n 50: \"#FFFFF0\",\n 100: \"#FEFCBF\",\n 200: \"#FAF089\",\n 300: \"#F6E05E\",\n 400: \"#ECC94B\",\n 500: \"#D69E2E\",\n 600: \"#B7791F\",\n 700: \"#975A16\",\n 800: \"#744210\",\n 900: \"#5F370E\"\n },\n green: {\n 50: \"#F0FFF4\",\n 100: \"#C6F6D5\",\n 200: \"#9AE6B4\",\n 300: \"#68D391\",\n 400: \"#48BB78\",\n 500: \"#38A169\",\n 600: \"#2F855A\",\n 700: \"#276749\",\n 800: \"#22543D\",\n 900: \"#1C4532\"\n },\n teal: {\n 50: \"#E6FFFA\",\n 100: \"#B2F5EA\",\n 200: \"#81E6D9\",\n 300: \"#4FD1C5\",\n 400: \"#38B2AC\",\n 500: \"#319795\",\n 600: \"#2C7A7B\",\n 700: \"#285E61\",\n 800: \"#234E52\",\n 900: \"#1D4044\"\n },\n blue: {\n 50: \"#ebf8ff\",\n 100: \"#bee3f8\",\n 200: \"#90cdf4\",\n 300: \"#63b3ed\",\n 400: \"#4299e1\",\n 500: \"#3182ce\",\n 600: \"#2b6cb0\",\n 700: \"#2c5282\",\n 800: \"#2a4365\",\n 900: \"#1A365D\"\n },\n cyan: {\n 50: \"#EDFDFD\",\n 100: \"#C4F1F9\",\n 200: \"#9DECF9\",\n 300: \"#76E4F7\",\n 400: \"#0BC5EA\",\n 500: \"#00B5D8\",\n 600: \"#00A3C4\",\n 700: \"#0987A0\",\n 800: \"#086F83\",\n 900: \"#065666\"\n },\n purple: {\n 50: \"#FAF5FF\",\n 100: \"#E9D8FD\",\n 200: \"#D6BCFA\",\n 300: \"#B794F4\",\n 400: \"#9F7AEA\",\n 500: \"#805AD5\",\n 600: \"#6B46C1\",\n 700: \"#553C9A\",\n 800: \"#44337A\",\n 900: \"#322659\"\n },\n pink: {\n 50: \"#FFF5F7\",\n 100: \"#FED7E2\",\n 200: \"#FBB6CE\",\n 300: \"#F687B3\",\n 400: \"#ED64A6\",\n 500: \"#D53F8C\",\n 600: \"#B83280\",\n 700: \"#97266D\",\n 800: \"#702459\",\n 900: \"#521B41\"\n },\n linkedin: {\n 50: \"#E8F4F9\",\n 100: \"#CFEDFB\",\n 200: \"#9BDAF3\",\n 300: \"#68C7EC\",\n 400: \"#34B3E4\",\n 500: \"#00A0DC\",\n 600: \"#008CC9\",\n 700: \"#0077B5\",\n 800: \"#005E93\",\n 900: \"#004471\"\n },\n facebook: {\n 50: \"#E8F4F9\",\n 100: \"#D9DEE9\",\n 200: \"#B7C2DA\",\n 300: \"#6482C0\",\n 400: \"#4267B2\",\n 500: \"#385898\",\n 600: \"#314E89\",\n 700: \"#29487D\",\n 800: \"#223B67\",\n 900: \"#1E355B\"\n },\n messenger: {\n 50: \"#D0E6FF\",\n 100: \"#B9DAFF\",\n 200: \"#A2CDFF\",\n 300: \"#7AB8FF\",\n 400: \"#2E90FF\",\n 500: \"#0078FF\",\n 600: \"#0063D1\",\n 700: \"#0052AC\",\n 800: \"#003C7E\",\n 900: \"#002C5C\"\n },\n whatsapp: {\n 50: \"#dffeec\",\n 100: \"#b9f5d0\",\n 200: \"#90edb3\",\n 300: \"#65e495\",\n 400: \"#3cdd78\",\n 500: \"#22c35e\",\n 600: \"#179848\",\n 700: \"#0c6c33\",\n 800: \"#01421c\",\n 900: \"#001803\"\n },\n twitter: {\n 50: \"#E5F4FD\",\n 100: \"#C8E9FB\",\n 200: \"#A8DCFA\",\n 300: \"#83CDF7\",\n 400: \"#57BBF5\",\n 500: \"#1DA1F2\",\n 600: \"#1A94DA\",\n 700: \"#1681BF\",\n 800: \"#136B9E\",\n 900: \"#0D4D71\"\n },\n telegram: {\n 50: \"#E3F2F9\",\n 100: \"#C5E4F3\",\n 200: \"#A2D4EC\",\n 300: \"#7AC1E4\",\n 400: \"#47A9DA\",\n 500: \"#0088CC\",\n 600: \"#007AB8\",\n 700: \"#006BA1\",\n 800: \"#005885\",\n 900: \"#003F5E\"\n }\n};\nvar colors_default = colors;\n\nexport {\n colors_default\n};\n","// src/foundations/radius.ts\nvar radii = {\n none: \"0\",\n sm: \"0.125rem\",\n base: \"0.25rem\",\n md: \"0.375rem\",\n lg: \"0.5rem\",\n xl: \"0.75rem\",\n \"2xl\": \"1rem\",\n \"3xl\": \"1.5rem\",\n full: \"9999px\"\n};\nvar radius_default = radii;\n\nexport {\n radius_default\n};\n","// src/foundations/shadows.ts\nvar shadows = {\n xs: \"0 0 0 1px rgba(0, 0, 0, 0.05)\",\n sm: \"0 1px 2px 0 rgba(0, 0, 0, 0.05)\",\n base: \"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)\",\n md: \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)\",\n lg: \"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)\",\n xl: \"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)\",\n \"2xl\": \"0 25px 50px -12px rgba(0, 0, 0, 0.25)\",\n outline: \"0 0 0 3px rgba(66, 153, 225, 0.6)\",\n inner: \"inset 0 2px 4px 0 rgba(0,0,0,0.06)\",\n none: \"none\",\n \"dark-lg\": \"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px\"\n};\nvar shadows_default = shadows;\n\nexport {\n shadows_default\n};\n","// src/foundations/blur.ts\nvar blur = {\n none: 0,\n sm: \"4px\",\n base: \"8px\",\n md: \"12px\",\n lg: \"16px\",\n xl: \"24px\",\n \"2xl\": \"40px\",\n \"3xl\": \"64px\"\n};\nvar blur_default = blur;\n\nexport {\n blur_default\n};\n","// src/foundations/typography.ts\nvar typography = {\n letterSpacings: {\n tighter: \"-0.05em\",\n tight: \"-0.025em\",\n normal: \"0\",\n wide: \"0.025em\",\n wider: \"0.05em\",\n widest: \"0.1em\"\n },\n lineHeights: {\n normal: \"normal\",\n none: 1,\n shorter: 1.25,\n short: 1.375,\n base: 1.5,\n tall: 1.625,\n taller: \"2\",\n \"3\": \".75rem\",\n \"4\": \"1rem\",\n \"5\": \"1.25rem\",\n \"6\": \"1.5rem\",\n \"7\": \"1.75rem\",\n \"8\": \"2rem\",\n \"9\": \"2.25rem\",\n \"10\": \"2.5rem\"\n },\n fontWeights: {\n hairline: 100,\n thin: 200,\n light: 300,\n normal: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n extrabold: 800,\n black: 900\n },\n fonts: {\n heading: `-apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"`,\n body: `-apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"`,\n mono: `SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace`\n },\n fontSizes: {\n \"3xs\": \"0.45rem\",\n \"2xs\": \"0.625rem\",\n xs: \"0.75rem\",\n sm: \"0.875rem\",\n md: \"1rem\",\n lg: \"1.125rem\",\n xl: \"1.25rem\",\n \"2xl\": \"1.5rem\",\n \"3xl\": \"1.875rem\",\n \"4xl\": \"2.25rem\",\n \"5xl\": \"3rem\",\n \"6xl\": \"3.75rem\",\n \"7xl\": \"4.5rem\",\n \"8xl\": \"6rem\",\n \"9xl\": \"8rem\"\n }\n};\nvar typography_default = typography;\n\nexport {\n typography_default\n};\n","// src/foundations/spacing.ts\nvar spacing = {\n px: \"1px\",\n 0.5: \"0.125rem\",\n 1: \"0.25rem\",\n 1.5: \"0.375rem\",\n 2: \"0.5rem\",\n 2.5: \"0.625rem\",\n 3: \"0.75rem\",\n 3.5: \"0.875rem\",\n 4: \"1rem\",\n 5: \"1.25rem\",\n 6: \"1.5rem\",\n 7: \"1.75rem\",\n 8: \"2rem\",\n 9: \"2.25rem\",\n 10: \"2.5rem\",\n 12: \"3rem\",\n 14: \"3.5rem\",\n 16: \"4rem\",\n 20: \"5rem\",\n 24: \"6rem\",\n 28: \"7rem\",\n 32: \"8rem\",\n 36: \"9rem\",\n 40: \"10rem\",\n 44: \"11rem\",\n 48: \"12rem\",\n 52: \"13rem\",\n 56: \"14rem\",\n 60: \"15rem\",\n 64: \"16rem\",\n 72: \"18rem\",\n 80: \"20rem\",\n 96: \"24rem\"\n};\n\nexport {\n spacing\n};\n","import {\n spacing\n} from \"./chunk-G3IFUAY5.mjs\";\n\n// src/foundations/sizes.ts\nvar largeSizes = {\n max: \"max-content\",\n min: \"min-content\",\n full: \"100%\",\n \"3xs\": \"14rem\",\n \"2xs\": \"16rem\",\n xs: \"20rem\",\n sm: \"24rem\",\n md: \"28rem\",\n lg: \"32rem\",\n xl: \"36rem\",\n \"2xl\": \"42rem\",\n \"3xl\": \"48rem\",\n \"4xl\": \"56rem\",\n \"5xl\": \"64rem\",\n \"6xl\": \"72rem\",\n \"7xl\": \"80rem\",\n \"8xl\": \"90rem\",\n prose: \"60ch\"\n};\nvar container = {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\"\n};\nvar sizes = {\n ...spacing,\n ...largeSizes,\n container\n};\nvar sizes_default = sizes;\n\nexport {\n sizes_default\n};\n","import {\n transition_default\n} from \"./chunk-AU77DZXY.mjs\";\nimport {\n z_index_default\n} from \"./chunk-7OKLMD4V.mjs\";\nimport {\n borders_default\n} from \"./chunk-ZV5E32CG.mjs\";\nimport {\n breakpoints_default\n} from \"./chunk-DDAHWWWN.mjs\";\nimport {\n colors_default\n} from \"./chunk-C7H5GWRZ.mjs\";\nimport {\n radius_default\n} from \"./chunk-4REDROSM.mjs\";\nimport {\n shadows_default\n} from \"./chunk-DJNGX4VH.mjs\";\nimport {\n blur_default\n} from \"./chunk-OLDNEXT6.mjs\";\nimport {\n typography_default\n} from \"./chunk-HOOF7HHD.mjs\";\nimport {\n sizes_default\n} from \"./chunk-X4JBRTE2.mjs\";\nimport {\n spacing\n} from \"./chunk-G3IFUAY5.mjs\";\n\n// src/foundations/index.ts\nvar foundations = {\n breakpoints: breakpoints_default,\n zIndices: z_index_default,\n radii: radius_default,\n blur: blur_default,\n colors: colors_default,\n ...typography_default,\n sizes: sizes_default,\n shadows: shadows_default,\n space: spacing,\n borders: borders_default,\n transition: transition_default\n};\n\nexport {\n foundations\n};\n","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeMax = Math.max,\n nativeNow = Date.now;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\n/**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\nvar mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n});\n\n/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = mergeWith;\n","// src/utils/create-transform.ts\nimport { isObject } from \"@chakra-ui/shared-utils\";\nvar isImportant = (value) => /!(important)?$/.test(value);\nvar withoutImportant = (value) => typeof value === \"string\" ? value.replace(/!(important)?$/, \"\").trim() : value;\nvar tokenToCSSVar = (scale, value) => (theme) => {\n const valueStr = String(value);\n const important = isImportant(valueStr);\n const valueWithoutImportant = withoutImportant(valueStr);\n const key = scale ? `${scale}.${valueWithoutImportant}` : valueWithoutImportant;\n let transformed = isObject(theme.__cssMap) && key in theme.__cssMap ? theme.__cssMap[key].varRef : value;\n transformed = withoutImportant(transformed);\n return important ? `${transformed} !important` : transformed;\n};\nfunction createTransform(options) {\n const { scale, transform: transform2, compose } = options;\n const fn = (value, theme) => {\n var _a;\n const _value = tokenToCSSVar(scale, value)(theme);\n let result = (_a = transform2 == null ? void 0 : transform2(_value, theme)) != null ? _a : _value;\n if (compose) {\n result = compose(result, theme);\n }\n return result;\n };\n return fn;\n}\n\n// src/utils/pipe.ts\nvar pipe = (...fns) => (v) => fns.reduce((a, b) => b(a), v);\n\n// src/utils/prop-config.ts\nfunction toConfig(scale, transform2) {\n return (property) => {\n const result = { property, scale };\n result.transform = createTransform({\n scale,\n transform: transform2\n });\n return result;\n };\n}\nvar getRtl = ({ rtl, ltr }) => (theme) => theme.direction === \"rtl\" ? rtl : ltr;\nfunction logical(options) {\n const { property, scale, transform: transform2 } = options;\n return {\n scale,\n property: getRtl(property),\n transform: scale ? createTransform({\n scale,\n compose: transform2\n }) : transform2\n };\n}\n\n// src/utils/templates.ts\nvar transformTemplate = [\n \"rotate(var(--chakra-rotate, 0))\",\n \"scaleX(var(--chakra-scale-x, 1))\",\n \"scaleY(var(--chakra-scale-y, 1))\",\n \"skewX(var(--chakra-skew-x, 0))\",\n \"skewY(var(--chakra-skew-y, 0))\"\n];\nfunction getTransformTemplate() {\n return [\n \"translateX(var(--chakra-translate-x, 0))\",\n \"translateY(var(--chakra-translate-y, 0))\",\n ...transformTemplate\n ].join(\" \");\n}\nfunction getTransformGpuTemplate() {\n return [\n \"translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)\",\n ...transformTemplate\n ].join(\" \");\n}\nvar filterTemplate = {\n \"--chakra-blur\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-brightness\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-contrast\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-grayscale\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-hue-rotate\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-invert\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-saturate\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-sepia\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-drop-shadow\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n filter: [\n \"var(--chakra-blur)\",\n \"var(--chakra-brightness)\",\n \"var(--chakra-contrast)\",\n \"var(--chakra-grayscale)\",\n \"var(--chakra-hue-rotate)\",\n \"var(--chakra-invert)\",\n \"var(--chakra-saturate)\",\n \"var(--chakra-sepia)\",\n \"var(--chakra-drop-shadow)\"\n ].join(\" \")\n};\nvar backdropFilterTemplate = {\n backdropFilter: [\n \"var(--chakra-backdrop-blur)\",\n \"var(--chakra-backdrop-brightness)\",\n \"var(--chakra-backdrop-contrast)\",\n \"var(--chakra-backdrop-grayscale)\",\n \"var(--chakra-backdrop-hue-rotate)\",\n \"var(--chakra-backdrop-invert)\",\n \"var(--chakra-backdrop-opacity)\",\n \"var(--chakra-backdrop-saturate)\",\n \"var(--chakra-backdrop-sepia)\"\n ].join(\" \"),\n \"--chakra-backdrop-blur\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-brightness\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-contrast\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-grayscale\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-hue-rotate\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-invert\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-opacity\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-saturate\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-sepia\": \"var(--chakra-empty,/*!*/ /*!*/)\"\n};\nfunction getRingTemplate(value) {\n return {\n \"--chakra-ring-offset-shadow\": `var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)`,\n \"--chakra-ring-shadow\": `var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)`,\n \"--chakra-ring-width\": value,\n boxShadow: [\n `var(--chakra-ring-offset-shadow)`,\n `var(--chakra-ring-shadow)`,\n `var(--chakra-shadow, 0 0 #0000)`\n ].join(\", \")\n };\n}\nvar flexDirectionTemplate = {\n \"row-reverse\": {\n space: \"--chakra-space-x-reverse\",\n divide: \"--chakra-divide-x-reverse\"\n },\n \"column-reverse\": {\n space: \"--chakra-space-y-reverse\",\n divide: \"--chakra-divide-y-reverse\"\n }\n};\n\n// src/utils/parse-gradient.ts\nvar directionMap = {\n \"to-t\": \"to top\",\n \"to-tr\": \"to top right\",\n \"to-r\": \"to right\",\n \"to-br\": \"to bottom right\",\n \"to-b\": \"to bottom\",\n \"to-bl\": \"to bottom left\",\n \"to-l\": \"to left\",\n \"to-tl\": \"to top left\"\n};\nvar valueSet = new Set(Object.values(directionMap));\nvar globalSet = /* @__PURE__ */ new Set([\n \"none\",\n \"-moz-initial\",\n \"inherit\",\n \"initial\",\n \"revert\",\n \"unset\"\n]);\nvar trimSpace = (str) => str.trim();\nfunction parseGradient(value, theme) {\n if (value == null || globalSet.has(value))\n return value;\n const prevent = isCSSFunction(value) || globalSet.has(value);\n if (!prevent)\n return `url('${value}')`;\n const regex = /(^[a-z-A-Z]+)\\((.*)\\)/g;\n const results = regex.exec(value);\n const type = results == null ? void 0 : results[1];\n const values = results == null ? void 0 : results[2];\n if (!type || !values)\n return value;\n const _type = type.includes(\"-gradient\") ? type : `${type}-gradient`;\n const [maybeDirection, ...stops] = values.split(\",\").map(trimSpace).filter(Boolean);\n if ((stops == null ? void 0 : stops.length) === 0)\n return value;\n const direction = maybeDirection in directionMap ? directionMap[maybeDirection] : maybeDirection;\n stops.unshift(direction);\n const _values = stops.map((stop) => {\n if (valueSet.has(stop))\n return stop;\n const firstStop = stop.indexOf(\" \");\n const [_color, _stop] = firstStop !== -1 ? [stop.substr(0, firstStop), stop.substr(firstStop + 1)] : [stop];\n const _stopOrFunc = isCSSFunction(_stop) ? _stop : _stop && _stop.split(\" \");\n const key = `colors.${_color}`;\n const color2 = key in theme.__cssMap ? theme.__cssMap[key].varRef : _color;\n return _stopOrFunc ? [\n color2,\n ...Array.isArray(_stopOrFunc) ? _stopOrFunc : [_stopOrFunc]\n ].join(\" \") : color2;\n });\n return `${_type}(${_values.join(\", \")})`;\n}\nvar isCSSFunction = (value) => {\n return typeof value === \"string\" && value.includes(\"(\") && value.includes(\")\");\n};\nvar gradientTransform = (value, theme) => parseGradient(value, theme != null ? theme : {});\n\n// src/utils/transform-functions.ts\nfunction isCssVar(value) {\n return /^var\\(--.+\\)$/.test(value);\n}\nvar analyzeCSSValue = (value) => {\n const num = parseFloat(value.toString());\n const unit = value.toString().replace(String(num), \"\");\n return { unitless: !unit, value: num, unit };\n};\nvar wrap = (str) => (value) => `${str}(${value})`;\nvar transformFunctions = {\n filter(value) {\n return value !== \"auto\" ? value : filterTemplate;\n },\n backdropFilter(value) {\n return value !== \"auto\" ? value : backdropFilterTemplate;\n },\n ring(value) {\n return getRingTemplate(transformFunctions.px(value));\n },\n bgClip(value) {\n return value === \"text\" ? { color: \"transparent\", backgroundClip: \"text\" } : { backgroundClip: value };\n },\n transform(value) {\n if (value === \"auto\")\n return getTransformTemplate();\n if (value === \"auto-gpu\")\n return getTransformGpuTemplate();\n return value;\n },\n vh(value) {\n return value === \"$100vh\" ? \"var(--chakra-vh)\" : value;\n },\n px(value) {\n if (value == null)\n return value;\n const { unitless } = analyzeCSSValue(value);\n return unitless || typeof value === \"number\" ? `${value}px` : value;\n },\n fraction(value) {\n return !(typeof value === \"number\") || value > 1 ? value : `${value * 100}%`;\n },\n float(value, theme) {\n const map = { left: \"right\", right: \"left\" };\n return theme.direction === \"rtl\" ? map[value] : value;\n },\n degree(value) {\n if (isCssVar(value) || value == null)\n return value;\n const unitless = typeof value === \"string\" && !value.endsWith(\"deg\");\n return typeof value === \"number\" || unitless ? `${value}deg` : value;\n },\n gradient: gradientTransform,\n blur: wrap(\"blur\"),\n opacity: wrap(\"opacity\"),\n brightness: wrap(\"brightness\"),\n contrast: wrap(\"contrast\"),\n dropShadow: wrap(\"drop-shadow\"),\n grayscale: wrap(\"grayscale\"),\n hueRotate: wrap(\"hue-rotate\"),\n invert: wrap(\"invert\"),\n saturate: wrap(\"saturate\"),\n sepia: wrap(\"sepia\"),\n bgImage(value) {\n if (value == null)\n return value;\n const prevent = isCSSFunction(value) || globalSet.has(value);\n return !prevent ? `url(${value})` : value;\n },\n outline(value) {\n const isNoneOrZero = String(value) === \"0\" || String(value) === \"none\";\n return value !== null && isNoneOrZero ? { outline: \"2px solid transparent\", outlineOffset: \"2px\" } : { outline: value };\n },\n flexDirection(value) {\n var _a;\n const { space: space2, divide: divide2 } = (_a = flexDirectionTemplate[value]) != null ? _a : {};\n const result = { flexDirection: value };\n if (space2)\n result[space2] = 1;\n if (divide2)\n result[divide2] = 1;\n return result;\n }\n};\n\n// src/utils/index.ts\nvar t = {\n borderWidths: toConfig(\"borderWidths\"),\n borderStyles: toConfig(\"borderStyles\"),\n colors: toConfig(\"colors\"),\n borders: toConfig(\"borders\"),\n gradients: toConfig(\"gradients\", transformFunctions.gradient),\n radii: toConfig(\"radii\", transformFunctions.px),\n space: toConfig(\"space\", pipe(transformFunctions.vh, transformFunctions.px)),\n spaceT: toConfig(\"space\", pipe(transformFunctions.vh, transformFunctions.px)),\n degreeT(property) {\n return { property, transform: transformFunctions.degree };\n },\n prop(property, scale, transform2) {\n return {\n property,\n scale,\n ...scale && {\n transform: createTransform({ scale, transform: transform2 })\n }\n };\n },\n propT(property, transform2) {\n return { property, transform: transform2 };\n },\n sizes: toConfig(\"sizes\", pipe(transformFunctions.vh, transformFunctions.px)),\n sizesT: toConfig(\"sizes\", pipe(transformFunctions.vh, transformFunctions.fraction)),\n shadows: toConfig(\"shadows\"),\n logical,\n blur: toConfig(\"blur\", transformFunctions.blur)\n};\n\n// src/config/background.ts\nvar background = {\n background: t.colors(\"background\"),\n backgroundColor: t.colors(\"backgroundColor\"),\n backgroundImage: t.gradients(\"backgroundImage\"),\n backgroundSize: true,\n backgroundPosition: true,\n backgroundRepeat: true,\n backgroundAttachment: true,\n backgroundClip: { transform: transformFunctions.bgClip },\n bgSize: t.prop(\"backgroundSize\"),\n bgPosition: t.prop(\"backgroundPosition\"),\n bg: t.colors(\"background\"),\n bgColor: t.colors(\"backgroundColor\"),\n bgPos: t.prop(\"backgroundPosition\"),\n bgRepeat: t.prop(\"backgroundRepeat\"),\n bgAttachment: t.prop(\"backgroundAttachment\"),\n bgGradient: t.gradients(\"backgroundImage\"),\n bgClip: { transform: transformFunctions.bgClip }\n};\nObject.assign(background, {\n bgImage: background.backgroundImage,\n bgImg: background.backgroundImage\n});\n\n// src/config/border.ts\nvar border = {\n border: t.borders(\"border\"),\n borderWidth: t.borderWidths(\"borderWidth\"),\n borderStyle: t.borderStyles(\"borderStyle\"),\n borderColor: t.colors(\"borderColor\"),\n borderRadius: t.radii(\"borderRadius\"),\n borderTop: t.borders(\"borderTop\"),\n borderBlockStart: t.borders(\"borderBlockStart\"),\n borderTopLeftRadius: t.radii(\"borderTopLeftRadius\"),\n borderStartStartRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: \"borderTopLeftRadius\",\n rtl: \"borderTopRightRadius\"\n }\n }),\n borderEndStartRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: \"borderBottomLeftRadius\",\n rtl: \"borderBottomRightRadius\"\n }\n }),\n borderTopRightRadius: t.radii(\"borderTopRightRadius\"),\n borderStartEndRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: \"borderTopRightRadius\",\n rtl: \"borderTopLeftRadius\"\n }\n }),\n borderEndEndRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: \"borderBottomRightRadius\",\n rtl: \"borderBottomLeftRadius\"\n }\n }),\n borderRight: t.borders(\"borderRight\"),\n borderInlineEnd: t.borders(\"borderInlineEnd\"),\n borderBottom: t.borders(\"borderBottom\"),\n borderBlockEnd: t.borders(\"borderBlockEnd\"),\n borderBottomLeftRadius: t.radii(\"borderBottomLeftRadius\"),\n borderBottomRightRadius: t.radii(\"borderBottomRightRadius\"),\n borderLeft: t.borders(\"borderLeft\"),\n borderInlineStart: {\n property: \"borderInlineStart\",\n scale: \"borders\"\n },\n borderInlineStartRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: [\"borderTopLeftRadius\", \"borderBottomLeftRadius\"],\n rtl: [\"borderTopRightRadius\", \"borderBottomRightRadius\"]\n }\n }),\n borderInlineEndRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: [\"borderTopRightRadius\", \"borderBottomRightRadius\"],\n rtl: [\"borderTopLeftRadius\", \"borderBottomLeftRadius\"]\n }\n }),\n borderX: t.borders([\"borderLeft\", \"borderRight\"]),\n borderInline: t.borders(\"borderInline\"),\n borderY: t.borders([\"borderTop\", \"borderBottom\"]),\n borderBlock: t.borders(\"borderBlock\"),\n borderTopWidth: t.borderWidths(\"borderTopWidth\"),\n borderBlockStartWidth: t.borderWidths(\"borderBlockStartWidth\"),\n borderTopColor: t.colors(\"borderTopColor\"),\n borderBlockStartColor: t.colors(\"borderBlockStartColor\"),\n borderTopStyle: t.borderStyles(\"borderTopStyle\"),\n borderBlockStartStyle: t.borderStyles(\"borderBlockStartStyle\"),\n borderBottomWidth: t.borderWidths(\"borderBottomWidth\"),\n borderBlockEndWidth: t.borderWidths(\"borderBlockEndWidth\"),\n borderBottomColor: t.colors(\"borderBottomColor\"),\n borderBlockEndColor: t.colors(\"borderBlockEndColor\"),\n borderBottomStyle: t.borderStyles(\"borderBottomStyle\"),\n borderBlockEndStyle: t.borderStyles(\"borderBlockEndStyle\"),\n borderLeftWidth: t.borderWidths(\"borderLeftWidth\"),\n borderInlineStartWidth: t.borderWidths(\"borderInlineStartWidth\"),\n borderLeftColor: t.colors(\"borderLeftColor\"),\n borderInlineStartColor: t.colors(\"borderInlineStartColor\"),\n borderLeftStyle: t.borderStyles(\"borderLeftStyle\"),\n borderInlineStartStyle: t.borderStyles(\"borderInlineStartStyle\"),\n borderRightWidth: t.borderWidths(\"borderRightWidth\"),\n borderInlineEndWidth: t.borderWidths(\"borderInlineEndWidth\"),\n borderRightColor: t.colors(\"borderRightColor\"),\n borderInlineEndColor: t.colors(\"borderInlineEndColor\"),\n borderRightStyle: t.borderStyles(\"borderRightStyle\"),\n borderInlineEndStyle: t.borderStyles(\"borderInlineEndStyle\"),\n borderTopRadius: t.radii([\"borderTopLeftRadius\", \"borderTopRightRadius\"]),\n borderBottomRadius: t.radii([\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\"\n ]),\n borderLeftRadius: t.radii([\"borderTopLeftRadius\", \"borderBottomLeftRadius\"]),\n borderRightRadius: t.radii([\n \"borderTopRightRadius\",\n \"borderBottomRightRadius\"\n ])\n};\nObject.assign(border, {\n rounded: border.borderRadius,\n roundedTop: border.borderTopRadius,\n roundedTopLeft: border.borderTopLeftRadius,\n roundedTopRight: border.borderTopRightRadius,\n roundedTopStart: border.borderStartStartRadius,\n roundedTopEnd: border.borderStartEndRadius,\n roundedBottom: border.borderBottomRadius,\n roundedBottomLeft: border.borderBottomLeftRadius,\n roundedBottomRight: border.borderBottomRightRadius,\n roundedBottomStart: border.borderEndStartRadius,\n roundedBottomEnd: border.borderEndEndRadius,\n roundedLeft: border.borderLeftRadius,\n roundedRight: border.borderRightRadius,\n roundedStart: border.borderInlineStartRadius,\n roundedEnd: border.borderInlineEndRadius,\n borderStart: border.borderInlineStart,\n borderEnd: border.borderInlineEnd,\n borderTopStartRadius: border.borderStartStartRadius,\n borderTopEndRadius: border.borderStartEndRadius,\n borderBottomStartRadius: border.borderEndStartRadius,\n borderBottomEndRadius: border.borderEndEndRadius,\n borderStartRadius: border.borderInlineStartRadius,\n borderEndRadius: border.borderInlineEndRadius,\n borderStartWidth: border.borderInlineStartWidth,\n borderEndWidth: border.borderInlineEndWidth,\n borderStartColor: border.borderInlineStartColor,\n borderEndColor: border.borderInlineEndColor,\n borderStartStyle: border.borderInlineStartStyle,\n borderEndStyle: border.borderInlineEndStyle\n});\n\n// src/config/color.ts\nvar color = {\n color: t.colors(\"color\"),\n textColor: t.colors(\"color\"),\n fill: t.colors(\"fill\"),\n stroke: t.colors(\"stroke\")\n};\n\n// src/config/effect.ts\nvar effect = {\n boxShadow: t.shadows(\"boxShadow\"),\n mixBlendMode: true,\n blendMode: t.prop(\"mixBlendMode\"),\n backgroundBlendMode: true,\n bgBlendMode: t.prop(\"backgroundBlendMode\"),\n opacity: true\n};\nObject.assign(effect, {\n shadow: effect.boxShadow\n});\n\n// src/config/filter.ts\nvar filter = {\n filter: { transform: transformFunctions.filter },\n blur: t.blur(\"--chakra-blur\"),\n brightness: t.propT(\"--chakra-brightness\", transformFunctions.brightness),\n contrast: t.propT(\"--chakra-contrast\", transformFunctions.contrast),\n hueRotate: t.degreeT(\"--chakra-hue-rotate\"),\n invert: t.propT(\"--chakra-invert\", transformFunctions.invert),\n saturate: t.propT(\"--chakra-saturate\", transformFunctions.saturate),\n dropShadow: t.propT(\"--chakra-drop-shadow\", transformFunctions.dropShadow),\n backdropFilter: { transform: transformFunctions.backdropFilter },\n backdropBlur: t.blur(\"--chakra-backdrop-blur\"),\n backdropBrightness: t.propT(\n \"--chakra-backdrop-brightness\",\n transformFunctions.brightness\n ),\n backdropContrast: t.propT(\"--chakra-backdrop-contrast\", transformFunctions.contrast),\n backdropHueRotate: t.degreeT(\"--chakra-backdrop-hue-rotate\"),\n backdropInvert: t.propT(\"--chakra-backdrop-invert\", transformFunctions.invert),\n backdropSaturate: t.propT(\"--chakra-backdrop-saturate\", transformFunctions.saturate)\n};\n\n// src/config/flexbox.ts\nvar flexbox = {\n alignItems: true,\n alignContent: true,\n justifyItems: true,\n justifyContent: true,\n flexWrap: true,\n flexDirection: { transform: transformFunctions.flexDirection },\n flex: true,\n flexFlow: true,\n flexGrow: true,\n flexShrink: true,\n flexBasis: t.sizes(\"flexBasis\"),\n justifySelf: true,\n alignSelf: true,\n order: true,\n placeItems: true,\n placeContent: true,\n placeSelf: true,\n gap: t.space(\"gap\"),\n rowGap: t.space(\"rowGap\"),\n columnGap: t.space(\"columnGap\")\n};\nObject.assign(flexbox, {\n flexDir: flexbox.flexDirection\n});\n\n// src/config/grid.ts\nvar grid = {\n gridGap: t.space(\"gridGap\"),\n gridColumnGap: t.space(\"gridColumnGap\"),\n gridRowGap: t.space(\"gridRowGap\"),\n gridColumn: true,\n gridRow: true,\n gridAutoFlow: true,\n gridAutoColumns: true,\n gridColumnStart: true,\n gridColumnEnd: true,\n gridRowStart: true,\n gridRowEnd: true,\n gridAutoRows: true,\n gridTemplate: true,\n gridTemplateColumns: true,\n gridTemplateRows: true,\n gridTemplateAreas: true,\n gridArea: true\n};\n\n// src/config/interactivity.ts\nvar interactivity = {\n appearance: true,\n cursor: true,\n resize: true,\n userSelect: true,\n pointerEvents: true,\n outline: { transform: transformFunctions.outline },\n outlineOffset: true,\n outlineColor: t.colors(\"outlineColor\")\n};\n\n// src/config/layout.ts\nvar layout = {\n width: t.sizesT(\"width\"),\n inlineSize: t.sizesT(\"inlineSize\"),\n height: t.sizes(\"height\"),\n blockSize: t.sizes(\"blockSize\"),\n boxSize: t.sizes([\"width\", \"height\"]),\n minWidth: t.sizes(\"minWidth\"),\n minInlineSize: t.sizes(\"minInlineSize\"),\n minHeight: t.sizes(\"minHeight\"),\n minBlockSize: t.sizes(\"minBlockSize\"),\n maxWidth: t.sizes(\"maxWidth\"),\n maxInlineSize: t.sizes(\"maxInlineSize\"),\n maxHeight: t.sizes(\"maxHeight\"),\n maxBlockSize: t.sizes(\"maxBlockSize\"),\n overflow: true,\n overflowX: true,\n overflowY: true,\n overscrollBehavior: true,\n overscrollBehaviorX: true,\n overscrollBehaviorY: true,\n display: true,\n hideFrom: {\n scale: \"breakpoints\",\n transform: (value, theme) => {\n var _a, _b, _c;\n const breakpoint = (_c = (_b = (_a = theme.__breakpoints) == null ? void 0 : _a.get(value)) == null ? void 0 : _b.minW) != null ? _c : value;\n const mq = `@media screen and (min-width: ${breakpoint})`;\n return { [mq]: { display: \"none\" } };\n }\n },\n hideBelow: {\n scale: \"breakpoints\",\n transform: (value, theme) => {\n var _a, _b, _c;\n const breakpoint = (_c = (_b = (_a = theme.__breakpoints) == null ? void 0 : _a.get(value)) == null ? void 0 : _b._minW) != null ? _c : value;\n const mq = `@media screen and (max-width: ${breakpoint})`;\n return { [mq]: { display: \"none\" } };\n }\n },\n verticalAlign: true,\n boxSizing: true,\n boxDecorationBreak: true,\n float: t.propT(\"float\", transformFunctions.float),\n objectFit: true,\n objectPosition: true,\n visibility: true,\n isolation: true\n};\nObject.assign(layout, {\n w: layout.width,\n h: layout.height,\n minW: layout.minWidth,\n maxW: layout.maxWidth,\n minH: layout.minHeight,\n maxH: layout.maxHeight,\n overscroll: layout.overscrollBehavior,\n overscrollX: layout.overscrollBehaviorX,\n overscrollY: layout.overscrollBehaviorY\n});\n\n// src/config/list.ts\nvar list = {\n listStyleType: true,\n listStylePosition: true,\n listStylePos: t.prop(\"listStylePosition\"),\n listStyleImage: true,\n listStyleImg: t.prop(\"listStyleImage\")\n};\n\n// src/get.ts\nfunction get(obj, path, fallback, index) {\n const key = typeof path === \"string\" ? path.split(\".\") : [path];\n for (index = 0; index < key.length; index += 1) {\n if (!obj)\n break;\n obj = obj[key[index]];\n }\n return obj === void 0 ? fallback : obj;\n}\nvar memoize = (fn) => {\n const cache = /* @__PURE__ */ new WeakMap();\n const memoizedFn = (obj, path, fallback, index) => {\n if (typeof obj === \"undefined\") {\n return fn(obj, path, fallback);\n }\n if (!cache.has(obj)) {\n cache.set(obj, /* @__PURE__ */ new Map());\n }\n const map = cache.get(obj);\n if (map.has(path)) {\n return map.get(path);\n }\n const value = fn(obj, path, fallback, index);\n map.set(path, value);\n return value;\n };\n return memoizedFn;\n};\nvar memoizedGet = memoize(get);\n\n// src/config/others.ts\nvar srOnly = {\n border: \"0px\",\n clip: \"rect(0, 0, 0, 0)\",\n width: \"1px\",\n height: \"1px\",\n margin: \"-1px\",\n padding: \"0px\",\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n position: \"absolute\"\n};\nvar srFocusable = {\n position: \"static\",\n width: \"auto\",\n height: \"auto\",\n clip: \"auto\",\n padding: \"0\",\n margin: \"0\",\n overflow: \"visible\",\n whiteSpace: \"normal\"\n};\nvar getWithPriority = (theme, key, styles) => {\n const result = {};\n const obj = memoizedGet(theme, key, {});\n for (const prop in obj) {\n const isInStyles = prop in styles && styles[prop] != null;\n if (!isInStyles)\n result[prop] = obj[prop];\n }\n return result;\n};\nvar others = {\n srOnly: {\n transform(value) {\n if (value === true)\n return srOnly;\n if (value === \"focusable\")\n return srFocusable;\n return {};\n }\n },\n layerStyle: {\n processResult: true,\n transform: (value, theme, styles) => getWithPriority(theme, `layerStyles.${value}`, styles)\n },\n textStyle: {\n processResult: true,\n transform: (value, theme, styles) => getWithPriority(theme, `textStyles.${value}`, styles)\n },\n apply: {\n processResult: true,\n transform: (value, theme, styles) => getWithPriority(theme, value, styles)\n }\n};\n\n// src/config/position.ts\nvar position = {\n position: true,\n pos: t.prop(\"position\"),\n zIndex: t.prop(\"zIndex\", \"zIndices\"),\n inset: t.spaceT(\"inset\"),\n insetX: t.spaceT([\"left\", \"right\"]),\n insetInline: t.spaceT(\"insetInline\"),\n insetY: t.spaceT([\"top\", \"bottom\"]),\n insetBlock: t.spaceT(\"insetBlock\"),\n top: t.spaceT(\"top\"),\n insetBlockStart: t.spaceT(\"insetBlockStart\"),\n bottom: t.spaceT(\"bottom\"),\n insetBlockEnd: t.spaceT(\"insetBlockEnd\"),\n left: t.spaceT(\"left\"),\n insetInlineStart: t.logical({\n scale: \"space\",\n property: { ltr: \"left\", rtl: \"right\" }\n }),\n right: t.spaceT(\"right\"),\n insetInlineEnd: t.logical({\n scale: \"space\",\n property: { ltr: \"right\", rtl: \"left\" }\n })\n};\nObject.assign(position, {\n insetStart: position.insetInlineStart,\n insetEnd: position.insetInlineEnd\n});\n\n// src/config/ring.ts\nvar ring = {\n ring: { transform: transformFunctions.ring },\n ringColor: t.colors(\"--chakra-ring-color\"),\n ringOffset: t.prop(\"--chakra-ring-offset-width\"),\n ringOffsetColor: t.colors(\"--chakra-ring-offset-color\"),\n ringInset: t.prop(\"--chakra-ring-inset\")\n};\n\n// src/config/space.ts\nvar space = {\n margin: t.spaceT(\"margin\"),\n marginTop: t.spaceT(\"marginTop\"),\n marginBlockStart: t.spaceT(\"marginBlockStart\"),\n marginRight: t.spaceT(\"marginRight\"),\n marginInlineEnd: t.spaceT(\"marginInlineEnd\"),\n marginBottom: t.spaceT(\"marginBottom\"),\n marginBlockEnd: t.spaceT(\"marginBlockEnd\"),\n marginLeft: t.spaceT(\"marginLeft\"),\n marginInlineStart: t.spaceT(\"marginInlineStart\"),\n marginX: t.spaceT([\"marginInlineStart\", \"marginInlineEnd\"]),\n marginInline: t.spaceT(\"marginInline\"),\n marginY: t.spaceT([\"marginTop\", \"marginBottom\"]),\n marginBlock: t.spaceT(\"marginBlock\"),\n padding: t.space(\"padding\"),\n paddingTop: t.space(\"paddingTop\"),\n paddingBlockStart: t.space(\"paddingBlockStart\"),\n paddingRight: t.space(\"paddingRight\"),\n paddingBottom: t.space(\"paddingBottom\"),\n paddingBlockEnd: t.space(\"paddingBlockEnd\"),\n paddingLeft: t.space(\"paddingLeft\"),\n paddingInlineStart: t.space(\"paddingInlineStart\"),\n paddingInlineEnd: t.space(\"paddingInlineEnd\"),\n paddingX: t.space([\"paddingInlineStart\", \"paddingInlineEnd\"]),\n paddingInline: t.space(\"paddingInline\"),\n paddingY: t.space([\"paddingTop\", \"paddingBottom\"]),\n paddingBlock: t.space(\"paddingBlock\")\n};\nObject.assign(space, {\n m: space.margin,\n mt: space.marginTop,\n mr: space.marginRight,\n me: space.marginInlineEnd,\n marginEnd: space.marginInlineEnd,\n mb: space.marginBottom,\n ml: space.marginLeft,\n ms: space.marginInlineStart,\n marginStart: space.marginInlineStart,\n mx: space.marginX,\n my: space.marginY,\n p: space.padding,\n pt: space.paddingTop,\n py: space.paddingY,\n px: space.paddingX,\n pb: space.paddingBottom,\n pl: space.paddingLeft,\n ps: space.paddingInlineStart,\n paddingStart: space.paddingInlineStart,\n pr: space.paddingRight,\n pe: space.paddingInlineEnd,\n paddingEnd: space.paddingInlineEnd\n});\n\n// src/config/text-decoration.ts\nvar textDecoration = {\n textDecorationColor: t.colors(\"textDecorationColor\"),\n textDecoration: true,\n textDecor: { property: \"textDecoration\" },\n textDecorationLine: true,\n textDecorationStyle: true,\n textDecorationThickness: true,\n textUnderlineOffset: true,\n textShadow: t.shadows(\"textShadow\")\n};\n\n// src/config/transform.ts\nvar transform = {\n clipPath: true,\n transform: t.propT(\"transform\", transformFunctions.transform),\n transformOrigin: true,\n translateX: t.spaceT(\"--chakra-translate-x\"),\n translateY: t.spaceT(\"--chakra-translate-y\"),\n skewX: t.degreeT(\"--chakra-skew-x\"),\n skewY: t.degreeT(\"--chakra-skew-y\"),\n scaleX: t.prop(\"--chakra-scale-x\"),\n scaleY: t.prop(\"--chakra-scale-y\"),\n scale: t.prop([\"--chakra-scale-x\", \"--chakra-scale-y\"]),\n rotate: t.degreeT(\"--chakra-rotate\")\n};\n\n// src/config/transition.ts\nvar transition = {\n transition: true,\n transitionDelay: true,\n animation: true,\n willChange: true,\n transitionDuration: t.prop(\"transitionDuration\", \"transition.duration\"),\n transitionProperty: t.prop(\"transitionProperty\", \"transition.property\"),\n transitionTimingFunction: t.prop(\n \"transitionTimingFunction\",\n \"transition.easing\"\n )\n};\n\n// src/config/typography.ts\nvar typography = {\n fontFamily: t.prop(\"fontFamily\", \"fonts\"),\n fontSize: t.prop(\"fontSize\", \"fontSizes\", transformFunctions.px),\n fontWeight: t.prop(\"fontWeight\", \"fontWeights\"),\n lineHeight: t.prop(\"lineHeight\", \"lineHeights\"),\n letterSpacing: t.prop(\"letterSpacing\", \"letterSpacings\"),\n textAlign: true,\n fontStyle: true,\n textIndent: true,\n wordBreak: true,\n overflowWrap: true,\n textOverflow: true,\n textTransform: true,\n whiteSpace: true,\n isTruncated: {\n transform(value) {\n if (value === true) {\n return {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\"\n };\n }\n }\n },\n noOfLines: {\n static: {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n display: \"-webkit-box\",\n WebkitBoxOrient: \"vertical\",\n WebkitLineClamp: \"var(--chakra-line-clamp)\"\n },\n property: \"--chakra-line-clamp\"\n }\n};\n\n// src/config/scroll.ts\nvar scroll = {\n scrollBehavior: true,\n scrollSnapAlign: true,\n scrollSnapStop: true,\n scrollSnapType: true,\n scrollMargin: t.spaceT(\"scrollMargin\"),\n scrollMarginTop: t.spaceT(\"scrollMarginTop\"),\n scrollMarginBottom: t.spaceT(\"scrollMarginBottom\"),\n scrollMarginLeft: t.spaceT(\"scrollMarginLeft\"),\n scrollMarginRight: t.spaceT(\"scrollMarginRight\"),\n scrollMarginX: t.spaceT([\"scrollMarginLeft\", \"scrollMarginRight\"]),\n scrollMarginY: t.spaceT([\"scrollMarginTop\", \"scrollMarginBottom\"]),\n scrollPadding: t.spaceT(\"scrollPadding\"),\n scrollPaddingTop: t.spaceT(\"scrollPaddingTop\"),\n scrollPaddingBottom: t.spaceT(\"scrollPaddingBottom\"),\n scrollPaddingLeft: t.spaceT(\"scrollPaddingLeft\"),\n scrollPaddingRight: t.spaceT(\"scrollPaddingRight\"),\n scrollPaddingX: t.spaceT([\"scrollPaddingLeft\", \"scrollPaddingRight\"]),\n scrollPaddingY: t.spaceT([\"scrollPaddingTop\", \"scrollPaddingBottom\"])\n};\n\n// src/create-theme-vars/calc.ts\nimport { isObject as isObject2 } from \"@chakra-ui/shared-utils\";\nfunction resolveReference(operand) {\n if (isObject2(operand) && operand.reference) {\n return operand.reference;\n }\n return String(operand);\n}\nvar toExpression = (operator, ...operands) => operands.map(resolveReference).join(` ${operator} `).replace(/calc/g, \"\");\nvar add = (...operands) => `calc(${toExpression(\"+\", ...operands)})`;\nvar subtract = (...operands) => `calc(${toExpression(\"-\", ...operands)})`;\nvar multiply = (...operands) => `calc(${toExpression(\"*\", ...operands)})`;\nvar divide = (...operands) => `calc(${toExpression(\"/\", ...operands)})`;\nvar negate = (x) => {\n const value = resolveReference(x);\n if (value != null && !Number.isNaN(parseFloat(value))) {\n return String(value).startsWith(\"-\") ? String(value).slice(1) : `-${value}`;\n }\n return multiply(value, -1);\n};\nvar calc = Object.assign(\n (x) => ({\n add: (...operands) => calc(add(x, ...operands)),\n subtract: (...operands) => calc(subtract(x, ...operands)),\n multiply: (...operands) => calc(multiply(x, ...operands)),\n divide: (...operands) => calc(divide(x, ...operands)),\n negate: () => calc(negate(x)),\n toString: () => x.toString()\n }),\n {\n add,\n subtract,\n multiply,\n divide,\n negate\n }\n);\n\n// src/create-theme-vars/css-var.ts\nfunction replaceWhiteSpace(value, replaceValue = \"-\") {\n return value.replace(/\\s+/g, replaceValue);\n}\nfunction escape(value) {\n const valueStr = replaceWhiteSpace(value.toString());\n return escapeSymbol(escapeDot(valueStr));\n}\nfunction escapeDot(value) {\n if (value.includes(\"\\\\.\"))\n return value;\n const isDecimal = !Number.isInteger(parseFloat(value.toString()));\n return isDecimal ? value.replace(\".\", `\\\\.`) : value;\n}\nfunction escapeSymbol(value) {\n return value.replace(/[!-,/:-@[-^`{-~]/g, \"\\\\$&\");\n}\nfunction addPrefix(value, prefix = \"\") {\n return [prefix, value].filter(Boolean).join(\"-\");\n}\nfunction toVarReference(name, fallback) {\n return `var(${name}${fallback ? `, ${fallback}` : \"\"})`;\n}\nfunction toVarDefinition(value, prefix = \"\") {\n return escape(`--${addPrefix(value, prefix)}`);\n}\nfunction cssVar(name, fallback, cssVarPrefix) {\n const cssVariable = toVarDefinition(name, cssVarPrefix);\n return {\n variable: cssVariable,\n reference: toVarReference(cssVariable, fallback)\n };\n}\nfunction defineCssVars(scope, keys2) {\n const vars = {};\n for (const key of keys2) {\n if (Array.isArray(key)) {\n const [name, fallback] = key;\n vars[name] = cssVar(`${scope}-${name}`, fallback);\n continue;\n }\n vars[key] = cssVar(`${scope}-${key}`);\n }\n return vars;\n}\n\n// ../../utilities/breakpoint-utils/src/breakpoint.ts\nimport { isObject as isObject3 } from \"@chakra-ui/shared-utils\";\nfunction getLastItem(array) {\n const length = array == null ? 0 : array.length;\n return length ? array[length - 1] : void 0;\n}\nfunction analyzeCSSValue2(value) {\n const num = parseFloat(value.toString());\n const unit = value.toString().replace(String(num), \"\");\n return { unitless: !unit, value: num, unit };\n}\nfunction px(value) {\n if (value == null)\n return value;\n const { unitless } = analyzeCSSValue2(value);\n return unitless || typeof value === \"number\" ? `${value}px` : value;\n}\nvar sortByBreakpointValue = (a, b) => parseInt(a[1], 10) > parseInt(b[1], 10) ? 1 : -1;\nvar sortBps = (breakpoints) => Object.fromEntries(Object.entries(breakpoints).sort(sortByBreakpointValue));\nfunction normalize(breakpoints) {\n const sorted = sortBps(breakpoints);\n return Object.assign(Object.values(sorted), sorted);\n}\nfunction keys(breakpoints) {\n const value = Object.keys(sortBps(breakpoints));\n return new Set(value);\n}\nfunction subtract2(value) {\n var _a;\n if (!value)\n return value;\n value = (_a = px(value)) != null ? _a : value;\n const OFFSET = -0.02;\n return typeof value === \"number\" ? `${value + OFFSET}` : value.replace(/(\\d+\\.?\\d*)/u, (m) => `${parseFloat(m) + OFFSET}`);\n}\nfunction toMediaQueryString(min, max) {\n const query = [\"@media screen\"];\n if (min)\n query.push(\"and\", `(min-width: ${px(min)})`);\n if (max)\n query.push(\"and\", `(max-width: ${px(max)})`);\n return query.join(\" \");\n}\nfunction analyzeBreakpoints(breakpoints) {\n var _a;\n if (!breakpoints)\n return null;\n breakpoints.base = (_a = breakpoints.base) != null ? _a : \"0px\";\n const normalized = normalize(breakpoints);\n const queries = Object.entries(breakpoints).sort(sortByBreakpointValue).map(([breakpoint, minW], index, entry) => {\n var _a2;\n let [, maxW] = (_a2 = entry[index + 1]) != null ? _a2 : [];\n maxW = parseFloat(maxW) > 0 ? subtract2(maxW) : void 0;\n return {\n _minW: subtract2(minW),\n breakpoint,\n minW,\n maxW,\n maxWQuery: toMediaQueryString(null, maxW),\n minWQuery: toMediaQueryString(minW),\n minMaxQuery: toMediaQueryString(minW, maxW)\n };\n });\n const _keys = keys(breakpoints);\n const _keysArr = Array.from(_keys.values());\n return {\n keys: _keys,\n normalized,\n isResponsive(test) {\n const keys2 = Object.keys(test);\n return keys2.length > 0 && keys2.every((key) => _keys.has(key));\n },\n asObject: sortBps(breakpoints),\n asArray: normalize(breakpoints),\n details: queries,\n get(key) {\n return queries.find((q) => q.breakpoint === key);\n },\n media: [\n null,\n ...normalized.map((minW) => toMediaQueryString(minW)).slice(1)\n ],\n toArrayValue(test) {\n if (!isObject3(test)) {\n throw new Error(\"toArrayValue: value must be an object\");\n }\n const result = _keysArr.map((bp) => {\n var _a2;\n return (_a2 = test[bp]) != null ? _a2 : null;\n });\n while (getLastItem(result) === null) {\n result.pop();\n }\n return result;\n },\n toObjectValue(test) {\n if (!Array.isArray(test)) {\n throw new Error(\"toObjectValue: value must be an array\");\n }\n return test.reduce((acc, value, index) => {\n const key = _keysArr[index];\n if (key != null && value != null)\n acc[key] = value;\n return acc;\n }, {});\n }\n };\n}\n\n// src/create-theme-vars/create-theme-vars.ts\nimport { isObject as isObject4 } from \"@chakra-ui/shared-utils\";\n\n// src/pseudos.ts\nvar state = {\n hover: (str, post) => `${str}:hover ${post}, ${str}[data-hover] ${post}`,\n focus: (str, post) => `${str}:focus ${post}, ${str}[data-focus] ${post}`,\n focusVisible: (str, post) => `${str}:focus-visible ${post}`,\n focusWithin: (str, post) => `${str}:focus-within ${post}`,\n active: (str, post) => `${str}:active ${post}, ${str}[data-active] ${post}`,\n disabled: (str, post) => `${str}:disabled ${post}, ${str}[data-disabled] ${post}`,\n invalid: (str, post) => `${str}:invalid ${post}, ${str}[data-invalid] ${post}`,\n checked: (str, post) => `${str}:checked ${post}, ${str}[data-checked] ${post}`,\n indeterminate: (str, post) => `${str}:indeterminate ${post}, ${str}[aria-checked=mixed] ${post}, ${str}[data-indeterminate] ${post}`,\n readOnly: (str, post) => `${str}:read-only ${post}, ${str}[readonly] ${post}, ${str}[data-read-only] ${post}`,\n expanded: (str, post) => `${str}:read-only ${post}, ${str}[aria-expanded=true] ${post}, ${str}[data-expanded] ${post}`,\n placeholderShown: (str, post) => `${str}:placeholder-shown ${post}`\n};\nvar toGroup = (fn) => merge((v) => fn(v, \"&\"), \"[role=group]\", \"[data-group]\", \".group\");\nvar toPeer = (fn) => merge((v) => fn(v, \"~ &\"), \"[data-peer]\", \".peer\");\nvar merge = (fn, ...selectors) => selectors.map(fn).join(\", \");\nvar pseudoSelectors = {\n _hover: \"&:hover, &[data-hover]\",\n _active: \"&:active, &[data-active]\",\n _focus: \"&:focus, &[data-focus]\",\n _highlighted: \"&[data-highlighted]\",\n _focusWithin: \"&:focus-within\",\n _focusVisible: \"&:focus-visible, &[data-focus-visible]\",\n _disabled: \"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]\",\n _readOnly: \"&[aria-readonly=true], &[readonly], &[data-readonly]\",\n _before: \"&::before\",\n _after: \"&::after\",\n _empty: \"&:empty\",\n _expanded: \"&[aria-expanded=true], &[data-expanded]\",\n _checked: \"&[aria-checked=true], &[data-checked]\",\n _grabbed: \"&[aria-grabbed=true], &[data-grabbed]\",\n _pressed: \"&[aria-pressed=true], &[data-pressed]\",\n _invalid: \"&[aria-invalid=true], &[data-invalid]\",\n _valid: \"&[data-valid], &[data-state=valid]\",\n _loading: \"&[data-loading], &[aria-busy=true]\",\n _selected: \"&[aria-selected=true], &[data-selected]\",\n _hidden: \"&[hidden], &[data-hidden]\",\n _autofill: \"&:-webkit-autofill\",\n _even: \"&:nth-of-type(even)\",\n _odd: \"&:nth-of-type(odd)\",\n _first: \"&:first-of-type\",\n _firstLetter: \"&::first-letter\",\n _last: \"&:last-of-type\",\n _notFirst: \"&:not(:first-of-type)\",\n _notLast: \"&:not(:last-of-type)\",\n _visited: \"&:visited\",\n _activeLink: \"&[aria-current=page]\",\n _activeStep: \"&[aria-current=step]\",\n _indeterminate: \"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]\",\n _groupHover: toGroup(state.hover),\n _peerHover: toPeer(state.hover),\n _groupFocus: toGroup(state.focus),\n _peerFocus: toPeer(state.focus),\n _groupFocusVisible: toGroup(state.focusVisible),\n _peerFocusVisible: toPeer(state.focusVisible),\n _groupActive: toGroup(state.active),\n _peerActive: toPeer(state.active),\n _groupDisabled: toGroup(state.disabled),\n _peerDisabled: toPeer(state.disabled),\n _groupInvalid: toGroup(state.invalid),\n _peerInvalid: toPeer(state.invalid),\n _groupChecked: toGroup(state.checked),\n _peerChecked: toPeer(state.checked),\n _groupFocusWithin: toGroup(state.focusWithin),\n _peerFocusWithin: toPeer(state.focusWithin),\n _peerPlaceholderShown: toPeer(state.placeholderShown),\n _placeholder: \"&::placeholder\",\n _placeholderShown: \"&:placeholder-shown\",\n _fullScreen: \"&:fullscreen\",\n _selection: \"&::selection\",\n _rtl: \"[dir=rtl] &, &[dir=rtl]\",\n _ltr: \"[dir=ltr] &, &[dir=ltr]\",\n _mediaDark: \"@media (prefers-color-scheme: dark)\",\n _mediaReduceMotion: \"@media (prefers-reduced-motion: reduce)\",\n _dark: \".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]\",\n _light: \".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]\"\n};\nvar pseudoPropNames = Object.keys(\n pseudoSelectors\n);\n\n// src/create-theme-vars/create-theme-vars.ts\nimport mergeWith from \"lodash.mergewith\";\nfunction tokenToCssVar(token, prefix) {\n return cssVar(String(token).replace(/\\./g, \"-\"), void 0, prefix);\n}\nfunction createThemeVars(flatTokens, options) {\n let cssVars = {};\n const cssMap = {};\n for (const [token, tokenValue] of Object.entries(flatTokens)) {\n const { isSemantic, value } = tokenValue;\n const { variable, reference } = tokenToCssVar(token, options == null ? void 0 : options.cssVarPrefix);\n if (!isSemantic) {\n if (token.startsWith(\"space\")) {\n const keys2 = token.split(\".\");\n const [firstKey, ...referenceKeys] = keys2;\n const negativeLookupKey = `${firstKey}.-${referenceKeys.join(\".\")}`;\n const negativeValue = calc.negate(value);\n const negatedReference = calc.negate(reference);\n cssMap[negativeLookupKey] = {\n value: negativeValue,\n var: variable,\n varRef: negatedReference\n };\n }\n cssVars[variable] = value;\n cssMap[token] = {\n value,\n var: variable,\n varRef: reference\n };\n continue;\n }\n const lookupToken = (maybeToken) => {\n const scale = String(token).split(\".\")[0];\n const withScale = [scale, maybeToken].join(\".\");\n const resolvedTokenValue = flatTokens[withScale];\n if (!resolvedTokenValue)\n return maybeToken;\n const { reference: reference2 } = tokenToCssVar(withScale, options == null ? void 0 : options.cssVarPrefix);\n return reference2;\n };\n const normalizedValue = isObject4(value) ? value : { default: value };\n cssVars = mergeWith(\n cssVars,\n Object.entries(normalizedValue).reduce(\n (acc, [conditionAlias, conditionValue]) => {\n var _a, _b;\n const maybeReference = lookupToken(conditionValue.toString());\n if (conditionAlias === \"default\") {\n acc[variable] = maybeReference;\n return acc;\n }\n const conditionSelector = (_b = (_a = pseudoSelectors) == null ? void 0 : _a[conditionAlias]) != null ? _b : conditionAlias;\n acc[conditionSelector] = { [variable]: maybeReference };\n return acc;\n },\n {}\n )\n );\n cssMap[token] = {\n value: reference,\n var: variable,\n varRef: reference\n };\n }\n return {\n cssVars,\n cssMap\n };\n}\n\n// ../../utilities/object-utils/src/index.ts\nfunction omit(object, keysToOmit = []) {\n const clone = Object.assign({}, object);\n for (const key of keysToOmit) {\n if (key in clone) {\n delete clone[key];\n }\n }\n return clone;\n}\nfunction pick(object, keysToPick) {\n const result = {};\n for (const key of keysToPick) {\n if (key in object) {\n result[key] = object[key];\n }\n }\n return result;\n}\n\n// src/create-theme-vars/theme-tokens.ts\nvar tokens = [\n \"colors\",\n \"borders\",\n \"borderWidths\",\n \"borderStyles\",\n \"fonts\",\n \"fontSizes\",\n \"fontWeights\",\n \"gradients\",\n \"letterSpacings\",\n \"lineHeights\",\n \"radii\",\n \"space\",\n \"shadows\",\n \"sizes\",\n \"zIndices\",\n \"transition\",\n \"blur\",\n \"breakpoints\"\n];\nfunction extractTokens(theme) {\n const _tokens = tokens;\n return pick(theme, _tokens);\n}\nfunction extractSemanticTokens(theme) {\n return theme.semanticTokens;\n}\nfunction omitVars(rawTheme) {\n const { __cssMap, __cssVars, __breakpoints, ...cleanTheme } = rawTheme;\n return cleanTheme;\n}\n\n// src/create-theme-vars/flatten-tokens.ts\nimport { isObject as isObject5 } from \"@chakra-ui/shared-utils\";\nfunction flattenTokens({\n tokens: tokens2,\n semanticTokens\n}) {\n var _a, _b;\n const tokenEntries = Object.entries((_a = flatten(tokens2)) != null ? _a : {}).map(\n ([token, value]) => {\n const enhancedToken = { isSemantic: false, value };\n return [token, enhancedToken];\n }\n );\n const semanticTokenEntries = Object.entries(\n (_b = flatten(semanticTokens, 1)) != null ? _b : {}\n ).map(([token, value]) => {\n const enhancedToken = { isSemantic: true, value };\n return [token, enhancedToken];\n });\n return Object.fromEntries([\n ...tokenEntries,\n ...semanticTokenEntries\n ]);\n}\nfunction flatten(target, maxDepth = Infinity) {\n if (!isObject5(target) && !Array.isArray(target) || !maxDepth) {\n return target;\n }\n return Object.entries(target).reduce((result, [key, value]) => {\n if (isObject5(value) || Array.isArray(value)) {\n Object.entries(flatten(value, maxDepth - 1)).forEach(\n ([childKey, childValue]) => {\n result[`${key}.${childKey}`] = childValue;\n }\n );\n } else {\n result[key] = value;\n }\n return result;\n }, {});\n}\n\n// src/create-theme-vars/to-css-var.ts\nfunction toCSSVar(rawTheme) {\n var _a;\n const theme = omitVars(rawTheme);\n const tokens2 = extractTokens(theme);\n const semanticTokens = extractSemanticTokens(theme);\n const flatTokens = flattenTokens({ tokens: tokens2, semanticTokens });\n const cssVarPrefix = (_a = theme.config) == null ? void 0 : _a.cssVarPrefix;\n const {\n cssMap,\n cssVars\n } = createThemeVars(flatTokens, { cssVarPrefix });\n const defaultCssVars = {\n \"--chakra-ring-inset\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-ring-offset-width\": \"0px\",\n \"--chakra-ring-offset-color\": \"#fff\",\n \"--chakra-ring-color\": \"rgba(66, 153, 225, 0.6)\",\n \"--chakra-ring-offset-shadow\": \"0 0 #0000\",\n \"--chakra-ring-shadow\": \"0 0 #0000\",\n \"--chakra-space-x-reverse\": \"0\",\n \"--chakra-space-y-reverse\": \"0\"\n };\n Object.assign(theme, {\n __cssVars: { ...defaultCssVars, ...cssVars },\n __cssMap: cssMap,\n __breakpoints: analyzeBreakpoints(theme.breakpoints)\n });\n return theme;\n}\n\n// src/css.ts\nimport { isObject as isObject7, runIfFn as runIfFn2 } from \"@chakra-ui/shared-utils\";\nimport mergeWith3 from \"lodash.mergewith\";\n\n// src/system.ts\nimport mergeWith2 from \"lodash.mergewith\";\nvar systemProps = mergeWith2(\n {},\n background,\n border,\n color,\n flexbox,\n layout,\n filter,\n ring,\n interactivity,\n grid,\n others,\n position,\n effect,\n space,\n scroll,\n typography,\n textDecoration,\n transform,\n list,\n transition\n);\nvar layoutSystem = Object.assign({}, space, layout, flexbox, grid, position);\nvar layoutPropNames = Object.keys(\n layoutSystem\n);\nvar propNames = [...Object.keys(systemProps), ...pseudoPropNames];\nvar styleProps = { ...systemProps, ...pseudoSelectors };\nvar isStyleProp = (prop) => prop in styleProps;\n\n// src/utils/expand-responsive.ts\nimport { isObject as isObject6, runIfFn } from \"@chakra-ui/shared-utils\";\nvar expandResponsive = (styles) => (theme) => {\n if (!theme.__breakpoints)\n return styles;\n const { isResponsive, toArrayValue, media: medias } = theme.__breakpoints;\n const computedStyles = {};\n for (const key in styles) {\n let value = runIfFn(styles[key], theme);\n if (value == null)\n continue;\n value = isObject6(value) && isResponsive(value) ? toArrayValue(value) : value;\n if (!Array.isArray(value)) {\n computedStyles[key] = value;\n continue;\n }\n const queries = value.slice(0, medias.length).length;\n for (let index = 0; index < queries; index += 1) {\n const media = medias == null ? void 0 : medias[index];\n if (!media) {\n computedStyles[key] = value[index];\n continue;\n }\n computedStyles[media] = computedStyles[media] || {};\n if (value[index] == null) {\n continue;\n }\n computedStyles[media][key] = value[index];\n }\n }\n return computedStyles;\n};\n\n// src/utils/split-by-comma.ts\nfunction splitByComma(value) {\n const chunks = [];\n let chunk = \"\";\n let inParens = false;\n for (let i = 0; i < value.length; i++) {\n const char = value[i];\n if (char === \"(\") {\n inParens = true;\n chunk += char;\n } else if (char === \")\") {\n inParens = false;\n chunk += char;\n } else if (char === \",\" && !inParens) {\n chunks.push(chunk);\n chunk = \"\";\n } else {\n chunk += char;\n }\n }\n chunk = chunk.trim();\n if (chunk) {\n chunks.push(chunk);\n }\n return chunks;\n}\n\n// src/css.ts\nfunction isCssVar2(value) {\n return /^var\\(--.+\\)$/.test(value);\n}\nvar isCSSVariableTokenValue = (key, value) => key.startsWith(\"--\") && typeof value === \"string\" && !isCssVar2(value);\nvar resolveTokenValue = (theme, value) => {\n var _a, _b;\n if (value == null)\n return value;\n const getVar = (val) => {\n var _a2, _b2;\n return (_b2 = (_a2 = theme.__cssMap) == null ? void 0 : _a2[val]) == null ? void 0 : _b2.varRef;\n };\n const getValue = (val) => {\n var _a2;\n return (_a2 = getVar(val)) != null ? _a2 : val;\n };\n const [tokenValue, fallbackValue] = splitByComma(value);\n value = (_b = (_a = getVar(tokenValue)) != null ? _a : getValue(fallbackValue)) != null ? _b : getValue(value);\n return value;\n};\nfunction getCss(options) {\n const { configs = {}, pseudos = {}, theme } = options;\n const css2 = (stylesOrFn, nested = false) => {\n var _a, _b, _c;\n const _styles = runIfFn2(stylesOrFn, theme);\n const styles = expandResponsive(_styles)(theme);\n let computedStyles = {};\n for (let key in styles) {\n const valueOrFn = styles[key];\n let value = runIfFn2(valueOrFn, theme);\n if (key in pseudos) {\n key = pseudos[key];\n }\n if (isCSSVariableTokenValue(key, value)) {\n value = resolveTokenValue(theme, value);\n }\n let config = configs[key];\n if (config === true) {\n config = { property: key };\n }\n if (isObject7(value)) {\n computedStyles[key] = (_a = computedStyles[key]) != null ? _a : {};\n computedStyles[key] = mergeWith3(\n {},\n computedStyles[key],\n css2(value, true)\n );\n continue;\n }\n let rawValue = (_c = (_b = config == null ? void 0 : config.transform) == null ? void 0 : _b.call(config, value, theme, _styles)) != null ? _c : value;\n rawValue = (config == null ? void 0 : config.processResult) ? css2(rawValue, true) : rawValue;\n const configProperty = runIfFn2(config == null ? void 0 : config.property, theme);\n if (!nested && (config == null ? void 0 : config.static)) {\n const staticStyles = runIfFn2(config.static, theme);\n computedStyles = mergeWith3({}, computedStyles, staticStyles);\n }\n if (configProperty && Array.isArray(configProperty)) {\n for (const property of configProperty) {\n computedStyles[property] = rawValue;\n }\n continue;\n }\n if (configProperty) {\n if (configProperty === \"&\" && isObject7(rawValue)) {\n computedStyles = mergeWith3({}, computedStyles, rawValue);\n } else {\n computedStyles[configProperty] = rawValue;\n }\n continue;\n }\n if (isObject7(rawValue)) {\n computedStyles = mergeWith3({}, computedStyles, rawValue);\n continue;\n }\n computedStyles[key] = rawValue;\n }\n return computedStyles;\n };\n return css2;\n}\nvar css = (styles) => (theme) => {\n const cssFn = getCss({\n theme,\n pseudos: pseudoSelectors,\n configs: systemProps\n });\n return cssFn(styles);\n};\n\n// src/define-styles.ts\nfunction defineStyle(styles) {\n return styles;\n}\nfunction defineStyleConfig(config) {\n return config;\n}\nfunction createMultiStyleConfigHelpers(parts) {\n return {\n definePartsStyle(config) {\n return config;\n },\n defineMultiStyleConfig(config) {\n return { parts, ...config };\n }\n };\n}\n\n// src/style-config.ts\nimport { runIfFn as runIfFn3, isObject as isObject8 } from \"@chakra-ui/shared-utils\";\nimport mergeWith4 from \"lodash.mergewith\";\nfunction normalize2(value, toArray) {\n if (Array.isArray(value))\n return value;\n if (isObject8(value))\n return toArray(value);\n if (value != null)\n return [value];\n}\nfunction getNextIndex(values, i) {\n for (let j = i + 1; j < values.length; j++) {\n if (values[j] != null)\n return j;\n }\n return -1;\n}\nfunction createResolver(theme) {\n const breakpointUtil = theme.__breakpoints;\n return function resolver(config, prop, value, props) {\n var _a, _b;\n if (!breakpointUtil)\n return;\n const result = {};\n const normalized = normalize2(value, breakpointUtil.toArrayValue);\n if (!normalized)\n return result;\n const len = normalized.length;\n const isSingle = len === 1;\n const isMultipart = !!config.parts;\n for (let i = 0; i < len; i++) {\n const key = breakpointUtil.details[i];\n const nextKey = breakpointUtil.details[getNextIndex(normalized, i)];\n const query = toMediaQueryString(key.minW, nextKey == null ? void 0 : nextKey._minW);\n const styles = runIfFn3((_a = config[prop]) == null ? void 0 : _a[normalized[i]], props);\n if (!styles)\n continue;\n if (isMultipart) {\n (_b = config.parts) == null ? void 0 : _b.forEach((part) => {\n mergeWith4(result, {\n [part]: isSingle ? styles[part] : { [query]: styles[part] }\n });\n });\n continue;\n }\n if (!isMultipart) {\n if (isSingle)\n mergeWith4(result, styles);\n else\n result[query] = styles;\n continue;\n }\n result[query] = styles;\n }\n return result;\n };\n}\nfunction resolveStyleConfig(config) {\n return (props) => {\n var _a;\n const { variant, size, theme } = props;\n const recipe = createResolver(theme);\n return mergeWith4(\n {},\n runIfFn3((_a = config.baseStyle) != null ? _a : {}, props),\n recipe(config, \"sizes\", size, props),\n recipe(config, \"variants\", variant, props)\n );\n };\n}\n\n// src/get-css-var.ts\nfunction getCSSVar(theme, scale, value) {\n var _a, _b, _c;\n return (_c = (_b = (_a = theme.__cssMap) == null ? void 0 : _a[`${scale}.${value}`]) == null ? void 0 : _b.varRef) != null ? _c : value;\n}\n\n// src/theming-props.ts\nfunction omitThemingProps(props) {\n return omit(props, [\"styleConfig\", \"size\", \"variant\", \"colorScheme\"]);\n}\nexport {\n addPrefix,\n background,\n border,\n calc,\n color,\n createMultiStyleConfigHelpers,\n css,\n cssVar,\n defineCssVars,\n defineStyle,\n defineStyleConfig,\n effect,\n filter,\n flatten,\n flattenTokens,\n flexbox,\n getCSSVar,\n getCss,\n grid,\n interactivity,\n isStyleProp,\n layout,\n layoutPropNames,\n list,\n omitThemingProps,\n others,\n position,\n propNames,\n pseudoPropNames,\n pseudoSelectors,\n resolveStyleConfig,\n ring,\n scroll,\n space,\n systemProps,\n textDecoration,\n toCSSVar,\n toVarDefinition,\n toVarReference,\n tokenToCSSVar,\n transform,\n transition,\n typography\n};\n","// src/components/stepper.ts\nimport { createMultiStyleConfigHelpers, cssVar } from \"@chakra-ui/styled-system\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers([\n \"stepper\",\n \"step\",\n \"title\",\n \"description\",\n \"indicator\",\n \"separator\",\n \"icon\",\n \"number\"\n]);\nvar $size = cssVar(\"stepper-indicator-size\");\nvar $iconSize = cssVar(\"stepper-icon-size\");\nvar $titleFontSize = cssVar(\"stepper-title-font-size\");\nvar $descFontSize = cssVar(\"stepper-description-font-size\");\nvar $accentColor = cssVar(\"stepper-accent-color\");\nvar baseStyle = definePartsStyle(({ colorScheme: c }) => ({\n stepper: {\n display: \"flex\",\n justifyContent: \"space-between\",\n gap: \"4\",\n \"&[data-orientation=vertical]\": {\n flexDirection: \"column\",\n alignItems: \"flex-start\"\n },\n \"&[data-orientation=horizontal]\": {\n flexDirection: \"row\",\n alignItems: \"center\"\n },\n [$accentColor.variable]: `colors.${c}.500`,\n _dark: {\n [$accentColor.variable]: `colors.${c}.200`\n }\n },\n title: {\n fontSize: $titleFontSize.reference,\n fontWeight: \"medium\"\n },\n description: {\n fontSize: $descFontSize.reference,\n color: \"chakra-subtle-text\"\n },\n number: {\n fontSize: $titleFontSize.reference\n },\n step: {\n flexShrink: 0,\n position: \"relative\",\n display: \"flex\",\n gap: \"2\",\n \"&[data-orientation=horizontal]\": {\n alignItems: \"center\"\n },\n \"&:not(:last-of-type)\": {\n flex: \"1\"\n }\n },\n icon: {\n flexShrink: 0,\n width: $iconSize.reference,\n height: $iconSize.reference\n },\n indicator: {\n flexShrink: 0,\n borderRadius: \"full\",\n width: $size.reference,\n height: $size.reference,\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n \"&[data-status=active]\": {\n borderWidth: \"2px\",\n borderColor: $accentColor.reference\n },\n \"&[data-status=complete]\": {\n bg: $accentColor.reference,\n color: \"chakra-inverse-text\"\n },\n \"&[data-status=incomplete]\": {\n borderWidth: \"2px\"\n }\n },\n separator: {\n bg: \"chakra-border-color\",\n flex: \"1\",\n \"&[data-status=complete]\": {\n bg: $accentColor.reference\n },\n \"&[data-orientation=horizontal]\": {\n width: \"100%\",\n height: \"2px\",\n marginStart: \"2\"\n },\n \"&[data-orientation=vertical]\": {\n width: \"2px\",\n position: \"absolute\",\n height: \"100%\",\n maxHeight: `calc(100% - ${$size.reference} - 8px)`,\n top: `calc(${$size.reference} + 4px)`,\n insetStart: `calc(${$size.reference} / 2 - 1px)`\n }\n }\n}));\nvar stepperTheme = defineMultiStyleConfig({\n baseStyle,\n sizes: {\n xs: definePartsStyle({\n stepper: {\n [$size.variable]: \"sizes.4\",\n [$iconSize.variable]: \"sizes.3\",\n [$titleFontSize.variable]: \"fontSizes.xs\",\n [$descFontSize.variable]: \"fontSizes.xs\"\n }\n }),\n sm: definePartsStyle({\n stepper: {\n [$size.variable]: \"sizes.6\",\n [$iconSize.variable]: \"sizes.4\",\n [$titleFontSize.variable]: \"fontSizes.sm\",\n [$descFontSize.variable]: \"fontSizes.xs\"\n }\n }),\n md: definePartsStyle({\n stepper: {\n [$size.variable]: \"sizes.8\",\n [$iconSize.variable]: \"sizes.5\",\n [$titleFontSize.variable]: \"fontSizes.md\",\n [$descFontSize.variable]: \"fontSizes.sm\"\n }\n }),\n lg: definePartsStyle({\n stepper: {\n [$size.variable]: \"sizes.10\",\n [$iconSize.variable]: \"sizes.6\",\n [$titleFontSize.variable]: \"fontSizes.lg\",\n [$descFontSize.variable]: \"fontSizes.md\"\n }\n })\n },\n defaultProps: {\n size: \"md\",\n colorScheme: \"blue\"\n }\n});\n\nexport {\n stepperTheme\n};\n","// src/anatomy.ts\nfunction anatomy(name, map = {}) {\n let called = false;\n function assert() {\n if (!called) {\n called = true;\n return;\n }\n throw new Error(\n \"[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?\"\n );\n }\n function parts(...values) {\n assert();\n for (const part of values) {\n ;\n map[part] = toPart(part);\n }\n return anatomy(name, map);\n }\n function extend(...parts2) {\n for (const part of parts2) {\n if (part in map)\n continue;\n map[part] = toPart(part);\n }\n return anatomy(name, map);\n }\n function selectors() {\n const value = Object.fromEntries(\n Object.entries(map).map(([key, part]) => [key, part.selector])\n );\n return value;\n }\n function classnames() {\n const value = Object.fromEntries(\n Object.entries(map).map(([key, part]) => [key, part.className])\n );\n return value;\n }\n function toPart(part) {\n const el = [\"container\", \"root\"].includes(part != null ? part : \"\") ? [name] : [name, part];\n const attr = el.filter(Boolean).join(\"__\");\n const className = `chakra-${attr}`;\n const partObj = {\n className,\n selector: `.${className}`,\n toString: () => part\n };\n return partObj;\n }\n const __type = {};\n return {\n parts,\n toPart,\n extend,\n selectors,\n classnames,\n get keys() {\n return Object.keys(map);\n },\n __type\n };\n}\n\nexport {\n anatomy\n};\n","import {\n anatomy\n} from \"./chunk-ZN6IUO2A.mjs\";\n\n// src/components.ts\nvar accordionAnatomy = anatomy(\"accordion\").parts(\"root\", \"container\", \"button\", \"panel\").extend(\"icon\");\nvar alertAnatomy = anatomy(\"alert\").parts(\"title\", \"description\", \"container\").extend(\"icon\", \"spinner\");\nvar avatarAnatomy = anatomy(\"avatar\").parts(\"label\", \"badge\", \"container\").extend(\"excessLabel\", \"group\");\nvar breadcrumbAnatomy = anatomy(\"breadcrumb\").parts(\"link\", \"item\", \"container\").extend(\"separator\");\nvar buttonAnatomy = anatomy(\"button\").parts();\nvar checkboxAnatomy = anatomy(\"checkbox\").parts(\"control\", \"icon\", \"container\").extend(\"label\");\nvar circularProgressAnatomy = anatomy(\"progress\").parts(\"track\", \"filledTrack\").extend(\"label\");\nvar drawerAnatomy = anatomy(\"drawer\").parts(\"overlay\", \"dialogContainer\", \"dialog\").extend(\"header\", \"closeButton\", \"body\", \"footer\");\nvar editableAnatomy = anatomy(\"editable\").parts(\n \"preview\",\n \"input\",\n \"textarea\"\n);\nvar formAnatomy = anatomy(\"form\").parts(\n \"container\",\n \"requiredIndicator\",\n \"helperText\"\n);\nvar formErrorAnatomy = anatomy(\"formError\").parts(\"text\", \"icon\");\nvar inputAnatomy = anatomy(\"input\").parts(\"addon\", \"field\", \"element\");\nvar listAnatomy = anatomy(\"list\").parts(\"container\", \"item\", \"icon\");\nvar menuAnatomy = anatomy(\"menu\").parts(\"button\", \"list\", \"item\").extend(\"groupTitle\", \"command\", \"divider\");\nvar modalAnatomy = anatomy(\"modal\").parts(\"overlay\", \"dialogContainer\", \"dialog\").extend(\"header\", \"closeButton\", \"body\", \"footer\");\nvar numberInputAnatomy = anatomy(\"numberinput\").parts(\n \"root\",\n \"field\",\n \"stepperGroup\",\n \"stepper\"\n);\nvar pinInputAnatomy = anatomy(\"pininput\").parts(\"field\");\nvar popoverAnatomy = anatomy(\"popover\").parts(\"content\", \"header\", \"body\", \"footer\").extend(\"popper\", \"arrow\", \"closeButton\");\nvar progressAnatomy = anatomy(\"progress\").parts(\n \"label\",\n \"filledTrack\",\n \"track\"\n);\nvar radioAnatomy = anatomy(\"radio\").parts(\n \"container\",\n \"control\",\n \"label\"\n);\nvar selectAnatomy = anatomy(\"select\").parts(\"field\", \"icon\");\nvar sliderAnatomy = anatomy(\"slider\").parts(\n \"container\",\n \"track\",\n \"thumb\",\n \"filledTrack\",\n \"mark\"\n);\nvar statAnatomy = anatomy(\"stat\").parts(\n \"container\",\n \"label\",\n \"helpText\",\n \"number\",\n \"icon\"\n);\nvar switchAnatomy = anatomy(\"switch\").parts(\n \"container\",\n \"track\",\n \"thumb\"\n);\nvar tableAnatomy = anatomy(\"table\").parts(\n \"table\",\n \"thead\",\n \"tbody\",\n \"tr\",\n \"th\",\n \"td\",\n \"tfoot\",\n \"caption\"\n);\nvar tabsAnatomy = anatomy(\"tabs\").parts(\n \"root\",\n \"tab\",\n \"tablist\",\n \"tabpanel\",\n \"tabpanels\",\n \"indicator\"\n);\nvar tagAnatomy = anatomy(\"tag\").parts(\n \"container\",\n \"label\",\n \"closeButton\"\n);\nvar cardAnatomy = anatomy(\"card\").parts(\n \"container\",\n \"header\",\n \"body\",\n \"footer\"\n);\n\nexport {\n accordionAnatomy,\n alertAnatomy,\n avatarAnatomy,\n breadcrumbAnatomy,\n buttonAnatomy,\n checkboxAnatomy,\n circularProgressAnatomy,\n drawerAnatomy,\n editableAnatomy,\n formAnatomy,\n formErrorAnatomy,\n inputAnatomy,\n listAnatomy,\n menuAnatomy,\n modalAnatomy,\n numberInputAnatomy,\n pinInputAnatomy,\n popoverAnatomy,\n progressAnatomy,\n radioAnatomy,\n selectAnatomy,\n sliderAnatomy,\n statAnatomy,\n switchAnatomy,\n tableAnatomy,\n tabsAnatomy,\n tagAnatomy,\n cardAnatomy\n};\n","/**\n * A simple guard function:\n *\n * ```js\n * Math.min(Math.max(low, value), high)\n * ```\n */\nfunction guard(low, high, value) {\n return Math.min(Math.max(low, value), high);\n}\n\nclass ColorError extends Error {\n constructor(color) {\n super(`Failed to parse color: \"${color}\"`);\n }\n}\nvar ColorError$1 = ColorError;\n\n/**\n * Parses a color into red, gree, blue, alpha parts\n *\n * @param color the input color. Can be a RGB, RBGA, HSL, HSLA, or named color\n */\nfunction parseToRgba(color) {\n if (typeof color !== 'string') throw new ColorError$1(color);\n if (color.trim().toLowerCase() === 'transparent') return [0, 0, 0, 0];\n let normalizedColor = color.trim();\n normalizedColor = namedColorRegex.test(color) ? nameToHex(color) : color;\n const reducedHexMatch = reducedHexRegex.exec(normalizedColor);\n if (reducedHexMatch) {\n const arr = Array.from(reducedHexMatch).slice(1);\n return [...arr.slice(0, 3).map(x => parseInt(r(x, 2), 16)), parseInt(r(arr[3] || 'f', 2), 16) / 255];\n }\n const hexMatch = hexRegex.exec(normalizedColor);\n if (hexMatch) {\n const arr = Array.from(hexMatch).slice(1);\n return [...arr.slice(0, 3).map(x => parseInt(x, 16)), parseInt(arr[3] || 'ff', 16) / 255];\n }\n const rgbaMatch = rgbaRegex.exec(normalizedColor);\n if (rgbaMatch) {\n const arr = Array.from(rgbaMatch).slice(1);\n return [...arr.slice(0, 3).map(x => parseInt(x, 10)), parseFloat(arr[3] || '1')];\n }\n const hslaMatch = hslaRegex.exec(normalizedColor);\n if (hslaMatch) {\n const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);\n if (guard(0, 100, s) !== s) throw new ColorError$1(color);\n if (guard(0, 100, l) !== l) throw new ColorError$1(color);\n return [...hslToRgb(h, s, l), Number.isNaN(a) ? 1 : a];\n }\n throw new ColorError$1(color);\n}\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i) {\n hash = hash * 33 ^ str.charCodeAt(--i);\n }\n\n /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed\n * integers. Since we want the results to be always positive, convert the\n * signed int to an unsigned by doing an unsigned bitshift. */\n return (hash >>> 0) % 2341;\n}\nconst colorToInt = x => parseInt(x.replace(/_/g, ''), 36);\nconst compressedColorMap = '1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm'.split(' ').reduce((acc, next) => {\n const key = colorToInt(next.substring(0, 3));\n const hex = colorToInt(next.substring(3)).toString(16);\n\n // NOTE: padStart could be used here but it breaks Node 6 compat\n // https://github.com/ricokahler/color2k/issues/351\n let prefix = '';\n for (let i = 0; i < 6 - hex.length; i++) {\n prefix += '0';\n }\n acc[key] = `${prefix}${hex}`;\n return acc;\n}, {});\n\n/**\n * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.\n */\nfunction nameToHex(color) {\n const normalizedColorName = color.toLowerCase().trim();\n const result = compressedColorMap[hash(normalizedColorName)];\n if (!result) throw new ColorError$1(color);\n return `#${result}`;\n}\nconst r = (str, amount) => Array.from(Array(amount)).map(() => str).join('');\nconst reducedHexRegex = new RegExp(`^#${r('([a-f0-9])', 3)}([a-f0-9])?$`, 'i');\nconst hexRegex = new RegExp(`^#${r('([a-f0-9]{2})', 3)}([a-f0-9]{2})?$`, 'i');\nconst rgbaRegex = new RegExp(`^rgba?\\\\(\\\\s*(\\\\d+)\\\\s*${r(',\\\\s*(\\\\d+)\\\\s*', 2)}(?:,\\\\s*([\\\\d.]+))?\\\\s*\\\\)$`, 'i');\nconst hslaRegex = /^hsla?\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)%\\s*,\\s*([\\d.]+)%(?:\\s*,\\s*([\\d.]+))?\\s*\\)$/i;\nconst namedColorRegex = /^[a-z]+$/i;\nconst roundColor = color => {\n return Math.round(color * 255);\n};\nconst hslToRgb = (hue, saturation, lightness) => {\n let l = lightness / 100;\n if (saturation === 0) {\n // achromatic\n return [l, l, l].map(roundColor);\n }\n\n // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV\n const huePrime = (hue % 360 + 360) % 360 / 60;\n const chroma = (1 - Math.abs(2 * l - 1)) * (saturation / 100);\n const secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));\n let red = 0;\n let green = 0;\n let blue = 0;\n if (huePrime >= 0 && huePrime < 1) {\n red = chroma;\n green = secondComponent;\n } else if (huePrime >= 1 && huePrime < 2) {\n red = secondComponent;\n green = chroma;\n } else if (huePrime >= 2 && huePrime < 3) {\n green = chroma;\n blue = secondComponent;\n } else if (huePrime >= 3 && huePrime < 4) {\n green = secondComponent;\n blue = chroma;\n } else if (huePrime >= 4 && huePrime < 5) {\n red = secondComponent;\n blue = chroma;\n } else if (huePrime >= 5 && huePrime < 6) {\n red = chroma;\n blue = secondComponent;\n }\n const lightnessModification = l - chroma / 2;\n const finalRed = red + lightnessModification;\n const finalGreen = green + lightnessModification;\n const finalBlue = blue + lightnessModification;\n return [finalRed, finalGreen, finalBlue].map(roundColor);\n};\n\n// taken from:\n\n/**\n * Parses a color in hue, saturation, lightness, and the alpha channel.\n *\n * Hue is a number between 0 and 360, saturation, lightness, and alpha are\n * decimal percentages between 0 and 1\n */\nfunction parseToHsla(color) {\n const [red, green, blue, alpha] = parseToRgba(color).map((value, index) =>\n // 3rd index is alpha channel which is already normalized\n index === 3 ? value : value / 255);\n const max = Math.max(red, green, blue);\n const min = Math.min(red, green, blue);\n const lightness = (max + min) / 2;\n\n // achromatic\n if (max === min) return [0, 0, lightness, alpha];\n const delta = max - min;\n const saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);\n const hue = 60 * (red === max ? (green - blue) / delta + (green < blue ? 6 : 0) : green === max ? (blue - red) / delta + 2 : (red - green) / delta + 4);\n return [hue, saturation, lightness, alpha];\n}\n\n/**\n * Takes in hsla parts and constructs an hsla string\n *\n * @param hue The color circle (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue\n * @param saturation Percentage of saturation, given as a decimal between 0 and 1\n * @param lightness Percentage of lightness, given as a decimal between 0 and 1\n * @param alpha Percentage of opacity, given as a decimal between 0 and 1\n */\nfunction hsla(hue, saturation, lightness, alpha) {\n return `hsla(${(hue % 360).toFixed()}, ${guard(0, 100, saturation * 100).toFixed()}%, ${guard(0, 100, lightness * 100).toFixed()}%, ${parseFloat(guard(0, 1, alpha).toFixed(3))})`;\n}\n\n/**\n * Adjusts the current hue of the color by the given degrees. Wraps around when\n * over 360.\n *\n * @param color input color\n * @param degrees degrees to adjust the input color, accepts degree integers\n * (0 - 360) and wraps around on overflow\n */\nfunction adjustHue(color, degrees) {\n const [h, s, l, a] = parseToHsla(color);\n return hsla(h + degrees, s, l, a);\n}\n\n/**\n * Darkens using lightness. This is equivalent to subtracting the lightness\n * from the L in HSL.\n *\n * @param amount The amount to darken, given as a decimal between 0 and 1\n */\nfunction darken(color, amount) {\n const [hue, saturation, lightness, alpha] = parseToHsla(color);\n return hsla(hue, saturation, lightness - amount, alpha);\n}\n\n/**\n * Desaturates the input color by the given amount via subtracting from the `s`\n * in `hsla`.\n *\n * @param amount The amount to desaturate, given as a decimal between 0 and 1\n */\nfunction desaturate(color, amount) {\n const [h, s, l, a] = parseToHsla(color);\n return hsla(h, s - amount, l, a);\n}\n\n// taken from:\n// https://github.com/styled-components/polished/blob/0764c982551b487469043acb56281b0358b3107b/src/color/getLuminance.js\n\n/**\n * Returns a number (float) representing the luminance of a color.\n */\nfunction getLuminance(color) {\n if (color === 'transparent') return 0;\n function f(x) {\n const channel = x / 255;\n return channel <= 0.03928 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);\n }\n const [r, g, b] = parseToRgba(color);\n return 0.2126 * f(r) + 0.7152 * f(g) + 0.0722 * f(b);\n}\n\n// taken from:\n\n/**\n * Returns the contrast ratio between two colors based on\n * [W3's recommended equation for calculating contrast](http://www.w3.org/TR/WCAG20/#contrast-ratiodef).\n */\nfunction getContrast(color1, color2) {\n const luminance1 = getLuminance(color1);\n const luminance2 = getLuminance(color2);\n return luminance1 > luminance2 ? (luminance1 + 0.05) / (luminance2 + 0.05) : (luminance2 + 0.05) / (luminance1 + 0.05);\n}\n\n/**\n * Takes in rgba parts and returns an rgba string\n *\n * @param red The amount of red in the red channel, given in a number between 0 and 255 inclusive\n * @param green The amount of green in the red channel, given in a number between 0 and 255 inclusive\n * @param blue The amount of blue in the red channel, given in a number between 0 and 255 inclusive\n * @param alpha Percentage of opacity, given as a decimal between 0 and 1\n */\nfunction rgba(red, green, blue, alpha) {\n return `rgba(${guard(0, 255, red).toFixed()}, ${guard(0, 255, green).toFixed()}, ${guard(0, 255, blue).toFixed()}, ${parseFloat(guard(0, 1, alpha).toFixed(3))})`;\n}\n\n/**\n * Mixes two colors together. Taken from sass's implementation.\n */\nfunction mix(color1, color2, weight) {\n const normalize = (n, index) =>\n // 3rd index is alpha channel which is already normalized\n index === 3 ? n : n / 255;\n const [r1, g1, b1, a1] = parseToRgba(color1).map(normalize);\n const [r2, g2, b2, a2] = parseToRgba(color2).map(normalize);\n\n // The formula is copied from the original Sass implementation:\n // http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method\n const alphaDelta = a2 - a1;\n const normalizedWeight = weight * 2 - 1;\n const combinedWeight = normalizedWeight * alphaDelta === -1 ? normalizedWeight : normalizedWeight + alphaDelta / (1 + normalizedWeight * alphaDelta);\n const weight2 = (combinedWeight + 1) / 2;\n const weight1 = 1 - weight2;\n const r = (r1 * weight1 + r2 * weight2) * 255;\n const g = (g1 * weight1 + g2 * weight2) * 255;\n const b = (b1 * weight1 + b2 * weight2) * 255;\n const a = a2 * weight + a1 * (1 - weight);\n return rgba(r, g, b, a);\n}\n\n/**\n * Given a series colors, this function will return a `scale(x)` function that\n * accepts a percentage as a decimal between 0 and 1 and returns the color at\n * that percentage in the scale.\n *\n * ```js\n * const scale = getScale('red', 'yellow', 'green');\n * console.log(scale(0)); // rgba(255, 0, 0, 1)\n * console.log(scale(0.5)); // rgba(255, 255, 0, 1)\n * console.log(scale(1)); // rgba(0, 128, 0, 1)\n * ```\n *\n * If you'd like to limit the domain and range like chroma-js, we recommend\n * wrapping scale again.\n *\n * ```js\n * const _scale = getScale('red', 'yellow', 'green');\n * const scale = x => _scale(x / 100);\n *\n * console.log(scale(0)); // rgba(255, 0, 0, 1)\n * console.log(scale(50)); // rgba(255, 255, 0, 1)\n * console.log(scale(100)); // rgba(0, 128, 0, 1)\n * ```\n */\nfunction getScale(...colors) {\n return n => {\n const lastIndex = colors.length - 1;\n const lowIndex = guard(0, lastIndex, Math.floor(n * lastIndex));\n const highIndex = guard(0, lastIndex, Math.ceil(n * lastIndex));\n const color1 = colors[lowIndex];\n const color2 = colors[highIndex];\n const unit = 1 / lastIndex;\n const weight = (n - unit * lowIndex) / unit;\n return mix(color1, color2, weight);\n };\n}\n\nconst guidelines = {\n decorative: 1.5,\n readable: 3,\n aa: 4.5,\n aaa: 7\n};\n\n/**\n * Returns whether or not a color has bad contrast against a background\n * according to a given standard.\n */\nfunction hasBadContrast(color, standard = 'aa', background = '#fff') {\n return getContrast(color, background) < guidelines[standard];\n}\n\n/**\n * Lightens a color by a given amount. This is equivalent to\n * `darken(color, -amount)`\n *\n * @param amount The amount to darken, given as a decimal between 0 and 1\n */\nfunction lighten(color, amount) {\n return darken(color, -amount);\n}\n\n/**\n * Takes in a color and makes it more transparent by convert to `rgba` and\n * decreasing the amount in the alpha channel.\n *\n * @param amount The amount to increase the transparency by, given as a decimal between 0 and 1\n */\nfunction transparentize(color, amount) {\n const [r, g, b, a] = parseToRgba(color);\n return rgba(r, g, b, a - amount);\n}\n\n/**\n * Takes a color and un-transparentizes it. Equivalent to\n * `transparentize(color, -amount)`\n *\n * @param amount The amount to increase the opacity by, given as a decimal between 0 and 1\n */\nfunction opacify(color, amount) {\n return transparentize(color, -amount);\n}\n\n/**\n * An alternative function to `readableColor`. Returns whether or not the \n * readable color (i.e. the color to be place on top the input color) should be\n * black.\n */\nfunction readableColorIsBlack(color) {\n return getLuminance(color) > 0.179;\n}\n\n/**\n * Returns black or white for best contrast depending on the luminosity of the\n * given color.\n */\nfunction readableColor(color) {\n return readableColorIsBlack(color) ? '#000' : '#fff';\n}\n\n/**\n * Saturates a color by converting it to `hsl` and increasing the saturation\n * amount. Equivalent to `desaturate(color, -amount)`\n * \n * @param color Input color\n * @param amount The amount to darken, given as a decimal between 0 and 1\n */\nfunction saturate(color, amount) {\n return desaturate(color, -amount);\n}\n\n/**\n * Takes in any color and returns it as a hex code.\n */\nfunction toHex(color) {\n const [r, g, b, a] = parseToRgba(color);\n let hex = x => {\n const h = guard(0, 255, x).toString(16);\n // NOTE: padStart could be used here but it breaks Node 6 compat\n // https://github.com/ricokahler/color2k/issues/351\n return h.length === 1 ? `0${h}` : h;\n };\n return `#${hex(r)}${hex(g)}${hex(b)}${a < 1 ? hex(Math.round(a * 255)) : ''}`;\n}\n\n/**\n * Takes in any color and returns it as an rgba string.\n */\nfunction toRgba(color) {\n return rgba(...parseToRgba(color));\n}\n\n/**\n * Takes in any color and returns it as an hsla string.\n */\nfunction toHsla(color) {\n return hsla(...parseToHsla(color));\n}\n\nexport { ColorError$1 as ColorError, adjustHue, darken, desaturate, getContrast, getLuminance, getScale, guard, hasBadContrast, hsla, lighten, mix, opacify, parseToHsla, parseToRgba, readableColor, readableColorIsBlack, rgba, saturate, toHex, toHsla, toRgba, transparentize };\n//# sourceMappingURL=index.exports.import.es.mjs.map\n","// src/color.ts\nimport {\n toHex,\n parseToRgba,\n transparentize as setTransparency,\n mix,\n darken as reduceLightness,\n lighten as increaseLightness,\n getContrast,\n parseToHsla,\n hsla,\n getLuminance\n} from \"color2k\";\n\n// ../../../node_modules/.pnpm/dlv@1.1.3/node_modules/dlv/dist/dlv.es.js\nfunction dlv_es_default(t, e, l, n, r) {\n for (e = e.split ? e.split(\".\") : e, n = 0; n < e.length; n++)\n t = t ? t[e[n]] : r;\n return t === r ? l : t;\n}\n\n// src/color.ts\nvar isEmptyObject = (obj) => Object.keys(obj).length === 0;\nvar getColor = (theme, color, fallback) => {\n const hex = dlv_es_default(theme, `colors.${color}`, color);\n try {\n toHex(hex);\n return hex;\n } catch {\n return fallback != null ? fallback : \"#000000\";\n }\n};\nvar getBrightness = (color) => {\n const [r, g, b] = parseToRgba(color);\n return (r * 299 + g * 587 + b * 114) / 1e3;\n};\nvar tone = (color) => (theme) => {\n const hex = getColor(theme, color);\n const brightness = getBrightness(hex);\n const isDark2 = brightness < 128;\n return isDark2 ? \"dark\" : \"light\";\n};\nvar isDark = (color) => (theme) => tone(color)(theme) === \"dark\";\nvar isLight = (color) => (theme) => tone(color)(theme) === \"light\";\nvar transparentize = (color, opacity) => (theme) => {\n const raw = getColor(theme, color);\n return setTransparency(raw, 1 - opacity);\n};\nvar whiten = (color, amount) => (theme) => {\n const raw = getColor(theme, color);\n return toHex(mix(raw, \"#fff\", amount));\n};\nvar blacken = (color, amount) => (theme) => {\n const raw = getColor(theme, color);\n return toHex(mix(raw, \"#000\", amount / 100));\n};\nvar darken = (color, amount) => (theme) => {\n const raw = getColor(theme, color);\n return toHex(reduceLightness(raw, amount / 100));\n};\nvar lighten = (color, amount) => (theme) => {\n const raw = getColor(theme, color);\n toHex(increaseLightness(raw, amount / 100));\n};\nvar contrast = (fg, bg) => (theme) => getContrast(getColor(theme, bg), getColor(theme, fg));\nvar isAccessible = (textColor, bgColor, options) => (theme) => isReadable(getColor(theme, bgColor), getColor(theme, textColor), options);\nfunction isReadable(color1, color2, wcag2 = { level: \"AA\", size: \"small\" }) {\n var _a, _b;\n const readabilityLevel = readability(color1, color2);\n switch (((_a = wcag2.level) != null ? _a : \"AA\") + ((_b = wcag2.size) != null ? _b : \"small\")) {\n case \"AAsmall\":\n case \"AAAlarge\":\n return readabilityLevel >= 4.5;\n case \"AAlarge\":\n return readabilityLevel >= 3;\n case \"AAAsmall\":\n return readabilityLevel >= 7;\n default:\n return false;\n }\n}\nfunction readability(color1, color2) {\n return (Math.max(getLuminance(color1), getLuminance(color2)) + 0.05) / (Math.min(getLuminance(color1), getLuminance(color2)) + 0.05);\n}\nvar complementary = (color) => (theme) => {\n const raw = getColor(theme, color);\n const hsl = parseToHsla(raw);\n const complementHsl = Object.assign(hsl, [\n (hsl[0] + 180) % 360\n ]);\n return toHex(hsla(...complementHsl));\n};\nfunction generateStripe(size = \"1rem\", color = \"rgba(255, 255, 255, 0.15)\") {\n return {\n backgroundImage: `linear-gradient(\n 45deg,\n ${color} 25%,\n transparent 25%,\n transparent 50%,\n ${color} 50%,\n ${color} 75%,\n transparent 75%,\n transparent\n )`,\n backgroundSize: `${size} ${size}`\n };\n}\nvar randomHex = () => `#${Math.floor(Math.random() * 16777215).toString(16).padEnd(6, \"0\")}`;\nfunction randomColor(opts) {\n const fallback = randomHex();\n if (!opts || isEmptyObject(opts)) {\n return fallback;\n }\n if (opts.string && opts.colors) {\n return randomColorFromList(opts.string, opts.colors);\n }\n if (opts.string && !opts.colors) {\n return randomColorFromString(opts.string);\n }\n if (opts.colors && !opts.string) {\n return randomFromList(opts.colors);\n }\n return fallback;\n}\nfunction randomColorFromString(str) {\n let hash = 0;\n if (str.length === 0)\n return hash.toString();\n for (let i = 0; i < str.length; i += 1) {\n hash = str.charCodeAt(i) + ((hash << 5) - hash);\n hash = hash & hash;\n }\n let color = \"#\";\n for (let j = 0; j < 3; j += 1) {\n const value = hash >> j * 8 & 255;\n color += `00${value.toString(16)}`.substr(-2);\n }\n return color;\n}\nfunction randomColorFromList(str, list) {\n let index = 0;\n if (str.length === 0)\n return list[0];\n for (let i = 0; i < str.length; i += 1) {\n index = str.charCodeAt(i) + ((index << 5) - index);\n index = index & index;\n }\n index = (index % list.length + list.length) % list.length;\n return list[index];\n}\nfunction randomFromList(list) {\n return list[Math.floor(Math.random() * list.length)];\n}\n\nexport {\n getColor,\n tone,\n isDark,\n isLight,\n transparentize,\n whiten,\n blacken,\n darken,\n lighten,\n contrast,\n isAccessible,\n isReadable,\n readability,\n complementary,\n generateStripe,\n randomColor\n};\n","// src/component.ts\nfunction mode(light, dark) {\n return (props) => props.colorMode === \"dark\" ? dark : light;\n}\nfunction orient(options) {\n const { orientation, vertical, horizontal } = options;\n if (!orientation)\n return {};\n return orientation === \"vertical\" ? vertical : horizontal;\n}\n\nexport {\n mode,\n orient\n};\n","// src/css-calc.ts\nimport { isObject } from \"@chakra-ui/shared-utils\";\nfunction toRef(operand) {\n if (isObject(operand) && operand.reference) {\n return operand.reference;\n }\n return String(operand);\n}\nvar toExpr = (operator, ...operands) => operands.map(toRef).join(` ${operator} `).replace(/calc/g, \"\");\nvar add = (...operands) => `calc(${toExpr(\"+\", ...operands)})`;\nvar subtract = (...operands) => `calc(${toExpr(\"-\", ...operands)})`;\nvar multiply = (...operands) => `calc(${toExpr(\"*\", ...operands)})`;\nvar divide = (...operands) => `calc(${toExpr(\"/\", ...operands)})`;\nvar negate = (x) => {\n const value = toRef(x);\n if (value != null && !Number.isNaN(parseFloat(value))) {\n return String(value).startsWith(\"-\") ? String(value).slice(1) : `-${value}`;\n }\n return multiply(value, -1);\n};\nvar calc = Object.assign(\n (x) => ({\n add: (...operands) => calc(add(x, ...operands)),\n subtract: (...operands) => calc(subtract(x, ...operands)),\n multiply: (...operands) => calc(multiply(x, ...operands)),\n divide: (...operands) => calc(divide(x, ...operands)),\n negate: () => calc(negate(x)),\n toString: () => x.toString()\n }),\n {\n add,\n subtract,\n multiply,\n divide,\n negate\n }\n);\n\nexport {\n calc\n};\n","// src/css-var.ts\nfunction isDecimal(value) {\n return !Number.isInteger(parseFloat(value.toString()));\n}\nfunction replaceWhiteSpace(value, replaceValue = \"-\") {\n return value.replace(/\\s+/g, replaceValue);\n}\nfunction escape(value) {\n const valueStr = replaceWhiteSpace(value.toString());\n if (valueStr.includes(\"\\\\.\"))\n return value;\n return isDecimal(value) ? valueStr.replace(\".\", `\\\\.`) : value;\n}\nfunction addPrefix(value, prefix = \"\") {\n return [prefix, escape(value)].filter(Boolean).join(\"-\");\n}\nfunction toVarRef(name, fallback) {\n return `var(${escape(name)}${fallback ? `, ${fallback}` : \"\"})`;\n}\nfunction toVar(value, prefix = \"\") {\n return `--${addPrefix(value, prefix)}`;\n}\nfunction cssVar(name, options) {\n const cssVariable = toVar(name, options == null ? void 0 : options.prefix);\n return {\n variable: cssVariable,\n reference: toVarRef(cssVariable, getFallback(options == null ? void 0 : options.fallback))\n };\n}\nfunction getFallback(fallback) {\n if (typeof fallback === \"string\")\n return fallback;\n return fallback == null ? void 0 : fallback.reference;\n}\n\nexport {\n isDecimal,\n addPrefix,\n toVarRef,\n toVar,\n cssVar\n};\n","// src/components/switch.ts\nimport { switchAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nimport { calc, cssVar } from \"@chakra-ui/theme-tools\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar $width = cssVar(\"switch-track-width\");\nvar $height = cssVar(\"switch-track-height\");\nvar $diff = cssVar(\"switch-track-diff\");\nvar diffValue = calc.subtract($width, $height);\nvar $translateX = cssVar(\"switch-thumb-x\");\nvar $bg = cssVar(\"switch-bg\");\nvar baseStyleTrack = defineStyle((props) => {\n const { colorScheme: c } = props;\n return {\n borderRadius: \"full\",\n p: \"0.5\",\n width: [$width.reference],\n height: [$height.reference],\n transitionProperty: \"common\",\n transitionDuration: \"fast\",\n [$bg.variable]: \"colors.gray.300\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.400\"\n },\n _focusVisible: {\n boxShadow: \"outline\"\n },\n _disabled: {\n opacity: 0.4,\n cursor: \"not-allowed\"\n },\n _checked: {\n [$bg.variable]: `colors.${c}.500`,\n _dark: {\n [$bg.variable]: `colors.${c}.200`\n }\n },\n bg: $bg.reference\n };\n});\nvar baseStyleThumb = defineStyle({\n bg: \"white\",\n transitionProperty: \"transform\",\n transitionDuration: \"normal\",\n borderRadius: \"inherit\",\n width: [$height.reference],\n height: [$height.reference],\n _checked: {\n transform: `translateX(${$translateX.reference})`\n }\n});\nvar baseStyle = definePartsStyle((props) => ({\n container: {\n [$diff.variable]: diffValue,\n [$translateX.variable]: $diff.reference,\n _rtl: {\n [$translateX.variable]: calc($diff).negate().toString()\n }\n },\n track: baseStyleTrack(props),\n thumb: baseStyleThumb\n}));\nvar sizes = {\n sm: definePartsStyle({\n container: {\n [$width.variable]: \"1.375rem\",\n [$height.variable]: \"sizes.3\"\n }\n }),\n md: definePartsStyle({\n container: {\n [$width.variable]: \"1.875rem\",\n [$height.variable]: \"sizes.4\"\n }\n }),\n lg: definePartsStyle({\n container: {\n [$width.variable]: \"2.875rem\",\n [$height.variable]: \"sizes.6\"\n }\n })\n};\nvar switchTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n defaultProps: {\n size: \"md\",\n colorScheme: \"blue\"\n }\n});\n\nexport {\n switchTheme\n};\n","// src/components/table.ts\nimport { tableAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nimport { mode } from \"@chakra-ui/theme-tools\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar baseStyle = definePartsStyle({\n table: {\n fontVariantNumeric: \"lining-nums tabular-nums\",\n borderCollapse: \"collapse\",\n width: \"full\"\n },\n th: {\n fontFamily: \"heading\",\n fontWeight: \"bold\",\n textTransform: \"uppercase\",\n letterSpacing: \"wider\",\n textAlign: \"start\"\n },\n td: {\n textAlign: \"start\"\n },\n caption: {\n mt: 4,\n fontFamily: \"heading\",\n textAlign: \"center\",\n fontWeight: \"medium\"\n }\n});\nvar numericStyles = defineStyle({\n \"&[data-is-numeric=true]\": {\n textAlign: \"end\"\n }\n});\nvar variantSimple = definePartsStyle((props) => {\n const { colorScheme: c } = props;\n return {\n th: {\n color: mode(\"gray.600\", \"gray.400\")(props),\n borderBottom: \"1px\",\n borderColor: mode(`${c}.100`, `${c}.700`)(props),\n ...numericStyles\n },\n td: {\n borderBottom: \"1px\",\n borderColor: mode(`${c}.100`, `${c}.700`)(props),\n ...numericStyles\n },\n caption: {\n color: mode(\"gray.600\", \"gray.100\")(props)\n },\n tfoot: {\n tr: {\n \"&:last-of-type\": {\n th: { borderBottomWidth: 0 }\n }\n }\n }\n };\n});\nvar variantStripe = definePartsStyle((props) => {\n const { colorScheme: c } = props;\n return {\n th: {\n color: mode(\"gray.600\", \"gray.400\")(props),\n borderBottom: \"1px\",\n borderColor: mode(`${c}.100`, `${c}.700`)(props),\n ...numericStyles\n },\n td: {\n borderBottom: \"1px\",\n borderColor: mode(`${c}.100`, `${c}.700`)(props),\n ...numericStyles\n },\n caption: {\n color: mode(\"gray.600\", \"gray.100\")(props)\n },\n tbody: {\n tr: {\n \"&:nth-of-type(odd)\": {\n \"th, td\": {\n borderBottomWidth: \"1px\",\n borderColor: mode(`${c}.100`, `${c}.700`)(props)\n },\n td: {\n background: mode(`${c}.100`, `${c}.700`)(props)\n }\n }\n }\n },\n tfoot: {\n tr: {\n \"&:last-of-type\": {\n th: { borderBottomWidth: 0 }\n }\n }\n }\n };\n});\nvar variants = {\n simple: variantSimple,\n striped: variantStripe,\n unstyled: defineStyle({})\n};\nvar sizes = {\n sm: definePartsStyle({\n th: {\n px: \"4\",\n py: \"1\",\n lineHeight: \"4\",\n fontSize: \"xs\"\n },\n td: {\n px: \"4\",\n py: \"2\",\n fontSize: \"sm\",\n lineHeight: \"4\"\n },\n caption: {\n px: \"4\",\n py: \"2\",\n fontSize: \"xs\"\n }\n }),\n md: definePartsStyle({\n th: {\n px: \"6\",\n py: \"3\",\n lineHeight: \"4\",\n fontSize: \"xs\"\n },\n td: {\n px: \"6\",\n py: \"4\",\n lineHeight: \"5\"\n },\n caption: {\n px: \"6\",\n py: \"2\",\n fontSize: \"sm\"\n }\n }),\n lg: definePartsStyle({\n th: {\n px: \"8\",\n py: \"4\",\n lineHeight: \"5\",\n fontSize: \"sm\"\n },\n td: {\n px: \"8\",\n py: \"5\",\n lineHeight: \"6\"\n },\n caption: {\n px: \"6\",\n py: \"2\",\n fontSize: \"md\"\n }\n })\n};\nvar tableTheme = defineMultiStyleConfig({\n baseStyle,\n variants,\n sizes,\n defaultProps: {\n variant: \"simple\",\n size: \"md\",\n colorScheme: \"gray\"\n }\n});\n\nexport {\n tableTheme\n};\n","// src/components/tabs.ts\nimport { tabsAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nimport { getColor } from \"@chakra-ui/theme-tools\";\nvar $fg = cssVar(\"tabs-color\");\nvar $bg = cssVar(\"tabs-bg\");\nvar $border = cssVar(\"tabs-border-color\");\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar baseStyleRoot = defineStyle((props) => {\n const { orientation } = props;\n return {\n display: orientation === \"vertical\" ? \"flex\" : \"block\"\n };\n});\nvar baseStyleTab = defineStyle((props) => {\n const { isFitted } = props;\n return {\n flex: isFitted ? 1 : void 0,\n transitionProperty: \"common\",\n transitionDuration: \"normal\",\n _focusVisible: {\n zIndex: 1,\n boxShadow: \"outline\"\n },\n _disabled: {\n cursor: \"not-allowed\",\n opacity: 0.4\n }\n };\n});\nvar baseStyleTablist = defineStyle((props) => {\n const { align = \"start\", orientation } = props;\n const alignments = {\n end: \"flex-end\",\n center: \"center\",\n start: \"flex-start\"\n };\n return {\n justifyContent: alignments[align],\n flexDirection: orientation === \"vertical\" ? \"column\" : \"row\"\n };\n});\nvar baseStyleTabpanel = defineStyle({\n p: 4\n});\nvar baseStyle = definePartsStyle((props) => ({\n root: baseStyleRoot(props),\n tab: baseStyleTab(props),\n tablist: baseStyleTablist(props),\n tabpanel: baseStyleTabpanel\n}));\nvar sizes = {\n sm: definePartsStyle({\n tab: {\n py: 1,\n px: 4,\n fontSize: \"sm\"\n }\n }),\n md: definePartsStyle({\n tab: {\n fontSize: \"md\",\n py: 2,\n px: 4\n }\n }),\n lg: definePartsStyle({\n tab: {\n fontSize: \"lg\",\n py: 3,\n px: 4\n }\n })\n};\nvar variantLine = definePartsStyle((props) => {\n const { colorScheme: c, orientation } = props;\n const isVertical = orientation === \"vertical\";\n const borderProp = orientation === \"vertical\" ? \"borderStart\" : \"borderBottom\";\n const marginProp = isVertical ? \"marginStart\" : \"marginBottom\";\n return {\n tablist: {\n [borderProp]: \"2px solid\",\n borderColor: \"inherit\"\n },\n tab: {\n [borderProp]: \"2px solid\",\n borderColor: \"transparent\",\n [marginProp]: \"-2px\",\n _selected: {\n [$fg.variable]: `colors.${c}.600`,\n _dark: {\n [$fg.variable]: `colors.${c}.300`\n },\n borderColor: \"currentColor\"\n },\n _active: {\n [$bg.variable]: \"colors.gray.200\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.300\"\n }\n },\n _disabled: {\n _active: { bg: \"none\" }\n },\n color: $fg.reference,\n bg: $bg.reference\n }\n };\n});\nvar variantEnclosed = definePartsStyle((props) => {\n const { colorScheme: c } = props;\n return {\n tab: {\n borderTopRadius: \"md\",\n border: \"1px solid\",\n borderColor: \"transparent\",\n mb: \"-1px\",\n [$border.variable]: \"transparent\",\n _selected: {\n [$fg.variable]: `colors.${c}.600`,\n [$border.variable]: `colors.white`,\n _dark: {\n [$fg.variable]: `colors.${c}.300`,\n [$border.variable]: `colors.gray.800`\n },\n borderColor: \"inherit\",\n borderBottomColor: $border.reference\n },\n color: $fg.reference\n },\n tablist: {\n mb: \"-1px\",\n borderBottom: \"1px solid\",\n borderColor: \"inherit\"\n }\n };\n});\nvar variantEnclosedColored = definePartsStyle((props) => {\n const { colorScheme: c } = props;\n return {\n tab: {\n border: \"1px solid\",\n borderColor: \"inherit\",\n [$bg.variable]: \"colors.gray.50\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.50\"\n },\n mb: \"-1px\",\n _notLast: {\n marginEnd: \"-1px\"\n },\n _selected: {\n [$bg.variable]: \"colors.white\",\n [$fg.variable]: `colors.${c}.600`,\n _dark: {\n [$bg.variable]: \"colors.gray.800\",\n [$fg.variable]: `colors.${c}.300`\n },\n borderColor: \"inherit\",\n borderTopColor: \"currentColor\",\n borderBottomColor: \"transparent\"\n },\n color: $fg.reference,\n bg: $bg.reference\n },\n tablist: {\n mb: \"-1px\",\n borderBottom: \"1px solid\",\n borderColor: \"inherit\"\n }\n };\n});\nvar variantSoftRounded = definePartsStyle((props) => {\n const { colorScheme: c, theme } = props;\n return {\n tab: {\n borderRadius: \"full\",\n fontWeight: \"semibold\",\n color: \"gray.600\",\n _selected: {\n color: getColor(theme, `${c}.700`),\n bg: getColor(theme, `${c}.100`)\n }\n }\n };\n});\nvar variantSolidRounded = definePartsStyle((props) => {\n const { colorScheme: c } = props;\n return {\n tab: {\n borderRadius: \"full\",\n fontWeight: \"semibold\",\n [$fg.variable]: \"colors.gray.600\",\n _dark: {\n [$fg.variable]: \"inherit\"\n },\n _selected: {\n [$fg.variable]: \"colors.white\",\n [$bg.variable]: `colors.${c}.600`,\n _dark: {\n [$fg.variable]: \"colors.gray.800\",\n [$bg.variable]: `colors.${c}.300`\n }\n },\n color: $fg.reference,\n bg: $bg.reference\n }\n };\n});\nvar variantUnstyled = definePartsStyle({});\nvar variants = {\n line: variantLine,\n enclosed: variantEnclosed,\n \"enclosed-colored\": variantEnclosedColored,\n \"soft-rounded\": variantSoftRounded,\n \"solid-rounded\": variantSolidRounded,\n unstyled: variantUnstyled\n};\nvar tabsTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n variants,\n defaultProps: {\n size: \"md\",\n variant: \"line\",\n colorScheme: \"blue\"\n }\n});\n\nexport {\n tabsTheme\n};\n","// src/components/badge.ts\nimport {\n defineCssVars,\n defineStyle,\n defineStyleConfig\n} from \"@chakra-ui/styled-system\";\nimport { transparentize } from \"@chakra-ui/theme-tools\";\nvar vars = defineCssVars(\"badge\", [\"bg\", \"color\", \"shadow\"]);\nvar baseStyle = defineStyle({\n px: 1,\n textTransform: \"uppercase\",\n fontSize: \"xs\",\n borderRadius: \"sm\",\n fontWeight: \"bold\",\n bg: vars.bg.reference,\n color: vars.color.reference,\n boxShadow: vars.shadow.reference\n});\nvar variantSolid = defineStyle((props) => {\n const { colorScheme: c, theme } = props;\n const dark = transparentize(`${c}.500`, 0.6)(theme);\n return {\n [vars.bg.variable]: `colors.${c}.500`,\n [vars.color.variable]: `colors.white`,\n _dark: {\n [vars.bg.variable]: dark,\n [vars.color.variable]: `colors.whiteAlpha.800`\n }\n };\n});\nvar variantSubtle = defineStyle((props) => {\n const { colorScheme: c, theme } = props;\n const darkBg = transparentize(`${c}.200`, 0.16)(theme);\n return {\n [vars.bg.variable]: `colors.${c}.100`,\n [vars.color.variable]: `colors.${c}.800`,\n _dark: {\n [vars.bg.variable]: darkBg,\n [vars.color.variable]: `colors.${c}.200`\n }\n };\n});\nvar variantOutline = defineStyle((props) => {\n const { colorScheme: c, theme } = props;\n const darkColor = transparentize(`${c}.200`, 0.8)(theme);\n return {\n [vars.color.variable]: `colors.${c}.500`,\n _dark: {\n [vars.color.variable]: darkColor\n },\n [vars.shadow.variable]: `inset 0 0 0px 1px ${vars.color.reference}`\n };\n});\nvar variants = {\n solid: variantSolid,\n subtle: variantSubtle,\n outline: variantOutline\n};\nvar badgeTheme = defineStyleConfig({\n baseStyle,\n variants,\n defaultProps: {\n variant: \"subtle\",\n colorScheme: \"gray\"\n }\n});\n\nexport {\n vars,\n badgeTheme\n};\n","import {\n badgeTheme,\n vars\n} from \"./chunk-IBJP6BGU.mjs\";\n\n// src/components/tag.ts\nimport { tagAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar baseStyleContainer = defineStyle({\n fontWeight: \"medium\",\n lineHeight: 1.2,\n outline: 0,\n color: vars.color.reference,\n bg: vars.bg.reference,\n boxShadow: vars.shadow.reference,\n borderRadius: \"md\",\n _focusVisible: {\n boxShadow: \"outline\"\n }\n});\nvar baseStyleLabel = defineStyle({\n lineHeight: 1.2,\n overflow: \"visible\"\n});\nvar baseStyleCloseButton = defineStyle({\n fontSize: \"lg\",\n w: \"5\",\n h: \"5\",\n transitionProperty: \"common\",\n transitionDuration: \"normal\",\n borderRadius: \"full\",\n marginStart: \"1.5\",\n marginEnd: \"-1\",\n opacity: 0.5,\n _disabled: {\n opacity: 0.4\n },\n _focusVisible: {\n boxShadow: \"outline\",\n bg: \"rgba(0, 0, 0, 0.14)\"\n },\n _hover: {\n opacity: 0.8\n },\n _active: {\n opacity: 1\n }\n});\nvar baseStyle = definePartsStyle({\n container: baseStyleContainer,\n label: baseStyleLabel,\n closeButton: baseStyleCloseButton\n});\nvar sizes = {\n sm: definePartsStyle({\n container: {\n minH: \"5\",\n minW: \"5\",\n fontSize: \"xs\",\n px: \"2\"\n },\n closeButton: {\n marginEnd: \"-2px\",\n marginStart: \"0.35rem\"\n }\n }),\n md: definePartsStyle({\n container: {\n minH: \"6\",\n minW: \"6\",\n fontSize: \"sm\",\n px: \"2\"\n }\n }),\n lg: definePartsStyle({\n container: {\n minH: \"8\",\n minW: \"8\",\n fontSize: \"md\",\n px: \"3\"\n }\n })\n};\nvar variants = {\n subtle: definePartsStyle((props) => {\n var _a;\n return {\n container: (_a = badgeTheme.variants) == null ? void 0 : _a.subtle(props)\n };\n }),\n solid: definePartsStyle((props) => {\n var _a;\n return {\n container: (_a = badgeTheme.variants) == null ? void 0 : _a.solid(props)\n };\n }),\n outline: definePartsStyle((props) => {\n var _a;\n return {\n container: (_a = badgeTheme.variants) == null ? void 0 : _a.outline(props)\n };\n })\n};\nvar tagTheme = defineMultiStyleConfig({\n variants,\n baseStyle,\n sizes,\n defaultProps: {\n size: \"md\",\n variant: \"subtle\",\n colorScheme: \"gray\"\n }\n});\n\nexport {\n tagTheme\n};\n","// src/components/input.ts\nimport { inputAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nimport { getColor, mode } from \"@chakra-ui/theme-tools\";\nvar { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nvar baseStyle = definePartsStyle({\n field: {\n width: \"100%\",\n minWidth: 0,\n outline: 0,\n position: \"relative\",\n appearance: \"none\",\n transitionProperty: \"common\",\n transitionDuration: \"normal\",\n _disabled: {\n opacity: 0.4,\n cursor: \"not-allowed\"\n }\n }\n});\nvar size = {\n lg: defineStyle({\n fontSize: \"lg\",\n px: \"4\",\n h: \"12\",\n borderRadius: \"md\"\n }),\n md: defineStyle({\n fontSize: \"md\",\n px: \"4\",\n h: \"10\",\n borderRadius: \"md\"\n }),\n sm: defineStyle({\n fontSize: \"sm\",\n px: \"3\",\n h: \"8\",\n borderRadius: \"sm\"\n }),\n xs: defineStyle({\n fontSize: \"xs\",\n px: \"2\",\n h: \"6\",\n borderRadius: \"sm\"\n })\n};\nvar sizes = {\n lg: definePartsStyle({\n field: size.lg,\n addon: size.lg\n }),\n md: definePartsStyle({\n field: size.md,\n addon: size.md\n }),\n sm: definePartsStyle({\n field: size.sm,\n addon: size.sm\n }),\n xs: definePartsStyle({\n field: size.xs,\n addon: size.xs\n })\n};\nfunction getDefaults(props) {\n const { focusBorderColor: fc, errorBorderColor: ec } = props;\n return {\n focusBorderColor: fc || mode(\"blue.500\", \"blue.300\")(props),\n errorBorderColor: ec || mode(\"red.500\", \"red.300\")(props)\n };\n}\nvar variantOutline = definePartsStyle((props) => {\n const { theme } = props;\n const { focusBorderColor: fc, errorBorderColor: ec } = getDefaults(props);\n return {\n field: {\n border: \"1px solid\",\n borderColor: \"inherit\",\n bg: \"inherit\",\n _hover: {\n borderColor: mode(\"gray.300\", \"whiteAlpha.400\")(props)\n },\n _readOnly: {\n boxShadow: \"none !important\",\n userSelect: \"all\"\n },\n _invalid: {\n borderColor: getColor(theme, ec),\n boxShadow: `0 0 0 1px ${getColor(theme, ec)}`\n },\n _focusVisible: {\n zIndex: 1,\n borderColor: getColor(theme, fc),\n boxShadow: `0 0 0 1px ${getColor(theme, fc)}`\n }\n },\n addon: {\n border: \"1px solid\",\n borderColor: mode(\"inherit\", \"whiteAlpha.50\")(props),\n bg: mode(\"gray.100\", \"whiteAlpha.300\")(props)\n }\n };\n});\nvar variantFilled = definePartsStyle((props) => {\n const { theme } = props;\n const { focusBorderColor: fc, errorBorderColor: ec } = getDefaults(props);\n return {\n field: {\n border: \"2px solid\",\n borderColor: \"transparent\",\n bg: mode(\"gray.100\", \"whiteAlpha.50\")(props),\n _hover: {\n bg: mode(\"gray.200\", \"whiteAlpha.100\")(props)\n },\n _readOnly: {\n boxShadow: \"none !important\",\n userSelect: \"all\"\n },\n _invalid: {\n borderColor: getColor(theme, ec)\n },\n _focusVisible: {\n bg: \"transparent\",\n borderColor: getColor(theme, fc)\n }\n },\n addon: {\n border: \"2px solid\",\n borderColor: \"transparent\",\n bg: mode(\"gray.100\", \"whiteAlpha.50\")(props)\n }\n };\n});\nvar variantFlushed = definePartsStyle((props) => {\n const { theme } = props;\n const { focusBorderColor: fc, errorBorderColor: ec } = getDefaults(props);\n return {\n field: {\n borderBottom: \"1px solid\",\n borderColor: \"inherit\",\n borderRadius: \"0\",\n px: \"0\",\n bg: \"transparent\",\n _readOnly: {\n boxShadow: \"none !important\",\n userSelect: \"all\"\n },\n _invalid: {\n borderColor: getColor(theme, ec),\n boxShadow: `0px 1px 0px 0px ${getColor(theme, ec)}`\n },\n _focusVisible: {\n borderColor: getColor(theme, fc),\n boxShadow: `0px 1px 0px 0px ${getColor(theme, fc)}`\n }\n },\n addon: {\n borderBottom: \"2px solid\",\n borderColor: \"inherit\",\n borderRadius: \"0\",\n px: \"0\",\n bg: \"transparent\"\n }\n };\n});\nvar variantUnstyled = definePartsStyle({\n field: {\n bg: \"transparent\",\n px: \"0\",\n height: \"auto\"\n },\n addon: {\n bg: \"transparent\",\n px: \"0\",\n height: \"auto\"\n }\n});\nvar variants = {\n outline: variantOutline,\n filled: variantFilled,\n flushed: variantFlushed,\n unstyled: variantUnstyled\n};\nvar inputTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n variants,\n defaultProps: {\n size: \"md\",\n variant: \"outline\"\n }\n});\n\nexport {\n inputTheme\n};\n","import {\n inputTheme\n} from \"./chunk-WFLWAEKG.mjs\";\n\n// src/components/textarea.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nvar _a;\nvar baseStyle = defineStyle({\n ...(_a = inputTheme.baseStyle) == null ? void 0 : _a.field,\n paddingY: \"2\",\n minHeight: \"20\",\n lineHeight: \"short\",\n verticalAlign: \"top\"\n});\nvar _a2, _b;\nvar variants = {\n outline: defineStyle(\n (props) => {\n var _a4, _b3;\n return (_b3 = (_a4 = inputTheme.variants) == null ? void 0 : _a4.outline(props).field) != null ? _b3 : {};\n }\n ),\n flushed: defineStyle(\n (props) => {\n var _a4, _b3;\n return (_b3 = (_a4 = inputTheme.variants) == null ? void 0 : _a4.flushed(props).field) != null ? _b3 : {};\n }\n ),\n filled: defineStyle(\n (props) => {\n var _a4, _b3;\n return (_b3 = (_a4 = inputTheme.variants) == null ? void 0 : _a4.filled(props).field) != null ? _b3 : {};\n }\n ),\n unstyled: (_b = (_a2 = inputTheme.variants) == null ? void 0 : _a2.unstyled.field) != null ? _b : {}\n};\nvar _a3, _b2, _c, _d, _e, _f, _g, _h;\nvar sizes = {\n xs: (_b2 = (_a3 = inputTheme.sizes) == null ? void 0 : _a3.xs.field) != null ? _b2 : {},\n sm: (_d = (_c = inputTheme.sizes) == null ? void 0 : _c.sm.field) != null ? _d : {},\n md: (_f = (_e = inputTheme.sizes) == null ? void 0 : _e.md.field) != null ? _f : {},\n lg: (_h = (_g = inputTheme.sizes) == null ? void 0 : _g.lg.field) != null ? _h : {}\n};\nvar textareaTheme = defineStyleConfig({\n baseStyle,\n sizes,\n variants,\n defaultProps: {\n size: \"md\",\n variant: \"outline\"\n }\n});\n\nexport {\n textareaTheme\n};\n","// src/components/tooltip.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nimport { cssVar } from \"@chakra-ui/theme-tools\";\nvar $bg = cssVar(\"tooltip-bg\");\nvar $fg = cssVar(\"tooltip-fg\");\nvar $arrowBg = cssVar(\"popper-arrow-bg\");\nvar baseStyle = defineStyle({\n bg: $bg.reference,\n color: $fg.reference,\n [$bg.variable]: \"colors.gray.700\",\n [$fg.variable]: \"colors.whiteAlpha.900\",\n _dark: {\n [$bg.variable]: \"colors.gray.300\",\n [$fg.variable]: \"colors.gray.900\"\n },\n [$arrowBg.variable]: $bg.reference,\n px: \"2\",\n py: \"0.5\",\n borderRadius: \"sm\",\n fontWeight: \"medium\",\n fontSize: \"sm\",\n boxShadow: \"md\",\n maxW: \"xs\",\n zIndex: \"tooltip\"\n});\nvar tooltipTheme = defineStyleConfig({\n baseStyle\n});\n\nexport {\n tooltipTheme\n};\n","// src/components/progress.ts\nimport { progressAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nimport { generateStripe, getColor, mode } from \"@chakra-ui/theme-tools\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar filledStyle = defineStyle((props) => {\n const { colorScheme: c, theme: t, isIndeterminate, hasStripe } = props;\n const stripeStyle = mode(\n generateStripe(),\n generateStripe(\"1rem\", \"rgba(0,0,0,0.1)\")\n )(props);\n const bgColor = mode(`${c}.500`, `${c}.200`)(props);\n const gradient = `linear-gradient(\n to right,\n transparent 0%,\n ${getColor(t, bgColor)} 50%,\n transparent 100%\n )`;\n const addStripe = !isIndeterminate && hasStripe;\n return {\n ...addStripe && stripeStyle,\n ...isIndeterminate ? { bgImage: gradient } : { bgColor }\n };\n});\nvar baseStyleLabel = defineStyle({\n lineHeight: \"1\",\n fontSize: \"0.25em\",\n fontWeight: \"bold\",\n color: \"white\"\n});\nvar baseStyleTrack = defineStyle((props) => {\n return {\n bg: mode(\"gray.100\", \"whiteAlpha.300\")(props)\n };\n});\nvar baseStyleFilledTrack = defineStyle((props) => {\n return {\n transitionProperty: \"common\",\n transitionDuration: \"slow\",\n ...filledStyle(props)\n };\n});\nvar baseStyle = definePartsStyle((props) => ({\n label: baseStyleLabel,\n filledTrack: baseStyleFilledTrack(props),\n track: baseStyleTrack(props)\n}));\nvar sizes = {\n xs: definePartsStyle({\n track: { h: \"1\" }\n }),\n sm: definePartsStyle({\n track: { h: \"2\" }\n }),\n md: definePartsStyle({\n track: { h: \"3\" }\n }),\n lg: definePartsStyle({\n track: { h: \"4\" }\n })\n};\nvar progressTheme = defineMultiStyleConfig({\n sizes,\n baseStyle,\n defaultProps: {\n size: \"md\",\n colorScheme: \"blue\"\n }\n});\n\nexport {\n progressTheme\n};\n","// src/utils/run-if-fn.ts\nvar isFunction = (value) => typeof value === \"function\";\nfunction runIfFn(valueOrFn, ...args) {\n return isFunction(valueOrFn) ? valueOrFn(...args) : valueOrFn;\n}\n\nexport {\n runIfFn\n};\n","import {\n runIfFn\n} from \"./chunk-EBS47JIL.mjs\";\n\n// src/components/checkbox.ts\nimport { checkboxAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nimport { mode } from \"@chakra-ui/theme-tools\";\nvar { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nvar $size = cssVar(\"checkbox-size\");\nvar baseStyleControl = defineStyle((props) => {\n const { colorScheme: c } = props;\n return {\n w: $size.reference,\n h: $size.reference,\n transitionProperty: \"box-shadow\",\n transitionDuration: \"normal\",\n border: \"2px solid\",\n borderRadius: \"sm\",\n borderColor: \"inherit\",\n color: \"white\",\n _checked: {\n bg: mode(`${c}.500`, `${c}.200`)(props),\n borderColor: mode(`${c}.500`, `${c}.200`)(props),\n color: mode(\"white\", \"gray.900\")(props),\n _hover: {\n bg: mode(`${c}.600`, `${c}.300`)(props),\n borderColor: mode(`${c}.600`, `${c}.300`)(props)\n },\n _disabled: {\n borderColor: mode(\"gray.200\", \"transparent\")(props),\n bg: mode(\"gray.200\", \"whiteAlpha.300\")(props),\n color: mode(\"gray.500\", \"whiteAlpha.500\")(props)\n }\n },\n _indeterminate: {\n bg: mode(`${c}.500`, `${c}.200`)(props),\n borderColor: mode(`${c}.500`, `${c}.200`)(props),\n color: mode(\"white\", \"gray.900\")(props)\n },\n _disabled: {\n bg: mode(\"gray.100\", \"whiteAlpha.100\")(props),\n borderColor: mode(\"gray.100\", \"transparent\")(props)\n },\n _focusVisible: {\n boxShadow: \"outline\"\n },\n _invalid: {\n borderColor: mode(\"red.500\", \"red.300\")(props)\n }\n };\n});\nvar baseStyleContainer = defineStyle({\n _disabled: { cursor: \"not-allowed\" }\n});\nvar baseStyleLabel = defineStyle({\n userSelect: \"none\",\n _disabled: { opacity: 0.4 }\n});\nvar baseStyleIcon = defineStyle({\n transitionProperty: \"transform\",\n transitionDuration: \"normal\"\n});\nvar baseStyle = definePartsStyle((props) => ({\n icon: baseStyleIcon,\n container: baseStyleContainer,\n control: runIfFn(baseStyleControl, props),\n label: baseStyleLabel\n}));\nvar sizes = {\n sm: definePartsStyle({\n control: { [$size.variable]: \"sizes.3\" },\n label: { fontSize: \"sm\" },\n icon: { fontSize: \"3xs\" }\n }),\n md: definePartsStyle({\n control: { [$size.variable]: \"sizes.4\" },\n label: { fontSize: \"md\" },\n icon: { fontSize: \"2xs\" }\n }),\n lg: definePartsStyle({\n control: { [$size.variable]: \"sizes.5\" },\n label: { fontSize: \"lg\" },\n icon: { fontSize: \"2xs\" }\n })\n};\nvar checkboxTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n defaultProps: {\n size: \"md\",\n colorScheme: \"blue\"\n }\n});\n\nexport {\n checkboxTheme\n};\n","import {\n checkboxTheme\n} from \"./chunk-3XG4KRSA.mjs\";\nimport {\n runIfFn\n} from \"./chunk-EBS47JIL.mjs\";\n\n// src/components/radio.ts\nimport { radioAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar baseStyleControl = defineStyle((props) => {\n var _a;\n const controlStyle = (_a = runIfFn(checkboxTheme.baseStyle, props)) == null ? void 0 : _a.control;\n return {\n ...controlStyle,\n borderRadius: \"full\",\n _checked: {\n ...controlStyle == null ? void 0 : controlStyle[\"_checked\"],\n _before: {\n content: `\"\"`,\n display: \"inline-block\",\n pos: \"relative\",\n w: \"50%\",\n h: \"50%\",\n borderRadius: \"50%\",\n bg: \"currentColor\"\n }\n }\n };\n});\nvar baseStyle = definePartsStyle((props) => {\n var _a, _b, _c, _d;\n return {\n label: (_b = (_a = checkboxTheme).baseStyle) == null ? void 0 : _b.call(_a, props).label,\n container: (_d = (_c = checkboxTheme).baseStyle) == null ? void 0 : _d.call(_c, props).container,\n control: baseStyleControl(props)\n };\n});\nvar sizes = {\n md: definePartsStyle({\n control: { w: \"4\", h: \"4\" },\n label: { fontSize: \"md\" }\n }),\n lg: definePartsStyle({\n control: { w: \"5\", h: \"5\" },\n label: { fontSize: \"lg\" }\n }),\n sm: definePartsStyle({\n control: { width: \"3\", height: \"3\" },\n label: { fontSize: \"sm\" }\n })\n};\nvar radioTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n defaultProps: {\n size: \"md\",\n colorScheme: \"blue\"\n }\n});\n\nexport {\n radioTheme\n};\n","import {\n inputTheme\n} from \"./chunk-WFLWAEKG.mjs\";\n\n// src/components/select.ts\nimport { selectAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar $bg = cssVar(\"select-bg\");\nvar _a;\nvar baseStyleField = defineStyle({\n ...(_a = inputTheme.baseStyle) == null ? void 0 : _a.field,\n appearance: \"none\",\n paddingBottom: \"1px\",\n lineHeight: \"normal\",\n bg: $bg.reference,\n [$bg.variable]: \"colors.white\",\n _dark: {\n [$bg.variable]: \"colors.gray.700\"\n },\n \"> option, > optgroup\": {\n bg: $bg.reference\n }\n});\nvar baseStyleIcon = defineStyle({\n width: \"6\",\n height: \"100%\",\n insetEnd: \"2\",\n position: \"relative\",\n color: \"currentColor\",\n fontSize: \"xl\",\n _disabled: {\n opacity: 0.5\n }\n});\nvar baseStyle = definePartsStyle({\n field: baseStyleField,\n icon: baseStyleIcon\n});\nvar iconSpacing = defineStyle({\n paddingInlineEnd: \"8\"\n});\nvar _a2, _b, _c, _d, _e, _f, _g, _h;\nvar sizes = {\n lg: {\n ...(_a2 = inputTheme.sizes) == null ? void 0 : _a2.lg,\n field: {\n ...(_b = inputTheme.sizes) == null ? void 0 : _b.lg.field,\n ...iconSpacing\n }\n },\n md: {\n ...(_c = inputTheme.sizes) == null ? void 0 : _c.md,\n field: {\n ...(_d = inputTheme.sizes) == null ? void 0 : _d.md.field,\n ...iconSpacing\n }\n },\n sm: {\n ...(_e = inputTheme.sizes) == null ? void 0 : _e.sm,\n field: {\n ...(_f = inputTheme.sizes) == null ? void 0 : _f.sm.field,\n ...iconSpacing\n }\n },\n xs: {\n ...(_g = inputTheme.sizes) == null ? void 0 : _g.xs,\n field: {\n ...(_h = inputTheme.sizes) == null ? void 0 : _h.xs.field,\n ...iconSpacing\n },\n icon: {\n insetEnd: \"1\"\n }\n }\n};\nvar selectTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n variants: inputTheme.variants,\n defaultProps: inputTheme.defaultProps\n});\n\nexport {\n selectTheme\n};\n","// src/components/skeleton.ts\nimport {\n cssVar,\n defineStyle,\n defineStyleConfig\n} from \"@chakra-ui/styled-system\";\nvar $startColor = cssVar(\"skeleton-start-color\");\nvar $endColor = cssVar(\"skeleton-end-color\");\nvar baseStyle = defineStyle({\n [$startColor.variable]: \"colors.gray.100\",\n [$endColor.variable]: \"colors.gray.400\",\n _dark: {\n [$startColor.variable]: \"colors.gray.800\",\n [$endColor.variable]: \"colors.gray.600\"\n },\n background: $startColor.reference,\n borderColor: $endColor.reference,\n opacity: 0.7,\n borderRadius: \"sm\"\n});\nvar skeletonTheme = defineStyleConfig({\n baseStyle\n});\n\nexport {\n skeletonTheme\n};\n","// src/components/skip-link.ts\nimport {\n cssVar,\n defineStyle,\n defineStyleConfig\n} from \"@chakra-ui/styled-system\";\nvar $bg = cssVar(\"skip-link-bg\");\nvar baseStyle = defineStyle({\n borderRadius: \"md\",\n fontWeight: \"semibold\",\n _focusVisible: {\n boxShadow: \"outline\",\n padding: \"4\",\n position: \"fixed\",\n top: \"6\",\n insetStart: \"6\",\n [$bg.variable]: \"colors.white\",\n _dark: {\n [$bg.variable]: \"colors.gray.700\"\n },\n bg: $bg.reference\n }\n});\nvar skipLinkTheme = defineStyleConfig({\n baseStyle\n});\n\nexport {\n skipLinkTheme\n};\n","// src/components/slider.ts\nimport { sliderAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nimport { orient } from \"@chakra-ui/theme-tools\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar $thumbSize = cssVar(\"slider-thumb-size\");\nvar $trackSize = cssVar(\"slider-track-size\");\nvar $bg = cssVar(\"slider-bg\");\nvar baseStyleContainer = defineStyle((props) => {\n const { orientation } = props;\n return {\n display: \"inline-block\",\n position: \"relative\",\n cursor: \"pointer\",\n _disabled: {\n opacity: 0.6,\n cursor: \"default\",\n pointerEvents: \"none\"\n },\n ...orient({\n orientation,\n vertical: { h: \"100%\" },\n horizontal: { w: \"100%\" }\n })\n };\n});\nvar baseStyleTrack = defineStyle((props) => {\n const orientationStyles = orient({\n orientation: props.orientation,\n horizontal: { h: $trackSize.reference },\n vertical: { w: $trackSize.reference }\n });\n return {\n ...orientationStyles,\n overflow: \"hidden\",\n borderRadius: \"sm\",\n [$bg.variable]: \"colors.gray.200\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.200\"\n },\n _disabled: {\n [$bg.variable]: \"colors.gray.300\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.300\"\n }\n },\n bg: $bg.reference\n };\n});\nvar baseStyleThumb = defineStyle((props) => {\n const { orientation } = props;\n const orientationStyle = orient({\n orientation,\n vertical: {\n left: \"50%\",\n transform: `translateX(-50%)`,\n _active: {\n transform: `translateX(-50%) scale(1.15)`\n }\n },\n horizontal: {\n top: \"50%\",\n transform: `translateY(-50%)`,\n _active: {\n transform: `translateY(-50%) scale(1.15)`\n }\n }\n });\n return {\n ...orientationStyle,\n w: $thumbSize.reference,\n h: $thumbSize.reference,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"absolute\",\n outline: 0,\n zIndex: 1,\n borderRadius: \"full\",\n bg: \"white\",\n boxShadow: \"base\",\n border: \"1px solid\",\n borderColor: \"transparent\",\n transitionProperty: \"transform\",\n transitionDuration: \"normal\",\n _focusVisible: {\n boxShadow: \"outline\"\n },\n _disabled: {\n bg: \"gray.300\"\n }\n };\n});\nvar baseStyleFilledTrack = defineStyle((props) => {\n const { colorScheme: c } = props;\n return {\n width: \"inherit\",\n height: \"inherit\",\n [$bg.variable]: `colors.${c}.500`,\n _dark: {\n [$bg.variable]: `colors.${c}.200`\n },\n bg: $bg.reference\n };\n});\nvar baseStyle = definePartsStyle((props) => ({\n container: baseStyleContainer(props),\n track: baseStyleTrack(props),\n thumb: baseStyleThumb(props),\n filledTrack: baseStyleFilledTrack(props)\n}));\nvar sizeLg = definePartsStyle({\n container: {\n [$thumbSize.variable]: `sizes.4`,\n [$trackSize.variable]: `sizes.1`\n }\n});\nvar sizeMd = definePartsStyle({\n container: {\n [$thumbSize.variable]: `sizes.3.5`,\n [$trackSize.variable]: `sizes.1`\n }\n});\nvar sizeSm = definePartsStyle({\n container: {\n [$thumbSize.variable]: `sizes.2.5`,\n [$trackSize.variable]: `sizes.0.5`\n }\n});\nvar sizes = {\n lg: sizeLg,\n md: sizeMd,\n sm: sizeSm\n};\nvar sliderTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n defaultProps: {\n size: \"md\",\n colorScheme: \"blue\"\n }\n});\n\nexport {\n sliderTheme\n};\n","// src/components/spinner.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nimport { cssVar } from \"@chakra-ui/theme-tools\";\nvar $size = cssVar(\"spinner-size\");\nvar baseStyle = defineStyle({\n width: [$size.reference],\n height: [$size.reference]\n});\nvar sizes = {\n xs: defineStyle({\n [$size.variable]: \"sizes.3\"\n }),\n sm: defineStyle({\n [$size.variable]: \"sizes.4\"\n }),\n md: defineStyle({\n [$size.variable]: \"sizes.6\"\n }),\n lg: defineStyle({\n [$size.variable]: \"sizes.8\"\n }),\n xl: defineStyle({\n [$size.variable]: \"sizes.12\"\n })\n};\nvar spinnerTheme = defineStyleConfig({\n baseStyle,\n sizes,\n defaultProps: {\n size: \"md\"\n }\n});\n\nexport {\n spinnerTheme\n};\n","// src/components/stat.ts\nimport { statAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar baseStyleLabel = defineStyle({\n fontWeight: \"medium\"\n});\nvar baseStyleHelpText = defineStyle({\n opacity: 0.8,\n marginBottom: \"2\"\n});\nvar baseStyleNumber = defineStyle({\n verticalAlign: \"baseline\",\n fontWeight: \"semibold\"\n});\nvar baseStyleIcon = defineStyle({\n marginEnd: 1,\n w: \"3.5\",\n h: \"3.5\",\n verticalAlign: \"middle\"\n});\nvar baseStyle = definePartsStyle({\n container: {},\n label: baseStyleLabel,\n helpText: baseStyleHelpText,\n number: baseStyleNumber,\n icon: baseStyleIcon\n});\nvar sizes = {\n md: definePartsStyle({\n label: { fontSize: \"sm\" },\n helpText: { fontSize: \"sm\" },\n number: { fontSize: \"2xl\" }\n })\n};\nvar statTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n defaultProps: {\n size: \"md\"\n }\n});\n\nexport {\n statTheme\n};\n","// src/components/kbd.ts\nimport {\n cssVar,\n defineStyle,\n defineStyleConfig\n} from \"@chakra-ui/styled-system\";\nvar $bg = cssVar(\"kbd-bg\");\nvar baseStyle = defineStyle({\n [$bg.variable]: \"colors.gray.100\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.100\"\n },\n bg: $bg.reference,\n borderRadius: \"md\",\n borderWidth: \"1px\",\n borderBottomWidth: \"3px\",\n fontSize: \"0.8em\",\n fontWeight: \"bold\",\n lineHeight: \"normal\",\n px: \"0.4em\",\n whiteSpace: \"nowrap\"\n});\nvar kbdTheme = defineStyleConfig({\n baseStyle\n});\n\nexport {\n kbdTheme\n};\n","// src/components/link.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nvar baseStyle = defineStyle({\n transitionProperty: \"common\",\n transitionDuration: \"fast\",\n transitionTimingFunction: \"ease-out\",\n cursor: \"pointer\",\n textDecoration: \"none\",\n outline: \"none\",\n color: \"inherit\",\n _hover: {\n textDecoration: \"underline\"\n },\n _focusVisible: {\n boxShadow: \"outline\"\n }\n});\nvar linkTheme = defineStyleConfig({\n baseStyle\n});\n\nexport {\n linkTheme\n};\n","// src/components/list.ts\nimport { listAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar baseStyleIcon = defineStyle({\n marginEnd: \"2\",\n display: \"inline\",\n verticalAlign: \"text-bottom\"\n});\nvar baseStyle = definePartsStyle({\n icon: baseStyleIcon\n});\nvar listTheme = defineMultiStyleConfig({\n baseStyle\n});\n\nexport {\n listTheme\n};\n","// src/components/menu.ts\nimport { menuAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar $bg = cssVar(\"menu-bg\");\nvar $shadow = cssVar(\"menu-shadow\");\nvar baseStyleList = defineStyle({\n [$bg.variable]: \"#fff\",\n [$shadow.variable]: \"shadows.sm\",\n _dark: {\n [$bg.variable]: \"colors.gray.700\",\n [$shadow.variable]: \"shadows.dark-lg\"\n },\n color: \"inherit\",\n minW: \"3xs\",\n py: \"2\",\n zIndex: 1,\n borderRadius: \"md\",\n borderWidth: \"1px\",\n bg: $bg.reference,\n boxShadow: $shadow.reference\n});\nvar baseStyleItem = defineStyle({\n py: \"1.5\",\n px: \"3\",\n transitionProperty: \"background\",\n transitionDuration: \"ultra-fast\",\n transitionTimingFunction: \"ease-in\",\n _focus: {\n [$bg.variable]: \"colors.gray.100\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.100\"\n }\n },\n _active: {\n [$bg.variable]: \"colors.gray.200\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.200\"\n }\n },\n _expanded: {\n [$bg.variable]: \"colors.gray.100\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.100\"\n }\n },\n _disabled: {\n opacity: 0.4,\n cursor: \"not-allowed\"\n },\n bg: $bg.reference\n});\nvar baseStyleGroupTitle = defineStyle({\n mx: 4,\n my: 2,\n fontWeight: \"semibold\",\n fontSize: \"sm\"\n});\nvar baseStyleCommand = defineStyle({\n opacity: 0.6\n});\nvar baseStyleDivider = defineStyle({\n border: 0,\n borderBottom: \"1px solid\",\n borderColor: \"inherit\",\n my: \"2\",\n opacity: 0.6\n});\nvar baseStyleButton = defineStyle({\n transitionProperty: \"common\",\n transitionDuration: \"normal\"\n});\nvar baseStyle = definePartsStyle({\n button: baseStyleButton,\n list: baseStyleList,\n item: baseStyleItem,\n groupTitle: baseStyleGroupTitle,\n command: baseStyleCommand,\n divider: baseStyleDivider\n});\nvar menuTheme = defineMultiStyleConfig({\n baseStyle\n});\n\nexport {\n menuTheme\n};\n","import {\n runIfFn\n} from \"./chunk-EBS47JIL.mjs\";\n\n// src/components/modal.ts\nimport { modalAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar $bg = cssVar(\"modal-bg\");\nvar $shadow = cssVar(\"modal-shadow\");\nvar baseStyleOverlay = defineStyle({\n bg: \"blackAlpha.600\",\n zIndex: \"modal\"\n});\nvar baseStyleDialogContainer = defineStyle((props) => {\n const { isCentered, scrollBehavior } = props;\n return {\n display: \"flex\",\n zIndex: \"modal\",\n justifyContent: \"center\",\n alignItems: isCentered ? \"center\" : \"flex-start\",\n overflow: scrollBehavior === \"inside\" ? \"hidden\" : \"auto\",\n overscrollBehaviorY: \"none\"\n };\n});\nvar baseStyleDialog = defineStyle((props) => {\n const { isCentered, scrollBehavior } = props;\n return {\n borderRadius: \"md\",\n color: \"inherit\",\n my: isCentered ? \"auto\" : \"16\",\n mx: isCentered ? \"auto\" : void 0,\n zIndex: \"modal\",\n maxH: scrollBehavior === \"inside\" ? \"calc(100% - 7.5rem)\" : void 0,\n [$bg.variable]: \"colors.white\",\n [$shadow.variable]: \"shadows.lg\",\n _dark: {\n [$bg.variable]: \"colors.gray.700\",\n [$shadow.variable]: \"shadows.dark-lg\"\n },\n bg: $bg.reference,\n boxShadow: $shadow.reference\n };\n});\nvar baseStyleHeader = defineStyle({\n px: \"6\",\n py: \"4\",\n fontSize: \"xl\",\n fontWeight: \"semibold\"\n});\nvar baseStyleCloseButton = defineStyle({\n position: \"absolute\",\n top: \"2\",\n insetEnd: \"3\"\n});\nvar baseStyleBody = defineStyle((props) => {\n const { scrollBehavior } = props;\n return {\n px: \"6\",\n py: \"2\",\n flex: \"1\",\n overflow: scrollBehavior === \"inside\" ? \"auto\" : void 0\n };\n});\nvar baseStyleFooter = defineStyle({\n px: \"6\",\n py: \"4\"\n});\nvar baseStyle = definePartsStyle((props) => ({\n overlay: baseStyleOverlay,\n dialogContainer: runIfFn(baseStyleDialogContainer, props),\n dialog: runIfFn(baseStyleDialog, props),\n header: baseStyleHeader,\n closeButton: baseStyleCloseButton,\n body: runIfFn(baseStyleBody, props),\n footer: baseStyleFooter\n}));\nfunction getSize(value) {\n if (value === \"full\") {\n return definePartsStyle({\n dialog: {\n maxW: \"100vw\",\n minH: \"$100vh\",\n my: \"0\",\n borderRadius: \"0\"\n }\n });\n }\n return definePartsStyle({\n dialog: { maxW: value }\n });\n}\nvar sizes = {\n xs: getSize(\"xs\"),\n sm: getSize(\"sm\"),\n md: getSize(\"md\"),\n lg: getSize(\"lg\"),\n xl: getSize(\"xl\"),\n \"2xl\": getSize(\"2xl\"),\n \"3xl\": getSize(\"3xl\"),\n \"4xl\": getSize(\"4xl\"),\n \"5xl\": getSize(\"5xl\"),\n \"6xl\": getSize(\"6xl\"),\n full: getSize(\"full\")\n};\nvar modalTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n defaultProps: { size: \"md\" }\n});\n\nexport {\n modalTheme\n};\n","import {\n typography_default\n} from \"./chunk-HOOF7HHD.mjs\";\nimport {\n inputTheme\n} from \"./chunk-WFLWAEKG.mjs\";\nimport {\n runIfFn\n} from \"./chunk-EBS47JIL.mjs\";\n\n// src/components/number-input.ts\nimport { numberInputAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nimport { calc, cssVar } from \"@chakra-ui/theme-tools\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar $stepperWidth = cssVar(\"number-input-stepper-width\");\nvar $inputPadding = cssVar(\"number-input-input-padding\");\nvar inputPaddingValue = calc($stepperWidth).add(\"0.5rem\").toString();\nvar $bg = cssVar(\"number-input-bg\");\nvar $fg = cssVar(\"number-input-color\");\nvar $border = cssVar(\"number-input-border-color\");\nvar baseStyleRoot = defineStyle({\n [$stepperWidth.variable]: \"sizes.6\",\n [$inputPadding.variable]: inputPaddingValue\n});\nvar baseStyleField = defineStyle(\n (props) => {\n var _a, _b;\n return (_b = (_a = runIfFn(inputTheme.baseStyle, props)) == null ? void 0 : _a.field) != null ? _b : {};\n }\n);\nvar baseStyleStepperGroup = defineStyle({\n width: $stepperWidth.reference\n});\nvar baseStyleStepper = defineStyle({\n borderStart: \"1px solid\",\n borderStartColor: $border.reference,\n color: $fg.reference,\n bg: $bg.reference,\n [$fg.variable]: \"colors.chakra-body-text\",\n [$border.variable]: \"colors.chakra-border-color\",\n _dark: {\n [$fg.variable]: \"colors.whiteAlpha.800\",\n [$border.variable]: \"colors.whiteAlpha.300\"\n },\n _active: {\n [$bg.variable]: \"colors.gray.200\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.300\"\n }\n },\n _disabled: {\n opacity: 0.4,\n cursor: \"not-allowed\"\n }\n});\nvar baseStyle = definePartsStyle((props) => {\n var _a;\n return {\n root: baseStyleRoot,\n field: (_a = runIfFn(baseStyleField, props)) != null ? _a : {},\n stepperGroup: baseStyleStepperGroup,\n stepper: baseStyleStepper\n };\n});\nfunction getSize(size) {\n var _a, _b, _c;\n const sizeStyle = (_a = inputTheme.sizes) == null ? void 0 : _a[size];\n const radius = {\n lg: \"md\",\n md: \"md\",\n sm: \"sm\",\n xs: \"sm\"\n };\n const _fontSize = (_c = (_b = sizeStyle.field) == null ? void 0 : _b.fontSize) != null ? _c : \"md\";\n const fontSize = typography_default.fontSizes[_fontSize];\n return definePartsStyle({\n field: {\n ...sizeStyle.field,\n paddingInlineEnd: $inputPadding.reference,\n verticalAlign: \"top\"\n },\n stepper: {\n fontSize: calc(fontSize).multiply(0.75).toString(),\n _first: {\n borderTopEndRadius: radius[size]\n },\n _last: {\n borderBottomEndRadius: radius[size],\n mt: \"-1px\",\n borderTopWidth: 1\n }\n }\n });\n}\nvar sizes = {\n xs: getSize(\"xs\"),\n sm: getSize(\"sm\"),\n md: getSize(\"md\"),\n lg: getSize(\"lg\")\n};\nvar numberInputTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n variants: inputTheme.variants,\n defaultProps: inputTheme.defaultProps\n});\n\nexport {\n numberInputTheme\n};\n","import {\n inputTheme\n} from \"./chunk-WFLWAEKG.mjs\";\nimport {\n runIfFn\n} from \"./chunk-EBS47JIL.mjs\";\n\n// src/components/pin-input.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nvar _a;\nvar baseStyle = defineStyle({\n ...(_a = inputTheme.baseStyle) == null ? void 0 : _a.field,\n textAlign: \"center\"\n});\nvar sizes = {\n lg: defineStyle({\n fontSize: \"lg\",\n w: 12,\n h: 12,\n borderRadius: \"md\"\n }),\n md: defineStyle({\n fontSize: \"md\",\n w: 10,\n h: 10,\n borderRadius: \"md\"\n }),\n sm: defineStyle({\n fontSize: \"sm\",\n w: 8,\n h: 8,\n borderRadius: \"sm\"\n }),\n xs: defineStyle({\n fontSize: \"xs\",\n w: 6,\n h: 6,\n borderRadius: \"sm\"\n })\n};\nvar _a2, _b;\nvar variants = {\n outline: defineStyle(\n (props) => {\n var _a3, _b2, _c;\n return (_c = (_b2 = runIfFn((_a3 = inputTheme.variants) == null ? void 0 : _a3.outline, props)) == null ? void 0 : _b2.field) != null ? _c : {};\n }\n ),\n flushed: defineStyle(\n (props) => {\n var _a3, _b2, _c;\n return (_c = (_b2 = runIfFn((_a3 = inputTheme.variants) == null ? void 0 : _a3.flushed, props)) == null ? void 0 : _b2.field) != null ? _c : {};\n }\n ),\n filled: defineStyle(\n (props) => {\n var _a3, _b2, _c;\n return (_c = (_b2 = runIfFn((_a3 = inputTheme.variants) == null ? void 0 : _a3.filled, props)) == null ? void 0 : _b2.field) != null ? _c : {};\n }\n ),\n unstyled: (_b = (_a2 = inputTheme.variants) == null ? void 0 : _a2.unstyled.field) != null ? _b : {}\n};\nvar pinInputTheme = defineStyleConfig({\n baseStyle,\n sizes,\n variants,\n defaultProps: inputTheme.defaultProps\n});\n\nexport {\n pinInputTheme\n};\n","// src/components/popover.ts\nimport { popoverAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nimport { cssVar } from \"@chakra-ui/theme-tools\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar $popperBg = cssVar(\"popper-bg\");\nvar $arrowBg = cssVar(\"popper-arrow-bg\");\nvar $arrowShadowColor = cssVar(\"popper-arrow-shadow-color\");\nvar baseStylePopper = defineStyle({ zIndex: 10 });\nvar baseStyleContent = defineStyle({\n [$popperBg.variable]: `colors.white`,\n bg: $popperBg.reference,\n [$arrowBg.variable]: $popperBg.reference,\n [$arrowShadowColor.variable]: `colors.gray.200`,\n _dark: {\n [$popperBg.variable]: `colors.gray.700`,\n [$arrowShadowColor.variable]: `colors.whiteAlpha.300`\n },\n width: \"xs\",\n border: \"1px solid\",\n borderColor: \"inherit\",\n borderRadius: \"md\",\n boxShadow: \"sm\",\n zIndex: \"inherit\",\n _focusVisible: {\n outline: 0,\n boxShadow: \"outline\"\n }\n});\nvar baseStyleHeader = defineStyle({\n px: 3,\n py: 2,\n borderBottomWidth: \"1px\"\n});\nvar baseStyleBody = defineStyle({\n px: 3,\n py: 2\n});\nvar baseStyleFooter = defineStyle({\n px: 3,\n py: 2,\n borderTopWidth: \"1px\"\n});\nvar baseStyleCloseButton = defineStyle({\n position: \"absolute\",\n borderRadius: \"md\",\n top: 1,\n insetEnd: 2,\n padding: 2\n});\nvar baseStyle = definePartsStyle({\n popper: baseStylePopper,\n content: baseStyleContent,\n header: baseStyleHeader,\n body: baseStyleBody,\n footer: baseStyleFooter,\n closeButton: baseStyleCloseButton\n});\nvar popoverTheme = defineMultiStyleConfig({\n baseStyle\n});\n\nexport {\n popoverTheme\n};\n","import {\n runIfFn\n} from \"./chunk-EBS47JIL.mjs\";\n\n// src/components/drawer.ts\nimport { drawerAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nvar $bg = cssVar(\"drawer-bg\");\nvar $bs = cssVar(\"drawer-box-shadow\");\nfunction getSize(value) {\n if (value === \"full\") {\n return definePartsStyle({\n dialog: { maxW: \"100vw\", h: \"100vh\" }\n });\n }\n return definePartsStyle({\n dialog: { maxW: value }\n });\n}\nvar baseStyleOverlay = defineStyle({\n bg: \"blackAlpha.600\",\n zIndex: \"overlay\"\n});\nvar baseStyleDialogContainer = defineStyle({\n display: \"flex\",\n zIndex: \"modal\",\n justifyContent: \"center\"\n});\nvar baseStyleDialog = defineStyle((props) => {\n const { isFullHeight } = props;\n return {\n ...isFullHeight && { height: \"100vh\" },\n zIndex: \"modal\",\n maxH: \"100vh\",\n color: \"inherit\",\n [$bg.variable]: \"colors.white\",\n [$bs.variable]: \"shadows.lg\",\n _dark: {\n [$bg.variable]: \"colors.gray.700\",\n [$bs.variable]: \"shadows.dark-lg\"\n },\n bg: $bg.reference,\n boxShadow: $bs.reference\n };\n});\nvar baseStyleHeader = defineStyle({\n px: \"6\",\n py: \"4\",\n fontSize: \"xl\",\n fontWeight: \"semibold\"\n});\nvar baseStyleCloseButton = defineStyle({\n position: \"absolute\",\n top: \"2\",\n insetEnd: \"3\"\n});\nvar baseStyleBody = defineStyle({\n px: \"6\",\n py: \"2\",\n flex: \"1\",\n overflow: \"auto\"\n});\nvar baseStyleFooter = defineStyle({\n px: \"6\",\n py: \"4\"\n});\nvar baseStyle = definePartsStyle((props) => ({\n overlay: baseStyleOverlay,\n dialogContainer: baseStyleDialogContainer,\n dialog: runIfFn(baseStyleDialog, props),\n header: baseStyleHeader,\n closeButton: baseStyleCloseButton,\n body: baseStyleBody,\n footer: baseStyleFooter\n}));\nvar sizes = {\n xs: getSize(\"xs\"),\n sm: getSize(\"md\"),\n md: getSize(\"lg\"),\n lg: getSize(\"2xl\"),\n xl: getSize(\"4xl\"),\n full: getSize(\"full\")\n};\nvar drawerTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n defaultProps: {\n size: \"xs\"\n }\n});\n\nexport {\n drawerTheme\n};\n","// src/components/editable.ts\nimport { editableAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nvar baseStylePreview = defineStyle({\n borderRadius: \"md\",\n py: \"1\",\n transitionProperty: \"common\",\n transitionDuration: \"normal\"\n});\nvar baseStyleInput = defineStyle({\n borderRadius: \"md\",\n py: \"1\",\n transitionProperty: \"common\",\n transitionDuration: \"normal\",\n width: \"full\",\n _focusVisible: { boxShadow: \"outline\" },\n _placeholder: { opacity: 0.6 }\n});\nvar baseStyleTextarea = defineStyle({\n borderRadius: \"md\",\n py: \"1\",\n transitionProperty: \"common\",\n transitionDuration: \"normal\",\n width: \"full\",\n _focusVisible: { boxShadow: \"outline\" },\n _placeholder: { opacity: 0.6 }\n});\nvar baseStyle = definePartsStyle({\n preview: baseStylePreview,\n input: baseStyleInput,\n textarea: baseStyleTextarea\n});\nvar editableTheme = defineMultiStyleConfig({\n baseStyle\n});\n\nexport {\n editableTheme\n};\n","// src/components/form-control.ts\nimport { formAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nvar $fg = cssVar(\"form-control-color\");\nvar baseStyleRequiredIndicator = defineStyle({\n marginStart: \"1\",\n [$fg.variable]: \"colors.red.500\",\n _dark: {\n [$fg.variable]: \"colors.red.300\"\n },\n color: $fg.reference\n});\nvar baseStyleHelperText = defineStyle({\n mt: \"2\",\n [$fg.variable]: \"colors.gray.600\",\n _dark: {\n [$fg.variable]: \"colors.whiteAlpha.600\"\n },\n color: $fg.reference,\n lineHeight: \"normal\",\n fontSize: \"sm\"\n});\nvar baseStyle = definePartsStyle({\n container: {\n width: \"100%\",\n position: \"relative\"\n },\n requiredIndicator: baseStyleRequiredIndicator,\n helperText: baseStyleHelperText\n});\nvar formTheme = defineMultiStyleConfig({\n baseStyle\n});\n\nexport {\n formTheme\n};\n","// src/components/form-error.ts\nimport { formErrorAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nvar $fg = cssVar(\"form-error-color\");\nvar baseStyleText = defineStyle({\n [$fg.variable]: `colors.red.500`,\n _dark: {\n [$fg.variable]: `colors.red.300`\n },\n color: $fg.reference,\n mt: \"2\",\n fontSize: \"sm\",\n lineHeight: \"normal\"\n});\nvar baseStyleIcon = defineStyle({\n marginEnd: \"0.5em\",\n [$fg.variable]: `colors.red.500`,\n _dark: {\n [$fg.variable]: `colors.red.300`\n },\n color: $fg.reference\n});\nvar baseStyle = definePartsStyle({\n text: baseStyleText,\n icon: baseStyleIcon\n});\nvar formErrorTheme = defineMultiStyleConfig({\n baseStyle\n});\n\nexport {\n formErrorTheme\n};\n","// src/components/form-label.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nvar baseStyle = defineStyle({\n fontSize: \"md\",\n marginEnd: \"3\",\n mb: \"2\",\n fontWeight: \"medium\",\n transitionProperty: \"common\",\n transitionDuration: \"normal\",\n opacity: 1,\n _disabled: {\n opacity: 0.4\n }\n});\nvar formLabelTheme = defineStyleConfig({\n baseStyle\n});\n\nexport {\n formLabelTheme\n};\n","// src/components/heading.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nvar baseStyle = defineStyle({\n fontFamily: \"heading\",\n fontWeight: \"bold\"\n});\nvar sizes = {\n \"4xl\": defineStyle({\n fontSize: [\"6xl\", null, \"7xl\"],\n lineHeight: 1\n }),\n \"3xl\": defineStyle({\n fontSize: [\"5xl\", null, \"6xl\"],\n lineHeight: 1\n }),\n \"2xl\": defineStyle({\n fontSize: [\"4xl\", null, \"5xl\"],\n lineHeight: [1.2, null, 1]\n }),\n xl: defineStyle({\n fontSize: [\"3xl\", null, \"4xl\"],\n lineHeight: [1.33, null, 1.2]\n }),\n lg: defineStyle({\n fontSize: [\"2xl\", null, \"3xl\"],\n lineHeight: [1.33, null, 1.2]\n }),\n md: defineStyle({\n fontSize: \"xl\",\n lineHeight: 1.2\n }),\n sm: defineStyle({\n fontSize: \"md\",\n lineHeight: 1.2\n }),\n xs: defineStyle({\n fontSize: \"sm\",\n lineHeight: 1.2\n })\n};\nvar headingTheme = defineStyleConfig({\n baseStyle,\n sizes,\n defaultProps: {\n size: \"xl\"\n }\n});\n\nexport {\n headingTheme\n};\n","// src/components/breadcrumb.ts\nimport { breadcrumbAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar $decor = cssVar(\"breadcrumb-link-decor\");\nvar baseStyleLink = defineStyle({\n transitionProperty: \"common\",\n transitionDuration: \"fast\",\n transitionTimingFunction: \"ease-out\",\n outline: \"none\",\n color: \"inherit\",\n textDecoration: $decor.reference,\n [$decor.variable]: \"none\",\n \"&:not([aria-current=page])\": {\n cursor: \"pointer\",\n _hover: {\n [$decor.variable]: \"underline\"\n },\n _focusVisible: {\n boxShadow: \"outline\"\n }\n }\n});\nvar baseStyle = definePartsStyle({\n link: baseStyleLink\n});\nvar breadcrumbTheme = defineMultiStyleConfig({\n baseStyle\n});\n\nexport {\n breadcrumbTheme\n};\n","import {\n runIfFn\n} from \"./chunk-EBS47JIL.mjs\";\n\n// src/components/button.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nimport { mode, transparentize } from \"@chakra-ui/theme-tools\";\nvar baseStyle = defineStyle({\n lineHeight: \"1.2\",\n borderRadius: \"md\",\n fontWeight: \"semibold\",\n transitionProperty: \"common\",\n transitionDuration: \"normal\",\n _focusVisible: {\n boxShadow: \"outline\"\n },\n _disabled: {\n opacity: 0.4,\n cursor: \"not-allowed\",\n boxShadow: \"none\"\n },\n _hover: {\n _disabled: {\n bg: \"initial\"\n }\n }\n});\nvar variantGhost = defineStyle((props) => {\n const { colorScheme: c, theme } = props;\n if (c === \"gray\") {\n return {\n color: mode(`inherit`, `whiteAlpha.900`)(props),\n _hover: {\n bg: mode(`gray.100`, `whiteAlpha.200`)(props)\n },\n _active: { bg: mode(`gray.200`, `whiteAlpha.300`)(props) }\n };\n }\n const darkHoverBg = transparentize(`${c}.200`, 0.12)(theme);\n const darkActiveBg = transparentize(`${c}.200`, 0.24)(theme);\n return {\n color: mode(`${c}.600`, `${c}.200`)(props),\n bg: \"transparent\",\n _hover: {\n bg: mode(`${c}.50`, darkHoverBg)(props)\n },\n _active: {\n bg: mode(`${c}.100`, darkActiveBg)(props)\n }\n };\n});\nvar variantOutline = defineStyle((props) => {\n const { colorScheme: c } = props;\n const borderColor = mode(`gray.200`, `whiteAlpha.300`)(props);\n return {\n border: \"1px solid\",\n borderColor: c === \"gray\" ? borderColor : \"currentColor\",\n \".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)\": { marginEnd: \"-1px\" },\n \".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)\": { marginBottom: \"-1px\" },\n ...runIfFn(variantGhost, props)\n };\n});\nvar accessibleColorMap = {\n yellow: {\n bg: \"yellow.400\",\n color: \"black\",\n hoverBg: \"yellow.500\",\n activeBg: \"yellow.600\"\n },\n cyan: {\n bg: \"cyan.400\",\n color: \"black\",\n hoverBg: \"cyan.500\",\n activeBg: \"cyan.600\"\n }\n};\nvar variantSolid = defineStyle((props) => {\n var _a;\n const { colorScheme: c } = props;\n if (c === \"gray\") {\n const bg2 = mode(`gray.100`, `whiteAlpha.200`)(props);\n return {\n bg: bg2,\n _hover: {\n bg: mode(`gray.200`, `whiteAlpha.300`)(props),\n _disabled: {\n bg: bg2\n }\n },\n _active: { bg: mode(`gray.300`, `whiteAlpha.400`)(props) }\n };\n }\n const {\n bg = `${c}.500`,\n color = \"white\",\n hoverBg = `${c}.600`,\n activeBg = `${c}.700`\n } = (_a = accessibleColorMap[c]) != null ? _a : {};\n const background = mode(bg, `${c}.200`)(props);\n return {\n bg: background,\n color: mode(color, `gray.800`)(props),\n _hover: {\n bg: mode(hoverBg, `${c}.300`)(props),\n _disabled: {\n bg: background\n }\n },\n _active: { bg: mode(activeBg, `${c}.400`)(props) }\n };\n});\nvar variantLink = defineStyle((props) => {\n const { colorScheme: c } = props;\n return {\n padding: 0,\n height: \"auto\",\n lineHeight: \"normal\",\n verticalAlign: \"baseline\",\n color: mode(`${c}.500`, `${c}.200`)(props),\n _hover: {\n textDecoration: \"underline\",\n _disabled: {\n textDecoration: \"none\"\n }\n },\n _active: {\n color: mode(`${c}.700`, `${c}.500`)(props)\n }\n };\n});\nvar variantUnstyled = defineStyle({\n bg: \"none\",\n color: \"inherit\",\n display: \"inline\",\n lineHeight: \"inherit\",\n m: \"0\",\n p: \"0\"\n});\nvar variants = {\n ghost: variantGhost,\n outline: variantOutline,\n solid: variantSolid,\n link: variantLink,\n unstyled: variantUnstyled\n};\nvar sizes = {\n lg: defineStyle({\n h: \"12\",\n minW: \"12\",\n fontSize: \"lg\",\n px: \"6\"\n }),\n md: defineStyle({\n h: \"10\",\n minW: \"10\",\n fontSize: \"md\",\n px: \"4\"\n }),\n sm: defineStyle({\n h: \"8\",\n minW: \"8\",\n fontSize: \"sm\",\n px: \"3\"\n }),\n xs: defineStyle({\n h: \"6\",\n minW: \"6\",\n fontSize: \"xs\",\n px: \"2\"\n })\n};\nvar buttonTheme = defineStyleConfig({\n baseStyle,\n variants,\n sizes,\n defaultProps: {\n variant: \"solid\",\n size: \"md\",\n colorScheme: \"gray\"\n }\n});\n\nexport {\n buttonTheme\n};\n","// src/components/card.ts\nimport { cardAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport { createMultiStyleConfigHelpers, cssVar } from \"@chakra-ui/styled-system\";\nvar { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nvar $bg = cssVar(\"card-bg\");\nvar $padding = cssVar(\"card-padding\");\nvar $shadow = cssVar(\"card-shadow\");\nvar $radius = cssVar(\"card-radius\");\nvar $border = cssVar(\"card-border-width\", \"0\");\nvar $borderColor = cssVar(\"card-border-color\");\nvar baseStyle = definePartsStyle({\n container: {\n [$bg.variable]: \"colors.chakra-body-bg\",\n backgroundColor: $bg.reference,\n boxShadow: $shadow.reference,\n borderRadius: $radius.reference,\n color: \"chakra-body-text\",\n borderWidth: $border.reference,\n borderColor: $borderColor.reference\n },\n body: {\n padding: $padding.reference,\n flex: \"1 1 0%\"\n },\n header: {\n padding: $padding.reference\n },\n footer: {\n padding: $padding.reference\n }\n});\nvar sizes = {\n sm: definePartsStyle({\n container: {\n [$radius.variable]: \"radii.base\",\n [$padding.variable]: \"space.3\"\n }\n }),\n md: definePartsStyle({\n container: {\n [$radius.variable]: \"radii.md\",\n [$padding.variable]: \"space.5\"\n }\n }),\n lg: definePartsStyle({\n container: {\n [$radius.variable]: \"radii.xl\",\n [$padding.variable]: \"space.7\"\n }\n })\n};\nvar variants = {\n elevated: definePartsStyle({\n container: {\n [$shadow.variable]: \"shadows.base\",\n _dark: {\n [$bg.variable]: \"colors.gray.700\"\n }\n }\n }),\n outline: definePartsStyle({\n container: {\n [$border.variable]: \"1px\",\n [$borderColor.variable]: \"colors.chakra-border-color\"\n }\n }),\n filled: definePartsStyle({\n container: {\n [$bg.variable]: \"colors.chakra-subtle-bg\"\n }\n }),\n unstyled: {\n body: {\n [$padding.variable]: 0\n },\n header: {\n [$padding.variable]: 0\n },\n footer: {\n [$padding.variable]: 0\n }\n }\n};\nvar cardTheme = defineMultiStyleConfig({\n baseStyle,\n variants,\n sizes,\n defaultProps: {\n variant: \"elevated\",\n size: \"md\"\n }\n});\n\nexport {\n cardTheme\n};\n","// src/components/close-button.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nimport { cssVar } from \"@chakra-ui/theme-tools\";\nvar $size = cssVar(\"close-button-size\");\nvar $bg = cssVar(\"close-button-bg\");\nvar baseStyle = defineStyle({\n w: [$size.reference],\n h: [$size.reference],\n borderRadius: \"md\",\n transitionProperty: \"common\",\n transitionDuration: \"normal\",\n _disabled: {\n opacity: 0.4,\n cursor: \"not-allowed\",\n boxShadow: \"none\"\n },\n _hover: {\n [$bg.variable]: \"colors.blackAlpha.100\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.100\"\n }\n },\n _active: {\n [$bg.variable]: \"colors.blackAlpha.200\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.200\"\n }\n },\n _focusVisible: {\n boxShadow: \"outline\"\n },\n bg: $bg.reference\n});\nvar sizes = {\n lg: defineStyle({\n [$size.variable]: \"sizes.10\",\n fontSize: \"md\"\n }),\n md: defineStyle({\n [$size.variable]: \"sizes.8\",\n fontSize: \"xs\"\n }),\n sm: defineStyle({\n [$size.variable]: \"sizes.6\",\n fontSize: \"2xs\"\n })\n};\nvar closeButtonTheme = defineStyleConfig({\n baseStyle,\n sizes,\n defaultProps: {\n size: \"md\"\n }\n});\n\nexport {\n closeButtonTheme\n};\n","import {\n badgeTheme,\n vars\n} from \"./chunk-IBJP6BGU.mjs\";\n\n// src/components/code.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nvar { variants, defaultProps } = badgeTheme;\nvar baseStyle = defineStyle({\n fontFamily: \"mono\",\n fontSize: \"sm\",\n px: \"0.2em\",\n borderRadius: \"sm\",\n bg: vars.bg.reference,\n color: vars.color.reference,\n boxShadow: vars.shadow.reference\n});\nvar codeTheme = defineStyleConfig({\n baseStyle,\n variants,\n defaultProps\n});\n\nexport {\n codeTheme\n};\n","// src/components/container.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nvar baseStyle = defineStyle({\n w: \"100%\",\n mx: \"auto\",\n maxW: \"prose\",\n px: \"4\"\n});\nvar containerTheme = defineStyleConfig({\n baseStyle\n});\n\nexport {\n containerTheme\n};\n","// src/components/divider.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nvar baseStyle = defineStyle({\n opacity: 0.6,\n borderColor: \"inherit\"\n});\nvar variantSolid = defineStyle({\n borderStyle: \"solid\"\n});\nvar variantDashed = defineStyle({\n borderStyle: \"dashed\"\n});\nvar variants = {\n solid: variantSolid,\n dashed: variantDashed\n};\nvar dividerTheme = defineStyleConfig({\n baseStyle,\n variants,\n defaultProps: {\n variant: \"solid\"\n }\n});\n\nexport {\n dividerTheme\n};\n","// src/components/accordion.ts\nimport { accordionAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nvar baseStyleContainer = defineStyle({\n borderTopWidth: \"1px\",\n borderColor: \"inherit\",\n _last: {\n borderBottomWidth: \"1px\"\n }\n});\nvar baseStyleButton = defineStyle({\n transitionProperty: \"common\",\n transitionDuration: \"normal\",\n fontSize: \"md\",\n _focusVisible: {\n boxShadow: \"outline\"\n },\n _hover: {\n bg: \"blackAlpha.50\"\n },\n _disabled: {\n opacity: 0.4,\n cursor: \"not-allowed\"\n },\n px: \"4\",\n py: \"2\"\n});\nvar baseStylePanel = defineStyle({\n pt: \"2\",\n px: \"4\",\n pb: \"5\"\n});\nvar baseStyleIcon = defineStyle({\n fontSize: \"1.25em\"\n});\nvar baseStyle = definePartsStyle({\n container: baseStyleContainer,\n button: baseStyleButton,\n panel: baseStylePanel,\n icon: baseStyleIcon\n});\nvar accordionTheme = defineMultiStyleConfig({ baseStyle });\n\nexport {\n accordionTheme\n};\n","// src/components/alert.ts\nimport { alertAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar\n} from \"@chakra-ui/styled-system\";\nimport { transparentize } from \"@chakra-ui/theme-tools\";\nvar { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nvar $fg = cssVar(\"alert-fg\");\nvar $bg = cssVar(\"alert-bg\");\nvar baseStyle = definePartsStyle({\n container: {\n bg: $bg.reference,\n px: \"4\",\n py: \"3\"\n },\n title: {\n fontWeight: \"bold\",\n lineHeight: \"6\",\n marginEnd: \"2\"\n },\n description: {\n lineHeight: \"6\"\n },\n icon: {\n color: $fg.reference,\n flexShrink: 0,\n marginEnd: \"3\",\n w: \"5\",\n h: \"6\"\n },\n spinner: {\n color: $fg.reference,\n flexShrink: 0,\n marginEnd: \"3\",\n w: \"5\",\n h: \"5\"\n }\n});\nfunction getBg(props) {\n const { theme, colorScheme: c } = props;\n const darkBg = transparentize(`${c}.200`, 0.16)(theme);\n return {\n light: `colors.${c}.100`,\n dark: darkBg\n };\n}\nvar variantSubtle = definePartsStyle((props) => {\n const { colorScheme: c } = props;\n const bg = getBg(props);\n return {\n container: {\n [$fg.variable]: `colors.${c}.500`,\n [$bg.variable]: bg.light,\n _dark: {\n [$fg.variable]: `colors.${c}.200`,\n [$bg.variable]: bg.dark\n }\n }\n };\n});\nvar variantLeftAccent = definePartsStyle((props) => {\n const { colorScheme: c } = props;\n const bg = getBg(props);\n return {\n container: {\n [$fg.variable]: `colors.${c}.500`,\n [$bg.variable]: bg.light,\n _dark: {\n [$fg.variable]: `colors.${c}.200`,\n [$bg.variable]: bg.dark\n },\n paddingStart: \"3\",\n borderStartWidth: \"4px\",\n borderStartColor: $fg.reference\n }\n };\n});\nvar variantTopAccent = definePartsStyle((props) => {\n const { colorScheme: c } = props;\n const bg = getBg(props);\n return {\n container: {\n [$fg.variable]: `colors.${c}.500`,\n [$bg.variable]: bg.light,\n _dark: {\n [$fg.variable]: `colors.${c}.200`,\n [$bg.variable]: bg.dark\n },\n pt: \"2\",\n borderTopWidth: \"4px\",\n borderTopColor: $fg.reference\n }\n };\n});\nvar variantSolid = definePartsStyle((props) => {\n const { colorScheme: c } = props;\n return {\n container: {\n [$fg.variable]: `colors.white`,\n [$bg.variable]: `colors.${c}.500`,\n _dark: {\n [$fg.variable]: `colors.gray.900`,\n [$bg.variable]: `colors.${c}.200`\n },\n color: $fg.reference\n }\n };\n});\nvar variants = {\n subtle: variantSubtle,\n \"left-accent\": variantLeftAccent,\n \"top-accent\": variantTopAccent,\n solid: variantSolid\n};\nvar alertTheme = defineMultiStyleConfig({\n baseStyle,\n variants,\n defaultProps: {\n variant: \"subtle\",\n colorScheme: \"blue\"\n }\n});\n\nexport {\n alertTheme\n};\n","import {\n sizes_default\n} from \"./chunk-X4JBRTE2.mjs\";\nimport {\n runIfFn\n} from \"./chunk-EBS47JIL.mjs\";\n\n// src/components/avatar.ts\nimport { avatarAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nimport { isDark, randomColor } from \"@chakra-ui/theme-tools\";\nvar { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nvar $border = cssVar(\"avatar-border-color\");\nvar $bg = cssVar(\"avatar-bg\");\nvar baseStyleBadge = defineStyle({\n borderRadius: \"full\",\n border: \"0.2em solid\",\n [$border.variable]: \"white\",\n _dark: {\n [$border.variable]: \"colors.gray.800\"\n },\n borderColor: $border.reference\n});\nvar baseStyleExcessLabel = defineStyle({\n [$bg.variable]: \"colors.gray.200\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.400\"\n },\n bgColor: $bg.reference\n});\nvar $avatarBg = cssVar(\"avatar-background\");\nvar baseStyleContainer = defineStyle((props) => {\n const { name, theme } = props;\n const bg = name ? randomColor({ string: name }) : \"colors.gray.400\";\n const isBgDark = isDark(bg)(theme);\n let color = \"white\";\n if (!isBgDark)\n color = \"gray.800\";\n return {\n bg: $avatarBg.reference,\n \"&:not([data-loaded])\": {\n [$avatarBg.variable]: bg\n },\n color,\n [$border.variable]: \"colors.white\",\n _dark: {\n [$border.variable]: \"colors.gray.800\"\n },\n borderColor: $border.reference,\n verticalAlign: \"top\"\n };\n});\nvar baseStyle = definePartsStyle((props) => ({\n badge: runIfFn(baseStyleBadge, props),\n excessLabel: runIfFn(baseStyleExcessLabel, props),\n container: runIfFn(baseStyleContainer, props)\n}));\nfunction getSize(size) {\n const themeSize = size !== \"100%\" ? sizes_default[size] : void 0;\n return definePartsStyle({\n container: {\n width: size,\n height: size,\n fontSize: `calc(${themeSize != null ? themeSize : size} / 2.5)`\n },\n excessLabel: {\n width: size,\n height: size\n },\n label: {\n fontSize: `calc(${themeSize != null ? themeSize : size} / 2.5)`,\n lineHeight: size !== \"100%\" ? themeSize != null ? themeSize : size : void 0\n }\n });\n}\nvar sizes = {\n \"2xs\": getSize(4),\n xs: getSize(6),\n sm: getSize(8),\n md: getSize(12),\n lg: getSize(16),\n xl: getSize(24),\n \"2xl\": getSize(32),\n full: getSize(\"100%\")\n};\nvar avatarTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n defaultProps: { size: \"md\" }\n});\n\nexport {\n avatarTheme\n};\n","import {\n stepperTheme\n} from \"./chunk-TMUG4XNV.mjs\";\nimport {\n switchTheme\n} from \"./chunk-KGFPXNP4.mjs\";\nimport {\n tableTheme\n} from \"./chunk-WHSEAAWU.mjs\";\nimport {\n tabsTheme\n} from \"./chunk-RBQSCDLK.mjs\";\nimport {\n tagTheme\n} from \"./chunk-CZP5TVGH.mjs\";\nimport {\n textareaTheme\n} from \"./chunk-OIGZPHLT.mjs\";\nimport {\n tooltipTheme\n} from \"./chunk-6Y3UQESG.mjs\";\nimport {\n progressTheme\n} from \"./chunk-VGCCECBM.mjs\";\nimport {\n radioTheme\n} from \"./chunk-JDPWIQ7H.mjs\";\nimport {\n selectTheme\n} from \"./chunk-V3RHVDKJ.mjs\";\nimport {\n skeletonTheme\n} from \"./chunk-YSULOCDF.mjs\";\nimport {\n skipLinkTheme\n} from \"./chunk-RSEFU3LC.mjs\";\nimport {\n sliderTheme\n} from \"./chunk-IBL46MNN.mjs\";\nimport {\n spinnerTheme\n} from \"./chunk-Y6RR3LE6.mjs\";\nimport {\n statTheme\n} from \"./chunk-EY6ACYQS.mjs\";\nimport {\n kbdTheme\n} from \"./chunk-VQ2DUS6J.mjs\";\nimport {\n linkTheme\n} from \"./chunk-2T5TO72C.mjs\";\nimport {\n listTheme\n} from \"./chunk-AQJ6AIMN.mjs\";\nimport {\n menuTheme\n} from \"./chunk-FIWRYWVW.mjs\";\nimport {\n modalTheme\n} from \"./chunk-XHTV2ZQR.mjs\";\nimport {\n numberInputTheme\n} from \"./chunk-XNRZTTJ2.mjs\";\nimport {\n pinInputTheme\n} from \"./chunk-QW3Z4V42.mjs\";\nimport {\n popoverTheme\n} from \"./chunk-YJYMWHG4.mjs\";\nimport {\n drawerTheme\n} from \"./chunk-PQSF5PVS.mjs\";\nimport {\n editableTheme\n} from \"./chunk-YZVOF4MP.mjs\";\nimport {\n formTheme\n} from \"./chunk-RUW3STUO.mjs\";\nimport {\n formErrorTheme\n} from \"./chunk-D55YRTLZ.mjs\";\nimport {\n formLabelTheme\n} from \"./chunk-OYCZTG3L.mjs\";\nimport {\n headingTheme\n} from \"./chunk-X4O3JXYB.mjs\";\nimport {\n inputTheme\n} from \"./chunk-WFLWAEKG.mjs\";\nimport {\n breadcrumbTheme\n} from \"./chunk-OZJFUHHJ.mjs\";\nimport {\n buttonTheme\n} from \"./chunk-AP3MTUHH.mjs\";\nimport {\n cardTheme\n} from \"./chunk-PZHBQTKY.mjs\";\nimport {\n checkboxTheme\n} from \"./chunk-3XG4KRSA.mjs\";\nimport {\n closeButtonTheme\n} from \"./chunk-C4P5PUHY.mjs\";\nimport {\n codeTheme\n} from \"./chunk-CAKKPKRW.mjs\";\nimport {\n containerTheme\n} from \"./chunk-NDGGJV23.mjs\";\nimport {\n dividerTheme\n} from \"./chunk-5Z4IVOU3.mjs\";\nimport {\n accordionTheme\n} from \"./chunk-T276HDLM.mjs\";\nimport {\n alertTheme\n} from \"./chunk-YOXAUO7A.mjs\";\nimport {\n avatarTheme\n} from \"./chunk-O7XTKHT6.mjs\";\nimport {\n badgeTheme\n} from \"./chunk-IBJP6BGU.mjs\";\n\n// src/components/index.ts\nvar components = {\n Accordion: accordionTheme,\n Alert: alertTheme,\n Avatar: avatarTheme,\n Badge: badgeTheme,\n Breadcrumb: breadcrumbTheme,\n Button: buttonTheme,\n Checkbox: checkboxTheme,\n CloseButton: closeButtonTheme,\n Code: codeTheme,\n Container: containerTheme,\n Divider: dividerTheme,\n Drawer: drawerTheme,\n Editable: editableTheme,\n Form: formTheme,\n FormError: formErrorTheme,\n FormLabel: formLabelTheme,\n Heading: headingTheme,\n Input: inputTheme,\n Kbd: kbdTheme,\n Link: linkTheme,\n List: listTheme,\n Menu: menuTheme,\n Modal: modalTheme,\n NumberInput: numberInputTheme,\n PinInput: pinInputTheme,\n Popover: popoverTheme,\n Progress: progressTheme,\n Radio: radioTheme,\n Select: selectTheme,\n Skeleton: skeletonTheme,\n SkipLink: skipLinkTheme,\n Slider: sliderTheme,\n Spinner: spinnerTheme,\n Stat: statTheme,\n Switch: switchTheme,\n Table: tableTheme,\n Tabs: tabsTheme,\n Tag: tagTheme,\n Textarea: textareaTheme,\n Tooltip: tooltipTheme,\n Card: cardTheme,\n Stepper: stepperTheme\n};\n\nexport {\n components\n};\n","// src/semantic-tokens.ts\nvar semanticTokens = {\n colors: {\n \"chakra-body-text\": { _light: \"gray.800\", _dark: \"whiteAlpha.900\" },\n \"chakra-body-bg\": { _light: \"white\", _dark: \"gray.800\" },\n \"chakra-border-color\": { _light: \"gray.200\", _dark: \"whiteAlpha.300\" },\n \"chakra-inverse-text\": { _light: \"white\", _dark: \"gray.800\" },\n \"chakra-subtle-bg\": { _light: \"gray.100\", _dark: \"gray.700\" },\n \"chakra-subtle-text\": { _light: \"gray.600\", _dark: \"gray.400\" },\n \"chakra-placeholder-color\": { _light: \"gray.500\", _dark: \"whiteAlpha.400\" }\n }\n};\n\nexport {\n semanticTokens\n};\n","// src/styles.ts\nvar styles = {\n global: {\n body: {\n fontFamily: \"body\",\n color: \"chakra-body-text\",\n bg: \"chakra-body-bg\",\n transitionProperty: \"background-color\",\n transitionDuration: \"normal\",\n lineHeight: \"base\"\n },\n \"*::placeholder\": {\n color: \"chakra-placeholder-color\"\n },\n \"*, *::before, &::after\": {\n borderColor: \"chakra-border-color\"\n }\n }\n};\n\nexport {\n styles\n};\n","import {\n isChakraTheme,\n requiredChakraThemeKeys\n} from \"./chunk-A6NK776R.mjs\";\nimport {\n foundations\n} from \"./chunk-VYR6F67Y.mjs\";\nimport \"./chunk-AU77DZXY.mjs\";\nimport \"./chunk-7OKLMD4V.mjs\";\nimport \"./chunk-ZV5E32CG.mjs\";\nimport \"./chunk-DDAHWWWN.mjs\";\nimport \"./chunk-C7H5GWRZ.mjs\";\nimport \"./chunk-4REDROSM.mjs\";\nimport \"./chunk-DJNGX4VH.mjs\";\nimport \"./chunk-OLDNEXT6.mjs\";\nimport {\n components\n} from \"./chunk-KCPP2OFG.mjs\";\nimport \"./chunk-TMUG4XNV.mjs\";\nimport \"./chunk-KGFPXNP4.mjs\";\nimport \"./chunk-WHSEAAWU.mjs\";\nimport \"./chunk-RBQSCDLK.mjs\";\nimport \"./chunk-CZP5TVGH.mjs\";\nimport \"./chunk-OIGZPHLT.mjs\";\nimport \"./chunk-6Y3UQESG.mjs\";\nimport \"./chunk-VGCCECBM.mjs\";\nimport \"./chunk-JDPWIQ7H.mjs\";\nimport \"./chunk-V3RHVDKJ.mjs\";\nimport \"./chunk-YSULOCDF.mjs\";\nimport \"./chunk-RSEFU3LC.mjs\";\nimport \"./chunk-IBL46MNN.mjs\";\nimport \"./chunk-Y6RR3LE6.mjs\";\nimport \"./chunk-EY6ACYQS.mjs\";\nimport \"./chunk-VQ2DUS6J.mjs\";\nimport \"./chunk-2T5TO72C.mjs\";\nimport \"./chunk-AQJ6AIMN.mjs\";\nimport \"./chunk-FIWRYWVW.mjs\";\nimport \"./chunk-XHTV2ZQR.mjs\";\nimport \"./chunk-XNRZTTJ2.mjs\";\nimport \"./chunk-HOOF7HHD.mjs\";\nimport \"./chunk-QW3Z4V42.mjs\";\nimport \"./chunk-YJYMWHG4.mjs\";\nimport \"./chunk-PQSF5PVS.mjs\";\nimport \"./chunk-YZVOF4MP.mjs\";\nimport \"./chunk-RUW3STUO.mjs\";\nimport \"./chunk-D55YRTLZ.mjs\";\nimport \"./chunk-OYCZTG3L.mjs\";\nimport \"./chunk-X4O3JXYB.mjs\";\nimport \"./chunk-WFLWAEKG.mjs\";\nimport \"./chunk-OZJFUHHJ.mjs\";\nimport \"./chunk-AP3MTUHH.mjs\";\nimport \"./chunk-PZHBQTKY.mjs\";\nimport \"./chunk-3XG4KRSA.mjs\";\nimport \"./chunk-C4P5PUHY.mjs\";\nimport \"./chunk-CAKKPKRW.mjs\";\nimport \"./chunk-NDGGJV23.mjs\";\nimport \"./chunk-5Z4IVOU3.mjs\";\nimport {\n semanticTokens\n} from \"./chunk-BF6JLLXF.mjs\";\nimport {\n styles\n} from \"./chunk-VHIIIDDT.mjs\";\nimport \"./chunk-RT7D5LFX.mjs\";\nimport \"./chunk-T276HDLM.mjs\";\nimport \"./chunk-YOXAUO7A.mjs\";\nimport \"./chunk-O7XTKHT6.mjs\";\nimport \"./chunk-X4JBRTE2.mjs\";\nimport \"./chunk-G3IFUAY5.mjs\";\nimport \"./chunk-EBS47JIL.mjs\";\nimport \"./chunk-IBJP6BGU.mjs\";\n\n// src/index.ts\nvar direction = \"ltr\";\nvar config = {\n useSystemColorMode: false,\n initialColorMode: \"light\",\n cssVarPrefix: \"chakra\"\n};\nvar theme = {\n semanticTokens,\n direction,\n ...foundations,\n components,\n styles,\n config\n};\nvar src_default = theme;\nvar baseTheme = {\n semanticTokens,\n direction,\n components: {},\n ...foundations,\n styles,\n config\n};\nexport {\n baseTheme,\n src_default as default,\n isChakraTheme,\n requiredChakraThemeKeys,\n theme\n};\n","import { ComponentSingleStyleConfig, theme } from '@chakra-ui/theme'\n\nexport const ElectionTitleTheme: ComponentSingleStyleConfig = {\n baseStyle: {\n ...theme.components.Heading.baseStyle,\n ...theme.components.Heading.sizes?.xl,\n textAlign: 'center',\n lineHeight: 1.1,\n mb: 3,\n },\n}\n\nexport const ElectionScheduleTheme: ComponentSingleStyleConfig = {\n baseStyle: {\n ...theme.components.Heading.baseStyle,\n ...theme.components.Heading.sizes?.sm,\n textAlign: 'center',\n fontStyle: 'italic',\n color: 'gray.400',\n },\n}\n","import { defineStyleConfig } from '@chakra-ui/system'\n\nexport const HorizontalRuler = defineStyleConfig({\n baseStyle: {\n width: '100%',\n height: '2px',\n backgroundColor: 'gray.300',\n marginTop: '1.2em',\n marginBottom: '1.5em',\n },\n})\n","import { createMultiStyleConfigHelpers } from '@chakra-ui/system'\n\nexport const questionsAnatomy = [\n // alert message (when no questions are available)\n 'alert',\n // question wrapper\n 'question',\n // question title\n 'title',\n // question description\n 'description',\n // form radio group\n 'radioGroup',\n // questions stack\n 'stack',\n // form radio\n 'radio',\n // form error message\n 'error',\n]\n\nconst { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(questionsAnatomy)\n\nconst baseStyle = definePartsStyle({\n question: {\n marginBottom: 8,\n },\n title: {\n fontWeight: 'bold',\n fontSize: 'xl',\n marginBottom: 1,\n },\n description: {\n marginBottom: 4,\n },\n})\n\nexport const QuestionsTheme = defineMultiStyleConfig({\n baseStyle,\n})\n","import { ElectionScheduleTheme as ElectionSchedule, ElectionTitleTheme as ElectionTitle } from './election'\nimport { HorizontalRuler } from './layout'\nimport { QuestionsTheme as Questions } from './questions'\n\nexport const theme = {\n components: {\n ElectionTitle,\n ElectionSchedule,\n HorizontalRuler,\n Questions,\n } as any,\n}\n\nexport * from './election'\nexport * from './questions'\n"],"names":["a","reactJsxDevRuntime_production_min","React","require$$0","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","MAYBE_ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","maybeIterator","ReactSharedInternals","error","format","_len2","args","_key2","printWarning","level","ReactDebugCurrentFrame","stack","argsWithFormat","item","enableScopeAPI","enableCacheElement","enableTransitionTracing","enableLegacyHidden","enableDebugTracing","REACT_MODULE_REFERENCE","isValidElementType","type","getWrappedName","outerType","innerType","wrapperName","displayName","functionName","getContextName","getComponentNameFromType","context","provider","outerName","lazyComponent","payload","init","assign","disabledDepth","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","disabledLog","disableLogs","props","reenableLogs","ReactCurrentDispatcher","prefix","describeBuiltInComponentFrame","name","source","ownerFn","x","match","reentry","componentFrameCache","PossiblyWeakMap","describeNativeComponentFrame","fn","construct","frame","control","previousPrepareStackTrace","previousDispatcher","Fake","sample","sampleLines","controlLines","s","c","_frame","syntheticFrame","describeFunctionComponentFrame","shouldConstruct","Component","prototype","describeUnknownElementTypeFrameInDEV","hasOwnProperty","loggedTypeFailures","setCurrentlyValidatingElement","element","owner","checkPropTypes","typeSpecs","values","location","componentName","has","typeSpecName","error$1","err","ex","isArrayImpl","isArray","typeName","value","hasToStringTag","willCoercionThrow","testStringCoercion","checkKeyStringCoercion","ReactCurrentOwner","RESERVED_PROPS","specialPropKeyWarningShown","specialPropRefWarningShown","didWarnAboutStringRefs","hasValidRef","config","getter","hasValidKey","warnIfStringRefCannotBeAutoConverted","self","defineKeyPropWarningGetter","warnAboutAccessingKey","defineRefPropWarningGetter","warnAboutAccessingRef","ReactElement","key","ref","jsxDEV","maybeKey","propName","defaultProps","ReactCurrentOwner$1","ReactDebugCurrentFrame$1","setCurrentlyValidatingElement$1","propTypesMisspellWarningShown","isValidElement","object","getDeclarationErrorAddendum","getSourceInfoErrorAddendum","fileName","lineNumber","ownerHasKeyUseWarning","getCurrentComponentErrorInfo","parentType","info","parentName","validateExplicitKey","currentComponentErrorInfo","childOwner","validateChildKeys","node","i","child","iteratorFn","iterator","step","validatePropTypes","propTypes","_name","validateFragmentProps","fragment","keys","jsxWithValidation","isStaticChildren","validType","sourceInfo","typeString","children","jsxDEV$1","reactJsxDevRuntime_development","module","require$$1","useClientProvider","client","setClient","useState","signer","setSigner","env","setEnv","account","setAccount","balance","setBalance","useEffect","opts","VocdoniSDKClient","changeSigner","fetchAccount","fetchBalance","accChanged","accs","acc","e","seed","ClientContext","createContext","useClientContext","ctxt","useContext","ClientProvider","rest","this","cx","classNames","isObject","dataAttr","condition","ariaAttr","callAllHandlers","fns","event","callAll","arg","f","k","l","m","n","p","q","g","b","d","h","reactJsxRuntime_production_min","jsxWithValidationStatic","jsxWithValidationDynamic","jsx","jsxs","reactJsxRuntime_development","fallbackIcon","Icon","forwardRef","viewBox","color","focusable","className","__css","_className","customStyles","useStyleConfig","styles","shared","_viewBox","chakra","_path","getErrorMessage","hook","options","strict","hookName","providerName","errorMessage","defaultValue","Context","createReactContext","_a","useReactContext","TagStylesProvider","useTagStyles","Tag","useMultiStyleConfig","ownProps","omitThemingProps","containerStyles","TagLabel","TagLeftIcon","TagRightIcon","TagCloseIcon","TagCloseButton","isDisabled","btnStyles","Balance","HR","variant","NativeImage","htmlWidth","htmlHeight","alt","useSafeLayoutEffect","useLayoutEffect","useImage","loading","src","srcSet","onLoad","onError","crossOrigin","sizes","ignoreFallback","status","setStatus","imageRef","useRef","load","useCallback","flush","img","shouldShowFallbackImage","fallbackStrategy","omit","keysToOmit","clone","Image","fallbackSrc","fallback","align","fit","referrerPolicy","providedFallback","shouldIgnoreFallbackImage","showFallbackImage","linkify","link","gateway","matches","pin","CImage","getValidChildren","Children","ListStylesProvider","useListStyles","List","styleType","stylePosition","spacing","validChildren","spacingStyle","OrderedList","as","UnorderedList","ListItem","ListIcon","mapResponsive","prop","mapper","result","compact","Text","decoration","casing","aliasedProps","StackItem","selector","getStackStyles","direction","directionStyles","getDividerStyles","dividerStyles","Stack","isInline","directionProp","justify","wrap","divider","shouldWrapChildren","useMemo","dividerStyle","hasDivider","shouldUseChildren","clones","index","isLast","_child","clonedDivider","cloneElement","Fragment","Heading","Box","Square","size","centerContent","Circle","Link","isExternal","Code","TableStylesProvider","useTableStyles","Table","layout","tableProps","Tr","MD","ReactMarkdown","remarkGfm","Markdown","toInteger","dirtyNumber","number","requiredArgs","required","_typeof","obj","toDate","argument","argStr","addMilliseconds","dirtyDate","dirtyAmount","timestamp","amount","defaultOptions","getDefaultOptions","getTimezoneOffsetInMilliseconds","date","utcDate","isDate","isValid","subMilliseconds","MILLISECONDS_IN_DAY","getUTCDayOfYear","startOfYearTimestamp","difference","startOfUTCISOWeek","weekStartsOn","day","diff","getUTCISOWeekYear","year","fourthOfJanuaryOfNextYear","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","startOfUTCISOWeekYear","fourthOfJanuary","MILLISECONDS_IN_WEEK","getUTCISOWeek","startOfUTCWeek","_ref","_ref2","_ref3","_options$weekStartsOn","_options$locale","_options$locale$optio","_defaultOptions$local","_defaultOptions$local2","getUTCWeekYear","_options$firstWeekCon","firstWeekContainsDate","firstWeekOfNextYear","firstWeekOfThisYear","startOfUTCWeekYear","firstWeek","getUTCWeek","addLeadingZeros","targetLength","sign","output","formatters","token","signedYear","month","dayPeriodEnumValue","numberOfDigits","milliseconds","fractionalSeconds","formatters$3","dayPeriodEnum","localize","era","lightFormatters","signedWeekYear","weekYear","twoDigitYear","isoWeekYear","quarter","week","isoWeek","dayOfYear","dayOfWeek","localDayOfWeek","isoDayOfWeek","hours","_localize","originalDate","timezoneOffset","formatTimezoneWithOptionalMinutes","formatTimezone","formatTimezoneShort","offset","dirtyDelimiter","absOffset","minutes","delimiter","formatters$1","dateLongFormatter","pattern","formatLong","timeLongFormatter","dateTimeLongFormatter","matchResult","datePattern","timePattern","dateTimeFormat","longFormatters","longFormatters$1","protectedDayOfYearTokens","protectedWeekYearTokens","isProtectedDayOfYearToken","isProtectedWeekYearToken","throwProtectedError","input","formatDistanceLocale","formatDistance","count","tokenValue","formatDistance$1","buildFormatLongFn","width","dateFormats","timeFormats","dateTimeFormats","formatLong$1","formatRelativeLocale","formatRelative","_date","_baseDate","_options","formatRelative$1","buildLocalizeFn","dirtyIndex","valuesArray","defaultWidth","_defaultWidth","_width","eraValues","quarterValues","monthValues","dayValues","dayPeriodValues","formattingDayPeriodValues","ordinalNumber","rem100","localize$1","buildMatchFn","string","matchPattern","matchedString","parsePatterns","findIndex","findKey","predicate","array","buildMatchPatternFn","parseResult","matchOrdinalNumberPattern","parseOrdinalNumberPattern","matchEraPatterns","parseEraPatterns","matchQuarterPatterns","parseQuarterPatterns","matchMonthPatterns","parseMonthPatterns","matchDayPatterns","parseDayPatterns","matchDayPeriodPatterns","parseDayPeriodPatterns","match$1","locale","defaultLocale","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","unescapedLatinCharacterRegExp","dirtyFormatStr","_ref4","_options$locale2","_options$locale2$opti","_ref5","_ref6","_ref7","_options$locale3","_options$locale3$opti","_defaultOptions$local3","_defaultOptions$local4","formatStr","formatterOptions","substring","firstCharacter","longFormatter","cleanEscapedString","formatter","matched","ElectionTitle","election","useElection","ElectionHeader","ElectionDescription","ElectionSchedule","dformat","ElectionStatusBadge","trans","defaults","colorScheme","ElectionStatus","CheckIcon","InfoIcon","WarningIcon","spin","keyframes","Spinner","label","thickness","speed","emptyColor","spinnerStyles","AlertProvider","useAlertContext","AlertStylesProvider","useAlertStyles","STATUSES","getStatusColorScheme","getStatusIcon","AlertIcon","BaseIcon","css","Alert","addRole","alertStyles","isCheckBoxInput","isDateObject","isNullOrUndefined","isObjectType","getEventValue","getNodeParentName","isNameInFieldArray","names","isPlainObject","tempObject","prototypeCopy","isWeb","cloneObject","data","copy","isUndefined","val","get","path","EVENTS","VALIDATION_MODE","INPUT_VALIDATION_RULES","HookFormContext","useFormContext","FormProvider","getProxyFormState","formState","localProxyFormState","isRoot","_key","isEmptyObject","shouldRenderFormState","formStateData","_proxyFormState","updateFormState","convertToArrayPayload","shouldSubscribeByName","signalName","exact","currentName","useSubscribe","_props","subscription","useFormState","methods","disabled","_mounted","_localProxyFormState","isString","generateWatchOutput","_names","formValues","isGlobal","fieldName","useWatch","updateValue","isKey","stringToPath","set","tempPath","length","lastIndex","newValue","objValue","useController","shouldUnregister","isArrayField","_registerProps","_shouldUnregisterField","updateMounted","field","elm","message","Controller","appendErrors","validateAllFieldCriteria","errors","focusFieldBy","fields","callback","fieldsNames","_f","currentField","getValidationModes","mode","isWatched","isBlurEvent","watchName","updateFieldArrayRootError","fieldArrayErrors","isBoolean","isFileInput","isFunction","isHTMLElement","isMessage","isRadioInput","isRegex","defaultResult","validResult","getCheckboxValue","option","defaultReturn","getRadioValue","previous","getValidateError","getValueAndMessage","validationData","validateField","shouldUseNativeValidation","isFieldArray","refs","maxLength","minLength","min","max","validate","valueAsNumber","mount","inputValue","inputRef","setCustomValidity","isRadio","isCheckBox","isRadioOrCheckbox","isEmpty","appendErrorsCurry","getMinMaxMessage","exceedMax","maxLengthMessage","minLengthMessage","maxType","minType","exceedMin","maxOutput","minOutput","valueNumber","valueDate","convertTimeToDate","time","isTime","isWeek","maxLengthOutput","minLengthOutput","patternValue","validateError","validationResult","baseGet","updatePath","isEmptyArray","unset","paths","childObject","createSubject","_observers","observer","isPrimitive","deepEqual","object1","object2","keys1","keys2","val1","val2","isMultipleSelect","live","objectHasFunction","markFieldsDirty","isParentNodeArray","getDirtyFieldsFromDefaultValues","dirtyFieldsFromValues","getDirtyFields","defaultValues","getFieldValueAs","valueAsDate","setValueAs","getFieldValue","getResolverOptions","_fields","criteriaMode","getRuleValue","rule","hasValidation","schemaErrorLookup","foundError","skipValidation","isTouched","isSubmitted","reValidateMode","unsetEmptyArray","createFormControl","flushRootRender","_formState","_defaultValues","_formValues","_state","delayErrorCallback","timer","_subjects","shouldCaptureDirtyFields","validationModeBeforeSubmit","validationModeAfterSubmit","shouldDisplayAllAssociatedErrors","debounce","wait","_updateValid","shouldUpdateValid","_executeSchema","executeBuiltInValidation","_updateIsValidating","_updateFieldArray","method","shouldSetValues","shouldUpdateFieldsAndState","fieldValues","touchedFields","_getDirty","updateErrors","updateValidAndValue","shouldSkipSetValueAs","setFieldValue","updateTouchAndDirty","fieldValue","shouldDirty","shouldRender","shouldUpdateField","isPreviousDirty","isCurrentFieldPristine","isPreviousFieldTouched","shouldRenderByError","fieldState","previousFieldError","updatedFormState","executeSchemaAndUpdateState","shouldOnlyCheckValid","isFieldArrayRoot","fieldError","_removeUnmounted","unregister","getValues","_getWatch","_getFieldArray","fieldReference","optionRef","checkboxRef","radioRef","trigger","setValues","fieldKey","setValue","cloneValue","onChange","target","isFieldValueUpdated","getCurrentFieldValue","shouldSkipValidation","watched","previousErrorLookupResult","errorLookupResult","fieldNames","getFieldState","clearErrors","inputName","setError","watch","register","disabledIsDefined","fieldRef","radioOrCheckbox","_focusError","handleSubmit","onValid","onInvalid","resetField","_reset","keepStateOptions","updatedValues","cloneUpdatedValues","form","reset","useForm","_formControl","assignRef","mergeRefs","useMergeRefs","FormControlStylesProvider","useFormControlStyles","FormControlProvider","useFormControlContext","useFormControlProvider","idProp","isRequired","isInvalid","isReadOnly","htmlProps","uuid","useId","id","labelId","feedbackId","helpTextId","hasFeedbackText","setHasFeedbackText","hasHelpText","setHasHelpText","isFocused","setFocus","getHelpTextProps","props2","forwardedRef","getLabelProps","getErrorMessageProps","getRootProps","getRequiredIndicatorProps","FormControl","_","FormHelperText","FormErrorStylesProvider","useFormErrorStyles","FormErrorMessage","FormErrorIcon","isInputEvent","useRadioGroup","onChangeProp","valueProp","nameProp","isFocusable","isNative","valueState","isControlled","focus","rootNode","query","firstEnabledAndCheckedInput","firstEnabledInput","fallbackName","eventOrValue","nextValue","getRadioProps","ref2","RadioGroupProvider","useRadioGroupContext","RadioGroup","group","hasSetup","modality","hasEventBeforeFocus","hasBlurredWindowRecently","handlers","modality2","handler","isMac","isValidKey","onKeyboardEvent","onPointerEvent","isVirtualClick","onClickEvent","onWindowFocus","onWindowBlur","isFocusVisible","setupGlobalFocusEvents","trackFocusVisible","visuallyHiddenStyle","useRadio","defaultChecked","isCheckedProp","isDisabledProp","isReadOnlyProp","isRequiredProp","isInvalidProp","dataRadioGroup","ariaDescribedBy","formControl","isWithinRadioGroup","setIsFocusVisible","setFocused","isHovered","setHovering","isActive","setActive","isCheckedState","setChecked","isChecked","handleChange","onKeyDown","onKeyUp","onFocus","onBlur","getInputProps","trulyDisabled","stopEvent","split","picked","omitted","Radio","htmlInputProps","getCheckboxProps","layoutProps","otherProps","layoutPropNames","checkboxProps","inputProps","labelProps","rootProps","rootStyles","checkboxStyles","labelStyles","QuestionField","question","isAbleToVote","choice","ck","QuestionsForm","vote","voted","ConnectButton","fmethods","questions","prev","curr","onSubmit","qk","ButtonGroupProvider","useButtonGroup","useButtonType","isButton","setIsButton","ButtonIcon","_children","ButtonSpinner","placement","marginProp","Button","isLoading","leftIcon","rightIcon","loadingText","iconSpacing","spinner","spinnerPlacement","buttonStyles","_focus","defaultType","contentProps","ButtonContent","VoteButton","voting","useElectionProvider","fetchCensus","texts","setLoading","setVoting","loaded","setLoaded","setVoted","setElection","setIsAbleToVote","votesLeft","setVotesLeft","isInCensus","setIsInCensus","censusType","setCensusType","voteInstance","setVoteInstance","authToken","setAuthToken","setHandler","def","isIn","left","CensusType","getOAuthToken","code","param","_b","mapped","vi","Vote","cspAuthAndVote","weightedVote","vid","redirectURL","step0","openLoginPopup","url","params","vocdoniClient","electionId","step1","cspVote","walletAddress","signature","ElectionContext","ElectionProvider","Election","OrganizationName","organization","useOrganization","useOrganizationProvider","setOrganization","update","faucetPackage","Account","OrganizationContext","OrganizationProvider","Organization","OrganizationAvatar","avatar","OrganizationDescription","OrganizationHeader","header","transitionProperty","transitionTimingFunction","transitionDuration","transition","transition_default","zIndices","z_index_default","borders","borders_default","breakpoints","breakpoints_default","colors","colors_default","radii","radius_default","shadows","shadows_default","blur","blur_default","typography","typography_default","largeSizes","container","sizes_default","foundations","LARGE_ARRAY_SIZE","HASH_UNDEFINED","HOT_COUNT","HOT_SPAN","MAX_SAFE_INTEGER","argsTag","arrayTag","asyncTag","boolTag","dateTag","errorTag","funcTag","genTag","mapTag","numberTag","nullTag","objectTag","proxyTag","regexpTag","setTag","stringTag","undefinedTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","reRegExpChar","reIsHostCtor","reIsUint","typedArrayTags","freeGlobal","global","freeSelf","root","freeExports","exports","freeModule","moduleExports","freeProcess","nodeUtil","types","nodeIsTypedArray","apply","func","thisArg","baseTimes","iteratee","baseUnary","getValue","overArg","transform","arrayProto","funcProto","objectProto","coreJsData","funcToString","maskSrcKey","uid","nativeObjectToString","objectCtorString","reIsNative","Buffer","Symbol","Uint8Array","allocUnsafe","getPrototype","objectCreate","propertyIsEnumerable","splice","symToStringTag","defineProperty","getNative","nativeIsBuffer","nativeMax","nativeNow","Map","nativeCreate","baseCreate","proto","Hash","entries","entry","hashClear","hashDelete","hashGet","hashHas","hashSet","ListCache","listCacheClear","listCacheDelete","assocIndexOf","listCacheGet","listCacheHas","listCacheSet","MapCache","mapCacheClear","mapCacheDelete","getMapData","mapCacheGet","mapCacheHas","mapCacheSet","stackClear","stackDelete","stackGet","stackHas","stackSet","pairs","arrayLikeKeys","inherited","isArr","isArg","isArguments","isBuff","isBuffer","isType","isTypedArray","skipIndexes","isIndex","assignMergeValue","eq","baseAssignValue","assignValue","baseFor","createBaseFor","baseGetTag","getRawTag","objectToString","baseIsArguments","isObjectLike","baseIsNative","isMasked","toSource","baseIsTypedArray","isLength","baseKeysIn","nativeKeysIn","isProto","isPrototype","baseMerge","srcIndex","customizer","srcValue","baseMergeDeep","safeGet","keysIn","mergeFunc","stacked","isCommon","isTyped","isArrayLikeObject","copyArray","cloneBuffer","cloneTypedArray","toPlainObject","initCloneObject","baseRest","start","setToString","overRest","identity","baseSetToString","constant","buffer","isDeep","cloneArrayBuffer","arrayBuffer","typedArray","copyObject","isNew","createAssigner","assigner","sources","guard","isIterateeCall","fromRight","keysFunc","iterable","map","isKeyable","isOwn","tag","unmasked","isArrayLike","Ctor","otherArgs","shortOut","lastCalled","stamp","remaining","other","stubFalse","mergeWith","isImportant","withoutImportant","tokenToCSSVar","scale","theme","valueStr","important","valueWithoutImportant","transformed","createTransform","transform2","compose","_value","pipe","v","toConfig","property","getRtl","rtl","ltr","logical","transformTemplate","getTransformTemplate","getTransformGpuTemplate","filterTemplate","backdropFilterTemplate","getRingTemplate","flexDirectionTemplate","directionMap","valueSet","globalSet","trimSpace","str","parseGradient","isCSSFunction","results","_type","maybeDirection","stops","_values","stop","firstStop","_color","_stop","_stopOrFunc","color2","gradientTransform","isCssVar","analyzeCSSValue","num","unit","transformFunctions","unitless","isNoneOrZero","space2","divide2","t","background","border","effect","filter","flexbox","grid","interactivity","_c","list","memoize","cache","memoizedGet","srOnly","srFocusable","getWithPriority","others","position","ring","space","textDecoration","scroll","resolveReference","operand","isObject2","toExpression","operator","operands","add","subtract","multiply","divide","negate","calc","replaceWhiteSpace","replaceValue","escape","escapeSymbol","escapeDot","addPrefix","toVarReference","toVarDefinition","cssVar","cssVarPrefix","cssVariable","defineCssVars","scope","vars","state","post","toGroup","merge","toPeer","selectors","pseudoSelectors","pseudoPropNames","systemProps","mergeWith2","createMultiStyleConfigHelpers","parts","defineMultiStyleConfig","definePartsStyle","$size","$iconSize","$titleFontSize","$descFontSize","$accentColor","baseStyle","stepperTheme","anatomy","called","assert","part","toPart","extend","parts2","classnames","accordionAnatomy","alertAnatomy","avatarAnatomy","breadcrumbAnatomy","checkboxAnatomy","drawerAnatomy","editableAnatomy","formAnatomy","formErrorAnatomy","inputAnatomy","listAnatomy","menuAnatomy","modalAnatomy","numberInputAnatomy","popoverAnatomy","progressAnatomy","radioAnatomy","selectAnatomy","sliderAnatomy","statAnatomy","switchAnatomy","tableAnatomy","tabsAnatomy","tagAnatomy","cardAnatomy","low","high","ColorError","ColorError$1","parseToRgba","normalizedColor","namedColorRegex","nameToHex","reducedHexMatch","reducedHexRegex","arr","r","hexMatch","hexRegex","rgbaMatch","rgbaRegex","hslaMatch","hslaRegex","hslToRgb","hash","colorToInt","compressedColorMap","next","hex","normalizedColorName","roundColor","hue","saturation","lightness","huePrime","chroma","secondComponent","red","green","blue","lightnessModification","finalRed","finalGreen","finalBlue","rgba","alpha","transparentize","toHex","dlv_es_default","getColor","getBrightness","tone","isDark","opacity","raw","setTransparency","generateStripe","randomHex","randomColor","randomColorFromList","randomColorFromString","randomFromList","j","light","dark","orient","orientation","vertical","horizontal","toRef","toExpr","isDecimal","toVarRef","toVar","getFallback","$width","$height","$diff","diffValue","$translateX","$bg","baseStyleTrack","baseStyleThumb","switchTheme","numericStyles","variantSimple","variantStripe","variants","tableTheme","$fg","$border","baseStyleRoot","baseStyleTab","isFitted","baseStyleTablist","baseStyleTabpanel","variantLine","isVertical","borderProp","variantEnclosed","variantEnclosedColored","variantSoftRounded","variantSolidRounded","variantUnstyled","tabsTheme","variantSolid","variantSubtle","darkBg","variantOutline","darkColor","badgeTheme","baseStyleContainer","baseStyleLabel","baseStyleCloseButton","tagTheme","getDefaults","fc","ec","variantFilled","variantFlushed","inputTheme","_a2","_a4","_b3","_a3","_b2","_d","_e","_g","_h","textareaTheme","$arrowBg","tooltipTheme","filledStyle","isIndeterminate","hasStripe","stripeStyle","bgColor","gradient","baseStyleFilledTrack","progressTheme","runIfFn","valueOrFn","baseStyleControl","baseStyleIcon","checkboxTheme","controlStyle","radioTheme","baseStyleField","selectTheme","$startColor","$endColor","skeletonTheme","skipLinkTheme","$thumbSize","$trackSize","sizeLg","sizeMd","sizeSm","sliderTheme","spinnerTheme","baseStyleHelpText","baseStyleNumber","statTheme","kbdTheme","linkTheme","listTheme","$shadow","baseStyleList","baseStyleItem","baseStyleGroupTitle","baseStyleCommand","baseStyleDivider","baseStyleButton","menuTheme","baseStyleOverlay","baseStyleDialogContainer","isCentered","scrollBehavior","baseStyleDialog","baseStyleHeader","baseStyleBody","baseStyleFooter","getSize","modalTheme","$stepperWidth","$inputPadding","inputPaddingValue","baseStyleStepperGroup","baseStyleStepper","sizeStyle","radius","_fontSize","fontSize","numberInputTheme","pinInputTheme","$popperBg","$arrowShadowColor","baseStylePopper","baseStyleContent","popoverTheme","$bs","isFullHeight","drawerTheme","baseStylePreview","baseStyleInput","baseStyleTextarea","editableTheme","baseStyleRequiredIndicator","baseStyleHelperText","formTheme","baseStyleText","formErrorTheme","formLabelTheme","headingTheme","$decor","baseStyleLink","breadcrumbTheme","variantGhost","darkHoverBg","darkActiveBg","borderColor","accessibleColorMap","bg2","bg","hoverBg","activeBg","variantLink","buttonTheme","$padding","$radius","$borderColor","cardTheme","closeButtonTheme","codeTheme","containerTheme","variantDashed","dividerTheme","baseStylePanel","accordionTheme","getBg","variantLeftAccent","variantTopAccent","alertTheme","baseStyleBadge","baseStyleExcessLabel","$avatarBg","isBgDark","themeSize","avatarTheme","components","semanticTokens","ElectionTitleTheme","ElectionScheduleTheme","HorizontalRuler","defineStyleConfig","questionsAnatomy","QuestionsTheme","Questions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AASa,MAAIA,IAAE,OAAO,IAAI,gBAAgB;AAAE,SAAAC,cAAiBD,GAAEC,GAAc,SAAC;;;;;;;;;;;;;;wBCG9E,QAAQ,IAAI,aAAa,gBAC1B,WAAW;AAGd,QAAIC,IAAQC,IAMRC,IAAqB,OAAO,IAAI,eAAe,GAC/CC,IAAoB,OAAO,IAAI,cAAc,GAC7CC,IAAsB,OAAO,IAAI,gBAAgB,GACjDC,IAAyB,OAAO,IAAI,mBAAmB,GACvDC,IAAsB,OAAO,IAAI,gBAAgB,GACjDC,IAAsB,OAAO,IAAI,gBAAgB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A,EAC/C,WAAW;AAAA,IACT,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,iBAAiB;AAAA,IACjB,WAAW;AAAA,IACX,cAAc;AAAA,EAChB;AACF,CAAC,GCRYC,KAAmB;AAAA;AAAA,EAE9B;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AACF,GAEM,EAAE,wBAAArS,IAAwB,kBAAAC,GAAiB,IAAIH,GAA8BuS,EAAgB,GAE7F9R,KAAYN,GAAiB;AAAA,EACjC,UAAU;AAAA,IACR,cAAc;AAAA,EAChB;AAAA,EACA,OAAO;AAAA,IACL,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,cAAc;AAAA,EAChB;AAAA,EACA,aAAa;AAAA,IACX,cAAc;AAAA,EAChB;AACF,CAAC,GAEYqS,KAAiBtS,GAAuB;AAAA,EACnD,WAAAO;AACF,CAAC,GCnCYvH,KAAQ;AAAA,EACnB,YAAY;AAAA,IAAA,eACVxwB;AAAAA,IAAA,kBACAK;AAAAA,IACA,iBAAAspC;AAAA,IAAA,WACAI;AAAAA,EACF;AACF;","x_google_ignoreList":[0,1,2,4,5,6,7,8,9,10,13,14,15,16,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,68,69,70,71,72,73,74,75,76,77,78,79,80,81,84,85,86,87,88,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163]} \ No newline at end of file diff --git a/packages/components/dist/theme/election.d.ts b/packages/components/dist/theme/election.d.ts new file mode 100644 index 00000000..88102d4b --- /dev/null +++ b/packages/components/dist/theme/election.d.ts @@ -0,0 +1,3 @@ +import { ComponentSingleStyleConfig } from '@chakra-ui/theme'; +export declare const ElectionTitleTheme: ComponentSingleStyleConfig; +export declare const ElectionScheduleTheme: ComponentSingleStyleConfig; diff --git a/packages/components/dist/theme/index.d.ts b/packages/components/dist/theme/index.d.ts new file mode 100644 index 00000000..dde71bad --- /dev/null +++ b/packages/components/dist/theme/index.d.ts @@ -0,0 +1,5 @@ +export declare const theme: { + components: any; +}; +export * from './election'; +export * from './questions'; diff --git a/packages/components/dist/theme/layout.d.ts b/packages/components/dist/theme/layout.d.ts new file mode 100644 index 00000000..a8c87e38 --- /dev/null +++ b/packages/components/dist/theme/layout.d.ts @@ -0,0 +1,20 @@ +export declare const HorizontalRuler: { + baseStyle?: { + width: string; + height: string; + backgroundColor: string; + marginTop: string; + marginBottom: string; + } | undefined; + sizes?: { + [key: string]: import("@chakra-ui/styled-system").SystemStyleInterpolation; + } | undefined; + variants?: { + [key: string]: import("@chakra-ui/styled-system").SystemStyleInterpolation; + } | undefined; + defaultProps?: { + size?: string | number | undefined; + variant?: string | number | undefined; + colorScheme?: string | undefined; + } | undefined; +}; diff --git a/packages/components/dist/theme/questions.d.ts b/packages/components/dist/theme/questions.d.ts new file mode 100644 index 00000000..5f46a37c --- /dev/null +++ b/packages/components/dist/theme/questions.d.ts @@ -0,0 +1,32 @@ +export declare const questionsAnatomy: string[]; +export declare const QuestionsTheme: { + baseStyle?: { + question: { + marginBottom: number; + }; + title: { + fontWeight: string; + fontSize: string; + marginBottom: number; + }; + description: { + marginBottom: number; + }; + } | undefined; + sizes?: { + [key: string]: import("@chakra-ui/styled-system").PartsStyleInterpolation<{ + keys: string[]; + }>; + } | undefined; + variants?: { + [key: string]: import("@chakra-ui/styled-system").PartsStyleInterpolation<{ + keys: string[]; + }>; + } | undefined; + defaultProps?: { + size?: string | number | undefined; + variant?: string | number | undefined; + colorScheme?: string | undefined; + } | undefined; + parts: string[]; +}; From f1900bfda17fb9572340f1ed0dad3d4434783226 Mon Sep 17 00:00:00 2001 From: Aleix Date: Wed, 10 May 2023 22:55:29 +0200 Subject: [PATCH 2/5] Voting! --- .../src/components/Election/Election.tsx | 61 +++++++++++-------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/packages/chakra-components/src/components/Election/Election.tsx b/packages/chakra-components/src/components/Election/Election.tsx index 456d605c..c70252d2 100644 --- a/packages/chakra-components/src/components/Election/Election.tsx +++ b/packages/chakra-components/src/components/Election/Election.tsx @@ -45,7 +45,9 @@ export const useElectionProvider = ({ const [isInCensus, setIsInCensus] = useState(false) const [censusType, setCensusType] = useState(undefined) const [voteInstance, setVoteInstance] = useState(undefined) + const [cspVotingToken, setCspVotingToken] = useState(undefined) const [authToken, setAuthToken] = useState(null) + const [receivedMessage, setReceivedMessage] = useState(false) const [handler, setHandler] = useState("facebook") // Hardcoded until we let to choose // set signer in case it has been specified in the election @@ -56,6 +58,12 @@ export const useElectionProvider = ({ setSigner(s) }, [signer, client, s]) + useEffect(() => { + if(cspVotingToken && voteInstance) { + cspVote(cspVotingToken, voteInstance) + } + },[cspVotingToken, voteInstance]) + // fetch election useEffect(() => { if (election || !id || loaded || !client) return @@ -104,15 +112,21 @@ export const useElectionProvider = ({ // Listening for the popup window meessage (oauth flows) useEffect(() => { ;(async () => { - if(window.opener) return - if(!client) return - if(censusType != CensusType.CSP) return - - window.addEventListener('message', (event) => { - if(event.data.code && event.data.handler){ - getOAuthToken(client, event.data.code, event.data.handler) + const handleMessage = (event: any) => { + if (event.data.code && event.data.handler) { + getOAuthToken(client, event.data.code, event.data.handler); } - }) + }; + + if (window.opener || !client || censusType !== CensusType.CSP) { + return; + } + + window.addEventListener('message', handleMessage); + + return () => { + window.removeEventListener('message', handleMessage); + }; })() },[client, censusType]) @@ -162,7 +176,7 @@ export const useElectionProvider = ({ try { let vid; if (censusType == CensusType.CSP) { - await cspAuthAndVote(vote) + await cspAuthAndVote() }else if (censusType == CensusType.WEIGHTED) { vid = await weightedVote(vote) setVoted(vid) @@ -193,7 +207,7 @@ export const useElectionProvider = ({ return await client.submitVote(vote) } - const cspAuthAndVote = async (vote: Vote) => { + const cspAuthAndVote = async () => { if ( !client ) { throw new Error('no client initialized') } @@ -246,6 +260,10 @@ export const useElectionProvider = ({ } const getOAuthToken = async (vocdoniClient: any, code: string, handler: string) => { + if(cspVotingToken) { + return + } + if (!code) { throw new Error('no code provided') } @@ -256,41 +274,34 @@ export const useElectionProvider = ({ // Extract the electionId query param from the redirectURL const electionId = window.location.href.split('?')[1].split('&').find((param: string) => param.startsWith('electionId='))?.split('=')[1] let redirectURL = `${window.location.href.split('?')[0]}?electionId=${electionId}&handler=${handler}` - let step1; try { step1 = await vocdoniClient.cspStep(1, [handler, code, redirectURL], authToken) - cspVote(step1.token); + setCspVotingToken(step1.token) } catch(e) { setError("Not authorized to vote") return false; } } - const cspVote = async (token: string) => { + const cspVote = async (token: string, vote: Vote) => { if (!client) { throw new Error('no client initialized') } - - if(!voteInstance){ - throw new Error('no vote instance') - } - - if(!token){ - throw new Error('no token provided') - } - - if( censusType != CensusType.CSP ){ + + if(censusType != CensusType.CSP){ throw new Error('not a CSP election') } - + try { const walletAddress: string = await client.wallet?.getAddress() as string const signature: string = await client.cspSign(walletAddress, token) - const cspVote: CspVote = client.cspVote(voteInstance as Vote, signature) + const cspVote: CspVote = client.cspVote(vote as Vote, signature) const vid: string = await client.submitVote(cspVote) setVoted(vid) setVotesLeft(votesLeft - 1) + setCspVotingToken(undefined) + setVoteInstance(undefined) return vid } catch(e) { setError("Error submitting vote") From c129cd2b32a340dfd08879f514fd80d62b74d1f2 Mon Sep 17 00:00:00 2001 From: Aleix Date: Thu, 11 May 2023 11:26:27 +0200 Subject: [PATCH 3/5] Added a couple of comments --- .../src/components/Election/Election.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/chakra-components/src/components/Election/Election.tsx b/packages/chakra-components/src/components/Election/Election.tsx index c70252d2..dd609c3e 100644 --- a/packages/chakra-components/src/components/Election/Election.tsx +++ b/packages/chakra-components/src/components/Election/Election.tsx @@ -47,7 +47,6 @@ export const useElectionProvider = ({ const [voteInstance, setVoteInstance] = useState(undefined) const [cspVotingToken, setCspVotingToken] = useState(undefined) const [authToken, setAuthToken] = useState(null) - const [receivedMessage, setReceivedMessage] = useState(false) const [handler, setHandler] = useState("facebook") // Hardcoded until we let to choose // set signer in case it has been specified in the election @@ -109,6 +108,7 @@ export const useElectionProvider = ({ })() }, [fetchCensus, election, loaded, client, isAbleToVote, signer]) + // CSP OAuth flow // Listening for the popup window meessage (oauth flows) useEffect(() => { ;(async () => { @@ -130,6 +130,7 @@ export const useElectionProvider = ({ })() },[client, censusType]) + // CSP OAuth flow // Posting the message to the main window useEffect(() => { (async () => { @@ -207,6 +208,7 @@ export const useElectionProvider = ({ return await client.submitVote(vote) } + // CSP OAuth flow const cspAuthAndVote = async () => { if ( !client ) { throw new Error('no client initialized') @@ -240,7 +242,8 @@ export const useElectionProvider = ({ openLoginPopup(handler, step0['response'][0]) } - // Opens a popup window to the service login page + // CSP OAuth flow + // Opens a popup window to the service login page const openLoginPopup = (handler: string, url: string) => { const width = 600 const height = 600 @@ -259,6 +262,7 @@ export const useElectionProvider = ({ window.open(url, handler, params) } + // CSP OAuth flow const getOAuthToken = async (vocdoniClient: any, code: string, handler: string) => { if(cspVotingToken) { return From 6b42f881cf96d1e09cfc051c7c6f6bc79076e41a Mon Sep 17 00:00:00 2001 From: Aleix Date: Thu, 11 May 2023 11:31:42 +0200 Subject: [PATCH 4/5] Prettier --- packages/chakra-components/src/client.tsx | 4 +- .../src/components/Election/Election.tsx | 106 ++++++++++-------- 2 files changed, 62 insertions(+), 48 deletions(-) diff --git a/packages/chakra-components/src/client.tsx b/packages/chakra-components/src/client.tsx index 6c4f749d..09951cdd 100644 --- a/packages/chakra-components/src/client.tsx +++ b/packages/chakra-components/src/client.tsx @@ -32,8 +32,8 @@ export const useClientProvider = ({ env: e, client: c, signer: s }: ClientProvid const opts: ClientOptions = { env: env as EnvOptions, // TODO: REMOVE THE FOLLOWING csp_url when https://github.com/vocdoni/vocdoni-sdk/issues/163 is ready - csp_url: "http://localhost:5000/v1" - } + csp_url: 'http://localhost:5000/v1', + } if (signer) { opts.wallet = signer diff --git a/packages/chakra-components/src/components/Election/Election.tsx b/packages/chakra-components/src/components/Election/Election.tsx index dd609c3e..d733095d 100644 --- a/packages/chakra-components/src/components/Election/Election.tsx +++ b/packages/chakra-components/src/components/Election/Election.tsx @@ -47,7 +47,7 @@ export const useElectionProvider = ({ const [voteInstance, setVoteInstance] = useState(undefined) const [cspVotingToken, setCspVotingToken] = useState(undefined) const [authToken, setAuthToken] = useState(null) - const [handler, setHandler] = useState("facebook") // Hardcoded until we let to choose + const [handler, setHandler] = useState('facebook') // Hardcoded until we let to choose // set signer in case it has been specified in the election // provider (rather than the client provider). Not sure if this is useful tho... @@ -58,10 +58,10 @@ export const useElectionProvider = ({ }, [signer, client, s]) useEffect(() => { - if(cspVotingToken && voteInstance) { + if (cspVotingToken && voteInstance) { cspVote(cspVotingToken, voteInstance) } - },[cspVotingToken, voteInstance]) + }, [cspVotingToken, voteInstance]) // fetch election useEffect(() => { @@ -114,41 +114,49 @@ export const useElectionProvider = ({ ;(async () => { const handleMessage = (event: any) => { if (event.data.code && event.data.handler) { - getOAuthToken(client, event.data.code, event.data.handler); + getOAuthToken(client, event.data.code, event.data.handler) } - }; - + } + if (window.opener || !client || censusType !== CensusType.CSP) { - return; + return } - window.addEventListener('message', handleMessage); + window.addEventListener('message', handleMessage) return () => { - window.removeEventListener('message', handleMessage); - }; + window.removeEventListener('message', handleMessage) + } })() - },[client, censusType]) - + }, [client, censusType]) + // CSP OAuth flow // Posting the message to the main window useEffect(() => { - (async () => { + ;(async () => { if (typeof window == 'undefined') return if (window.location.href.split('?').length < 2) return - const code = window.location.href.split('?')[1].split('&').find((param: string) => param.startsWith('code='))?.split('=')[1] - const handler = window.location.href.split('?')[1].split('&').find((param: string) => param.startsWith('handler='))?.split('=')[1] - if(!code || !handler) return - - if(window.opener) { + const code = window.location.href + .split('?')[1] + .split('&') + .find((param: string) => param.startsWith('code=')) + ?.split('=')[1] + const handler = window.location.href + .split('?')[1] + .split('&') + .find((param: string) => param.startsWith('handler=')) + ?.split('=')[1] + if (!code || !handler) return + + if (window.opener) { // If it is, send the code to the parent window and close the popup window.opener.postMessage({ code, handler }, '*') window.close() } })() - },[]) - + }, []) + // context vote function (the one to be used with the given components) const vote = async (values: FieldValues) => { if (!client) { @@ -175,10 +183,10 @@ export const useElectionProvider = ({ } try { - let vid; + let vid if (censusType == CensusType.CSP) { await cspAuthAndVote() - }else if (censusType == CensusType.WEIGHTED) { + } else if (censusType == CensusType.WEIGHTED) { vid = await weightedVote(vote) setVoted(vid) setVotesLeft(votesLeft - 1) @@ -201,7 +209,7 @@ export const useElectionProvider = ({ if (!vote) { throw new Error('no vote instance') } - if( censusType != CensusType.WEIGHTED ){ + if (censusType != CensusType.WEIGHTED) { throw new Error('not a Weighted election') } @@ -210,26 +218,28 @@ export const useElectionProvider = ({ // CSP OAuth flow const cspAuthAndVote = async () => { - if ( !client ) { + if (!client) { throw new Error('no client initialized') } if (!election) { throw new Error('no election initialized') } - if( censusType != CensusType.CSP ){ + if (censusType != CensusType.CSP) { throw new Error('not a CSP election') } let redirectURL = `${window.location.href}` // Add electionId and handler to the redirectURL if it is not there - if(!redirectURL.includes(`electionId=${election.id}`)){ - redirectURL.includes('?') ? redirectURL += `&electionId=${election.id}` : redirectURL += `?electionId=${election.id}` + if (!redirectURL.includes(`electionId=${election.id}`)) { + redirectURL.includes('?') + ? (redirectURL += `&electionId=${election.id}`) + : (redirectURL += `?electionId=${election.id}`) } - if(!redirectURL.includes(`handler=${handler}`)){ - redirectURL.includes('?') ? redirectURL += `&handler=${handler}` : redirectURL += `?handler=${handler}` + if (!redirectURL.includes(`handler=${handler}`)) { + redirectURL.includes('?') ? (redirectURL += `&handler=${handler}`) : (redirectURL += `?handler=${handler}`) } - - let step0: any; + + let step0: any try { step0 = await client.cspStep(0, [handler, redirectURL]) } catch (e: any) { @@ -247,8 +257,8 @@ export const useElectionProvider = ({ const openLoginPopup = (handler: string, url: string) => { const width = 600 const height = 600 - const left = (window.outerWidth / 2) - (width / 2) - const top = (window.outerHeight / 2) - (height / 2) + const left = window.outerWidth / 2 - width / 2 + const top = window.outerHeight / 2 - height / 2 const params = [ `width=${width}`, `height=${height}`, @@ -264,7 +274,7 @@ export const useElectionProvider = ({ // CSP OAuth flow const getOAuthToken = async (vocdoniClient: any, code: string, handler: string) => { - if(cspVotingToken) { + if (cspVotingToken) { return } @@ -276,15 +286,19 @@ export const useElectionProvider = ({ } // Extract the electionId query param from the redirectURL - const electionId = window.location.href.split('?')[1].split('&').find((param: string) => param.startsWith('electionId='))?.split('=')[1] + const electionId = window.location.href + .split('?')[1] + .split('&') + .find((param: string) => param.startsWith('electionId=')) + ?.split('=')[1] let redirectURL = `${window.location.href.split('?')[0]}?electionId=${electionId}&handler=${handler}` - let step1; + let step1 try { step1 = await vocdoniClient.cspStep(1, [handler, code, redirectURL], authToken) setCspVotingToken(step1.token) - } catch(e) { - setError("Not authorized to vote") - return false; + } catch (e) { + setError('Not authorized to vote') + return false } } @@ -292,13 +306,13 @@ export const useElectionProvider = ({ if (!client) { throw new Error('no client initialized') } - - if(censusType != CensusType.CSP){ + + if (censusType != CensusType.CSP) { throw new Error('not a CSP election') } - + try { - const walletAddress: string = await client.wallet?.getAddress() as string + const walletAddress: string = (await client.wallet?.getAddress()) as string const signature: string = await client.cspSign(walletAddress, token) const cspVote: CspVote = client.cspVote(vote as Vote, signature) const vid: string = await client.submitVote(cspVote) @@ -307,9 +321,9 @@ export const useElectionProvider = ({ setCspVotingToken(undefined) setVoteInstance(undefined) return vid - } catch(e) { - setError("Error submitting vote") - return false; + } catch (e) { + setError('Error submitting vote') + return false } } From 4f70df499b2371509fdfefae00e0d888c7beff6d Mon Sep 17 00:00:00 2001 From: Aleix Date: Wed, 17 May 2023 10:58:02 +0200 Subject: [PATCH 5/5] Requested changes --- .../src/components/Election/Election.tsx | 47 +- packages/components/dist/client.d.ts | 53 - .../dist/components/Account/Balance.d.ts | 2 - .../dist/components/Account/index.d.ts | 1 - .../dist/components/Election/Election.d.ts | 72 - .../components/Election/QuestionField.d.ts | 10 - .../components/Election/QuestionsForm.d.ts | 1 - .../dist/components/Election/VoteButton.d.ts | 2 - .../dist/components/Election/index.d.ts | 5 - .../dist/components/Election/parts.d.ts | 13 - .../dist/components/Organization/Avatar.d.ts | 2 - .../components/Organization/Description.d.ts | 3 - .../dist/components/Organization/Header.d.ts | 2 - .../dist/components/Organization/Name.d.ts | 2 - .../components/Organization/Organization.d.ts | 38 - .../dist/components/Organization/index.d.ts | 5 - .../components/dist/components/index.d.ts | 4 - .../components/dist/components/layout/HR.d.ts | 9 - .../dist/components/layout/Image.d.ts | 6 - .../dist/components/layout/Markdown.d.ts | 6 - .../dist/components/layout/index.d.ts | 3 - packages/components/dist/index.d.ts | 3 - packages/components/dist/index.es.js | 10540 ---------------- packages/components/dist/index.es.js.map | 1 - packages/components/dist/theme/election.d.ts | 3 - packages/components/dist/theme/index.d.ts | 5 - packages/components/dist/theme/layout.d.ts | 20 - packages/components/dist/theme/questions.d.ts | 32 - 28 files changed, 21 insertions(+), 10869 deletions(-) delete mode 100644 packages/components/dist/client.d.ts delete mode 100644 packages/components/dist/components/Account/Balance.d.ts delete mode 100644 packages/components/dist/components/Account/index.d.ts delete mode 100644 packages/components/dist/components/Election/Election.d.ts delete mode 100644 packages/components/dist/components/Election/QuestionField.d.ts delete mode 100644 packages/components/dist/components/Election/QuestionsForm.d.ts delete mode 100644 packages/components/dist/components/Election/VoteButton.d.ts delete mode 100644 packages/components/dist/components/Election/index.d.ts delete mode 100644 packages/components/dist/components/Election/parts.d.ts delete mode 100644 packages/components/dist/components/Organization/Avatar.d.ts delete mode 100644 packages/components/dist/components/Organization/Description.d.ts delete mode 100644 packages/components/dist/components/Organization/Header.d.ts delete mode 100644 packages/components/dist/components/Organization/Name.d.ts delete mode 100644 packages/components/dist/components/Organization/Organization.d.ts delete mode 100644 packages/components/dist/components/Organization/index.d.ts delete mode 100644 packages/components/dist/components/index.d.ts delete mode 100644 packages/components/dist/components/layout/HR.d.ts delete mode 100644 packages/components/dist/components/layout/Image.d.ts delete mode 100644 packages/components/dist/components/layout/Markdown.d.ts delete mode 100644 packages/components/dist/components/layout/index.d.ts delete mode 100644 packages/components/dist/index.d.ts delete mode 100644 packages/components/dist/index.es.js delete mode 100644 packages/components/dist/index.es.js.map delete mode 100644 packages/components/dist/theme/election.d.ts delete mode 100644 packages/components/dist/theme/index.d.ts delete mode 100644 packages/components/dist/theme/layout.d.ts delete mode 100644 packages/components/dist/theme/questions.d.ts diff --git a/packages/chakra-components/src/components/Election/Election.tsx b/packages/chakra-components/src/components/Election/Election.tsx index d733095d..f7950583 100644 --- a/packages/chakra-components/src/components/Election/Election.tsx +++ b/packages/chakra-components/src/components/Election/Election.tsx @@ -137,16 +137,9 @@ export const useElectionProvider = ({ if (typeof window == 'undefined') return if (window.location.href.split('?').length < 2) return - const code = window.location.href - .split('?')[1] - .split('&') - .find((param: string) => param.startsWith('code=')) - ?.split('=')[1] - const handler = window.location.href - .split('?')[1] - .split('&') - .find((param: string) => param.startsWith('handler=')) - ?.split('=')[1] + const params: URLSearchParams = new URLSearchParams(window.location.search); + const code: string | null = params.get('code'); + const handler: string | null = params.get('handler'); if (!code || !handler) return if (window.opener) { @@ -183,11 +176,10 @@ export const useElectionProvider = ({ } try { - let vid if (censusType == CensusType.CSP) { await cspAuthAndVote() } else if (censusType == CensusType.WEIGHTED) { - vid = await weightedVote(vote) + const vid = await weightedVote(vote) setVoted(vid) setVotesLeft(votesLeft - 1) setIsAbleToVote(isInCensus && votesLeft - 1 > 0) @@ -228,17 +220,18 @@ export const useElectionProvider = ({ throw new Error('not a CSP election') } - let redirectURL = `${window.location.href}` - // Add electionId and handler to the redirectURL if it is not there - if (!redirectURL.includes(`electionId=${election.id}`)) { - redirectURL.includes('?') - ? (redirectURL += `&electionId=${election.id}`) - : (redirectURL += `?electionId=${election.id}`) + const params: URLSearchParams = new URLSearchParams(window.location.search); + + if (!params.has('electionId')) { + params.append('electionId', election.id); } - if (!redirectURL.includes(`handler=${handler}`)) { - redirectURL.includes('?') ? (redirectURL += `&handler=${handler}`) : (redirectURL += `?handler=${handler}`) + + if (!params.has('handler')) { + params.append('handler', handler); } + const redirectURL: string = `${window.location.origin}${window.location.pathname}?${params.toString()}${window.location.hash}`; + let step0: any try { step0 = await client.cspStep(0, [handler, redirectURL]) @@ -286,12 +279,14 @@ export const useElectionProvider = ({ } // Extract the electionId query param from the redirectURL - const electionId = window.location.href - .split('?')[1] - .split('&') - .find((param: string) => param.startsWith('electionId=')) - ?.split('=')[1] - let redirectURL = `${window.location.href.split('?')[0]}?electionId=${electionId}&handler=${handler}` + const existingParams = new URLSearchParams(window.location.search); + const electionId = existingParams.get('electionId'); + const params: URLSearchParams = new URLSearchParams(); + params.append('electionId', electionId as string); + params.append('handler', handler); + + const redirectURL = `${window.location.origin}${window.location.pathname}?${params.toString()}${window.location.hash}`; + let step1 try { step1 = await vocdoniClient.cspStep(1, [handler, code, redirectURL], authToken) diff --git a/packages/components/dist/client.d.ts b/packages/components/dist/client.d.ts deleted file mode 100644 index 84d380b6..00000000 --- a/packages/components/dist/client.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Signer } from '@ethersproject/abstract-signer'; -import { Wallet } from '@ethersproject/wallet'; -import { AccountData, ClientOptions, EnvOptions, VocdoniSDKClient } from '@vocdoni/sdk'; -import { ReactNode } from 'react'; -export interface ClientSettings extends ClientOptions { -} -type ClientProviderProps = { - env?: Lowercase; - client?: VocdoniSDKClient; - signer?: Wallet | Signer; -}; -export declare const useClientProvider: ({ env: e, client: c, signer: s }: ClientProviderProps) => { - account: AccountData | undefined; - balance: number; - client: VocdoniSDKClient; - env: string; - signer: Wallet | Signer; - generateSigner: (seed?: string | string[]) => Wallet; - fetchAccount: () => Promise; - fetchBalance: () => Promise; - setClient: import("react").Dispatch>; - setSigner: (signer: Wallet | Signer) => void; -}; -export type ClientState = ReturnType; -export declare const ClientContext: import("react").Context<{ - account: AccountData | undefined; - balance: number; - client: VocdoniSDKClient; - env: string; - signer: Wallet | Signer; - generateSigner: (seed?: string | string[]) => Wallet; - fetchAccount: () => Promise; - fetchBalance: () => Promise; - setClient: import("react").Dispatch>; - setSigner: (signer: Wallet | Signer) => void; -} | undefined>; -export declare const useClientContext: () => { - client: T; - account: AccountData | undefined; - balance: number; - env: string; - signer: Wallet | Signer; - generateSigner: (seed?: string | string[]) => Wallet; - fetchAccount: () => Promise; - fetchBalance: () => Promise; - setClient: import("react").Dispatch>; - setSigner: (signer: Wallet | Signer) => void; -}; -type ClientProviderComponentProps = ClientProviderProps & { - children?: ReactNode; -}; -export declare const ClientProvider: ({ env, client, signer, ...rest }: ClientProviderComponentProps) => JSX.Element; -export {}; diff --git a/packages/components/dist/components/Account/Balance.d.ts b/packages/components/dist/components/Account/Balance.d.ts deleted file mode 100644 index 5a312478..00000000 --- a/packages/components/dist/components/Account/Balance.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { TagProps } from '@chakra-ui/tag'; -export declare const Balance: (props: TagProps) => JSX.Element | null; diff --git a/packages/components/dist/components/Account/index.d.ts b/packages/components/dist/components/Account/index.d.ts deleted file mode 100644 index de9bb089..00000000 --- a/packages/components/dist/components/Account/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './Balance'; diff --git a/packages/components/dist/components/Election/Election.d.ts b/packages/components/dist/components/Election/Election.d.ts deleted file mode 100644 index b917db6e..00000000 --- a/packages/components/dist/components/Election/Election.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { ChakraProps } from '@chakra-ui/system'; -import { Signer } from '@ethersproject/abstract-signer'; -import { Wallet } from '@ethersproject/wallet'; -import { ElectionStatus, PublishedElection } from '@vocdoni/sdk'; -import { ComponentType, PropsWithChildren } from 'react'; -import { FieldValues } from 'react-hook-form'; -export type ElectionProviderProps = { - id?: string; - election?: PublishedElection; - signer?: Wallet | Signer; - ConnectButton?: ComponentType; - fetchCensus?: boolean; - texts?: ElectionTextsType; -}; -export type ElectionTextsType = Record & { - required?: string; - empty?: string; - vote?: string; - voted?: string; -}; -export declare const useElectionProvider: ({ id, election: data, signer: s, fetchCensus, texts, ...rest }: ElectionProviderProps) => { - election: PublishedElection | undefined; - error: string; - isAbleToVote: boolean | undefined; - isInCensus: boolean; - loading: boolean; - signer: Wallet | Signer; - trans: (key: keyof ElectionTextsType, def: string) => string | undefined; - vote: (values: FieldValues) => Promise; - voted: string | null; - votesLeft: number; - voting: boolean; - ConnectButton?: ComponentType | undefined; -}; -export type ElectionState = ReturnType; -export declare const ElectionContext: import("react").Context<{ - election: PublishedElection | undefined; - error: string; - isAbleToVote: boolean | undefined; - isInCensus: boolean; - loading: boolean; - signer: Wallet | Signer; - trans: (key: keyof ElectionTextsType, def: string) => string | undefined; - vote: (values: FieldValues) => Promise; - voted: string | null; - votesLeft: number; - voting: boolean; - ConnectButton?: ComponentType | undefined; -} | undefined>; -export declare const useElection: () => { - election: PublishedElection | undefined; - error: string; - isAbleToVote: boolean | undefined; - isInCensus: boolean; - loading: boolean; - signer: Wallet | Signer; - trans: (key: keyof ElectionTextsType, def: string) => string | undefined; - vote: (values: FieldValues) => Promise; - voted: string | null; - votesLeft: number; - voting: boolean; - ConnectButton?: ComponentType | undefined; -}; -export type ElectionProviderComponentProps = ElectionProviderProps & ChakraProps; -export declare const ElectionProvider: { - ({ children, ...rest }: PropsWithChildren): JSX.Element; - displayName: string; -}; -export declare const Election: { - (props: ElectionProviderComponentProps): JSX.Element; - displayName: string; -}; diff --git a/packages/components/dist/components/Election/QuestionField.d.ts b/packages/components/dist/components/Election/QuestionField.d.ts deleted file mode 100644 index b19b654f..00000000 --- a/packages/components/dist/components/Election/QuestionField.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ChakraProps } from '@chakra-ui/system'; -import { IQuestion } from '@vocdoni/sdk'; -type QuestionFieldProps = ChakraProps & { - question: IQuestion; -}; -export declare const QuestionField: { - ({ question, ...rest }: QuestionFieldProps): JSX.Element; - displayName: string; -}; -export {}; diff --git a/packages/components/dist/components/Election/QuestionsForm.d.ts b/packages/components/dist/components/Election/QuestionsForm.d.ts deleted file mode 100644 index 90d2b6b6..00000000 --- a/packages/components/dist/components/Election/QuestionsForm.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const QuestionsForm: () => JSX.Element; diff --git a/packages/components/dist/components/Election/VoteButton.d.ts b/packages/components/dist/components/Election/VoteButton.d.ts deleted file mode 100644 index 220ea78a..00000000 --- a/packages/components/dist/components/Election/VoteButton.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { ButtonProps } from '@chakra-ui/button'; -export declare const VoteButton: (props: ButtonProps) => JSX.Element | null; diff --git a/packages/components/dist/components/Election/index.d.ts b/packages/components/dist/components/Election/index.d.ts deleted file mode 100644 index 5813f769..00000000 --- a/packages/components/dist/components/Election/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './Election'; -export * from './parts'; -export * from './QuestionField'; -export * from './QuestionsForm'; -export * from './VoteButton'; diff --git a/packages/components/dist/components/Election/parts.d.ts b/packages/components/dist/components/Election/parts.d.ts deleted file mode 100644 index daaf9ee4..00000000 --- a/packages/components/dist/components/Election/parts.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { HeadingProps } from '@chakra-ui/layout'; -import { ChakraProps } from '@chakra-ui/system'; -import { TagProps } from '@chakra-ui/tag'; -import { ReactMarkdownProps } from 'react-markdown/lib/complex-types'; -import { IPFSImageProps } from '../layout'; -export declare const ElectionTitle: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"h1", HeadingProps>; -export declare const ElectionHeader: (props: IPFSImageProps) => JSX.Element | null; -export declare const ElectionDescription: (props: Omit & ChakraProps) => JSX.Element | null; -export type ElectionScheduleProps = HeadingProps & { - format?: string; -}; -export declare const ElectionSchedule: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"h2", ElectionScheduleProps>; -export declare const ElectionStatusBadge: (props: TagProps) => JSX.Element | null; diff --git a/packages/components/dist/components/Organization/Avatar.d.ts b/packages/components/dist/components/Organization/Avatar.d.ts deleted file mode 100644 index 451a7994..00000000 --- a/packages/components/dist/components/Organization/Avatar.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { IPFSImageProps } from '../layout'; -export declare const OrganizationAvatar: (props: IPFSImageProps) => JSX.Element | null; diff --git a/packages/components/dist/components/Organization/Description.d.ts b/packages/components/dist/components/Organization/Description.d.ts deleted file mode 100644 index 710251b5..00000000 --- a/packages/components/dist/components/Organization/Description.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { ChakraProps } from '@chakra-ui/system'; -import { ReactMarkdownProps } from 'react-markdown/lib/complex-types'; -export declare const OrganizationDescription: (props: Omit & ChakraProps) => JSX.Element | null; diff --git a/packages/components/dist/components/Organization/Header.d.ts b/packages/components/dist/components/Organization/Header.d.ts deleted file mode 100644 index 9ca435f9..00000000 --- a/packages/components/dist/components/Organization/Header.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { IPFSImageProps } from '../layout'; -export declare const OrganizationHeader: (props: IPFSImageProps) => JSX.Element | null; diff --git a/packages/components/dist/components/Organization/Name.d.ts b/packages/components/dist/components/Organization/Name.d.ts deleted file mode 100644 index 30fbdbbf..00000000 --- a/packages/components/dist/components/Organization/Name.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { HeadingProps } from '@chakra-ui/layout'; -export declare const OrganizationName: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"h1", HeadingProps>; diff --git a/packages/components/dist/components/Organization/Organization.d.ts b/packages/components/dist/components/Organization/Organization.d.ts deleted file mode 100644 index 229927f0..00000000 --- a/packages/components/dist/components/Organization/Organization.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { ChakraProps } from '@chakra-ui/system'; -import { Account, AccountData } from '@vocdoni/sdk'; -import { PropsWithChildren } from 'react'; -export type OrganizationProviderProps = { - id?: string; - organization?: AccountData; -}; -export declare const useOrganizationProvider: ({ id, organization: data, ...rest }: OrganizationProviderProps) => { - organization: AccountData | undefined; - error: string; - loading: boolean; - loaded: boolean; - update: (account: Account, faucetPackage?: string) => Promise; -}; -export type OrganizationState = ReturnType; -export declare const OrganizationContext: import("react").Context<{ - organization: AccountData | undefined; - error: string; - loading: boolean; - loaded: boolean; - update: (account: Account, faucetPackage?: string) => Promise; -} | undefined>; -export declare const useOrganization: () => { - organization: AccountData | undefined; - error: string; - loading: boolean; - loaded: boolean; - update: (account: Account, faucetPackage?: string) => Promise; -}; -export type OrganizationProviderComponentProps = OrganizationProviderProps & ChakraProps; -export declare const OrganizationProvider: { - ({ children, ...rest }: PropsWithChildren): JSX.Element; - displayName: string; -}; -export declare const Organization: { - (props: OrganizationProviderComponentProps): JSX.Element; - displayName: string; -}; diff --git a/packages/components/dist/components/Organization/index.d.ts b/packages/components/dist/components/Organization/index.d.ts deleted file mode 100644 index 49806952..00000000 --- a/packages/components/dist/components/Organization/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './Avatar'; -export * from './Description'; -export * from './Header'; -export * from './Name'; -export * from './Organization'; diff --git a/packages/components/dist/components/index.d.ts b/packages/components/dist/components/index.d.ts deleted file mode 100644 index 0d947783..00000000 --- a/packages/components/dist/components/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './Account'; -export * from './Election'; -export * from './layout'; -export * from './Organization'; diff --git a/packages/components/dist/components/layout/HR.d.ts b/packages/components/dist/components/layout/HR.d.ts deleted file mode 100644 index 0d4e3dbd..00000000 --- a/packages/components/dist/components/layout/HR.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ChakraProps } from '@chakra-ui/system'; -type HRProps = ChakraProps & { - variant?: string; -}; -export declare const HR: { - (props: HRProps): JSX.Element; - displayName: string; -}; -export {}; diff --git a/packages/components/dist/components/layout/Image.d.ts b/packages/components/dist/components/layout/Image.d.ts deleted file mode 100644 index 028f117b..00000000 --- a/packages/components/dist/components/layout/Image.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ImageProps } from '@chakra-ui/image'; -export type IPFSImageProps = ImageProps & { - gateway?: string; -}; -export declare const linkify: (link: string | undefined, gateway: string) => string | undefined; -export declare const Image: ({ src, ...props }: IPFSImageProps) => JSX.Element | null; diff --git a/packages/components/dist/components/layout/Markdown.d.ts b/packages/components/dist/components/layout/Markdown.d.ts deleted file mode 100644 index 02b628fa..00000000 --- a/packages/components/dist/components/layout/Markdown.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Options } from 'react-markdown'; -type MarkdownProps = Options & { - children?: string; -}; -export declare const Markdown: import("@chakra-ui/system/dist/system.types").ChakraComponent<({ children, ...rest }: MarkdownProps) => JSX.Element | null, {}>; -export {}; diff --git a/packages/components/dist/components/layout/index.d.ts b/packages/components/dist/components/layout/index.d.ts deleted file mode 100644 index 6fb15179..00000000 --- a/packages/components/dist/components/layout/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './HR'; -export * from './Image'; -export * from './Markdown'; diff --git a/packages/components/dist/index.d.ts b/packages/components/dist/index.d.ts deleted file mode 100644 index 9321649e..00000000 --- a/packages/components/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './client'; -export * from './components'; -export * from './theme'; diff --git a/packages/components/dist/index.es.js b/packages/components/dist/index.es.js deleted file mode 100644 index 635b13e9..00000000 --- a/packages/components/dist/index.es.js +++ /dev/null @@ -1,10540 +0,0 @@ -import Be, { createContext as da, useState as ge, useEffect as Ke, useContext as ua, useLayoutEffect as Zl, useRef as ns, useCallback as Ze, Children as ec, isValidElement as as, useMemo as pt, cloneElement as os, Fragment as rc, useId as bo } from "react"; -import { VocdoniSDKClient as Yo, ElectionStatus as on, CensusType as rt, Vote as qo, Account as Go } from "@vocdoni/sdk"; -import { forwardRef as ve, useStyleConfig as ir, chakra as ne, useMultiStyleConfig as Mr, omitThemingProps as sr, keyframes as tc, layoutPropNames as nc, defineStyleConfig as ac, createMultiStyleConfigHelpers as oc } from "@chakra-ui/system"; -import ic from "react-markdown"; -import sc from "remark-gfm"; -var Rn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ja = {}, lc = { - get exports() { - return Ja; - }, - set exports(e) { - Ja = e; - } -}, Pn = {}; -/** - * @license React - * react-jsx-dev-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var Xo; -function cc() { - if (Xo) - return Pn; - Xo = 1; - var e = Symbol.for("react.fragment"); - return Pn.Fragment = e, Pn.jsxDEV = void 0, Pn; -} -var Fn = {}; -/** - * @license React - * react-jsx-dev-runtime.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var Qo; -function dc() { - return Qo || (Qo = 1, process.env.NODE_ENV !== "production" && function() { - var e = Be, r = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), u = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), R = Symbol.iterator, Y = "@@iterator"; - function L(c) { - if (c === null || typeof c != "object") - return null; - var T = R && c[R] || c[Y]; - return typeof T == "function" ? T : null; - } - var O = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; - function w(c) { - { - for (var T = arguments.length, P = new Array(T > 1 ? T - 1 : 0), l = 1; l < T; l++) - P[l - 1] = arguments[l]; - q("error", c, P); - } - } - function q(c, T, P) { - { - var l = O.ReactDebugCurrentFrame, y = l.getStackAddendum(); - y !== "" && (T += "%s", P = P.concat([y])); - var k = P.map(function($) { - return String($); - }); - k.unshift("Warning: " + T), Function.prototype.apply.call(console[c], console, k); - } - } - var ie = !1, M = !1, Q = !1, K = !1, re = !1, fe; - fe = Symbol.for("react.module.reference"); - function Ee(c) { - return !!(typeof c == "string" || typeof c == "function" || c === n || c === o || re || c === a || c === v || c === S || K || c === C || ie || M || Q || typeof c == "object" && c !== null && (c.$$typeof === _ || c.$$typeof === b || c.$$typeof === i || c.$$typeof === u || c.$$typeof === h || // This needs to include all possible module reference object - // types supported by any Flight configuration anywhere since - // we don't know which Flight build this will end up being used - // with. - c.$$typeof === fe || c.getModuleId !== void 0)); - } - function me(c, T, P) { - var l = c.displayName; - if (l) - return l; - var y = T.displayName || T.name || ""; - return y !== "" ? P + "(" + y + ")" : P; - } - function J(c) { - return c.displayName || "Context"; - } - function I(c) { - if (c == null) - return null; - if (typeof c.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof c == "function") - return c.displayName || c.name || null; - if (typeof c == "string") - return c; - switch (c) { - case n: - return "Fragment"; - case t: - return "Portal"; - case o: - return "Profiler"; - case a: - return "StrictMode"; - case v: - return "Suspense"; - case S: - return "SuspenseList"; - } - if (typeof c == "object") - switch (c.$$typeof) { - case u: - var T = c; - return J(T) + ".Consumer"; - case i: - var P = c; - return J(P._context) + ".Provider"; - case h: - return me(c, c.render, "ForwardRef"); - case b: - var l = c.displayName || null; - return l !== null ? l : I(c.type) || "Memo"; - case _: { - var y = c, k = y._payload, $ = y._init; - try { - return I($(k)); - } catch { - return null; - } - } - } - return null; - } - var Z = Object.assign, ee = 0, se, ye, Ye, Ve, Me, er, rr; - function le() { - } - le.__reactDisabledLog = !0; - function ur() { - { - if (ee === 0) { - se = console.log, ye = console.info, Ye = console.warn, Ve = console.error, Me = console.group, er = console.groupCollapsed, rr = console.groupEnd; - var c = { - configurable: !0, - enumerable: !0, - value: le, - writable: !0 - }; - Object.defineProperties(console, { - info: c, - log: c, - warn: c, - error: c, - group: c, - groupCollapsed: c, - groupEnd: c - }); - } - ee++; - } - } - function br() { - { - if (ee--, ee === 0) { - var c = { - configurable: !0, - enumerable: !0, - writable: !0 - }; - Object.defineProperties(console, { - log: Z({}, c, { - value: se - }), - info: Z({}, c, { - value: ye - }), - warn: Z({}, c, { - value: Ye - }), - error: Z({}, c, { - value: Ve - }), - group: Z({}, c, { - value: Me - }), - groupCollapsed: Z({}, c, { - value: er - }), - groupEnd: Z({}, c, { - value: rr - }) - }); - } - ee < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue."); - } - } - var j = O.ReactCurrentDispatcher, ce; - function ae(c, T, P) { - { - if (ce === void 0) - try { - throw Error(); - } catch (y) { - var l = y.stack.trim().match(/\n( *(at )?)/); - ce = l && l[1] || ""; - } - return ` -` + ce + c; - } - } - var be = !1, Pe; - { - var te = typeof WeakMap == "function" ? WeakMap : Map; - Pe = new te(); - } - function $e(c, T) { - if (!c || be) - return ""; - { - var P = Pe.get(c); - if (P !== void 0) - return P; - } - var l; - be = !0; - var y = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - var k; - k = j.current, j.current = null, ur(); - try { - if (T) { - var $ = function() { - throw Error(); - }; - if (Object.defineProperty($.prototype, "props", { - set: function() { - throw Error(); - } - }), typeof Reflect == "object" && Reflect.construct) { - try { - Reflect.construct($, []); - } catch (ze) { - l = ze; - } - Reflect.construct(c, [], $); - } else { - try { - $.call(); - } catch (ze) { - l = ze; - } - c.call($.prototype); - } - } else { - try { - throw Error(); - } catch (ze) { - l = ze; - } - c(); - } - } catch (ze) { - if (ze && l && typeof ze.stack == "string") { - for (var D = ze.stack.split(` -`), X = l.stack.split(` -`), H = D.length - 1, V = X.length - 1; H >= 1 && V >= 0 && D[H] !== X[V]; ) - V--; - for (; H >= 1 && V >= 0; H--, V--) - if (D[H] !== X[V]) { - if (H !== 1 || V !== 1) - do - if (H--, V--, V < 0 || D[H] !== X[V]) { - var _e = ` -` + D[H].replace(" at new ", " at "); - return c.displayName && _e.includes("") && (_e = _e.replace("", c.displayName)), typeof c == "function" && Pe.set(c, _e), _e; - } - while (H >= 1 && V >= 0); - break; - } - } - } finally { - be = !1, j.current = k, br(), Error.prepareStackTrace = y; - } - var we = c ? c.displayName || c.name : "", Ne = we ? ae(we) : ""; - return typeof c == "function" && Pe.set(c, Ne), Ne; - } - function pr(c, T, P) { - return $e(c, !1); - } - function kt(c) { - var T = c.prototype; - return !!(T && T.isReactComponent); - } - function yr(c, T, P) { - if (c == null) - return ""; - if (typeof c == "function") - return $e(c, kt(c)); - if (typeof c == "string") - return ae(c); - switch (c) { - case v: - return ae("Suspense"); - case S: - return ae("SuspenseList"); - } - if (typeof c == "object") - switch (c.$$typeof) { - case h: - return pr(c.render); - case b: - return yr(c.type, T, P); - case _: { - var l = c, y = l._payload, k = l._init; - try { - return yr(k(y), T, P); - } catch { - } - } - } - return ""; - } - var d = Object.prototype.hasOwnProperty, p = {}, x = O.ReactDebugCurrentFrame; - function A(c) { - if (c) { - var T = c._owner, P = yr(c.type, c._source, T ? T.type : null); - x.setExtraStackFrame(P); - } else - x.setExtraStackFrame(null); - } - function F(c, T, P, l, y) { - { - var k = Function.call.bind(d); - for (var $ in c) - if (k(c, $)) { - var D = void 0; - try { - if (typeof c[$] != "function") { - var X = Error((l || "React class") + ": " + P + " type `" + $ + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof c[$] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); - throw X.name = "Invariant Violation", X; - } - D = c[$](T, $, l, P, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); - } catch (H) { - D = H; - } - D && !(D instanceof Error) && (A(y), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", l || "React class", P, $, typeof D), A(null)), D instanceof Error && !(D.message in p) && (p[D.message] = !0, A(y), w("Failed %s type: %s", P, D.message), A(null)); - } - } - } - var E = Array.isArray; - function W(c) { - return E(c); - } - function de(c) { - { - var T = typeof Symbol == "function" && Symbol.toStringTag, P = T && c[Symbol.toStringTag] || c.constructor.name || "Object"; - return P; - } - } - function Te(c) { - try { - return tr(c), !1; - } catch { - return !0; - } - } - function tr(c) { - return "" + c; - } - function jr(c) { - if (Te(c)) - return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", de(c)), tr(c); - } - var Ge = O.ReactCurrentOwner, Sr = { - key: !0, - ref: !0, - __self: !0, - __source: !0 - }, Fr, Tr, xr; - xr = {}; - function Vr(c) { - if (d.call(c, "ref")) { - var T = Object.getOwnPropertyDescriptor(c, "ref").get; - if (T && T.isReactWarning) - return !1; - } - return c.ref !== void 0; - } - function Ct(c) { - if (d.call(c, "key")) { - var T = Object.getOwnPropertyDescriptor(c, "key").get; - if (T && T.isReactWarning) - return !1; - } - return c.key !== void 0; - } - function Lt(c, T) { - if (typeof c.ref == "string" && Ge.current && T && Ge.current.stateNode !== T) { - var P = I(Ge.current.type); - xr[P] || (w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', I(Ge.current.type), c.ref), xr[P] = !0); - } - } - function jt(c, T) { - { - var P = function() { - Fr || (Fr = !0, w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T)); - }; - P.isReactWarning = !0, Object.defineProperty(c, "key", { - get: P, - configurable: !0 - }); - } - } - function Er(c, T) { - { - var P = function() { - Tr || (Tr = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T)); - }; - P.isReactWarning = !0, Object.defineProperty(c, "ref", { - get: P, - configurable: !0 - }); - } - } - var et = function(c, T, P, l, y, k, $) { - var D = { - // This tag allows us to uniquely identify this as a React Element - $$typeof: r, - // Built-in properties that belong on the element - type: c, - key: T, - ref: P, - props: $, - // Record the component responsible for creating this element. - _owner: k - }; - return D._store = {}, Object.defineProperty(D._store, "validated", { - configurable: !1, - enumerable: !1, - writable: !0, - value: !1 - }), Object.defineProperty(D, "_self", { - configurable: !1, - enumerable: !1, - writable: !1, - value: l - }), Object.defineProperty(D, "_source", { - configurable: !1, - enumerable: !1, - writable: !1, - value: y - }), Object.freeze && (Object.freeze(D.props), Object.freeze(D)), D; - }; - function Vt(c, T, P, l, y) { - { - var k, $ = {}, D = null, X = null; - P !== void 0 && (jr(P), D = "" + P), Ct(T) && (jr(T.key), D = "" + T.key), Vr(T) && (X = T.ref, Lt(T, y)); - for (k in T) - d.call(T, k) && !Sr.hasOwnProperty(k) && ($[k] = T[k]); - if (c && c.defaultProps) { - var H = c.defaultProps; - for (k in H) - $[k] === void 0 && ($[k] = H[k]); - } - if (D || X) { - var V = typeof c == "function" ? c.displayName || c.name || "Unknown" : c; - D && jt($, V), X && Er($, V); - } - return et(c, D, X, y, l, Ge.current, $); - } - } - var Ar = O.ReactCurrentOwner, ct = O.ReactDebugCurrentFrame; - function Je(c) { - if (c) { - var T = c._owner, P = yr(c.type, c._source, T ? T.type : null); - ct.setExtraStackFrame(P); - } else - ct.setExtraStackFrame(null); - } - var fr; - fr = !1; - function Ur(c) { - return typeof c == "object" && c !== null && c.$$typeof === r; - } - function mr() { - { - if (Ar.current) { - var c = I(Ar.current.type); - if (c) - return ` - -Check the render method of \`` + c + "`."; - } - return ""; - } - } - function Ut(c) { - { - if (c !== void 0) { - var T = c.fileName.replace(/^.*[\\\/]/, ""), P = c.lineNumber; - return ` - -Check your code at ` + T + ":" + P + "."; - } - return ""; - } - } - var dt = {}; - function Ht(c) { - { - var T = mr(); - if (!T) { - var P = typeof c == "string" ? c : c.displayName || c.name; - P && (T = ` - -Check the top-level render call using <` + P + ">."); - } - return T; - } - } - function ut(c, T) { - { - if (!c._store || c._store.validated || c.key != null) - return; - c._store.validated = !0; - var P = Ht(T); - if (dt[P]) - return; - dt[P] = !0; - var l = ""; - c && c._owner && c._owner !== Ar.current && (l = " It was passed a child from " + I(c._owner.type) + "."), Je(c), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', P, l), Je(null); - } - } - function ft(c, T) { - { - if (typeof c != "object") - return; - if (W(c)) - for (var P = 0; P < c.length; P++) { - var l = c[P]; - Ur(l) && ut(l, T); - } - else if (Ur(c)) - c._store && (c._store.validated = !0); - else if (c) { - var y = L(c); - if (typeof y == "function" && y !== c.entries) - for (var k = y.call(c), $; !($ = k.next()).done; ) - Ur($.value) && ut($.value, T); - } - } - } - function hr(c) { - { - var T = c.type; - if (T == null || typeof T == "string") - return; - var P; - if (typeof T == "function") - P = T.propTypes; - else if (typeof T == "object" && (T.$$typeof === h || // Note: Memo only checks outer props here. - // Inner props are checked in the reconciler. - T.$$typeof === b)) - P = T.propTypes; - else - return; - if (P) { - var l = I(T); - F(P, c.props, "prop", l, c); - } else if (T.PropTypes !== void 0 && !fr) { - fr = !0; - var y = I(T); - w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", y || "Unknown"); - } - typeof T.getDefaultProps == "function" && !T.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); - } - } - function Yt(c) { - { - for (var T = Object.keys(c.props), P = 0; P < T.length; P++) { - var l = T[P]; - if (l !== "children" && l !== "key") { - Je(c), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", l), Je(null); - break; - } - } - c.ref !== null && (Je(c), w("Invalid attribute `ref` supplied to `React.Fragment`."), Je(null)); - } - } - function Tt(c, T, P, l, y, k) { - { - var $ = Ee(c); - if (!$) { - var D = ""; - (c === void 0 || typeof c == "object" && c !== null && Object.keys(c).length === 0) && (D += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."); - var X = Ut(y); - X ? D += X : D += mr(); - var H; - c === null ? H = "null" : W(c) ? H = "array" : c !== void 0 && c.$$typeof === r ? (H = "<" + (I(c.type) || "Unknown") + " />", D = " Did you accidentally export a JSX literal instead of a component?") : H = typeof c, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", H, D); - } - var V = Vt(c, T, P, y, k); - if (V == null) - return V; - if ($) { - var _e = T.children; - if (_e !== void 0) - if (l) - if (W(_e)) { - for (var we = 0; we < _e.length; we++) - ft(_e[we], c); - Object.freeze && Object.freeze(_e); - } else - w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); - else - ft(_e, c); - } - return c === n ? Yt(V) : hr(V), V; - } - } - var qt = Tt; - Fn.Fragment = n, Fn.jsxDEV = qt; - }()), Fn; -} -(function(e) { - process.env.NODE_ENV === "production" ? e.exports = cc() : e.exports = dc(); -})(lc); -const U = Ja.jsxDEV, uc = ({ env: e, client: r, signer: t }) => { - const [n, a] = ge(r), [o, i] = ge(t), [u, h] = ge(e), [v, S] = ge(), [b, _] = ge(-1); - Ke(() => { - if (n) - return; - if ((!u || u && !u.length) && !n) - throw new Error("You must provide a valid env or client to the ClientProvider"); - const O = { - env: u, - // TODO: REMOVE THE FOLLOWING csp_url when https://github.com/vocdoni/vocdoni-sdk/issues/163 is ready - csp_url: "http://localhost:5000/v1" - }; - o && (O.wallet = o), a(new Yo(O)); - }, [u, r]), Ke(() => { - e && h(e); - }, [e]), Ke(() => { - t && Y(t); - }, [t]), Ke(() => { - !n || v || !o || (async () => await C())(); - }, [n, v, o]), Ke(() => { - !n || !v || !o || (async () => await R())(); - }, [n, v, o]), Ke(() => { - if (!("ethereum" in window)) - return; - const O = async (w) => { - S(void 0); - }; - return window.ethereum.on("accountsChanged", O), () => { - window.ethereum.removeListener("accountsChanged", O); - }; - }, []); - const C = async () => { - let O; - try { - return O = await n.createAccount(), S(O), O; - } catch (w) { - console.error("could not fetch account:", w); - } - }, R = async () => { - try { - if (!v) - throw new Error("Account not available"); - if (v.balance <= 10 && u !== "prod") { - await n.collectFaucetTokens(); - const O = await n.fetchAccountInfo(); - _(O.balance); - return; - } - _(v.balance); - } catch (O) { - console.error("could not fetch balance:", O); - } - }, Y = (O) => { - if (!n) - throw new Error("No client initialized"); - i(O), n.wallet = O; - }; - return { - account: v, - balance: b, - client: n, - env: u, - signer: o, - generateSigner: (O) => { - if (!n) - throw new Error("No client initialized"); - let w; - return O ? w = Yo.generateWalletFromData(O) : (n.generateRandomWallet(), w = n.wallet), w; - }, - fetchAccount: C, - fetchBalance: R, - setClient: a, - setSigner: Y - }; -}, is = da(void 0), po = () => { - const e = ua(is); - if (!e) - throw new Error( - "useClientContext returned `undefined`, maybe you forgot to wrap the component within ?" - ); - return { - ...e, - // Allow client extensions - client: e.client - }; -}, P0 = ({ env: e, client: r, signer: t, ...n }) => { - const a = uc({ env: e, client: r, signer: t }); - return /* @__PURE__ */ U(is.Provider, { value: a, ...n }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/client.tsx", - lineNumber: 187, - columnNumber: 10 - }, globalThis); -}; -var qe = (...e) => e.filter(Boolean).join(" "); -function Mt(e) { - const r = typeof e; - return e != null && (r === "object" || r === "function") && !Array.isArray(e); -} -var We = (e) => e ? "" : void 0, Ra = (e) => e ? !0 : void 0; -function Dr(...e) { - return function(t) { - e.some((n) => (n == null || n(t), t == null ? void 0 : t.defaultPrevented)); - }; -} -function fc(...e) { - return function(t) { - e.forEach((n) => { - n == null || n(t); - }); - }; -} -var gn = {}, mc = { - get exports() { - return gn; - }, - set exports(e) { - gn = e; - } -}, Qt = {}; -/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var Ko; -function hc() { - if (Ko) - return Qt; - Ko = 1; - var e = Be, r = Symbol.for("react.element"), t = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 }; - function i(u, h, v) { - var S, b = {}, _ = null, C = null; - v !== void 0 && (_ = "" + v), h.key !== void 0 && (_ = "" + h.key), h.ref !== void 0 && (C = h.ref); - for (S in h) - n.call(h, S) && !o.hasOwnProperty(S) && (b[S] = h[S]); - if (u && u.defaultProps) - for (S in h = u.defaultProps, h) - b[S] === void 0 && (b[S] = h[S]); - return { $$typeof: r, type: u, key: _, ref: C, props: b, _owner: a.current }; - } - return Qt.Fragment = t, Qt.jsx = i, Qt.jsxs = i, Qt; -} -var Kt = {}; -/** - * @license React - * react-jsx-runtime.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var Jo; -function vc() { - return Jo || (Jo = 1, process.env.NODE_ENV !== "production" && function() { - var e = Be, r = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), u = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), R = Symbol.iterator, Y = "@@iterator"; - function L(l) { - if (l === null || typeof l != "object") - return null; - var y = R && l[R] || l[Y]; - return typeof y == "function" ? y : null; - } - var O = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; - function w(l) { - { - for (var y = arguments.length, k = new Array(y > 1 ? y - 1 : 0), $ = 1; $ < y; $++) - k[$ - 1] = arguments[$]; - q("error", l, k); - } - } - function q(l, y, k) { - { - var $ = O.ReactDebugCurrentFrame, D = $.getStackAddendum(); - D !== "" && (y += "%s", k = k.concat([D])); - var X = k.map(function(H) { - return String(H); - }); - X.unshift("Warning: " + y), Function.prototype.apply.call(console[l], console, X); - } - } - var ie = !1, M = !1, Q = !1, K = !1, re = !1, fe; - fe = Symbol.for("react.module.reference"); - function Ee(l) { - return !!(typeof l == "string" || typeof l == "function" || l === n || l === o || re || l === a || l === v || l === S || K || l === C || ie || M || Q || typeof l == "object" && l !== null && (l.$$typeof === _ || l.$$typeof === b || l.$$typeof === i || l.$$typeof === u || l.$$typeof === h || // This needs to include all possible module reference object - // types supported by any Flight configuration anywhere since - // we don't know which Flight build this will end up being used - // with. - l.$$typeof === fe || l.getModuleId !== void 0)); - } - function me(l, y, k) { - var $ = l.displayName; - if ($) - return $; - var D = y.displayName || y.name || ""; - return D !== "" ? k + "(" + D + ")" : k; - } - function J(l) { - return l.displayName || "Context"; - } - function I(l) { - if (l == null) - return null; - if (typeof l.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof l == "function") - return l.displayName || l.name || null; - if (typeof l == "string") - return l; - switch (l) { - case n: - return "Fragment"; - case t: - return "Portal"; - case o: - return "Profiler"; - case a: - return "StrictMode"; - case v: - return "Suspense"; - case S: - return "SuspenseList"; - } - if (typeof l == "object") - switch (l.$$typeof) { - case u: - var y = l; - return J(y) + ".Consumer"; - case i: - var k = l; - return J(k._context) + ".Provider"; - case h: - return me(l, l.render, "ForwardRef"); - case b: - var $ = l.displayName || null; - return $ !== null ? $ : I(l.type) || "Memo"; - case _: { - var D = l, X = D._payload, H = D._init; - try { - return I(H(X)); - } catch { - return null; - } - } - } - return null; - } - var Z = Object.assign, ee = 0, se, ye, Ye, Ve, Me, er, rr; - function le() { - } - le.__reactDisabledLog = !0; - function ur() { - { - if (ee === 0) { - se = console.log, ye = console.info, Ye = console.warn, Ve = console.error, Me = console.group, er = console.groupCollapsed, rr = console.groupEnd; - var l = { - configurable: !0, - enumerable: !0, - value: le, - writable: !0 - }; - Object.defineProperties(console, { - info: l, - log: l, - warn: l, - error: l, - group: l, - groupCollapsed: l, - groupEnd: l - }); - } - ee++; - } - } - function br() { - { - if (ee--, ee === 0) { - var l = { - configurable: !0, - enumerable: !0, - writable: !0 - }; - Object.defineProperties(console, { - log: Z({}, l, { - value: se - }), - info: Z({}, l, { - value: ye - }), - warn: Z({}, l, { - value: Ye - }), - error: Z({}, l, { - value: Ve - }), - group: Z({}, l, { - value: Me - }), - groupCollapsed: Z({}, l, { - value: er - }), - groupEnd: Z({}, l, { - value: rr - }) - }); - } - ee < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue."); - } - } - var j = O.ReactCurrentDispatcher, ce; - function ae(l, y, k) { - { - if (ce === void 0) - try { - throw Error(); - } catch (D) { - var $ = D.stack.trim().match(/\n( *(at )?)/); - ce = $ && $[1] || ""; - } - return ` -` + ce + l; - } - } - var be = !1, Pe; - { - var te = typeof WeakMap == "function" ? WeakMap : Map; - Pe = new te(); - } - function $e(l, y) { - if (!l || be) - return ""; - { - var k = Pe.get(l); - if (k !== void 0) - return k; - } - var $; - be = !0; - var D = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - var X; - X = j.current, j.current = null, ur(); - try { - if (y) { - var H = function() { - throw Error(); - }; - if (Object.defineProperty(H.prototype, "props", { - set: function() { - throw Error(); - } - }), typeof Reflect == "object" && Reflect.construct) { - try { - Reflect.construct(H, []); - } catch (cr) { - $ = cr; - } - Reflect.construct(l, [], H); - } else { - try { - H.call(); - } catch (cr) { - $ = cr; - } - l.call(H.prototype); - } - } else { - try { - throw Error(); - } catch (cr) { - $ = cr; - } - l(); - } - } catch (cr) { - if (cr && $ && typeof cr.stack == "string") { - for (var V = cr.stack.split(` -`), _e = $.stack.split(` -`), we = V.length - 1, Ne = _e.length - 1; we >= 1 && Ne >= 0 && V[we] !== _e[Ne]; ) - Ne--; - for (; we >= 1 && Ne >= 0; we--, Ne--) - if (V[we] !== _e[Ne]) { - if (we !== 1 || Ne !== 1) - do - if (we--, Ne--, Ne < 0 || V[we] !== _e[Ne]) { - var ze = ` -` + V[we].replace(" at new ", " at "); - return l.displayName && ze.includes("") && (ze = ze.replace("", l.displayName)), typeof l == "function" && Pe.set(l, ze), ze; - } - while (we >= 1 && Ne >= 0); - break; - } - } - } finally { - be = !1, j.current = X, br(), Error.prepareStackTrace = D; - } - var Nr = l ? l.displayName || l.name : "", Cn = Nr ? ae(Nr) : ""; - return typeof l == "function" && Pe.set(l, Cn), Cn; - } - function pr(l, y, k) { - return $e(l, !1); - } - function kt(l) { - var y = l.prototype; - return !!(y && y.isReactComponent); - } - function yr(l, y, k) { - if (l == null) - return ""; - if (typeof l == "function") - return $e(l, kt(l)); - if (typeof l == "string") - return ae(l); - switch (l) { - case v: - return ae("Suspense"); - case S: - return ae("SuspenseList"); - } - if (typeof l == "object") - switch (l.$$typeof) { - case h: - return pr(l.render); - case b: - return yr(l.type, y, k); - case _: { - var $ = l, D = $._payload, X = $._init; - try { - return yr(X(D), y, k); - } catch { - } - } - } - return ""; - } - var d = Object.prototype.hasOwnProperty, p = {}, x = O.ReactDebugCurrentFrame; - function A(l) { - if (l) { - var y = l._owner, k = yr(l.type, l._source, y ? y.type : null); - x.setExtraStackFrame(k); - } else - x.setExtraStackFrame(null); - } - function F(l, y, k, $, D) { - { - var X = Function.call.bind(d); - for (var H in l) - if (X(l, H)) { - var V = void 0; - try { - if (typeof l[H] != "function") { - var _e = Error(($ || "React class") + ": " + k + " type `" + H + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof l[H] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); - throw _e.name = "Invariant Violation", _e; - } - V = l[H](y, H, $, k, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); - } catch (we) { - V = we; - } - V && !(V instanceof Error) && (A(D), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", $ || "React class", k, H, typeof V), A(null)), V instanceof Error && !(V.message in p) && (p[V.message] = !0, A(D), w("Failed %s type: %s", k, V.message), A(null)); - } - } - } - var E = Array.isArray; - function W(l) { - return E(l); - } - function de(l) { - { - var y = typeof Symbol == "function" && Symbol.toStringTag, k = y && l[Symbol.toStringTag] || l.constructor.name || "Object"; - return k; - } - } - function Te(l) { - try { - return tr(l), !1; - } catch { - return !0; - } - } - function tr(l) { - return "" + l; - } - function jr(l) { - if (Te(l)) - return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", de(l)), tr(l); - } - var Ge = O.ReactCurrentOwner, Sr = { - key: !0, - ref: !0, - __self: !0, - __source: !0 - }, Fr, Tr, xr; - xr = {}; - function Vr(l) { - if (d.call(l, "ref")) { - var y = Object.getOwnPropertyDescriptor(l, "ref").get; - if (y && y.isReactWarning) - return !1; - } - return l.ref !== void 0; - } - function Ct(l) { - if (d.call(l, "key")) { - var y = Object.getOwnPropertyDescriptor(l, "key").get; - if (y && y.isReactWarning) - return !1; - } - return l.key !== void 0; - } - function Lt(l, y) { - if (typeof l.ref == "string" && Ge.current && y && Ge.current.stateNode !== y) { - var k = I(Ge.current.type); - xr[k] || (w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', I(Ge.current.type), l.ref), xr[k] = !0); - } - } - function jt(l, y) { - { - var k = function() { - Fr || (Fr = !0, w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", y)); - }; - k.isReactWarning = !0, Object.defineProperty(l, "key", { - get: k, - configurable: !0 - }); - } - } - function Er(l, y) { - { - var k = function() { - Tr || (Tr = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", y)); - }; - k.isReactWarning = !0, Object.defineProperty(l, "ref", { - get: k, - configurable: !0 - }); - } - } - var et = function(l, y, k, $, D, X, H) { - var V = { - // This tag allows us to uniquely identify this as a React Element - $$typeof: r, - // Built-in properties that belong on the element - type: l, - key: y, - ref: k, - props: H, - // Record the component responsible for creating this element. - _owner: X - }; - return V._store = {}, Object.defineProperty(V._store, "validated", { - configurable: !1, - enumerable: !1, - writable: !0, - value: !1 - }), Object.defineProperty(V, "_self", { - configurable: !1, - enumerable: !1, - writable: !1, - value: $ - }), Object.defineProperty(V, "_source", { - configurable: !1, - enumerable: !1, - writable: !1, - value: D - }), Object.freeze && (Object.freeze(V.props), Object.freeze(V)), V; - }; - function Vt(l, y, k, $, D) { - { - var X, H = {}, V = null, _e = null; - k !== void 0 && (jr(k), V = "" + k), Ct(y) && (jr(y.key), V = "" + y.key), Vr(y) && (_e = y.ref, Lt(y, D)); - for (X in y) - d.call(y, X) && !Sr.hasOwnProperty(X) && (H[X] = y[X]); - if (l && l.defaultProps) { - var we = l.defaultProps; - for (X in we) - H[X] === void 0 && (H[X] = we[X]); - } - if (V || _e) { - var Ne = typeof l == "function" ? l.displayName || l.name || "Unknown" : l; - V && jt(H, Ne), _e && Er(H, Ne); - } - return et(l, V, _e, D, $, Ge.current, H); - } - } - var Ar = O.ReactCurrentOwner, ct = O.ReactDebugCurrentFrame; - function Je(l) { - if (l) { - var y = l._owner, k = yr(l.type, l._source, y ? y.type : null); - ct.setExtraStackFrame(k); - } else - ct.setExtraStackFrame(null); - } - var fr; - fr = !1; - function Ur(l) { - return typeof l == "object" && l !== null && l.$$typeof === r; - } - function mr() { - { - if (Ar.current) { - var l = I(Ar.current.type); - if (l) - return ` - -Check the render method of \`` + l + "`."; - } - return ""; - } - } - function Ut(l) { - { - if (l !== void 0) { - var y = l.fileName.replace(/^.*[\\\/]/, ""), k = l.lineNumber; - return ` - -Check your code at ` + y + ":" + k + "."; - } - return ""; - } - } - var dt = {}; - function Ht(l) { - { - var y = mr(); - if (!y) { - var k = typeof l == "string" ? l : l.displayName || l.name; - k && (y = ` - -Check the top-level render call using <` + k + ">."); - } - return y; - } - } - function ut(l, y) { - { - if (!l._store || l._store.validated || l.key != null) - return; - l._store.validated = !0; - var k = Ht(y); - if (dt[k]) - return; - dt[k] = !0; - var $ = ""; - l && l._owner && l._owner !== Ar.current && ($ = " It was passed a child from " + I(l._owner.type) + "."), Je(l), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', k, $), Je(null); - } - } - function ft(l, y) { - { - if (typeof l != "object") - return; - if (W(l)) - for (var k = 0; k < l.length; k++) { - var $ = l[k]; - Ur($) && ut($, y); - } - else if (Ur(l)) - l._store && (l._store.validated = !0); - else if (l) { - var D = L(l); - if (typeof D == "function" && D !== l.entries) - for (var X = D.call(l), H; !(H = X.next()).done; ) - Ur(H.value) && ut(H.value, y); - } - } - } - function hr(l) { - { - var y = l.type; - if (y == null || typeof y == "string") - return; - var k; - if (typeof y == "function") - k = y.propTypes; - else if (typeof y == "object" && (y.$$typeof === h || // Note: Memo only checks outer props here. - // Inner props are checked in the reconciler. - y.$$typeof === b)) - k = y.propTypes; - else - return; - if (k) { - var $ = I(y); - F(k, l.props, "prop", $, l); - } else if (y.PropTypes !== void 0 && !fr) { - fr = !0; - var D = I(y); - w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", D || "Unknown"); - } - typeof y.getDefaultProps == "function" && !y.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); - } - } - function Yt(l) { - { - for (var y = Object.keys(l.props), k = 0; k < y.length; k++) { - var $ = y[k]; - if ($ !== "children" && $ !== "key") { - Je(l), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", $), Je(null); - break; - } - } - l.ref !== null && (Je(l), w("Invalid attribute `ref` supplied to `React.Fragment`."), Je(null)); - } - } - function Tt(l, y, k, $, D, X) { - { - var H = Ee(l); - if (!H) { - var V = ""; - (l === void 0 || typeof l == "object" && l !== null && Object.keys(l).length === 0) && (V += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."); - var _e = Ut(D); - _e ? V += _e : V += mr(); - var we; - l === null ? we = "null" : W(l) ? we = "array" : l !== void 0 && l.$$typeof === r ? (we = "<" + (I(l.type) || "Unknown") + " />", V = " Did you accidentally export a JSX literal instead of a component?") : we = typeof l, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", we, V); - } - var Ne = Vt(l, y, k, D, X); - if (Ne == null) - return Ne; - if (H) { - var ze = y.children; - if (ze !== void 0) - if ($) - if (W(ze)) { - for (var Nr = 0; Nr < ze.length; Nr++) - ft(ze[Nr], l); - Object.freeze && Object.freeze(ze); - } else - w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); - else - ft(ze, l); - } - return l === n ? Yt(Ne) : hr(Ne), Ne; - } - } - function qt(l, y, k) { - return Tt(l, y, k, !0); - } - function c(l, y, k) { - return Tt(l, y, k, !1); - } - var T = c, P = qt; - Kt.Fragment = n, Kt.jsx = T, Kt.jsxs = P; - }()), Kt; -} -(function(e) { - process.env.NODE_ENV === "production" ? e.exports = hc() : e.exports = vc(); -})(mc); -const gc = gn.Fragment, N = gn.jsx, Sn = gn.jsxs; -var Zo = { - path: /* @__PURE__ */ Sn("g", { stroke: "currentColor", strokeWidth: "1.5", children: [ - /* @__PURE__ */ N( - "path", - { - strokeLinecap: "round", - fill: "none", - d: "M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25" - } - ), - /* @__PURE__ */ N( - "path", - { - fill: "currentColor", - strokeLinecap: "round", - d: "M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0" - } - ), - /* @__PURE__ */ N("circle", { fill: "none", strokeMiterlimit: "10", cx: "12", cy: "12", r: "11.25" }) - ] }), - viewBox: "0 0 24 24" -}, Zr = ve((e, r) => { - const { - as: t, - viewBox: n, - color: a = "currentColor", - focusable: o = !1, - children: i, - className: u, - __css: h, - ...v - } = e, S = qe("chakra-icon", u), b = ir("Icon", e), _ = { - w: "1em", - h: "1em", - display: "inline-block", - lineHeight: "1em", - flexShrink: 0, - color: a, - ...h, - ...b - }, C = { - ref: r, - focusable: o, - className: S, - __css: _ - }, R = n ?? Zo.viewBox; - if (t && typeof t != "string") - return /* @__PURE__ */ N(ne.svg, { as: t, ...C, ...v }); - const Y = i ?? Zo.path; - return /* @__PURE__ */ N(ne.svg, { verticalAlign: "middle", viewBox: R, ...C, ...v, children: Y }); -}); -Zr.displayName = "Icon"; -function bc(e, r) { - return `${e} returned \`undefined\`. Seems you forgot to wrap component within ${r}`; -} -function Wr(e = {}) { - const { - name: r, - strict: t = !0, - hookName: n = "useContext", - providerName: a = "Provider", - errorMessage: o, - defaultValue: i - } = e, u = da(i); - u.displayName = r; - function h() { - var v; - const S = ua(u); - if (!S && t) { - const b = new Error( - o ?? bc(n, a) - ); - throw b.name = "ContextError", (v = Error.captureStackTrace) == null || v.call(Error, b, h), b; - } - return S; - } - return [u.Provider, h, u]; -} -var [pc, ss] = Wr({ - name: "TagStylesContext", - errorMessage: `useTagStyles returned is 'undefined'. Seems you forgot to wrap the components in "" ` -}), yo = ve((e, r) => { - const t = Mr("Tag", e), n = sr(e), a = { - display: "inline-flex", - verticalAlign: "top", - alignItems: "center", - maxWidth: "100%", - ...t.container - }; - return /* @__PURE__ */ N(pc, { value: t, children: /* @__PURE__ */ N(ne.span, { ref: r, ...n, __css: a }) }); -}); -yo.displayName = "Tag"; -var yc = ve((e, r) => { - const t = ss(); - return /* @__PURE__ */ N(ne.span, { ref: r, noOfLines: 1, ...e, __css: t.label }); -}); -yc.displayName = "TagLabel"; -var Sc = ve((e, r) => /* @__PURE__ */ N(Zr, { ref: r, verticalAlign: "top", marginEnd: "0.5rem", ...e })); -Sc.displayName = "TagLeftIcon"; -var xc = ve((e, r) => /* @__PURE__ */ N(Zr, { ref: r, verticalAlign: "top", marginStart: "0.5rem", ...e })); -xc.displayName = "TagRightIcon"; -var ls = (e) => /* @__PURE__ */ N(Zr, { verticalAlign: "inherit", viewBox: "0 0 512 512", ...e, children: /* @__PURE__ */ N( - "path", - { - fill: "currentColor", - d: "M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z" - } -) }); -ls.displayName = "TagCloseIcon"; -var _c = ve( - (e, r) => { - const { isDisabled: t, children: n, ...a } = e, i = { - display: "flex", - alignItems: "center", - justifyContent: "center", - outline: "0", - ...ss().closeButton - }; - return /* @__PURE__ */ N( - ne.button, - { - ref: r, - "aria-label": "close", - ...a, - type: "button", - disabled: t, - __css: i, - children: n || /* @__PURE__ */ N(ls, {}) - } - ); - } -); -_c.displayName = "TagCloseButton"; -const F0 = (e) => { - const { balance: r } = po(); - if (r < 0) - return null; - let t = "teal"; - return r < 50 && r > 20 ? t = "yellow" : r <= 20 && (t = "red"), /* @__PURE__ */ U(yo, { size: "sm", colorScheme: t, ...e, children: [ - r, - " votokens" - ] }, void 0, !0, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Account/Balance.tsx", - lineNumber: 20, - columnNumber: 5 - }, globalThis); -}, cs = (e) => { - const { variant: r, ...t } = e, n = ir("HorizontalRuler", { variant: r }); - return /* @__PURE__ */ U(ne.div, { __css: n, ...t, as: "hr" }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/HR.tsx", - lineNumber: 11, - columnNumber: 10 - }, globalThis); -}; -cs.displayName = "HorizontalRuler"; -var Za = ve(function(r, t) { - const { htmlWidth: n, htmlHeight: a, alt: o, ...i } = r; - return /* @__PURE__ */ N("img", { width: n, height: a, ref: t, alt: o, ...i }); -}); -Za.displayName = "NativeImage"; -var wc = globalThis != null && globalThis.document ? Zl : Ke; -function kc(e) { - const { - loading: r, - src: t, - srcSet: n, - onLoad: a, - onError: o, - crossOrigin: i, - sizes: u, - ignoreFallback: h - } = e, [v, S] = ge("pending"); - Ke(() => { - S(t ? "loading" : "pending"); - }, [t]); - const b = ns(), _ = Ze(() => { - if (!t) - return; - C(); - const R = new Image(); - R.src = t, i && (R.crossOrigin = i), n && (R.srcset = n), u && (R.sizes = u), r && (R.loading = r), R.onload = (Y) => { - C(), S("loaded"), a == null || a(Y); - }, R.onerror = (Y) => { - C(), S("failed"), o == null || o(Y); - }, b.current = R; - }, [t, i, n, u, a, o, r]), C = () => { - b.current && (b.current.onload = null, b.current.onerror = null, b.current = null); - }; - return wc(() => { - if (!h) - return v === "loading" && _(), () => { - C(); - }; - }, [v, _, h]), h ? "loaded" : v; -} -var Cc = (e, r) => e !== "loaded" && r === "beforeLoadOrError" || e === "failed" && r === "onError"; -function Tc(e, r = []) { - const t = Object.assign({}, e); - for (const n of r) - n in t && delete t[n]; - return t; -} -var ds = ve(function(r, t) { - const { - fallbackSrc: n, - fallback: a, - src: o, - srcSet: i, - align: u, - fit: h, - loading: v, - ignoreFallback: S, - crossOrigin: b, - fallbackStrategy: _ = "beforeLoadOrError", - referrerPolicy: C, - ...R - } = r, Y = n !== void 0 || a !== void 0, L = v != null || S || !Y, O = kc({ - ...r, - crossOrigin: b, - ignoreFallback: L - }), w = Cc(O, _), q = { - ref: t, - objectFit: h, - objectPosition: u, - ...L ? R : Tc(R, ["onError", "onLoad"]) - }; - return w ? a || /* @__PURE__ */ N( - ne.img, - { - as: Za, - className: "chakra-image__placeholder", - src: n, - ...q - } - ) : /* @__PURE__ */ N( - ne.img, - { - as: Za, - src: o, - srcSet: i, - crossOrigin: b, - loading: v, - referrerPolicy: C, - className: "chakra-image", - ...q - } - ); -}); -ds.displayName = "Image"; -const Ec = (e, r) => { - if (typeof e > "u") - return; - if (!e.startsWith("ipfs")) - return e; - const t = e.match(/(?:ipfs:\/\/)?(.*)/); - if (!t) - return e; - const [, n] = t; - return r + n; -}, So = ({ src: e, ...r }) => { - if (!e) - return null; - const t = Ec(e, r.gateway || "https://infura-ipfs.io/ipfs/"); - return /* @__PURE__ */ U(ds, { src: t, ...r }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Image.tsx", - lineNumber: 35, - columnNumber: 10 - }, globalThis); -}; -function us(e) { - return ec.toArray(e).filter( - (r) => as(r) - ); -} -var [$c, fs] = Wr({ - name: "ListStylesContext", - errorMessage: `useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" ` -}), xo = ve(function(r, t) { - const n = Mr("List", r), { - children: a, - styleType: o = "none", - stylePosition: i, - spacing: u, - ...h - } = sr(r), v = us(a), b = u ? { ["& > *:not(style) ~ *:not(style)"]: { mt: u } } : {}; - return /* @__PURE__ */ N($c, { value: n, children: /* @__PURE__ */ N( - ne.ul, - { - ref: t, - listStyleType: o, - listStylePosition: i, - role: "list", - __css: { ...n.container, ...b }, - ...h, - children: v - } - ) }); -}); -xo.displayName = "List"; -var ms = ve((e, r) => { - const { as: t, ...n } = e; - return /* @__PURE__ */ N(xo, { ref: r, as: "ol", styleType: "decimal", marginStart: "1em", ...n }); -}); -ms.displayName = "OrderedList"; -var hs = ve(function(r, t) { - const { as: n, ...a } = r; - return /* @__PURE__ */ N(xo, { ref: t, as: "ul", styleType: "initial", marginStart: "1em", ...a }); -}); -hs.displayName = "UnorderedList"; -var vs = ve(function(r, t) { - const n = fs(); - return /* @__PURE__ */ N(ne.li, { ref: t, ...r, __css: n.item }); -}); -vs.displayName = "ListItem"; -var Rc = ve(function(r, t) { - const n = fs(); - return /* @__PURE__ */ N(Zr, { ref: t, role: "presentation", ...r, __css: n.icon }); -}); -Rc.displayName = "ListIcon"; -function gs(e, r) { - return Array.isArray(e) ? e.map((t) => t === null ? null : r(t)) : Mt(e) ? Object.keys(e).reduce((t, n) => (t[n] = r(e[n]), t), {}) : e != null ? r(e) : null; -} -function Pc(e) { - const r = Object.assign({}, e); - for (let t in r) - r[t] === void 0 && delete r[t]; - return r; -} -var bs = ve(function(r, t) { - const n = ir("Text", r), { className: a, align: o, decoration: i, casing: u, ...h } = sr(r), v = Pc({ - textAlign: r.align, - textDecoration: r.decoration, - textTransform: r.casing - }); - return /* @__PURE__ */ N( - ne.p, - { - ref: t, - className: qe("chakra-text", r.className), - ...v, - ...h, - __css: n - } - ); -}); -bs.displayName = "Text"; -var ps = (e) => /* @__PURE__ */ N( - ne.div, - { - className: "chakra-stack__item", - ...e, - __css: { - display: "inline-block", - flex: "0 0 auto", - minWidth: 0, - ...e.__css - } - } -); -ps.displayName = "StackItem"; -var eo = "& > *:not(style) ~ *:not(style)"; -function Fc(e) { - const { spacing: r, direction: t } = e, n = { - column: { - marginTop: r, - marginEnd: 0, - marginBottom: 0, - marginStart: 0 - }, - row: { marginTop: 0, marginEnd: 0, marginBottom: 0, marginStart: r }, - "column-reverse": { - marginTop: 0, - marginEnd: 0, - marginBottom: r, - marginStart: 0 - }, - "row-reverse": { - marginTop: 0, - marginEnd: r, - marginBottom: 0, - marginStart: 0 - } - }; - return { - flexDirection: t, - [eo]: gs( - t, - (a) => n[a] - ) - }; -} -function Ac(e) { - const { spacing: r, direction: t } = e, n = { - column: { - my: r, - mx: 0, - borderLeftWidth: 0, - borderBottomWidth: "1px" - }, - "column-reverse": { - my: r, - mx: 0, - borderLeftWidth: 0, - borderBottomWidth: "1px" - }, - row: { - mx: r, - my: 0, - borderLeftWidth: "1px", - borderBottomWidth: 0 - }, - "row-reverse": { - mx: r, - my: 0, - borderLeftWidth: "1px", - borderBottomWidth: 0 - } - }; - return { - "&": gs( - t, - (a) => n[a] - ) - }; -} -var ys = ve((e, r) => { - const { - isInline: t, - direction: n, - align: a, - justify: o, - spacing: i = "0.5rem", - wrap: u, - children: h, - divider: v, - className: S, - shouldWrapChildren: b, - ..._ - } = e, C = t ? "row" : n ?? "column", R = pt( - () => Fc({ direction: C, spacing: i }), - [C, i] - ), Y = pt( - () => Ac({ spacing: i, direction: C }), - [i, C] - ), L = !!v, O = !b && !L, w = pt(() => { - const ie = us(h); - return O ? ie : ie.map((M, Q) => { - const K = typeof M.key < "u" ? M.key : Q, re = Q + 1 === ie.length, Ee = b ? /* @__PURE__ */ N(ps, { children: M }, K) : M; - if (!L) - return Ee; - const me = os( - v, - { - __css: Y - } - ); - return /* @__PURE__ */ Sn(rc, { children: [ - Ee, - re ? null : me - ] }, K); - }); - }, [ - v, - Y, - L, - O, - b, - h - ]), q = qe("chakra-stack", S); - return /* @__PURE__ */ N( - ne.div, - { - ref: r, - display: "flex", - alignItems: a, - justifyContent: o, - flexDirection: R.flexDirection, - flexWrap: u, - className: q, - __css: L ? {} : { [eo]: R[eo] }, - ..._, - children: w - } - ); -}); -ys.displayName = "Stack"; -var Mn = ve(function(r, t) { - const n = ir("Heading", r), { className: a, ...o } = sr(r); - return /* @__PURE__ */ N( - ne.h2, - { - ref: t, - className: qe("chakra-heading", r.className), - ...o, - __css: n - } - ); -}); -Mn.displayName = "Heading"; -var _o = ne("div"); -_o.displayName = "Box"; -var Ss = ve(function(r, t) { - const { size: n, centerContent: a = !0, ...o } = r; - return /* @__PURE__ */ N( - _o, - { - ref: t, - boxSize: n, - __css: { - ...a ? { display: "flex", alignItems: "center", justifyContent: "center" } : {}, - flexShrink: 0, - flexGrow: 0 - }, - ...o - } - ); -}); -Ss.displayName = "Square"; -var Nc = ve(function(r, t) { - const { size: n, ...a } = r; - return /* @__PURE__ */ N(Ss, { size: n, ref: t, borderRadius: "9999px", ...a }); -}); -Nc.displayName = "Circle"; -var xs = ve(function(r, t) { - const n = ir("Link", r), { className: a, isExternal: o, ...i } = sr(r); - return /* @__PURE__ */ N( - ne.a, - { - target: o ? "_blank" : void 0, - rel: o ? "noopener" : void 0, - ref: t, - className: qe("chakra-link", a), - ...i, - __css: n - } - ); -}); -xs.displayName = "Link"; -var _s = ve(function(r, t) { - const n = ir("Code", r), { className: a, ...o } = sr(r); - return /* @__PURE__ */ N( - ne.code, - { - ref: t, - className: qe("chakra-code", r.className), - ...o, - __css: { - display: "inline-block", - ...n - } - } - ); -}); -_s.displayName = "Code"; -var [Dc, zc] = Wr({ - name: "TableStylesContext", - errorMessage: `useTableStyles returned is 'undefined'. Seems you forgot to wrap the components in "" ` -}), ws = ve((e, r) => { - const t = Mr("Table", e), { className: n, layout: a, ...o } = sr(e); - return /* @__PURE__ */ N(Dc, { value: t, children: /* @__PURE__ */ N( - ne.table, - { - ref: r, - __css: { tableLayout: a, ...t.table }, - className: qe("chakra-table", n), - ...o - } - ) }); -}); -ws.displayName = "Table"; -var Oc = ve((e, r) => { - const t = zc(); - return /* @__PURE__ */ N(ne.tr, { ...e, ref: r, __css: t.tr }); -}); -const Ic = ({ children: e, ...r }) => e ? /* @__PURE__ */ U( - ic, - { - children: e, - remarkPlugins: [sc], - components: { - a: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(xs, { ...a, target: "_blank", children: n }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", - lineNumber: 22, - columnNumber: 11 - }, globalThis), - h1: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(Mn, { size: "lg", mt: 5, mb: 4, ...a, children: n }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", - lineNumber: 27, - columnNumber: 11 - }, globalThis), - h2: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(Mn, { size: "md", mt: 5, mb: 4, ...a, children: n }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", - lineNumber: 32, - columnNumber: 11 - }, globalThis), - h3: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(Mn, { as: "h3", size: "sm", mt: 5, mb: 4, ...a, children: n }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", - lineNumber: 37, - columnNumber: 11 - }, globalThis), - ol: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(ms, { ...a, children: n }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", - lineNumber: 41, - columnNumber: 47 - }, globalThis), - ul: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(hs, { ...a, children: n }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", - lineNumber: 42, - columnNumber: 47 - }, globalThis), - li: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(vs, { ...a, children: n }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", - lineNumber: 43, - columnNumber: 47 - }, globalThis), - p: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(bs, { fontWeight: "medium", mb: 4, children: n }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", - lineNumber: 45, - columnNumber: 11 - }, globalThis), - table: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(_o, { overflowX: "auto", maxW: "full", children: /* @__PURE__ */ U(ws, { ...a, children: n }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", - lineNumber: 51, - columnNumber: 13 - }, globalThis) }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", - lineNumber: 50, - columnNumber: 11 - }, globalThis), - tr: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(Oc, { ...a, children: n }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", - lineNumber: 54, - columnNumber: 47 - }, globalThis), - code: ({ node: t, children: n, ...a }) => /* @__PURE__ */ U(_s, { ...a, children: n }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", - lineNumber: 55, - columnNumber: 49 - }, globalThis) - }, - ...r - }, - void 0, - !1, - { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/layout/Markdown.tsx", - lineNumber: 17, - columnNumber: 5 - }, - globalThis -) : null, fa = ne(Ic); -fa.displayName = "Markdown"; -function _t(e) { - if (e === null || e === !0 || e === !1) - return NaN; - var r = Number(e); - return isNaN(r) ? r : r < 0 ? Math.ceil(r) : Math.floor(r); -} -function lr(e, r) { - if (r.length < e) - throw new TypeError(e + " argument" + (e > 1 ? "s" : "") + " required, but only " + r.length + " present"); -} -function Wn(e) { - return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Wn = function(t) { - return typeof t; - } : Wn = function(t) { - return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; - }, Wn(e); -} -function Lr(e) { - lr(1, arguments); - var r = Object.prototype.toString.call(e); - return e instanceof Date || Wn(e) === "object" && r === "[object Date]" ? new Date(e.getTime()) : typeof e == "number" || r === "[object Number]" ? new Date(e) : ((typeof e == "string" || r === "[object String]") && typeof console < "u" && (console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"), console.warn(new Error().stack)), /* @__PURE__ */ new Date(NaN)); -} -function Bc(e, r) { - lr(2, arguments); - var t = Lr(e).getTime(), n = _t(r); - return new Date(t + n); -} -var Mc = {}; -function ma() { - return Mc; -} -function Wc(e) { - var r = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds())); - return r.setUTCFullYear(e.getFullYear()), e.getTime() - r.getTime(); -} -function Ln(e) { - return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Ln = function(t) { - return typeof t; - } : Ln = function(t) { - return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; - }, Ln(e); -} -function Lc(e) { - return lr(1, arguments), e instanceof Date || Ln(e) === "object" && Object.prototype.toString.call(e) === "[object Date]"; -} -function jc(e) { - if (lr(1, arguments), !Lc(e) && typeof e != "number") - return !1; - var r = Lr(e); - return !isNaN(Number(r)); -} -function Vc(e, r) { - lr(2, arguments); - var t = _t(r); - return Bc(e, -t); -} -var Uc = 864e5; -function Hc(e) { - lr(1, arguments); - var r = Lr(e), t = r.getTime(); - r.setUTCMonth(0, 1), r.setUTCHours(0, 0, 0, 0); - var n = r.getTime(), a = t - n; - return Math.floor(a / Uc) + 1; -} -function Qn(e) { - lr(1, arguments); - var r = 1, t = Lr(e), n = t.getUTCDay(), a = (n < r ? 7 : 0) + n - r; - return t.setUTCDate(t.getUTCDate() - a), t.setUTCHours(0, 0, 0, 0), t; -} -function ks(e) { - lr(1, arguments); - var r = Lr(e), t = r.getUTCFullYear(), n = /* @__PURE__ */ new Date(0); - n.setUTCFullYear(t + 1, 0, 4), n.setUTCHours(0, 0, 0, 0); - var a = Qn(n), o = /* @__PURE__ */ new Date(0); - o.setUTCFullYear(t, 0, 4), o.setUTCHours(0, 0, 0, 0); - var i = Qn(o); - return r.getTime() >= a.getTime() ? t + 1 : r.getTime() >= i.getTime() ? t : t - 1; -} -function Yc(e) { - lr(1, arguments); - var r = ks(e), t = /* @__PURE__ */ new Date(0); - t.setUTCFullYear(r, 0, 4), t.setUTCHours(0, 0, 0, 0); - var n = Qn(t); - return n; -} -var qc = 6048e5; -function Gc(e) { - lr(1, arguments); - var r = Lr(e), t = Qn(r).getTime() - Yc(r).getTime(); - return Math.round(t / qc) + 1; -} -function Kn(e, r) { - var t, n, a, o, i, u, h, v; - lr(1, arguments); - var S = ma(), b = _t((t = (n = (a = (o = r == null ? void 0 : r.weekStartsOn) !== null && o !== void 0 ? o : r == null || (i = r.locale) === null || i === void 0 || (u = i.options) === null || u === void 0 ? void 0 : u.weekStartsOn) !== null && a !== void 0 ? a : S.weekStartsOn) !== null && n !== void 0 ? n : (h = S.locale) === null || h === void 0 || (v = h.options) === null || v === void 0 ? void 0 : v.weekStartsOn) !== null && t !== void 0 ? t : 0); - if (!(b >= 0 && b <= 6)) - throw new RangeError("weekStartsOn must be between 0 and 6 inclusively"); - var _ = Lr(e), C = _.getUTCDay(), R = (C < b ? 7 : 0) + C - b; - return _.setUTCDate(_.getUTCDate() - R), _.setUTCHours(0, 0, 0, 0), _; -} -function Cs(e, r) { - var t, n, a, o, i, u, h, v; - lr(1, arguments); - var S = Lr(e), b = S.getUTCFullYear(), _ = ma(), C = _t((t = (n = (a = (o = r == null ? void 0 : r.firstWeekContainsDate) !== null && o !== void 0 ? o : r == null || (i = r.locale) === null || i === void 0 || (u = i.options) === null || u === void 0 ? void 0 : u.firstWeekContainsDate) !== null && a !== void 0 ? a : _.firstWeekContainsDate) !== null && n !== void 0 ? n : (h = _.locale) === null || h === void 0 || (v = h.options) === null || v === void 0 ? void 0 : v.firstWeekContainsDate) !== null && t !== void 0 ? t : 1); - if (!(C >= 1 && C <= 7)) - throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively"); - var R = /* @__PURE__ */ new Date(0); - R.setUTCFullYear(b + 1, 0, C), R.setUTCHours(0, 0, 0, 0); - var Y = Kn(R, r), L = /* @__PURE__ */ new Date(0); - L.setUTCFullYear(b, 0, C), L.setUTCHours(0, 0, 0, 0); - var O = Kn(L, r); - return S.getTime() >= Y.getTime() ? b + 1 : S.getTime() >= O.getTime() ? b : b - 1; -} -function Xc(e, r) { - var t, n, a, o, i, u, h, v; - lr(1, arguments); - var S = ma(), b = _t((t = (n = (a = (o = r == null ? void 0 : r.firstWeekContainsDate) !== null && o !== void 0 ? o : r == null || (i = r.locale) === null || i === void 0 || (u = i.options) === null || u === void 0 ? void 0 : u.firstWeekContainsDate) !== null && a !== void 0 ? a : S.firstWeekContainsDate) !== null && n !== void 0 ? n : (h = S.locale) === null || h === void 0 || (v = h.options) === null || v === void 0 ? void 0 : v.firstWeekContainsDate) !== null && t !== void 0 ? t : 1), _ = Cs(e, r), C = /* @__PURE__ */ new Date(0); - C.setUTCFullYear(_, 0, b), C.setUTCHours(0, 0, 0, 0); - var R = Kn(C, r); - return R; -} -var Qc = 6048e5; -function Kc(e, r) { - lr(1, arguments); - var t = Lr(e), n = Kn(t, r).getTime() - Xc(t, r).getTime(); - return Math.round(n / Qc) + 1; -} -function Ce(e, r) { - for (var t = e < 0 ? "-" : "", n = Math.abs(e).toString(); n.length < r; ) - n = "0" + n; - return t + n; -} -var Jc = { - // Year - y: function(r, t) { - var n = r.getUTCFullYear(), a = n > 0 ? n : 1 - n; - return Ce(t === "yy" ? a % 100 : a, t.length); - }, - // Month - M: function(r, t) { - var n = r.getUTCMonth(); - return t === "M" ? String(n + 1) : Ce(n + 1, 2); - }, - // Day of the month - d: function(r, t) { - return Ce(r.getUTCDate(), t.length); - }, - // AM or PM - a: function(r, t) { - var n = r.getUTCHours() / 12 >= 1 ? "pm" : "am"; - switch (t) { - case "a": - case "aa": - return n.toUpperCase(); - case "aaa": - return n; - case "aaaaa": - return n[0]; - case "aaaa": - default: - return n === "am" ? "a.m." : "p.m."; - } - }, - // Hour [1-12] - h: function(r, t) { - return Ce(r.getUTCHours() % 12 || 12, t.length); - }, - // Hour [0-23] - H: function(r, t) { - return Ce(r.getUTCHours(), t.length); - }, - // Minute - m: function(r, t) { - return Ce(r.getUTCMinutes(), t.length); - }, - // Second - s: function(r, t) { - return Ce(r.getUTCSeconds(), t.length); - }, - // Fraction of second - S: function(r, t) { - var n = t.length, a = r.getUTCMilliseconds(), o = Math.floor(a * Math.pow(10, n - 3)); - return Ce(o, t.length); - } -}; -const tt = Jc; -var Et = { - am: "am", - pm: "pm", - midnight: "midnight", - noon: "noon", - morning: "morning", - afternoon: "afternoon", - evening: "evening", - night: "night" -}, Zc = { - // Era - G: function(r, t, n) { - var a = r.getUTCFullYear() > 0 ? 1 : 0; - switch (t) { - case "G": - case "GG": - case "GGG": - return n.era(a, { - width: "abbreviated" - }); - case "GGGGG": - return n.era(a, { - width: "narrow" - }); - case "GGGG": - default: - return n.era(a, { - width: "wide" - }); - } - }, - // Year - y: function(r, t, n) { - if (t === "yo") { - var a = r.getUTCFullYear(), o = a > 0 ? a : 1 - a; - return n.ordinalNumber(o, { - unit: "year" - }); - } - return tt.y(r, t); - }, - // Local week-numbering year - Y: function(r, t, n, a) { - var o = Cs(r, a), i = o > 0 ? o : 1 - o; - if (t === "YY") { - var u = i % 100; - return Ce(u, 2); - } - return t === "Yo" ? n.ordinalNumber(i, { - unit: "year" - }) : Ce(i, t.length); - }, - // ISO week-numbering year - R: function(r, t) { - var n = ks(r); - return Ce(n, t.length); - }, - // Extended year. This is a single number designating the year of this calendar system. - // The main difference between `y` and `u` localizers are B.C. years: - // | Year | `y` | `u` | - // |------|-----|-----| - // | AC 1 | 1 | 1 | - // | BC 1 | 1 | 0 | - // | BC 2 | 2 | -1 | - // Also `yy` always returns the last two digits of a year, - // while `uu` pads single digit years to 2 characters and returns other years unchanged. - u: function(r, t) { - var n = r.getUTCFullYear(); - return Ce(n, t.length); - }, - // Quarter - Q: function(r, t, n) { - var a = Math.ceil((r.getUTCMonth() + 1) / 3); - switch (t) { - case "Q": - return String(a); - case "QQ": - return Ce(a, 2); - case "Qo": - return n.ordinalNumber(a, { - unit: "quarter" - }); - case "QQQ": - return n.quarter(a, { - width: "abbreviated", - context: "formatting" - }); - case "QQQQQ": - return n.quarter(a, { - width: "narrow", - context: "formatting" - }); - case "QQQQ": - default: - return n.quarter(a, { - width: "wide", - context: "formatting" - }); - } - }, - // Stand-alone quarter - q: function(r, t, n) { - var a = Math.ceil((r.getUTCMonth() + 1) / 3); - switch (t) { - case "q": - return String(a); - case "qq": - return Ce(a, 2); - case "qo": - return n.ordinalNumber(a, { - unit: "quarter" - }); - case "qqq": - return n.quarter(a, { - width: "abbreviated", - context: "standalone" - }); - case "qqqqq": - return n.quarter(a, { - width: "narrow", - context: "standalone" - }); - case "qqqq": - default: - return n.quarter(a, { - width: "wide", - context: "standalone" - }); - } - }, - // Month - M: function(r, t, n) { - var a = r.getUTCMonth(); - switch (t) { - case "M": - case "MM": - return tt.M(r, t); - case "Mo": - return n.ordinalNumber(a + 1, { - unit: "month" - }); - case "MMM": - return n.month(a, { - width: "abbreviated", - context: "formatting" - }); - case "MMMMM": - return n.month(a, { - width: "narrow", - context: "formatting" - }); - case "MMMM": - default: - return n.month(a, { - width: "wide", - context: "formatting" - }); - } - }, - // Stand-alone month - L: function(r, t, n) { - var a = r.getUTCMonth(); - switch (t) { - case "L": - return String(a + 1); - case "LL": - return Ce(a + 1, 2); - case "Lo": - return n.ordinalNumber(a + 1, { - unit: "month" - }); - case "LLL": - return n.month(a, { - width: "abbreviated", - context: "standalone" - }); - case "LLLLL": - return n.month(a, { - width: "narrow", - context: "standalone" - }); - case "LLLL": - default: - return n.month(a, { - width: "wide", - context: "standalone" - }); - } - }, - // Local week of year - w: function(r, t, n, a) { - var o = Kc(r, a); - return t === "wo" ? n.ordinalNumber(o, { - unit: "week" - }) : Ce(o, t.length); - }, - // ISO week of year - I: function(r, t, n) { - var a = Gc(r); - return t === "Io" ? n.ordinalNumber(a, { - unit: "week" - }) : Ce(a, t.length); - }, - // Day of the month - d: function(r, t, n) { - return t === "do" ? n.ordinalNumber(r.getUTCDate(), { - unit: "date" - }) : tt.d(r, t); - }, - // Day of year - D: function(r, t, n) { - var a = Hc(r); - return t === "Do" ? n.ordinalNumber(a, { - unit: "dayOfYear" - }) : Ce(a, t.length); - }, - // Day of week - E: function(r, t, n) { - var a = r.getUTCDay(); - switch (t) { - case "E": - case "EE": - case "EEE": - return n.day(a, { - width: "abbreviated", - context: "formatting" - }); - case "EEEEE": - return n.day(a, { - width: "narrow", - context: "formatting" - }); - case "EEEEEE": - return n.day(a, { - width: "short", - context: "formatting" - }); - case "EEEE": - default: - return n.day(a, { - width: "wide", - context: "formatting" - }); - } - }, - // Local day of week - e: function(r, t, n, a) { - var o = r.getUTCDay(), i = (o - a.weekStartsOn + 8) % 7 || 7; - switch (t) { - case "e": - return String(i); - case "ee": - return Ce(i, 2); - case "eo": - return n.ordinalNumber(i, { - unit: "day" - }); - case "eee": - return n.day(o, { - width: "abbreviated", - context: "formatting" - }); - case "eeeee": - return n.day(o, { - width: "narrow", - context: "formatting" - }); - case "eeeeee": - return n.day(o, { - width: "short", - context: "formatting" - }); - case "eeee": - default: - return n.day(o, { - width: "wide", - context: "formatting" - }); - } - }, - // Stand-alone local day of week - c: function(r, t, n, a) { - var o = r.getUTCDay(), i = (o - a.weekStartsOn + 8) % 7 || 7; - switch (t) { - case "c": - return String(i); - case "cc": - return Ce(i, t.length); - case "co": - return n.ordinalNumber(i, { - unit: "day" - }); - case "ccc": - return n.day(o, { - width: "abbreviated", - context: "standalone" - }); - case "ccccc": - return n.day(o, { - width: "narrow", - context: "standalone" - }); - case "cccccc": - return n.day(o, { - width: "short", - context: "standalone" - }); - case "cccc": - default: - return n.day(o, { - width: "wide", - context: "standalone" - }); - } - }, - // ISO day of week - i: function(r, t, n) { - var a = r.getUTCDay(), o = a === 0 ? 7 : a; - switch (t) { - case "i": - return String(o); - case "ii": - return Ce(o, t.length); - case "io": - return n.ordinalNumber(o, { - unit: "day" - }); - case "iii": - return n.day(a, { - width: "abbreviated", - context: "formatting" - }); - case "iiiii": - return n.day(a, { - width: "narrow", - context: "formatting" - }); - case "iiiiii": - return n.day(a, { - width: "short", - context: "formatting" - }); - case "iiii": - default: - return n.day(a, { - width: "wide", - context: "formatting" - }); - } - }, - // AM or PM - a: function(r, t, n) { - var a = r.getUTCHours(), o = a / 12 >= 1 ? "pm" : "am"; - switch (t) { - case "a": - case "aa": - return n.dayPeriod(o, { - width: "abbreviated", - context: "formatting" - }); - case "aaa": - return n.dayPeriod(o, { - width: "abbreviated", - context: "formatting" - }).toLowerCase(); - case "aaaaa": - return n.dayPeriod(o, { - width: "narrow", - context: "formatting" - }); - case "aaaa": - default: - return n.dayPeriod(o, { - width: "wide", - context: "formatting" - }); - } - }, - // AM, PM, midnight, noon - b: function(r, t, n) { - var a = r.getUTCHours(), o; - switch (a === 12 ? o = Et.noon : a === 0 ? o = Et.midnight : o = a / 12 >= 1 ? "pm" : "am", t) { - case "b": - case "bb": - return n.dayPeriod(o, { - width: "abbreviated", - context: "formatting" - }); - case "bbb": - return n.dayPeriod(o, { - width: "abbreviated", - context: "formatting" - }).toLowerCase(); - case "bbbbb": - return n.dayPeriod(o, { - width: "narrow", - context: "formatting" - }); - case "bbbb": - default: - return n.dayPeriod(o, { - width: "wide", - context: "formatting" - }); - } - }, - // in the morning, in the afternoon, in the evening, at night - B: function(r, t, n) { - var a = r.getUTCHours(), o; - switch (a >= 17 ? o = Et.evening : a >= 12 ? o = Et.afternoon : a >= 4 ? o = Et.morning : o = Et.night, t) { - case "B": - case "BB": - case "BBB": - return n.dayPeriod(o, { - width: "abbreviated", - context: "formatting" - }); - case "BBBBB": - return n.dayPeriod(o, { - width: "narrow", - context: "formatting" - }); - case "BBBB": - default: - return n.dayPeriod(o, { - width: "wide", - context: "formatting" - }); - } - }, - // Hour [1-12] - h: function(r, t, n) { - if (t === "ho") { - var a = r.getUTCHours() % 12; - return a === 0 && (a = 12), n.ordinalNumber(a, { - unit: "hour" - }); - } - return tt.h(r, t); - }, - // Hour [0-23] - H: function(r, t, n) { - return t === "Ho" ? n.ordinalNumber(r.getUTCHours(), { - unit: "hour" - }) : tt.H(r, t); - }, - // Hour [0-11] - K: function(r, t, n) { - var a = r.getUTCHours() % 12; - return t === "Ko" ? n.ordinalNumber(a, { - unit: "hour" - }) : Ce(a, t.length); - }, - // Hour [1-24] - k: function(r, t, n) { - var a = r.getUTCHours(); - return a === 0 && (a = 24), t === "ko" ? n.ordinalNumber(a, { - unit: "hour" - }) : Ce(a, t.length); - }, - // Minute - m: function(r, t, n) { - return t === "mo" ? n.ordinalNumber(r.getUTCMinutes(), { - unit: "minute" - }) : tt.m(r, t); - }, - // Second - s: function(r, t, n) { - return t === "so" ? n.ordinalNumber(r.getUTCSeconds(), { - unit: "second" - }) : tt.s(r, t); - }, - // Fraction of second - S: function(r, t) { - return tt.S(r, t); - }, - // Timezone (ISO-8601. If offset is 0, output is always `'Z'`) - X: function(r, t, n, a) { - var o = a._originalDate || r, i = o.getTimezoneOffset(); - if (i === 0) - return "Z"; - switch (t) { - case "X": - return ri(i); - case "XXXX": - case "XX": - return ht(i); - case "XXXXX": - case "XXX": - default: - return ht(i, ":"); - } - }, - // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent) - x: function(r, t, n, a) { - var o = a._originalDate || r, i = o.getTimezoneOffset(); - switch (t) { - case "x": - return ri(i); - case "xxxx": - case "xx": - return ht(i); - case "xxxxx": - case "xxx": - default: - return ht(i, ":"); - } - }, - // Timezone (GMT) - O: function(r, t, n, a) { - var o = a._originalDate || r, i = o.getTimezoneOffset(); - switch (t) { - case "O": - case "OO": - case "OOO": - return "GMT" + ei(i, ":"); - case "OOOO": - default: - return "GMT" + ht(i, ":"); - } - }, - // Timezone (specific non-location) - z: function(r, t, n, a) { - var o = a._originalDate || r, i = o.getTimezoneOffset(); - switch (t) { - case "z": - case "zz": - case "zzz": - return "GMT" + ei(i, ":"); - case "zzzz": - default: - return "GMT" + ht(i, ":"); - } - }, - // Seconds timestamp - t: function(r, t, n, a) { - var o = a._originalDate || r, i = Math.floor(o.getTime() / 1e3); - return Ce(i, t.length); - }, - // Milliseconds timestamp - T: function(r, t, n, a) { - var o = a._originalDate || r, i = o.getTime(); - return Ce(i, t.length); - } -}; -function ei(e, r) { - var t = e > 0 ? "-" : "+", n = Math.abs(e), a = Math.floor(n / 60), o = n % 60; - if (o === 0) - return t + String(a); - var i = r || ""; - return t + String(a) + i + Ce(o, 2); -} -function ri(e, r) { - if (e % 60 === 0) { - var t = e > 0 ? "-" : "+"; - return t + Ce(Math.abs(e) / 60, 2); - } - return ht(e, r); -} -function ht(e, r) { - var t = r || "", n = e > 0 ? "-" : "+", a = Math.abs(e), o = Ce(Math.floor(a / 60), 2), i = Ce(a % 60, 2); - return n + o + t + i; -} -const ed = Zc; -var ti = function(r, t) { - switch (r) { - case "P": - return t.date({ - width: "short" - }); - case "PP": - return t.date({ - width: "medium" - }); - case "PPP": - return t.date({ - width: "long" - }); - case "PPPP": - default: - return t.date({ - width: "full" - }); - } -}, Ts = function(r, t) { - switch (r) { - case "p": - return t.time({ - width: "short" - }); - case "pp": - return t.time({ - width: "medium" - }); - case "ppp": - return t.time({ - width: "long" - }); - case "pppp": - default: - return t.time({ - width: "full" - }); - } -}, rd = function(r, t) { - var n = r.match(/(P+)(p+)?/) || [], a = n[1], o = n[2]; - if (!o) - return ti(r, t); - var i; - switch (a) { - case "P": - i = t.dateTime({ - width: "short" - }); - break; - case "PP": - i = t.dateTime({ - width: "medium" - }); - break; - case "PPP": - i = t.dateTime({ - width: "long" - }); - break; - case "PPPP": - default: - i = t.dateTime({ - width: "full" - }); - break; - } - return i.replace("{{date}}", ti(a, t)).replace("{{time}}", Ts(o, t)); -}, td = { - p: Ts, - P: rd -}; -const nd = td; -var ad = ["D", "DD"], od = ["YY", "YYYY"]; -function id(e) { - return ad.indexOf(e) !== -1; -} -function sd(e) { - return od.indexOf(e) !== -1; -} -function ni(e, r, t) { - if (e === "YYYY") - throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(r, "`) for formatting years to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md")); - if (e === "YY") - throw new RangeError("Use `yy` instead of `YY` (in `".concat(r, "`) for formatting years to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md")); - if (e === "D") - throw new RangeError("Use `d` instead of `D` (in `".concat(r, "`) for formatting days of the month to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md")); - if (e === "DD") - throw new RangeError("Use `dd` instead of `DD` (in `".concat(r, "`) for formatting days of the month to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md")); -} -var ld = { - lessThanXSeconds: { - one: "less than a second", - other: "less than {{count}} seconds" - }, - xSeconds: { - one: "1 second", - other: "{{count}} seconds" - }, - halfAMinute: "half a minute", - lessThanXMinutes: { - one: "less than a minute", - other: "less than {{count}} minutes" - }, - xMinutes: { - one: "1 minute", - other: "{{count}} minutes" - }, - aboutXHours: { - one: "about 1 hour", - other: "about {{count}} hours" - }, - xHours: { - one: "1 hour", - other: "{{count}} hours" - }, - xDays: { - one: "1 day", - other: "{{count}} days" - }, - aboutXWeeks: { - one: "about 1 week", - other: "about {{count}} weeks" - }, - xWeeks: { - one: "1 week", - other: "{{count}} weeks" - }, - aboutXMonths: { - one: "about 1 month", - other: "about {{count}} months" - }, - xMonths: { - one: "1 month", - other: "{{count}} months" - }, - aboutXYears: { - one: "about 1 year", - other: "about {{count}} years" - }, - xYears: { - one: "1 year", - other: "{{count}} years" - }, - overXYears: { - one: "over 1 year", - other: "over {{count}} years" - }, - almostXYears: { - one: "almost 1 year", - other: "almost {{count}} years" - } -}, cd = function(r, t, n) { - var a, o = ld[r]; - return typeof o == "string" ? a = o : t === 1 ? a = o.one : a = o.other.replace("{{count}}", t.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + a : a + " ago" : a; -}; -const dd = cd; -function Pa(e) { - return function() { - var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = r.width ? String(r.width) : e.defaultWidth, n = e.formats[t] || e.formats[e.defaultWidth]; - return n; - }; -} -var ud = { - full: "EEEE, MMMM do, y", - long: "MMMM do, y", - medium: "MMM d, y", - short: "MM/dd/yyyy" -}, fd = { - full: "h:mm:ss a zzzz", - long: "h:mm:ss a z", - medium: "h:mm:ss a", - short: "h:mm a" -}, md = { - full: "{{date}} 'at' {{time}}", - long: "{{date}} 'at' {{time}}", - medium: "{{date}}, {{time}}", - short: "{{date}}, {{time}}" -}, hd = { - date: Pa({ - formats: ud, - defaultWidth: "full" - }), - time: Pa({ - formats: fd, - defaultWidth: "full" - }), - dateTime: Pa({ - formats: md, - defaultWidth: "full" - }) -}; -const vd = hd; -var gd = { - lastWeek: "'last' eeee 'at' p", - yesterday: "'yesterday at' p", - today: "'today at' p", - tomorrow: "'tomorrow at' p", - nextWeek: "eeee 'at' p", - other: "P" -}, bd = function(r, t, n, a) { - return gd[r]; -}; -const pd = bd; -function Jt(e) { - return function(r, t) { - var n = t != null && t.context ? String(t.context) : "standalone", a; - if (n === "formatting" && e.formattingValues) { - var o = e.defaultFormattingWidth || e.defaultWidth, i = t != null && t.width ? String(t.width) : o; - a = e.formattingValues[i] || e.formattingValues[o]; - } else { - var u = e.defaultWidth, h = t != null && t.width ? String(t.width) : e.defaultWidth; - a = e.values[h] || e.values[u]; - } - var v = e.argumentCallback ? e.argumentCallback(r) : r; - return a[v]; - }; -} -var yd = { - narrow: ["B", "A"], - abbreviated: ["BC", "AD"], - wide: ["Before Christ", "Anno Domini"] -}, Sd = { - narrow: ["1", "2", "3", "4"], - abbreviated: ["Q1", "Q2", "Q3", "Q4"], - wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"] -}, xd = { - narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], - abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], - wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] -}, _d = { - narrow: ["S", "M", "T", "W", "T", "F", "S"], - short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], - abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], - wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] -}, wd = { - narrow: { - am: "a", - pm: "p", - midnight: "mi", - noon: "n", - morning: "morning", - afternoon: "afternoon", - evening: "evening", - night: "night" - }, - abbreviated: { - am: "AM", - pm: "PM", - midnight: "midnight", - noon: "noon", - morning: "morning", - afternoon: "afternoon", - evening: "evening", - night: "night" - }, - wide: { - am: "a.m.", - pm: "p.m.", - midnight: "midnight", - noon: "noon", - morning: "morning", - afternoon: "afternoon", - evening: "evening", - night: "night" - } -}, kd = { - narrow: { - am: "a", - pm: "p", - midnight: "mi", - noon: "n", - morning: "in the morning", - afternoon: "in the afternoon", - evening: "in the evening", - night: "at night" - }, - abbreviated: { - am: "AM", - pm: "PM", - midnight: "midnight", - noon: "noon", - morning: "in the morning", - afternoon: "in the afternoon", - evening: "in the evening", - night: "at night" - }, - wide: { - am: "a.m.", - pm: "p.m.", - midnight: "midnight", - noon: "noon", - morning: "in the morning", - afternoon: "in the afternoon", - evening: "in the evening", - night: "at night" - } -}, Cd = function(r, t) { - var n = Number(r), a = n % 100; - if (a > 20 || a < 10) - switch (a % 10) { - case 1: - return n + "st"; - case 2: - return n + "nd"; - case 3: - return n + "rd"; - } - return n + "th"; -}, Td = { - ordinalNumber: Cd, - era: Jt({ - values: yd, - defaultWidth: "wide" - }), - quarter: Jt({ - values: Sd, - defaultWidth: "wide", - argumentCallback: function(r) { - return r - 1; - } - }), - month: Jt({ - values: xd, - defaultWidth: "wide" - }), - day: Jt({ - values: _d, - defaultWidth: "wide" - }), - dayPeriod: Jt({ - values: wd, - defaultWidth: "wide", - formattingValues: kd, - defaultFormattingWidth: "wide" - }) -}; -const Ed = Td; -function Zt(e) { - return function(r) { - var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.width, a = n && e.matchPatterns[n] || e.matchPatterns[e.defaultMatchWidth], o = r.match(a); - if (!o) - return null; - var i = o[0], u = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], h = Array.isArray(u) ? Rd(u, function(b) { - return b.test(i); - }) : $d(u, function(b) { - return b.test(i); - }), v; - v = e.valueCallback ? e.valueCallback(h) : h, v = t.valueCallback ? t.valueCallback(v) : v; - var S = r.slice(i.length); - return { - value: v, - rest: S - }; - }; -} -function $d(e, r) { - for (var t in e) - if (e.hasOwnProperty(t) && r(e[t])) - return t; -} -function Rd(e, r) { - for (var t = 0; t < e.length; t++) - if (r(e[t])) - return t; -} -function Pd(e) { - return function(r) { - var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = r.match(e.matchPattern); - if (!n) - return null; - var a = n[0], o = r.match(e.parsePattern); - if (!o) - return null; - var i = e.valueCallback ? e.valueCallback(o[0]) : o[0]; - i = t.valueCallback ? t.valueCallback(i) : i; - var u = r.slice(a.length); - return { - value: i, - rest: u - }; - }; -} -var Fd = /^(\d+)(th|st|nd|rd)?/i, Ad = /\d+/i, Nd = { - narrow: /^(b|a)/i, - abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i, - wide: /^(before christ|before common era|anno domini|common era)/i -}, Dd = { - any: [/^b/i, /^(a|c)/i] -}, zd = { - narrow: /^[1234]/i, - abbreviated: /^q[1234]/i, - wide: /^[1234](th|st|nd|rd)? quarter/i -}, Od = { - any: [/1/i, /2/i, /3/i, /4/i] -}, Id = { - narrow: /^[jfmasond]/i, - abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i, - wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i -}, Bd = { - narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i], - any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i] -}, Md = { - narrow: /^[smtwf]/i, - short: /^(su|mo|tu|we|th|fr|sa)/i, - abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i, - wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i -}, Wd = { - narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i], - any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i] -}, Ld = { - narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i, - any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i -}, jd = { - any: { - am: /^a/i, - pm: /^p/i, - midnight: /^mi/i, - noon: /^no/i, - morning: /morning/i, - afternoon: /afternoon/i, - evening: /evening/i, - night: /night/i - } -}, Vd = { - ordinalNumber: Pd({ - matchPattern: Fd, - parsePattern: Ad, - valueCallback: function(r) { - return parseInt(r, 10); - } - }), - era: Zt({ - matchPatterns: Nd, - defaultMatchWidth: "wide", - parsePatterns: Dd, - defaultParseWidth: "any" - }), - quarter: Zt({ - matchPatterns: zd, - defaultMatchWidth: "wide", - parsePatterns: Od, - defaultParseWidth: "any", - valueCallback: function(r) { - return r + 1; - } - }), - month: Zt({ - matchPatterns: Id, - defaultMatchWidth: "wide", - parsePatterns: Bd, - defaultParseWidth: "any" - }), - day: Zt({ - matchPatterns: Md, - defaultMatchWidth: "wide", - parsePatterns: Wd, - defaultParseWidth: "any" - }), - dayPeriod: Zt({ - matchPatterns: Ld, - defaultMatchWidth: "any", - parsePatterns: jd, - defaultParseWidth: "any" - }) -}; -const Ud = Vd; -var Hd = { - code: "en-US", - formatDistance: dd, - formatLong: vd, - formatRelative: pd, - localize: Ed, - match: Ud, - options: { - weekStartsOn: 0, - firstWeekContainsDate: 1 - } -}; -const Yd = Hd; -var qd = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Gd = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Xd = /^'([^]*?)'?$/, Qd = /''/g, Kd = /[a-zA-Z]/; -function ai(e, r, t) { - var n, a, o, i, u, h, v, S, b, _, C, R, Y, L, O, w, q, ie; - lr(2, arguments); - var M = String(r), Q = ma(), K = (n = (a = t == null ? void 0 : t.locale) !== null && a !== void 0 ? a : Q.locale) !== null && n !== void 0 ? n : Yd, re = _t((o = (i = (u = (h = t == null ? void 0 : t.firstWeekContainsDate) !== null && h !== void 0 ? h : t == null || (v = t.locale) === null || v === void 0 || (S = v.options) === null || S === void 0 ? void 0 : S.firstWeekContainsDate) !== null && u !== void 0 ? u : Q.firstWeekContainsDate) !== null && i !== void 0 ? i : (b = Q.locale) === null || b === void 0 || (_ = b.options) === null || _ === void 0 ? void 0 : _.firstWeekContainsDate) !== null && o !== void 0 ? o : 1); - if (!(re >= 1 && re <= 7)) - throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively"); - var fe = _t((C = (R = (Y = (L = t == null ? void 0 : t.weekStartsOn) !== null && L !== void 0 ? L : t == null || (O = t.locale) === null || O === void 0 || (w = O.options) === null || w === void 0 ? void 0 : w.weekStartsOn) !== null && Y !== void 0 ? Y : Q.weekStartsOn) !== null && R !== void 0 ? R : (q = Q.locale) === null || q === void 0 || (ie = q.options) === null || ie === void 0 ? void 0 : ie.weekStartsOn) !== null && C !== void 0 ? C : 0); - if (!(fe >= 0 && fe <= 6)) - throw new RangeError("weekStartsOn must be between 0 and 6 inclusively"); - if (!K.localize) - throw new RangeError("locale must contain localize property"); - if (!K.formatLong) - throw new RangeError("locale must contain formatLong property"); - var Ee = Lr(e); - if (!jc(Ee)) - throw new RangeError("Invalid time value"); - var me = Wc(Ee), J = Vc(Ee, me), I = { - firstWeekContainsDate: re, - weekStartsOn: fe, - locale: K, - _originalDate: Ee - }, Z = M.match(Gd).map(function(ee) { - var se = ee[0]; - if (se === "p" || se === "P") { - var ye = nd[se]; - return ye(ee, K.formatLong); - } - return ee; - }).join("").match(qd).map(function(ee) { - if (ee === "''") - return "'"; - var se = ee[0]; - if (se === "'") - return Jd(ee); - var ye = ed[se]; - if (ye) - return !(t != null && t.useAdditionalWeekYearTokens) && sd(ee) && ni(ee, r, String(e)), !(t != null && t.useAdditionalDayOfYearTokens) && id(ee) && ni(ee, r, String(e)), ye(J, ee, K.localize, I); - if (se.match(Kd)) - throw new RangeError("Format string contains an unescaped latin alphabet character `" + se + "`"); - return ee; - }).join(""); - return Z; -} -function Jd(e) { - var r = e.match(Xd); - return r ? r[1].replace(Qd, "'") : e; -} -const Es = ve((e, r) => { - const { election: t } = lt(), n = ir("ElectionTitle", e), a = sr(e); - return t ? /* @__PURE__ */ U(ne.h1, { ref: r, ...a, __css: n, children: t.title.default }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/parts.tsx", - lineNumber: 26, - columnNumber: 5 - }, globalThis) : null; -}); -Es.displayName = "ElectionTitle"; -const Zd = (e) => { - const r = ir("ElectionHeader", e), { election: t } = lt(); - return !t || t && !t.header ? null : /* @__PURE__ */ U(So, { src: t.header, sx: r, ...e }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/parts.tsx", - lineNumber: 39, - columnNumber: 10 - }, globalThis); -}, eu = (e) => { - const r = ir("ElectionDescription", e), { election: t } = lt(); - return !t || t && !t.description ? null : /* @__PURE__ */ U(fa, { ...e, sx: r, children: t.description.default }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/parts.tsx", - lineNumber: 49, - columnNumber: 5 - }, globalThis); -}, $s = ve(({ format: e, ...r }, t) => { - const n = Mr("ElectionSchedule", r), { election: a } = lt(); - let o = e; - return o || (o = "d-L-y HH:mm"), a ? /* @__PURE__ */ U(ne.h2, { __css: n, ...r, children: [ - "Voting period ", - ai(new Date(a.startDate), o), - " ~ ", - ai(new Date(a.endDate), o) - ] }, void 0, !0, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/parts.tsx", - lineNumber: 71, - columnNumber: 5 - }, globalThis) : null; -}); -$s.displayName = "ElectionSchedule"; -const ru = (e) => { - const { election: r, trans: t } = lt(); - if (!r) - return null; - const n = { - PROCESS_UNKNOWN: "Unknown", - UPCOMING: "Upcoming", - ONGOING: "Ongoing", - ENDED: "Ended", - CANCELED: "Canceled", - PAUSED: "Paused", - RESULTS: "Results" - }; - let { colorScheme: a } = e; - return a || (a = "green", [on.PAUSED, on.ENDED].includes(r.status) && (a = "yellow"), [on.CANCELED, on.PROCESS_UNKNOWN].includes(r.status) && (a = "red")), /* @__PURE__ */ U(yo, { sx: { textTransform: "capitalize" }, colorScheme: a, ...e, children: t(r.status, n[r.status]) }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/parts.tsx", - lineNumber: 107, - columnNumber: 5 - }, globalThis); -}; -function tu(e) { - return /* @__PURE__ */ N(Zr, { viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ N( - "path", - { - fill: "currentColor", - d: "M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z" - } - ) }); -} -function nu(e) { - return /* @__PURE__ */ N(Zr, { viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ N( - "path", - { - fill: "currentColor", - d: "M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z" - } - ) }); -} -function oi(e) { - return /* @__PURE__ */ N(Zr, { viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ N( - "path", - { - fill: "currentColor", - d: "M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z" - } - ) }); -} -var au = tc({ - "0%": { - transform: "rotate(0deg)" - }, - "100%": { - transform: "rotate(360deg)" - } -}), wo = ve((e, r) => { - const t = ir("Spinner", e), { - label: n = "Loading...", - thickness: a = "2px", - speed: o = "0.45s", - emptyColor: i = "transparent", - className: u, - ...h - } = sr(e), v = qe("chakra-spinner", u), S = { - display: "inline-block", - borderColor: "currentColor", - borderStyle: "solid", - borderRadius: "99999px", - borderWidth: a, - borderBottomColor: i, - borderLeftColor: i, - animation: `${au} ${o} linear infinite`, - ...t - }; - return /* @__PURE__ */ N( - ne.div, - { - ref: r, - __css: S, - className: v, - ...h, - children: n && /* @__PURE__ */ N(ne.span, { srOnly: !0, children: n }) - } - ); -}); -wo.displayName = "Spinner"; -var [ou, iu] = Wr({ - name: "AlertContext", - hookName: "useAlertContext", - providerName: "" -}), [su, lu] = Wr({ - name: "AlertStylesContext", - hookName: "useAlertStyles", - providerName: "" -}), Rs = { - info: { icon: nu, colorScheme: "blue" }, - warning: { icon: oi, colorScheme: "orange" }, - success: { icon: tu, colorScheme: "green" }, - error: { icon: oi, colorScheme: "red" }, - loading: { icon: wo, colorScheme: "blue" } -}; -function cu(e) { - return Rs[e].colorScheme; -} -function du(e) { - return Rs[e].icon; -} -function ro(e) { - const { status: r } = iu(), t = du(r), n = lu(), a = r === "loading" ? n.spinner : n.icon; - return /* @__PURE__ */ N( - ne.span, - { - display: "inherit", - "data-status": r, - ...e, - className: qe("chakra-alert__icon", e.className), - __css: a, - children: e.children || /* @__PURE__ */ N(t, { h: "100%", w: "100%" }) - } - ); -} -ro.displayName = "AlertIcon"; -var jn = ve(function(r, t) { - var n; - const { status: a = "info", addRole: o = !0, ...i } = sr(r), u = (n = r.colorScheme) != null ? n : cu(a), h = Mr("Alert", { ...r, colorScheme: u }), v = { - width: "100%", - display: "flex", - alignItems: "center", - position: "relative", - overflow: "hidden", - ...h.container - }; - return /* @__PURE__ */ N(ou, { value: { status: a }, children: /* @__PURE__ */ N(su, { value: h, children: /* @__PURE__ */ N( - ne.div, - { - "data-status": a, - role: o ? "alert" : void 0, - ref: t, - ...i, - className: qe("chakra-alert", r.className), - __css: v - } - ) }) }); -}); -jn.displayName = "Alert"; -var xn = (e) => e.type === "checkbox", Ft = (e) => e instanceof Date, nr = (e) => e == null; -const Ps = (e) => typeof e == "object"; -var Ue = (e) => !nr(e) && !Array.isArray(e) && Ps(e) && !Ft(e), Fs = (e) => Ue(e) && e.target ? xn(e.target) ? e.target.checked : e.target.value : e, uu = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, As = (e, r) => e.has(uu(r)), fu = (e) => { - const r = e.constructor && e.constructor.prototype; - return Ue(r) && r.hasOwnProperty("isPrototypeOf"); -}, ko = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u"; -function qr(e) { - let r; - const t = Array.isArray(e); - if (e instanceof Date) - r = new Date(e); - else if (e instanceof Set) - r = new Set(e); - else if (!(ko && (e instanceof Blob || e instanceof FileList)) && (t || Ue(e))) - if (r = t ? [] : {}, !Array.isArray(e) && !fu(e)) - r = e; - else - for (const n in e) - r[n] = qr(e[n]); - else - return e; - return r; -} -var _n = (e) => Array.isArray(e) ? e.filter(Boolean) : [], Le = (e) => e === void 0, z = (e, r, t) => { - if (!r || !Ue(e)) - return t; - const n = _n(r.split(/[,[\].]+?/)).reduce((a, o) => nr(a) ? a : a[o], e); - return Le(n) || n === e ? Le(e[r]) ? t : e[r] : n; -}; -const Jn = { - BLUR: "blur", - FOCUS_OUT: "focusout", - CHANGE: "change" -}, Rr = { - onBlur: "onBlur", - onChange: "onChange", - onSubmit: "onSubmit", - onTouched: "onTouched", - all: "all" -}, Hr = { - max: "max", - min: "min", - maxLength: "maxLength", - minLength: "minLength", - pattern: "pattern", - required: "required", - validate: "validate" -}, Ns = Be.createContext(null), ha = () => Be.useContext(Ns), mu = (e) => { - const { children: r, ...t } = e; - return Be.createElement(Ns.Provider, { value: t }, r); -}; -var Ds = (e, r, t, n = !0) => { - const a = { - defaultValues: r._defaultValues - }; - for (const o in e) - Object.defineProperty(a, o, { - get: () => { - const i = o; - return r._proxyFormState[i] !== Rr.all && (r._proxyFormState[i] = !n || Rr.all), t && (t[i] = !0), e[i]; - } - }); - return a; -}, Cr = (e) => Ue(e) && !Object.keys(e).length, zs = (e, r, t, n) => { - t(e); - const { name: a, ...o } = e; - return Cr(o) || Object.keys(o).length >= Object.keys(r).length || Object.keys(o).find((i) => r[i] === (!n || Rr.all)); -}, Vn = (e) => Array.isArray(e) ? e : [e], Os = (e, r, t) => t && r ? e === r : !e || !r || e === r || Vn(e).some((n) => n && (n.startsWith(r) || r.startsWith(n))); -function Co(e) { - const r = Be.useRef(e); - r.current = e, Be.useEffect(() => { - const t = !e.disabled && r.current.subject && r.current.subject.subscribe({ - next: r.current.next - }); - return () => { - t && t.unsubscribe(); - }; - }, [e.disabled]); -} -function hu(e) { - const r = ha(), { control: t = r.control, disabled: n, name: a, exact: o } = e || {}, [i, u] = Be.useState(t._formState), h = Be.useRef(!0), v = Be.useRef({ - isDirty: !1, - isLoading: !1, - dirtyFields: !1, - touchedFields: !1, - isValidating: !1, - isValid: !1, - errors: !1 - }), S = Be.useRef(a); - return S.current = a, Co({ - disabled: n, - next: (b) => h.current && Os(S.current, b.name, o) && zs(b, v.current, t._updateFormState) && u({ - ...t._formState, - ...b - }), - subject: t._subjects.state - }), Be.useEffect(() => (h.current = !0, v.current.isValid && t._updateValid(!0), () => { - h.current = !1; - }), [t]), Ds(i, t, v.current, !1); -} -var Ir = (e) => typeof e == "string", Is = (e, r, t, n, a) => Ir(e) ? (n && r.watch.add(e), z(t, e, a)) : Array.isArray(e) ? e.map((o) => (n && r.watch.add(o), z(t, o))) : (n && (r.watchAll = !0), t); -function vu(e) { - const r = ha(), { control: t = r.control, name: n, defaultValue: a, disabled: o, exact: i } = e || {}, u = Be.useRef(n); - u.current = n, Co({ - disabled: o, - subject: t._subjects.values, - next: (S) => { - Os(u.current, S.name, i) && v(qr(Is(u.current, t._names, S.values || t._formValues, !1, a))); - } - }); - const [h, v] = Be.useState(t._getWatch(n, a)); - return Be.useEffect(() => t._removeUnmounted()), h; -} -var To = (e) => /^\w*$/.test(e), Bs = (e) => _n(e.replace(/["|']|\]/g, "").split(/\.|\[/)); -function Fe(e, r, t) { - let n = -1; - const a = To(r) ? [r] : Bs(r), o = a.length, i = o - 1; - for (; ++n < o; ) { - const u = a[n]; - let h = t; - if (n !== i) { - const v = e[u]; - h = Ue(v) || Array.isArray(v) ? v : isNaN(+a[n + 1]) ? {} : []; - } - e[u] = h, e = e[u]; - } - return e; -} -function gu(e) { - const r = ha(), { name: t, control: n = r.control, shouldUnregister: a } = e, o = As(n._names.array, t), i = vu({ - control: n, - name: t, - defaultValue: z(n._formValues, t, z(n._defaultValues, t, e.defaultValue)), - exact: !0 - }), u = hu({ - control: n, - name: t - }), h = Be.useRef(n.register(t, { - ...e.rules, - value: i - })); - return Be.useEffect(() => { - const v = n._options.shouldUnregister || a, S = (b, _) => { - const C = z(n._fields, b); - C && (C._f.mount = _); - }; - if (S(t, !0), v) { - const b = qr(z(n._options.defaultValues, t)); - Fe(n._defaultValues, t, b), Le(z(n._formValues, t)) && Fe(n._formValues, t, b); - } - return () => { - (o ? v && !n._state.action : v) ? n.unregister(t) : S(t, !1); - }; - }, [t, n, o, a]), { - field: { - name: t, - value: i, - onChange: Be.useCallback((v) => h.current.onChange({ - target: { - value: Fs(v), - name: t - }, - type: Jn.CHANGE - }), [t]), - onBlur: Be.useCallback(() => h.current.onBlur({ - target: { - value: z(n._formValues, t), - name: t - }, - type: Jn.BLUR - }), [t, n]), - ref: (v) => { - const S = z(n._fields, t); - S && v && (S._f.ref = { - focus: () => v.focus(), - select: () => v.select(), - setCustomValidity: (b) => v.setCustomValidity(b), - reportValidity: () => v.reportValidity() - }); - } - }, - formState: u, - fieldState: Object.defineProperties({}, { - invalid: { - enumerable: !0, - get: () => !!z(u.errors, t) - }, - isDirty: { - enumerable: !0, - get: () => !!z(u.dirtyFields, t) - }, - isTouched: { - enumerable: !0, - get: () => !!z(u.touchedFields, t) - }, - error: { - enumerable: !0, - get: () => z(u.errors, t) - } - }) - }; -} -const bu = (e) => e.render(gu(e)); -var pu = (e, r, t, n, a) => r ? { - ...t[e], - types: { - ...t[e] && t[e].types ? t[e].types : {}, - [n]: a || !0 - } -} : {}; -const to = (e, r, t) => { - for (const n of t || Object.keys(e)) { - const a = z(e, n); - if (a) { - const { _f: o, ...i } = a; - if (o && r(o.name)) { - if (o.ref.focus) { - o.ref.focus(); - break; - } else if (o.refs && o.refs[0].focus) { - o.refs[0].focus(); - break; - } - } else - Ue(i) && to(i, r); - } - } -}; -var ii = (e) => ({ - isOnSubmit: !e || e === Rr.onSubmit, - isOnBlur: e === Rr.onBlur, - isOnChange: e === Rr.onChange, - isOnAll: e === Rr.all, - isOnTouch: e === Rr.onTouched -}), si = (e, r, t) => !t && (r.watchAll || r.watch.has(e) || [...r.watch].some((n) => e.startsWith(n) && /^\.\w+/.test(e.slice(n.length)))), yu = (e, r, t) => { - const n = _n(z(e, t)); - return Fe(n, "root", r[t]), Fe(e, t, n), e; -}, Dt = (e) => typeof e == "boolean", Eo = (e) => e.type === "file", st = (e) => typeof e == "function", Zn = (e) => { - if (!ko) - return !1; - const r = e ? e.ownerDocument : 0; - return e instanceof (r && r.defaultView ? r.defaultView.HTMLElement : HTMLElement); -}, Un = (e) => Ir(e), $o = (e) => e.type === "radio", ea = (e) => e instanceof RegExp; -const li = { - value: !1, - isValid: !1 -}, ci = { value: !0, isValid: !0 }; -var Ms = (e) => { - if (Array.isArray(e)) { - if (e.length > 1) { - const r = e.filter((t) => t && t.checked && !t.disabled).map((t) => t.value); - return { value: r, isValid: !!r.length }; - } - return e[0].checked && !e[0].disabled ? ( - // @ts-expect-error expected to work in the browser - e[0].attributes && !Le(e[0].attributes.value) ? Le(e[0].value) || e[0].value === "" ? ci : { value: e[0].value, isValid: !0 } : ci - ) : li; - } - return li; -}; -const di = { - isValid: !1, - value: null -}; -var Ws = (e) => Array.isArray(e) ? e.reduce((r, t) => t && t.checked && !t.disabled ? { - isValid: !0, - value: t.value -} : r, di) : di; -function ui(e, r, t = "validate") { - if (Un(e) || Array.isArray(e) && e.every(Un) || Dt(e) && !e) - return { - type: t, - message: Un(e) ? e : "", - ref: r - }; -} -var $t = (e) => Ue(e) && !ea(e) ? e : { - value: e, - message: "" -}, fi = async (e, r, t, n, a) => { - const { ref: o, refs: i, required: u, maxLength: h, minLength: v, min: S, max: b, pattern: _, validate: C, name: R, valueAsNumber: Y, mount: L, disabled: O } = e._f, w = z(r, R); - if (!L || O) - return {}; - const q = i ? i[0] : o, ie = (J) => { - n && q.reportValidity && (q.setCustomValidity(Dt(J) ? "" : J || ""), q.reportValidity()); - }, M = {}, Q = $o(o), K = xn(o), re = Q || K, fe = (Y || Eo(o)) && Le(o.value) && Le(w) || Zn(o) && o.value === "" || w === "" || Array.isArray(w) && !w.length, Ee = pu.bind(null, R, t, M), me = (J, I, Z, ee = Hr.maxLength, se = Hr.minLength) => { - const ye = J ? I : Z; - M[R] = { - type: J ? ee : se, - message: ye, - ref: o, - ...Ee(J ? ee : se, ye) - }; - }; - if (a ? !Array.isArray(w) || !w.length : u && (!re && (fe || nr(w)) || Dt(w) && !w || K && !Ms(i).isValid || Q && !Ws(i).isValid)) { - const { value: J, message: I } = Un(u) ? { value: !!u, message: u } : $t(u); - if (J && (M[R] = { - type: Hr.required, - message: I, - ref: q, - ...Ee(Hr.required, I) - }, !t)) - return ie(I), M; - } - if (!fe && (!nr(S) || !nr(b))) { - let J, I; - const Z = $t(b), ee = $t(S); - if (!nr(w) && !isNaN(w)) { - const se = o.valueAsNumber || w && +w; - nr(Z.value) || (J = se > Z.value), nr(ee.value) || (I = se < ee.value); - } else { - const se = o.valueAsDate || new Date(w), ye = (Me) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + Me), Ye = o.type == "time", Ve = o.type == "week"; - Ir(Z.value) && w && (J = Ye ? ye(w) > ye(Z.value) : Ve ? w > Z.value : se > new Date(Z.value)), Ir(ee.value) && w && (I = Ye ? ye(w) < ye(ee.value) : Ve ? w < ee.value : se < new Date(ee.value)); - } - if ((J || I) && (me(!!J, Z.message, ee.message, Hr.max, Hr.min), !t)) - return ie(M[R].message), M; - } - if ((h || v) && !fe && (Ir(w) || a && Array.isArray(w))) { - const J = $t(h), I = $t(v), Z = !nr(J.value) && w.length > +J.value, ee = !nr(I.value) && w.length < +I.value; - if ((Z || ee) && (me(Z, J.message, I.message), !t)) - return ie(M[R].message), M; - } - if (_ && !fe && Ir(w)) { - const { value: J, message: I } = $t(_); - if (ea(J) && !w.match(J) && (M[R] = { - type: Hr.pattern, - message: I, - ref: o, - ...Ee(Hr.pattern, I) - }, !t)) - return ie(I), M; - } - if (C) { - if (st(C)) { - const J = await C(w, r), I = ui(J, q); - if (I && (M[R] = { - ...I, - ...Ee(Hr.validate, I.message) - }, !t)) - return ie(I.message), M; - } else if (Ue(C)) { - let J = {}; - for (const I in C) { - if (!Cr(J) && !t) - break; - const Z = ui(await C[I](w, r), q, I); - Z && (J = { - ...Z, - ...Ee(I, Z.message) - }, ie(Z.message), t && (M[R] = J)); - } - if (!Cr(J) && (M[R] = { - ref: q, - ...J - }, !t)) - return M; - } - } - return ie(!0), M; -}; -function Su(e, r) { - const t = r.slice(0, -1).length; - let n = 0; - for (; n < t; ) - e = Le(e) ? n++ : e[r[n++]]; - return e; -} -function xu(e) { - for (const r in e) - if (!Le(e[r])) - return !1; - return !0; -} -function Qe(e, r) { - const t = Array.isArray(r) ? r : To(r) ? [r] : Bs(r), n = t.length === 1 ? e : Su(e, t), a = t.length - 1, o = t[a]; - return n && delete n[o], a !== 0 && (Ue(n) && Cr(n) || Array.isArray(n) && xu(n)) && Qe(e, t.slice(0, -1)), e; -} -function Fa() { - let e = []; - return { - get observers() { - return e; - }, - next: (a) => { - for (const o of e) - o.next && o.next(a); - }, - subscribe: (a) => (e.push(a), { - unsubscribe: () => { - e = e.filter((o) => o !== a); - } - }), - unsubscribe: () => { - e = []; - } - }; -} -var ra = (e) => nr(e) || !Ps(e); -function gt(e, r) { - if (ra(e) || ra(r)) - return e === r; - if (Ft(e) && Ft(r)) - return e.getTime() === r.getTime(); - const t = Object.keys(e), n = Object.keys(r); - if (t.length !== n.length) - return !1; - for (const a of t) { - const o = e[a]; - if (!n.includes(a)) - return !1; - if (a !== "ref") { - const i = r[a]; - if (Ft(o) && Ft(i) || Ue(o) && Ue(i) || Array.isArray(o) && Array.isArray(i) ? !gt(o, i) : o !== i) - return !1; - } - } - return !0; -} -var Ls = (e) => e.type === "select-multiple", _u = (e) => $o(e) || xn(e), Aa = (e) => Zn(e) && e.isConnected, js = (e) => { - for (const r in e) - if (st(e[r])) - return !0; - return !1; -}; -function ta(e, r = {}) { - const t = Array.isArray(e); - if (Ue(e) || t) - for (const n in e) - Array.isArray(e[n]) || Ue(e[n]) && !js(e[n]) ? (r[n] = Array.isArray(e[n]) ? [] : {}, ta(e[n], r[n])) : nr(e[n]) || (r[n] = !0); - return r; -} -function Vs(e, r, t) { - const n = Array.isArray(e); - if (Ue(e) || n) - for (const a in e) - Array.isArray(e[a]) || Ue(e[a]) && !js(e[a]) ? Le(r) || ra(t[a]) ? t[a] = Array.isArray(e[a]) ? ta(e[a], []) : { ...ta(e[a]) } : Vs(e[a], nr(r) ? {} : r[a], t[a]) : t[a] = !gt(e[a], r[a]); - return t; -} -var Na = (e, r) => Vs(e, r, ta(r)), Us = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: n }) => Le(e) ? e : r ? e === "" ? NaN : e && +e : t && Ir(e) ? new Date(e) : n ? n(e) : e; -function Da(e) { - const r = e.ref; - if (!(e.refs ? e.refs.every((t) => t.disabled) : r.disabled)) - return Eo(r) ? r.files : $o(r) ? Ws(e.refs).value : Ls(r) ? [...r.selectedOptions].map(({ value: t }) => t) : xn(r) ? Ms(e.refs).value : Us(Le(r.value) ? e.ref.value : r.value, e); -} -var wu = (e, r, t, n) => { - const a = {}; - for (const o of e) { - const i = z(r, o); - i && Fe(a, o, i._f); - } - return { - criteriaMode: t, - names: [...e], - fields: a, - shouldUseNativeValidation: n - }; -}, en = (e) => Le(e) ? e : ea(e) ? e.source : Ue(e) ? ea(e.value) ? e.value.source : e.value : e, ku = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate); -function mi(e, r, t) { - const n = z(e, t); - if (n || To(t)) - return { - error: n, - name: t - }; - const a = t.split("."); - for (; a.length; ) { - const o = a.join("."), i = z(r, o), u = z(e, o); - if (i && !Array.isArray(i) && t !== o) - return { name: t }; - if (u && u.type) - return { - name: o, - error: u - }; - a.pop(); - } - return { - name: t - }; -} -var Cu = (e, r, t, n, a) => a.isOnAll ? !1 : !t && a.isOnTouch ? !(r || e) : (t ? n.isOnBlur : a.isOnBlur) ? !e : (t ? n.isOnChange : a.isOnChange) ? e : !0, Tu = (e, r) => !_n(z(e, r)).length && Qe(e, r); -const Eu = { - mode: Rr.onSubmit, - reValidateMode: Rr.onChange, - shouldFocusError: !0 -}; -function $u(e = {}, r) { - let t = { - ...Eu, - ...e - }, n = { - submitCount: 0, - isDirty: !1, - isLoading: st(t.defaultValues), - isValidating: !1, - isSubmitted: !1, - isSubmitting: !1, - isSubmitSuccessful: !1, - isValid: !1, - touchedFields: {}, - dirtyFields: {}, - errors: {} - }, a = {}, o = Ue(t.defaultValues) || Ue(t.values) ? qr(t.defaultValues || t.values) || {} : {}, i = t.shouldUnregister ? {} : qr(o), u = { - action: !1, - mount: !1, - watch: !1 - }, h = { - mount: /* @__PURE__ */ new Set(), - unMount: /* @__PURE__ */ new Set(), - array: /* @__PURE__ */ new Set(), - watch: /* @__PURE__ */ new Set() - }, v, S = 0; - const b = { - isDirty: !1, - dirtyFields: !1, - touchedFields: !1, - isValidating: !1, - isValid: !1, - errors: !1 - }, _ = { - values: Fa(), - array: Fa(), - state: Fa() - }, C = e.resetOptions && e.resetOptions.keepDirtyValues, R = ii(t.mode), Y = ii(t.reValidateMode), L = t.criteriaMode === Rr.all, O = (d) => (p) => { - clearTimeout(S), S = setTimeout(d, p); - }, w = async (d) => { - if (b.isValid || d) { - const p = t.resolver ? Cr((await fe()).errors) : await me(a, !0); - p !== n.isValid && _.state.next({ - isValid: p - }); - } - }, q = (d) => b.isValidating && _.state.next({ - isValidating: d - }), ie = (d, p = [], x, A, F = !0, E = !0) => { - if (A && x) { - if (u.action = !0, E && Array.isArray(z(a, d))) { - const W = x(z(a, d), A.argA, A.argB); - F && Fe(a, d, W); - } - if (E && Array.isArray(z(n.errors, d))) { - const W = x(z(n.errors, d), A.argA, A.argB); - F && Fe(n.errors, d, W), Tu(n.errors, d); - } - if (b.touchedFields && E && Array.isArray(z(n.touchedFields, d))) { - const W = x(z(n.touchedFields, d), A.argA, A.argB); - F && Fe(n.touchedFields, d, W); - } - b.dirtyFields && (n.dirtyFields = Na(o, i)), _.state.next({ - name: d, - isDirty: I(d, p), - dirtyFields: n.dirtyFields, - errors: n.errors, - isValid: n.isValid - }); - } else - Fe(i, d, p); - }, M = (d, p) => { - Fe(n.errors, d, p), _.state.next({ - errors: n.errors - }); - }, Q = (d, p, x, A) => { - const F = z(a, d); - if (F) { - const E = z(i, d, Le(x) ? z(o, d) : x); - Le(E) || A && A.defaultChecked || p ? Fe(i, d, p ? E : Da(F._f)) : se(d, E), u.mount && w(); - } - }, K = (d, p, x, A, F) => { - let E = !1, W = !1; - const de = { - name: d - }; - if (!x || A) { - b.isDirty && (W = n.isDirty, n.isDirty = de.isDirty = I(), E = W !== de.isDirty); - const Te = gt(z(o, d), p); - W = z(n.dirtyFields, d), Te ? Qe(n.dirtyFields, d) : Fe(n.dirtyFields, d, !0), de.dirtyFields = n.dirtyFields, E = E || b.dirtyFields && W !== !Te; - } - if (x) { - const Te = z(n.touchedFields, d); - Te || (Fe(n.touchedFields, d, x), de.touchedFields = n.touchedFields, E = E || b.touchedFields && Te !== x); - } - return E && F && _.state.next(de), E ? de : {}; - }, re = (d, p, x, A) => { - const F = z(n.errors, d), E = b.isValid && Dt(p) && n.isValid !== p; - if (e.delayError && x ? (v = O(() => M(d, x)), v(e.delayError)) : (clearTimeout(S), v = null, x ? Fe(n.errors, d, x) : Qe(n.errors, d)), (x ? !gt(F, x) : F) || !Cr(A) || E) { - const W = { - ...A, - ...E && Dt(p) ? { isValid: p } : {}, - errors: n.errors, - name: d - }; - n = { - ...n, - ...W - }, _.state.next(W); - } - q(!1); - }, fe = async (d) => t.resolver(i, t.context, wu(d || h.mount, a, t.criteriaMode, t.shouldUseNativeValidation)), Ee = async (d) => { - const { errors: p } = await fe(); - if (d) - for (const x of d) { - const A = z(p, x); - A ? Fe(n.errors, x, A) : Qe(n.errors, x); - } - else - n.errors = p; - return p; - }, me = async (d, p, x = { - valid: !0 - }) => { - for (const A in d) { - const F = d[A]; - if (F) { - const { _f: E, ...W } = F; - if (E) { - const de = h.array.has(E.name), Te = await fi(F, i, L, t.shouldUseNativeValidation && !p, de); - if (Te[E.name] && (x.valid = !1, p)) - break; - !p && (z(Te, E.name) ? de ? yu(n.errors, Te, E.name) : Fe(n.errors, E.name, Te[E.name]) : Qe(n.errors, E.name)); - } - W && await me(W, p, x); - } - } - return x.valid; - }, J = () => { - for (const d of h.unMount) { - const p = z(a, d); - p && (p._f.refs ? p._f.refs.every((x) => !Aa(x)) : !Aa(p._f.ref)) && j(d); - } - h.unMount = /* @__PURE__ */ new Set(); - }, I = (d, p) => (d && p && Fe(i, d, p), !gt(er(), o)), Z = (d, p, x) => Is(d, h, { - ...u.mount ? i : Le(p) ? o : Ir(d) ? { [d]: p } : p - }, x, p), ee = (d) => _n(z(u.mount ? i : o, d, e.shouldUnregister ? z(o, d, []) : [])), se = (d, p, x = {}) => { - const A = z(a, d); - let F = p; - if (A) { - const E = A._f; - E && (!E.disabled && Fe(i, d, Us(p, E)), F = Zn(E.ref) && nr(p) ? "" : p, Ls(E.ref) ? [...E.ref.options].forEach((W) => W.selected = F.includes(W.value)) : E.refs ? xn(E.ref) ? E.refs.length > 1 ? E.refs.forEach((W) => (!W.defaultChecked || !W.disabled) && (W.checked = Array.isArray(F) ? !!F.find((de) => de === W.value) : F === W.value)) : E.refs[0] && (E.refs[0].checked = !!F) : E.refs.forEach((W) => W.checked = W.value === F) : Eo(E.ref) ? E.ref.value = "" : (E.ref.value = F, E.ref.type || _.values.next({ - name: d, - values: { ...i } - }))); - } - (x.shouldDirty || x.shouldTouch) && K(d, F, x.shouldTouch, x.shouldDirty, !0), x.shouldValidate && Me(d); - }, ye = (d, p, x) => { - for (const A in p) { - const F = p[A], E = `${d}.${A}`, W = z(a, E); - (h.array.has(d) || !ra(F) || W && !W._f) && !Ft(F) ? ye(E, F, x) : se(E, F, x); - } - }, Ye = (d, p, x = {}) => { - const A = z(a, d), F = h.array.has(d), E = qr(p); - Fe(i, d, E), F ? (_.array.next({ - name: d, - values: { ...i } - }), (b.isDirty || b.dirtyFields) && x.shouldDirty && _.state.next({ - name: d, - dirtyFields: Na(o, i), - isDirty: I(d, E) - })) : A && !A._f && !nr(E) ? ye(d, E, x) : se(d, E, x), si(d, h) && _.state.next({ ...n }), _.values.next({ - name: d, - values: { ...i } - }), !u.mount && r(); - }, Ve = async (d) => { - const p = d.target; - let x = p.name, A = !0; - const F = z(a, x), E = () => p.type ? Da(F._f) : Fs(d); - if (F) { - let W, de; - const Te = E(), tr = d.type === Jn.BLUR || d.type === Jn.FOCUS_OUT, jr = !ku(F._f) && !t.resolver && !z(n.errors, x) && !F._f.deps || Cu(tr, z(n.touchedFields, x), n.isSubmitted, Y, R), Ge = si(x, h, tr); - Fe(i, x, Te), tr ? (F._f.onBlur && F._f.onBlur(d), v && v(0)) : F._f.onChange && F._f.onChange(d); - const Sr = K(x, Te, tr, !1), Fr = !Cr(Sr) || Ge; - if (!tr && _.values.next({ - name: x, - type: d.type, - values: { ...i } - }), jr) - return b.isValid && w(), Fr && _.state.next({ name: x, ...Ge ? {} : Sr }); - if (!tr && Ge && _.state.next({ ...n }), q(!0), t.resolver) { - const { errors: Tr } = await fe([x]), xr = mi(n.errors, a, x), Vr = mi(Tr, a, xr.name || x); - W = Vr.error, x = Vr.name, de = Cr(Tr); - } else - W = (await fi(F, i, L, t.shouldUseNativeValidation))[x], A = isNaN(Te) || Te === z(i, x, Te), A && (W ? de = !1 : b.isValid && (de = await me(a, !0))); - A && (F._f.deps && Me(F._f.deps), re(x, de, W, Sr)); - } - }, Me = async (d, p = {}) => { - let x, A; - const F = Vn(d); - if (q(!0), t.resolver) { - const E = await Ee(Le(d) ? d : F); - x = Cr(E), A = d ? !F.some((W) => z(E, W)) : x; - } else - d ? (A = (await Promise.all(F.map(async (E) => { - const W = z(a, E); - return await me(W && W._f ? { [E]: W } : W); - }))).every(Boolean), !(!A && !n.isValid) && w()) : A = x = await me(a); - return _.state.next({ - ...!Ir(d) || b.isValid && x !== n.isValid ? {} : { name: d }, - ...t.resolver || !d ? { isValid: x } : {}, - errors: n.errors, - isValidating: !1 - }), p.shouldFocus && !A && to(a, (E) => E && z(n.errors, E), d ? F : h.mount), A; - }, er = (d) => { - const p = { - ...o, - ...u.mount ? i : {} - }; - return Le(d) ? p : Ir(d) ? z(p, d) : d.map((x) => z(p, x)); - }, rr = (d, p) => ({ - invalid: !!z((p || n).errors, d), - isDirty: !!z((p || n).dirtyFields, d), - isTouched: !!z((p || n).touchedFields, d), - error: z((p || n).errors, d) - }), le = (d) => { - d && Vn(d).forEach((p) => Qe(n.errors, p)), _.state.next({ - errors: d ? n.errors : {} - }); - }, ur = (d, p, x) => { - const A = (z(a, d, { _f: {} })._f || {}).ref; - Fe(n.errors, d, { - ...p, - ref: A - }), _.state.next({ - name: d, - errors: n.errors, - isValid: !1 - }), x && x.shouldFocus && A && A.focus && A.focus(); - }, br = (d, p) => st(d) ? _.values.subscribe({ - next: (x) => d(Z(void 0, p), x) - }) : Z(d, p, !0), j = (d, p = {}) => { - for (const x of d ? Vn(d) : h.mount) - h.mount.delete(x), h.array.delete(x), p.keepValue || (Qe(a, x), Qe(i, x)), !p.keepError && Qe(n.errors, x), !p.keepDirty && Qe(n.dirtyFields, x), !p.keepTouched && Qe(n.touchedFields, x), !t.shouldUnregister && !p.keepDefaultValue && Qe(o, x); - _.values.next({ - values: { ...i } - }), _.state.next({ - ...n, - ...p.keepDirty ? { isDirty: I() } : {} - }), !p.keepIsValid && w(); - }, ce = (d, p = {}) => { - let x = z(a, d); - const A = Dt(p.disabled); - return Fe(a, d, { - ...x || {}, - _f: { - ...x && x._f ? x._f : { ref: { name: d } }, - name: d, - mount: !0, - ...p - } - }), h.mount.add(d), x ? A && Fe(i, d, p.disabled ? void 0 : z(i, d, Da(x._f))) : Q(d, !0, p.value), { - ...A ? { disabled: p.disabled } : {}, - ...t.shouldUseNativeValidation ? { - required: !!p.required, - min: en(p.min), - max: en(p.max), - minLength: en(p.minLength), - maxLength: en(p.maxLength), - pattern: en(p.pattern) - } : {}, - name: d, - onChange: Ve, - onBlur: Ve, - ref: (F) => { - if (F) { - ce(d, p), x = z(a, d); - const E = Le(F.value) && F.querySelectorAll && F.querySelectorAll("input,select,textarea")[0] || F, W = _u(E), de = x._f.refs || []; - if (W ? de.find((Te) => Te === E) : E === x._f.ref) - return; - Fe(a, d, { - _f: { - ...x._f, - ...W ? { - refs: [ - ...de.filter(Aa), - E, - ...Array.isArray(z(o, d)) ? [{}] : [] - ], - ref: { type: E.type, name: d } - } : { ref: E } - } - }), Q(d, !1, void 0, E); - } else - x = z(a, d, {}), x._f && (x._f.mount = !1), (t.shouldUnregister || p.shouldUnregister) && !(As(h.array, d) && u.action) && h.unMount.add(d); - } - }; - }, ae = () => t.shouldFocusError && to(a, (d) => d && z(n.errors, d), h.mount), be = (d, p) => async (x) => { - x && (x.preventDefault && x.preventDefault(), x.persist && x.persist()); - let A = qr(i); - if (_.state.next({ - isSubmitting: !0 - }), t.resolver) { - const { errors: F, values: E } = await fe(); - n.errors = F, A = E; - } else - await me(a); - Qe(n.errors, "root"), Cr(n.errors) ? (_.state.next({ - errors: {} - }), await d(A, x)) : (p && await p({ ...n.errors }, x), ae(), setTimeout(ae)), _.state.next({ - isSubmitted: !0, - isSubmitting: !1, - isSubmitSuccessful: Cr(n.errors), - submitCount: n.submitCount + 1, - errors: n.errors - }); - }, Pe = (d, p = {}) => { - z(a, d) && (Le(p.defaultValue) ? Ye(d, z(o, d)) : (Ye(d, p.defaultValue), Fe(o, d, p.defaultValue)), p.keepTouched || Qe(n.touchedFields, d), p.keepDirty || (Qe(n.dirtyFields, d), n.isDirty = p.defaultValue ? I(d, z(o, d)) : I()), p.keepError || (Qe(n.errors, d), b.isValid && w()), _.state.next({ ...n })); - }, te = (d, p = {}) => { - const x = d || o, A = qr(x), F = d && !Cr(d) ? A : o; - if (p.keepDefaultValues || (o = x), !p.keepValues) { - if (p.keepDirtyValues || C) - for (const E of h.mount) - z(n.dirtyFields, E) ? Fe(F, E, z(i, E)) : Ye(E, z(F, E)); - else { - if (ko && Le(d)) - for (const E of h.mount) { - const W = z(a, E); - if (W && W._f) { - const de = Array.isArray(W._f.refs) ? W._f.refs[0] : W._f.ref; - if (Zn(de)) { - const Te = de.closest("form"); - if (Te) { - Te.reset(); - break; - } - } - } - } - a = {}; - } - i = e.shouldUnregister ? p.keepDefaultValues ? qr(o) : {} : A, _.array.next({ - values: { ...F } - }), _.values.next({ - values: { ...F } - }); - } - h = { - mount: /* @__PURE__ */ new Set(), - unMount: /* @__PURE__ */ new Set(), - array: /* @__PURE__ */ new Set(), - watch: /* @__PURE__ */ new Set(), - watchAll: !1, - focus: "" - }, !u.mount && r(), u.mount = !b.isValid || !!p.keepIsValid, u.watch = !!e.shouldUnregister, _.state.next({ - submitCount: p.keepSubmitCount ? n.submitCount : 0, - isDirty: p.keepDirty ? n.isDirty : !!(p.keepDefaultValues && !gt(d, o)), - isSubmitted: p.keepIsSubmitted ? n.isSubmitted : !1, - dirtyFields: p.keepDirtyValues ? n.dirtyFields : p.keepDefaultValues && d ? Na(o, d) : {}, - touchedFields: p.keepTouched ? n.touchedFields : {}, - errors: p.keepErrors ? n.errors : {}, - isSubmitting: !1, - isSubmitSuccessful: !1 - }); - }, $e = (d, p) => te(st(d) ? d(i) : d, p); - return { - control: { - register: ce, - unregister: j, - getFieldState: rr, - _executeSchema: fe, - _getWatch: Z, - _getDirty: I, - _updateValid: w, - _removeUnmounted: J, - _updateFieldArray: ie, - _getFieldArray: ee, - _reset: te, - _resetDefaultValues: () => st(t.defaultValues) && t.defaultValues().then((d) => { - $e(d, t.resetOptions), _.state.next({ - isLoading: !1 - }); - }), - _updateFormState: (d) => { - n = { - ...n, - ...d - }; - }, - _subjects: _, - _proxyFormState: b, - get _fields() { - return a; - }, - get _formValues() { - return i; - }, - get _state() { - return u; - }, - set _state(d) { - u = d; - }, - get _defaultValues() { - return o; - }, - get _names() { - return h; - }, - set _names(d) { - h = d; - }, - get _formState() { - return n; - }, - set _formState(d) { - n = d; - }, - get _options() { - return t; - }, - set _options(d) { - t = { - ...t, - ...d - }; - } - }, - trigger: Me, - register: ce, - handleSubmit: be, - watch: br, - setValue: Ye, - getValues: er, - reset: $e, - resetField: Pe, - clearErrors: le, - unregister: j, - setError: ur, - setFocus: (d, p = {}) => { - const x = z(a, d), A = x && x._f; - if (A) { - const F = A.refs ? A.refs[0] : A.ref; - F.focus && (F.focus(), p.shouldSelect && F.select()); - } - }, - getFieldState: rr - }; -} -function Ru(e = {}) { - const r = Be.useRef(), [t, n] = Be.useState({ - isDirty: !1, - isValidating: !1, - isLoading: st(e.defaultValues), - isSubmitted: !1, - isSubmitting: !1, - isSubmitSuccessful: !1, - isValid: !1, - submitCount: 0, - dirtyFields: {}, - touchedFields: {}, - errors: {}, - defaultValues: st(e.defaultValues) ? void 0 : e.defaultValues - }); - r.current || (r.current = { - ...$u(e, () => n((o) => ({ ...o }))), - formState: t - }); - const a = r.current.control; - return a._options = e, Co({ - subject: a._subjects.state, - next: (o) => { - zs(o, a._proxyFormState, a._updateFormState, !0) && n({ ...a._formState }); - } - }), Be.useEffect(() => { - e.values && !gt(e.values, a._defaultValues) ? a._reset(e.values, a._options.resetOptions) : a._resetDefaultValues(); - }, [e.values, a]), Be.useEffect(() => { - a._state.mount || (a._updateValid(), a._state.mount = !0), a._state.watch && (a._state.watch = !1, a._subjects.state.next({ ...a._formState })), a._removeUnmounted(); - }), r.current.formState = Ds(t, a), r.current; -} -function Pu(e, r) { - if (e != null) { - if (typeof e == "function") { - e(r); - return; - } - try { - e.current = r; - } catch { - throw new Error(`Cannot assign value '${r}' to ref '${e}'`); - } - } -} -function na(...e) { - return (r) => { - e.forEach((t) => { - Pu(t, r); - }); - }; -} -function Fu(...e) { - return pt(() => na(...e), e); -} -var [Au, Nu] = Wr({ - name: "FormControlStylesContext", - errorMessage: `useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" ` -}), [Du, va] = Wr({ - strict: !1, - name: "FormControlContext" -}); -function zu(e) { - const { - id: r, - isRequired: t, - isInvalid: n, - isDisabled: a, - isReadOnly: o, - ...i - } = e, u = bo(), h = r || `field-${u}`, v = `${h}-label`, S = `${h}-feedback`, b = `${h}-helptext`, [_, C] = ge(!1), [R, Y] = ge(!1), [L, O] = ge(!1), w = Ze( - (K = {}, re = null) => ({ - id: b, - ...K, - ref: na(re, (fe) => { - fe && Y(!0); - }) - }), - [b] - ), q = Ze( - (K = {}, re = null) => ({ - ...K, - ref: re, - "data-focus": We(L), - "data-disabled": We(a), - "data-invalid": We(n), - "data-readonly": We(o), - id: K.id !== void 0 ? K.id : v, - htmlFor: K.htmlFor !== void 0 ? K.htmlFor : h - }), - [h, a, L, n, o, v] - ), ie = Ze( - (K = {}, re = null) => ({ - id: S, - ...K, - ref: na(re, (fe) => { - fe && C(!0); - }), - "aria-live": "polite" - }), - [S] - ), M = Ze( - (K = {}, re = null) => ({ - ...K, - ...i, - ref: re, - role: "group" - }), - [i] - ), Q = Ze( - (K = {}, re = null) => ({ - ...K, - ref: re, - role: "presentation", - "aria-hidden": !0, - children: K.children || "*" - }), - [] - ); - return { - isRequired: !!t, - isInvalid: !!n, - isReadOnly: !!o, - isDisabled: !!a, - isFocused: !!L, - onFocus: () => O(!0), - onBlur: () => O(!1), - hasFeedbackText: _, - setHasFeedbackText: C, - hasHelpText: R, - setHasHelpText: Y, - id: h, - labelId: v, - feedbackId: S, - helpTextId: b, - htmlProps: i, - getHelpTextProps: w, - getErrorMessageProps: ie, - getRootProps: M, - getLabelProps: q, - getRequiredIndicatorProps: Q - }; -} -var Hs = ve( - function(r, t) { - const n = Mr("Form", r), a = sr(r), { - getRootProps: o, - htmlProps: i, - ...u - } = zu(a), h = qe("chakra-form-control", r.className); - return /* @__PURE__ */ N(Du, { value: u, children: /* @__PURE__ */ N(Au, { value: n, children: /* @__PURE__ */ N( - ne.div, - { - ...o({}, t), - className: h, - __css: n.container - } - ) }) }); - } -); -Hs.displayName = "FormControl"; -var Ou = ve( - function(r, t) { - const n = va(), a = Nu(), o = qe("chakra-form__helper-text", r.className); - return /* @__PURE__ */ N( - ne.div, - { - ...n == null ? void 0 : n.getHelpTextProps(r, t), - __css: a.helperText, - className: o - } - ); - } -); -Ou.displayName = "FormHelperText"; -var [Iu, Bu] = Wr({ - name: "FormErrorStylesContext", - errorMessage: `useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" ` -}), Ys = ve( - (e, r) => { - const t = Mr("FormError", e), n = sr(e), a = va(); - return a != null && a.isInvalid ? /* @__PURE__ */ N(Iu, { value: t, children: /* @__PURE__ */ N( - ne.div, - { - ...a == null ? void 0 : a.getErrorMessageProps(n, r), - className: qe("chakra-form__error-message", e.className), - __css: { - display: "flex", - alignItems: "center", - ...t.text - } - } - ) }) : null; - } -); -Ys.displayName = "FormErrorMessage"; -var Mu = ve((e, r) => { - const t = Bu(), n = va(); - if (!(n != null && n.isInvalid)) - return null; - const a = qe("chakra-form__error-icon", e.className); - return /* @__PURE__ */ N( - Zr, - { - ref: r, - "aria-hidden": !0, - ...e, - __css: t.icon, - className: a, - children: /* @__PURE__ */ N( - "path", - { - fill: "currentColor", - d: "M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z" - } - ) - } - ); -}); -Mu.displayName = "FormErrorIcon"; -function Wu(e) { - return e && Mt(e) && Mt(e.target); -} -function Lu(e = {}) { - const { - onChange: r, - value: t, - defaultValue: n, - name: a, - isDisabled: o, - isFocusable: i, - isNative: u, - ...h - } = e, [v, S] = ge(n || ""), b = typeof t < "u", _ = b ? t : v, C = ns(null), R = Ze(() => { - const M = C.current; - if (!M) - return; - let Q = "input:not(:disabled):checked"; - const K = M.querySelector( - Q - ); - if (K) { - K.focus(); - return; - } - Q = "input:not(:disabled)"; - const re = M.querySelector(Q); - re == null || re.focus(); - }, []), L = `radio-${bo()}`, O = a || L, w = Ze( - (M) => { - const Q = Wu(M) ? M.target.value : M; - b || S(Q), r == null || r(String(Q)); - }, - [r, b] - ), q = Ze( - (M = {}, Q = null) => ({ - ...M, - ref: na(Q, C), - role: "radiogroup" - }), - [] - ), ie = Ze( - (M = {}, Q = null) => ({ - ...M, - ref: Q, - name: O, - [u ? "checked" : "isChecked"]: _ != null ? M.value === _ : void 0, - onChange(re) { - w(re); - }, - "data-radiogroup": !0 - }), - [u, O, w, _] - ); - return { - getRootProps: q, - getRadioProps: ie, - name: O, - ref: C, - focus: R, - setValue: S, - value: _, - onChange: w, - isDisabled: o, - isFocusable: i, - htmlProps: h - }; -} -var [ju, qs] = Wr({ - name: "RadioGroupContext", - strict: !1 -}), Gs = ve((e, r) => { - const { - colorScheme: t, - size: n, - variant: a, - children: o, - className: i, - isDisabled: u, - isFocusable: h, - ...v - } = e, { value: S, onChange: b, getRootProps: _, name: C, htmlProps: R } = Lu(v), Y = pt( - () => ({ - name: C, - size: n, - onChange: b, - colorScheme: t, - value: S, - variant: a, - isDisabled: u, - isFocusable: h - }), - [ - C, - n, - b, - t, - S, - a, - u, - h - ] - ); - return /* @__PURE__ */ N(ju, { value: Y, children: /* @__PURE__ */ N( - ne.div, - { - ..._(R, r), - className: qe("chakra-radio-group", i), - children: o - } - ) }); -}); -Gs.displayName = "RadioGroup"; -var hi = !1, wn = null, wt = !1, no = !1, ao = /* @__PURE__ */ new Set(); -function Ro(e, r) { - ao.forEach((t) => t(e, r)); -} -var Vu = typeof window < "u" && window.navigator != null ? /^Mac/.test(window.navigator.platform) : !1; -function Uu(e) { - return !(e.metaKey || !Vu && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta"); -} -function vi(e) { - wt = !0, Uu(e) && (wn = "keyboard", Ro("keyboard", e)); -} -function Rt(e) { - if (wn = "pointer", e.type === "mousedown" || e.type === "pointerdown") { - wt = !0; - const r = e.composedPath ? e.composedPath()[0] : e.target; - let t = !1; - try { - t = r.matches(":focus-visible"); - } catch { - } - if (t) - return; - Ro("pointer", e); - } -} -function Hu(e) { - return e.mozInputSource === 0 && e.isTrusted ? !0 : e.detail === 0 && !e.pointerType; -} -function Yu(e) { - Hu(e) && (wt = !0, wn = "virtual"); -} -function qu(e) { - e.target === window || e.target === document || (!wt && !no && (wn = "virtual", Ro("virtual", e)), wt = !1, no = !1); -} -function Gu() { - wt = !1, no = !0; -} -function gi() { - return wn !== "pointer"; -} -function Xu() { - if (typeof window > "u" || hi) - return; - const { focus: e } = HTMLElement.prototype; - HTMLElement.prototype.focus = function(...t) { - wt = !0, e.apply(this, t); - }, document.addEventListener("keydown", vi, !0), document.addEventListener("keyup", vi, !0), document.addEventListener("click", Yu, !0), window.addEventListener("focus", qu, !0), window.addEventListener("blur", Gu, !1), typeof PointerEvent < "u" ? (document.addEventListener("pointerdown", Rt, !0), document.addEventListener("pointermove", Rt, !0), document.addEventListener("pointerup", Rt, !0)) : (document.addEventListener("mousedown", Rt, !0), document.addEventListener("mousemove", Rt, !0), document.addEventListener("mouseup", Rt, !0)), hi = !0; -} -function Qu(e) { - Xu(), e(gi()); - const r = () => e(gi()); - return ao.add(r), () => { - ao.delete(r); - }; -} -var Ku = { - border: "0", - clip: "rect(0, 0, 0, 0)", - height: "1px", - width: "1px", - margin: "-1px", - padding: "0", - overflow: "hidden", - whiteSpace: "nowrap", - position: "absolute" -}; -function Ju(e = {}) { - const { - defaultChecked: r, - isChecked: t, - isFocusable: n, - isDisabled: a, - isReadOnly: o, - isRequired: i, - onChange: u, - isInvalid: h, - name: v, - value: S, - id: b, - "data-radiogroup": _, - "aria-describedby": C, - ...R - } = e, Y = `radio-${bo()}`, L = va(), w = !!qs() || !!_; - let ie = !!L && !w ? L.id : Y; - ie = b ?? ie; - const M = a ?? (L == null ? void 0 : L.isDisabled), Q = o ?? (L == null ? void 0 : L.isReadOnly), K = i ?? (L == null ? void 0 : L.isRequired), re = h ?? (L == null ? void 0 : L.isInvalid), [fe, Ee] = ge(!1), [me, J] = ge(!1), [I, Z] = ge(!1), [ee, se] = ge(!1), [ye, Ye] = ge(!!r), Ve = typeof t < "u", Me = Ve ? t : ye; - Ke(() => Qu(Ee), []); - const er = Ze( - (te) => { - if (Q || M) { - te.preventDefault(); - return; - } - Ve || Ye(te.target.checked), u == null || u(te); - }, - [Ve, M, Q, u] - ), rr = Ze( - (te) => { - te.key === " " && se(!0); - }, - [se] - ), le = Ze( - (te) => { - te.key === " " && se(!1); - }, - [se] - ), ur = Ze( - (te = {}, $e = null) => ({ - ...te, - ref: $e, - "data-active": We(ee), - "data-hover": We(I), - "data-disabled": We(M), - "data-invalid": We(re), - "data-checked": We(Me), - "data-focus": We(me), - "data-focus-visible": We(me && fe), - "data-readonly": We(Q), - "aria-hidden": !0, - onMouseDown: Dr(te.onMouseDown, () => se(!0)), - onMouseUp: Dr(te.onMouseUp, () => se(!1)), - onMouseEnter: Dr( - te.onMouseEnter, - () => Z(!0) - ), - onMouseLeave: Dr( - te.onMouseLeave, - () => Z(!1) - ) - }), - [ - ee, - I, - M, - re, - Me, - me, - Q, - fe - ] - ), { onFocus: br, onBlur: j } = L ?? {}, ce = Ze( - (te = {}, $e = null) => { - const pr = M && !n; - return { - ...te, - id: ie, - ref: $e, - type: "radio", - name: v, - value: S, - onChange: Dr(te.onChange, er), - onBlur: Dr( - j, - te.onBlur, - () => J(!1) - ), - onFocus: Dr( - br, - te.onFocus, - () => J(!0) - ), - onKeyDown: Dr(te.onKeyDown, rr), - onKeyUp: Dr(te.onKeyUp, le), - checked: Me, - disabled: pr, - readOnly: Q, - required: K, - "aria-invalid": Ra(re), - "aria-disabled": Ra(pr), - "aria-required": Ra(K), - "data-readonly": We(Q), - "aria-describedby": C, - style: Ku - }; - }, - [ - M, - n, - ie, - v, - S, - er, - j, - br, - rr, - le, - Me, - Q, - K, - re, - C - ] - ); - return { - state: { - isInvalid: re, - isFocused: me, - isChecked: Me, - isActive: ee, - isHovered: I, - isDisabled: M, - isReadOnly: Q, - isRequired: K - }, - getCheckboxProps: ur, - getRadioProps: ur, - getInputProps: ce, - getLabelProps: (te = {}, $e = null) => ({ - ...te, - ref: $e, - onMouseDown: Dr(te.onMouseDown, Zu), - "data-disabled": We(M), - "data-checked": We(Me), - "data-invalid": We(re) - }), - getRootProps: (te, $e = null) => ({ - ...te, - ref: $e, - "data-disabled": We(M), - "data-checked": We(Me), - "data-invalid": We(re) - }), - htmlProps: R - }; -} -function Zu(e) { - e.preventDefault(), e.stopPropagation(); -} -function ef(e, r) { - const t = {}, n = {}; - for (const [a, o] of Object.entries(e)) - r.includes(a) ? t[a] = o : n[a] = o; - return [t, n]; -} -var Xs = ve((e, r) => { - var t; - const n = qs(), { onChange: a, value: o } = e, i = Mr("Radio", { ...n, ...e }), u = sr(e), { - spacing: h = "0.5rem", - children: v, - isDisabled: S = n == null ? void 0 : n.isDisabled, - isFocusable: b = n == null ? void 0 : n.isFocusable, - inputProps: _, - ...C - } = u; - let R = e.isChecked; - (n == null ? void 0 : n.value) != null && o != null && (R = n.value === o); - let Y = a; - n != null && n.onChange && o != null && (Y = fc(n.onChange, a)); - const L = (t = e == null ? void 0 : e.name) != null ? t : n == null ? void 0 : n.name, { - getInputProps: O, - getCheckboxProps: w, - getLabelProps: q, - getRootProps: ie, - htmlProps: M - } = Ju({ - ...C, - isChecked: R, - isFocusable: b, - isDisabled: S, - onChange: Y, - name: L - }), [Q, K] = ef(M, nc), re = w(K), fe = O(_, r), Ee = q(), me = Object.assign({}, Q, ie()), J = { - display: "inline-flex", - alignItems: "center", - verticalAlign: "top", - cursor: "pointer", - position: "relative", - ...i.container - }, I = { - display: "inline-flex", - alignItems: "center", - justifyContent: "center", - flexShrink: 0, - ...i.control - }, Z = { - userSelect: "none", - marginStart: h, - ...i.label - }; - return /* @__PURE__ */ Sn(ne.label, { className: "chakra-radio", ...me, __css: J, children: [ - /* @__PURE__ */ N("input", { className: "chakra-radio__input", ...fe }), - /* @__PURE__ */ N( - ne.span, - { - className: "chakra-radio__control", - ...re, - __css: I - } - ), - v && /* @__PURE__ */ N( - ne.span, - { - className: "chakra-radio__label", - ...Ee, - __css: Z, - children: v - } - ) - ] }); -}); -Xs.displayName = "Radio"; -const Qs = ({ question: e, ...r }) => { - const t = Mr("Questions"), { isAbleToVote: n, trans: a } = lt(), { - formState: { errors: o } - } = ha(); - return /* @__PURE__ */ U(ne.div, { __css: t.question, ...r, children: /* @__PURE__ */ U(Hs, { isInvalid: !!o[e.title.default], children: [ - /* @__PURE__ */ U(ne.label, { __css: t.title, children: e.title.default }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionField.tsx", - lineNumber: 24, - columnNumber: 9 - }, globalThis), - e.description && /* @__PURE__ */ U(ne.div, { __css: t.description, children: /* @__PURE__ */ U(fa, { children: e.description.default }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionField.tsx", - lineNumber: 27, - columnNumber: 13 - }, globalThis) }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionField.tsx", - lineNumber: 26, - columnNumber: 11 - }, globalThis), - /* @__PURE__ */ U( - bu, - { - rules: { required: a("required", "This field is required") }, - name: e.title.default, - render: ({ field: i }) => { - var u; - return /* @__PURE__ */ U(Gs, { sx: t.radioGroup, ...i, isDisabled: !n, children: [ - /* @__PURE__ */ U(ys, { direction: "column", sx: t.stack, children: e.choices.map((h, v) => /* @__PURE__ */ U(Xs, { sx: t.radio, value: h.title.default, children: h.title.default }, v, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionField.tsx", - lineNumber: 37, - columnNumber: 19 - }, globalThis)) }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionField.tsx", - lineNumber: 35, - columnNumber: 15 - }, globalThis), - /* @__PURE__ */ U(Ys, { sx: t.error, children: (u = o[e.title.default]) == null ? void 0 : u.message }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionField.tsx", - lineNumber: 42, - columnNumber: 15 - }, globalThis) - ] }, void 0, !0, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionField.tsx", - lineNumber: 34, - columnNumber: 13 - }, globalThis); - } - }, - void 0, - !1, - { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionField.tsx", - lineNumber: 30, - columnNumber: 9 - }, - globalThis - ) - ] }, void 0, !0, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionField.tsx", - lineNumber: 23, - columnNumber: 7 - }, globalThis) }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionField.tsx", - lineNumber: 22, - columnNumber: 5 - }, globalThis); -}; -Qs.displayName = "Question"; -const rf = () => { - var _; - const { election: e, signer: r, vote: t, voted: n, ConnectButton: a, error: o, loading: i, trans: u } = lt(), h = Ru(), v = Mr("Questions"), S = e == null ? void 0 : e.questions; - if (n) - return /* @__PURE__ */ U(jn, { variant: "solid", status: "info", children: (_ = u("voted", "You already voted. Your vote id is %id")) == null ? void 0 : _.replace("%id", n) }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionsForm.tsx", - lineNumber: 15, - columnNumber: 7 - }, globalThis); - if (!S || S && !(S != null && S.length)) - return /* @__PURE__ */ U(jn, { variant: "solid", status: "warning", sx: v.alert, children: [ - /* @__PURE__ */ U(ro, {}, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionsForm.tsx", - lineNumber: 24, - columnNumber: 9 - }, globalThis), - u("empty", "Apparently this process has no questions 🤔") - ] }, void 0, !0, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionsForm.tsx", - lineNumber: 23, - columnNumber: 7 - }, globalThis); - S.reduce( - (C, R) => ({ - ...C, - [R.title.default]: "" - }), - {} - ); - const b = async (C) => await t(C); - return /* @__PURE__ */ U(mu, { ...h, children: /* @__PURE__ */ U("form", { onSubmit: h.handleSubmit(b), id: "election-questions-form", children: [ - S.map((C, R) => /* @__PURE__ */ U(Qs, { question: C }, R, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionsForm.tsx", - lineNumber: 44, - columnNumber: 11 - }, globalThis)), - o && /* @__PURE__ */ U(jn, { status: "error", variant: "solid", mb: 3, children: [ - /* @__PURE__ */ U(ro, {}, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionsForm.tsx", - lineNumber: 48, - columnNumber: 13 - }, globalThis), - o - ] }, void 0, !0, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionsForm.tsx", - lineNumber: 47, - columnNumber: 11 - }, globalThis) - ] }, void 0, !0, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionsForm.tsx", - lineNumber: 42, - columnNumber: 7 - }, globalThis) }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/QuestionsForm.tsx", - lineNumber: 41, - columnNumber: 5 - }, globalThis); -}; -var [A0, tf] = Wr({ - strict: !1, - name: "ButtonGroupContext" -}); -function nf(e) { - const [r, t] = ge(!e); - return { ref: Ze((o) => { - o && t(o.tagName === "BUTTON"); - }, []), type: r ? "button" : void 0 }; -} -function oo(e) { - const { children: r, className: t, ...n } = e, a = as(r) ? os(r, { - "aria-hidden": !0, - focusable: !1 - }) : r, o = qe("chakra-button__icon", t); - return /* @__PURE__ */ N( - ne.span, - { - display: "inline-flex", - alignSelf: "center", - flexShrink: 0, - ...n, - className: o, - children: a - } - ); -} -oo.displayName = "ButtonIcon"; -function io(e) { - const { - label: r, - placement: t, - spacing: n = "0.5rem", - children: a = /* @__PURE__ */ N(wo, { color: "currentColor", width: "1em", height: "1em" }), - className: o, - __css: i, - ...u - } = e, h = qe("chakra-button__spinner", o), v = t === "start" ? "marginEnd" : "marginStart", S = pt( - () => ({ - display: "flex", - alignItems: "center", - position: r ? "relative" : "absolute", - [v]: r ? n : 0, - fontSize: "1em", - lineHeight: "normal", - ...i - }), - [i, r, v, n] - ); - return /* @__PURE__ */ N(ne.div, { className: h, ...u, __css: S, children: a }); -} -io.displayName = "ButtonSpinner"; -var Ks = ve((e, r) => { - const t = tf(), n = ir("Button", { ...t, ...e }), { - isDisabled: a = t == null ? void 0 : t.isDisabled, - isLoading: o, - isActive: i, - children: u, - leftIcon: h, - rightIcon: v, - loadingText: S, - iconSpacing: b = "0.5rem", - type: _, - spinner: C, - spinnerPlacement: R = "start", - className: Y, - as: L, - ...O - } = sr(e), w = pt(() => { - const Q = { ...n == null ? void 0 : n._focus, zIndex: 1 }; - return { - display: "inline-flex", - appearance: "none", - alignItems: "center", - justifyContent: "center", - userSelect: "none", - position: "relative", - whiteSpace: "nowrap", - verticalAlign: "middle", - outline: "none", - ...n, - ...!!t && { _focus: Q } - }; - }, [n, t]), { ref: q, type: ie } = nf(L), M = { rightIcon: v, leftIcon: h, iconSpacing: b, children: u }; - return /* @__PURE__ */ Sn( - ne.button, - { - ref: Fu(r, q), - as: L, - type: _ ?? ie, - "data-active": We(i), - "data-loading": We(o), - __css: w, - className: qe("chakra-button", Y), - ...O, - disabled: a || o, - children: [ - o && R === "start" && /* @__PURE__ */ N( - io, - { - className: "chakra-button__spinner--start", - label: S, - placement: "start", - spacing: b, - children: C - } - ), - o ? S || /* @__PURE__ */ N(ne.span, { opacity: 0, children: /* @__PURE__ */ N(bi, { ...M }) }) : /* @__PURE__ */ N(bi, { ...M }), - o && R === "end" && /* @__PURE__ */ N( - io, - { - className: "chakra-button__spinner--end", - label: S, - placement: "end", - spacing: b, - children: C - } - ) - ] - } - ); -}); -Ks.displayName = "Button"; -function bi(e) { - const { leftIcon: r, rightIcon: t, children: n, iconSpacing: a } = e; - return /* @__PURE__ */ Sn(gc, { children: [ - r && /* @__PURE__ */ N(oo, { marginEnd: a, children: r }), - n, - t && /* @__PURE__ */ N(oo, { marginStart: a, children: t }) - ] }); -} -const af = (e) => { - const { signer: r, loading: t, voting: n, ConnectButton: a, isAbleToVote: o, election: i, voted: u, trans: h } = lt(), v = !r || !o || (i == null ? void 0 : i.status) !== on.ONGOING; - return u ? null : !r && a ? /* @__PURE__ */ U(a, {}, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/VoteButton.tsx", - lineNumber: 12, - columnNumber: 12 - }, globalThis) : /* @__PURE__ */ U( - Ks, - { - type: "submit", - ...e, - form: "election-questions-form", - isDisabled: v, - isLoading: t || n, - children: h("vote", "Vote") - }, - void 0, - !1, - { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/VoteButton.tsx", - lineNumber: 16, - columnNumber: 5 - }, - globalThis - ); -}, of = ({ - id: e, - election: r, - signer: t, - fetchCensus: n, - texts: a, - ...o -}) => { - const { client: i, signer: u, setSigner: h } = po(), [v, S] = ge(!1), [b, _] = ge(!1), [C, R] = ge(!1), [Y, L] = ge(null), [O, w] = ge(""), [q, ie] = ge(r), [M, Q] = ge(void 0), [K, re] = ge(0), [fe, Ee] = ge(!1), [me, J] = ge(void 0), [I, Z] = ge(void 0), [ee, se] = ge(null), [ye, Ye] = ge("facebook"), Ve = (j, ce) => a && a[j] ? a[j] : ce; - Ke(() => { - !i || u || !t || h(t); - }, [u, i, t]), Ke(() => { - q || !e || C || !i || (async () => { - S(!0); - try { - const j = await i.fetchElection(e); - R(!0), ie(j); - } catch (j) { - w(j.message); - } finally { - S(!1); - } - })(); - }, [q, e, C, i]), Ke(() => { - C || !r || R(!0); - }, [r, C]), Ke(() => { - !n || !u || !q || !C || !i || M !== void 0 || (async () => { - const j = q.census.type, ce = await i.isInCensus(q.id); - let ae = 0; - if (ce || j == rt.WEIGHTED) { - ae = await i.votesLeftCount(q.id), re(ae); - const be = await i.hasAlreadyVoted(q.id); - L(be); - } - J(j), Ee(ce), Q(ae > 0 && ce || j == rt.CSP); - })(); - }, [n, q, C, i, M, u]), Ke(() => { - (async () => window.opener || i && me == rt.CSP && window.addEventListener("message", (j) => { - j.data.code && j.data.handler && ur(i, j.data.code, j.data.handler); - }))(); - }, [i, me]), Ke(() => { - (async () => { - var ae, be; - if (typeof window > "u") - return; - const j = (ae = window.location.href.split("?")[1].split("&").find((Pe) => Pe.startsWith("code="))) == null ? void 0 : ae.split("=")[1], ce = (be = window.location.href.split("?")[1].split("&").find((Pe) => Pe.startsWith("handler="))) == null ? void 0 : be.split("=")[1]; - !j || !ce || window.opener && (window.opener.postMessage({ code: j, handler: ce }, "*"), window.close()); - })(); - }, []); - const Me = async (j) => { - if (!i) - throw new Error("no client initialized"); - if (!u) - throw new Error("no signer provided"); - if (!q) - throw new Error("no election initialized"); - _(!0), w(""), i.setElectionId(q.id); - const ce = q.questions.map((be) => parseInt(j[be.title.default], 10)); - let ae = new qo(ce); - Z(ae); - try { - me == rt.CSP ? await rr() : me == rt.WEIGHTED && await er(); - } catch (be) { - if ("reason" in be) - return w(be.reason); - if ("message" in be) - return w(be.message); - console.error("could not vote:", be); - } finally { - _(!1); - } - }, er = async () => { - if (!I) - throw new Error("no vote instance"); - if (me != rt.WEIGHTED) - throw new Error("not a Weighted election"); - const j = await i.submitVote(I); - return L(j), j; - }, rr = async () => { - if (!i) - throw new Error("no client initialized"); - if (!q) - throw new Error("no election initialized"); - if (me != rt.CSP) - throw new Error("not a CSP election"); - let j = `${window.location.href}`; - j.includes(`electionId=${q.id}`) || (j.includes("?") ? j += `&electionId=${q.id}` : j += `?electionId=${q.id}`), j.includes(`handler=${ye}`) || (j.includes("?") ? j += `&handler=${ye}` : j += `?handler=${ye}`); - let ce; - try { - ce = await i.cspStep(0, [ye, j]); - } catch (ae) { - if ("reason" in ae) - return w(ae.reason); - } - se(ce.authToken), le(ye, ce.response[0]); - }, le = (j, ce) => { - const Pe = window.outerWidth / 2 - 300, $e = [ - "width=600", - "height=600", - `top=${window.outerHeight / 2 - 600 / 2}`, - `left=${Pe}`, - "status=no", - "resizable=yes", - "scrollbars=yes" - ].join(","); - window.open(ce, j, $e); - }, ur = async (j, ce, ae) => { - var $e; - if (!ce) - throw new Error("no code provided"); - if (!ae) - throw new Error("no handler provided"); - const be = ($e = window.location.href.split("?")[1].split("&").find((pr) => pr.startsWith("electionId="))) == null ? void 0 : $e.split("=")[1]; - let Pe = `${window.location.href.split("?")[0]}?electionId=${be}&handler=${ae}`, te; - try { - te = await j.cspStep(1, [ae, ce, Pe], ee), br(te.token); - } catch { - return w("Not authorized to vote"), !1; - } - }, br = async (j) => { - var ae; - if (!i) - throw new Error("no client initialized"); - let ce = new qo([1]); - if (me != rt.CSP) - throw new Error("not a CSP election"); - try { - const be = await ((ae = i.wallet) == null ? void 0 : ae.getAddress()), Pe = await i.cspSign(be, j), te = i.cspVote(ce, Pe), $e = await i.submitVote(te); - return L($e), $e; - } catch { - return w("Error submitting vote"), !1; - } - }; - return { - ...o, - election: q, - error: O, - isAbleToVote: M, - isInCensus: fe, - loading: v, - signer: u, - trans: Ve, - vote: Me, - voted: Y, - votesLeft: K, - voting: b - }; -}, Js = da(void 0), lt = () => { - const e = ua(Js); - if (!e) - throw new Error( - "useElection returned `undefined`, maybe you forgot to wrap the component within ?" - ); - return e; -}, Zs = ({ children: e, ...r }) => { - const t = of(r); - return /* @__PURE__ */ U(Js.Provider, { value: t, children: e }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/Election.tsx", - lineNumber: 334, - columnNumber: 10 - }, globalThis); -}; -Zs.displayName = "ElectionProvider"; -const sf = (e) => /* @__PURE__ */ U(Zs, { ...e, fetchCensus: !0, children: [ - /* @__PURE__ */ U(Zd, {}, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/Election.tsx", - lineNumber: 340, - columnNumber: 5 - }, globalThis), - /* @__PURE__ */ U(Es, {}, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/Election.tsx", - lineNumber: 341, - columnNumber: 5 - }, globalThis), - /* @__PURE__ */ U($s, {}, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/Election.tsx", - lineNumber: 342, - columnNumber: 5 - }, globalThis), - /* @__PURE__ */ U(ru, {}, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/Election.tsx", - lineNumber: 343, - columnNumber: 5 - }, globalThis), - /* @__PURE__ */ U(eu, {}, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/Election.tsx", - lineNumber: 344, - columnNumber: 5 - }, globalThis), - /* @__PURE__ */ U(cs, {}, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/Election.tsx", - lineNumber: 345, - columnNumber: 5 - }, globalThis), - /* @__PURE__ */ U(rf, {}, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/Election.tsx", - lineNumber: 346, - columnNumber: 5 - }, globalThis), - /* @__PURE__ */ U(af, {}, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/Election.tsx", - lineNumber: 347, - columnNumber: 5 - }, globalThis) -] }, void 0, !0, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Election/Election.tsx", - lineNumber: 339, - columnNumber: 3 -}, globalThis); -sf.displayName = "Election"; -const el = ve((e, r) => { - const { organization: t } = ga(), n = ir("OrganizationName", e), a = sr(e); - return t ? /* @__PURE__ */ U(ne.h1, { ref: r, ...a, __css: n, children: t.metadata.name.default }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Organization/Name.tsx", - lineNumber: 14, - columnNumber: 5 - }, globalThis) : null; -}); -el.displayName = "OrganizationName"; -const lf = ({ id: e, organization: r, ...t }) => { - const { client: n, signer: a, setSigner: o } = po(), [i, u] = ge(!1), [h, v] = ge(!1), [S, b] = ge(""), [_, C] = ge(r), R = async (Y, L) => { - u(!0); - try { - Y instanceof Go ? await n.updateAccountInfo(Y) : await n.createAccountInfo({ account: new Go(Y), faucetPackage: L }); - } catch (O) { - b(O.message); - } finally { - u(!1); - } - }; - return Ke(() => { - _ || !e || h || !n || (async () => { - u(!0); - try { - C(await n.fetchAccountInfo(e)), v(!0); - } catch (Y) { - b(Y.message); - } finally { - u(!1); - } - })(); - }, [_, e, h, n]), Ke(() => { - h || !r || v(!0); - }, [r, h]), { - ...t, - organization: _, - error: S, - loading: i, - loaded: h, - update: R - }; -}, rl = da(void 0), ga = () => { - const e = ua(rl); - if (!e) - throw new Error( - "useElection returned `undefined`, maybe you forgot to wrap the component within ?" - ); - return e; -}, tl = ({ children: e, ...r }) => { - const t = lf(r); - return /* @__PURE__ */ U(rl.Provider, { value: t, children: e }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Organization/Organization.tsx", - lineNumber: 87, - columnNumber: 10 - }, globalThis); -}; -tl.displayName = "OrganizationProvider"; -const cf = (e) => /* @__PURE__ */ U(tl, { ...e, children: /* @__PURE__ */ U(el, {}, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Organization/Organization.tsx", - lineNumber: 93, - columnNumber: 5 -}, globalThis) }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Organization/Organization.tsx", - lineNumber: 92, - columnNumber: 3 -}, globalThis); -cf.displayName = "Election"; -const N0 = (e) => { - const r = ir("OrganizationAvatar", e), { organization: t } = ga(); - if (!t) - return null; - let n = t.metadata.media.avatar; - return n || (n = t.metadata.media.logo), n ? /* @__PURE__ */ U(So, { src: n, sx: r, ...e }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Organization/Avatar.tsx", - lineNumber: 18, - columnNumber: 10 - }, globalThis) : null; -}, D0 = (e) => { - const r = ir("OrganizationDescription", e), { organization: t } = ga(); - return !t || t && !t.metadata.description ? null : /* @__PURE__ */ U(fa, { ...e, sx: r, children: t.metadata.description.default }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Organization/Description.tsx", - lineNumber: 14, - columnNumber: 5 - }, globalThis); -}, z0 = (e) => { - const r = ir("OrganizationHeader", e), { organization: t } = ga(); - if (!t) - return null; - const { header: n } = t.metadata.media; - return n ? /* @__PURE__ */ U(So, { src: n, sx: r, ...e }, void 0, !1, { - fileName: "/Users/aleix/Sites/vocdoni/ui-components/packages/components/src/components/Organization/Header.tsx", - lineNumber: 15, - columnNumber: 10 - }, globalThis) : null; -}; -var df = { - common: "background-color, border-color, color, fill, stroke, opacity, box-shadow, transform", - colors: "background-color, border-color, color, fill, stroke", - dimensions: "width, height", - position: "left, right, top, bottom", - background: "background-color, background-image, background-position" -}, uf = { - "ease-in": "cubic-bezier(0.4, 0, 1, 1)", - "ease-out": "cubic-bezier(0, 0, 0.2, 1)", - "ease-in-out": "cubic-bezier(0.4, 0, 0.2, 1)" -}, ff = { - "ultra-fast": "50ms", - faster: "100ms", - fast: "150ms", - normal: "200ms", - slow: "300ms", - slower: "400ms", - "ultra-slow": "500ms" -}, mf = { - property: df, - easing: uf, - duration: ff -}, hf = mf, vf = { - hide: -1, - auto: "auto", - base: 0, - docked: 10, - dropdown: 1e3, - sticky: 1100, - banner: 1200, - overlay: 1300, - modal: 1400, - popover: 1500, - skipLink: 1600, - toast: 1700, - tooltip: 1800 -}, gf = vf, bf = { - none: 0, - "1px": "1px solid", - "2px": "2px solid", - "4px": "4px solid", - "8px": "8px solid" -}, pf = bf, yf = { - base: "0em", - sm: "30em", - md: "48em", - lg: "62em", - xl: "80em", - "2xl": "96em" -}, Sf = yf, xf = { - transparent: "transparent", - current: "currentColor", - black: "#000000", - white: "#FFFFFF", - whiteAlpha: { - 50: "rgba(255, 255, 255, 0.04)", - 100: "rgba(255, 255, 255, 0.06)", - 200: "rgba(255, 255, 255, 0.08)", - 300: "rgba(255, 255, 255, 0.16)", - 400: "rgba(255, 255, 255, 0.24)", - 500: "rgba(255, 255, 255, 0.36)", - 600: "rgba(255, 255, 255, 0.48)", - 700: "rgba(255, 255, 255, 0.64)", - 800: "rgba(255, 255, 255, 0.80)", - 900: "rgba(255, 255, 255, 0.92)" - }, - blackAlpha: { - 50: "rgba(0, 0, 0, 0.04)", - 100: "rgba(0, 0, 0, 0.06)", - 200: "rgba(0, 0, 0, 0.08)", - 300: "rgba(0, 0, 0, 0.16)", - 400: "rgba(0, 0, 0, 0.24)", - 500: "rgba(0, 0, 0, 0.36)", - 600: "rgba(0, 0, 0, 0.48)", - 700: "rgba(0, 0, 0, 0.64)", - 800: "rgba(0, 0, 0, 0.80)", - 900: "rgba(0, 0, 0, 0.92)" - }, - gray: { - 50: "#F7FAFC", - 100: "#EDF2F7", - 200: "#E2E8F0", - 300: "#CBD5E0", - 400: "#A0AEC0", - 500: "#718096", - 600: "#4A5568", - 700: "#2D3748", - 800: "#1A202C", - 900: "#171923" - }, - red: { - 50: "#FFF5F5", - 100: "#FED7D7", - 200: "#FEB2B2", - 300: "#FC8181", - 400: "#F56565", - 500: "#E53E3E", - 600: "#C53030", - 700: "#9B2C2C", - 800: "#822727", - 900: "#63171B" - }, - orange: { - 50: "#FFFAF0", - 100: "#FEEBC8", - 200: "#FBD38D", - 300: "#F6AD55", - 400: "#ED8936", - 500: "#DD6B20", - 600: "#C05621", - 700: "#9C4221", - 800: "#7B341E", - 900: "#652B19" - }, - yellow: { - 50: "#FFFFF0", - 100: "#FEFCBF", - 200: "#FAF089", - 300: "#F6E05E", - 400: "#ECC94B", - 500: "#D69E2E", - 600: "#B7791F", - 700: "#975A16", - 800: "#744210", - 900: "#5F370E" - }, - green: { - 50: "#F0FFF4", - 100: "#C6F6D5", - 200: "#9AE6B4", - 300: "#68D391", - 400: "#48BB78", - 500: "#38A169", - 600: "#2F855A", - 700: "#276749", - 800: "#22543D", - 900: "#1C4532" - }, - teal: { - 50: "#E6FFFA", - 100: "#B2F5EA", - 200: "#81E6D9", - 300: "#4FD1C5", - 400: "#38B2AC", - 500: "#319795", - 600: "#2C7A7B", - 700: "#285E61", - 800: "#234E52", - 900: "#1D4044" - }, - blue: { - 50: "#ebf8ff", - 100: "#bee3f8", - 200: "#90cdf4", - 300: "#63b3ed", - 400: "#4299e1", - 500: "#3182ce", - 600: "#2b6cb0", - 700: "#2c5282", - 800: "#2a4365", - 900: "#1A365D" - }, - cyan: { - 50: "#EDFDFD", - 100: "#C4F1F9", - 200: "#9DECF9", - 300: "#76E4F7", - 400: "#0BC5EA", - 500: "#00B5D8", - 600: "#00A3C4", - 700: "#0987A0", - 800: "#086F83", - 900: "#065666" - }, - purple: { - 50: "#FAF5FF", - 100: "#E9D8FD", - 200: "#D6BCFA", - 300: "#B794F4", - 400: "#9F7AEA", - 500: "#805AD5", - 600: "#6B46C1", - 700: "#553C9A", - 800: "#44337A", - 900: "#322659" - }, - pink: { - 50: "#FFF5F7", - 100: "#FED7E2", - 200: "#FBB6CE", - 300: "#F687B3", - 400: "#ED64A6", - 500: "#D53F8C", - 600: "#B83280", - 700: "#97266D", - 800: "#702459", - 900: "#521B41" - }, - linkedin: { - 50: "#E8F4F9", - 100: "#CFEDFB", - 200: "#9BDAF3", - 300: "#68C7EC", - 400: "#34B3E4", - 500: "#00A0DC", - 600: "#008CC9", - 700: "#0077B5", - 800: "#005E93", - 900: "#004471" - }, - facebook: { - 50: "#E8F4F9", - 100: "#D9DEE9", - 200: "#B7C2DA", - 300: "#6482C0", - 400: "#4267B2", - 500: "#385898", - 600: "#314E89", - 700: "#29487D", - 800: "#223B67", - 900: "#1E355B" - }, - messenger: { - 50: "#D0E6FF", - 100: "#B9DAFF", - 200: "#A2CDFF", - 300: "#7AB8FF", - 400: "#2E90FF", - 500: "#0078FF", - 600: "#0063D1", - 700: "#0052AC", - 800: "#003C7E", - 900: "#002C5C" - }, - whatsapp: { - 50: "#dffeec", - 100: "#b9f5d0", - 200: "#90edb3", - 300: "#65e495", - 400: "#3cdd78", - 500: "#22c35e", - 600: "#179848", - 700: "#0c6c33", - 800: "#01421c", - 900: "#001803" - }, - twitter: { - 50: "#E5F4FD", - 100: "#C8E9FB", - 200: "#A8DCFA", - 300: "#83CDF7", - 400: "#57BBF5", - 500: "#1DA1F2", - 600: "#1A94DA", - 700: "#1681BF", - 800: "#136B9E", - 900: "#0D4D71" - }, - telegram: { - 50: "#E3F2F9", - 100: "#C5E4F3", - 200: "#A2D4EC", - 300: "#7AC1E4", - 400: "#47A9DA", - 500: "#0088CC", - 600: "#007AB8", - 700: "#006BA1", - 800: "#005885", - 900: "#003F5E" - } -}, _f = xf, wf = { - none: "0", - sm: "0.125rem", - base: "0.25rem", - md: "0.375rem", - lg: "0.5rem", - xl: "0.75rem", - "2xl": "1rem", - "3xl": "1.5rem", - full: "9999px" -}, kf = wf, Cf = { - xs: "0 0 0 1px rgba(0, 0, 0, 0.05)", - sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)", - base: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)", - md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)", - lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)", - xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)", - "2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.25)", - outline: "0 0 0 3px rgba(66, 153, 225, 0.6)", - inner: "inset 0 2px 4px 0 rgba(0,0,0,0.06)", - none: "none", - "dark-lg": "rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px" -}, Tf = Cf, Ef = { - none: 0, - sm: "4px", - base: "8px", - md: "12px", - lg: "16px", - xl: "24px", - "2xl": "40px", - "3xl": "64px" -}, $f = Ef, Rf = { - letterSpacings: { - tighter: "-0.05em", - tight: "-0.025em", - normal: "0", - wide: "0.025em", - wider: "0.05em", - widest: "0.1em" - }, - lineHeights: { - normal: "normal", - none: 1, - shorter: 1.25, - short: 1.375, - base: 1.5, - tall: 1.625, - taller: "2", - 3: ".75rem", - 4: "1rem", - 5: "1.25rem", - 6: "1.5rem", - 7: "1.75rem", - 8: "2rem", - 9: "2.25rem", - 10: "2.5rem" - }, - fontWeights: { - hairline: 100, - thin: 200, - light: 300, - normal: 400, - medium: 500, - semibold: 600, - bold: 700, - extrabold: 800, - black: 900 - }, - fonts: { - heading: '-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', - body: '-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', - mono: 'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace' - }, - fontSizes: { - "3xs": "0.45rem", - "2xs": "0.625rem", - xs: "0.75rem", - sm: "0.875rem", - md: "1rem", - lg: "1.125rem", - xl: "1.25rem", - "2xl": "1.5rem", - "3xl": "1.875rem", - "4xl": "2.25rem", - "5xl": "3rem", - "6xl": "3.75rem", - "7xl": "4.5rem", - "8xl": "6rem", - "9xl": "8rem" - } -}, nl = Rf, al = { - px: "1px", - 0.5: "0.125rem", - 1: "0.25rem", - 1.5: "0.375rem", - 2: "0.5rem", - 2.5: "0.625rem", - 3: "0.75rem", - 3.5: "0.875rem", - 4: "1rem", - 5: "1.25rem", - 6: "1.5rem", - 7: "1.75rem", - 8: "2rem", - 9: "2.25rem", - 10: "2.5rem", - 12: "3rem", - 14: "3.5rem", - 16: "4rem", - 20: "5rem", - 24: "6rem", - 28: "7rem", - 32: "8rem", - 36: "9rem", - 40: "10rem", - 44: "11rem", - 48: "12rem", - 52: "13rem", - 56: "14rem", - 60: "15rem", - 64: "16rem", - 72: "18rem", - 80: "20rem", - 96: "24rem" -}, Pf = { - max: "max-content", - min: "min-content", - full: "100%", - "3xs": "14rem", - "2xs": "16rem", - xs: "20rem", - sm: "24rem", - md: "28rem", - lg: "32rem", - xl: "36rem", - "2xl": "42rem", - "3xl": "48rem", - "4xl": "56rem", - "5xl": "64rem", - "6xl": "72rem", - "7xl": "80rem", - "8xl": "90rem", - prose: "60ch" -}, Ff = { - sm: "640px", - md: "768px", - lg: "1024px", - xl: "1280px" -}, Af = { - ...al, - ...Pf, - container: Ff -}, ol = Af, Nf = { - breakpoints: Sf, - zIndices: gf, - radii: kf, - blur: $f, - colors: _f, - ...nl, - sizes: ol, - shadows: Tf, - space: al, - borders: pf, - transition: hf -}, aa = {}, Df = { - get exports() { - return aa; - }, - set exports(e) { - aa = e; - } -}; -(function(e, r) { - var t = 200, n = "__lodash_hash_undefined__", a = 800, o = 16, i = 9007199254740991, u = "[object Arguments]", h = "[object Array]", v = "[object AsyncFunction]", S = "[object Boolean]", b = "[object Date]", _ = "[object Error]", C = "[object Function]", R = "[object GeneratorFunction]", Y = "[object Map]", L = "[object Number]", O = "[object Null]", w = "[object Object]", q = "[object Proxy]", ie = "[object RegExp]", M = "[object Set]", Q = "[object String]", K = "[object Undefined]", re = "[object WeakMap]", fe = "[object ArrayBuffer]", Ee = "[object DataView]", me = "[object Float32Array]", J = "[object Float64Array]", I = "[object Int8Array]", Z = "[object Int16Array]", ee = "[object Int32Array]", se = "[object Uint8Array]", ye = "[object Uint8ClampedArray]", Ye = "[object Uint16Array]", Ve = "[object Uint32Array]", Me = /[\\^$.*+?()[\]{}|]/g, er = /^\[object .+?Constructor\]$/, rr = /^(?:0|[1-9]\d*)$/, le = {}; - le[me] = le[J] = le[I] = le[Z] = le[ee] = le[se] = le[ye] = le[Ye] = le[Ve] = !0, le[u] = le[h] = le[fe] = le[S] = le[Ee] = le[b] = le[_] = le[C] = le[Y] = le[L] = le[w] = le[ie] = le[M] = le[Q] = le[re] = !1; - var ur = typeof Rn == "object" && Rn && Rn.Object === Object && Rn, br = typeof self == "object" && self && self.Object === Object && self, j = ur || br || Function("return this")(), ce = r && !r.nodeType && r, ae = ce && !0 && e && !e.nodeType && e, be = ae && ae.exports === ce, Pe = be && ur.process, te = function() { - try { - var s = ae && ae.require && ae.require("util").types; - return s || Pe && Pe.binding && Pe.binding("util"); - } catch { - } - }(), $e = te && te.isTypedArray; - function pr(s, f, g) { - switch (g.length) { - case 0: - return s.call(f); - case 1: - return s.call(f, g[0]); - case 2: - return s.call(f, g[0], g[1]); - case 3: - return s.call(f, g[0], g[1], g[2]); - } - return s.apply(f, g); - } - function kt(s, f) { - for (var g = -1, B = Array(s); ++g < s; ) - B[g] = f(g); - return B; - } - function yr(s) { - return function(f) { - return s(f); - }; - } - function d(s, f) { - return s == null ? void 0 : s[f]; - } - function p(s, f) { - return function(g) { - return s(f(g)); - }; - } - var x = Array.prototype, A = Function.prototype, F = Object.prototype, E = j["__core-js_shared__"], W = A.toString, de = F.hasOwnProperty, Te = function() { - var s = /[^.]+$/.exec(E && E.keys && E.keys.IE_PROTO || ""); - return s ? "Symbol(src)_1." + s : ""; - }(), tr = F.toString, jr = W.call(Object), Ge = RegExp( - "^" + W.call(de).replace(Me, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" - ), Sr = be ? j.Buffer : void 0, Fr = j.Symbol, Tr = j.Uint8Array, xr = Sr ? Sr.allocUnsafe : void 0, Vr = p(Object.getPrototypeOf, Object), Ct = Object.create, Lt = F.propertyIsEnumerable, jt = x.splice, Er = Fr ? Fr.toStringTag : void 0, et = function() { - try { - var s = xa(Object, "defineProperty"); - return s({}, "", {}), s; - } catch { - } - }(), Vt = Sr ? Sr.isBuffer : void 0, Ar = Math.max, ct = Date.now, Je = xa(j, "Map"), fr = xa(Object, "create"), Ur = function() { - function s() { - } - return function(f) { - if (!mt(f)) - return {}; - if (Ct) - return Ct(f); - s.prototype = f; - var g = new s(); - return s.prototype = void 0, g; - }; - }(); - function mr(s) { - var f = -1, g = s == null ? 0 : s.length; - for (this.clear(); ++f < g; ) { - var B = s[f]; - this.set(B[0], B[1]); - } - } - function Ut() { - this.__data__ = fr ? fr(null) : {}, this.size = 0; - } - function dt(s) { - var f = this.has(s) && delete this.__data__[s]; - return this.size -= f ? 1 : 0, f; - } - function Ht(s) { - var f = this.__data__; - if (fr) { - var g = f[s]; - return g === n ? void 0 : g; - } - return de.call(f, s) ? f[s] : void 0; - } - function ut(s) { - var f = this.__data__; - return fr ? f[s] !== void 0 : de.call(f, s); - } - function ft(s, f) { - var g = this.__data__; - return this.size += this.has(s) ? 0 : 1, g[s] = fr && f === void 0 ? n : f, this; - } - mr.prototype.clear = Ut, mr.prototype.delete = dt, mr.prototype.get = Ht, mr.prototype.has = ut, mr.prototype.set = ft; - function hr(s) { - var f = -1, g = s == null ? 0 : s.length; - for (this.clear(); ++f < g; ) { - var B = s[f]; - this.set(B[0], B[1]); - } - } - function Yt() { - this.__data__ = [], this.size = 0; - } - function Tt(s) { - var f = this.__data__, g = cr(f, s); - if (g < 0) - return !1; - var B = f.length - 1; - return g == B ? f.pop() : jt.call(f, g, 1), --this.size, !0; - } - function qt(s) { - var f = this.__data__, g = cr(f, s); - return g < 0 ? void 0 : f[g][1]; - } - function c(s) { - return cr(this.__data__, s) > -1; - } - function T(s, f) { - var g = this.__data__, B = cr(g, s); - return B < 0 ? (++this.size, g.push([s, f])) : g[B][1] = f, this; - } - hr.prototype.clear = Yt, hr.prototype.delete = Tt, hr.prototype.get = qt, hr.prototype.has = c, hr.prototype.set = T; - function P(s) { - var f = -1, g = s == null ? 0 : s.length; - for (this.clear(); ++f < g; ) { - var B = s[f]; - this.set(B[0], B[1]); - } - } - function l() { - this.size = 0, this.__data__ = { - hash: new mr(), - map: new (Je || hr)(), - string: new mr() - }; - } - function y(s) { - var f = En(this, s).delete(s); - return this.size -= f ? 1 : 0, f; - } - function k(s) { - return En(this, s).get(s); - } - function $(s) { - return En(this, s).has(s); - } - function D(s, f) { - var g = En(this, s), B = g.size; - return g.set(s, f), this.size += g.size == B ? 0 : 1, this; - } - P.prototype.clear = l, P.prototype.delete = y, P.prototype.get = k, P.prototype.has = $, P.prototype.set = D; - function X(s) { - var f = this.__data__ = new hr(s); - this.size = f.size; - } - function H() { - this.__data__ = new hr(), this.size = 0; - } - function V(s) { - var f = this.__data__, g = f.delete(s); - return this.size = f.size, g; - } - function _e(s) { - return this.__data__.get(s); - } - function we(s) { - return this.__data__.has(s); - } - function Ne(s, f) { - var g = this.__data__; - if (g instanceof hr) { - var B = g.__data__; - if (!Je || B.length < t - 1) - return B.push([s, f]), this.size = ++g.size, this; - g = this.__data__ = new P(B); - } - return g.set(s, f), this.size = g.size, this; - } - X.prototype.clear = H, X.prototype.delete = V, X.prototype.get = _e, X.prototype.has = we, X.prototype.set = Ne; - function ze(s, f) { - var g = ka(s), B = !g && wa(s), he = !g && !B && Wo(s), Re = !g && !B && !he && jo(s), Oe = g || B || he || Re, ue = Oe ? kt(s.length, String) : [], Ie = ue.length; - for (var _r in s) - (f || de.call(s, _r)) && !(Oe && // Safari 9 has enumerable `arguments.length` in strict mode. - (_r == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. - he && (_r == "offset" || _r == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. - Re && (_r == "buffer" || _r == "byteLength" || _r == "byteOffset") || // Skip index properties. - Bo(_r, Ie))) && ue.push(_r); - return ue; - } - function Nr(s, f, g) { - (g !== void 0 && !$n(s[f], g) || g === void 0 && !(f in s)) && Sa(s, f, g); - } - function Cn(s, f, g) { - var B = s[f]; - (!(de.call(s, f) && $n(B, g)) || g === void 0 && !(f in s)) && Sa(s, f, g); - } - function cr(s, f) { - for (var g = s.length; g--; ) - if ($n(s[g][0], f)) - return g; - return -1; - } - function Sa(s, f, g) { - f == "__proto__" && et ? et(s, f, { - configurable: !0, - enumerable: !0, - value: g, - writable: !0 - }) : s[f] = g; - } - var _l = zl(); - function Tn(s) { - return s == null ? s === void 0 ? K : O : Er && Er in Object(s) ? Ol(s) : jl(s); - } - function Oo(s) { - return Gt(s) && Tn(s) == u; - } - function wl(s) { - if (!mt(s) || Wl(s)) - return !1; - var f = Ta(s) ? Ge : er; - return f.test(Yl(s)); - } - function kl(s) { - return Gt(s) && Lo(s.length) && !!le[Tn(s)]; - } - function Cl(s) { - if (!mt(s)) - return Ll(s); - var f = Mo(s), g = []; - for (var B in s) - B == "constructor" && (f || !de.call(s, B)) || g.push(B); - return g; - } - function Io(s, f, g, B, he) { - s !== f && _l(f, function(Re, Oe) { - if (he || (he = new X()), mt(Re)) - Tl(s, f, Oe, g, Io, B, he); - else { - var ue = B ? B(_a(s, Oe), Re, Oe + "", s, f, he) : void 0; - ue === void 0 && (ue = Re), Nr(s, Oe, ue); - } - }, Vo); - } - function Tl(s, f, g, B, he, Re, Oe) { - var ue = _a(s, g), Ie = _a(f, g), _r = Oe.get(Ie); - if (_r) { - Nr(s, g, _r); - return; - } - var vr = Re ? Re(ue, Ie, g + "", s, f, Oe) : void 0, Xt = vr === void 0; - if (Xt) { - var Ea = ka(Ie), $a = !Ea && Wo(Ie), Ho = !Ea && !$a && jo(Ie); - vr = Ie, Ea || $a || Ho ? ka(ue) ? vr = ue : ql(ue) ? vr = Al(ue) : $a ? (Xt = !1, vr = Rl(Ie, !0)) : Ho ? (Xt = !1, vr = Fl(Ie, !0)) : vr = [] : Gl(Ie) || wa(Ie) ? (vr = ue, wa(ue) ? vr = Xl(ue) : (!mt(ue) || Ta(ue)) && (vr = Il(Ie))) : Xt = !1; - } - Xt && (Oe.set(Ie, vr), he(vr, Ie, B, Re, Oe), Oe.delete(Ie)), Nr(s, g, vr); - } - function El(s, f) { - return Ul(Vl(s, f, Uo), s + ""); - } - var $l = et ? function(s, f) { - return et(s, "toString", { - configurable: !0, - enumerable: !1, - value: Kl(f), - writable: !0 - }); - } : Uo; - function Rl(s, f) { - if (f) - return s.slice(); - var g = s.length, B = xr ? xr(g) : new s.constructor(g); - return s.copy(B), B; - } - function Pl(s) { - var f = new s.constructor(s.byteLength); - return new Tr(f).set(new Tr(s)), f; - } - function Fl(s, f) { - var g = f ? Pl(s.buffer) : s.buffer; - return new s.constructor(g, s.byteOffset, s.length); - } - function Al(s, f) { - var g = -1, B = s.length; - for (f || (f = Array(B)); ++g < B; ) - f[g] = s[g]; - return f; - } - function Nl(s, f, g, B) { - var he = !g; - g || (g = {}); - for (var Re = -1, Oe = f.length; ++Re < Oe; ) { - var ue = f[Re], Ie = B ? B(g[ue], s[ue], ue, g, s) : void 0; - Ie === void 0 && (Ie = s[ue]), he ? Sa(g, ue, Ie) : Cn(g, ue, Ie); - } - return g; - } - function Dl(s) { - return El(function(f, g) { - var B = -1, he = g.length, Re = he > 1 ? g[he - 1] : void 0, Oe = he > 2 ? g[2] : void 0; - for (Re = s.length > 3 && typeof Re == "function" ? (he--, Re) : void 0, Oe && Bl(g[0], g[1], Oe) && (Re = he < 3 ? void 0 : Re, he = 1), f = Object(f); ++B < he; ) { - var ue = g[B]; - ue && s(f, ue, B, Re); - } - return f; - }); - } - function zl(s) { - return function(f, g, B) { - for (var he = -1, Re = Object(f), Oe = B(f), ue = Oe.length; ue--; ) { - var Ie = Oe[s ? ue : ++he]; - if (g(Re[Ie], Ie, Re) === !1) - break; - } - return f; - }; - } - function En(s, f) { - var g = s.__data__; - return Ml(f) ? g[typeof f == "string" ? "string" : "hash"] : g.map; - } - function xa(s, f) { - var g = d(s, f); - return wl(g) ? g : void 0; - } - function Ol(s) { - var f = de.call(s, Er), g = s[Er]; - try { - s[Er] = void 0; - var B = !0; - } catch { - } - var he = tr.call(s); - return B && (f ? s[Er] = g : delete s[Er]), he; - } - function Il(s) { - return typeof s.constructor == "function" && !Mo(s) ? Ur(Vr(s)) : {}; - } - function Bo(s, f) { - var g = typeof s; - return f = f ?? i, !!f && (g == "number" || g != "symbol" && rr.test(s)) && s > -1 && s % 1 == 0 && s < f; - } - function Bl(s, f, g) { - if (!mt(g)) - return !1; - var B = typeof f; - return (B == "number" ? Ca(g) && Bo(f, g.length) : B == "string" && f in g) ? $n(g[f], s) : !1; - } - function Ml(s) { - var f = typeof s; - return f == "string" || f == "number" || f == "symbol" || f == "boolean" ? s !== "__proto__" : s === null; - } - function Wl(s) { - return !!Te && Te in s; - } - function Mo(s) { - var f = s && s.constructor, g = typeof f == "function" && f.prototype || F; - return s === g; - } - function Ll(s) { - var f = []; - if (s != null) - for (var g in Object(s)) - f.push(g); - return f; - } - function jl(s) { - return tr.call(s); - } - function Vl(s, f, g) { - return f = Ar(f === void 0 ? s.length - 1 : f, 0), function() { - for (var B = arguments, he = -1, Re = Ar(B.length - f, 0), Oe = Array(Re); ++he < Re; ) - Oe[he] = B[f + he]; - he = -1; - for (var ue = Array(f + 1); ++he < f; ) - ue[he] = B[he]; - return ue[f] = g(Oe), pr(s, this, ue); - }; - } - function _a(s, f) { - if (!(f === "constructor" && typeof s[f] == "function") && f != "__proto__") - return s[f]; - } - var Ul = Hl($l); - function Hl(s) { - var f = 0, g = 0; - return function() { - var B = ct(), he = o - (B - g); - if (g = B, he > 0) { - if (++f >= a) - return arguments[0]; - } else - f = 0; - return s.apply(void 0, arguments); - }; - } - function Yl(s) { - if (s != null) { - try { - return W.call(s); - } catch { - } - try { - return s + ""; - } catch { - } - } - return ""; - } - function $n(s, f) { - return s === f || s !== s && f !== f; - } - var wa = Oo(function() { - return arguments; - }()) ? Oo : function(s) { - return Gt(s) && de.call(s, "callee") && !Lt.call(s, "callee"); - }, ka = Array.isArray; - function Ca(s) { - return s != null && Lo(s.length) && !Ta(s); - } - function ql(s) { - return Gt(s) && Ca(s); - } - var Wo = Vt || Jl; - function Ta(s) { - if (!mt(s)) - return !1; - var f = Tn(s); - return f == C || f == R || f == v || f == q; - } - function Lo(s) { - return typeof s == "number" && s > -1 && s % 1 == 0 && s <= i; - } - function mt(s) { - var f = typeof s; - return s != null && (f == "object" || f == "function"); - } - function Gt(s) { - return s != null && typeof s == "object"; - } - function Gl(s) { - if (!Gt(s) || Tn(s) != w) - return !1; - var f = Vr(s); - if (f === null) - return !0; - var g = de.call(f, "constructor") && f.constructor; - return typeof g == "function" && g instanceof g && W.call(g) == jr; - } - var jo = $e ? yr($e) : kl; - function Xl(s) { - return Nl(s, Vo(s)); - } - function Vo(s) { - return Ca(s) ? ze(s, !0) : Cl(s); - } - var Ql = Dl(function(s, f, g, B) { - Io(s, f, g, B); - }); - function Kl(s) { - return function() { - return s; - }; - } - function Uo(s) { - return s; - } - function Jl() { - return !1; - } - e.exports = Ql; -})(Df, aa); -const zf = aa; -var Of = (e) => /!(important)?$/.test(e), pi = (e) => typeof e == "string" ? e.replace(/!(important)?$/, "").trim() : e, If = (e, r) => (t) => { - const n = String(r), a = Of(n), o = pi(n), i = e ? `${e}.${o}` : o; - let u = Mt(t.__cssMap) && i in t.__cssMap ? t.__cssMap[i].varRef : r; - return u = pi(u), a ? `${u} !important` : u; -}; -function Po(e) { - const { scale: r, transform: t, compose: n } = e; - return (o, i) => { - var u; - const h = If(r, o)(i); - let v = (u = t == null ? void 0 : t(h, i)) != null ? u : h; - return n && (v = n(v, i)), v; - }; -} -var An = (...e) => (r) => e.reduce((t, n) => n(t), r); -function wr(e, r) { - return (t) => { - const n = { property: t, scale: e }; - return n.transform = Po({ - scale: e, - transform: r - }), n; - }; -} -var Bf = ({ rtl: e, ltr: r }) => (t) => t.direction === "rtl" ? e : r; -function Mf(e) { - const { property: r, scale: t, transform: n } = e; - return { - scale: t, - property: Bf(r), - transform: t ? Po({ - scale: t, - compose: n - }) : n - }; -} -var il = [ - "rotate(var(--chakra-rotate, 0))", - "scaleX(var(--chakra-scale-x, 1))", - "scaleY(var(--chakra-scale-y, 1))", - "skewX(var(--chakra-skew-x, 0))", - "skewY(var(--chakra-skew-y, 0))" -]; -function Wf() { - return [ - "translateX(var(--chakra-translate-x, 0))", - "translateY(var(--chakra-translate-y, 0))", - ...il - ].join(" "); -} -function Lf() { - return [ - "translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)", - ...il - ].join(" "); -} -var jf = { - "--chakra-blur": "var(--chakra-empty,/*!*/ /*!*/)", - "--chakra-brightness": "var(--chakra-empty,/*!*/ /*!*/)", - "--chakra-contrast": "var(--chakra-empty,/*!*/ /*!*/)", - "--chakra-grayscale": "var(--chakra-empty,/*!*/ /*!*/)", - "--chakra-hue-rotate": "var(--chakra-empty,/*!*/ /*!*/)", - "--chakra-invert": "var(--chakra-empty,/*!*/ /*!*/)", - "--chakra-saturate": "var(--chakra-empty,/*!*/ /*!*/)", - "--chakra-sepia": "var(--chakra-empty,/*!*/ /*!*/)", - "--chakra-drop-shadow": "var(--chakra-empty,/*!*/ /*!*/)", - filter: [ - "var(--chakra-blur)", - "var(--chakra-brightness)", - "var(--chakra-contrast)", - "var(--chakra-grayscale)", - "var(--chakra-hue-rotate)", - "var(--chakra-invert)", - "var(--chakra-saturate)", - "var(--chakra-sepia)", - "var(--chakra-drop-shadow)" - ].join(" ") -}, Vf = { - backdropFilter: [ - "var(--chakra-backdrop-blur)", - "var(--chakra-backdrop-brightness)", - "var(--chakra-backdrop-contrast)", - "var(--chakra-backdrop-grayscale)", - "var(--chakra-backdrop-hue-rotate)", - "var(--chakra-backdrop-invert)", - "var(--chakra-backdrop-opacity)", - "var(--chakra-backdrop-saturate)", - "var(--chakra-backdrop-sepia)" - ].join(" "), - "--chakra-backdrop-blur": "var(--chakra-empty,/*!*/ /*!*/)", - "--chakra-backdrop-brightness": "var(--chakra-empty,/*!*/ /*!*/)", - "--chakra-backdrop-contrast": "var(--chakra-empty,/*!*/ /*!*/)", - "--chakra-backdrop-grayscale": "var(--chakra-empty,/*!*/ /*!*/)", - "--chakra-backdrop-hue-rotate": "var(--chakra-empty,/*!*/ /*!*/)", - "--chakra-backdrop-invert": "var(--chakra-empty,/*!*/ /*!*/)", - "--chakra-backdrop-opacity": "var(--chakra-empty,/*!*/ /*!*/)", - "--chakra-backdrop-saturate": "var(--chakra-empty,/*!*/ /*!*/)", - "--chakra-backdrop-sepia": "var(--chakra-empty,/*!*/ /*!*/)" -}; -function Uf(e) { - return { - "--chakra-ring-offset-shadow": "var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)", - "--chakra-ring-shadow": "var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)", - "--chakra-ring-width": e, - boxShadow: [ - "var(--chakra-ring-offset-shadow)", - "var(--chakra-ring-shadow)", - "var(--chakra-shadow, 0 0 #0000)" - ].join(", ") - }; -} -var Hf = { - "row-reverse": { - space: "--chakra-space-x-reverse", - divide: "--chakra-divide-x-reverse" - }, - "column-reverse": { - space: "--chakra-space-y-reverse", - divide: "--chakra-divide-y-reverse" - } -}, so = { - "to-t": "to top", - "to-tr": "to top right", - "to-r": "to right", - "to-br": "to bottom right", - "to-b": "to bottom", - "to-bl": "to bottom left", - "to-l": "to left", - "to-tl": "to top left" -}, Yf = new Set(Object.values(so)), lo = /* @__PURE__ */ new Set([ - "none", - "-moz-initial", - "inherit", - "initial", - "revert", - "unset" -]), qf = (e) => e.trim(); -function Gf(e, r) { - if (e == null || lo.has(e)) - return e; - if (!(co(e) || lo.has(e))) - return `url('${e}')`; - const a = /(^[a-z-A-Z]+)\((.*)\)/g.exec(e), o = a == null ? void 0 : a[1], i = a == null ? void 0 : a[2]; - if (!o || !i) - return e; - const u = o.includes("-gradient") ? o : `${o}-gradient`, [h, ...v] = i.split(",").map(qf).filter(Boolean); - if ((v == null ? void 0 : v.length) === 0) - return e; - const S = h in so ? so[h] : h; - v.unshift(S); - const b = v.map((_) => { - if (Yf.has(_)) - return _; - const C = _.indexOf(" "), [R, Y] = C !== -1 ? [_.substr(0, C), _.substr(C + 1)] : [_], L = co(Y) ? Y : Y && Y.split(" "), O = `colors.${R}`, w = O in r.__cssMap ? r.__cssMap[O].varRef : R; - return L ? [ - w, - ...Array.isArray(L) ? L : [L] - ].join(" ") : w; - }); - return `${u}(${b.join(", ")})`; -} -var co = (e) => typeof e == "string" && e.includes("(") && e.includes(")"), Xf = (e, r) => Gf(e, r ?? {}); -function Qf(e) { - return /^var\(--.+\)$/.test(e); -} -var Kf = (e) => { - const r = parseFloat(e.toString()), t = e.toString().replace(String(r), ""); - return { unitless: !t, value: r, unit: t }; -}, zr = (e) => (r) => `${e}(${r})`, pe = { - filter(e) { - return e !== "auto" ? e : jf; - }, - backdropFilter(e) { - return e !== "auto" ? e : Vf; - }, - ring(e) { - return Uf(pe.px(e)); - }, - bgClip(e) { - return e === "text" ? { color: "transparent", backgroundClip: "text" } : { backgroundClip: e }; - }, - transform(e) { - return e === "auto" ? Wf() : e === "auto-gpu" ? Lf() : e; - }, - vh(e) { - return e === "$100vh" ? "var(--chakra-vh)" : e; - }, - px(e) { - if (e == null) - return e; - const { unitless: r } = Kf(e); - return r || typeof e == "number" ? `${e}px` : e; - }, - fraction(e) { - return typeof e != "number" || e > 1 ? e : `${e * 100}%`; - }, - float(e, r) { - const t = { left: "right", right: "left" }; - return r.direction === "rtl" ? t[e] : e; - }, - degree(e) { - if (Qf(e) || e == null) - return e; - const r = typeof e == "string" && !e.endsWith("deg"); - return typeof e == "number" || r ? `${e}deg` : e; - }, - gradient: Xf, - blur: zr("blur"), - opacity: zr("opacity"), - brightness: zr("brightness"), - contrast: zr("contrast"), - dropShadow: zr("drop-shadow"), - grayscale: zr("grayscale"), - hueRotate: zr("hue-rotate"), - invert: zr("invert"), - saturate: zr("saturate"), - sepia: zr("sepia"), - bgImage(e) { - return e == null || co(e) || lo.has(e) ? e : `url(${e})`; - }, - outline(e) { - const r = String(e) === "0" || String(e) === "none"; - return e !== null && r ? { outline: "2px solid transparent", outlineOffset: "2px" } : { outline: e }; - }, - flexDirection(e) { - var r; - const { space: t, divide: n } = (r = Hf[e]) != null ? r : {}, a = { flexDirection: e }; - return t && (a[t] = 1), n && (a[n] = 1), a; - } -}, m = { - borderWidths: wr("borderWidths"), - borderStyles: wr("borderStyles"), - colors: wr("colors"), - borders: wr("borders"), - gradients: wr("gradients", pe.gradient), - radii: wr("radii", pe.px), - space: wr("space", An(pe.vh, pe.px)), - spaceT: wr("space", An(pe.vh, pe.px)), - degreeT(e) { - return { property: e, transform: pe.degree }; - }, - prop(e, r, t) { - return { - property: e, - scale: r, - ...r && { - transform: Po({ scale: r, transform: t }) - } - }; - }, - propT(e, r) { - return { property: e, transform: r }; - }, - sizes: wr("sizes", An(pe.vh, pe.px)), - sizesT: wr("sizes", An(pe.vh, pe.fraction)), - shadows: wr("shadows"), - logical: Mf, - blur: wr("blur", pe.blur) -}, Hn = { - background: m.colors("background"), - backgroundColor: m.colors("backgroundColor"), - backgroundImage: m.gradients("backgroundImage"), - backgroundSize: !0, - backgroundPosition: !0, - backgroundRepeat: !0, - backgroundAttachment: !0, - backgroundClip: { transform: pe.bgClip }, - bgSize: m.prop("backgroundSize"), - bgPosition: m.prop("backgroundPosition"), - bg: m.colors("background"), - bgColor: m.colors("backgroundColor"), - bgPos: m.prop("backgroundPosition"), - bgRepeat: m.prop("backgroundRepeat"), - bgAttachment: m.prop("backgroundAttachment"), - bgGradient: m.gradients("backgroundImage"), - bgClip: { transform: pe.bgClip } -}; -Object.assign(Hn, { - bgImage: Hn.backgroundImage, - bgImg: Hn.backgroundImage -}); -var Se = { - border: m.borders("border"), - borderWidth: m.borderWidths("borderWidth"), - borderStyle: m.borderStyles("borderStyle"), - borderColor: m.colors("borderColor"), - borderRadius: m.radii("borderRadius"), - borderTop: m.borders("borderTop"), - borderBlockStart: m.borders("borderBlockStart"), - borderTopLeftRadius: m.radii("borderTopLeftRadius"), - borderStartStartRadius: m.logical({ - scale: "radii", - property: { - ltr: "borderTopLeftRadius", - rtl: "borderTopRightRadius" - } - }), - borderEndStartRadius: m.logical({ - scale: "radii", - property: { - ltr: "borderBottomLeftRadius", - rtl: "borderBottomRightRadius" - } - }), - borderTopRightRadius: m.radii("borderTopRightRadius"), - borderStartEndRadius: m.logical({ - scale: "radii", - property: { - ltr: "borderTopRightRadius", - rtl: "borderTopLeftRadius" - } - }), - borderEndEndRadius: m.logical({ - scale: "radii", - property: { - ltr: "borderBottomRightRadius", - rtl: "borderBottomLeftRadius" - } - }), - borderRight: m.borders("borderRight"), - borderInlineEnd: m.borders("borderInlineEnd"), - borderBottom: m.borders("borderBottom"), - borderBlockEnd: m.borders("borderBlockEnd"), - borderBottomLeftRadius: m.radii("borderBottomLeftRadius"), - borderBottomRightRadius: m.radii("borderBottomRightRadius"), - borderLeft: m.borders("borderLeft"), - borderInlineStart: { - property: "borderInlineStart", - scale: "borders" - }, - borderInlineStartRadius: m.logical({ - scale: "radii", - property: { - ltr: ["borderTopLeftRadius", "borderBottomLeftRadius"], - rtl: ["borderTopRightRadius", "borderBottomRightRadius"] - } - }), - borderInlineEndRadius: m.logical({ - scale: "radii", - property: { - ltr: ["borderTopRightRadius", "borderBottomRightRadius"], - rtl: ["borderTopLeftRadius", "borderBottomLeftRadius"] - } - }), - borderX: m.borders(["borderLeft", "borderRight"]), - borderInline: m.borders("borderInline"), - borderY: m.borders(["borderTop", "borderBottom"]), - borderBlock: m.borders("borderBlock"), - borderTopWidth: m.borderWidths("borderTopWidth"), - borderBlockStartWidth: m.borderWidths("borderBlockStartWidth"), - borderTopColor: m.colors("borderTopColor"), - borderBlockStartColor: m.colors("borderBlockStartColor"), - borderTopStyle: m.borderStyles("borderTopStyle"), - borderBlockStartStyle: m.borderStyles("borderBlockStartStyle"), - borderBottomWidth: m.borderWidths("borderBottomWidth"), - borderBlockEndWidth: m.borderWidths("borderBlockEndWidth"), - borderBottomColor: m.colors("borderBottomColor"), - borderBlockEndColor: m.colors("borderBlockEndColor"), - borderBottomStyle: m.borderStyles("borderBottomStyle"), - borderBlockEndStyle: m.borderStyles("borderBlockEndStyle"), - borderLeftWidth: m.borderWidths("borderLeftWidth"), - borderInlineStartWidth: m.borderWidths("borderInlineStartWidth"), - borderLeftColor: m.colors("borderLeftColor"), - borderInlineStartColor: m.colors("borderInlineStartColor"), - borderLeftStyle: m.borderStyles("borderLeftStyle"), - borderInlineStartStyle: m.borderStyles("borderInlineStartStyle"), - borderRightWidth: m.borderWidths("borderRightWidth"), - borderInlineEndWidth: m.borderWidths("borderInlineEndWidth"), - borderRightColor: m.colors("borderRightColor"), - borderInlineEndColor: m.colors("borderInlineEndColor"), - borderRightStyle: m.borderStyles("borderRightStyle"), - borderInlineEndStyle: m.borderStyles("borderInlineEndStyle"), - borderTopRadius: m.radii(["borderTopLeftRadius", "borderTopRightRadius"]), - borderBottomRadius: m.radii([ - "borderBottomLeftRadius", - "borderBottomRightRadius" - ]), - borderLeftRadius: m.radii(["borderTopLeftRadius", "borderBottomLeftRadius"]), - borderRightRadius: m.radii([ - "borderTopRightRadius", - "borderBottomRightRadius" - ]) -}; -Object.assign(Se, { - rounded: Se.borderRadius, - roundedTop: Se.borderTopRadius, - roundedTopLeft: Se.borderTopLeftRadius, - roundedTopRight: Se.borderTopRightRadius, - roundedTopStart: Se.borderStartStartRadius, - roundedTopEnd: Se.borderStartEndRadius, - roundedBottom: Se.borderBottomRadius, - roundedBottomLeft: Se.borderBottomLeftRadius, - roundedBottomRight: Se.borderBottomRightRadius, - roundedBottomStart: Se.borderEndStartRadius, - roundedBottomEnd: Se.borderEndEndRadius, - roundedLeft: Se.borderLeftRadius, - roundedRight: Se.borderRightRadius, - roundedStart: Se.borderInlineStartRadius, - roundedEnd: Se.borderInlineEndRadius, - borderStart: Se.borderInlineStart, - borderEnd: Se.borderInlineEnd, - borderTopStartRadius: Se.borderStartStartRadius, - borderTopEndRadius: Se.borderStartEndRadius, - borderBottomStartRadius: Se.borderEndStartRadius, - borderBottomEndRadius: Se.borderEndEndRadius, - borderStartRadius: Se.borderInlineStartRadius, - borderEndRadius: Se.borderInlineEndRadius, - borderStartWidth: Se.borderInlineStartWidth, - borderEndWidth: Se.borderInlineEndWidth, - borderStartColor: Se.borderInlineStartColor, - borderEndColor: Se.borderInlineEndColor, - borderStartStyle: Se.borderInlineStartStyle, - borderEndStyle: Se.borderInlineEndStyle -}); -var Jf = { - color: m.colors("color"), - textColor: m.colors("color"), - fill: m.colors("fill"), - stroke: m.colors("stroke") -}, uo = { - boxShadow: m.shadows("boxShadow"), - mixBlendMode: !0, - blendMode: m.prop("mixBlendMode"), - backgroundBlendMode: !0, - bgBlendMode: m.prop("backgroundBlendMode"), - opacity: !0 -}; -Object.assign(uo, { - shadow: uo.boxShadow -}); -var Zf = { - filter: { transform: pe.filter }, - blur: m.blur("--chakra-blur"), - brightness: m.propT("--chakra-brightness", pe.brightness), - contrast: m.propT("--chakra-contrast", pe.contrast), - hueRotate: m.degreeT("--chakra-hue-rotate"), - invert: m.propT("--chakra-invert", pe.invert), - saturate: m.propT("--chakra-saturate", pe.saturate), - dropShadow: m.propT("--chakra-drop-shadow", pe.dropShadow), - backdropFilter: { transform: pe.backdropFilter }, - backdropBlur: m.blur("--chakra-backdrop-blur"), - backdropBrightness: m.propT( - "--chakra-backdrop-brightness", - pe.brightness - ), - backdropContrast: m.propT("--chakra-backdrop-contrast", pe.contrast), - backdropHueRotate: m.degreeT("--chakra-backdrop-hue-rotate"), - backdropInvert: m.propT("--chakra-backdrop-invert", pe.invert), - backdropSaturate: m.propT("--chakra-backdrop-saturate", pe.saturate) -}, oa = { - alignItems: !0, - alignContent: !0, - justifyItems: !0, - justifyContent: !0, - flexWrap: !0, - flexDirection: { transform: pe.flexDirection }, - flex: !0, - flexFlow: !0, - flexGrow: !0, - flexShrink: !0, - flexBasis: m.sizes("flexBasis"), - justifySelf: !0, - alignSelf: !0, - order: !0, - placeItems: !0, - placeContent: !0, - placeSelf: !0, - gap: m.space("gap"), - rowGap: m.space("rowGap"), - columnGap: m.space("columnGap") -}; -Object.assign(oa, { - flexDir: oa.flexDirection -}); -var sl = { - gridGap: m.space("gridGap"), - gridColumnGap: m.space("gridColumnGap"), - gridRowGap: m.space("gridRowGap"), - gridColumn: !0, - gridRow: !0, - gridAutoFlow: !0, - gridAutoColumns: !0, - gridColumnStart: !0, - gridColumnEnd: !0, - gridRowStart: !0, - gridRowEnd: !0, - gridAutoRows: !0, - gridTemplate: !0, - gridTemplateColumns: !0, - gridTemplateRows: !0, - gridTemplateAreas: !0, - gridArea: !0 -}, em = { - appearance: !0, - cursor: !0, - resize: !0, - userSelect: !0, - pointerEvents: !0, - outline: { transform: pe.outline }, - outlineOffset: !0, - outlineColor: m.colors("outlineColor") -}, kr = { - width: m.sizesT("width"), - inlineSize: m.sizesT("inlineSize"), - height: m.sizes("height"), - blockSize: m.sizes("blockSize"), - boxSize: m.sizes(["width", "height"]), - minWidth: m.sizes("minWidth"), - minInlineSize: m.sizes("minInlineSize"), - minHeight: m.sizes("minHeight"), - minBlockSize: m.sizes("minBlockSize"), - maxWidth: m.sizes("maxWidth"), - maxInlineSize: m.sizes("maxInlineSize"), - maxHeight: m.sizes("maxHeight"), - maxBlockSize: m.sizes("maxBlockSize"), - overflow: !0, - overflowX: !0, - overflowY: !0, - overscrollBehavior: !0, - overscrollBehaviorX: !0, - overscrollBehaviorY: !0, - display: !0, - hideFrom: { - scale: "breakpoints", - transform: (e, r) => { - var t, n, a; - return { [`@media screen and (min-width: ${(a = (n = (t = r.__breakpoints) == null ? void 0 : t.get(e)) == null ? void 0 : n.minW) != null ? a : e})`]: { display: "none" } }; - } - }, - hideBelow: { - scale: "breakpoints", - transform: (e, r) => { - var t, n, a; - return { [`@media screen and (max-width: ${(a = (n = (t = r.__breakpoints) == null ? void 0 : t.get(e)) == null ? void 0 : n._minW) != null ? a : e})`]: { display: "none" } }; - } - }, - verticalAlign: !0, - boxSizing: !0, - boxDecorationBreak: !0, - float: m.propT("float", pe.float), - objectFit: !0, - objectPosition: !0, - visibility: !0, - isolation: !0 -}; -Object.assign(kr, { - w: kr.width, - h: kr.height, - minW: kr.minWidth, - maxW: kr.maxWidth, - minH: kr.minHeight, - maxH: kr.maxHeight, - overscroll: kr.overscrollBehavior, - overscrollX: kr.overscrollBehaviorX, - overscrollY: kr.overscrollBehaviorY -}); -var rm = { - listStyleType: !0, - listStylePosition: !0, - listStylePos: m.prop("listStylePosition"), - listStyleImage: !0, - listStyleImg: m.prop("listStyleImage") -}; -function tm(e, r, t, n) { - const a = typeof r == "string" ? r.split(".") : [r]; - for (n = 0; n < a.length && e; n += 1) - e = e[a[n]]; - return e === void 0 ? t : e; -} -var nm = (e) => { - const r = /* @__PURE__ */ new WeakMap(); - return (n, a, o, i) => { - if (typeof n > "u") - return e(n, a, o); - r.has(n) || r.set(n, /* @__PURE__ */ new Map()); - const u = r.get(n); - if (u.has(a)) - return u.get(a); - const h = e(n, a, o, i); - return u.set(a, h), h; - }; -}, am = nm(tm), om = { - border: "0px", - clip: "rect(0, 0, 0, 0)", - width: "1px", - height: "1px", - margin: "-1px", - padding: "0px", - overflow: "hidden", - whiteSpace: "nowrap", - position: "absolute" -}, im = { - position: "static", - width: "auto", - height: "auto", - clip: "auto", - padding: "0", - margin: "0", - overflow: "visible", - whiteSpace: "normal" -}, za = (e, r, t) => { - const n = {}, a = am(e, r, {}); - for (const o in a) - o in t && t[o] != null || (n[o] = a[o]); - return n; -}, sm = { - srOnly: { - transform(e) { - return e === !0 ? om : e === "focusable" ? im : {}; - } - }, - layerStyle: { - processResult: !0, - transform: (e, r, t) => za(r, `layerStyles.${e}`, t) - }, - textStyle: { - processResult: !0, - transform: (e, r, t) => za(r, `textStyles.${e}`, t) - }, - apply: { - processResult: !0, - transform: (e, r, t) => za(r, e, t) - } -}, un = { - position: !0, - pos: m.prop("position"), - zIndex: m.prop("zIndex", "zIndices"), - inset: m.spaceT("inset"), - insetX: m.spaceT(["left", "right"]), - insetInline: m.spaceT("insetInline"), - insetY: m.spaceT(["top", "bottom"]), - insetBlock: m.spaceT("insetBlock"), - top: m.spaceT("top"), - insetBlockStart: m.spaceT("insetBlockStart"), - bottom: m.spaceT("bottom"), - insetBlockEnd: m.spaceT("insetBlockEnd"), - left: m.spaceT("left"), - insetInlineStart: m.logical({ - scale: "space", - property: { ltr: "left", rtl: "right" } - }), - right: m.spaceT("right"), - insetInlineEnd: m.logical({ - scale: "space", - property: { ltr: "right", rtl: "left" } - }) -}; -Object.assign(un, { - insetStart: un.insetInlineStart, - insetEnd: un.insetInlineEnd -}); -var lm = { - ring: { transform: pe.ring }, - ringColor: m.colors("--chakra-ring-color"), - ringOffset: m.prop("--chakra-ring-offset-width"), - ringOffsetColor: m.colors("--chakra-ring-offset-color"), - ringInset: m.prop("--chakra-ring-inset") -}, De = { - margin: m.spaceT("margin"), - marginTop: m.spaceT("marginTop"), - marginBlockStart: m.spaceT("marginBlockStart"), - marginRight: m.spaceT("marginRight"), - marginInlineEnd: m.spaceT("marginInlineEnd"), - marginBottom: m.spaceT("marginBottom"), - marginBlockEnd: m.spaceT("marginBlockEnd"), - marginLeft: m.spaceT("marginLeft"), - marginInlineStart: m.spaceT("marginInlineStart"), - marginX: m.spaceT(["marginInlineStart", "marginInlineEnd"]), - marginInline: m.spaceT("marginInline"), - marginY: m.spaceT(["marginTop", "marginBottom"]), - marginBlock: m.spaceT("marginBlock"), - padding: m.space("padding"), - paddingTop: m.space("paddingTop"), - paddingBlockStart: m.space("paddingBlockStart"), - paddingRight: m.space("paddingRight"), - paddingBottom: m.space("paddingBottom"), - paddingBlockEnd: m.space("paddingBlockEnd"), - paddingLeft: m.space("paddingLeft"), - paddingInlineStart: m.space("paddingInlineStart"), - paddingInlineEnd: m.space("paddingInlineEnd"), - paddingX: m.space(["paddingInlineStart", "paddingInlineEnd"]), - paddingInline: m.space("paddingInline"), - paddingY: m.space(["paddingTop", "paddingBottom"]), - paddingBlock: m.space("paddingBlock") -}; -Object.assign(De, { - m: De.margin, - mt: De.marginTop, - mr: De.marginRight, - me: De.marginInlineEnd, - marginEnd: De.marginInlineEnd, - mb: De.marginBottom, - ml: De.marginLeft, - ms: De.marginInlineStart, - marginStart: De.marginInlineStart, - mx: De.marginX, - my: De.marginY, - p: De.padding, - pt: De.paddingTop, - py: De.paddingY, - px: De.paddingX, - pb: De.paddingBottom, - pl: De.paddingLeft, - ps: De.paddingInlineStart, - paddingStart: De.paddingInlineStart, - pr: De.paddingRight, - pe: De.paddingInlineEnd, - paddingEnd: De.paddingInlineEnd -}); -var cm = { - textDecorationColor: m.colors("textDecorationColor"), - textDecoration: !0, - textDecor: { property: "textDecoration" }, - textDecorationLine: !0, - textDecorationStyle: !0, - textDecorationThickness: !0, - textUnderlineOffset: !0, - textShadow: m.shadows("textShadow") -}, dm = { - clipPath: !0, - transform: m.propT("transform", pe.transform), - transformOrigin: !0, - translateX: m.spaceT("--chakra-translate-x"), - translateY: m.spaceT("--chakra-translate-y"), - skewX: m.degreeT("--chakra-skew-x"), - skewY: m.degreeT("--chakra-skew-y"), - scaleX: m.prop("--chakra-scale-x"), - scaleY: m.prop("--chakra-scale-y"), - scale: m.prop(["--chakra-scale-x", "--chakra-scale-y"]), - rotate: m.degreeT("--chakra-rotate") -}, um = { - transition: !0, - transitionDelay: !0, - animation: !0, - willChange: !0, - transitionDuration: m.prop("transitionDuration", "transition.duration"), - transitionProperty: m.prop("transitionProperty", "transition.property"), - transitionTimingFunction: m.prop( - "transitionTimingFunction", - "transition.easing" - ) -}, fm = { - fontFamily: m.prop("fontFamily", "fonts"), - fontSize: m.prop("fontSize", "fontSizes", pe.px), - fontWeight: m.prop("fontWeight", "fontWeights"), - lineHeight: m.prop("lineHeight", "lineHeights"), - letterSpacing: m.prop("letterSpacing", "letterSpacings"), - textAlign: !0, - fontStyle: !0, - textIndent: !0, - wordBreak: !0, - overflowWrap: !0, - textOverflow: !0, - textTransform: !0, - whiteSpace: !0, - isTruncated: { - transform(e) { - if (e === !0) - return { - overflow: "hidden", - textOverflow: "ellipsis", - whiteSpace: "nowrap" - }; - } - }, - noOfLines: { - static: { - overflow: "hidden", - textOverflow: "ellipsis", - display: "-webkit-box", - WebkitBoxOrient: "vertical", - WebkitLineClamp: "var(--chakra-line-clamp)" - }, - property: "--chakra-line-clamp" - } -}, mm = { - scrollBehavior: !0, - scrollSnapAlign: !0, - scrollSnapStop: !0, - scrollSnapType: !0, - scrollMargin: m.spaceT("scrollMargin"), - scrollMarginTop: m.spaceT("scrollMarginTop"), - scrollMarginBottom: m.spaceT("scrollMarginBottom"), - scrollMarginLeft: m.spaceT("scrollMarginLeft"), - scrollMarginRight: m.spaceT("scrollMarginRight"), - scrollMarginX: m.spaceT(["scrollMarginLeft", "scrollMarginRight"]), - scrollMarginY: m.spaceT(["scrollMarginTop", "scrollMarginBottom"]), - scrollPadding: m.spaceT("scrollPadding"), - scrollPaddingTop: m.spaceT("scrollPaddingTop"), - scrollPaddingBottom: m.spaceT("scrollPaddingBottom"), - scrollPaddingLeft: m.spaceT("scrollPaddingLeft"), - scrollPaddingRight: m.spaceT("scrollPaddingRight"), - scrollPaddingX: m.spaceT(["scrollPaddingLeft", "scrollPaddingRight"]), - scrollPaddingY: m.spaceT(["scrollPaddingTop", "scrollPaddingBottom"]) -}; -function ll(e) { - return Mt(e) && e.reference ? e.reference : String(e); -} -var ba = (e, ...r) => r.map(ll).join(` ${e} `).replace(/calc/g, ""), yi = (...e) => `calc(${ba("+", ...e)})`, Si = (...e) => `calc(${ba("-", ...e)})`, fo = (...e) => `calc(${ba("*", ...e)})`, xi = (...e) => `calc(${ba("/", ...e)})`, _i = (e) => { - const r = ll(e); - return r != null && !Number.isNaN(parseFloat(r)) ? String(r).startsWith("-") ? String(r).slice(1) : `-${r}` : fo(r, -1); -}, rn = Object.assign( - (e) => ({ - add: (...r) => rn(yi(e, ...r)), - subtract: (...r) => rn(Si(e, ...r)), - multiply: (...r) => rn(fo(e, ...r)), - divide: (...r) => rn(xi(e, ...r)), - negate: () => rn(_i(e)), - toString: () => e.toString() - }), - { - add: yi, - subtract: Si, - multiply: fo, - divide: xi, - negate: _i - } -); -function hm(e, r = "-") { - return e.replace(/\s+/g, r); -} -function vm(e) { - const r = hm(e.toString()); - return bm(gm(r)); -} -function gm(e) { - return e.includes("\\.") ? e : !Number.isInteger(parseFloat(e.toString())) ? e.replace(".", "\\.") : e; -} -function bm(e) { - return e.replace(/[!-,/:-@[-^`{-~]/g, "\\$&"); -} -function pm(e, r = "") { - return [r, e].filter(Boolean).join("-"); -} -function ym(e, r) { - return `var(${e}${r ? `, ${r}` : ""})`; -} -function Sm(e, r = "") { - return vm(`--${pm(e, r)}`); -} -function oe(e, r, t) { - const n = Sm(e, t); - return { - variable: n, - reference: ym(n, r) - }; -} -function xm(e, r) { - const t = {}; - for (const n of r) { - if (Array.isArray(n)) { - const [a, o] = n; - t[a] = oe(`${e}-${a}`, o); - continue; - } - t[n] = oe(`${e}-${n}`); - } - return t; -} -var Xe = { - hover: (e, r) => `${e}:hover ${r}, ${e}[data-hover] ${r}`, - focus: (e, r) => `${e}:focus ${r}, ${e}[data-focus] ${r}`, - focusVisible: (e, r) => `${e}:focus-visible ${r}`, - focusWithin: (e, r) => `${e}:focus-within ${r}`, - active: (e, r) => `${e}:active ${r}, ${e}[data-active] ${r}`, - disabled: (e, r) => `${e}:disabled ${r}, ${e}[data-disabled] ${r}`, - invalid: (e, r) => `${e}:invalid ${r}, ${e}[data-invalid] ${r}`, - checked: (e, r) => `${e}:checked ${r}, ${e}[data-checked] ${r}`, - indeterminate: (e, r) => `${e}:indeterminate ${r}, ${e}[aria-checked=mixed] ${r}, ${e}[data-indeterminate] ${r}`, - readOnly: (e, r) => `${e}:read-only ${r}, ${e}[readonly] ${r}, ${e}[data-read-only] ${r}`, - expanded: (e, r) => `${e}:read-only ${r}, ${e}[aria-expanded=true] ${r}, ${e}[data-expanded] ${r}`, - placeholderShown: (e, r) => `${e}:placeholder-shown ${r}` -}, nt = (e) => cl((r) => e(r, "&"), "[role=group]", "[data-group]", ".group"), Yr = (e) => cl((r) => e(r, "~ &"), "[data-peer]", ".peer"), cl = (e, ...r) => r.map(e).join(", "), dl = { - _hover: "&:hover, &[data-hover]", - _active: "&:active, &[data-active]", - _focus: "&:focus, &[data-focus]", - _highlighted: "&[data-highlighted]", - _focusWithin: "&:focus-within", - _focusVisible: "&:focus-visible, &[data-focus-visible]", - _disabled: "&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]", - _readOnly: "&[aria-readonly=true], &[readonly], &[data-readonly]", - _before: "&::before", - _after: "&::after", - _empty: "&:empty", - _expanded: "&[aria-expanded=true], &[data-expanded]", - _checked: "&[aria-checked=true], &[data-checked]", - _grabbed: "&[aria-grabbed=true], &[data-grabbed]", - _pressed: "&[aria-pressed=true], &[data-pressed]", - _invalid: "&[aria-invalid=true], &[data-invalid]", - _valid: "&[data-valid], &[data-state=valid]", - _loading: "&[data-loading], &[aria-busy=true]", - _selected: "&[aria-selected=true], &[data-selected]", - _hidden: "&[hidden], &[data-hidden]", - _autofill: "&:-webkit-autofill", - _even: "&:nth-of-type(even)", - _odd: "&:nth-of-type(odd)", - _first: "&:first-of-type", - _firstLetter: "&::first-letter", - _last: "&:last-of-type", - _notFirst: "&:not(:first-of-type)", - _notLast: "&:not(:last-of-type)", - _visited: "&:visited", - _activeLink: "&[aria-current=page]", - _activeStep: "&[aria-current=step]", - _indeterminate: "&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]", - _groupHover: nt(Xe.hover), - _peerHover: Yr(Xe.hover), - _groupFocus: nt(Xe.focus), - _peerFocus: Yr(Xe.focus), - _groupFocusVisible: nt(Xe.focusVisible), - _peerFocusVisible: Yr(Xe.focusVisible), - _groupActive: nt(Xe.active), - _peerActive: Yr(Xe.active), - _groupDisabled: nt(Xe.disabled), - _peerDisabled: Yr(Xe.disabled), - _groupInvalid: nt(Xe.invalid), - _peerInvalid: Yr(Xe.invalid), - _groupChecked: nt(Xe.checked), - _peerChecked: Yr(Xe.checked), - _groupFocusWithin: nt(Xe.focusWithin), - _peerFocusWithin: Yr(Xe.focusWithin), - _peerPlaceholderShown: Yr(Xe.placeholderShown), - _placeholder: "&::placeholder", - _placeholderShown: "&:placeholder-shown", - _fullScreen: "&:fullscreen", - _selection: "&::selection", - _rtl: "[dir=rtl] &, &[dir=rtl]", - _ltr: "[dir=ltr] &, &[dir=ltr]", - _mediaDark: "@media (prefers-color-scheme: dark)", - _mediaReduceMotion: "@media (prefers-reduced-motion: reduce)", - _dark: ".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]", - _light: ".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]" -}, _m = Object.keys( - dl -), ul = zf( - {}, - Hn, - Se, - Jf, - oa, - kr, - Zf, - lm, - em, - sl, - sm, - un, - uo, - De, - mm, - fm, - cm, - dm, - rm, - um -); -Object.assign({}, De, kr, oa, sl, un); -[...Object.keys(ul), ..._m]; -({ ...ul, ...dl }); -function Ae(e) { - return { - definePartsStyle(r) { - return r; - }, - defineMultiStyleConfig(r) { - return { parts: e, ...r }; - } - }; -} -var { defineMultiStyleConfig: wm, definePartsStyle: sn } = Ae([ - "stepper", - "step", - "title", - "description", - "indicator", - "separator", - "icon", - "number" -]), Gr = oe("stepper-indicator-size"), At = oe("stepper-icon-size"), Nt = oe("stepper-title-font-size"), ln = oe("stepper-description-font-size"), tn = oe("stepper-accent-color"), km = sn(({ colorScheme: e }) => ({ - stepper: { - display: "flex", - justifyContent: "space-between", - gap: "4", - "&[data-orientation=vertical]": { - flexDirection: "column", - alignItems: "flex-start" - }, - "&[data-orientation=horizontal]": { - flexDirection: "row", - alignItems: "center" - }, - [tn.variable]: `colors.${e}.500`, - _dark: { - [tn.variable]: `colors.${e}.200` - } - }, - title: { - fontSize: Nt.reference, - fontWeight: "medium" - }, - description: { - fontSize: ln.reference, - color: "chakra-subtle-text" - }, - number: { - fontSize: Nt.reference - }, - step: { - flexShrink: 0, - position: "relative", - display: "flex", - gap: "2", - "&[data-orientation=horizontal]": { - alignItems: "center" - }, - "&:not(:last-of-type)": { - flex: "1" - } - }, - icon: { - flexShrink: 0, - width: At.reference, - height: At.reference - }, - indicator: { - flexShrink: 0, - borderRadius: "full", - width: Gr.reference, - height: Gr.reference, - display: "flex", - justifyContent: "center", - alignItems: "center", - "&[data-status=active]": { - borderWidth: "2px", - borderColor: tn.reference - }, - "&[data-status=complete]": { - bg: tn.reference, - color: "chakra-inverse-text" - }, - "&[data-status=incomplete]": { - borderWidth: "2px" - } - }, - separator: { - bg: "chakra-border-color", - flex: "1", - "&[data-status=complete]": { - bg: tn.reference - }, - "&[data-orientation=horizontal]": { - width: "100%", - height: "2px", - marginStart: "2" - }, - "&[data-orientation=vertical]": { - width: "2px", - position: "absolute", - height: "100%", - maxHeight: `calc(100% - ${Gr.reference} - 8px)`, - top: `calc(${Gr.reference} + 4px)`, - insetStart: `calc(${Gr.reference} / 2 - 1px)` - } - } -})), Cm = wm({ - baseStyle: km, - sizes: { - xs: sn({ - stepper: { - [Gr.variable]: "sizes.4", - [At.variable]: "sizes.3", - [Nt.variable]: "fontSizes.xs", - [ln.variable]: "fontSizes.xs" - } - }), - sm: sn({ - stepper: { - [Gr.variable]: "sizes.6", - [At.variable]: "sizes.4", - [Nt.variable]: "fontSizes.sm", - [ln.variable]: "fontSizes.xs" - } - }), - md: sn({ - stepper: { - [Gr.variable]: "sizes.8", - [At.variable]: "sizes.5", - [Nt.variable]: "fontSizes.md", - [ln.variable]: "fontSizes.sm" - } - }), - lg: sn({ - stepper: { - [Gr.variable]: "sizes.10", - [At.variable]: "sizes.6", - [Nt.variable]: "fontSizes.lg", - [ln.variable]: "fontSizes.md" - } - }) - }, - defaultProps: { - size: "md", - colorScheme: "blue" - } -}); -function ke(e, r = {}) { - let t = !1; - function n() { - if (!t) { - t = !0; - return; - } - throw new Error( - "[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?" - ); - } - function a(...S) { - n(); - for (const b of S) - r[b] = h(b); - return ke(e, r); - } - function o(...S) { - for (const b of S) - b in r || (r[b] = h(b)); - return ke(e, r); - } - function i() { - return Object.fromEntries( - Object.entries(r).map(([b, _]) => [b, _.selector]) - ); - } - function u() { - return Object.fromEntries( - Object.entries(r).map(([b, _]) => [b, _.className]) - ); - } - function h(S) { - const C = `chakra-${(["container", "root"].includes(S ?? "") ? [e] : [e, S]).filter(Boolean).join("__")}`; - return { - className: C, - selector: `.${C}`, - toString: () => S - }; - } - return { - parts: a, - toPart: h, - extend: o, - selectors: i, - classnames: u, - get keys() { - return Object.keys(r); - }, - __type: {} - }; -} -var Tm = ke("accordion").parts("root", "container", "button", "panel").extend("icon"), Em = ke("alert").parts("title", "description", "container").extend("icon", "spinner"), $m = ke("avatar").parts("label", "badge", "container").extend("excessLabel", "group"), Rm = ke("breadcrumb").parts("link", "item", "container").extend("separator"); -ke("button").parts(); -var Pm = ke("checkbox").parts("control", "icon", "container").extend("label"); -ke("progress").parts("track", "filledTrack").extend("label"); -var Fm = ke("drawer").parts("overlay", "dialogContainer", "dialog").extend("header", "closeButton", "body", "footer"), Am = ke("editable").parts( - "preview", - "input", - "textarea" -), Nm = ke("form").parts( - "container", - "requiredIndicator", - "helperText" -), Dm = ke("formError").parts("text", "icon"), zm = ke("input").parts("addon", "field", "element"), Om = ke("list").parts("container", "item", "icon"), Im = ke("menu").parts("button", "list", "item").extend("groupTitle", "command", "divider"), Bm = ke("modal").parts("overlay", "dialogContainer", "dialog").extend("header", "closeButton", "body", "footer"), Mm = ke("numberinput").parts( - "root", - "field", - "stepperGroup", - "stepper" -); -ke("pininput").parts("field"); -var Wm = ke("popover").parts("content", "header", "body", "footer").extend("popper", "arrow", "closeButton"), Lm = ke("progress").parts( - "label", - "filledTrack", - "track" -), jm = ke("radio").parts( - "container", - "control", - "label" -), Vm = ke("select").parts("field", "icon"), Um = ke("slider").parts( - "container", - "track", - "thumb", - "filledTrack", - "mark" -), Hm = ke("stat").parts( - "container", - "label", - "helpText", - "number", - "icon" -), Ym = ke("switch").parts( - "container", - "track", - "thumb" -), qm = ke("table").parts( - "table", - "thead", - "tbody", - "tr", - "th", - "td", - "tfoot", - "caption" -), Gm = ke("tabs").parts( - "root", - "tab", - "tablist", - "tabpanel", - "tabpanels", - "indicator" -), Xm = ke("tag").parts( - "container", - "label", - "closeButton" -), Qm = ke("card").parts( - "container", - "header", - "body", - "footer" -); -function bt(e, r, t) { - return Math.min(Math.max(e, t), r); -} -class Km extends Error { - constructor(r) { - super(`Failed to parse color: "${r}"`); - } -} -var cn = Km; -function Fo(e) { - if (typeof e != "string") - throw new cn(e); - if (e.trim().toLowerCase() === "transparent") - return [0, 0, 0, 0]; - let r = e.trim(); - r = oh.test(e) ? eh(e) : e; - const t = rh.exec(r); - if (t) { - const i = Array.from(t).slice(1); - return [...i.slice(0, 3).map((u) => parseInt(bn(u, 2), 16)), parseInt(bn(i[3] || "f", 2), 16) / 255]; - } - const n = th.exec(r); - if (n) { - const i = Array.from(n).slice(1); - return [...i.slice(0, 3).map((u) => parseInt(u, 16)), parseInt(i[3] || "ff", 16) / 255]; - } - const a = nh.exec(r); - if (a) { - const i = Array.from(a).slice(1); - return [...i.slice(0, 3).map((u) => parseInt(u, 10)), parseFloat(i[3] || "1")]; - } - const o = ah.exec(r); - if (o) { - const [i, u, h, v] = Array.from(o).slice(1).map(parseFloat); - if (bt(0, 100, u) !== u) - throw new cn(e); - if (bt(0, 100, h) !== h) - throw new cn(e); - return [...ih(i, u, h), Number.isNaN(v) ? 1 : v]; - } - throw new cn(e); -} -function Jm(e) { - let r = 5381, t = e.length; - for (; t; ) - r = r * 33 ^ e.charCodeAt(--t); - return (r >>> 0) % 2341; -} -const wi = (e) => parseInt(e.replace(/_/g, ""), 36), Zm = "1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e, r) => { - const t = wi(r.substring(0, 3)), n = wi(r.substring(3)).toString(16); - let a = ""; - for (let o = 0; o < 6 - n.length; o++) - a += "0"; - return e[t] = `${a}${n}`, e; -}, {}); -function eh(e) { - const r = e.toLowerCase().trim(), t = Zm[Jm(r)]; - if (!t) - throw new cn(e); - return `#${t}`; -} -const bn = (e, r) => Array.from(Array(r)).map(() => e).join(""), rh = new RegExp(`^#${bn("([a-f0-9])", 3)}([a-f0-9])?$`, "i"), th = new RegExp(`^#${bn("([a-f0-9]{2})", 3)}([a-f0-9]{2})?$`, "i"), nh = new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${bn(",\\s*(\\d+)\\s*", 2)}(?:,\\s*([\\d.]+))?\\s*\\)$`, "i"), ah = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i, oh = /^[a-z]+$/i, ki = (e) => Math.round(e * 255), ih = (e, r, t) => { - let n = t / 100; - if (r === 0) - return [n, n, n].map(ki); - const a = (e % 360 + 360) % 360 / 60, o = (1 - Math.abs(2 * n - 1)) * (r / 100), i = o * (1 - Math.abs(a % 2 - 1)); - let u = 0, h = 0, v = 0; - a >= 0 && a < 1 ? (u = o, h = i) : a >= 1 && a < 2 ? (u = i, h = o) : a >= 2 && a < 3 ? (h = o, v = i) : a >= 3 && a < 4 ? (h = i, v = o) : a >= 4 && a < 5 ? (u = i, v = o) : a >= 5 && a < 6 && (u = o, v = i); - const S = n - o / 2, b = u + S, _ = h + S, C = v + S; - return [b, _, C].map(ki); -}; -function sh(e, r, t, n) { - return `rgba(${bt(0, 255, e).toFixed()}, ${bt(0, 255, r).toFixed()}, ${bt(0, 255, t).toFixed()}, ${parseFloat(bt(0, 1, n).toFixed(3))})`; -} -function lh(e, r) { - const [t, n, a, o] = Fo(e); - return sh(t, n, a, o - r); -} -function ch(e) { - const [r, t, n, a] = Fo(e); - let o = (i) => { - const u = bt(0, 255, i).toString(16); - return u.length === 1 ? `0${u}` : u; - }; - return `#${o(r)}${o(t)}${o(n)}${a < 1 ? o(Math.round(a * 255)) : ""}`; -} -function dh(e, r, t, n, a) { - for (r = r.split ? r.split(".") : r, n = 0; n < r.length; n++) - e = e ? e[r[n]] : a; - return e === a ? t : e; -} -var uh = (e) => Object.keys(e).length === 0, ar = (e, r, t) => { - const n = dh(e, `colors.${r}`, r); - try { - return ch(n), n; - } catch { - return t ?? "#000000"; - } -}, fh = (e) => { - const [r, t, n] = Fo(e); - return (r * 299 + t * 587 + n * 114) / 1e3; -}, mh = (e) => (r) => { - const t = ar(r, e); - return fh(t) < 128 ? "dark" : "light"; -}, hh = (e) => (r) => mh(e)(r) === "dark", Wt = (e, r) => (t) => { - const n = ar(t, e); - return lh(n, 1 - r); -}; -function Ci(e = "1rem", r = "rgba(255, 255, 255, 0.15)") { - return { - backgroundImage: `linear-gradient( - 45deg, - ${r} 25%, - transparent 25%, - transparent 50%, - ${r} 50%, - ${r} 75%, - transparent 75%, - transparent - )`, - backgroundSize: `${e} ${e}` - }; -} -var vh = () => `#${Math.floor(Math.random() * 16777215).toString(16).padEnd(6, "0")}`; -function gh(e) { - const r = vh(); - return !e || uh(e) ? r : e.string && e.colors ? ph(e.string, e.colors) : e.string && !e.colors ? bh(e.string) : e.colors && !e.string ? yh(e.colors) : r; -} -function bh(e) { - let r = 0; - if (e.length === 0) - return r.toString(); - for (let n = 0; n < e.length; n += 1) - r = e.charCodeAt(n) + ((r << 5) - r), r = r & r; - let t = "#"; - for (let n = 0; n < 3; n += 1) { - const a = r >> n * 8 & 255; - t += `00${a.toString(16)}`.substr(-2); - } - return t; -} -function ph(e, r) { - let t = 0; - if (e.length === 0) - return r[0]; - for (let n = 0; n < e.length; n += 1) - t = e.charCodeAt(n) + ((t << 5) - t), t = t & t; - return t = (t % r.length + r.length) % r.length, r[t]; -} -function yh(e) { - return e[Math.floor(Math.random() * e.length)]; -} -function G(e, r) { - return (t) => t.colorMode === "dark" ? r : e; -} -function Ao(e) { - const { orientation: r, vertical: t, horizontal: n } = e; - return r ? r === "vertical" ? t : n : {}; -} -function fl(e) { - return Mt(e) && e.reference ? e.reference : String(e); -} -var pa = (e, ...r) => r.map(fl).join(` ${e} `).replace(/calc/g, ""), Ti = (...e) => `calc(${pa("+", ...e)})`, Ei = (...e) => `calc(${pa("-", ...e)})`, mo = (...e) => `calc(${pa("*", ...e)})`, $i = (...e) => `calc(${pa("/", ...e)})`, Ri = (e) => { - const r = fl(e); - return r != null && !Number.isNaN(parseFloat(r)) ? String(r).startsWith("-") ? String(r).slice(1) : `-${r}` : mo(r, -1); -}, Xr = Object.assign( - (e) => ({ - add: (...r) => Xr(Ti(e, ...r)), - subtract: (...r) => Xr(Ei(e, ...r)), - multiply: (...r) => Xr(mo(e, ...r)), - divide: (...r) => Xr($i(e, ...r)), - negate: () => Xr(Ri(e)), - toString: () => e.toString() - }), - { - add: Ti, - subtract: Ei, - multiply: mo, - divide: $i, - negate: Ri - } -); -function Sh(e) { - return !Number.isInteger(parseFloat(e.toString())); -} -function xh(e, r = "-") { - return e.replace(/\s+/g, r); -} -function ml(e) { - const r = xh(e.toString()); - return r.includes("\\.") ? e : Sh(e) ? r.replace(".", "\\.") : e; -} -function _h(e, r = "") { - return [r, ml(e)].filter(Boolean).join("-"); -} -function wh(e, r) { - return `var(${ml(e)}${r ? `, ${r}` : ""})`; -} -function kh(e, r = "") { - return `--${_h(e, r)}`; -} -function He(e, r) { - const t = kh(e, r == null ? void 0 : r.prefix); - return { - variable: t, - reference: wh(t, Ch(r == null ? void 0 : r.fallback)) - }; -} -function Ch(e) { - return typeof e == "string" ? e : e == null ? void 0 : e.reference; -} -var { defineMultiStyleConfig: Th, definePartsStyle: Yn } = Ae(Ym.keys), fn = He("switch-track-width"), yt = He("switch-track-height"), Oa = He("switch-track-diff"), Eh = Xr.subtract(fn, yt), ho = He("switch-thumb-x"), nn = He("switch-bg"), $h = (e) => { - const { colorScheme: r } = e; - return { - borderRadius: "full", - p: "0.5", - width: [fn.reference], - height: [yt.reference], - transitionProperty: "common", - transitionDuration: "fast", - [nn.variable]: "colors.gray.300", - _dark: { - [nn.variable]: "colors.whiteAlpha.400" - }, - _focusVisible: { - boxShadow: "outline" - }, - _disabled: { - opacity: 0.4, - cursor: "not-allowed" - }, - _checked: { - [nn.variable]: `colors.${r}.500`, - _dark: { - [nn.variable]: `colors.${r}.200` - } - }, - bg: nn.reference - }; -}, Rh = { - bg: "white", - transitionProperty: "transform", - transitionDuration: "normal", - borderRadius: "inherit", - width: [yt.reference], - height: [yt.reference], - _checked: { - transform: `translateX(${ho.reference})` - } -}, Ph = Yn((e) => ({ - container: { - [Oa.variable]: Eh, - [ho.variable]: Oa.reference, - _rtl: { - [ho.variable]: Xr(Oa).negate().toString() - } - }, - track: $h(e), - thumb: Rh -})), Fh = { - sm: Yn({ - container: { - [fn.variable]: "1.375rem", - [yt.variable]: "sizes.3" - } - }), - md: Yn({ - container: { - [fn.variable]: "1.875rem", - [yt.variable]: "sizes.4" - } - }), - lg: Yn({ - container: { - [fn.variable]: "2.875rem", - [yt.variable]: "sizes.6" - } - }) -}, Ah = Th({ - baseStyle: Ph, - sizes: Fh, - defaultProps: { - size: "md", - colorScheme: "blue" - } -}), { defineMultiStyleConfig: Nh, definePartsStyle: zt } = Ae(qm.keys), Dh = zt({ - table: { - fontVariantNumeric: "lining-nums tabular-nums", - borderCollapse: "collapse", - width: "full" - }, - th: { - fontFamily: "heading", - fontWeight: "bold", - textTransform: "uppercase", - letterSpacing: "wider", - textAlign: "start" - }, - td: { - textAlign: "start" - }, - caption: { - mt: 4, - fontFamily: "heading", - textAlign: "center", - fontWeight: "medium" - } -}), ia = { - "&[data-is-numeric=true]": { - textAlign: "end" - } -}, zh = zt((e) => { - const { colorScheme: r } = e; - return { - th: { - color: G("gray.600", "gray.400")(e), - borderBottom: "1px", - borderColor: G(`${r}.100`, `${r}.700`)(e), - ...ia - }, - td: { - borderBottom: "1px", - borderColor: G(`${r}.100`, `${r}.700`)(e), - ...ia - }, - caption: { - color: G("gray.600", "gray.100")(e) - }, - tfoot: { - tr: { - "&:last-of-type": { - th: { borderBottomWidth: 0 } - } - } - } - }; -}), Oh = zt((e) => { - const { colorScheme: r } = e; - return { - th: { - color: G("gray.600", "gray.400")(e), - borderBottom: "1px", - borderColor: G(`${r}.100`, `${r}.700`)(e), - ...ia - }, - td: { - borderBottom: "1px", - borderColor: G(`${r}.100`, `${r}.700`)(e), - ...ia - }, - caption: { - color: G("gray.600", "gray.100")(e) - }, - tbody: { - tr: { - "&:nth-of-type(odd)": { - "th, td": { - borderBottomWidth: "1px", - borderColor: G(`${r}.100`, `${r}.700`)(e) - }, - td: { - background: G(`${r}.100`, `${r}.700`)(e) - } - } - } - }, - tfoot: { - tr: { - "&:last-of-type": { - th: { borderBottomWidth: 0 } - } - } - } - }; -}), Ih = { - simple: zh, - striped: Oh, - unstyled: {} -}, Bh = { - sm: zt({ - th: { - px: "4", - py: "1", - lineHeight: "4", - fontSize: "xs" - }, - td: { - px: "4", - py: "2", - fontSize: "sm", - lineHeight: "4" - }, - caption: { - px: "4", - py: "2", - fontSize: "xs" - } - }), - md: zt({ - th: { - px: "6", - py: "3", - lineHeight: "4", - fontSize: "xs" - }, - td: { - px: "6", - py: "4", - lineHeight: "5" - }, - caption: { - px: "6", - py: "2", - fontSize: "sm" - } - }), - lg: zt({ - th: { - px: "8", - py: "4", - lineHeight: "5", - fontSize: "sm" - }, - td: { - px: "8", - py: "5", - lineHeight: "6" - }, - caption: { - px: "6", - py: "2", - fontSize: "md" - } - }) -}, Mh = Nh({ - baseStyle: Dh, - variants: Ih, - sizes: Bh, - defaultProps: { - variant: "simple", - size: "md", - colorScheme: "gray" - } -}), dr = oe("tabs-color"), Pr = oe("tabs-bg"), Nn = oe("tabs-border-color"), { defineMultiStyleConfig: Wh, definePartsStyle: Br } = Ae(Gm.keys), Lh = (e) => { - const { orientation: r } = e; - return { - display: r === "vertical" ? "flex" : "block" - }; -}, jh = (e) => { - const { isFitted: r } = e; - return { - flex: r ? 1 : void 0, - transitionProperty: "common", - transitionDuration: "normal", - _focusVisible: { - zIndex: 1, - boxShadow: "outline" - }, - _disabled: { - cursor: "not-allowed", - opacity: 0.4 - } - }; -}, Vh = (e) => { - const { align: r = "start", orientation: t } = e; - return { - justifyContent: { - end: "flex-end", - center: "center", - start: "flex-start" - }[r], - flexDirection: t === "vertical" ? "column" : "row" - }; -}, Uh = { - p: 4 -}, Hh = Br((e) => ({ - root: Lh(e), - tab: jh(e), - tablist: Vh(e), - tabpanel: Uh -})), Yh = { - sm: Br({ - tab: { - py: 1, - px: 4, - fontSize: "sm" - } - }), - md: Br({ - tab: { - fontSize: "md", - py: 2, - px: 4 - } - }), - lg: Br({ - tab: { - fontSize: "lg", - py: 3, - px: 4 - } - }) -}, qh = Br((e) => { - const { colorScheme: r, orientation: t } = e, n = t === "vertical", a = t === "vertical" ? "borderStart" : "borderBottom", o = n ? "marginStart" : "marginBottom"; - return { - tablist: { - [a]: "2px solid", - borderColor: "inherit" - }, - tab: { - [a]: "2px solid", - borderColor: "transparent", - [o]: "-2px", - _selected: { - [dr.variable]: `colors.${r}.600`, - _dark: { - [dr.variable]: `colors.${r}.300` - }, - borderColor: "currentColor" - }, - _active: { - [Pr.variable]: "colors.gray.200", - _dark: { - [Pr.variable]: "colors.whiteAlpha.300" - } - }, - _disabled: { - _active: { bg: "none" } - }, - color: dr.reference, - bg: Pr.reference - } - }; -}), Gh = Br((e) => { - const { colorScheme: r } = e; - return { - tab: { - borderTopRadius: "md", - border: "1px solid", - borderColor: "transparent", - mb: "-1px", - [Nn.variable]: "transparent", - _selected: { - [dr.variable]: `colors.${r}.600`, - [Nn.variable]: "colors.white", - _dark: { - [dr.variable]: `colors.${r}.300`, - [Nn.variable]: "colors.gray.800" - }, - borderColor: "inherit", - borderBottomColor: Nn.reference - }, - color: dr.reference - }, - tablist: { - mb: "-1px", - borderBottom: "1px solid", - borderColor: "inherit" - } - }; -}), Xh = Br((e) => { - const { colorScheme: r } = e; - return { - tab: { - border: "1px solid", - borderColor: "inherit", - [Pr.variable]: "colors.gray.50", - _dark: { - [Pr.variable]: "colors.whiteAlpha.50" - }, - mb: "-1px", - _notLast: { - marginEnd: "-1px" - }, - _selected: { - [Pr.variable]: "colors.white", - [dr.variable]: `colors.${r}.600`, - _dark: { - [Pr.variable]: "colors.gray.800", - [dr.variable]: `colors.${r}.300` - }, - borderColor: "inherit", - borderTopColor: "currentColor", - borderBottomColor: "transparent" - }, - color: dr.reference, - bg: Pr.reference - }, - tablist: { - mb: "-1px", - borderBottom: "1px solid", - borderColor: "inherit" - } - }; -}), Qh = Br((e) => { - const { colorScheme: r, theme: t } = e; - return { - tab: { - borderRadius: "full", - fontWeight: "semibold", - color: "gray.600", - _selected: { - color: ar(t, `${r}.700`), - bg: ar(t, `${r}.100`) - } - } - }; -}), Kh = Br((e) => { - const { colorScheme: r } = e; - return { - tab: { - borderRadius: "full", - fontWeight: "semibold", - [dr.variable]: "colors.gray.600", - _dark: { - [dr.variable]: "inherit" - }, - _selected: { - [dr.variable]: "colors.white", - [Pr.variable]: `colors.${r}.600`, - _dark: { - [dr.variable]: "colors.gray.800", - [Pr.variable]: `colors.${r}.300` - } - }, - color: dr.reference, - bg: Pr.reference - } - }; -}), Jh = Br({}), Zh = { - line: qh, - enclosed: Gh, - "enclosed-colored": Xh, - "soft-rounded": Qh, - "solid-rounded": Kh, - unstyled: Jh -}, ev = Wh({ - baseStyle: Hh, - sizes: Yh, - variants: Zh, - defaultProps: { - size: "md", - variant: "line", - colorScheme: "blue" - } -}), je = xm("badge", ["bg", "color", "shadow"]), rv = { - px: 1, - textTransform: "uppercase", - fontSize: "xs", - borderRadius: "sm", - fontWeight: "bold", - bg: je.bg.reference, - color: je.color.reference, - boxShadow: je.shadow.reference -}, tv = (e) => { - const { colorScheme: r, theme: t } = e, n = Wt(`${r}.500`, 0.6)(t); - return { - [je.bg.variable]: `colors.${r}.500`, - [je.color.variable]: "colors.white", - _dark: { - [je.bg.variable]: n, - [je.color.variable]: "colors.whiteAlpha.800" - } - }; -}, nv = (e) => { - const { colorScheme: r, theme: t } = e, n = Wt(`${r}.200`, 0.16)(t); - return { - [je.bg.variable]: `colors.${r}.100`, - [je.color.variable]: `colors.${r}.800`, - _dark: { - [je.bg.variable]: n, - [je.color.variable]: `colors.${r}.200` - } - }; -}, av = (e) => { - const { colorScheme: r, theme: t } = e, n = Wt(`${r}.200`, 0.8)(t); - return { - [je.color.variable]: `colors.${r}.500`, - _dark: { - [je.color.variable]: n - }, - [je.shadow.variable]: `inset 0 0 0px 1px ${je.color.reference}` - }; -}, ov = { - solid: tv, - subtle: nv, - outline: av -}, mn = { - baseStyle: rv, - variants: ov, - defaultProps: { - variant: "subtle", - colorScheme: "gray" - } -}, { defineMultiStyleConfig: iv, definePartsStyle: St } = Ae(Xm.keys), sv = { - fontWeight: "medium", - lineHeight: 1.2, - outline: 0, - color: je.color.reference, - bg: je.bg.reference, - boxShadow: je.shadow.reference, - borderRadius: "md", - _focusVisible: { - boxShadow: "outline" - } -}, lv = { - lineHeight: 1.2, - overflow: "visible" -}, cv = { - fontSize: "lg", - w: "5", - h: "5", - transitionProperty: "common", - transitionDuration: "normal", - borderRadius: "full", - marginStart: "1.5", - marginEnd: "-1", - opacity: 0.5, - _disabled: { - opacity: 0.4 - }, - _focusVisible: { - boxShadow: "outline", - bg: "rgba(0, 0, 0, 0.14)" - }, - _hover: { - opacity: 0.8 - }, - _active: { - opacity: 1 - } -}, dv = St({ - container: sv, - label: lv, - closeButton: cv -}), uv = { - sm: St({ - container: { - minH: "5", - minW: "5", - fontSize: "xs", - px: "2" - }, - closeButton: { - marginEnd: "-2px", - marginStart: "0.35rem" - } - }), - md: St({ - container: { - minH: "6", - minW: "6", - fontSize: "sm", - px: "2" - } - }), - lg: St({ - container: { - minH: "8", - minW: "8", - fontSize: "md", - px: "3" - } - }) -}, fv = { - subtle: St((e) => { - var r; - return { - container: (r = mn.variants) == null ? void 0 : r.subtle(e) - }; - }), - solid: St((e) => { - var r; - return { - container: (r = mn.variants) == null ? void 0 : r.solid(e) - }; - }), - outline: St((e) => { - var r; - return { - container: (r = mn.variants) == null ? void 0 : r.outline(e) - }; - }) -}, mv = iv({ - variants: fv, - baseStyle: dv, - sizes: uv, - defaultProps: { - size: "md", - variant: "subtle", - colorScheme: "gray" - } -}), { definePartsStyle: Qr, defineMultiStyleConfig: hv } = Ae(zm.keys), vv = Qr({ - field: { - width: "100%", - minWidth: 0, - outline: 0, - position: "relative", - appearance: "none", - transitionProperty: "common", - transitionDuration: "normal", - _disabled: { - opacity: 0.4, - cursor: "not-allowed" - } - } -}), at = { - lg: { - fontSize: "lg", - px: "4", - h: "12", - borderRadius: "md" - }, - md: { - fontSize: "md", - px: "4", - h: "10", - borderRadius: "md" - }, - sm: { - fontSize: "sm", - px: "3", - h: "8", - borderRadius: "sm" - }, - xs: { - fontSize: "xs", - px: "2", - h: "6", - borderRadius: "sm" - } -}, gv = { - lg: Qr({ - field: at.lg, - addon: at.lg - }), - md: Qr({ - field: at.md, - addon: at.md - }), - sm: Qr({ - field: at.sm, - addon: at.sm - }), - xs: Qr({ - field: at.xs, - addon: at.xs - }) -}; -function No(e) { - const { focusBorderColor: r, errorBorderColor: t } = e; - return { - focusBorderColor: r || G("blue.500", "blue.300")(e), - errorBorderColor: t || G("red.500", "red.300")(e) - }; -} -var bv = Qr((e) => { - const { theme: r } = e, { focusBorderColor: t, errorBorderColor: n } = No(e); - return { - field: { - border: "1px solid", - borderColor: "inherit", - bg: "inherit", - _hover: { - borderColor: G("gray.300", "whiteAlpha.400")(e) - }, - _readOnly: { - boxShadow: "none !important", - userSelect: "all" - }, - _invalid: { - borderColor: ar(r, n), - boxShadow: `0 0 0 1px ${ar(r, n)}` - }, - _focusVisible: { - zIndex: 1, - borderColor: ar(r, t), - boxShadow: `0 0 0 1px ${ar(r, t)}` - } - }, - addon: { - border: "1px solid", - borderColor: G("inherit", "whiteAlpha.50")(e), - bg: G("gray.100", "whiteAlpha.300")(e) - } - }; -}), pv = Qr((e) => { - const { theme: r } = e, { focusBorderColor: t, errorBorderColor: n } = No(e); - return { - field: { - border: "2px solid", - borderColor: "transparent", - bg: G("gray.100", "whiteAlpha.50")(e), - _hover: { - bg: G("gray.200", "whiteAlpha.100")(e) - }, - _readOnly: { - boxShadow: "none !important", - userSelect: "all" - }, - _invalid: { - borderColor: ar(r, n) - }, - _focusVisible: { - bg: "transparent", - borderColor: ar(r, t) - } - }, - addon: { - border: "2px solid", - borderColor: "transparent", - bg: G("gray.100", "whiteAlpha.50")(e) - } - }; -}), yv = Qr((e) => { - const { theme: r } = e, { focusBorderColor: t, errorBorderColor: n } = No(e); - return { - field: { - borderBottom: "1px solid", - borderColor: "inherit", - borderRadius: "0", - px: "0", - bg: "transparent", - _readOnly: { - boxShadow: "none !important", - userSelect: "all" - }, - _invalid: { - borderColor: ar(r, n), - boxShadow: `0px 1px 0px 0px ${ar(r, n)}` - }, - _focusVisible: { - borderColor: ar(r, t), - boxShadow: `0px 1px 0px 0px ${ar(r, t)}` - } - }, - addon: { - borderBottom: "2px solid", - borderColor: "inherit", - borderRadius: "0", - px: "0", - bg: "transparent" - } - }; -}), Sv = Qr({ - field: { - bg: "transparent", - px: "0", - height: "auto" - }, - addon: { - bg: "transparent", - px: "0", - height: "auto" - } -}), xv = { - outline: bv, - filled: pv, - flushed: yv, - unstyled: Sv -}, xe = hv({ - baseStyle: vv, - sizes: gv, - variants: xv, - defaultProps: { - size: "md", - variant: "outline" - } -}), Pi, _v = { - ...(Pi = xe.baseStyle) == null ? void 0 : Pi.field, - paddingY: "2", - minHeight: "20", - lineHeight: "short", - verticalAlign: "top" -}, Fi, Ai, wv = { - outline: (e) => { - var r, t; - return (t = (r = xe.variants) == null ? void 0 : r.outline(e).field) != null ? t : {}; - }, - flushed: (e) => { - var r, t; - return (t = (r = xe.variants) == null ? void 0 : r.flushed(e).field) != null ? t : {}; - }, - filled: (e) => { - var r, t; - return (t = (r = xe.variants) == null ? void 0 : r.filled(e).field) != null ? t : {}; - }, - unstyled: (Ai = (Fi = xe.variants) == null ? void 0 : Fi.unstyled.field) != null ? Ai : {} -}, Ni, Di, zi, Oi, Ii, Bi, Mi, Wi, kv = { - xs: (Di = (Ni = xe.sizes) == null ? void 0 : Ni.xs.field) != null ? Di : {}, - sm: (Oi = (zi = xe.sizes) == null ? void 0 : zi.sm.field) != null ? Oi : {}, - md: (Bi = (Ii = xe.sizes) == null ? void 0 : Ii.md.field) != null ? Bi : {}, - lg: (Wi = (Mi = xe.sizes) == null ? void 0 : Mi.lg.field) != null ? Wi : {} -}, Cv = { - baseStyle: _v, - sizes: kv, - variants: wv, - defaultProps: { - size: "md", - variant: "outline" - } -}, Dn = He("tooltip-bg"), Ia = He("tooltip-fg"), Tv = He("popper-arrow-bg"), Ev = { - bg: Dn.reference, - color: Ia.reference, - [Dn.variable]: "colors.gray.700", - [Ia.variable]: "colors.whiteAlpha.900", - _dark: { - [Dn.variable]: "colors.gray.300", - [Ia.variable]: "colors.gray.900" - }, - [Tv.variable]: Dn.reference, - px: "2", - py: "0.5", - borderRadius: "sm", - fontWeight: "medium", - fontSize: "sm", - boxShadow: "md", - maxW: "xs", - zIndex: "tooltip" -}, $v = { - baseStyle: Ev -}, { defineMultiStyleConfig: Rv, definePartsStyle: dn } = Ae(Lm.keys), Pv = (e) => { - const { colorScheme: r, theme: t, isIndeterminate: n, hasStripe: a } = e, o = G( - Ci(), - Ci("1rem", "rgba(0,0,0,0.1)") - )(e), i = G(`${r}.500`, `${r}.200`)(e), u = `linear-gradient( - to right, - transparent 0%, - ${ar(t, i)} 50%, - transparent 100% - )`; - return { - ...!n && a && o, - ...n ? { bgImage: u } : { bgColor: i } - }; -}, Fv = { - lineHeight: "1", - fontSize: "0.25em", - fontWeight: "bold", - color: "white" -}, Av = (e) => ({ - bg: G("gray.100", "whiteAlpha.300")(e) -}), Nv = (e) => ({ - transitionProperty: "common", - transitionDuration: "slow", - ...Pv(e) -}), Dv = dn((e) => ({ - label: Fv, - filledTrack: Nv(e), - track: Av(e) -})), zv = { - xs: dn({ - track: { h: "1" } - }), - sm: dn({ - track: { h: "2" } - }), - md: dn({ - track: { h: "3" } - }), - lg: dn({ - track: { h: "4" } - }) -}, Ov = Rv({ - sizes: zv, - baseStyle: Dv, - defaultProps: { - size: "md", - colorScheme: "blue" - } -}), Iv = (e) => typeof e == "function"; -function or(e, ...r) { - return Iv(e) ? e(...r) : e; -} -var { definePartsStyle: qn, defineMultiStyleConfig: Bv } = Ae(Pm.keys), hn = oe("checkbox-size"), Mv = (e) => { - const { colorScheme: r } = e; - return { - w: hn.reference, - h: hn.reference, - transitionProperty: "box-shadow", - transitionDuration: "normal", - border: "2px solid", - borderRadius: "sm", - borderColor: "inherit", - color: "white", - _checked: { - bg: G(`${r}.500`, `${r}.200`)(e), - borderColor: G(`${r}.500`, `${r}.200`)(e), - color: G("white", "gray.900")(e), - _hover: { - bg: G(`${r}.600`, `${r}.300`)(e), - borderColor: G(`${r}.600`, `${r}.300`)(e) - }, - _disabled: { - borderColor: G("gray.200", "transparent")(e), - bg: G("gray.200", "whiteAlpha.300")(e), - color: G("gray.500", "whiteAlpha.500")(e) - } - }, - _indeterminate: { - bg: G(`${r}.500`, `${r}.200`)(e), - borderColor: G(`${r}.500`, `${r}.200`)(e), - color: G("white", "gray.900")(e) - }, - _disabled: { - bg: G("gray.100", "whiteAlpha.100")(e), - borderColor: G("gray.100", "transparent")(e) - }, - _focusVisible: { - boxShadow: "outline" - }, - _invalid: { - borderColor: G("red.500", "red.300")(e) - } - }; -}, Wv = { - _disabled: { cursor: "not-allowed" } -}, Lv = { - userSelect: "none", - _disabled: { opacity: 0.4 } -}, jv = { - transitionProperty: "transform", - transitionDuration: "normal" -}, Vv = qn((e) => ({ - icon: jv, - container: Wv, - control: or(Mv, e), - label: Lv -})), Uv = { - sm: qn({ - control: { [hn.variable]: "sizes.3" }, - label: { fontSize: "sm" }, - icon: { fontSize: "3xs" } - }), - md: qn({ - control: { [hn.variable]: "sizes.4" }, - label: { fontSize: "md" }, - icon: { fontSize: "2xs" } - }), - lg: qn({ - control: { [hn.variable]: "sizes.5" }, - label: { fontSize: "lg" }, - icon: { fontSize: "2xs" } - }) -}, sa = Bv({ - baseStyle: Vv, - sizes: Uv, - defaultProps: { - size: "md", - colorScheme: "blue" - } -}), { defineMultiStyleConfig: Hv, definePartsStyle: Gn } = Ae(jm.keys), Yv = (e) => { - var r; - const t = (r = or(sa.baseStyle, e)) == null ? void 0 : r.control; - return { - ...t, - borderRadius: "full", - _checked: { - ...t == null ? void 0 : t._checked, - _before: { - content: '""', - display: "inline-block", - pos: "relative", - w: "50%", - h: "50%", - borderRadius: "50%", - bg: "currentColor" - } - } - }; -}, qv = Gn((e) => { - var r, t, n, a; - return { - label: (t = (r = sa).baseStyle) == null ? void 0 : t.call(r, e).label, - container: (a = (n = sa).baseStyle) == null ? void 0 : a.call(n, e).container, - control: Yv(e) - }; -}), Gv = { - md: Gn({ - control: { w: "4", h: "4" }, - label: { fontSize: "md" } - }), - lg: Gn({ - control: { w: "5", h: "5" }, - label: { fontSize: "lg" } - }), - sm: Gn({ - control: { width: "3", height: "3" }, - label: { fontSize: "sm" } - }) -}, Xv = Hv({ - baseStyle: qv, - sizes: Gv, - defaultProps: { - size: "md", - colorScheme: "blue" - } -}), { defineMultiStyleConfig: Qv, definePartsStyle: Kv } = Ae(Vm.keys), zn = oe("select-bg"), Li, Jv = { - ...(Li = xe.baseStyle) == null ? void 0 : Li.field, - appearance: "none", - paddingBottom: "1px", - lineHeight: "normal", - bg: zn.reference, - [zn.variable]: "colors.white", - _dark: { - [zn.variable]: "colors.gray.700" - }, - "> option, > optgroup": { - bg: zn.reference - } -}, Zv = { - width: "6", - height: "100%", - insetEnd: "2", - position: "relative", - color: "currentColor", - fontSize: "xl", - _disabled: { - opacity: 0.5 - } -}, eg = Kv({ - field: Jv, - icon: Zv -}), On = { - paddingInlineEnd: "8" -}, ji, Vi, Ui, Hi, Yi, qi, Gi, Xi, rg = { - lg: { - ...(ji = xe.sizes) == null ? void 0 : ji.lg, - field: { - ...(Vi = xe.sizes) == null ? void 0 : Vi.lg.field, - ...On - } - }, - md: { - ...(Ui = xe.sizes) == null ? void 0 : Ui.md, - field: { - ...(Hi = xe.sizes) == null ? void 0 : Hi.md.field, - ...On - } - }, - sm: { - ...(Yi = xe.sizes) == null ? void 0 : Yi.sm, - field: { - ...(qi = xe.sizes) == null ? void 0 : qi.sm.field, - ...On - } - }, - xs: { - ...(Gi = xe.sizes) == null ? void 0 : Gi.xs, - field: { - ...(Xi = xe.sizes) == null ? void 0 : Xi.xs.field, - ...On - }, - icon: { - insetEnd: "1" - } - } -}, tg = Qv({ - baseStyle: eg, - sizes: rg, - variants: xe.variants, - defaultProps: xe.defaultProps -}), Ba = oe("skeleton-start-color"), Ma = oe("skeleton-end-color"), ng = { - [Ba.variable]: "colors.gray.100", - [Ma.variable]: "colors.gray.400", - _dark: { - [Ba.variable]: "colors.gray.800", - [Ma.variable]: "colors.gray.600" - }, - background: Ba.reference, - borderColor: Ma.reference, - opacity: 0.7, - borderRadius: "sm" -}, ag = { - baseStyle: ng -}, Wa = oe("skip-link-bg"), og = { - borderRadius: "md", - fontWeight: "semibold", - _focusVisible: { - boxShadow: "outline", - padding: "4", - position: "fixed", - top: "6", - insetStart: "6", - [Wa.variable]: "colors.white", - _dark: { - [Wa.variable]: "colors.gray.700" - }, - bg: Wa.reference - } -}, ig = { - baseStyle: og -}, { defineMultiStyleConfig: sg, definePartsStyle: ya } = Ae(Um.keys), pn = oe("slider-thumb-size"), yn = oe("slider-track-size"), it = oe("slider-bg"), lg = (e) => { - const { orientation: r } = e; - return { - display: "inline-block", - position: "relative", - cursor: "pointer", - _disabled: { - opacity: 0.6, - cursor: "default", - pointerEvents: "none" - }, - ...Ao({ - orientation: r, - vertical: { h: "100%" }, - horizontal: { w: "100%" } - }) - }; -}, cg = (e) => ({ - ...Ao({ - orientation: e.orientation, - horizontal: { h: yn.reference }, - vertical: { w: yn.reference } - }), - overflow: "hidden", - borderRadius: "sm", - [it.variable]: "colors.gray.200", - _dark: { - [it.variable]: "colors.whiteAlpha.200" - }, - _disabled: { - [it.variable]: "colors.gray.300", - _dark: { - [it.variable]: "colors.whiteAlpha.300" - } - }, - bg: it.reference -}), dg = (e) => { - const { orientation: r } = e; - return { - ...Ao({ - orientation: r, - vertical: { - left: "50%", - transform: "translateX(-50%)", - _active: { - transform: "translateX(-50%) scale(1.15)" - } - }, - horizontal: { - top: "50%", - transform: "translateY(-50%)", - _active: { - transform: "translateY(-50%) scale(1.15)" - } - } - }), - w: pn.reference, - h: pn.reference, - display: "flex", - alignItems: "center", - justifyContent: "center", - position: "absolute", - outline: 0, - zIndex: 1, - borderRadius: "full", - bg: "white", - boxShadow: "base", - border: "1px solid", - borderColor: "transparent", - transitionProperty: "transform", - transitionDuration: "normal", - _focusVisible: { - boxShadow: "outline" - }, - _disabled: { - bg: "gray.300" - } - }; -}, ug = (e) => { - const { colorScheme: r } = e; - return { - width: "inherit", - height: "inherit", - [it.variable]: `colors.${r}.500`, - _dark: { - [it.variable]: `colors.${r}.200` - }, - bg: it.reference - }; -}, fg = ya((e) => ({ - container: lg(e), - track: cg(e), - thumb: dg(e), - filledTrack: ug(e) -})), mg = ya({ - container: { - [pn.variable]: "sizes.4", - [yn.variable]: "sizes.1" - } -}), hg = ya({ - container: { - [pn.variable]: "sizes.3.5", - [yn.variable]: "sizes.1" - } -}), vg = ya({ - container: { - [pn.variable]: "sizes.2.5", - [yn.variable]: "sizes.0.5" - } -}), gg = { - lg: mg, - md: hg, - sm: vg -}, bg = sg({ - baseStyle: fg, - sizes: gg, - defaultProps: { - size: "md", - colorScheme: "blue" - } -}), vt = He("spinner-size"), pg = { - width: [vt.reference], - height: [vt.reference] -}, yg = { - xs: { - [vt.variable]: "sizes.3" - }, - sm: { - [vt.variable]: "sizes.4" - }, - md: { - [vt.variable]: "sizes.6" - }, - lg: { - [vt.variable]: "sizes.8" - }, - xl: { - [vt.variable]: "sizes.12" - } -}, Sg = { - baseStyle: pg, - sizes: yg, - defaultProps: { - size: "md" - } -}, { defineMultiStyleConfig: xg, definePartsStyle: hl } = Ae(Hm.keys), _g = { - fontWeight: "medium" -}, wg = { - opacity: 0.8, - marginBottom: "2" -}, kg = { - verticalAlign: "baseline", - fontWeight: "semibold" -}, Cg = { - marginEnd: 1, - w: "3.5", - h: "3.5", - verticalAlign: "middle" -}, Tg = hl({ - container: {}, - label: _g, - helpText: wg, - number: kg, - icon: Cg -}), Eg = { - md: hl({ - label: { fontSize: "sm" }, - helpText: { fontSize: "sm" }, - number: { fontSize: "2xl" } - }) -}, $g = xg({ - baseStyle: Tg, - sizes: Eg, - defaultProps: { - size: "md" - } -}), La = oe("kbd-bg"), Rg = { - [La.variable]: "colors.gray.100", - _dark: { - [La.variable]: "colors.whiteAlpha.100" - }, - bg: La.reference, - borderRadius: "md", - borderWidth: "1px", - borderBottomWidth: "3px", - fontSize: "0.8em", - fontWeight: "bold", - lineHeight: "normal", - px: "0.4em", - whiteSpace: "nowrap" -}, Pg = { - baseStyle: Rg -}, Fg = { - transitionProperty: "common", - transitionDuration: "fast", - transitionTimingFunction: "ease-out", - cursor: "pointer", - textDecoration: "none", - outline: "none", - color: "inherit", - _hover: { - textDecoration: "underline" - }, - _focusVisible: { - boxShadow: "outline" - } -}, Ag = { - baseStyle: Fg -}, { defineMultiStyleConfig: Ng, definePartsStyle: Dg } = Ae(Om.keys), zg = { - marginEnd: "2", - display: "inline", - verticalAlign: "text-bottom" -}, Og = Dg({ - icon: zg -}), Ig = Ng({ - baseStyle: Og -}), { defineMultiStyleConfig: Bg, definePartsStyle: Mg } = Ae(Im.keys), Or = oe("menu-bg"), ja = oe("menu-shadow"), Wg = { - [Or.variable]: "#fff", - [ja.variable]: "shadows.sm", - _dark: { - [Or.variable]: "colors.gray.700", - [ja.variable]: "shadows.dark-lg" - }, - color: "inherit", - minW: "3xs", - py: "2", - zIndex: 1, - borderRadius: "md", - borderWidth: "1px", - bg: Or.reference, - boxShadow: ja.reference -}, Lg = { - py: "1.5", - px: "3", - transitionProperty: "background", - transitionDuration: "ultra-fast", - transitionTimingFunction: "ease-in", - _focus: { - [Or.variable]: "colors.gray.100", - _dark: { - [Or.variable]: "colors.whiteAlpha.100" - } - }, - _active: { - [Or.variable]: "colors.gray.200", - _dark: { - [Or.variable]: "colors.whiteAlpha.200" - } - }, - _expanded: { - [Or.variable]: "colors.gray.100", - _dark: { - [Or.variable]: "colors.whiteAlpha.100" - } - }, - _disabled: { - opacity: 0.4, - cursor: "not-allowed" - }, - bg: Or.reference -}, jg = { - mx: 4, - my: 2, - fontWeight: "semibold", - fontSize: "sm" -}, Vg = { - opacity: 0.6 -}, Ug = { - border: 0, - borderBottom: "1px solid", - borderColor: "inherit", - my: "2", - opacity: 0.6 -}, Hg = { - transitionProperty: "common", - transitionDuration: "normal" -}, Yg = Mg({ - button: Hg, - list: Wg, - item: Lg, - groupTitle: jg, - command: Vg, - divider: Ug -}), qg = Bg({ - baseStyle: Yg -}), { defineMultiStyleConfig: Gg, definePartsStyle: vo } = Ae(Bm.keys), Va = oe("modal-bg"), Ua = oe("modal-shadow"), Xg = { - bg: "blackAlpha.600", - zIndex: "modal" -}, Qg = (e) => { - const { isCentered: r, scrollBehavior: t } = e; - return { - display: "flex", - zIndex: "modal", - justifyContent: "center", - alignItems: r ? "center" : "flex-start", - overflow: t === "inside" ? "hidden" : "auto", - overscrollBehaviorY: "none" - }; -}, Kg = (e) => { - const { isCentered: r, scrollBehavior: t } = e; - return { - borderRadius: "md", - color: "inherit", - my: r ? "auto" : "16", - mx: r ? "auto" : void 0, - zIndex: "modal", - maxH: t === "inside" ? "calc(100% - 7.5rem)" : void 0, - [Va.variable]: "colors.white", - [Ua.variable]: "shadows.lg", - _dark: { - [Va.variable]: "colors.gray.700", - [Ua.variable]: "shadows.dark-lg" - }, - bg: Va.reference, - boxShadow: Ua.reference - }; -}, Jg = { - px: "6", - py: "4", - fontSize: "xl", - fontWeight: "semibold" -}, Zg = { - position: "absolute", - top: "2", - insetEnd: "3" -}, eb = (e) => { - const { scrollBehavior: r } = e; - return { - px: "6", - py: "2", - flex: "1", - overflow: r === "inside" ? "auto" : void 0 - }; -}, rb = { - px: "6", - py: "4" -}, tb = vo((e) => ({ - overlay: Xg, - dialogContainer: or(Qg, e), - dialog: or(Kg, e), - header: Jg, - closeButton: Zg, - body: or(eb, e), - footer: rb -})); -function $r(e) { - return vo(e === "full" ? { - dialog: { - maxW: "100vw", - minH: "$100vh", - my: "0", - borderRadius: "0" - } - } : { - dialog: { maxW: e } - }); -} -var nb = { - xs: $r("xs"), - sm: $r("sm"), - md: $r("md"), - lg: $r("lg"), - xl: $r("xl"), - "2xl": $r("2xl"), - "3xl": $r("3xl"), - "4xl": $r("4xl"), - "5xl": $r("5xl"), - "6xl": $r("6xl"), - full: $r("full") -}, ab = Gg({ - baseStyle: tb, - sizes: nb, - defaultProps: { size: "md" } -}), { defineMultiStyleConfig: ob, definePartsStyle: vl } = Ae(Mm.keys), Do = He("number-input-stepper-width"), gl = He("number-input-input-padding"), ib = Xr(Do).add("0.5rem").toString(), Ha = He("number-input-bg"), Ya = He("number-input-color"), qa = He("number-input-border-color"), sb = { - [Do.variable]: "sizes.6", - [gl.variable]: ib -}, lb = (e) => { - var r, t; - return (t = (r = or(xe.baseStyle, e)) == null ? void 0 : r.field) != null ? t : {}; -}, cb = { - width: Do.reference -}, db = { - borderStart: "1px solid", - borderStartColor: qa.reference, - color: Ya.reference, - bg: Ha.reference, - [Ya.variable]: "colors.chakra-body-text", - [qa.variable]: "colors.chakra-border-color", - _dark: { - [Ya.variable]: "colors.whiteAlpha.800", - [qa.variable]: "colors.whiteAlpha.300" - }, - _active: { - [Ha.variable]: "colors.gray.200", - _dark: { - [Ha.variable]: "colors.whiteAlpha.300" - } - }, - _disabled: { - opacity: 0.4, - cursor: "not-allowed" - } -}, ub = vl((e) => { - var r; - return { - root: sb, - field: (r = or(lb, e)) != null ? r : {}, - stepperGroup: cb, - stepper: db - }; -}); -function In(e) { - var r, t, n; - const a = (r = xe.sizes) == null ? void 0 : r[e], o = { - lg: "md", - md: "md", - sm: "sm", - xs: "sm" - }, i = (n = (t = a.field) == null ? void 0 : t.fontSize) != null ? n : "md", u = nl.fontSizes[i]; - return vl({ - field: { - ...a.field, - paddingInlineEnd: gl.reference, - verticalAlign: "top" - }, - stepper: { - fontSize: Xr(u).multiply(0.75).toString(), - _first: { - borderTopEndRadius: o[e] - }, - _last: { - borderBottomEndRadius: o[e], - mt: "-1px", - borderTopWidth: 1 - } - } - }); -} -var fb = { - xs: In("xs"), - sm: In("sm"), - md: In("md"), - lg: In("lg") -}, mb = ob({ - baseStyle: ub, - sizes: fb, - variants: xe.variants, - defaultProps: xe.defaultProps -}), Qi, hb = { - ...(Qi = xe.baseStyle) == null ? void 0 : Qi.field, - textAlign: "center" -}, vb = { - lg: { - fontSize: "lg", - w: 12, - h: 12, - borderRadius: "md" - }, - md: { - fontSize: "md", - w: 10, - h: 10, - borderRadius: "md" - }, - sm: { - fontSize: "sm", - w: 8, - h: 8, - borderRadius: "sm" - }, - xs: { - fontSize: "xs", - w: 6, - h: 6, - borderRadius: "sm" - } -}, Ki, Ji, gb = { - outline: (e) => { - var r, t, n; - return (n = (t = or((r = xe.variants) == null ? void 0 : r.outline, e)) == null ? void 0 : t.field) != null ? n : {}; - }, - flushed: (e) => { - var r, t, n; - return (n = (t = or((r = xe.variants) == null ? void 0 : r.flushed, e)) == null ? void 0 : t.field) != null ? n : {}; - }, - filled: (e) => { - var r, t, n; - return (n = (t = or((r = xe.variants) == null ? void 0 : r.filled, e)) == null ? void 0 : t.field) != null ? n : {}; - }, - unstyled: (Ji = (Ki = xe.variants) == null ? void 0 : Ki.unstyled.field) != null ? Ji : {} -}, bb = { - baseStyle: hb, - sizes: vb, - variants: gb, - defaultProps: xe.defaultProps -}, { defineMultiStyleConfig: pb, definePartsStyle: yb } = Ae(Wm.keys), Bn = He("popper-bg"), Sb = He("popper-arrow-bg"), Zi = He("popper-arrow-shadow-color"), xb = { zIndex: 10 }, _b = { - [Bn.variable]: "colors.white", - bg: Bn.reference, - [Sb.variable]: Bn.reference, - [Zi.variable]: "colors.gray.200", - _dark: { - [Bn.variable]: "colors.gray.700", - [Zi.variable]: "colors.whiteAlpha.300" - }, - width: "xs", - border: "1px solid", - borderColor: "inherit", - borderRadius: "md", - boxShadow: "sm", - zIndex: "inherit", - _focusVisible: { - outline: 0, - boxShadow: "outline" - } -}, wb = { - px: 3, - py: 2, - borderBottomWidth: "1px" -}, kb = { - px: 3, - py: 2 -}, Cb = { - px: 3, - py: 2, - borderTopWidth: "1px" -}, Tb = { - position: "absolute", - borderRadius: "md", - top: 1, - insetEnd: 2, - padding: 2 -}, Eb = yb({ - popper: xb, - content: _b, - header: wb, - body: kb, - footer: Cb, - closeButton: Tb -}), $b = pb({ - baseStyle: Eb -}), { definePartsStyle: go, defineMultiStyleConfig: Rb } = Ae(Fm.keys), Ga = oe("drawer-bg"), Xa = oe("drawer-box-shadow"); -function Pt(e) { - return go(e === "full" ? { - dialog: { maxW: "100vw", h: "100vh" } - } : { - dialog: { maxW: e } - }); -} -var Pb = { - bg: "blackAlpha.600", - zIndex: "overlay" -}, Fb = { - display: "flex", - zIndex: "modal", - justifyContent: "center" -}, Ab = (e) => { - const { isFullHeight: r } = e; - return { - ...r && { height: "100vh" }, - zIndex: "modal", - maxH: "100vh", - color: "inherit", - [Ga.variable]: "colors.white", - [Xa.variable]: "shadows.lg", - _dark: { - [Ga.variable]: "colors.gray.700", - [Xa.variable]: "shadows.dark-lg" - }, - bg: Ga.reference, - boxShadow: Xa.reference - }; -}, Nb = { - px: "6", - py: "4", - fontSize: "xl", - fontWeight: "semibold" -}, Db = { - position: "absolute", - top: "2", - insetEnd: "3" -}, zb = { - px: "6", - py: "2", - flex: "1", - overflow: "auto" -}, Ob = { - px: "6", - py: "4" -}, Ib = go((e) => ({ - overlay: Pb, - dialogContainer: Fb, - dialog: or(Ab, e), - header: Nb, - closeButton: Db, - body: zb, - footer: Ob -})), Bb = { - xs: Pt("xs"), - sm: Pt("md"), - md: Pt("lg"), - lg: Pt("2xl"), - xl: Pt("4xl"), - full: Pt("full") -}, Mb = Rb({ - baseStyle: Ib, - sizes: Bb, - defaultProps: { - size: "xs" - } -}), { definePartsStyle: Wb, defineMultiStyleConfig: Lb } = Ae(Am.keys), jb = { - borderRadius: "md", - py: "1", - transitionProperty: "common", - transitionDuration: "normal" -}, Vb = { - borderRadius: "md", - py: "1", - transitionProperty: "common", - transitionDuration: "normal", - width: "full", - _focusVisible: { boxShadow: "outline" }, - _placeholder: { opacity: 0.6 } -}, Ub = { - borderRadius: "md", - py: "1", - transitionProperty: "common", - transitionDuration: "normal", - width: "full", - _focusVisible: { boxShadow: "outline" }, - _placeholder: { opacity: 0.6 } -}, Hb = Wb({ - preview: jb, - input: Vb, - textarea: Ub -}), Yb = Lb({ - baseStyle: Hb -}), { definePartsStyle: qb, defineMultiStyleConfig: Gb } = Ae(Nm.keys), Ot = oe("form-control-color"), Xb = { - marginStart: "1", - [Ot.variable]: "colors.red.500", - _dark: { - [Ot.variable]: "colors.red.300" - }, - color: Ot.reference -}, Qb = { - mt: "2", - [Ot.variable]: "colors.gray.600", - _dark: { - [Ot.variable]: "colors.whiteAlpha.600" - }, - color: Ot.reference, - lineHeight: "normal", - fontSize: "sm" -}, Kb = qb({ - container: { - width: "100%", - position: "relative" - }, - requiredIndicator: Xb, - helperText: Qb -}), Jb = Gb({ - baseStyle: Kb -}), { definePartsStyle: Zb, defineMultiStyleConfig: ep } = Ae(Dm.keys), It = oe("form-error-color"), rp = { - [It.variable]: "colors.red.500", - _dark: { - [It.variable]: "colors.red.300" - }, - color: It.reference, - mt: "2", - fontSize: "sm", - lineHeight: "normal" -}, tp = { - marginEnd: "0.5em", - [It.variable]: "colors.red.500", - _dark: { - [It.variable]: "colors.red.300" - }, - color: It.reference -}, np = Zb({ - text: rp, - icon: tp -}), ap = ep({ - baseStyle: np -}), op = { - fontSize: "md", - marginEnd: "3", - mb: "2", - fontWeight: "medium", - transitionProperty: "common", - transitionDuration: "normal", - opacity: 1, - _disabled: { - opacity: 0.4 - } -}, ip = { - baseStyle: op -}, sp = { - fontFamily: "heading", - fontWeight: "bold" -}, lp = { - "4xl": { - fontSize: ["6xl", null, "7xl"], - lineHeight: 1 - }, - "3xl": { - fontSize: ["5xl", null, "6xl"], - lineHeight: 1 - }, - "2xl": { - fontSize: ["4xl", null, "5xl"], - lineHeight: [1.2, null, 1] - }, - xl: { - fontSize: ["3xl", null, "4xl"], - lineHeight: [1.33, null, 1.2] - }, - lg: { - fontSize: ["2xl", null, "3xl"], - lineHeight: [1.33, null, 1.2] - }, - md: { - fontSize: "xl", - lineHeight: 1.2 - }, - sm: { - fontSize: "md", - lineHeight: 1.2 - }, - xs: { - fontSize: "sm", - lineHeight: 1.2 - } -}, cp = { - baseStyle: sp, - sizes: lp, - defaultProps: { - size: "xl" - } -}, { defineMultiStyleConfig: dp, definePartsStyle: up } = Ae(Rm.keys), Qa = oe("breadcrumb-link-decor"), fp = { - transitionProperty: "common", - transitionDuration: "fast", - transitionTimingFunction: "ease-out", - outline: "none", - color: "inherit", - textDecoration: Qa.reference, - [Qa.variable]: "none", - "&:not([aria-current=page])": { - cursor: "pointer", - _hover: { - [Qa.variable]: "underline" - }, - _focusVisible: { - boxShadow: "outline" - } - } -}, mp = up({ - link: fp -}), hp = dp({ - baseStyle: mp -}), vp = { - lineHeight: "1.2", - borderRadius: "md", - fontWeight: "semibold", - transitionProperty: "common", - transitionDuration: "normal", - _focusVisible: { - boxShadow: "outline" - }, - _disabled: { - opacity: 0.4, - cursor: "not-allowed", - boxShadow: "none" - }, - _hover: { - _disabled: { - bg: "initial" - } - } -}, bl = (e) => { - const { colorScheme: r, theme: t } = e; - if (r === "gray") - return { - color: G("inherit", "whiteAlpha.900")(e), - _hover: { - bg: G("gray.100", "whiteAlpha.200")(e) - }, - _active: { bg: G("gray.200", "whiteAlpha.300")(e) } - }; - const n = Wt(`${r}.200`, 0.12)(t), a = Wt(`${r}.200`, 0.24)(t); - return { - color: G(`${r}.600`, `${r}.200`)(e), - bg: "transparent", - _hover: { - bg: G(`${r}.50`, n)(e) - }, - _active: { - bg: G(`${r}.100`, a)(e) - } - }; -}, gp = (e) => { - const { colorScheme: r } = e, t = G("gray.200", "whiteAlpha.300")(e); - return { - border: "1px solid", - borderColor: r === "gray" ? t : "currentColor", - ".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)": { marginEnd: "-1px" }, - ".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)": { marginBottom: "-1px" }, - ...or(bl, e) - }; -}, bp = { - yellow: { - bg: "yellow.400", - color: "black", - hoverBg: "yellow.500", - activeBg: "yellow.600" - }, - cyan: { - bg: "cyan.400", - color: "black", - hoverBg: "cyan.500", - activeBg: "cyan.600" - } -}, pp = (e) => { - var r; - const { colorScheme: t } = e; - if (t === "gray") { - const h = G("gray.100", "whiteAlpha.200")(e); - return { - bg: h, - _hover: { - bg: G("gray.200", "whiteAlpha.300")(e), - _disabled: { - bg: h - } - }, - _active: { bg: G("gray.300", "whiteAlpha.400")(e) } - }; - } - const { - bg: n = `${t}.500`, - color: a = "white", - hoverBg: o = `${t}.600`, - activeBg: i = `${t}.700` - } = (r = bp[t]) != null ? r : {}, u = G(n, `${t}.200`)(e); - return { - bg: u, - color: G(a, "gray.800")(e), - _hover: { - bg: G(o, `${t}.300`)(e), - _disabled: { - bg: u - } - }, - _active: { bg: G(i, `${t}.400`)(e) } - }; -}, yp = (e) => { - const { colorScheme: r } = e; - return { - padding: 0, - height: "auto", - lineHeight: "normal", - verticalAlign: "baseline", - color: G(`${r}.500`, `${r}.200`)(e), - _hover: { - textDecoration: "underline", - _disabled: { - textDecoration: "none" - } - }, - _active: { - color: G(`${r}.700`, `${r}.500`)(e) - } - }; -}, Sp = { - bg: "none", - color: "inherit", - display: "inline", - lineHeight: "inherit", - m: "0", - p: "0" -}, xp = { - ghost: bl, - outline: gp, - solid: pp, - link: yp, - unstyled: Sp -}, _p = { - lg: { - h: "12", - minW: "12", - fontSize: "lg", - px: "6" - }, - md: { - h: "10", - minW: "10", - fontSize: "md", - px: "4" - }, - sm: { - h: "8", - minW: "8", - fontSize: "sm", - px: "3" - }, - xs: { - h: "6", - minW: "6", - fontSize: "xs", - px: "2" - } -}, wp = { - baseStyle: vp, - variants: xp, - sizes: _p, - defaultProps: { - variant: "solid", - size: "md", - colorScheme: "gray" - } -}, { definePartsStyle: xt, defineMultiStyleConfig: kp } = Ae(Qm.keys), la = oe("card-bg"), Kr = oe("card-padding"), pl = oe("card-shadow"), Xn = oe("card-radius"), yl = oe("card-border-width", "0"), Sl = oe("card-border-color"), Cp = xt({ - container: { - [la.variable]: "colors.chakra-body-bg", - backgroundColor: la.reference, - boxShadow: pl.reference, - borderRadius: Xn.reference, - color: "chakra-body-text", - borderWidth: yl.reference, - borderColor: Sl.reference - }, - body: { - padding: Kr.reference, - flex: "1 1 0%" - }, - header: { - padding: Kr.reference - }, - footer: { - padding: Kr.reference - } -}), Tp = { - sm: xt({ - container: { - [Xn.variable]: "radii.base", - [Kr.variable]: "space.3" - } - }), - md: xt({ - container: { - [Xn.variable]: "radii.md", - [Kr.variable]: "space.5" - } - }), - lg: xt({ - container: { - [Xn.variable]: "radii.xl", - [Kr.variable]: "space.7" - } - }) -}, Ep = { - elevated: xt({ - container: { - [pl.variable]: "shadows.base", - _dark: { - [la.variable]: "colors.gray.700" - } - } - }), - outline: xt({ - container: { - [yl.variable]: "1px", - [Sl.variable]: "colors.chakra-border-color" - } - }), - filled: xt({ - container: { - [la.variable]: "colors.chakra-subtle-bg" - } - }), - unstyled: { - body: { - [Kr.variable]: 0 - }, - header: { - [Kr.variable]: 0 - }, - footer: { - [Kr.variable]: 0 - } - } -}, $p = kp({ - baseStyle: Cp, - variants: Ep, - sizes: Tp, - defaultProps: { - variant: "elevated", - size: "md" - } -}), vn = He("close-button-size"), an = He("close-button-bg"), Rp = { - w: [vn.reference], - h: [vn.reference], - borderRadius: "md", - transitionProperty: "common", - transitionDuration: "normal", - _disabled: { - opacity: 0.4, - cursor: "not-allowed", - boxShadow: "none" - }, - _hover: { - [an.variable]: "colors.blackAlpha.100", - _dark: { - [an.variable]: "colors.whiteAlpha.100" - } - }, - _active: { - [an.variable]: "colors.blackAlpha.200", - _dark: { - [an.variable]: "colors.whiteAlpha.200" - } - }, - _focusVisible: { - boxShadow: "outline" - }, - bg: an.reference -}, Pp = { - lg: { - [vn.variable]: "sizes.10", - fontSize: "md" - }, - md: { - [vn.variable]: "sizes.8", - fontSize: "xs" - }, - sm: { - [vn.variable]: "sizes.6", - fontSize: "2xs" - } -}, Fp = { - baseStyle: Rp, - sizes: Pp, - defaultProps: { - size: "md" - } -}, { variants: Ap, defaultProps: Np } = mn, Dp = { - fontFamily: "mono", - fontSize: "sm", - px: "0.2em", - borderRadius: "sm", - bg: je.bg.reference, - color: je.color.reference, - boxShadow: je.shadow.reference -}, zp = { - baseStyle: Dp, - variants: Ap, - defaultProps: Np -}, Op = { - w: "100%", - mx: "auto", - maxW: "prose", - px: "4" -}, Ip = { - baseStyle: Op -}, Bp = { - opacity: 0.6, - borderColor: "inherit" -}, Mp = { - borderStyle: "solid" -}, Wp = { - borderStyle: "dashed" -}, Lp = { - solid: Mp, - dashed: Wp -}, jp = { - baseStyle: Bp, - variants: Lp, - defaultProps: { - variant: "solid" - } -}, { definePartsStyle: Vp, defineMultiStyleConfig: Up } = Ae(Tm.keys), Hp = { - borderTopWidth: "1px", - borderColor: "inherit", - _last: { - borderBottomWidth: "1px" - } -}, Yp = { - transitionProperty: "common", - transitionDuration: "normal", - fontSize: "md", - _focusVisible: { - boxShadow: "outline" - }, - _hover: { - bg: "blackAlpha.50" - }, - _disabled: { - opacity: 0.4, - cursor: "not-allowed" - }, - px: "4", - py: "2" -}, qp = { - pt: "2", - px: "4", - pb: "5" -}, Gp = { - fontSize: "1.25em" -}, Xp = Vp({ - container: Hp, - button: Yp, - panel: qp, - icon: Gp -}), Qp = Up({ baseStyle: Xp }), { definePartsStyle: kn, defineMultiStyleConfig: Kp } = Ae(Em.keys), gr = oe("alert-fg"), Jr = oe("alert-bg"), Jp = kn({ - container: { - bg: Jr.reference, - px: "4", - py: "3" - }, - title: { - fontWeight: "bold", - lineHeight: "6", - marginEnd: "2" - }, - description: { - lineHeight: "6" - }, - icon: { - color: gr.reference, - flexShrink: 0, - marginEnd: "3", - w: "5", - h: "6" - }, - spinner: { - color: gr.reference, - flexShrink: 0, - marginEnd: "3", - w: "5", - h: "5" - } -}); -function zo(e) { - const { theme: r, colorScheme: t } = e, n = Wt(`${t}.200`, 0.16)(r); - return { - light: `colors.${t}.100`, - dark: n - }; -} -var Zp = kn((e) => { - const { colorScheme: r } = e, t = zo(e); - return { - container: { - [gr.variable]: `colors.${r}.500`, - [Jr.variable]: t.light, - _dark: { - [gr.variable]: `colors.${r}.200`, - [Jr.variable]: t.dark - } - } - }; -}), e0 = kn((e) => { - const { colorScheme: r } = e, t = zo(e); - return { - container: { - [gr.variable]: `colors.${r}.500`, - [Jr.variable]: t.light, - _dark: { - [gr.variable]: `colors.${r}.200`, - [Jr.variable]: t.dark - }, - paddingStart: "3", - borderStartWidth: "4px", - borderStartColor: gr.reference - } - }; -}), r0 = kn((e) => { - const { colorScheme: r } = e, t = zo(e); - return { - container: { - [gr.variable]: `colors.${r}.500`, - [Jr.variable]: t.light, - _dark: { - [gr.variable]: `colors.${r}.200`, - [Jr.variable]: t.dark - }, - pt: "2", - borderTopWidth: "4px", - borderTopColor: gr.reference - } - }; -}), t0 = kn((e) => { - const { colorScheme: r } = e; - return { - container: { - [gr.variable]: "colors.white", - [Jr.variable]: `colors.${r}.500`, - _dark: { - [gr.variable]: "colors.gray.900", - [Jr.variable]: `colors.${r}.200` - }, - color: gr.reference - } - }; -}), n0 = { - subtle: Zp, - "left-accent": e0, - "top-accent": r0, - solid: t0 -}, a0 = Kp({ - baseStyle: Jp, - variants: n0, - defaultProps: { - variant: "subtle", - colorScheme: "blue" - } -}), { definePartsStyle: xl, defineMultiStyleConfig: o0 } = Ae($m.keys), Bt = oe("avatar-border-color"), Ka = oe("avatar-bg"), i0 = { - borderRadius: "full", - border: "0.2em solid", - [Bt.variable]: "white", - _dark: { - [Bt.variable]: "colors.gray.800" - }, - borderColor: Bt.reference -}, s0 = { - [Ka.variable]: "colors.gray.200", - _dark: { - [Ka.variable]: "colors.whiteAlpha.400" - }, - bgColor: Ka.reference -}, es = oe("avatar-background"), l0 = (e) => { - const { name: r, theme: t } = e, n = r ? gh({ string: r }) : "colors.gray.400", a = hh(n)(t); - let o = "white"; - return a || (o = "gray.800"), { - bg: es.reference, - "&:not([data-loaded])": { - [es.variable]: n - }, - color: o, - [Bt.variable]: "colors.white", - _dark: { - [Bt.variable]: "colors.gray.800" - }, - borderColor: Bt.reference, - verticalAlign: "top" - }; -}, c0 = xl((e) => ({ - badge: or(i0, e), - excessLabel: or(s0, e), - container: or(l0, e) -})); -function ot(e) { - const r = e !== "100%" ? ol[e] : void 0; - return xl({ - container: { - width: e, - height: e, - fontSize: `calc(${r ?? e} / 2.5)` - }, - excessLabel: { - width: e, - height: e - }, - label: { - fontSize: `calc(${r ?? e} / 2.5)`, - lineHeight: e !== "100%" ? r ?? e : void 0 - } - }); -} -var d0 = { - "2xs": ot(4), - xs: ot(6), - sm: ot(8), - md: ot(12), - lg: ot(16), - xl: ot(24), - "2xl": ot(32), - full: ot("100%") -}, u0 = o0({ - baseStyle: c0, - sizes: d0, - defaultProps: { size: "md" } -}), f0 = { - Accordion: Qp, - Alert: a0, - Avatar: u0, - Badge: mn, - Breadcrumb: hp, - Button: wp, - Checkbox: sa, - CloseButton: Fp, - Code: zp, - Container: Ip, - Divider: jp, - Drawer: Mb, - Editable: Yb, - Form: Jb, - FormError: ap, - FormLabel: ip, - Heading: cp, - Input: xe, - Kbd: Pg, - Link: Ag, - List: Ig, - Menu: qg, - Modal: ab, - NumberInput: mb, - PinInput: bb, - Popover: $b, - Progress: Ov, - Radio: Xv, - Select: tg, - Skeleton: ag, - SkipLink: ig, - Slider: bg, - Spinner: Sg, - Stat: $g, - Switch: Ah, - Table: Mh, - Tabs: ev, - Tag: mv, - Textarea: Cv, - Tooltip: $v, - Card: $p, - Stepper: Cm -}, m0 = { - colors: { - "chakra-body-text": { _light: "gray.800", _dark: "whiteAlpha.900" }, - "chakra-body-bg": { _light: "white", _dark: "gray.800" }, - "chakra-border-color": { _light: "gray.200", _dark: "whiteAlpha.300" }, - "chakra-inverse-text": { _light: "white", _dark: "gray.800" }, - "chakra-subtle-bg": { _light: "gray.100", _dark: "gray.700" }, - "chakra-subtle-text": { _light: "gray.600", _dark: "gray.400" }, - "chakra-placeholder-color": { _light: "gray.500", _dark: "whiteAlpha.400" } - } -}, h0 = { - global: { - body: { - fontFamily: "body", - color: "chakra-body-text", - bg: "chakra-body-bg", - transitionProperty: "background-color", - transitionDuration: "normal", - lineHeight: "base" - }, - "*::placeholder": { - color: "chakra-placeholder-color" - }, - "*, *::before, &::after": { - borderColor: "chakra-border-color" - } - } -}, v0 = "ltr", g0 = { - useSystemColorMode: !1, - initialColorMode: "light", - cssVarPrefix: "chakra" -}, ca = { - semanticTokens: m0, - direction: v0, - ...Nf, - components: f0, - styles: h0, - config: g0 -}, rs; -const b0 = { - baseStyle: { - ...ca.components.Heading.baseStyle, - ...(rs = ca.components.Heading.sizes) == null ? void 0 : rs.xl, - textAlign: "center", - lineHeight: 1.1, - mb: 3 - } -}; -var ts; -const p0 = { - baseStyle: { - ...ca.components.Heading.baseStyle, - ...(ts = ca.components.Heading.sizes) == null ? void 0 : ts.sm, - textAlign: "center", - fontStyle: "italic", - color: "gray.400" - } -}, y0 = ac({ - baseStyle: { - width: "100%", - height: "2px", - backgroundColor: "gray.300", - marginTop: "1.2em", - marginBottom: "1.5em" - } -}), S0 = [ - // alert message (when no questions are available) - "alert", - // question wrapper - "question", - // question title - "title", - // question description - "description", - // form radio group - "radioGroup", - // questions stack - "stack", - // form radio - "radio", - // form error message - "error" -], { defineMultiStyleConfig: x0, definePartsStyle: _0 } = oc(S0), w0 = _0({ - question: { - marginBottom: 8 - }, - title: { - fontWeight: "bold", - fontSize: "xl", - marginBottom: 1 - }, - description: { - marginBottom: 4 - } -}), k0 = x0({ - baseStyle: w0 -}), O0 = { - components: { - ElectionTitle: b0, - ElectionSchedule: p0, - HorizontalRuler: y0, - Questions: k0 - } -}; -export { - F0 as Balance, - is as ClientContext, - P0 as ClientProvider, - sf as Election, - Js as ElectionContext, - eu as ElectionDescription, - Zd as ElectionHeader, - Zs as ElectionProvider, - $s as ElectionSchedule, - p0 as ElectionScheduleTheme, - ru as ElectionStatusBadge, - Es as ElectionTitle, - b0 as ElectionTitleTheme, - cs as HR, - So as Image, - fa as Markdown, - cf as Organization, - N0 as OrganizationAvatar, - rl as OrganizationContext, - D0 as OrganizationDescription, - z0 as OrganizationHeader, - el as OrganizationName, - tl as OrganizationProvider, - Qs as QuestionField, - rf as QuestionsForm, - k0 as QuestionsTheme, - af as VoteButton, - Ec as linkify, - S0 as questionsAnatomy, - O0 as theme, - po as useClientContext, - uc as useClientProvider, - lt as useElection, - of as useElectionProvider, - ga as useOrganization, - lf as useOrganizationProvider -}; -//# sourceMappingURL=index.es.js.map diff --git a/packages/components/dist/index.es.js.map b/packages/components/dist/index.es.js.map deleted file mode 100644 index ce497ffb..00000000 --- a/packages/components/dist/index.es.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.es.js","sources":["../../../node_modules/react/cjs/react-jsx-dev-runtime.production.min.js","../../../node_modules/react/cjs/react-jsx-dev-runtime.development.js","../../../node_modules/react/jsx-dev-runtime.js","../src/client.tsx","../../../node_modules/@chakra-ui/shared-utils/dist/index.mjs","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/@chakra-ui/icon/dist/chunk-DKFDJSXF.mjs","../../../node_modules/@chakra-ui/react-context/dist/index.mjs","../../../node_modules/@chakra-ui/tag/dist/chunk-IXKZFKRY.mjs","../src/components/Account/Balance.tsx","../src/components/layout/HR.tsx","../../../node_modules/@chakra-ui/image/dist/chunk-QBIO4VEB.mjs","../../../node_modules/@chakra-ui/react-use-safe-layout-effect/dist/index.mjs","../../../node_modules/@chakra-ui/image/dist/chunk-HR33I6FK.mjs","../../../node_modules/@chakra-ui/image/dist/chunk-SMHKDLMK.mjs","../src/components/layout/Image.tsx","../../../node_modules/@chakra-ui/react-children-utils/dist/index.mjs","../../../node_modules/@chakra-ui/layout/dist/chunk-Z47J5YMH.mjs","../../../node_modules/@chakra-ui/breakpoint-utils/dist/chunk-G72KV6MB.mjs","../../../node_modules/@chakra-ui/layout/node_modules/@chakra-ui/object-utils/dist/chunk-R3DH46PF.mjs","../../../node_modules/@chakra-ui/layout/dist/chunk-P74GIWPW.mjs","../../../node_modules/@chakra-ui/layout/dist/chunk-AMDSPU3E.mjs","../../../node_modules/@chakra-ui/layout/dist/chunk-V4DIVZKN.mjs","../../../node_modules/@chakra-ui/layout/dist/chunk-O5CRURSQ.mjs","../../../node_modules/@chakra-ui/layout/dist/chunk-B2MGPQRJ.mjs","../../../node_modules/@chakra-ui/layout/dist/chunk-6CSUKJP7.mjs","../../../node_modules/@chakra-ui/layout/dist/chunk-YTV6DHKL.mjs","../../../node_modules/@chakra-ui/layout/dist/chunk-MVNZWEQB.mjs","../../../node_modules/@chakra-ui/table/dist/chunk-B3MS3L3D.mjs","../../../node_modules/@chakra-ui/table/dist/chunk-L7UVV2ML.mjs","../src/components/layout/Markdown.tsx","../../../node_modules/date-fns/esm/_lib/toInteger/index.js","../../../node_modules/date-fns/esm/_lib/requiredArgs/index.js","../../../node_modules/date-fns/esm/toDate/index.js","../../../node_modules/date-fns/esm/addMilliseconds/index.js","../../../node_modules/date-fns/esm/_lib/defaultOptions/index.js","../../../node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js","../../../node_modules/date-fns/esm/isDate/index.js","../../../node_modules/date-fns/esm/isValid/index.js","../../../node_modules/date-fns/esm/subMilliseconds/index.js","../../../node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js","../../../node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js","../../../node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js","../../../node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js","../../../node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js","../../../node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js","../../../node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js","../../../node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js","../../../node_modules/date-fns/esm/_lib/getUTCWeek/index.js","../../../node_modules/date-fns/esm/_lib/addLeadingZeros/index.js","../../../node_modules/date-fns/esm/_lib/format/lightFormatters/index.js","../../../node_modules/date-fns/esm/_lib/format/formatters/index.js","../../../node_modules/date-fns/esm/_lib/format/longFormatters/index.js","../../../node_modules/date-fns/esm/_lib/protectedTokens/index.js","../../../node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js","../../../node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js","../../../node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js","../../../node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js","../../../node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js","../../../node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js","../../../node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js","../../../node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js","../../../node_modules/date-fns/esm/locale/en-US/_lib/match/index.js","../../../node_modules/date-fns/esm/locale/en-US/index.js","../../../node_modules/date-fns/esm/format/index.js","../src/components/Election/parts.tsx","../../../node_modules/@chakra-ui/alert/dist/chunk-R7JICMEA.mjs","../../../node_modules/@chakra-ui/spinner/dist/chunk-NO6MRLPK.mjs","../../../node_modules/@chakra-ui/alert/dist/chunk-FZCW3KO4.mjs","../../../node_modules/@chakra-ui/alert/dist/chunk-TEHNKISS.mjs","../../../node_modules/@chakra-ui/alert/dist/chunk-RWQIUCJP.mjs","../../../node_modules/react-hook-form/dist/index.esm.mjs","../../../node_modules/@chakra-ui/react-use-merge-refs/dist/index.mjs","../../../node_modules/@chakra-ui/form-control/dist/chunk-6ZNYZUDD.mjs","../../../node_modules/@chakra-ui/form-control/dist/chunk-3GP7MWMA.mjs","../../../node_modules/@chakra-ui/radio/dist/chunk-ROBJ47HJ.mjs","../../../node_modules/@chakra-ui/radio/dist/chunk-QUJ23J4G.mjs","../../../node_modules/@zag-js/focus-visible/dist/index.mjs","../../../node_modules/@chakra-ui/radio/dist/chunk-5XCGGO7V.mjs","../../../node_modules/@chakra-ui/radio/dist/chunk-MEU4ZZ42.mjs","../src/components/Election/QuestionField.tsx","../src/components/Election/QuestionsForm.tsx","../../../node_modules/@chakra-ui/button/dist/chunk-DGWZA2DU.mjs","../../../node_modules/@chakra-ui/button/dist/chunk-FRFD4OXU.mjs","../../../node_modules/@chakra-ui/button/dist/chunk-HCASMTTF.mjs","../../../node_modules/@chakra-ui/button/dist/chunk-HNNHG6RU.mjs","../../../node_modules/@chakra-ui/button/dist/chunk-NAA7TEES.mjs","../src/components/Election/VoteButton.tsx","../src/components/Election/Election.tsx","../src/components/Organization/Name.tsx","../src/components/Organization/Organization.tsx","../src/components/Organization/Avatar.tsx","../src/components/Organization/Description.tsx","../src/components/Organization/Header.tsx","../../../node_modules/@chakra-ui/theme/dist/chunk-AU77DZXY.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-7OKLMD4V.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-ZV5E32CG.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-DDAHWWWN.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-C7H5GWRZ.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-4REDROSM.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-DJNGX4VH.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-OLDNEXT6.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-HOOF7HHD.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-G3IFUAY5.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-X4JBRTE2.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-VYR6F67Y.mjs","../../../node_modules/lodash.mergewith/index.js","../../../node_modules/@chakra-ui/styled-system/dist/index.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-TMUG4XNV.mjs","../../../node_modules/@chakra-ui/anatomy/dist/chunk-ZN6IUO2A.mjs","../../../node_modules/@chakra-ui/anatomy/dist/chunk-HAKT6JCA.mjs","../../../node_modules/color2k/dist/index.exports.import.es.mjs","../../../node_modules/@chakra-ui/theme-tools/dist/chunk-H4E5VM26.mjs","../../../node_modules/@chakra-ui/theme-tools/dist/chunk-7P3W45AB.mjs","../../../node_modules/@chakra-ui/theme-tools/dist/chunk-E3OBLH5E.mjs","../../../node_modules/@chakra-ui/theme-tools/dist/chunk-7SOXEYKO.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-KGFPXNP4.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-WHSEAAWU.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-RBQSCDLK.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-IBJP6BGU.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-CZP5TVGH.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-WFLWAEKG.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-OIGZPHLT.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-6Y3UQESG.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-VGCCECBM.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-EBS47JIL.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-3XG4KRSA.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-JDPWIQ7H.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-V3RHVDKJ.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-YSULOCDF.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-RSEFU3LC.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-IBL46MNN.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-Y6RR3LE6.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-EY6ACYQS.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-VQ2DUS6J.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-2T5TO72C.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-AQJ6AIMN.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-FIWRYWVW.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-XHTV2ZQR.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-XNRZTTJ2.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-QW3Z4V42.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-YJYMWHG4.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-PQSF5PVS.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-YZVOF4MP.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-RUW3STUO.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-D55YRTLZ.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-OYCZTG3L.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-X4O3JXYB.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-OZJFUHHJ.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-AP3MTUHH.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-PZHBQTKY.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-C4P5PUHY.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-CAKKPKRW.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-NDGGJV23.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-5Z4IVOU3.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-T276HDLM.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-YOXAUO7A.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-O7XTKHT6.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-KCPP2OFG.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-BF6JLLXF.mjs","../../../node_modules/@chakra-ui/theme/dist/chunk-VHIIIDDT.mjs","../../../node_modules/@chakra-ui/theme/dist/index.mjs","../src/theme/election.ts","../src/theme/layout.ts","../src/theme/questions.ts","../src/theme/index.ts"],"sourcesContent":["/**\n * @license React\n * react-jsx-dev-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var a=Symbol.for(\"react.fragment\");exports.Fragment=a;exports.jsxDEV=void 0;\n","/**\n * @license React\n * react-jsx-dev-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('')) {\n _frame = _frame.replace('', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie.
\n // or
). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n //
, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n\nvar jsxDEV$1 = jsxWithValidation ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsxDEV = jsxDEV$1;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-dev-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-dev-runtime.development.js');\n}\n","import { Signer } from '@ethersproject/abstract-signer'\nimport { Wallet } from '@ethersproject/wallet'\nimport { AccountData, ClientOptions, EnvOptions, VocdoniSDKClient } from '@vocdoni/sdk'\nimport { createContext, useContext, useEffect, useState } from 'react'\n\nimport { ReactNode } from 'react'\n\nexport interface ClientSettings extends ClientOptions {}\n\ntype ClientProviderProps = {\n env?: Lowercase\n client?: VocdoniSDKClient\n signer?: Wallet | Signer\n}\n\nexport const useClientProvider = ({ env: e, client: c, signer: s }: ClientProviderProps) => {\n const [client, setClient] = useState(c as VocdoniSDKClient)\n const [signer, setSigner] = useState(s as Wallet | Signer)\n const [env, setEnv] = useState(e as string)\n const [account, setAccount] = useState()\n const [balance, setBalance] = useState(-1)\n\n // initialize client\n useEffect(() => {\n if (client) return\n\n if ((!env || (env && !env.length)) && !client) {\n throw new Error('You must provide a valid env or client to the ClientProvider')\n }\n\n const opts: ClientOptions = {\n env: env as EnvOptions,\n // TODO: REMOVE THE FOLLOWING csp_url when https://github.com/vocdoni/vocdoni-sdk/issues/163 is ready\n csp_url: \"http://localhost:5000/v1\"\n }\n\n if (signer) {\n opts.wallet = signer\n }\n\n setClient(new VocdoniSDKClient(opts))\n }, [env, c])\n\n // update env\n useEffect(() => {\n if (!e) return\n setEnv(e)\n }, [e])\n\n // update signer\n useEffect(() => {\n if (!s) return\n changeSigner(s)\n }, [s])\n\n // fetch account\n useEffect(() => {\n if (!client || account || !signer) return\n ;(async () => {\n await fetchAccount()\n })()\n }, [client, account, signer])\n\n // fetch balance\n useEffect(() => {\n if (!client || !account || !signer) return\n ;(async () => {\n await fetchBalance()\n })()\n }, [client, account, signer])\n\n // switch account behavior handler\n useEffect(() => {\n if (!('ethereum' in window)) return\n\n const accChanged = async (accs: string[]) => {\n // set to null so other effects do their job\n setAccount(undefined)\n }\n\n ;(window as any).ethereum.on('accountsChanged', accChanged)\n\n return () => {\n ;(window as any).ethereum.removeListener('accountsChanged', accChanged)\n }\n }, [])\n\n const fetchAccount = async () => {\n let acc: AccountData\n\n try {\n acc = await client.createAccount()\n setAccount(acc)\n\n return acc\n } catch (e) {\n console.error('could not fetch account:', e)\n }\n }\n\n const fetchBalance = async () => {\n try {\n if (!account) {\n throw new Error('Account not available')\n }\n\n if (account.balance <= 10 && env !== 'prod') {\n await client.collectFaucetTokens()\n const acc = await client.fetchAccountInfo()\n setBalance(acc.balance)\n\n return\n }\n\n setBalance(account.balance)\n } catch (e) {\n console.error('could not fetch balance:', e)\n }\n }\n\n const changeSigner = (signer: Wallet | Signer) => {\n if (!client) {\n throw new Error('No client initialized')\n }\n\n setSigner(signer)\n client.wallet = signer\n }\n\n const generateSigner = (seed?: string | string[]) => {\n if (!client) {\n throw new Error('No client initialized')\n }\n\n let signer: Wallet\n if (!seed) {\n client.generateRandomWallet()\n signer = client.wallet as Wallet\n } else {\n signer = VocdoniSDKClient.generateWalletFromData(seed)\n }\n\n return signer\n }\n\n return {\n account,\n balance,\n client,\n env,\n signer,\n generateSigner,\n fetchAccount,\n fetchBalance,\n setClient,\n setSigner: changeSigner,\n }\n}\n\nexport type ClientState = ReturnType\n\nexport const ClientContext = createContext(undefined)\n\nexport const useClientContext = () => {\n const ctxt = useContext(ClientContext)\n\n if (!ctxt) {\n throw new Error(\n 'useClientContext returned `undefined`, maybe you forgot to wrap the component within ?'\n )\n }\n\n return {\n ...ctxt,\n // Allow client extensions\n client: ctxt.client as T,\n }\n}\n\ntype ClientProviderComponentProps = ClientProviderProps & {\n children?: ReactNode\n}\n\nexport const ClientProvider = ({ env, client, signer, ...rest }: ClientProviderComponentProps) => {\n const value = useClientProvider({ env, client, signer })\n\n return \n}\n","// src/index.ts\nvar cx = (...classNames) => classNames.filter(Boolean).join(\" \");\nfunction isDev() {\n return process.env.NODE_ENV !== \"production\";\n}\nfunction isObject(value) {\n const type = typeof value;\n return value != null && (type === \"object\" || type === \"function\") && !Array.isArray(value);\n}\nvar warn = (options) => {\n const { condition, message } = options;\n if (condition && isDev()) {\n console.warn(message);\n }\n};\nfunction runIfFn(valueOrFn, ...args) {\n return isFunction(valueOrFn) ? valueOrFn(...args) : valueOrFn;\n}\nvar isFunction = (value) => typeof value === \"function\";\nvar dataAttr = (condition) => condition ? \"\" : void 0;\nvar ariaAttr = (condition) => condition ? true : void 0;\nfunction callAllHandlers(...fns) {\n return function func(event) {\n fns.some((fn) => {\n fn == null ? void 0 : fn(event);\n return event == null ? void 0 : event.defaultPrevented;\n });\n };\n}\nfunction callAll(...fns) {\n return function mergedFn(arg) {\n fns.forEach((fn) => {\n fn == null ? void 0 : fn(arg);\n });\n };\n}\nexport {\n ariaAttr,\n callAll,\n callAllHandlers,\n cx,\n dataAttr,\n isObject,\n runIfFn,\n warn\n};\n","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('')) {\n _frame = _frame.replace('', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie.
\n // or
). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n //
, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","// src/icon.tsx\nimport {\n chakra,\n forwardRef,\n useStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar fallbackIcon = {\n path: /* @__PURE__ */ jsxs(\"g\", { stroke: \"currentColor\", strokeWidth: \"1.5\", children: [\n /* @__PURE__ */ jsx(\n \"path\",\n {\n strokeLinecap: \"round\",\n fill: \"none\",\n d: \"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25\"\n }\n ),\n /* @__PURE__ */ jsx(\n \"path\",\n {\n fill: \"currentColor\",\n strokeLinecap: \"round\",\n d: \"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0\"\n }\n ),\n /* @__PURE__ */ jsx(\"circle\", { fill: \"none\", strokeMiterlimit: \"10\", cx: \"12\", cy: \"12\", r: \"11.25\" })\n ] }),\n viewBox: \"0 0 24 24\"\n};\nvar Icon = forwardRef((props, ref) => {\n const {\n as: element,\n viewBox,\n color = \"currentColor\",\n focusable = false,\n children,\n className,\n __css,\n ...rest\n } = props;\n const _className = cx(\"chakra-icon\", className);\n const customStyles = useStyleConfig(\"Icon\", props);\n const styles = {\n w: \"1em\",\n h: \"1em\",\n display: \"inline-block\",\n lineHeight: \"1em\",\n flexShrink: 0,\n color,\n ...__css,\n ...customStyles\n };\n const shared = {\n ref,\n focusable,\n className: _className,\n __css: styles\n };\n const _viewBox = viewBox != null ? viewBox : fallbackIcon.viewBox;\n if (element && typeof element !== \"string\") {\n return /* @__PURE__ */ jsx(chakra.svg, { as: element, ...shared, ...rest });\n }\n const _path = children != null ? children : fallbackIcon.path;\n return /* @__PURE__ */ jsx(chakra.svg, { verticalAlign: \"middle\", viewBox: _viewBox, ...shared, ...rest, children: _path });\n});\nIcon.displayName = \"Icon\";\nvar icon_default = Icon;\n\nexport {\n Icon,\n icon_default\n};\n","// src/index.ts\nimport {\n createContext as createReactContext,\n useContext as useReactContext\n} from \"react\";\nfunction getErrorMessage(hook, provider) {\n return `${hook} returned \\`undefined\\`. Seems you forgot to wrap component within ${provider}`;\n}\nfunction createContext(options = {}) {\n const {\n name,\n strict = true,\n hookName = \"useContext\",\n providerName = \"Provider\",\n errorMessage,\n defaultValue\n } = options;\n const Context = createReactContext(defaultValue);\n Context.displayName = name;\n function useContext() {\n var _a;\n const context = useReactContext(Context);\n if (!context && strict) {\n const error = new Error(\n errorMessage != null ? errorMessage : getErrorMessage(hookName, providerName)\n );\n error.name = \"ContextError\";\n (_a = Error.captureStackTrace) == null ? void 0 : _a.call(Error, error, useContext);\n throw error;\n }\n return context;\n }\n return [Context.Provider, useContext, Context];\n}\nexport {\n createContext\n};\n","// src/tag.tsx\nimport { Icon } from \"@chakra-ui/icon\";\nimport { createContext } from \"@chakra-ui/react-context\";\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useMultiStyleConfig\n} from \"@chakra-ui/system\";\nimport { jsx } from \"react/jsx-runtime\";\nvar [TagStylesProvider, useTagStyles] = createContext({\n name: `TagStylesContext`,\n errorMessage: `useTagStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" `\n});\nvar Tag = forwardRef((props, ref) => {\n const styles = useMultiStyleConfig(\"Tag\", props);\n const ownProps = omitThemingProps(props);\n const containerStyles = {\n display: \"inline-flex\",\n verticalAlign: \"top\",\n alignItems: \"center\",\n maxWidth: \"100%\",\n ...styles.container\n };\n return /* @__PURE__ */ jsx(TagStylesProvider, { value: styles, children: /* @__PURE__ */ jsx(chakra.span, { ref, ...ownProps, __css: containerStyles }) });\n});\nTag.displayName = \"Tag\";\nvar TagLabel = forwardRef((props, ref) => {\n const styles = useTagStyles();\n return /* @__PURE__ */ jsx(chakra.span, { ref, noOfLines: 1, ...props, __css: styles.label });\n});\nTagLabel.displayName = \"TagLabel\";\nvar TagLeftIcon = forwardRef((props, ref) => /* @__PURE__ */ jsx(Icon, { ref, verticalAlign: \"top\", marginEnd: \"0.5rem\", ...props }));\nTagLeftIcon.displayName = \"TagLeftIcon\";\nvar TagRightIcon = forwardRef((props, ref) => /* @__PURE__ */ jsx(Icon, { ref, verticalAlign: \"top\", marginStart: \"0.5rem\", ...props }));\nTagRightIcon.displayName = \"TagRightIcon\";\nvar TagCloseIcon = (props) => /* @__PURE__ */ jsx(Icon, { verticalAlign: \"inherit\", viewBox: \"0 0 512 512\", ...props, children: /* @__PURE__ */ jsx(\n \"path\",\n {\n fill: \"currentColor\",\n d: \"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z\"\n }\n) });\nTagCloseIcon.displayName = \"TagCloseIcon\";\nvar TagCloseButton = forwardRef(\n (props, ref) => {\n const { isDisabled, children, ...rest } = props;\n const styles = useTagStyles();\n const btnStyles = {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n outline: \"0\",\n ...styles.closeButton\n };\n return /* @__PURE__ */ jsx(\n chakra.button,\n {\n ref,\n \"aria-label\": \"close\",\n ...rest,\n type: \"button\",\n disabled: isDisabled,\n __css: btnStyles,\n children: children || /* @__PURE__ */ jsx(TagCloseIcon, {})\n }\n );\n }\n);\nTagCloseButton.displayName = \"TagCloseButton\";\n\nexport {\n useTagStyles,\n Tag,\n TagLabel,\n TagLeftIcon,\n TagRightIcon,\n TagCloseButton\n};\n","import { Tag, TagProps } from '@chakra-ui/tag'\nimport { useClientContext } from '../../client'\n\nexport const Balance = (props: TagProps) => {\n const { balance } = useClientContext()\n\n if (balance < 0) {\n // maybe return the connectbutton here?\n return null\n }\n\n let color = 'teal'\n if (balance < 50 && balance > 20) {\n color = 'yellow'\n } else if (balance <= 20) {\n color = 'red'\n }\n\n return (\n \n {balance} votokens\n \n )\n}\n","import { chakra, ChakraProps, useStyleConfig } from '@chakra-ui/system'\n\ntype HRProps = ChakraProps & {\n variant?: string\n}\n\nexport const HR = (props: HRProps) => {\n const { variant, ...rest } = props\n const styles = useStyleConfig('HorizontalRuler', { variant })\n\n return \n}\n\nHR.displayName = 'HorizontalRuler'\n","// src/native-image.tsx\nimport { forwardRef } from \"@chakra-ui/system\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NativeImage = forwardRef(function NativeImage2(props, ref) {\n const { htmlWidth, htmlHeight, alt, ...rest } = props;\n return /* @__PURE__ */ jsx(\"img\", { width: htmlWidth, height: htmlHeight, ref, alt, ...rest });\n});\nNativeImage.displayName = \"NativeImage\";\n\nexport {\n NativeImage\n};\n","// src/index.ts\nimport { useEffect, useLayoutEffect } from \"react\";\nvar useSafeLayoutEffect = Boolean(globalThis == null ? void 0 : globalThis.document) ? useLayoutEffect : useEffect;\nexport {\n useSafeLayoutEffect\n};\n","// src/use-image.ts\nimport { useSafeLayoutEffect } from \"@chakra-ui/react-use-safe-layout-effect\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nfunction useImage(props) {\n const {\n loading,\n src,\n srcSet,\n onLoad,\n onError,\n crossOrigin,\n sizes,\n ignoreFallback\n } = props;\n const [status, setStatus] = useState(\"pending\");\n useEffect(() => {\n setStatus(src ? \"loading\" : \"pending\");\n }, [src]);\n const imageRef = useRef();\n const load = useCallback(() => {\n if (!src)\n return;\n flush();\n const img = new Image();\n img.src = src;\n if (crossOrigin)\n img.crossOrigin = crossOrigin;\n if (srcSet)\n img.srcset = srcSet;\n if (sizes)\n img.sizes = sizes;\n if (loading)\n img.loading = loading;\n img.onload = (event) => {\n flush();\n setStatus(\"loaded\");\n onLoad == null ? void 0 : onLoad(event);\n };\n img.onerror = (error) => {\n flush();\n setStatus(\"failed\");\n onError == null ? void 0 : onError(error);\n };\n imageRef.current = img;\n }, [src, crossOrigin, srcSet, sizes, onLoad, onError, loading]);\n const flush = () => {\n if (imageRef.current) {\n imageRef.current.onload = null;\n imageRef.current.onerror = null;\n imageRef.current = null;\n }\n };\n useSafeLayoutEffect(() => {\n if (ignoreFallback)\n return void 0;\n if (status === \"loading\") {\n load();\n }\n return () => {\n flush();\n };\n }, [status, load, ignoreFallback]);\n return ignoreFallback ? \"loaded\" : status;\n}\nvar shouldShowFallbackImage = (status, fallbackStrategy) => status !== \"loaded\" && fallbackStrategy === \"beforeLoadOrError\" || status === \"failed\" && fallbackStrategy === \"onError\";\n\nexport {\n useImage,\n shouldShowFallbackImage\n};\n","import {\n NativeImage\n} from \"./chunk-QBIO4VEB.mjs\";\nimport {\n shouldShowFallbackImage,\n useImage\n} from \"./chunk-HR33I6FK.mjs\";\n\n// src/image.tsx\nimport {\n chakra,\n forwardRef\n} from \"@chakra-ui/system\";\n\n// ../../utilities/object-utils/src/omit.ts\nfunction omit(object, keysToOmit = []) {\n const clone = Object.assign({}, object);\n for (const key of keysToOmit) {\n if (key in clone) {\n delete clone[key];\n }\n }\n return clone;\n}\n\n// src/image.tsx\nimport { jsx } from \"react/jsx-runtime\";\nvar Image = forwardRef(function Image2(props, ref) {\n const {\n fallbackSrc,\n fallback,\n src,\n srcSet,\n align,\n fit,\n loading,\n ignoreFallback,\n crossOrigin,\n fallbackStrategy = \"beforeLoadOrError\",\n referrerPolicy,\n ...rest\n } = props;\n const providedFallback = fallbackSrc !== void 0 || fallback !== void 0;\n const shouldIgnoreFallbackImage = loading != null || ignoreFallback || !providedFallback;\n const status = useImage({\n ...props,\n crossOrigin,\n ignoreFallback: shouldIgnoreFallbackImage\n });\n const showFallbackImage = shouldShowFallbackImage(status, fallbackStrategy);\n const shared = {\n ref,\n objectFit: fit,\n objectPosition: align,\n ...shouldIgnoreFallbackImage ? rest : omit(rest, [\"onError\", \"onLoad\"])\n };\n if (showFallbackImage) {\n if (fallback)\n return fallback;\n return /* @__PURE__ */ jsx(\n chakra.img,\n {\n as: NativeImage,\n className: \"chakra-image__placeholder\",\n src: fallbackSrc,\n ...shared\n }\n );\n }\n return /* @__PURE__ */ jsx(\n chakra.img,\n {\n as: NativeImage,\n src,\n srcSet,\n crossOrigin,\n loading,\n referrerPolicy,\n className: \"chakra-image\",\n ...shared\n }\n );\n});\nImage.displayName = \"Image\";\n\nexport {\n Image\n};\n","import { Image as CImage, ImageProps } from '@chakra-ui/image'\n\nexport type IPFSImageProps = ImageProps & {\n gateway?: string\n}\n\nexport const linkify = (link: string | undefined, gateway: string) => {\n if (typeof link === 'undefined') {\n return\n }\n\n if (!link.startsWith('ipfs')) {\n return link\n }\n\n const matches = link.match(/(?:ipfs:\\/\\/)?(.*)/)\n\n if (!matches) {\n // probably a wrong ipfs formatted link\n return link\n }\n\n const [, pin] = matches\n\n return gateway + pin\n}\n\nexport const Image = ({ src, ...props }: IPFSImageProps) => {\n if (!src) {\n return null\n }\n\n const link = linkify(src, props.gateway || 'https://infura-ipfs.io/ipfs/')\n\n return \n}\n","// src/index.ts\nimport { Children, isValidElement } from \"react\";\nfunction getValidChildren(children) {\n return Children.toArray(children).filter(\n (child) => isValidElement(child)\n );\n}\nexport {\n getValidChildren\n};\n","// src/list.tsx\nimport { Icon } from \"@chakra-ui/icon\";\nimport { createContext } from \"@chakra-ui/react-context\";\nimport { getValidChildren } from \"@chakra-ui/react-children-utils\";\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useMultiStyleConfig\n} from \"@chakra-ui/system\";\nimport { jsx } from \"react/jsx-runtime\";\nvar [ListStylesProvider, useListStyles] = createContext({\n name: `ListStylesContext`,\n errorMessage: `useListStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" `\n});\nvar List = forwardRef(function List2(props, ref) {\n const styles = useMultiStyleConfig(\"List\", props);\n const {\n children,\n styleType = \"none\",\n stylePosition,\n spacing,\n ...rest\n } = omitThemingProps(props);\n const validChildren = getValidChildren(children);\n const selector = \"& > *:not(style) ~ *:not(style)\";\n const spacingStyle = spacing ? { [selector]: { mt: spacing } } : {};\n return /* @__PURE__ */ jsx(ListStylesProvider, { value: styles, children: /* @__PURE__ */ jsx(\n chakra.ul,\n {\n ref,\n listStyleType: styleType,\n listStylePosition: stylePosition,\n role: \"list\",\n __css: { ...styles.container, ...spacingStyle },\n ...rest,\n children: validChildren\n }\n ) });\n});\nList.displayName = \"List\";\nvar OrderedList = forwardRef((props, ref) => {\n const { as, ...rest } = props;\n return /* @__PURE__ */ jsx(List, { ref, as: \"ol\", styleType: \"decimal\", marginStart: \"1em\", ...rest });\n});\nOrderedList.displayName = \"OrderedList\";\nvar UnorderedList = forwardRef(function UnorderedList2(props, ref) {\n const { as, ...rest } = props;\n return /* @__PURE__ */ jsx(List, { ref, as: \"ul\", styleType: \"initial\", marginStart: \"1em\", ...rest });\n});\nUnorderedList.displayName = \"UnorderedList\";\nvar ListItem = forwardRef(function ListItem2(props, ref) {\n const styles = useListStyles();\n return /* @__PURE__ */ jsx(chakra.li, { ref, ...props, __css: styles.item });\n});\nListItem.displayName = \"ListItem\";\nvar ListIcon = forwardRef(function ListIcon2(props, ref) {\n const styles = useListStyles();\n return /* @__PURE__ */ jsx(Icon, { ref, role: \"presentation\", ...props, __css: styles.icon });\n});\nListIcon.displayName = \"ListIcon\";\n\nexport {\n useListStyles,\n List,\n OrderedList,\n UnorderedList,\n ListItem,\n ListIcon\n};\n","// src/responsive.ts\nimport { isObject } from \"@chakra-ui/shared-utils\";\nvar breakpoints = Object.freeze([\n \"base\",\n \"sm\",\n \"md\",\n \"lg\",\n \"xl\",\n \"2xl\"\n]);\nfunction mapResponsive(prop, mapper) {\n if (Array.isArray(prop)) {\n return prop.map((item) => item === null ? null : mapper(item));\n }\n if (isObject(prop)) {\n return Object.keys(prop).reduce((result, key) => {\n result[key] = mapper(prop[key]);\n return result;\n }, {});\n }\n if (prop != null) {\n return mapper(prop);\n }\n return null;\n}\nfunction objectToArrayNotation(obj, bps = breakpoints) {\n const result = bps.map((br) => {\n var _a;\n return (_a = obj[br]) != null ? _a : null;\n });\n const lastItem = result[result.length - 1];\n while (lastItem === null)\n result.pop();\n return result;\n}\nfunction arrayToObjectNotation(values, bps = breakpoints) {\n const result = {};\n values.forEach((value, index) => {\n const key = bps[index];\n if (value == null)\n return;\n result[key] = value;\n });\n return result;\n}\nfunction isResponsiveObjectLike(obj, bps = breakpoints) {\n const keys = Object.keys(obj);\n return keys.length > 0 && keys.every((key) => bps.includes(key));\n}\nvar isCustomBreakpoint = (v) => Number.isNaN(Number(v));\n\nexport {\n breakpoints,\n mapResponsive,\n objectToArrayNotation,\n arrayToObjectNotation,\n isResponsiveObjectLike,\n isCustomBreakpoint\n};\n","// src/compact.ts\nfunction compact(object) {\n const clone = Object.assign({}, object);\n for (let key in clone) {\n if (clone[key] === void 0)\n delete clone[key];\n }\n return clone;\n}\n\nexport {\n compact\n};\n","// src/text.tsx\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { compact } from \"@chakra-ui/object-utils\";\nimport { jsx } from \"react/jsx-runtime\";\nvar Text = forwardRef(function Text2(props, ref) {\n const styles = useStyleConfig(\"Text\", props);\n const { className, align, decoration, casing, ...rest } = omitThemingProps(props);\n const aliasedProps = compact({\n textAlign: props.align,\n textDecoration: props.decoration,\n textTransform: props.casing\n });\n return /* @__PURE__ */ jsx(\n chakra.p,\n {\n ref,\n className: cx(\"chakra-text\", props.className),\n ...aliasedProps,\n ...rest,\n __css: styles\n }\n );\n});\nText.displayName = \"Text\";\n\nexport {\n Text\n};\n","// src/stack/stack-item.tsx\nimport { chakra } from \"@chakra-ui/system\";\nimport { jsx } from \"react/jsx-runtime\";\nvar StackItem = (props) => /* @__PURE__ */ jsx(\n chakra.div,\n {\n className: \"chakra-stack__item\",\n ...props,\n __css: {\n display: \"inline-block\",\n flex: \"0 0 auto\",\n minWidth: 0,\n ...props[\"__css\"]\n }\n }\n);\nStackItem.displayName = \"StackItem\";\n\nexport {\n StackItem\n};\n","// src/stack/stack.utils.tsx\nimport { mapResponsive } from \"@chakra-ui/breakpoint-utils\";\nvar selector = \"& > *:not(style) ~ *:not(style)\";\nfunction getStackStyles(options) {\n const { spacing, direction } = options;\n const directionStyles = {\n column: {\n marginTop: spacing,\n marginEnd: 0,\n marginBottom: 0,\n marginStart: 0\n },\n row: { marginTop: 0, marginEnd: 0, marginBottom: 0, marginStart: spacing },\n \"column-reverse\": {\n marginTop: 0,\n marginEnd: 0,\n marginBottom: spacing,\n marginStart: 0\n },\n \"row-reverse\": {\n marginTop: 0,\n marginEnd: spacing,\n marginBottom: 0,\n marginStart: 0\n }\n };\n return {\n flexDirection: direction,\n [selector]: mapResponsive(\n direction,\n (value) => directionStyles[value]\n )\n };\n}\nfunction getDividerStyles(options) {\n const { spacing, direction } = options;\n const dividerStyles = {\n column: {\n my: spacing,\n mx: 0,\n borderLeftWidth: 0,\n borderBottomWidth: \"1px\"\n },\n \"column-reverse\": {\n my: spacing,\n mx: 0,\n borderLeftWidth: 0,\n borderBottomWidth: \"1px\"\n },\n row: {\n mx: spacing,\n my: 0,\n borderLeftWidth: \"1px\",\n borderBottomWidth: 0\n },\n \"row-reverse\": {\n mx: spacing,\n my: 0,\n borderLeftWidth: \"1px\",\n borderBottomWidth: 0\n }\n };\n return {\n \"&\": mapResponsive(\n direction,\n (value) => dividerStyles[value]\n )\n };\n}\n\nexport {\n selector,\n getStackStyles,\n getDividerStyles\n};\n","import {\n StackItem\n} from \"./chunk-AMDSPU3E.mjs\";\nimport {\n getDividerStyles,\n getStackStyles,\n selector\n} from \"./chunk-V4DIVZKN.mjs\";\n\n// src/stack/stack.tsx\nimport {\n chakra,\n forwardRef\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { getValidChildren } from \"@chakra-ui/react-children-utils\";\nimport { cloneElement, Fragment, useMemo } from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar Stack = forwardRef((props, ref) => {\n const {\n isInline,\n direction: directionProp,\n align,\n justify,\n spacing = \"0.5rem\",\n wrap,\n children,\n divider,\n className,\n shouldWrapChildren,\n ...rest\n } = props;\n const direction = isInline ? \"row\" : directionProp != null ? directionProp : \"column\";\n const styles = useMemo(\n () => getStackStyles({ direction, spacing }),\n [direction, spacing]\n );\n const dividerStyle = useMemo(\n () => getDividerStyles({ spacing, direction }),\n [spacing, direction]\n );\n const hasDivider = !!divider;\n const shouldUseChildren = !shouldWrapChildren && !hasDivider;\n const clones = useMemo(() => {\n const validChildren = getValidChildren(children);\n return shouldUseChildren ? validChildren : validChildren.map((child, index) => {\n const key = typeof child.key !== \"undefined\" ? child.key : index;\n const isLast = index + 1 === validChildren.length;\n const wrappedChild = /* @__PURE__ */ jsx(StackItem, { children: child }, key);\n const _child = shouldWrapChildren ? wrappedChild : child;\n if (!hasDivider)\n return _child;\n const clonedDivider = cloneElement(\n divider,\n {\n __css: dividerStyle\n }\n );\n const _divider = isLast ? null : clonedDivider;\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n _child,\n _divider\n ] }, key);\n });\n }, [\n divider,\n dividerStyle,\n hasDivider,\n shouldUseChildren,\n shouldWrapChildren,\n children\n ]);\n const _className = cx(\"chakra-stack\", className);\n return /* @__PURE__ */ jsx(\n chakra.div,\n {\n ref,\n display: \"flex\",\n alignItems: align,\n justifyContent: justify,\n flexDirection: styles.flexDirection,\n flexWrap: wrap,\n className: _className,\n __css: hasDivider ? {} : { [selector]: styles[selector] },\n ...rest,\n children: clones\n }\n );\n});\nStack.displayName = \"Stack\";\n\nexport {\n Stack\n};\n","// src/heading.tsx\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { jsx } from \"react/jsx-runtime\";\nvar Heading = forwardRef(function Heading2(props, ref) {\n const styles = useStyleConfig(\"Heading\", props);\n const { className, ...rest } = omitThemingProps(props);\n return /* @__PURE__ */ jsx(\n chakra.h2,\n {\n ref,\n className: cx(\"chakra-heading\", props.className),\n ...rest,\n __css: styles\n }\n );\n});\nHeading.displayName = \"Heading\";\n\nexport {\n Heading\n};\n","// src/box.tsx\nimport {\n chakra,\n forwardRef\n} from \"@chakra-ui/system\";\nimport { jsx } from \"react/jsx-runtime\";\nvar Box = chakra(\"div\");\nBox.displayName = \"Box\";\nvar Square = forwardRef(function Square2(props, ref) {\n const { size, centerContent = true, ...rest } = props;\n const styles = centerContent ? { display: \"flex\", alignItems: \"center\", justifyContent: \"center\" } : {};\n return /* @__PURE__ */ jsx(\n Box,\n {\n ref,\n boxSize: size,\n __css: {\n ...styles,\n flexShrink: 0,\n flexGrow: 0\n },\n ...rest\n }\n );\n});\nSquare.displayName = \"Square\";\nvar Circle = forwardRef(function Circle2(props, ref) {\n const { size, ...rest } = props;\n return /* @__PURE__ */ jsx(Square, { size, ref, borderRadius: \"9999px\", ...rest });\n});\nCircle.displayName = \"Circle\";\n\nexport {\n Box,\n Square,\n Circle\n};\n","// src/link.tsx\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { jsx } from \"react/jsx-runtime\";\nvar Link = forwardRef(function Link2(props, ref) {\n const styles = useStyleConfig(\"Link\", props);\n const { className, isExternal, ...rest } = omitThemingProps(props);\n return /* @__PURE__ */ jsx(\n chakra.a,\n {\n target: isExternal ? \"_blank\" : void 0,\n rel: isExternal ? \"noopener\" : void 0,\n ref,\n className: cx(\"chakra-link\", className),\n ...rest,\n __css: styles\n }\n );\n});\nLink.displayName = \"Link\";\n\nexport {\n Link\n};\n","// src/code.tsx\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { jsx } from \"react/jsx-runtime\";\nvar Code = forwardRef(function Code2(props, ref) {\n const styles = useStyleConfig(\"Code\", props);\n const { className, ...rest } = omitThemingProps(props);\n return /* @__PURE__ */ jsx(\n chakra.code,\n {\n ref,\n className: cx(\"chakra-code\", props.className),\n ...rest,\n __css: {\n display: \"inline-block\",\n ...styles\n }\n }\n );\n});\nCode.displayName = \"Code\";\n\nexport {\n Code\n};\n","// src/table.tsx\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useMultiStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { createContext } from \"@chakra-ui/react-context\";\nimport { jsx } from \"react/jsx-runtime\";\nvar [TableStylesProvider, useTableStyles] = createContext({\n name: `TableStylesContext`,\n errorMessage: `useTableStyles returned is 'undefined'. Seems you forgot to wrap the components in \"
\" `\n});\nvar Table = forwardRef((props, ref) => {\n const styles = useMultiStyleConfig(\"Table\", props);\n const { className, layout, ...tableProps } = omitThemingProps(props);\n return /* @__PURE__ */ jsx(TableStylesProvider, { value: styles, children: /* @__PURE__ */ jsx(\n chakra.table,\n {\n ref,\n __css: { tableLayout: layout, ...styles.table },\n className: cx(\"chakra-table\", className),\n ...tableProps\n }\n ) });\n});\nTable.displayName = \"Table\";\n\nexport {\n useTableStyles,\n Table\n};\n","import {\n useTableStyles\n} from \"./chunk-B3MS3L3D.mjs\";\n\n// src/tr.tsx\nimport { chakra, forwardRef } from \"@chakra-ui/system\";\nimport { jsx } from \"react/jsx-runtime\";\nvar Tr = forwardRef((props, ref) => {\n const styles = useTableStyles();\n return /* @__PURE__ */ jsx(chakra.tr, { ...props, ref, __css: styles.tr });\n});\n\nexport {\n Tr\n};\n","import { Box, Code, Heading, Link, ListItem, OrderedList, Text, UnorderedList } from '@chakra-ui/layout'\nimport { chakra } from '@chakra-ui/system'\nimport { Table, Tr } from '@chakra-ui/table'\nimport ReactMarkdown, { Options } from 'react-markdown'\nimport remarkGfm from 'remark-gfm'\n\ntype MarkdownProps = Options & {\n children?: string\n}\n\nconst MD = ({ children, ...rest }: MarkdownProps) => {\n if (!children) {\n return null\n }\n\n return (\n (\n \n {children}\n \n ),\n h1: ({ node, children, ...props }) => (\n \n {children}\n \n ),\n h2: ({ node, children, ...props }) => (\n \n {children}\n \n ),\n h3: ({ node, children, ...props }) => (\n \n {children}\n \n ),\n ol: ({ node, children, ...props }) => {children},\n ul: ({ node, children, ...props }) => {children},\n li: ({ node, children, ...props }) => {children},\n p: ({ node, children, ...props }) => (\n \n {children}\n \n ),\n table: ({ node, children, ...props }) => (\n \n
{children}
\n \n ),\n tr: ({ node, children, ...props }) => {children},\n code: ({ node, children, ...props }) => {children},\n }}\n {...rest}\n />\n )\n}\n\nexport const Markdown = chakra(MD)\nMarkdown.displayName = 'Markdown'\n","export default function toInteger(dirtyNumber) {\n if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {\n return NaN;\n }\n\n var number = Number(dirtyNumber);\n\n if (isNaN(number)) {\n return number;\n }\n\n return number < 0 ? Math.ceil(number) : Math.floor(number);\n}","export default function requiredArgs(required, args) {\n if (args.length < required) {\n throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');\n }\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @param {Date|Number} argument - the value to convert\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\n\nexport default function toDate(argument) {\n requiredArgs(1, arguments);\n var argStr = Object.prototype.toString.call(argument); // Clone the date\n\n if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime());\n } else if (typeof argument === 'number' || argStr === '[object Number]') {\n return new Date(argument);\n } else {\n if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn(\"Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments\"); // eslint-disable-next-line no-console\n\n console.warn(new Error().stack);\n }\n\n return new Date(NaN);\n }\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMilliseconds\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\n\nexport default function addMilliseconds(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var timestamp = toDate(dirtyDate).getTime();\n var amount = toInteger(dirtyAmount);\n return new Date(timestamp + amount);\n}","var defaultOptions = {};\nexport function getDefaultOptions() {\n return defaultOptions;\n}\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}","/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport default function getTimezoneOffsetInMilliseconds(date) {\n var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));\n utcDate.setUTCFullYear(date.getFullYear());\n return date.getTime() - utcDate.getTime();\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param {*} value - the value to check\n * @returns {boolean} true if the given value is a date\n * @throws {TypeError} 1 arguments required\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\n\nexport default function isDate(value) {\n requiredArgs(1, arguments);\n return value instanceof Date || _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';\n}","import isDate from \"../isDate/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {*} date - the date to check\n * @returns {Boolean} the date is valid\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertable into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\n\nexport default function isValid(dirtyDate) {\n requiredArgs(1, arguments);\n\n if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {\n return false;\n }\n\n var date = toDate(dirtyDate);\n return !isNaN(Number(date));\n}","import addMilliseconds from \"../addMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name subMilliseconds\n * @category Millisecond Helpers\n * @summary Subtract the specified number of milliseconds from the given date.\n *\n * @description\n * Subtract the specified number of milliseconds from the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\n * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:29.250\n */\n\nexport default function subMilliseconds(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMilliseconds(dirtyDate, -amount);\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_DAY = 86400000;\nexport default function getUTCDayOfYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var timestamp = date.getTime();\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n var startOfYearTimestamp = date.getTime();\n var difference = timestamp - startOfYearTimestamp;\n return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function startOfUTCISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var weekStartsOn = 1;\n var date = toDate(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nexport default function getUTCISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getUTCFullYear();\n var fourthOfJanuaryOfNextYear = new Date(0);\n fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);\n var fourthOfJanuaryOfThisYear = new Date(0);\n fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","import getUTCISOWeekYear from \"../getUTCISOWeekYear/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function startOfUTCISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var year = getUTCISOWeekYear(dirtyDate);\n var fourthOfJanuary = new Date(0);\n fourthOfJanuary.setUTCFullYear(year, 0, 4);\n fourthOfJanuary.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCISOWeek(fourthOfJanuary);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport startOfUTCISOWeekYear from \"../startOfUTCISOWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\nexport default function getUTCISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function startOfUTCWeek(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n requiredArgs(1, arguments);\n var defaultOptions = getDefaultOptions();\n var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = toDate(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function getUTCWeekYear(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getUTCFullYear();\n var defaultOptions = getDefaultOptions();\n var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var firstWeekOfNextYear = new Date(0);\n firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);\n var firstWeekOfThisYear = new Date(0);\n firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","import getUTCWeekYear from \"../getUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function startOfUTCWeekYear(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n requiredArgs(1, arguments);\n var defaultOptions = getDefaultOptions();\n var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);\n var year = getUTCWeekYear(dirtyDate, options);\n var firstWeek = new Date(0);\n firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCWeek(firstWeek, options);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport startOfUTCWeekYear from \"../startOfUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\nexport default function getUTCWeek(dirtyDate, options) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","export default function addLeadingZeros(number, targetLength) {\n var sign = number < 0 ? '-' : '';\n var output = Math.abs(number).toString();\n\n while (output.length < targetLength) {\n output = '0' + output;\n }\n\n return sign + output;\n}","import addLeadingZeros from \"../../addLeadingZeros/index.js\";\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nvar formatters = {\n // Year\n y: function y(date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);\n },\n // Month\n M: function M(date, token) {\n var month = date.getUTCMonth();\n return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n // Day of the month\n d: function d(date, token) {\n return addLeadingZeros(date.getUTCDate(), token.length);\n },\n // AM or PM\n a: function a(date, token) {\n var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';\n\n switch (token) {\n case 'a':\n case 'aa':\n return dayPeriodEnumValue.toUpperCase();\n\n case 'aaa':\n return dayPeriodEnumValue;\n\n case 'aaaaa':\n return dayPeriodEnumValue[0];\n\n case 'aaaa':\n default:\n return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';\n }\n },\n // Hour [1-12]\n h: function h(date, token) {\n return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);\n },\n // Hour [0-23]\n H: function H(date, token) {\n return addLeadingZeros(date.getUTCHours(), token.length);\n },\n // Minute\n m: function m(date, token) {\n return addLeadingZeros(date.getUTCMinutes(), token.length);\n },\n // Second\n s: function s(date, token) {\n return addLeadingZeros(date.getUTCSeconds(), token.length);\n },\n // Fraction of second\n S: function S(date, token) {\n var numberOfDigits = token.length;\n var milliseconds = date.getUTCMilliseconds();\n var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));\n return addLeadingZeros(fractionalSeconds, token.length);\n }\n};\nexport default formatters;","import getUTCDayOfYear from \"../../../_lib/getUTCDayOfYear/index.js\";\nimport getUTCISOWeek from \"../../../_lib/getUTCISOWeek/index.js\";\nimport getUTCISOWeekYear from \"../../../_lib/getUTCISOWeekYear/index.js\";\nimport getUTCWeek from \"../../../_lib/getUTCWeek/index.js\";\nimport getUTCWeekYear from \"../../../_lib/getUTCWeekYear/index.js\";\nimport addLeadingZeros from \"../../addLeadingZeros/index.js\";\nimport lightFormatters from \"../lightFormatters/index.js\";\nvar dayPeriodEnum = {\n am: 'am',\n pm: 'pm',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n};\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\nvar formatters = {\n // Era\n G: function G(date, token, localize) {\n var era = date.getUTCFullYear() > 0 ? 1 : 0;\n\n switch (token) {\n // AD, BC\n case 'G':\n case 'GG':\n case 'GGG':\n return localize.era(era, {\n width: 'abbreviated'\n });\n // A, B\n\n case 'GGGGG':\n return localize.era(era, {\n width: 'narrow'\n });\n // Anno Domini, Before Christ\n\n case 'GGGG':\n default:\n return localize.era(era, {\n width: 'wide'\n });\n }\n },\n // Year\n y: function y(date, token, localize) {\n // Ordinal number\n if (token === 'yo') {\n var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, {\n unit: 'year'\n });\n }\n\n return lightFormatters.y(date, token);\n },\n // Local week-numbering year\n Y: function Y(date, token, localize, options) {\n var signedWeekYear = getUTCWeekYear(date, options); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; // Two digit year\n\n if (token === 'YY') {\n var twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n } // Ordinal number\n\n\n if (token === 'Yo') {\n return localize.ordinalNumber(weekYear, {\n unit: 'year'\n });\n } // Padding\n\n\n return addLeadingZeros(weekYear, token.length);\n },\n // ISO week-numbering year\n R: function R(date, token) {\n var isoWeekYear = getUTCISOWeekYear(date); // Padding\n\n return addLeadingZeros(isoWeekYear, token.length);\n },\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function u(date, token) {\n var year = date.getUTCFullYear();\n return addLeadingZeros(year, token.length);\n },\n // Quarter\n Q: function Q(date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n switch (token) {\n // 1, 2, 3, 4\n case 'Q':\n return String(quarter);\n // 01, 02, 03, 04\n\n case 'QQ':\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n\n case 'Qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'QQQ':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'QQQQQ':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'QQQQ':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone quarter\n q: function q(date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n switch (token) {\n // 1, 2, 3, 4\n case 'q':\n return String(quarter);\n // 01, 02, 03, 04\n\n case 'qq':\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n\n case 'qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'qqq':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'qqqqq':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'qqqq':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Month\n M: function M(date, token, localize) {\n var month = date.getUTCMonth();\n\n switch (token) {\n case 'M':\n case 'MM':\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n\n case 'Mo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n\n case 'MMM':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // J, F, ..., D\n\n case 'MMMMM':\n return localize.month(month, {\n width: 'narrow',\n context: 'formatting'\n });\n // January, February, ..., December\n\n case 'MMMM':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone month\n L: function L(date, token, localize) {\n var month = date.getUTCMonth();\n\n switch (token) {\n // 1, 2, ..., 12\n case 'L':\n return String(month + 1);\n // 01, 02, ..., 12\n\n case 'LL':\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n\n case 'Lo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n\n case 'LLL':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // J, F, ..., D\n\n case 'LLLLL':\n return localize.month(month, {\n width: 'narrow',\n context: 'standalone'\n });\n // January, February, ..., December\n\n case 'LLLL':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Local week of year\n w: function w(date, token, localize, options) {\n var week = getUTCWeek(date, options);\n\n if (token === 'wo') {\n return localize.ordinalNumber(week, {\n unit: 'week'\n });\n }\n\n return addLeadingZeros(week, token.length);\n },\n // ISO week of year\n I: function I(date, token, localize) {\n var isoWeek = getUTCISOWeek(date);\n\n if (token === 'Io') {\n return localize.ordinalNumber(isoWeek, {\n unit: 'week'\n });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n // Day of the month\n d: function d(date, token, localize) {\n if (token === 'do') {\n return localize.ordinalNumber(date.getUTCDate(), {\n unit: 'date'\n });\n }\n\n return lightFormatters.d(date, token);\n },\n // Day of year\n D: function D(date, token, localize) {\n var dayOfYear = getUTCDayOfYear(date);\n\n if (token === 'Do') {\n return localize.ordinalNumber(dayOfYear, {\n unit: 'dayOfYear'\n });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n // Day of week\n E: function E(date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n\n switch (token) {\n // Tue\n case 'E':\n case 'EE':\n case 'EEE':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'EEEEE':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'EEEEEE':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'EEEE':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Local day of week\n e: function e(date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case 'e':\n return String(localDayOfWeek);\n // Padded numerical value\n\n case 'ee':\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n\n case 'eo':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n\n case 'eee':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'eeeee':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'eeeeee':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'eeee':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone local day of week\n c: function c(date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n switch (token) {\n // Numerical value (same as in `e`)\n case 'c':\n return String(localDayOfWeek);\n // Padded numerical value\n\n case 'cc':\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n\n case 'co':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n\n case 'ccc':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // T\n\n case 'ccccc':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tu\n\n case 'cccccc':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'standalone'\n });\n // Tuesday\n\n case 'cccc':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // ISO day of week\n i: function i(date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n\n switch (token) {\n // 2\n case 'i':\n return String(isoDayOfWeek);\n // 02\n\n case 'ii':\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n\n case 'io':\n return localize.ordinalNumber(isoDayOfWeek, {\n unit: 'day'\n });\n // Tue\n\n case 'iii':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'iiiii':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'iiiiii':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'iiii':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM or PM\n a: function a(date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n\n switch (token) {\n case 'a':\n case 'aa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'aaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n }).toLowerCase();\n\n case 'aaaaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'aaaa':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM, PM, midnight, noon\n b: function b(date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n }\n\n switch (token) {\n case 'b':\n case 'bb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'bbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n }).toLowerCase();\n\n case 'bbbbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'bbbb':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // in the morning, in the afternoon, in the evening, at night\n B: function B(date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case 'B':\n case 'BB':\n case 'BBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'BBBBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'BBBB':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Hour [1-12]\n h: function h(date, token, localize) {\n if (token === 'ho') {\n var hours = date.getUTCHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return lightFormatters.h(date, token);\n },\n // Hour [0-23]\n H: function H(date, token, localize) {\n if (token === 'Ho') {\n return localize.ordinalNumber(date.getUTCHours(), {\n unit: 'hour'\n });\n }\n\n return lightFormatters.H(date, token);\n },\n // Hour [0-11]\n K: function K(date, token, localize) {\n var hours = date.getUTCHours() % 12;\n\n if (token === 'Ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n // Hour [1-24]\n k: function k(date, token, localize) {\n var hours = date.getUTCHours();\n if (hours === 0) hours = 24;\n\n if (token === 'ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n // Minute\n m: function m(date, token, localize) {\n if (token === 'mo') {\n return localize.ordinalNumber(date.getUTCMinutes(), {\n unit: 'minute'\n });\n }\n\n return lightFormatters.m(date, token);\n },\n // Second\n s: function s(date, token, localize) {\n if (token === 'so') {\n return localize.ordinalNumber(date.getUTCSeconds(), {\n unit: 'second'\n });\n }\n\n return lightFormatters.s(date, token);\n },\n // Fraction of second\n S: function S(date, token) {\n return lightFormatters.S(date, token);\n },\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function X(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return 'Z';\n }\n\n switch (token) {\n // Hours and optional minutes\n case 'X':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n\n case 'XXXX':\n case 'XX':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n\n case 'XXXXX':\n case 'XXX': // Hours and minutes with `:` delimiter\n\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function x(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case 'x':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n\n case 'xxxx':\n case 'xx':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n\n case 'xxxxx':\n case 'xxx': // Hours and minutes with `:` delimiter\n\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (GMT)\n O: function O(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Short\n case 'O':\n case 'OO':\n case 'OOO':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n\n case 'OOOO':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (specific non-location)\n z: function z(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Short\n case 'z':\n case 'zz':\n case 'zzz':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n\n case 'zzzz':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Seconds timestamp\n t: function t(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = Math.floor(originalDate.getTime() / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n // Milliseconds timestamp\n T: function T(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = originalDate.getTime();\n return addLeadingZeros(timestamp, token.length);\n }\n};\n\nfunction formatTimezoneShort(offset, dirtyDelimiter) {\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = Math.floor(absOffset / 60);\n var minutes = absOffset % 60;\n\n if (minutes === 0) {\n return sign + String(hours);\n }\n\n var delimiter = dirtyDelimiter || '';\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {\n if (offset % 60 === 0) {\n var sign = offset > 0 ? '-' : '+';\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n\n return formatTimezone(offset, dirtyDelimiter);\n}\n\nfunction formatTimezone(offset, dirtyDelimiter) {\n var delimiter = dirtyDelimiter || '';\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);\n var minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n\nexport default formatters;","var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'P':\n return formatLong.date({\n width: 'short'\n });\n\n case 'PP':\n return formatLong.date({\n width: 'medium'\n });\n\n case 'PPP':\n return formatLong.date({\n width: 'long'\n });\n\n case 'PPPP':\n default:\n return formatLong.date({\n width: 'full'\n });\n }\n};\n\nvar timeLongFormatter = function timeLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'p':\n return formatLong.time({\n width: 'short'\n });\n\n case 'pp':\n return formatLong.time({\n width: 'medium'\n });\n\n case 'ppp':\n return formatLong.time({\n width: 'long'\n });\n\n case 'pppp':\n default:\n return formatLong.time({\n width: 'full'\n });\n }\n};\n\nvar dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) {\n var matchResult = pattern.match(/(P+)(p+)?/) || [];\n var datePattern = matchResult[1];\n var timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n\n var dateTimeFormat;\n\n switch (datePattern) {\n case 'P':\n dateTimeFormat = formatLong.dateTime({\n width: 'short'\n });\n break;\n\n case 'PP':\n dateTimeFormat = formatLong.dateTime({\n width: 'medium'\n });\n break;\n\n case 'PPP':\n dateTimeFormat = formatLong.dateTime({\n width: 'long'\n });\n break;\n\n case 'PPPP':\n default:\n dateTimeFormat = formatLong.dateTime({\n width: 'full'\n });\n break;\n }\n\n return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));\n};\n\nvar longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter\n};\nexport default longFormatters;","var protectedDayOfYearTokens = ['D', 'DD'];\nvar protectedWeekYearTokens = ['YY', 'YYYY'];\nexport function isProtectedDayOfYearToken(token) {\n return protectedDayOfYearTokens.indexOf(token) !== -1;\n}\nexport function isProtectedWeekYearToken(token) {\n return protectedWeekYearTokens.indexOf(token) !== -1;\n}\nexport function throwProtectedError(token, format, input) {\n if (token === 'YYYY') {\n throw new RangeError(\"Use `yyyy` instead of `YYYY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n } else if (token === 'YY') {\n throw new RangeError(\"Use `yy` instead of `YY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n } else if (token === 'D') {\n throw new RangeError(\"Use `d` instead of `D` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n } else if (token === 'DD') {\n throw new RangeError(\"Use `dd` instead of `DD` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n }\n}","var formatDistanceLocale = {\n lessThanXSeconds: {\n one: 'less than a second',\n other: 'less than {{count}} seconds'\n },\n xSeconds: {\n one: '1 second',\n other: '{{count}} seconds'\n },\n halfAMinute: 'half a minute',\n lessThanXMinutes: {\n one: 'less than a minute',\n other: 'less than {{count}} minutes'\n },\n xMinutes: {\n one: '1 minute',\n other: '{{count}} minutes'\n },\n aboutXHours: {\n one: 'about 1 hour',\n other: 'about {{count}} hours'\n },\n xHours: {\n one: '1 hour',\n other: '{{count}} hours'\n },\n xDays: {\n one: '1 day',\n other: '{{count}} days'\n },\n aboutXWeeks: {\n one: 'about 1 week',\n other: 'about {{count}} weeks'\n },\n xWeeks: {\n one: '1 week',\n other: '{{count}} weeks'\n },\n aboutXMonths: {\n one: 'about 1 month',\n other: 'about {{count}} months'\n },\n xMonths: {\n one: '1 month',\n other: '{{count}} months'\n },\n aboutXYears: {\n one: 'about 1 year',\n other: 'about {{count}} years'\n },\n xYears: {\n one: '1 year',\n other: '{{count}} years'\n },\n overXYears: {\n one: 'over 1 year',\n other: 'over {{count}} years'\n },\n almostXYears: {\n one: 'almost 1 year',\n other: 'almost {{count}} years'\n }\n};\n\nvar formatDistance = function formatDistance(token, count, options) {\n var result;\n var tokenValue = formatDistanceLocale[token];\n\n if (typeof tokenValue === 'string') {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace('{{count}}', count.toString());\n }\n\n if (options !== null && options !== void 0 && options.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return 'in ' + result;\n } else {\n return result + ' ago';\n }\n }\n\n return result;\n};\n\nexport default formatDistance;","export default function buildFormatLongFn(args) {\n return function () {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // TODO: Remove String()\n var width = options.width ? String(options.width) : args.defaultWidth;\n var format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n full: 'EEEE, MMMM do, y',\n long: 'MMMM do, y',\n medium: 'MMM d, y',\n short: 'MM/dd/yyyy'\n};\nvar timeFormats = {\n full: 'h:mm:ss a zzzz',\n long: 'h:mm:ss a z',\n medium: 'h:mm:ss a',\n short: 'h:mm a'\n};\nvar dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: '{{date}}, {{time}}',\n short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: 'full'\n }),\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: 'full'\n }),\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: 'full'\n })\n};\nexport default formatLong;","var formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: 'P'\n};\n\nvar formatRelative = function formatRelative(token, _date, _baseDate, _options) {\n return formatRelativeLocale[token];\n};\n\nexport default formatRelative;","export default function buildLocalizeFn(args) {\n return function (dirtyIndex, options) {\n var context = options !== null && options !== void 0 && options.context ? String(options.context) : 'standalone';\n var valuesArray;\n\n if (context === 'formatting' && args.formattingValues) {\n var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;\n valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n var _defaultWidth = args.defaultWidth;\n\n var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[_width] || args.values[_defaultWidth];\n }\n\n var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n\n return valuesArray[index];\n };\n}","import buildLocalizeFn from \"../../../_lib/buildLocalizeFn/index.js\";\nvar eraValues = {\n narrow: ['B', 'A'],\n abbreviated: ['BC', 'AD'],\n wide: ['Before Christ', 'Anno Domini']\n};\nvar quarterValues = {\n narrow: ['1', '2', '3', '4'],\n abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],\n wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']\n}; // Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\n\nvar monthValues = {\n narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n};\nvar dayValues = {\n narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n};\nvar dayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n }\n};\nvar formattingDayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n }\n};\n\nvar ordinalNumber = function ordinalNumber(dirtyNumber, _options) {\n var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n var rem100 = number % 100;\n\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + 'st';\n\n case 2:\n return number + 'nd';\n\n case 3:\n return number + 'rd';\n }\n }\n\n return number + 'th';\n};\n\nvar localize = {\n ordinalNumber: ordinalNumber,\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: 'wide'\n }),\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: 'wide',\n argumentCallback: function argumentCallback(quarter) {\n return quarter - 1;\n }\n }),\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: 'wide'\n }),\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: 'wide'\n }),\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: 'wide',\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: 'wide'\n })\n};\nexport default localize;","export default function buildMatchFn(args) {\n return function (string) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var width = options.width;\n var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];\n var matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n\n var matchedString = matchResult[0];\n var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];\n var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {\n return pattern.test(matchedString);\n }) : findKey(parsePatterns, function (pattern) {\n return pattern.test(matchedString);\n });\n var value;\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback ? options.valueCallback(value) : value;\n var rest = string.slice(matchedString.length);\n return {\n value: value,\n rest: rest\n };\n };\n}\n\nfunction findKey(object, predicate) {\n for (var key in object) {\n if (object.hasOwnProperty(key) && predicate(object[key])) {\n return key;\n }\n }\n\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (var key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n\n return undefined;\n}","export default function buildMatchPatternFn(args) {\n return function (string) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n var matchedString = matchResult[0];\n var parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];\n value = options.valueCallback ? options.valueCallback(value) : value;\n var rest = string.slice(matchedString.length);\n return {\n value: value,\n rest: rest\n };\n };\n}","import buildMatchFn from \"../../../_lib/buildMatchFn/index.js\";\nimport buildMatchPatternFn from \"../../../_lib/buildMatchPatternFn/index.js\";\nvar matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i\n};\nvar parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i]\n};\nvar matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i\n};\nvar parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i\n};\nvar parseMonthPatterns = {\n narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],\n any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]\n};\nvar matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i\n};\nvar parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]\n};\nvar matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i\n};\nvar parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i\n }\n};\nvar match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: function valueCallback(value) {\n return parseInt(value, 10);\n }\n }),\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseEraPatterns,\n defaultParseWidth: 'any'\n }),\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: 'any',\n valueCallback: function valueCallback(index) {\n return index + 1;\n }\n }),\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: 'any'\n }),\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseDayPatterns,\n defaultParseWidth: 'any'\n }),\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: 'any',\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: 'any'\n })\n};\nexport default match;","import formatDistance from \"./_lib/formatDistance/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\nimport formatRelative from \"./_lib/formatRelative/index.js\";\nimport localize from \"./_lib/localize/index.js\";\nimport match from \"./_lib/match/index.js\";\n\n/**\n * @type {Locale}\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}\n * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}\n */\nvar locale = {\n code: 'en-US',\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0\n /* Sunday */\n ,\n firstWeekContainsDate: 1\n }\n};\nexport default locale;","import isValid from \"../isValid/index.js\";\nimport subMilliseconds from \"../subMilliseconds/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport formatters from \"../_lib/format/formatters/index.js\";\nimport longFormatters from \"../_lib/format/longFormatters/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport { isProtectedDayOfYearToken, isProtectedWeekYearToken, throwProtectedError } from \"../_lib/protectedTokens/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\nimport defaultLocale from \"../_lib/defaultLocale/index.js\"; // This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\n\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\n\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n/**\n * @name format\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}\n * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param {Date|Number} date - the original date\n * @param {String} format - the string of tokens\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @returns {String} the formatted date string\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `localize` property\n * @throws {RangeError} `options.locale` must contain `formatLong` property\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\n\nexport default function format(dirtyDate, dirtyFormatStr, options) {\n var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;\n\n requiredArgs(2, arguments);\n var formatStr = String(dirtyFormatStr);\n var defaultOptions = getDefaultOptions();\n var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;\n var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n if (!locale.localize) {\n throw new RangeError('locale must contain localize property');\n }\n\n if (!locale.formatLong) {\n throw new RangeError('locale must contain formatLong property');\n }\n\n var originalDate = toDate(dirtyDate);\n\n if (!isValid(originalDate)) {\n throw new RangeError('Invalid time value');\n } // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n // This ensures that when UTC functions will be implemented, locales will be compatible with them.\n // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376\n\n\n var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);\n var utcDate = subMilliseconds(originalDate, timezoneOffset);\n var formatterOptions = {\n firstWeekContainsDate: firstWeekContainsDate,\n weekStartsOn: weekStartsOn,\n locale: locale,\n _originalDate: originalDate\n };\n var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {\n var firstCharacter = substring[0];\n\n if (firstCharacter === 'p' || firstCharacter === 'P') {\n var longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n\n return substring;\n }).join('').match(formattingTokensRegExp).map(function (substring) {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return \"'\";\n }\n\n var firstCharacter = substring[0];\n\n if (firstCharacter === \"'\") {\n return cleanEscapedString(substring);\n }\n\n var formatter = formatters[firstCharacter];\n\n if (formatter) {\n if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {\n throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));\n }\n\n if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {\n throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));\n }\n\n return formatter(utcDate, substring, locale.localize, formatterOptions);\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n }\n\n return substring;\n }).join('');\n return result;\n}\n\nfunction cleanEscapedString(input) {\n var matched = input.match(escapedStringRegExp);\n\n if (!matched) {\n return input;\n }\n\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}","import { HeadingProps } from '@chakra-ui/layout'\nimport {\n chakra,\n ChakraProps,\n forwardRef,\n omitThemingProps,\n useMultiStyleConfig,\n useStyleConfig,\n} from '@chakra-ui/system'\nimport { Tag, TagProps } from '@chakra-ui/tag'\nimport { ElectionStatus } from '@vocdoni/sdk'\nimport { format as dformat } from 'date-fns'\nimport { ReactMarkdownProps } from 'react-markdown/lib/complex-types'\n\nimport { Image, IPFSImageProps, Markdown } from '../layout'\nimport { useElection } from './Election'\n\nexport const ElectionTitle = forwardRef((props, ref) => {\n const { election } = useElection()\n const styles = useStyleConfig('ElectionTitle', props)\n const rest = omitThemingProps(props)\n\n if (!election) return null\n\n return (\n \n {election.title.default}\n \n )\n})\nElectionTitle.displayName = 'ElectionTitle'\n\nexport const ElectionHeader = (props: IPFSImageProps) => {\n const styles = useStyleConfig('ElectionHeader', props)\n const { election } = useElection()\n\n if (!election || (election && !election.header)) return null\n\n return \n}\n\nexport const ElectionDescription = (props: Omit & ChakraProps) => {\n const styles = useStyleConfig('ElectionDescription', props)\n const { election } = useElection()\n\n if (!election || (election && !election.description)) return null\n\n return (\n \n {election.description.default}\n \n )\n}\n\nexport type ElectionScheduleProps = HeadingProps & {\n format?: string\n}\n\nexport const ElectionSchedule = forwardRef(({ format, ...rest }, ref) => {\n const styles = useMultiStyleConfig('ElectionSchedule', rest)\n const { election } = useElection()\n\n let f = format\n if (!f) {\n f = 'd-L-y HH:mm'\n }\n\n if (!election) return null\n\n return (\n \n Voting period {dformat(new Date(election.startDate), f)} ~ \n {dformat(new Date(election.endDate), f)}\n \n )\n})\nElectionSchedule.displayName = 'ElectionSchedule'\n\nexport const ElectionStatusBadge = (props: TagProps) => {\n const { election, trans } = useElection()\n\n if (!election) return null\n\n const defaults: Record = {\n PROCESS_UNKNOWN: 'Unknown',\n UPCOMING: 'Upcoming',\n ONGOING: 'Ongoing',\n ENDED: 'Ended',\n CANCELED: 'Canceled',\n PAUSED: 'Paused',\n RESULTS: 'Results',\n }\n\n let { colorScheme } = props\n if (!colorScheme) {\n colorScheme = 'green'\n\n if ([ElectionStatus.PAUSED, ElectionStatus.ENDED].includes(election.status)) {\n colorScheme = 'yellow'\n }\n if ([ElectionStatus.CANCELED, ElectionStatus.PROCESS_UNKNOWN].includes(election.status)) {\n colorScheme = 'red'\n }\n }\n\n return (\n \n {trans(election.status, defaults[election.status])}\n \n )\n}\n","// src/icons.tsx\nimport { Icon } from \"@chakra-ui/icon\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction CheckIcon(props) {\n return /* @__PURE__ */ jsx(Icon, { viewBox: \"0 0 24 24\", ...props, children: /* @__PURE__ */ jsx(\n \"path\",\n {\n fill: \"currentColor\",\n d: \"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z\"\n }\n ) });\n}\nfunction InfoIcon(props) {\n return /* @__PURE__ */ jsx(Icon, { viewBox: \"0 0 24 24\", ...props, children: /* @__PURE__ */ jsx(\n \"path\",\n {\n fill: \"currentColor\",\n d: \"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z\"\n }\n ) });\n}\nfunction WarningIcon(props) {\n return /* @__PURE__ */ jsx(Icon, { viewBox: \"0 0 24 24\", ...props, children: /* @__PURE__ */ jsx(\n \"path\",\n {\n fill: \"currentColor\",\n d: \"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z\"\n }\n ) });\n}\n\nexport {\n CheckIcon,\n InfoIcon,\n WarningIcon\n};\n","// src/spinner.tsx\nimport {\n chakra,\n forwardRef,\n keyframes,\n omitThemingProps,\n useStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { jsx } from \"react/jsx-runtime\";\nvar spin = keyframes({\n \"0%\": {\n transform: \"rotate(0deg)\"\n },\n \"100%\": {\n transform: \"rotate(360deg)\"\n }\n});\nvar Spinner = forwardRef((props, ref) => {\n const styles = useStyleConfig(\"Spinner\", props);\n const {\n label = \"Loading...\",\n thickness = \"2px\",\n speed = \"0.45s\",\n emptyColor = \"transparent\",\n className,\n ...rest\n } = omitThemingProps(props);\n const _className = cx(\"chakra-spinner\", className);\n const spinnerStyles = {\n display: \"inline-block\",\n borderColor: \"currentColor\",\n borderStyle: \"solid\",\n borderRadius: \"99999px\",\n borderWidth: thickness,\n borderBottomColor: emptyColor,\n borderLeftColor: emptyColor,\n animation: `${spin} ${speed} linear infinite`,\n ...styles\n };\n return /* @__PURE__ */ jsx(\n chakra.div,\n {\n ref,\n __css: spinnerStyles,\n className: _className,\n ...rest,\n children: label && /* @__PURE__ */ jsx(chakra.span, { srOnly: true, children: label })\n }\n );\n});\nSpinner.displayName = \"Spinner\";\n\nexport {\n Spinner\n};\n","import {\n CheckIcon,\n InfoIcon,\n WarningIcon\n} from \"./chunk-R7JICMEA.mjs\";\n\n// src/alert-context.ts\nimport { createContext } from \"@chakra-ui/react-context\";\nimport { Spinner } from \"@chakra-ui/spinner\";\nvar [AlertProvider, useAlertContext] = createContext({\n name: \"AlertContext\",\n hookName: \"useAlertContext\",\n providerName: \"\"\n});\nvar [AlertStylesProvider, useAlertStyles] = createContext({\n name: `AlertStylesContext`,\n hookName: `useAlertStyles`,\n providerName: \"\"\n});\nvar STATUSES = {\n info: { icon: InfoIcon, colorScheme: \"blue\" },\n warning: { icon: WarningIcon, colorScheme: \"orange\" },\n success: { icon: CheckIcon, colorScheme: \"green\" },\n error: { icon: WarningIcon, colorScheme: \"red\" },\n loading: { icon: Spinner, colorScheme: \"blue\" }\n};\nfunction getStatusColorScheme(status) {\n return STATUSES[status].colorScheme;\n}\nfunction getStatusIcon(status) {\n return STATUSES[status].icon;\n}\n\nexport {\n AlertProvider,\n useAlertContext,\n AlertStylesProvider,\n useAlertStyles,\n getStatusColorScheme,\n getStatusIcon\n};\n","import {\n getStatusIcon,\n useAlertContext,\n useAlertStyles\n} from \"./chunk-FZCW3KO4.mjs\";\n\n// src/alert-icon.tsx\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { chakra } from \"@chakra-ui/system\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction AlertIcon(props) {\n const { status } = useAlertContext();\n const BaseIcon = getStatusIcon(status);\n const styles = useAlertStyles();\n const css = status === \"loading\" ? styles.spinner : styles.icon;\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n display: \"inherit\",\n \"data-status\": status,\n ...props,\n className: cx(\"chakra-alert__icon\", props.className),\n __css: css,\n children: props.children || /* @__PURE__ */ jsx(BaseIcon, { h: \"100%\", w: \"100%\" })\n }\n );\n}\nAlertIcon.displayName = \"AlertIcon\";\n\nexport {\n AlertIcon\n};\n","import {\n AlertProvider,\n AlertStylesProvider,\n getStatusColorScheme\n} from \"./chunk-FZCW3KO4.mjs\";\n\n// src/alert.tsx\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useMultiStyleConfig\n} from \"@chakra-ui/system\";\nimport { jsx } from \"react/jsx-runtime\";\nvar Alert = forwardRef(function Alert2(props, ref) {\n var _a;\n const { status = \"info\", addRole = true, ...rest } = omitThemingProps(props);\n const colorScheme = (_a = props.colorScheme) != null ? _a : getStatusColorScheme(status);\n const styles = useMultiStyleConfig(\"Alert\", { ...props, colorScheme });\n const alertStyles = {\n width: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n position: \"relative\",\n overflow: \"hidden\",\n ...styles.container\n };\n return /* @__PURE__ */ jsx(AlertProvider, { value: { status }, children: /* @__PURE__ */ jsx(AlertStylesProvider, { value: styles, children: /* @__PURE__ */ jsx(\n chakra.div,\n {\n \"data-status\": status,\n role: addRole ? \"alert\" : void 0,\n ref,\n ...rest,\n className: cx(\"chakra-alert\", props.className),\n __css: alertStyles\n }\n ) }) });\n});\nAlert.displayName = \"Alert\";\n\nexport {\n Alert\n};\n","import React from 'react';\n\nvar isCheckBoxInput = (element) => element.type === 'checkbox';\n\nvar isDateObject = (value) => value instanceof Date;\n\nvar isNullOrUndefined = (value) => value == null;\n\nconst isObjectType = (value) => typeof value === 'object';\nvar isObject = (value) => !isNullOrUndefined(value) &&\n !Array.isArray(value) &&\n isObjectType(value) &&\n !isDateObject(value);\n\nvar getEventValue = (event) => isObject(event) && event.target\n ? isCheckBoxInput(event.target)\n ? event.target.checked\n : event.target.value\n : event;\n\nvar getNodeParentName = (name) => name.substring(0, name.search(/\\.\\d+(\\.|$)/)) || name;\n\nvar isNameInFieldArray = (names, name) => names.has(getNodeParentName(name));\n\nvar isPlainObject = (tempObject) => {\n const prototypeCopy = tempObject.constructor && tempObject.constructor.prototype;\n return (isObject(prototypeCopy) && prototypeCopy.hasOwnProperty('isPrototypeOf'));\n};\n\nvar isWeb = typeof window !== 'undefined' &&\n typeof window.HTMLElement !== 'undefined' &&\n typeof document !== 'undefined';\n\nfunction cloneObject(data) {\n let copy;\n const isArray = Array.isArray(data);\n if (data instanceof Date) {\n copy = new Date(data);\n }\n else if (data instanceof Set) {\n copy = new Set(data);\n }\n else if (!(isWeb && (data instanceof Blob || data instanceof FileList)) &&\n (isArray || isObject(data))) {\n copy = isArray ? [] : {};\n if (!Array.isArray(data) && !isPlainObject(data)) {\n copy = data;\n }\n else {\n for (const key in data) {\n copy[key] = cloneObject(data[key]);\n }\n }\n }\n else {\n return data;\n }\n return copy;\n}\n\nvar compact = (value) => Array.isArray(value) ? value.filter(Boolean) : [];\n\nvar isUndefined = (val) => val === undefined;\n\nvar get = (obj, path, defaultValue) => {\n if (!path || !isObject(obj)) {\n return defaultValue;\n }\n const result = compact(path.split(/[,[\\].]+?/)).reduce((result, key) => isNullOrUndefined(result) ? result : result[key], obj);\n return isUndefined(result) || result === obj\n ? isUndefined(obj[path])\n ? defaultValue\n : obj[path]\n : result;\n};\n\nconst EVENTS = {\n BLUR: 'blur',\n FOCUS_OUT: 'focusout',\n CHANGE: 'change',\n};\nconst VALIDATION_MODE = {\n onBlur: 'onBlur',\n onChange: 'onChange',\n onSubmit: 'onSubmit',\n onTouched: 'onTouched',\n all: 'all',\n};\nconst INPUT_VALIDATION_RULES = {\n max: 'max',\n min: 'min',\n maxLength: 'maxLength',\n minLength: 'minLength',\n pattern: 'pattern',\n required: 'required',\n validate: 'validate',\n};\n\nconst HookFormContext = React.createContext(null);\n/**\n * This custom hook allows you to access the form context. useFormContext is intended to be used in deeply nested structures, where it would become inconvenient to pass the context as a prop. To be used with {@link FormProvider}.\n *\n * @remarks\n * [API](https://react-hook-form.com/api/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)\n *\n * @returns return all useForm methods\n *\n * @example\n * ```tsx\n * function App() {\n * const methods = useForm();\n * const onSubmit = data => console.log(data);\n *\n * return (\n * \n *
\n * \n * \n * \n *
\n * );\n * }\n *\n * function NestedInput() {\n * const { register } = useFormContext(); // retrieve all hook methods\n * return ;\n * }\n * ```\n */\nconst useFormContext = () => React.useContext(HookFormContext);\n/**\n * A provider component that propagates the `useForm` methods to all children components via [React Context](https://reactjs.org/docs/context.html) API. To be used with {@link useFormContext}.\n *\n * @remarks\n * [API](https://react-hook-form.com/api/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)\n *\n * @param props - all useFrom methods\n *\n * @example\n * ```tsx\n * function App() {\n * const methods = useForm();\n * const onSubmit = data => console.log(data);\n *\n * return (\n * \n *
\n * \n * \n * \n *
\n * );\n * }\n *\n * function NestedInput() {\n * const { register } = useFormContext(); // retrieve all hook methods\n * return ;\n * }\n * ```\n */\nconst FormProvider = (props) => {\n const { children, ...data } = props;\n return (React.createElement(HookFormContext.Provider, { value: data }, children));\n};\n\nvar getProxyFormState = (formState, control, localProxyFormState, isRoot = true) => {\n const result = {\n defaultValues: control._defaultValues,\n };\n for (const key in formState) {\n Object.defineProperty(result, key, {\n get: () => {\n const _key = key;\n if (control._proxyFormState[_key] !== VALIDATION_MODE.all) {\n control._proxyFormState[_key] = !isRoot || VALIDATION_MODE.all;\n }\n localProxyFormState && (localProxyFormState[_key] = true);\n return formState[_key];\n },\n });\n }\n return result;\n};\n\nvar isEmptyObject = (value) => isObject(value) && !Object.keys(value).length;\n\nvar shouldRenderFormState = (formStateData, _proxyFormState, updateFormState, isRoot) => {\n updateFormState(formStateData);\n const { name, ...formState } = formStateData;\n return (isEmptyObject(formState) ||\n Object.keys(formState).length >= Object.keys(_proxyFormState).length ||\n Object.keys(formState).find((key) => _proxyFormState[key] ===\n (!isRoot || VALIDATION_MODE.all)));\n};\n\nvar convertToArrayPayload = (value) => (Array.isArray(value) ? value : [value]);\n\nvar shouldSubscribeByName = (name, signalName, exact) => exact && signalName\n ? name === signalName\n : !name ||\n !signalName ||\n name === signalName ||\n convertToArrayPayload(name).some((currentName) => currentName &&\n (currentName.startsWith(signalName) ||\n signalName.startsWith(currentName)));\n\nfunction useSubscribe(props) {\n const _props = React.useRef(props);\n _props.current = props;\n React.useEffect(() => {\n const subscription = !props.disabled &&\n _props.current.subject &&\n _props.current.subject.subscribe({\n next: _props.current.next,\n });\n return () => {\n subscription && subscription.unsubscribe();\n };\n }, [props.disabled]);\n}\n\n/**\n * This custom hook allows you to subscribe to each form state, and isolate the re-render at the custom hook level. It has its scope in terms of form state subscription, so it would not affect other useFormState and useForm. Using this hook can reduce the re-render impact on large and complex form application.\n *\n * @remarks\n * [API](https://react-hook-form.com/api/useformstate) • [Demo](https://codesandbox.io/s/useformstate-75xly)\n *\n * @param props - include options on specify fields to subscribe. {@link UseFormStateReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, handleSubmit, control } = useForm({\n * defaultValues: {\n * firstName: \"firstName\"\n * }});\n * const { dirtyFields } = useFormState({\n * control\n * });\n * const onSubmit = (data) => console.log(data);\n *\n * return (\n *
\n * \n * {dirtyFields.firstName &&

Field is dirty.

}\n * \n *
\n * );\n * }\n * ```\n */\nfunction useFormState(props) {\n const methods = useFormContext();\n const { control = methods.control, disabled, name, exact } = props || {};\n const [formState, updateFormState] = React.useState(control._formState);\n const _mounted = React.useRef(true);\n const _localProxyFormState = React.useRef({\n isDirty: false,\n isLoading: false,\n dirtyFields: false,\n touchedFields: false,\n isValidating: false,\n isValid: false,\n errors: false,\n });\n const _name = React.useRef(name);\n _name.current = name;\n useSubscribe({\n disabled,\n next: (value) => _mounted.current &&\n shouldSubscribeByName(_name.current, value.name, exact) &&\n shouldRenderFormState(value, _localProxyFormState.current, control._updateFormState) &&\n updateFormState({\n ...control._formState,\n ...value,\n }),\n subject: control._subjects.state,\n });\n React.useEffect(() => {\n _mounted.current = true;\n _localProxyFormState.current.isValid && control._updateValid(true);\n return () => {\n _mounted.current = false;\n };\n }, [control]);\n return getProxyFormState(formState, control, _localProxyFormState.current, false);\n}\n\nvar isString = (value) => typeof value === 'string';\n\nvar generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) => {\n if (isString(names)) {\n isGlobal && _names.watch.add(names);\n return get(formValues, names, defaultValue);\n }\n if (Array.isArray(names)) {\n return names.map((fieldName) => (isGlobal && _names.watch.add(fieldName), get(formValues, fieldName)));\n }\n isGlobal && (_names.watchAll = true);\n return formValues;\n};\n\n/**\n * Custom hook to subscribe to field change and isolate re-rendering at the component level.\n *\n * @remarks\n *\n * [API](https://react-hook-form.com/api/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e)\n *\n * @example\n * ```tsx\n * const { watch } = useForm();\n * const values = useWatch({\n * name: \"fieldName\"\n * control,\n * })\n * ```\n */\nfunction useWatch(props) {\n const methods = useFormContext();\n const { control = methods.control, name, defaultValue, disabled, exact, } = props || {};\n const _name = React.useRef(name);\n _name.current = name;\n useSubscribe({\n disabled,\n subject: control._subjects.values,\n next: (formState) => {\n if (shouldSubscribeByName(_name.current, formState.name, exact)) {\n updateValue(cloneObject(generateWatchOutput(_name.current, control._names, formState.values || control._formValues, false, defaultValue)));\n }\n },\n });\n const [value, updateValue] = React.useState(control._getWatch(name, defaultValue));\n React.useEffect(() => control._removeUnmounted());\n return value;\n}\n\nvar isKey = (value) => /^\\w*$/.test(value);\n\nvar stringToPath = (input) => compact(input.replace(/[\"|']|\\]/g, '').split(/\\.|\\[/));\n\nfunction set(object, path, value) {\n let index = -1;\n const tempPath = isKey(path) ? [path] : stringToPath(path);\n const length = tempPath.length;\n const lastIndex = length - 1;\n while (++index < length) {\n const key = tempPath[index];\n let newValue = value;\n if (index !== lastIndex) {\n const objValue = object[key];\n newValue =\n isObject(objValue) || Array.isArray(objValue)\n ? objValue\n : !isNaN(+tempPath[index + 1])\n ? []\n : {};\n }\n object[key] = newValue;\n object = object[key];\n }\n return object;\n}\n\n/**\n * Custom hook to work with controlled component, this function provide you with both form and field level state. Re-render is isolated at the hook level.\n *\n * @remarks\n * [API](https://react-hook-form.com/api/usecontroller) • [Demo](https://codesandbox.io/s/usecontroller-0o8px)\n *\n * @param props - the path name to the form field value, and validation rules.\n *\n * @returns field properties, field and form state. {@link UseControllerReturn}\n *\n * @example\n * ```tsx\n * function Input(props) {\n * const { field, fieldState, formState } = useController(props);\n * return (\n *
\n * \n *

{fieldState.isTouched && \"Touched\"}

\n *

{formState.isSubmitted ? \"submitted\" : \"\"}

\n *
\n * );\n * }\n * ```\n */\nfunction useController(props) {\n const methods = useFormContext();\n const { name, control = methods.control, shouldUnregister } = props;\n const isArrayField = isNameInFieldArray(control._names.array, name);\n const value = useWatch({\n control,\n name,\n defaultValue: get(control._formValues, name, get(control._defaultValues, name, props.defaultValue)),\n exact: true,\n });\n const formState = useFormState({\n control,\n name,\n });\n const _registerProps = React.useRef(control.register(name, {\n ...props.rules,\n value,\n }));\n React.useEffect(() => {\n const _shouldUnregisterField = control._options.shouldUnregister || shouldUnregister;\n const updateMounted = (name, value) => {\n const field = get(control._fields, name);\n if (field) {\n field._f.mount = value;\n }\n };\n updateMounted(name, true);\n if (_shouldUnregisterField) {\n const value = cloneObject(get(control._options.defaultValues, name));\n set(control._defaultValues, name, value);\n if (isUndefined(get(control._formValues, name))) {\n set(control._formValues, name, value);\n }\n }\n return () => {\n (isArrayField\n ? _shouldUnregisterField && !control._state.action\n : _shouldUnregisterField)\n ? control.unregister(name)\n : updateMounted(name, false);\n };\n }, [name, control, isArrayField, shouldUnregister]);\n return {\n field: {\n name,\n value,\n onChange: React.useCallback((event) => _registerProps.current.onChange({\n target: {\n value: getEventValue(event),\n name: name,\n },\n type: EVENTS.CHANGE,\n }), [name]),\n onBlur: React.useCallback(() => _registerProps.current.onBlur({\n target: {\n value: get(control._formValues, name),\n name: name,\n },\n type: EVENTS.BLUR,\n }), [name, control]),\n ref: (elm) => {\n const field = get(control._fields, name);\n if (field && elm) {\n field._f.ref = {\n focus: () => elm.focus(),\n select: () => elm.select(),\n setCustomValidity: (message) => elm.setCustomValidity(message),\n reportValidity: () => elm.reportValidity(),\n };\n }\n },\n },\n formState,\n fieldState: Object.defineProperties({}, {\n invalid: {\n enumerable: true,\n get: () => !!get(formState.errors, name),\n },\n isDirty: {\n enumerable: true,\n get: () => !!get(formState.dirtyFields, name),\n },\n isTouched: {\n enumerable: true,\n get: () => !!get(formState.touchedFields, name),\n },\n error: {\n enumerable: true,\n get: () => get(formState.errors, name),\n },\n }),\n };\n}\n\n/**\n * Component based on `useController` hook to work with controlled component.\n *\n * @remarks\n * [API](https://react-hook-form.com/api/usecontroller/controller) • [Demo](https://codesandbox.io/s/react-hook-form-v6-controller-ts-jwyzw) • [Video](https://www.youtube.com/watch?v=N2UNk_UCVyA)\n *\n * @param props - the path name to the form field value, and validation rules.\n *\n * @returns provide field handler functions, field and form state.\n *\n * @example\n * ```tsx\n * function App() {\n * const { control } = useForm({\n * defaultValues: {\n * test: \"\"\n * }\n * });\n *\n * return (\n *
\n * (\n * <>\n * \n *

{formState.isSubmitted ? \"submitted\" : \"\"}

\n *

{fieldState.isTouched ? \"touched\" : \"\"}

\n * \n * )}\n * />\n * \n * );\n * }\n * ```\n */\nconst Controller = (props) => props.render(useController(props));\n\nvar appendErrors = (name, validateAllFieldCriteria, errors, type, message) => validateAllFieldCriteria\n ? {\n ...errors[name],\n types: {\n ...(errors[name] && errors[name].types ? errors[name].types : {}),\n [type]: message || true,\n },\n }\n : {};\n\nconst focusFieldBy = (fields, callback, fieldsNames) => {\n for (const key of fieldsNames || Object.keys(fields)) {\n const field = get(fields, key);\n if (field) {\n const { _f, ...currentField } = field;\n if (_f && callback(_f.name)) {\n if (_f.ref.focus) {\n _f.ref.focus();\n break;\n }\n else if (_f.refs && _f.refs[0].focus) {\n _f.refs[0].focus();\n break;\n }\n }\n else if (isObject(currentField)) {\n focusFieldBy(currentField, callback);\n }\n }\n }\n};\n\nvar generateId = () => {\n const d = typeof performance === 'undefined' ? Date.now() : performance.now() * 1000;\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = (Math.random() * 16 + d) % 16 | 0;\n return (c == 'x' ? r : (r & 0x3) | 0x8).toString(16);\n });\n};\n\nvar getFocusFieldName = (name, index, options = {}) => options.shouldFocus || isUndefined(options.shouldFocus)\n ? options.focusName ||\n `${name}.${isUndefined(options.focusIndex) ? index : options.focusIndex}.`\n : '';\n\nvar getValidationModes = (mode) => ({\n isOnSubmit: !mode || mode === VALIDATION_MODE.onSubmit,\n isOnBlur: mode === VALIDATION_MODE.onBlur,\n isOnChange: mode === VALIDATION_MODE.onChange,\n isOnAll: mode === VALIDATION_MODE.all,\n isOnTouch: mode === VALIDATION_MODE.onTouched,\n});\n\nvar isWatched = (name, _names, isBlurEvent) => !isBlurEvent &&\n (_names.watchAll ||\n _names.watch.has(name) ||\n [..._names.watch].some((watchName) => name.startsWith(watchName) &&\n /^\\.\\w+/.test(name.slice(watchName.length))));\n\nvar updateFieldArrayRootError = (errors, error, name) => {\n const fieldArrayErrors = compact(get(errors, name));\n set(fieldArrayErrors, 'root', error[name]);\n set(errors, name, fieldArrayErrors);\n return errors;\n};\n\nvar isBoolean = (value) => typeof value === 'boolean';\n\nvar isFileInput = (element) => element.type === 'file';\n\nvar isFunction = (value) => typeof value === 'function';\n\nvar isHTMLElement = (value) => {\n if (!isWeb) {\n return false;\n }\n const owner = value ? value.ownerDocument : 0;\n return (value instanceof\n (owner && owner.defaultView ? owner.defaultView.HTMLElement : HTMLElement));\n};\n\nvar isMessage = (value) => isString(value);\n\nvar isRadioInput = (element) => element.type === 'radio';\n\nvar isRegex = (value) => value instanceof RegExp;\n\nconst defaultResult = {\n value: false,\n isValid: false,\n};\nconst validResult = { value: true, isValid: true };\nvar getCheckboxValue = (options) => {\n if (Array.isArray(options)) {\n if (options.length > 1) {\n const values = options\n .filter((option) => option && option.checked && !option.disabled)\n .map((option) => option.value);\n return { value: values, isValid: !!values.length };\n }\n return options[0].checked && !options[0].disabled\n ? // @ts-expect-error expected to work in the browser\n options[0].attributes && !isUndefined(options[0].attributes.value)\n ? isUndefined(options[0].value) || options[0].value === ''\n ? validResult\n : { value: options[0].value, isValid: true }\n : validResult\n : defaultResult;\n }\n return defaultResult;\n};\n\nconst defaultReturn = {\n isValid: false,\n value: null,\n};\nvar getRadioValue = (options) => Array.isArray(options)\n ? options.reduce((previous, option) => option && option.checked && !option.disabled\n ? {\n isValid: true,\n value: option.value,\n }\n : previous, defaultReturn)\n : defaultReturn;\n\nfunction getValidateError(result, ref, type = 'validate') {\n if (isMessage(result) ||\n (Array.isArray(result) && result.every(isMessage)) ||\n (isBoolean(result) && !result)) {\n return {\n type,\n message: isMessage(result) ? result : '',\n ref,\n };\n }\n}\n\nvar getValueAndMessage = (validationData) => isObject(validationData) && !isRegex(validationData)\n ? validationData\n : {\n value: validationData,\n message: '',\n };\n\nvar validateField = async (field, formValues, validateAllFieldCriteria, shouldUseNativeValidation, isFieldArray) => {\n const { ref, refs, required, maxLength, minLength, min, max, pattern, validate, name, valueAsNumber, mount, disabled, } = field._f;\n const inputValue = get(formValues, name);\n if (!mount || disabled) {\n return {};\n }\n const inputRef = refs ? refs[0] : ref;\n const setCustomValidity = (message) => {\n if (shouldUseNativeValidation && inputRef.reportValidity) {\n inputRef.setCustomValidity(isBoolean(message) ? '' : message || '');\n inputRef.reportValidity();\n }\n };\n const error = {};\n const isRadio = isRadioInput(ref);\n const isCheckBox = isCheckBoxInput(ref);\n const isRadioOrCheckbox = isRadio || isCheckBox;\n const isEmpty = ((valueAsNumber || isFileInput(ref)) &&\n isUndefined(ref.value) &&\n isUndefined(inputValue)) ||\n (isHTMLElement(ref) && ref.value === '') ||\n inputValue === '' ||\n (Array.isArray(inputValue) && !inputValue.length);\n const appendErrorsCurry = appendErrors.bind(null, name, validateAllFieldCriteria, error);\n const getMinMaxMessage = (exceedMax, maxLengthMessage, minLengthMessage, maxType = INPUT_VALIDATION_RULES.maxLength, minType = INPUT_VALIDATION_RULES.minLength) => {\n const message = exceedMax ? maxLengthMessage : minLengthMessage;\n error[name] = {\n type: exceedMax ? maxType : minType,\n message,\n ref,\n ...appendErrorsCurry(exceedMax ? maxType : minType, message),\n };\n };\n if (isFieldArray\n ? !Array.isArray(inputValue) || !inputValue.length\n : required &&\n ((!isRadioOrCheckbox && (isEmpty || isNullOrUndefined(inputValue))) ||\n (isBoolean(inputValue) && !inputValue) ||\n (isCheckBox && !getCheckboxValue(refs).isValid) ||\n (isRadio && !getRadioValue(refs).isValid))) {\n const { value, message } = isMessage(required)\n ? { value: !!required, message: required }\n : getValueAndMessage(required);\n if (value) {\n error[name] = {\n type: INPUT_VALIDATION_RULES.required,\n message,\n ref: inputRef,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.required, message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(message);\n return error;\n }\n }\n }\n if (!isEmpty && (!isNullOrUndefined(min) || !isNullOrUndefined(max))) {\n let exceedMax;\n let exceedMin;\n const maxOutput = getValueAndMessage(max);\n const minOutput = getValueAndMessage(min);\n if (!isNullOrUndefined(inputValue) && !isNaN(inputValue)) {\n const valueNumber = ref.valueAsNumber ||\n (inputValue ? +inputValue : inputValue);\n if (!isNullOrUndefined(maxOutput.value)) {\n exceedMax = valueNumber > maxOutput.value;\n }\n if (!isNullOrUndefined(minOutput.value)) {\n exceedMin = valueNumber < minOutput.value;\n }\n }\n else {\n const valueDate = ref.valueAsDate || new Date(inputValue);\n const convertTimeToDate = (time) => new Date(new Date().toDateString() + ' ' + time);\n const isTime = ref.type == 'time';\n const isWeek = ref.type == 'week';\n if (isString(maxOutput.value) && inputValue) {\n exceedMax = isTime\n ? convertTimeToDate(inputValue) > convertTimeToDate(maxOutput.value)\n : isWeek\n ? inputValue > maxOutput.value\n : valueDate > new Date(maxOutput.value);\n }\n if (isString(minOutput.value) && inputValue) {\n exceedMin = isTime\n ? convertTimeToDate(inputValue) < convertTimeToDate(minOutput.value)\n : isWeek\n ? inputValue < minOutput.value\n : valueDate < new Date(minOutput.value);\n }\n }\n if (exceedMax || exceedMin) {\n getMinMaxMessage(!!exceedMax, maxOutput.message, minOutput.message, INPUT_VALIDATION_RULES.max, INPUT_VALIDATION_RULES.min);\n if (!validateAllFieldCriteria) {\n setCustomValidity(error[name].message);\n return error;\n }\n }\n }\n if ((maxLength || minLength) &&\n !isEmpty &&\n (isString(inputValue) || (isFieldArray && Array.isArray(inputValue)))) {\n const maxLengthOutput = getValueAndMessage(maxLength);\n const minLengthOutput = getValueAndMessage(minLength);\n const exceedMax = !isNullOrUndefined(maxLengthOutput.value) &&\n inputValue.length > +maxLengthOutput.value;\n const exceedMin = !isNullOrUndefined(minLengthOutput.value) &&\n inputValue.length < +minLengthOutput.value;\n if (exceedMax || exceedMin) {\n getMinMaxMessage(exceedMax, maxLengthOutput.message, minLengthOutput.message);\n if (!validateAllFieldCriteria) {\n setCustomValidity(error[name].message);\n return error;\n }\n }\n }\n if (pattern && !isEmpty && isString(inputValue)) {\n const { value: patternValue, message } = getValueAndMessage(pattern);\n if (isRegex(patternValue) && !inputValue.match(patternValue)) {\n error[name] = {\n type: INPUT_VALIDATION_RULES.pattern,\n message,\n ref,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.pattern, message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(message);\n return error;\n }\n }\n }\n if (validate) {\n if (isFunction(validate)) {\n const result = await validate(inputValue, formValues);\n const validateError = getValidateError(result, inputRef);\n if (validateError) {\n error[name] = {\n ...validateError,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.validate, validateError.message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(validateError.message);\n return error;\n }\n }\n }\n else if (isObject(validate)) {\n let validationResult = {};\n for (const key in validate) {\n if (!isEmptyObject(validationResult) && !validateAllFieldCriteria) {\n break;\n }\n const validateError = getValidateError(await validate[key](inputValue, formValues), inputRef, key);\n if (validateError) {\n validationResult = {\n ...validateError,\n ...appendErrorsCurry(key, validateError.message),\n };\n setCustomValidity(validateError.message);\n if (validateAllFieldCriteria) {\n error[name] = validationResult;\n }\n }\n }\n if (!isEmptyObject(validationResult)) {\n error[name] = {\n ref: inputRef,\n ...validationResult,\n };\n if (!validateAllFieldCriteria) {\n return error;\n }\n }\n }\n }\n setCustomValidity(true);\n return error;\n};\n\nfunction append(data, value) {\n return [...data, ...convertToArrayPayload(value)];\n}\n\nvar fillEmptyArray = (value) => Array.isArray(value) ? value.map(() => undefined) : undefined;\n\nfunction insert(data, index, value) {\n return [\n ...data.slice(0, index),\n ...convertToArrayPayload(value),\n ...data.slice(index),\n ];\n}\n\nvar moveArrayAt = (data, from, to) => {\n if (!Array.isArray(data)) {\n return [];\n }\n if (isUndefined(data[to])) {\n data[to] = undefined;\n }\n data.splice(to, 0, data.splice(from, 1)[0]);\n return data;\n};\n\nfunction prepend(data, value) {\n return [...convertToArrayPayload(value), ...convertToArrayPayload(data)];\n}\n\nfunction removeAtIndexes(data, indexes) {\n let i = 0;\n const temp = [...data];\n for (const index of indexes) {\n temp.splice(index - i, 1);\n i++;\n }\n return compact(temp).length ? temp : [];\n}\nvar removeArrayAt = (data, index) => isUndefined(index)\n ? []\n : removeAtIndexes(data, convertToArrayPayload(index).sort((a, b) => a - b));\n\nvar swapArrayAt = (data, indexA, indexB) => {\n data[indexA] = [data[indexB], (data[indexB] = data[indexA])][0];\n};\n\nfunction baseGet(object, updatePath) {\n const length = updatePath.slice(0, -1).length;\n let index = 0;\n while (index < length) {\n object = isUndefined(object) ? index++ : object[updatePath[index++]];\n }\n return object;\n}\nfunction isEmptyArray(obj) {\n for (const key in obj) {\n if (!isUndefined(obj[key])) {\n return false;\n }\n }\n return true;\n}\nfunction unset(object, path) {\n const paths = Array.isArray(path)\n ? path\n : isKey(path)\n ? [path]\n : stringToPath(path);\n const childObject = paths.length === 1 ? object : baseGet(object, paths);\n const index = paths.length - 1;\n const key = paths[index];\n if (childObject) {\n delete childObject[key];\n }\n if (index !== 0 &&\n ((isObject(childObject) && isEmptyObject(childObject)) ||\n (Array.isArray(childObject) && isEmptyArray(childObject)))) {\n unset(object, paths.slice(0, -1));\n }\n return object;\n}\n\nvar updateAt = (fieldValues, index, value) => {\n fieldValues[index] = value;\n return fieldValues;\n};\n\n/**\n * A custom hook that exposes convenient methods to perform operations with a list of dynamic inputs that need to be appended, updated, removed etc. • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn) • [Video](https://youtu.be/4MrbfGSFY2A)\n *\n * @remarks\n * [API](https://react-hook-form.com/api/usefieldarray) • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn)\n *\n * @param props - useFieldArray props\n *\n * @returns methods - functions to manipulate with the Field Arrays (dynamic inputs) {@link UseFieldArrayReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, control, handleSubmit, reset, trigger, setError } = useForm({\n * defaultValues: {\n * test: []\n * }\n * });\n * const { fields, append } = useFieldArray({\n * control,\n * name: \"test\"\n * });\n *\n * return (\n *
console.log(data))}>\n * {fields.map((item, index) => (\n * \n * ))}\n * \n * \n *
\n * );\n * }\n * ```\n */\nfunction useFieldArray(props) {\n const methods = useFormContext();\n const { control = methods.control, name, keyName = 'id', shouldUnregister, } = props;\n const [fields, setFields] = React.useState(control._getFieldArray(name));\n const ids = React.useRef(control._getFieldArray(name).map(generateId));\n const _fieldIds = React.useRef(fields);\n const _name = React.useRef(name);\n const _actioned = React.useRef(false);\n _name.current = name;\n _fieldIds.current = fields;\n control._names.array.add(name);\n props.rules &&\n control.register(name, props.rules);\n useSubscribe({\n next: ({ values, name: fieldArrayName, }) => {\n if (fieldArrayName === _name.current || !fieldArrayName) {\n const fieldValues = get(values, _name.current);\n if (Array.isArray(fieldValues)) {\n setFields(fieldValues);\n ids.current = fieldValues.map(generateId);\n }\n }\n },\n subject: control._subjects.array,\n });\n const updateValues = React.useCallback((updatedFieldArrayValues) => {\n _actioned.current = true;\n control._updateFieldArray(name, updatedFieldArrayValues);\n }, [control, name]);\n const append$1 = (value, options) => {\n const appendValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = append(control._getFieldArray(name), appendValue);\n control._names.focus = getFocusFieldName(name, updatedFieldArrayValues.length - 1, options);\n ids.current = append(ids.current, appendValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, append, {\n argA: fillEmptyArray(value),\n });\n };\n const prepend$1 = (value, options) => {\n const prependValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = prepend(control._getFieldArray(name), prependValue);\n control._names.focus = getFocusFieldName(name, 0, options);\n ids.current = prepend(ids.current, prependValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, prepend, {\n argA: fillEmptyArray(value),\n });\n };\n const remove = (index) => {\n const updatedFieldArrayValues = removeArrayAt(control._getFieldArray(name), index);\n ids.current = removeArrayAt(ids.current, index);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, removeArrayAt, {\n argA: index,\n });\n };\n const insert$1 = (index, value, options) => {\n const insertValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = insert(control._getFieldArray(name), index, insertValue);\n control._names.focus = getFocusFieldName(name, index, options);\n ids.current = insert(ids.current, index, insertValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, insert, {\n argA: index,\n argB: fillEmptyArray(value),\n });\n };\n const swap = (indexA, indexB) => {\n const updatedFieldArrayValues = control._getFieldArray(name);\n swapArrayAt(updatedFieldArrayValues, indexA, indexB);\n swapArrayAt(ids.current, indexA, indexB);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, swapArrayAt, {\n argA: indexA,\n argB: indexB,\n }, false);\n };\n const move = (from, to) => {\n const updatedFieldArrayValues = control._getFieldArray(name);\n moveArrayAt(updatedFieldArrayValues, from, to);\n moveArrayAt(ids.current, from, to);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, moveArrayAt, {\n argA: from,\n argB: to,\n }, false);\n };\n const update = (index, value) => {\n const updateValue = cloneObject(value);\n const updatedFieldArrayValues = updateAt(control._getFieldArray(name), index, updateValue);\n ids.current = [...updatedFieldArrayValues].map((item, i) => !item || i === index ? generateId() : ids.current[i]);\n updateValues(updatedFieldArrayValues);\n setFields([...updatedFieldArrayValues]);\n control._updateFieldArray(name, updatedFieldArrayValues, updateAt, {\n argA: index,\n argB: updateValue,\n }, true, false);\n };\n const replace = (value) => {\n const updatedFieldArrayValues = convertToArrayPayload(cloneObject(value));\n ids.current = updatedFieldArrayValues.map(generateId);\n updateValues([...updatedFieldArrayValues]);\n setFields([...updatedFieldArrayValues]);\n control._updateFieldArray(name, [...updatedFieldArrayValues], (data) => data, {}, true, false);\n };\n React.useEffect(() => {\n control._state.action = false;\n isWatched(name, control._names) &&\n control._subjects.state.next({\n ...control._formState,\n });\n if (_actioned.current &&\n (!getValidationModes(control._options.mode).isOnSubmit ||\n control._formState.isSubmitted)) {\n if (control._options.resolver) {\n control._executeSchema([name]).then((result) => {\n const error = get(result.errors, name);\n const existingError = get(control._formState.errors, name);\n if (existingError ? !error && existingError.type : error && error.type) {\n error\n ? set(control._formState.errors, name, error)\n : unset(control._formState.errors, name);\n control._subjects.state.next({\n errors: control._formState.errors,\n });\n }\n });\n }\n else {\n const field = get(control._fields, name);\n if (field && field._f) {\n validateField(field, control._formValues, control._options.criteriaMode === VALIDATION_MODE.all, control._options.shouldUseNativeValidation, true).then((error) => !isEmptyObject(error) &&\n control._subjects.state.next({\n errors: updateFieldArrayRootError(control._formState.errors, error, name),\n }));\n }\n }\n }\n control._subjects.values.next({\n name,\n values: { ...control._formValues },\n });\n control._names.focus &&\n focusFieldBy(control._fields, (key) => !!key && key.startsWith(control._names.focus || ''));\n control._names.focus = '';\n control._updateValid();\n }, [fields, name, control]);\n React.useEffect(() => {\n !get(control._formValues, name) && control._updateFieldArray(name);\n return () => {\n (control._options.shouldUnregister || shouldUnregister) &&\n control.unregister(name);\n };\n }, [name, control, keyName, shouldUnregister]);\n return {\n swap: React.useCallback(swap, [updateValues, name, control]),\n move: React.useCallback(move, [updateValues, name, control]),\n prepend: React.useCallback(prepend$1, [updateValues, name, control]),\n append: React.useCallback(append$1, [updateValues, name, control]),\n remove: React.useCallback(remove, [updateValues, name, control]),\n insert: React.useCallback(insert$1, [updateValues, name, control]),\n update: React.useCallback(update, [updateValues, name, control]),\n replace: React.useCallback(replace, [updateValues, name, control]),\n fields: React.useMemo(() => fields.map((field, index) => ({\n ...field,\n [keyName]: ids.current[index] || generateId(),\n })), [fields, keyName]),\n };\n}\n\nfunction createSubject() {\n let _observers = [];\n const next = (value) => {\n for (const observer of _observers) {\n observer.next && observer.next(value);\n }\n };\n const subscribe = (observer) => {\n _observers.push(observer);\n return {\n unsubscribe: () => {\n _observers = _observers.filter((o) => o !== observer);\n },\n };\n };\n const unsubscribe = () => {\n _observers = [];\n };\n return {\n get observers() {\n return _observers;\n },\n next,\n subscribe,\n unsubscribe,\n };\n}\n\nvar isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);\n\nfunction deepEqual(object1, object2) {\n if (isPrimitive(object1) || isPrimitive(object2)) {\n return object1 === object2;\n }\n if (isDateObject(object1) && isDateObject(object2)) {\n return object1.getTime() === object2.getTime();\n }\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n if (keys1.length !== keys2.length) {\n return false;\n }\n for (const key of keys1) {\n const val1 = object1[key];\n if (!keys2.includes(key)) {\n return false;\n }\n if (key !== 'ref') {\n const val2 = object2[key];\n if ((isDateObject(val1) && isDateObject(val2)) ||\n (isObject(val1) && isObject(val2)) ||\n (Array.isArray(val1) && Array.isArray(val2))\n ? !deepEqual(val1, val2)\n : val1 !== val2) {\n return false;\n }\n }\n }\n return true;\n}\n\nvar isMultipleSelect = (element) => element.type === `select-multiple`;\n\nvar isRadioOrCheckbox = (ref) => isRadioInput(ref) || isCheckBoxInput(ref);\n\nvar live = (ref) => isHTMLElement(ref) && ref.isConnected;\n\nvar objectHasFunction = (data) => {\n for (const key in data) {\n if (isFunction(data[key])) {\n return true;\n }\n }\n return false;\n};\n\nfunction markFieldsDirty(data, fields = {}) {\n const isParentNodeArray = Array.isArray(data);\n if (isObject(data) || isParentNodeArray) {\n for (const key in data) {\n if (Array.isArray(data[key]) ||\n (isObject(data[key]) && !objectHasFunction(data[key]))) {\n fields[key] = Array.isArray(data[key]) ? [] : {};\n markFieldsDirty(data[key], fields[key]);\n }\n else if (!isNullOrUndefined(data[key])) {\n fields[key] = true;\n }\n }\n }\n return fields;\n}\nfunction getDirtyFieldsFromDefaultValues(data, formValues, dirtyFieldsFromValues) {\n const isParentNodeArray = Array.isArray(data);\n if (isObject(data) || isParentNodeArray) {\n for (const key in data) {\n if (Array.isArray(data[key]) ||\n (isObject(data[key]) && !objectHasFunction(data[key]))) {\n if (isUndefined(formValues) ||\n isPrimitive(dirtyFieldsFromValues[key])) {\n dirtyFieldsFromValues[key] = Array.isArray(data[key])\n ? markFieldsDirty(data[key], [])\n : { ...markFieldsDirty(data[key]) };\n }\n else {\n getDirtyFieldsFromDefaultValues(data[key], isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);\n }\n }\n else {\n dirtyFieldsFromValues[key] = !deepEqual(data[key], formValues[key]);\n }\n }\n }\n return dirtyFieldsFromValues;\n}\nvar getDirtyFields = (defaultValues, formValues) => getDirtyFieldsFromDefaultValues(defaultValues, formValues, markFieldsDirty(formValues));\n\nvar getFieldValueAs = (value, { valueAsNumber, valueAsDate, setValueAs }) => isUndefined(value)\n ? value\n : valueAsNumber\n ? value === ''\n ? NaN\n : value\n ? +value\n : value\n : valueAsDate && isString(value)\n ? new Date(value)\n : setValueAs\n ? setValueAs(value)\n : value;\n\nfunction getFieldValue(_f) {\n const ref = _f.ref;\n if (_f.refs ? _f.refs.every((ref) => ref.disabled) : ref.disabled) {\n return;\n }\n if (isFileInput(ref)) {\n return ref.files;\n }\n if (isRadioInput(ref)) {\n return getRadioValue(_f.refs).value;\n }\n if (isMultipleSelect(ref)) {\n return [...ref.selectedOptions].map(({ value }) => value);\n }\n if (isCheckBoxInput(ref)) {\n return getCheckboxValue(_f.refs).value;\n }\n return getFieldValueAs(isUndefined(ref.value) ? _f.ref.value : ref.value, _f);\n}\n\nvar getResolverOptions = (fieldsNames, _fields, criteriaMode, shouldUseNativeValidation) => {\n const fields = {};\n for (const name of fieldsNames) {\n const field = get(_fields, name);\n field && set(fields, name, field._f);\n }\n return {\n criteriaMode,\n names: [...fieldsNames],\n fields,\n shouldUseNativeValidation,\n };\n};\n\nvar getRuleValue = (rule) => isUndefined(rule)\n ? rule\n : isRegex(rule)\n ? rule.source\n : isObject(rule)\n ? isRegex(rule.value)\n ? rule.value.source\n : rule.value\n : rule;\n\nvar hasValidation = (options) => options.mount &&\n (options.required ||\n options.min ||\n options.max ||\n options.maxLength ||\n options.minLength ||\n options.pattern ||\n options.validate);\n\nfunction schemaErrorLookup(errors, _fields, name) {\n const error = get(errors, name);\n if (error || isKey(name)) {\n return {\n error,\n name,\n };\n }\n const names = name.split('.');\n while (names.length) {\n const fieldName = names.join('.');\n const field = get(_fields, fieldName);\n const foundError = get(errors, fieldName);\n if (field && !Array.isArray(field) && name !== fieldName) {\n return { name };\n }\n if (foundError && foundError.type) {\n return {\n name: fieldName,\n error: foundError,\n };\n }\n names.pop();\n }\n return {\n name,\n };\n}\n\nvar skipValidation = (isBlurEvent, isTouched, isSubmitted, reValidateMode, mode) => {\n if (mode.isOnAll) {\n return false;\n }\n else if (!isSubmitted && mode.isOnTouch) {\n return !(isTouched || isBlurEvent);\n }\n else if (isSubmitted ? reValidateMode.isOnBlur : mode.isOnBlur) {\n return !isBlurEvent;\n }\n else if (isSubmitted ? reValidateMode.isOnChange : mode.isOnChange) {\n return isBlurEvent;\n }\n return true;\n};\n\nvar unsetEmptyArray = (ref, name) => !compact(get(ref, name)).length && unset(ref, name);\n\nconst defaultOptions = {\n mode: VALIDATION_MODE.onSubmit,\n reValidateMode: VALIDATION_MODE.onChange,\n shouldFocusError: true,\n};\nfunction createFormControl(props = {}, flushRootRender) {\n let _options = {\n ...defaultOptions,\n ...props,\n };\n let _formState = {\n submitCount: 0,\n isDirty: false,\n isLoading: isFunction(_options.defaultValues),\n isValidating: false,\n isSubmitted: false,\n isSubmitting: false,\n isSubmitSuccessful: false,\n isValid: false,\n touchedFields: {},\n dirtyFields: {},\n errors: {},\n };\n let _fields = {};\n let _defaultValues = isObject(_options.defaultValues) || isObject(_options.values)\n ? cloneObject(_options.defaultValues || _options.values) || {}\n : {};\n let _formValues = _options.shouldUnregister\n ? {}\n : cloneObject(_defaultValues);\n let _state = {\n action: false,\n mount: false,\n watch: false,\n };\n let _names = {\n mount: new Set(),\n unMount: new Set(),\n array: new Set(),\n watch: new Set(),\n };\n let delayErrorCallback;\n let timer = 0;\n const _proxyFormState = {\n isDirty: false,\n dirtyFields: false,\n touchedFields: false,\n isValidating: false,\n isValid: false,\n errors: false,\n };\n const _subjects = {\n values: createSubject(),\n array: createSubject(),\n state: createSubject(),\n };\n const shouldCaptureDirtyFields = props.resetOptions && props.resetOptions.keepDirtyValues;\n const validationModeBeforeSubmit = getValidationModes(_options.mode);\n const validationModeAfterSubmit = getValidationModes(_options.reValidateMode);\n const shouldDisplayAllAssociatedErrors = _options.criteriaMode === VALIDATION_MODE.all;\n const debounce = (callback) => (wait) => {\n clearTimeout(timer);\n timer = setTimeout(callback, wait);\n };\n const _updateValid = async (shouldUpdateValid) => {\n if (_proxyFormState.isValid || shouldUpdateValid) {\n const isValid = _options.resolver\n ? isEmptyObject((await _executeSchema()).errors)\n : await executeBuiltInValidation(_fields, true);\n if (isValid !== _formState.isValid) {\n _subjects.state.next({\n isValid,\n });\n }\n }\n };\n const _updateIsValidating = (value) => _proxyFormState.isValidating &&\n _subjects.state.next({\n isValidating: value,\n });\n const _updateFieldArray = (name, values = [], method, args, shouldSetValues = true, shouldUpdateFieldsAndState = true) => {\n if (args && method) {\n _state.action = true;\n if (shouldUpdateFieldsAndState && Array.isArray(get(_fields, name))) {\n const fieldValues = method(get(_fields, name), args.argA, args.argB);\n shouldSetValues && set(_fields, name, fieldValues);\n }\n if (shouldUpdateFieldsAndState &&\n Array.isArray(get(_formState.errors, name))) {\n const errors = method(get(_formState.errors, name), args.argA, args.argB);\n shouldSetValues && set(_formState.errors, name, errors);\n unsetEmptyArray(_formState.errors, name);\n }\n if (_proxyFormState.touchedFields &&\n shouldUpdateFieldsAndState &&\n Array.isArray(get(_formState.touchedFields, name))) {\n const touchedFields = method(get(_formState.touchedFields, name), args.argA, args.argB);\n shouldSetValues && set(_formState.touchedFields, name, touchedFields);\n }\n if (_proxyFormState.dirtyFields) {\n _formState.dirtyFields = getDirtyFields(_defaultValues, _formValues);\n }\n _subjects.state.next({\n name,\n isDirty: _getDirty(name, values),\n dirtyFields: _formState.dirtyFields,\n errors: _formState.errors,\n isValid: _formState.isValid,\n });\n }\n else {\n set(_formValues, name, values);\n }\n };\n const updateErrors = (name, error) => {\n set(_formState.errors, name, error);\n _subjects.state.next({\n errors: _formState.errors,\n });\n };\n const updateValidAndValue = (name, shouldSkipSetValueAs, value, ref) => {\n const field = get(_fields, name);\n if (field) {\n const defaultValue = get(_formValues, name, isUndefined(value) ? get(_defaultValues, name) : value);\n isUndefined(defaultValue) ||\n (ref && ref.defaultChecked) ||\n shouldSkipSetValueAs\n ? set(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f))\n : setFieldValue(name, defaultValue);\n _state.mount && _updateValid();\n }\n };\n const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender) => {\n let shouldUpdateField = false;\n let isPreviousDirty = false;\n const output = {\n name,\n };\n if (!isBlurEvent || shouldDirty) {\n if (_proxyFormState.isDirty) {\n isPreviousDirty = _formState.isDirty;\n _formState.isDirty = output.isDirty = _getDirty();\n shouldUpdateField = isPreviousDirty !== output.isDirty;\n }\n const isCurrentFieldPristine = deepEqual(get(_defaultValues, name), fieldValue);\n isPreviousDirty = get(_formState.dirtyFields, name);\n isCurrentFieldPristine\n ? unset(_formState.dirtyFields, name)\n : set(_formState.dirtyFields, name, true);\n output.dirtyFields = _formState.dirtyFields;\n shouldUpdateField =\n shouldUpdateField ||\n (_proxyFormState.dirtyFields &&\n isPreviousDirty !== !isCurrentFieldPristine);\n }\n if (isBlurEvent) {\n const isPreviousFieldTouched = get(_formState.touchedFields, name);\n if (!isPreviousFieldTouched) {\n set(_formState.touchedFields, name, isBlurEvent);\n output.touchedFields = _formState.touchedFields;\n shouldUpdateField =\n shouldUpdateField ||\n (_proxyFormState.touchedFields &&\n isPreviousFieldTouched !== isBlurEvent);\n }\n }\n shouldUpdateField && shouldRender && _subjects.state.next(output);\n return shouldUpdateField ? output : {};\n };\n const shouldRenderByError = (name, isValid, error, fieldState) => {\n const previousFieldError = get(_formState.errors, name);\n const shouldUpdateValid = _proxyFormState.isValid &&\n isBoolean(isValid) &&\n _formState.isValid !== isValid;\n if (props.delayError && error) {\n delayErrorCallback = debounce(() => updateErrors(name, error));\n delayErrorCallback(props.delayError);\n }\n else {\n clearTimeout(timer);\n delayErrorCallback = null;\n error\n ? set(_formState.errors, name, error)\n : unset(_formState.errors, name);\n }\n if ((error ? !deepEqual(previousFieldError, error) : previousFieldError) ||\n !isEmptyObject(fieldState) ||\n shouldUpdateValid) {\n const updatedFormState = {\n ...fieldState,\n ...(shouldUpdateValid && isBoolean(isValid) ? { isValid } : {}),\n errors: _formState.errors,\n name,\n };\n _formState = {\n ..._formState,\n ...updatedFormState,\n };\n _subjects.state.next(updatedFormState);\n }\n _updateIsValidating(false);\n };\n const _executeSchema = async (name) => _options.resolver(_formValues, _options.context, getResolverOptions(name || _names.mount, _fields, _options.criteriaMode, _options.shouldUseNativeValidation));\n const executeSchemaAndUpdateState = async (names) => {\n const { errors } = await _executeSchema();\n if (names) {\n for (const name of names) {\n const error = get(errors, name);\n error\n ? set(_formState.errors, name, error)\n : unset(_formState.errors, name);\n }\n }\n else {\n _formState.errors = errors;\n }\n return errors;\n };\n const executeBuiltInValidation = async (fields, shouldOnlyCheckValid, context = {\n valid: true,\n }) => {\n for (const name in fields) {\n const field = fields[name];\n if (field) {\n const { _f, ...fieldValue } = field;\n if (_f) {\n const isFieldArrayRoot = _names.array.has(_f.name);\n const fieldError = await validateField(field, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation && !shouldOnlyCheckValid, isFieldArrayRoot);\n if (fieldError[_f.name]) {\n context.valid = false;\n if (shouldOnlyCheckValid) {\n break;\n }\n }\n !shouldOnlyCheckValid &&\n (get(fieldError, _f.name)\n ? isFieldArrayRoot\n ? updateFieldArrayRootError(_formState.errors, fieldError, _f.name)\n : set(_formState.errors, _f.name, fieldError[_f.name])\n : unset(_formState.errors, _f.name));\n }\n fieldValue &&\n (await executeBuiltInValidation(fieldValue, shouldOnlyCheckValid, context));\n }\n }\n return context.valid;\n };\n const _removeUnmounted = () => {\n for (const name of _names.unMount) {\n const field = get(_fields, name);\n field &&\n (field._f.refs\n ? field._f.refs.every((ref) => !live(ref))\n : !live(field._f.ref)) &&\n unregister(name);\n }\n _names.unMount = new Set();\n };\n const _getDirty = (name, data) => (name && data && set(_formValues, name, data),\n !deepEqual(getValues(), _defaultValues));\n const _getWatch = (names, defaultValue, isGlobal) => generateWatchOutput(names, _names, {\n ...(_state.mount\n ? _formValues\n : isUndefined(defaultValue)\n ? _defaultValues\n : isString(names)\n ? { [names]: defaultValue }\n : defaultValue),\n }, isGlobal, defaultValue);\n const _getFieldArray = (name) => compact(get(_state.mount ? _formValues : _defaultValues, name, props.shouldUnregister ? get(_defaultValues, name, []) : []));\n const setFieldValue = (name, value, options = {}) => {\n const field = get(_fields, name);\n let fieldValue = value;\n if (field) {\n const fieldReference = field._f;\n if (fieldReference) {\n !fieldReference.disabled &&\n set(_formValues, name, getFieldValueAs(value, fieldReference));\n fieldValue =\n isHTMLElement(fieldReference.ref) && isNullOrUndefined(value)\n ? ''\n : value;\n if (isMultipleSelect(fieldReference.ref)) {\n [...fieldReference.ref.options].forEach((optionRef) => (optionRef.selected = fieldValue.includes(optionRef.value)));\n }\n else if (fieldReference.refs) {\n if (isCheckBoxInput(fieldReference.ref)) {\n fieldReference.refs.length > 1\n ? fieldReference.refs.forEach((checkboxRef) => (!checkboxRef.defaultChecked || !checkboxRef.disabled) &&\n (checkboxRef.checked = Array.isArray(fieldValue)\n ? !!fieldValue.find((data) => data === checkboxRef.value)\n : fieldValue === checkboxRef.value))\n : fieldReference.refs[0] &&\n (fieldReference.refs[0].checked = !!fieldValue);\n }\n else {\n fieldReference.refs.forEach((radioRef) => (radioRef.checked = radioRef.value === fieldValue));\n }\n }\n else if (isFileInput(fieldReference.ref)) {\n fieldReference.ref.value = '';\n }\n else {\n fieldReference.ref.value = fieldValue;\n if (!fieldReference.ref.type) {\n _subjects.values.next({\n name,\n values: { ..._formValues },\n });\n }\n }\n }\n }\n (options.shouldDirty || options.shouldTouch) &&\n updateTouchAndDirty(name, fieldValue, options.shouldTouch, options.shouldDirty, true);\n options.shouldValidate && trigger(name);\n };\n const setValues = (name, value, options) => {\n for (const fieldKey in value) {\n const fieldValue = value[fieldKey];\n const fieldName = `${name}.${fieldKey}`;\n const field = get(_fields, fieldName);\n (_names.array.has(name) ||\n !isPrimitive(fieldValue) ||\n (field && !field._f)) &&\n !isDateObject(fieldValue)\n ? setValues(fieldName, fieldValue, options)\n : setFieldValue(fieldName, fieldValue, options);\n }\n };\n const setValue = (name, value, options = {}) => {\n const field = get(_fields, name);\n const isFieldArray = _names.array.has(name);\n const cloneValue = cloneObject(value);\n set(_formValues, name, cloneValue);\n if (isFieldArray) {\n _subjects.array.next({\n name,\n values: { ..._formValues },\n });\n if ((_proxyFormState.isDirty || _proxyFormState.dirtyFields) &&\n options.shouldDirty) {\n _subjects.state.next({\n name,\n dirtyFields: getDirtyFields(_defaultValues, _formValues),\n isDirty: _getDirty(name, cloneValue),\n });\n }\n }\n else {\n field && !field._f && !isNullOrUndefined(cloneValue)\n ? setValues(name, cloneValue, options)\n : setFieldValue(name, cloneValue, options);\n }\n isWatched(name, _names) && _subjects.state.next({ ..._formState });\n _subjects.values.next({\n name,\n values: { ..._formValues },\n });\n !_state.mount && flushRootRender();\n };\n const onChange = async (event) => {\n const target = event.target;\n let name = target.name;\n let isFieldValueUpdated = true;\n const field = get(_fields, name);\n const getCurrentFieldValue = () => target.type ? getFieldValue(field._f) : getEventValue(event);\n if (field) {\n let error;\n let isValid;\n const fieldValue = getCurrentFieldValue();\n const isBlurEvent = event.type === EVENTS.BLUR || event.type === EVENTS.FOCUS_OUT;\n const shouldSkipValidation = (!hasValidation(field._f) &&\n !_options.resolver &&\n !get(_formState.errors, name) &&\n !field._f.deps) ||\n skipValidation(isBlurEvent, get(_formState.touchedFields, name), _formState.isSubmitted, validationModeAfterSubmit, validationModeBeforeSubmit);\n const watched = isWatched(name, _names, isBlurEvent);\n set(_formValues, name, fieldValue);\n if (isBlurEvent) {\n field._f.onBlur && field._f.onBlur(event);\n delayErrorCallback && delayErrorCallback(0);\n }\n else if (field._f.onChange) {\n field._f.onChange(event);\n }\n const fieldState = updateTouchAndDirty(name, fieldValue, isBlurEvent, false);\n const shouldRender = !isEmptyObject(fieldState) || watched;\n !isBlurEvent &&\n _subjects.values.next({\n name,\n type: event.type,\n values: { ..._formValues },\n });\n if (shouldSkipValidation) {\n _proxyFormState.isValid && _updateValid();\n return (shouldRender &&\n _subjects.state.next({ name, ...(watched ? {} : fieldState) }));\n }\n !isBlurEvent && watched && _subjects.state.next({ ..._formState });\n _updateIsValidating(true);\n if (_options.resolver) {\n const { errors } = await _executeSchema([name]);\n const previousErrorLookupResult = schemaErrorLookup(_formState.errors, _fields, name);\n const errorLookupResult = schemaErrorLookup(errors, _fields, previousErrorLookupResult.name || name);\n error = errorLookupResult.error;\n name = errorLookupResult.name;\n isValid = isEmptyObject(errors);\n }\n else {\n error = (await validateField(field, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation))[name];\n isFieldValueUpdated =\n isNaN(fieldValue) ||\n fieldValue === get(_formValues, name, fieldValue);\n if (isFieldValueUpdated) {\n if (error) {\n isValid = false;\n }\n else if (_proxyFormState.isValid) {\n isValid = await executeBuiltInValidation(_fields, true);\n }\n }\n }\n if (isFieldValueUpdated) {\n field._f.deps &&\n trigger(field._f.deps);\n shouldRenderByError(name, isValid, error, fieldState);\n }\n }\n };\n const trigger = async (name, options = {}) => {\n let isValid;\n let validationResult;\n const fieldNames = convertToArrayPayload(name);\n _updateIsValidating(true);\n if (_options.resolver) {\n const errors = await executeSchemaAndUpdateState(isUndefined(name) ? name : fieldNames);\n isValid = isEmptyObject(errors);\n validationResult = name\n ? !fieldNames.some((name) => get(errors, name))\n : isValid;\n }\n else if (name) {\n validationResult = (await Promise.all(fieldNames.map(async (fieldName) => {\n const field = get(_fields, fieldName);\n return await executeBuiltInValidation(field && field._f ? { [fieldName]: field } : field);\n }))).every(Boolean);\n !(!validationResult && !_formState.isValid) && _updateValid();\n }\n else {\n validationResult = isValid = await executeBuiltInValidation(_fields);\n }\n _subjects.state.next({\n ...(!isString(name) ||\n (_proxyFormState.isValid && isValid !== _formState.isValid)\n ? {}\n : { name }),\n ...(_options.resolver || !name ? { isValid } : {}),\n errors: _formState.errors,\n isValidating: false,\n });\n options.shouldFocus &&\n !validationResult &&\n focusFieldBy(_fields, (key) => key && get(_formState.errors, key), name ? fieldNames : _names.mount);\n return validationResult;\n };\n const getValues = (fieldNames) => {\n const values = {\n ..._defaultValues,\n ...(_state.mount ? _formValues : {}),\n };\n return isUndefined(fieldNames)\n ? values\n : isString(fieldNames)\n ? get(values, fieldNames)\n : fieldNames.map((name) => get(values, name));\n };\n const getFieldState = (name, formState) => ({\n invalid: !!get((formState || _formState).errors, name),\n isDirty: !!get((formState || _formState).dirtyFields, name),\n isTouched: !!get((formState || _formState).touchedFields, name),\n error: get((formState || _formState).errors, name),\n });\n const clearErrors = (name) => {\n name &&\n convertToArrayPayload(name).forEach((inputName) => unset(_formState.errors, inputName));\n _subjects.state.next({\n errors: name ? _formState.errors : {},\n });\n };\n const setError = (name, error, options) => {\n const ref = (get(_fields, name, { _f: {} })._f || {}).ref;\n set(_formState.errors, name, {\n ...error,\n ref,\n });\n _subjects.state.next({\n name,\n errors: _formState.errors,\n isValid: false,\n });\n options && options.shouldFocus && ref && ref.focus && ref.focus();\n };\n const watch = (name, defaultValue) => isFunction(name)\n ? _subjects.values.subscribe({\n next: (payload) => name(_getWatch(undefined, defaultValue), payload),\n })\n : _getWatch(name, defaultValue, true);\n const unregister = (name, options = {}) => {\n for (const fieldName of name ? convertToArrayPayload(name) : _names.mount) {\n _names.mount.delete(fieldName);\n _names.array.delete(fieldName);\n if (!options.keepValue) {\n unset(_fields, fieldName);\n unset(_formValues, fieldName);\n }\n !options.keepError && unset(_formState.errors, fieldName);\n !options.keepDirty && unset(_formState.dirtyFields, fieldName);\n !options.keepTouched && unset(_formState.touchedFields, fieldName);\n !_options.shouldUnregister &&\n !options.keepDefaultValue &&\n unset(_defaultValues, fieldName);\n }\n _subjects.values.next({\n values: { ..._formValues },\n });\n _subjects.state.next({\n ..._formState,\n ...(!options.keepDirty ? {} : { isDirty: _getDirty() }),\n });\n !options.keepIsValid && _updateValid();\n };\n const register = (name, options = {}) => {\n let field = get(_fields, name);\n const disabledIsDefined = isBoolean(options.disabled);\n set(_fields, name, {\n ...(field || {}),\n _f: {\n ...(field && field._f ? field._f : { ref: { name } }),\n name,\n mount: true,\n ...options,\n },\n });\n _names.mount.add(name);\n field\n ? disabledIsDefined &&\n set(_formValues, name, options.disabled\n ? undefined\n : get(_formValues, name, getFieldValue(field._f)))\n : updateValidAndValue(name, true, options.value);\n return {\n ...(disabledIsDefined ? { disabled: options.disabled } : {}),\n ...(_options.shouldUseNativeValidation\n ? {\n required: !!options.required,\n min: getRuleValue(options.min),\n max: getRuleValue(options.max),\n minLength: getRuleValue(options.minLength),\n maxLength: getRuleValue(options.maxLength),\n pattern: getRuleValue(options.pattern),\n }\n : {}),\n name,\n onChange,\n onBlur: onChange,\n ref: (ref) => {\n if (ref) {\n register(name, options);\n field = get(_fields, name);\n const fieldRef = isUndefined(ref.value)\n ? ref.querySelectorAll\n ? ref.querySelectorAll('input,select,textarea')[0] || ref\n : ref\n : ref;\n const radioOrCheckbox = isRadioOrCheckbox(fieldRef);\n const refs = field._f.refs || [];\n if (radioOrCheckbox\n ? refs.find((option) => option === fieldRef)\n : fieldRef === field._f.ref) {\n return;\n }\n set(_fields, name, {\n _f: {\n ...field._f,\n ...(radioOrCheckbox\n ? {\n refs: [\n ...refs.filter(live),\n fieldRef,\n ...(Array.isArray(get(_defaultValues, name)) ? [{}] : []),\n ],\n ref: { type: fieldRef.type, name },\n }\n : { ref: fieldRef }),\n },\n });\n updateValidAndValue(name, false, undefined, fieldRef);\n }\n else {\n field = get(_fields, name, {});\n if (field._f) {\n field._f.mount = false;\n }\n (_options.shouldUnregister || options.shouldUnregister) &&\n !(isNameInFieldArray(_names.array, name) && _state.action) &&\n _names.unMount.add(name);\n }\n },\n };\n };\n const _focusError = () => _options.shouldFocusError &&\n focusFieldBy(_fields, (key) => key && get(_formState.errors, key), _names.mount);\n const handleSubmit = (onValid, onInvalid) => async (e) => {\n if (e) {\n e.preventDefault && e.preventDefault();\n e.persist && e.persist();\n }\n let fieldValues = cloneObject(_formValues);\n _subjects.state.next({\n isSubmitting: true,\n });\n if (_options.resolver) {\n const { errors, values } = await _executeSchema();\n _formState.errors = errors;\n fieldValues = values;\n }\n else {\n await executeBuiltInValidation(_fields);\n }\n unset(_formState.errors, 'root');\n if (isEmptyObject(_formState.errors)) {\n _subjects.state.next({\n errors: {},\n });\n await onValid(fieldValues, e);\n }\n else {\n if (onInvalid) {\n await onInvalid({ ..._formState.errors }, e);\n }\n _focusError();\n setTimeout(_focusError);\n }\n _subjects.state.next({\n isSubmitted: true,\n isSubmitting: false,\n isSubmitSuccessful: isEmptyObject(_formState.errors),\n submitCount: _formState.submitCount + 1,\n errors: _formState.errors,\n });\n };\n const resetField = (name, options = {}) => {\n if (get(_fields, name)) {\n if (isUndefined(options.defaultValue)) {\n setValue(name, get(_defaultValues, name));\n }\n else {\n setValue(name, options.defaultValue);\n set(_defaultValues, name, options.defaultValue);\n }\n if (!options.keepTouched) {\n unset(_formState.touchedFields, name);\n }\n if (!options.keepDirty) {\n unset(_formState.dirtyFields, name);\n _formState.isDirty = options.defaultValue\n ? _getDirty(name, get(_defaultValues, name))\n : _getDirty();\n }\n if (!options.keepError) {\n unset(_formState.errors, name);\n _proxyFormState.isValid && _updateValid();\n }\n _subjects.state.next({ ..._formState });\n }\n };\n const _reset = (formValues, keepStateOptions = {}) => {\n const updatedValues = formValues || _defaultValues;\n const cloneUpdatedValues = cloneObject(updatedValues);\n const values = formValues && !isEmptyObject(formValues)\n ? cloneUpdatedValues\n : _defaultValues;\n if (!keepStateOptions.keepDefaultValues) {\n _defaultValues = updatedValues;\n }\n if (!keepStateOptions.keepValues) {\n if (keepStateOptions.keepDirtyValues || shouldCaptureDirtyFields) {\n for (const fieldName of _names.mount) {\n get(_formState.dirtyFields, fieldName)\n ? set(values, fieldName, get(_formValues, fieldName))\n : setValue(fieldName, get(values, fieldName));\n }\n }\n else {\n if (isWeb && isUndefined(formValues)) {\n for (const name of _names.mount) {\n const field = get(_fields, name);\n if (field && field._f) {\n const fieldReference = Array.isArray(field._f.refs)\n ? field._f.refs[0]\n : field._f.ref;\n if (isHTMLElement(fieldReference)) {\n const form = fieldReference.closest('form');\n if (form) {\n form.reset();\n break;\n }\n }\n }\n }\n }\n _fields = {};\n }\n _formValues = props.shouldUnregister\n ? keepStateOptions.keepDefaultValues\n ? cloneObject(_defaultValues)\n : {}\n : cloneUpdatedValues;\n _subjects.array.next({\n values: { ...values },\n });\n _subjects.values.next({\n values: { ...values },\n });\n }\n _names = {\n mount: new Set(),\n unMount: new Set(),\n array: new Set(),\n watch: new Set(),\n watchAll: false,\n focus: '',\n };\n !_state.mount && flushRootRender();\n _state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid;\n _state.watch = !!props.shouldUnregister;\n _subjects.state.next({\n submitCount: keepStateOptions.keepSubmitCount\n ? _formState.submitCount\n : 0,\n isDirty: keepStateOptions.keepDirty\n ? _formState.isDirty\n : !!(keepStateOptions.keepDefaultValues &&\n !deepEqual(formValues, _defaultValues)),\n isSubmitted: keepStateOptions.keepIsSubmitted\n ? _formState.isSubmitted\n : false,\n dirtyFields: keepStateOptions.keepDirtyValues\n ? _formState.dirtyFields\n : keepStateOptions.keepDefaultValues && formValues\n ? getDirtyFields(_defaultValues, formValues)\n : {},\n touchedFields: keepStateOptions.keepTouched\n ? _formState.touchedFields\n : {},\n errors: keepStateOptions.keepErrors ? _formState.errors : {},\n isSubmitting: false,\n isSubmitSuccessful: false,\n });\n };\n const reset = (formValues, keepStateOptions) => _reset(isFunction(formValues)\n ? formValues(_formValues)\n : formValues, keepStateOptions);\n const setFocus = (name, options = {}) => {\n const field = get(_fields, name);\n const fieldReference = field && field._f;\n if (fieldReference) {\n const fieldRef = fieldReference.refs\n ? fieldReference.refs[0]\n : fieldReference.ref;\n if (fieldRef.focus) {\n fieldRef.focus();\n options.shouldSelect && fieldRef.select();\n }\n }\n };\n const _updateFormState = (updatedFormState) => {\n _formState = {\n ..._formState,\n ...updatedFormState,\n };\n };\n const _resetDefaultValues = () => isFunction(_options.defaultValues) &&\n _options.defaultValues().then((values) => {\n reset(values, _options.resetOptions);\n _subjects.state.next({\n isLoading: false,\n });\n });\n return {\n control: {\n register,\n unregister,\n getFieldState,\n _executeSchema,\n _getWatch,\n _getDirty,\n _updateValid,\n _removeUnmounted,\n _updateFieldArray,\n _getFieldArray,\n _reset,\n _resetDefaultValues,\n _updateFormState,\n _subjects,\n _proxyFormState,\n get _fields() {\n return _fields;\n },\n get _formValues() {\n return _formValues;\n },\n get _state() {\n return _state;\n },\n set _state(value) {\n _state = value;\n },\n get _defaultValues() {\n return _defaultValues;\n },\n get _names() {\n return _names;\n },\n set _names(value) {\n _names = value;\n },\n get _formState() {\n return _formState;\n },\n set _formState(value) {\n _formState = value;\n },\n get _options() {\n return _options;\n },\n set _options(value) {\n _options = {\n ..._options,\n ...value,\n };\n },\n },\n trigger,\n register,\n handleSubmit,\n watch,\n setValue,\n getValues,\n reset,\n resetField,\n clearErrors,\n unregister,\n setError,\n setFocus,\n getFieldState,\n };\n}\n\n/**\n * Custom hook to manage the entire form.\n *\n * @remarks\n * [API](https://react-hook-form.com/api/useform) • [Demo](https://codesandbox.io/s/react-hook-form-get-started-ts-5ksmm) • [Video](https://www.youtube.com/watch?v=RkXv4AXXC_4)\n *\n * @param props - form configuration and validation parameters.\n *\n * @returns methods - individual functions to manage the form state. {@link UseFormReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, handleSubmit, watch, formState: { errors } } = useForm();\n * const onSubmit = data => console.log(data);\n *\n * console.log(watch(\"example\"));\n *\n * return (\n *
\n * \n * \n * {errors.exampleRequired && This field is required}\n * \n *
\n * );\n * }\n * ```\n */\nfunction useForm(props = {}) {\n const _formControl = React.useRef();\n const [formState, updateFormState] = React.useState({\n isDirty: false,\n isValidating: false,\n isLoading: isFunction(props.defaultValues),\n isSubmitted: false,\n isSubmitting: false,\n isSubmitSuccessful: false,\n isValid: false,\n submitCount: 0,\n dirtyFields: {},\n touchedFields: {},\n errors: {},\n defaultValues: isFunction(props.defaultValues)\n ? undefined\n : props.defaultValues,\n });\n if (!_formControl.current) {\n _formControl.current = {\n ...createFormControl(props, () => updateFormState((formState) => ({ ...formState }))),\n formState,\n };\n }\n const control = _formControl.current.control;\n control._options = props;\n useSubscribe({\n subject: control._subjects.state,\n next: (value) => {\n if (shouldRenderFormState(value, control._proxyFormState, control._updateFormState, true)) {\n updateFormState({ ...control._formState });\n }\n },\n });\n React.useEffect(() => {\n if (props.values && !deepEqual(props.values, control._defaultValues)) {\n control._reset(props.values, control._options.resetOptions);\n }\n else {\n control._resetDefaultValues();\n }\n }, [props.values, control]);\n React.useEffect(() => {\n if (!control._state.mount) {\n control._updateValid();\n control._state.mount = true;\n }\n if (control._state.watch) {\n control._state.watch = false;\n control._subjects.state.next({ ...control._formState });\n }\n control._removeUnmounted();\n });\n _formControl.current.formState = getProxyFormState(formState, control);\n return _formControl.current;\n}\n\nexport { Controller, FormProvider, appendErrors, get, set, useController, useFieldArray, useForm, useFormContext, useFormState, useWatch };\n//# sourceMappingURL=index.esm.mjs.map\n","// src/index.ts\nimport { useMemo } from \"react\";\nfunction assignRef(ref, value) {\n if (ref == null)\n return;\n if (typeof ref === \"function\") {\n ref(value);\n return;\n }\n try {\n ref.current = value;\n } catch (error) {\n throw new Error(`Cannot assign value '${value}' to ref '${ref}'`);\n }\n}\nfunction mergeRefs(...refs) {\n return (node) => {\n refs.forEach((ref) => {\n assignRef(ref, node);\n });\n };\n}\nfunction useMergeRefs(...refs) {\n return useMemo(() => mergeRefs(...refs), refs);\n}\nexport {\n assignRef,\n mergeRefs,\n useMergeRefs\n};\n","// src/form-control.tsx\nimport { createContext } from \"@chakra-ui/react-context\";\nimport { mergeRefs } from \"@chakra-ui/react-use-merge-refs\";\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useMultiStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx, dataAttr } from \"@chakra-ui/shared-utils\";\nimport { useCallback, useId, useState } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar [FormControlStylesProvider, useFormControlStyles] = createContext({\n name: `FormControlStylesContext`,\n errorMessage: `useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" `\n});\nvar [FormControlProvider, useFormControlContext] = createContext({\n strict: false,\n name: \"FormControlContext\"\n});\nfunction useFormControlProvider(props) {\n const {\n id: idProp,\n isRequired,\n isInvalid,\n isDisabled,\n isReadOnly,\n ...htmlProps\n } = props;\n const uuid = useId();\n const id = idProp || `field-${uuid}`;\n const labelId = `${id}-label`;\n const feedbackId = `${id}-feedback`;\n const helpTextId = `${id}-helptext`;\n const [hasFeedbackText, setHasFeedbackText] = useState(false);\n const [hasHelpText, setHasHelpText] = useState(false);\n const [isFocused, setFocus] = useState(false);\n const getHelpTextProps = useCallback(\n (props2 = {}, forwardedRef = null) => ({\n id: helpTextId,\n ...props2,\n ref: mergeRefs(forwardedRef, (node) => {\n if (!node)\n return;\n setHasHelpText(true);\n })\n }),\n [helpTextId]\n );\n const getLabelProps = useCallback(\n (props2 = {}, forwardedRef = null) => ({\n ...props2,\n ref: forwardedRef,\n \"data-focus\": dataAttr(isFocused),\n \"data-disabled\": dataAttr(isDisabled),\n \"data-invalid\": dataAttr(isInvalid),\n \"data-readonly\": dataAttr(isReadOnly),\n id: props2.id !== void 0 ? props2.id : labelId,\n htmlFor: props2.htmlFor !== void 0 ? props2.htmlFor : id\n }),\n [id, isDisabled, isFocused, isInvalid, isReadOnly, labelId]\n );\n const getErrorMessageProps = useCallback(\n (props2 = {}, forwardedRef = null) => ({\n id: feedbackId,\n ...props2,\n ref: mergeRefs(forwardedRef, (node) => {\n if (!node)\n return;\n setHasFeedbackText(true);\n }),\n \"aria-live\": \"polite\"\n }),\n [feedbackId]\n );\n const getRootProps = useCallback(\n (props2 = {}, forwardedRef = null) => ({\n ...props2,\n ...htmlProps,\n ref: forwardedRef,\n role: \"group\"\n }),\n [htmlProps]\n );\n const getRequiredIndicatorProps = useCallback(\n (props2 = {}, forwardedRef = null) => ({\n ...props2,\n ref: forwardedRef,\n role: \"presentation\",\n \"aria-hidden\": true,\n children: props2.children || \"*\"\n }),\n []\n );\n return {\n isRequired: !!isRequired,\n isInvalid: !!isInvalid,\n isReadOnly: !!isReadOnly,\n isDisabled: !!isDisabled,\n isFocused: !!isFocused,\n onFocus: () => setFocus(true),\n onBlur: () => setFocus(false),\n hasFeedbackText,\n setHasFeedbackText,\n hasHelpText,\n setHasHelpText,\n id,\n labelId,\n feedbackId,\n helpTextId,\n htmlProps,\n getHelpTextProps,\n getErrorMessageProps,\n getRootProps,\n getLabelProps,\n getRequiredIndicatorProps\n };\n}\nvar FormControl = forwardRef(\n function FormControl2(props, ref) {\n const styles = useMultiStyleConfig(\"Form\", props);\n const ownProps = omitThemingProps(props);\n const {\n getRootProps,\n htmlProps: _,\n ...context\n } = useFormControlProvider(ownProps);\n const className = cx(\"chakra-form-control\", props.className);\n return /* @__PURE__ */ jsx(FormControlProvider, { value: context, children: /* @__PURE__ */ jsx(FormControlStylesProvider, { value: styles, children: /* @__PURE__ */ jsx(\n chakra.div,\n {\n ...getRootProps({}, ref),\n className,\n __css: styles[\"container\"]\n }\n ) }) });\n }\n);\nFormControl.displayName = \"FormControl\";\nvar FormHelperText = forwardRef(\n function FormHelperText2(props, ref) {\n const field = useFormControlContext();\n const styles = useFormControlStyles();\n const className = cx(\"chakra-form__helper-text\", props.className);\n return /* @__PURE__ */ jsx(\n chakra.div,\n {\n ...field == null ? void 0 : field.getHelpTextProps(props, ref),\n __css: styles.helperText,\n className\n }\n );\n }\n);\nFormHelperText.displayName = \"FormHelperText\";\n\nexport {\n useFormControlStyles,\n useFormControlContext,\n FormControl,\n FormHelperText\n};\n","import {\n useFormControlContext\n} from \"./chunk-6ZNYZUDD.mjs\";\n\n// src/form-error.tsx\nimport { Icon } from \"@chakra-ui/icon\";\nimport { createContext } from \"@chakra-ui/react-context\";\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useMultiStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { jsx } from \"react/jsx-runtime\";\nvar [FormErrorStylesProvider, useFormErrorStyles] = createContext({\n name: `FormErrorStylesContext`,\n errorMessage: `useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" `\n});\nvar FormErrorMessage = forwardRef(\n (props, ref) => {\n const styles = useMultiStyleConfig(\"FormError\", props);\n const ownProps = omitThemingProps(props);\n const field = useFormControlContext();\n if (!(field == null ? void 0 : field.isInvalid))\n return null;\n return /* @__PURE__ */ jsx(FormErrorStylesProvider, { value: styles, children: /* @__PURE__ */ jsx(\n chakra.div,\n {\n ...field == null ? void 0 : field.getErrorMessageProps(ownProps, ref),\n className: cx(\"chakra-form__error-message\", props.className),\n __css: {\n display: \"flex\",\n alignItems: \"center\",\n ...styles.text\n }\n }\n ) });\n }\n);\nFormErrorMessage.displayName = \"FormErrorMessage\";\nvar FormErrorIcon = forwardRef((props, ref) => {\n const styles = useFormErrorStyles();\n const field = useFormControlContext();\n if (!(field == null ? void 0 : field.isInvalid))\n return null;\n const _className = cx(\"chakra-form__error-icon\", props.className);\n return /* @__PURE__ */ jsx(\n Icon,\n {\n ref,\n \"aria-hidden\": true,\n ...props,\n __css: styles.icon,\n className: _className,\n children: /* @__PURE__ */ jsx(\n \"path\",\n {\n fill: \"currentColor\",\n d: \"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z\"\n }\n )\n }\n );\n});\nFormErrorIcon.displayName = \"FormErrorIcon\";\n\nexport {\n useFormErrorStyles,\n FormErrorMessage,\n FormErrorIcon\n};\n","// src/use-radio-group.ts\nimport { isObject } from \"@chakra-ui/shared-utils\";\nimport { mergeRefs } from \"@chakra-ui/react-use-merge-refs\";\nimport { useCallback, useRef, useState, useId } from \"react\";\nfunction isInputEvent(value) {\n return value && isObject(value) && isObject(value.target);\n}\nfunction useRadioGroup(props = {}) {\n const {\n onChange: onChangeProp,\n value: valueProp,\n defaultValue,\n name: nameProp,\n isDisabled,\n isFocusable,\n isNative,\n ...htmlProps\n } = props;\n const [valueState, setValue] = useState(defaultValue || \"\");\n const isControlled = typeof valueProp !== \"undefined\";\n const value = isControlled ? valueProp : valueState;\n const ref = useRef(null);\n const focus = useCallback(() => {\n const rootNode = ref.current;\n if (!rootNode)\n return;\n let query = `input:not(:disabled):checked`;\n const firstEnabledAndCheckedInput = rootNode.querySelector(\n query\n );\n if (firstEnabledAndCheckedInput) {\n firstEnabledAndCheckedInput.focus();\n return;\n }\n query = `input:not(:disabled)`;\n const firstEnabledInput = rootNode.querySelector(query);\n firstEnabledInput == null ? void 0 : firstEnabledInput.focus();\n }, []);\n const uuid = useId();\n const fallbackName = `radio-${uuid}`;\n const name = nameProp || fallbackName;\n const onChange = useCallback(\n (eventOrValue) => {\n const nextValue = isInputEvent(eventOrValue) ? eventOrValue.target.value : eventOrValue;\n if (!isControlled) {\n setValue(nextValue);\n }\n onChangeProp == null ? void 0 : onChangeProp(String(nextValue));\n },\n [onChangeProp, isControlled]\n );\n const getRootProps = useCallback(\n (props2 = {}, forwardedRef = null) => ({\n ...props2,\n ref: mergeRefs(forwardedRef, ref),\n role: \"radiogroup\"\n }),\n []\n );\n const getRadioProps = useCallback(\n (props2 = {}, ref2 = null) => {\n const checkedKey = isNative ? \"checked\" : \"isChecked\";\n return {\n ...props2,\n ref: ref2,\n name,\n [checkedKey]: value != null ? props2.value === value : void 0,\n onChange(event) {\n onChange(event);\n },\n \"data-radiogroup\": true\n };\n },\n [isNative, name, onChange, value]\n );\n return {\n getRootProps,\n getRadioProps,\n name,\n ref,\n focus,\n setValue,\n value,\n onChange,\n isDisabled,\n isFocusable,\n htmlProps\n };\n}\n\nexport {\n useRadioGroup\n};\n","import {\n useRadioGroup\n} from \"./chunk-ROBJ47HJ.mjs\";\n\n// src/radio-group.tsx\nimport {\n chakra,\n forwardRef\n} from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { createContext } from \"@chakra-ui/react-context\";\nimport { useMemo } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar [RadioGroupProvider, useRadioGroupContext] = createContext({\n name: \"RadioGroupContext\",\n strict: false\n});\nvar RadioGroup = forwardRef((props, ref) => {\n const {\n colorScheme,\n size,\n variant,\n children,\n className,\n isDisabled,\n isFocusable,\n ...rest\n } = props;\n const { value, onChange, getRootProps, name, htmlProps } = useRadioGroup(rest);\n const group = useMemo(\n () => ({\n name,\n size,\n onChange,\n colorScheme,\n value,\n variant,\n isDisabled,\n isFocusable\n }),\n [\n name,\n size,\n onChange,\n colorScheme,\n value,\n variant,\n isDisabled,\n isFocusable\n ]\n );\n return /* @__PURE__ */ jsx(RadioGroupProvider, { value: group, children: /* @__PURE__ */ jsx(\n chakra.div,\n {\n ...getRootProps(htmlProps, ref),\n className: cx(\"chakra-radio-group\", className),\n children\n }\n ) });\n});\nRadioGroup.displayName = \"RadioGroup\";\n\nexport {\n useRadioGroupContext,\n RadioGroup\n};\n","// src/index.ts\nvar hasSetup = false;\nvar modality = null;\nvar hasEventBeforeFocus = false;\nvar hasBlurredWindowRecently = false;\nvar handlers = /* @__PURE__ */ new Set();\nfunction trigger(modality2, event) {\n handlers.forEach((handler) => handler(modality2, event));\n}\nvar isMac = typeof window !== \"undefined\" && window.navigator != null ? /^Mac/.test(window.navigator.platform) : false;\nfunction isValidKey(e) {\n return !(e.metaKey || !isMac && e.altKey || e.ctrlKey || e.key === \"Control\" || e.key === \"Shift\" || e.key === \"Meta\");\n}\nfunction onKeyboardEvent(event) {\n hasEventBeforeFocus = true;\n if (isValidKey(event)) {\n modality = \"keyboard\";\n trigger(\"keyboard\", event);\n }\n}\nfunction onPointerEvent(event) {\n modality = \"pointer\";\n if (event.type === \"mousedown\" || event.type === \"pointerdown\") {\n hasEventBeforeFocus = true;\n const target = event.composedPath ? event.composedPath()[0] : event.target;\n let matches = false;\n try {\n matches = target.matches(\":focus-visible\");\n } catch {\n }\n if (matches)\n return;\n trigger(\"pointer\", event);\n }\n}\nfunction isVirtualClick(event) {\n if (event.mozInputSource === 0 && event.isTrusted)\n return true;\n return event.detail === 0 && !event.pointerType;\n}\nfunction onClickEvent(e) {\n if (isVirtualClick(e)) {\n hasEventBeforeFocus = true;\n modality = \"virtual\";\n }\n}\nfunction onWindowFocus(event) {\n if (event.target === window || event.target === document) {\n return;\n }\n if (!hasEventBeforeFocus && !hasBlurredWindowRecently) {\n modality = \"virtual\";\n trigger(\"virtual\", event);\n }\n hasEventBeforeFocus = false;\n hasBlurredWindowRecently = false;\n}\nfunction onWindowBlur() {\n hasEventBeforeFocus = false;\n hasBlurredWindowRecently = true;\n}\nfunction isFocusVisible() {\n return modality !== \"pointer\";\n}\nfunction setupGlobalFocusEvents() {\n if (typeof window === \"undefined\" || hasSetup) {\n return;\n }\n const { focus } = HTMLElement.prototype;\n HTMLElement.prototype.focus = function focusElement(...args) {\n hasEventBeforeFocus = true;\n focus.apply(this, args);\n };\n document.addEventListener(\"keydown\", onKeyboardEvent, true);\n document.addEventListener(\"keyup\", onKeyboardEvent, true);\n document.addEventListener(\"click\", onClickEvent, true);\n window.addEventListener(\"focus\", onWindowFocus, true);\n window.addEventListener(\"blur\", onWindowBlur, false);\n if (typeof PointerEvent !== \"undefined\") {\n document.addEventListener(\"pointerdown\", onPointerEvent, true);\n document.addEventListener(\"pointermove\", onPointerEvent, true);\n document.addEventListener(\"pointerup\", onPointerEvent, true);\n } else {\n document.addEventListener(\"mousedown\", onPointerEvent, true);\n document.addEventListener(\"mousemove\", onPointerEvent, true);\n document.addEventListener(\"mouseup\", onPointerEvent, true);\n }\n hasSetup = true;\n}\nfunction trackFocusVisible(fn) {\n setupGlobalFocusEvents();\n fn(isFocusVisible());\n const handler = () => fn(isFocusVisible());\n handlers.add(handler);\n return () => {\n handlers.delete(handler);\n };\n}\nfunction trackInteractionModality(fn) {\n setupGlobalFocusEvents();\n fn(modality);\n const handler = () => fn(modality);\n handlers.add(handler);\n return () => {\n handlers.delete(handler);\n };\n}\nfunction setInteractionModality(value) {\n modality = value;\n trigger(value, null);\n}\nfunction getInteractionModality() {\n return modality;\n}\nexport {\n getInteractionModality,\n setInteractionModality,\n trackFocusVisible,\n trackInteractionModality\n};\n","import {\n useRadioGroupContext\n} from \"./chunk-QUJ23J4G.mjs\";\n\n// src/use-radio.ts\nimport { useFormControlContext } from \"@chakra-ui/form-control\";\nimport { ariaAttr, callAllHandlers, dataAttr } from \"@chakra-ui/shared-utils\";\n\n// ../visually-hidden/src/visually-hidden.style.ts\nvar visuallyHiddenStyle = {\n border: \"0\",\n clip: \"rect(0, 0, 0, 0)\",\n height: \"1px\",\n width: \"1px\",\n margin: \"-1px\",\n padding: \"0\",\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n position: \"absolute\"\n};\n\n// src/use-radio.ts\nimport { trackFocusVisible } from \"@zag-js/focus-visible\";\nimport { useCallback, useEffect, useState, useId } from \"react\";\nfunction useRadio(props = {}) {\n const {\n defaultChecked,\n isChecked: isCheckedProp,\n isFocusable,\n isDisabled: isDisabledProp,\n isReadOnly: isReadOnlyProp,\n isRequired: isRequiredProp,\n onChange,\n isInvalid: isInvalidProp,\n name,\n value,\n id: idProp,\n \"data-radiogroup\": dataRadioGroup,\n \"aria-describedby\": ariaDescribedBy,\n ...htmlProps\n } = props;\n const uuid = `radio-${useId()}`;\n const formControl = useFormControlContext();\n const group = useRadioGroupContext();\n const isWithinRadioGroup = !!group || !!dataRadioGroup;\n const isWithinFormControl = !!formControl;\n let id = isWithinFormControl && !isWithinRadioGroup ? formControl.id : uuid;\n id = idProp != null ? idProp : id;\n const isDisabled = isDisabledProp != null ? isDisabledProp : formControl == null ? void 0 : formControl.isDisabled;\n const isReadOnly = isReadOnlyProp != null ? isReadOnlyProp : formControl == null ? void 0 : formControl.isReadOnly;\n const isRequired = isRequiredProp != null ? isRequiredProp : formControl == null ? void 0 : formControl.isRequired;\n const isInvalid = isInvalidProp != null ? isInvalidProp : formControl == null ? void 0 : formControl.isInvalid;\n const [isFocusVisible, setIsFocusVisible] = useState(false);\n const [isFocused, setFocused] = useState(false);\n const [isHovered, setHovering] = useState(false);\n const [isActive, setActive] = useState(false);\n const [isCheckedState, setChecked] = useState(Boolean(defaultChecked));\n const isControlled = typeof isCheckedProp !== \"undefined\";\n const isChecked = isControlled ? isCheckedProp : isCheckedState;\n useEffect(() => {\n return trackFocusVisible(setIsFocusVisible);\n }, []);\n const handleChange = useCallback(\n (event) => {\n if (isReadOnly || isDisabled) {\n event.preventDefault();\n return;\n }\n if (!isControlled) {\n setChecked(event.target.checked);\n }\n onChange == null ? void 0 : onChange(event);\n },\n [isControlled, isDisabled, isReadOnly, onChange]\n );\n const onKeyDown = useCallback(\n (event) => {\n if (event.key === \" \") {\n setActive(true);\n }\n },\n [setActive]\n );\n const onKeyUp = useCallback(\n (event) => {\n if (event.key === \" \") {\n setActive(false);\n }\n },\n [setActive]\n );\n const getRadioProps = useCallback(\n (props2 = {}, ref = null) => ({\n ...props2,\n ref,\n \"data-active\": dataAttr(isActive),\n \"data-hover\": dataAttr(isHovered),\n \"data-disabled\": dataAttr(isDisabled),\n \"data-invalid\": dataAttr(isInvalid),\n \"data-checked\": dataAttr(isChecked),\n \"data-focus\": dataAttr(isFocused),\n \"data-focus-visible\": dataAttr(isFocused && isFocusVisible),\n \"data-readonly\": dataAttr(isReadOnly),\n \"aria-hidden\": true,\n onMouseDown: callAllHandlers(props2.onMouseDown, () => setActive(true)),\n onMouseUp: callAllHandlers(props2.onMouseUp, () => setActive(false)),\n onMouseEnter: callAllHandlers(\n props2.onMouseEnter,\n () => setHovering(true)\n ),\n onMouseLeave: callAllHandlers(\n props2.onMouseLeave,\n () => setHovering(false)\n )\n }),\n [\n isActive,\n isHovered,\n isDisabled,\n isInvalid,\n isChecked,\n isFocused,\n isReadOnly,\n isFocusVisible\n ]\n );\n const { onFocus, onBlur } = formControl != null ? formControl : {};\n const getInputProps = useCallback(\n (props2 = {}, ref = null) => {\n const trulyDisabled = isDisabled && !isFocusable;\n return {\n ...props2,\n id,\n ref,\n type: \"radio\",\n name,\n value,\n onChange: callAllHandlers(props2.onChange, handleChange),\n onBlur: callAllHandlers(\n onBlur,\n props2.onBlur,\n () => setFocused(false)\n ),\n onFocus: callAllHandlers(\n onFocus,\n props2.onFocus,\n () => setFocused(true)\n ),\n onKeyDown: callAllHandlers(props2.onKeyDown, onKeyDown),\n onKeyUp: callAllHandlers(props2.onKeyUp, onKeyUp),\n checked: isChecked,\n disabled: trulyDisabled,\n readOnly: isReadOnly,\n required: isRequired,\n \"aria-invalid\": ariaAttr(isInvalid),\n \"aria-disabled\": ariaAttr(trulyDisabled),\n \"aria-required\": ariaAttr(isRequired),\n \"data-readonly\": dataAttr(isReadOnly),\n \"aria-describedby\": ariaDescribedBy,\n style: visuallyHiddenStyle\n };\n },\n [\n isDisabled,\n isFocusable,\n id,\n name,\n value,\n handleChange,\n onBlur,\n onFocus,\n onKeyDown,\n onKeyUp,\n isChecked,\n isReadOnly,\n isRequired,\n isInvalid,\n ariaDescribedBy\n ]\n );\n const getLabelProps = (props2 = {}, ref = null) => ({\n ...props2,\n ref,\n onMouseDown: callAllHandlers(props2.onMouseDown, stopEvent),\n \"data-disabled\": dataAttr(isDisabled),\n \"data-checked\": dataAttr(isChecked),\n \"data-invalid\": dataAttr(isInvalid)\n });\n const getRootProps = (props2, ref = null) => ({\n ...props2,\n ref,\n \"data-disabled\": dataAttr(isDisabled),\n \"data-checked\": dataAttr(isChecked),\n \"data-invalid\": dataAttr(isInvalid)\n });\n const state = {\n isInvalid,\n isFocused,\n isChecked,\n isActive,\n isHovered,\n isDisabled,\n isReadOnly,\n isRequired\n };\n return {\n state,\n getCheckboxProps: getRadioProps,\n getRadioProps,\n getInputProps,\n getLabelProps,\n getRootProps,\n htmlProps\n };\n}\nfunction stopEvent(event) {\n event.preventDefault();\n event.stopPropagation();\n}\n\nexport {\n useRadio\n};\n","import {\n useRadio\n} from \"./chunk-5XCGGO7V.mjs\";\nimport {\n useRadioGroupContext\n} from \"./chunk-QUJ23J4G.mjs\";\n\n// src/radio.tsx\nimport {\n chakra,\n forwardRef,\n layoutPropNames,\n omitThemingProps,\n useMultiStyleConfig\n} from \"@chakra-ui/system\";\nimport { callAll } from \"@chakra-ui/shared-utils\";\n\n// ../../utilities/object-utils/src/index.ts\nfunction split(object, keys) {\n const picked = {};\n const omitted = {};\n for (const [key, value] of Object.entries(object)) {\n if (keys.includes(key))\n picked[key] = value;\n else\n omitted[key] = value;\n }\n return [picked, omitted];\n}\n\n// src/radio.tsx\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar Radio = forwardRef((props, ref) => {\n var _a;\n const group = useRadioGroupContext();\n const { onChange: onChangeProp, value: valueProp } = props;\n const styles = useMultiStyleConfig(\"Radio\", { ...group, ...props });\n const ownProps = omitThemingProps(props);\n const {\n spacing = \"0.5rem\",\n children,\n isDisabled = group == null ? void 0 : group.isDisabled,\n isFocusable = group == null ? void 0 : group.isFocusable,\n inputProps: htmlInputProps,\n ...rest\n } = ownProps;\n let isChecked = props.isChecked;\n if ((group == null ? void 0 : group.value) != null && valueProp != null) {\n isChecked = group.value === valueProp;\n }\n let onChange = onChangeProp;\n if ((group == null ? void 0 : group.onChange) && valueProp != null) {\n onChange = callAll(group.onChange, onChangeProp);\n }\n const name = (_a = props == null ? void 0 : props.name) != null ? _a : group == null ? void 0 : group.name;\n const {\n getInputProps,\n getCheckboxProps,\n getLabelProps,\n getRootProps,\n htmlProps\n } = useRadio({\n ...rest,\n isChecked,\n isFocusable,\n isDisabled,\n onChange,\n name\n });\n const [layoutProps, otherProps] = split(htmlProps, layoutPropNames);\n const checkboxProps = getCheckboxProps(otherProps);\n const inputProps = getInputProps(htmlInputProps, ref);\n const labelProps = getLabelProps();\n const rootProps = Object.assign({}, layoutProps, getRootProps());\n const rootStyles = {\n display: \"inline-flex\",\n alignItems: \"center\",\n verticalAlign: \"top\",\n cursor: \"pointer\",\n position: \"relative\",\n ...styles.container\n };\n const checkboxStyles = {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n flexShrink: 0,\n ...styles.control\n };\n const labelStyles = {\n userSelect: \"none\",\n marginStart: spacing,\n ...styles.label\n };\n return /* @__PURE__ */ jsxs(chakra.label, { className: \"chakra-radio\", ...rootProps, __css: rootStyles, children: [\n /* @__PURE__ */ jsx(\"input\", { className: \"chakra-radio__input\", ...inputProps }),\n /* @__PURE__ */ jsx(\n chakra.span,\n {\n className: \"chakra-radio__control\",\n ...checkboxProps,\n __css: checkboxStyles\n }\n ),\n children && /* @__PURE__ */ jsx(\n chakra.span,\n {\n className: \"chakra-radio__label\",\n ...labelProps,\n __css: labelStyles,\n children\n }\n )\n ] });\n});\nRadio.displayName = \"Radio\";\n\nexport {\n Radio\n};\n","import { FormControl, FormErrorMessage } from '@chakra-ui/form-control'\nimport { Stack } from '@chakra-ui/layout'\nimport { Radio, RadioGroup } from '@chakra-ui/radio'\nimport { ChakraProps, chakra, useMultiStyleConfig } from '@chakra-ui/system'\nimport { IQuestion } from '@vocdoni/sdk'\nimport { Controller, useFormContext } from 'react-hook-form'\nimport { Markdown } from '../layout'\nimport { useElection } from './Election'\n\ntype QuestionFieldProps = ChakraProps & {\n question: IQuestion\n}\n\nexport const QuestionField = ({ question, ...rest }: QuestionFieldProps) => {\n const styles = useMultiStyleConfig('Questions')\n const { isAbleToVote, trans } = useElection()\n const {\n formState: { errors },\n } = useFormContext()\n\n return (\n \n \n {question.title.default}\n {question.description && (\n \n {question.description.default}\n \n )}\n (\n \n \n {question.choices.map((choice, ck) => (\n \n {choice.title.default}\n \n ))}\n \n {errors[question.title.default]?.message as string}\n \n )}\n />\n \n \n )\n}\n\nQuestionField.displayName = 'Question'\n","import { Alert, AlertIcon } from '@chakra-ui/alert'\nimport { useMultiStyleConfig } from '@chakra-ui/system'\nimport { FieldValues, FormProvider, useForm } from 'react-hook-form'\nimport { useElection } from './Election'\nimport { QuestionField } from './QuestionField'\n\nexport const QuestionsForm = () => {\n const { election, signer, vote, voted, ConnectButton, error, loading, trans } = useElection()\n const fmethods = useForm()\n const styles = useMultiStyleConfig('Questions')\n const questions = election?.questions\n\n if (voted) {\n return (\n \n {trans('voted', 'You already voted. Your vote id is %id')?.replace('%id', voted)}\n \n )\n }\n\n if (!questions || (questions && !questions?.length)) {\n return (\n \n \n {trans('empty', 'Apparently this process has no questions 🤔')}\n \n )\n }\n\n const initialValues: any = questions.reduce(\n (prev, curr) => ({\n ...prev,\n [curr.title.default]: '',\n }),\n {}\n )\n\n const onSubmit = async (values: FieldValues) => await vote(values)\n\n return (\n \n
\n {questions.map((question, qk) => (\n \n ))}\n {error && (\n \n \n {error}\n \n )}\n \n
\n )\n}\n","// src/button-context.ts\nimport { createContext } from \"@chakra-ui/react-context\";\nvar [ButtonGroupProvider, useButtonGroup] = createContext({\n strict: false,\n name: \"ButtonGroupContext\"\n});\n\nexport {\n ButtonGroupProvider,\n useButtonGroup\n};\n","// src/use-button-type.tsx\nimport { useCallback, useState } from \"react\";\nfunction useButtonType(value) {\n const [isButton, setIsButton] = useState(!value);\n const refCallback = useCallback((node) => {\n if (!node)\n return;\n setIsButton(node.tagName === \"BUTTON\");\n }, []);\n const type = isButton ? \"button\" : void 0;\n return { ref: refCallback, type };\n}\n\nexport {\n useButtonType\n};\n","// src/button-icon.tsx\nimport { chakra } from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { cloneElement, isValidElement } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction ButtonIcon(props) {\n const { children, className, ...rest } = props;\n const _children = isValidElement(children) ? cloneElement(children, {\n \"aria-hidden\": true,\n focusable: false\n }) : children;\n const _className = cx(\"chakra-button__icon\", className);\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n display: \"inline-flex\",\n alignSelf: \"center\",\n flexShrink: 0,\n ...rest,\n className: _className,\n children: _children\n }\n );\n}\nButtonIcon.displayName = \"ButtonIcon\";\n\nexport {\n ButtonIcon\n};\n","// src/button-spinner.tsx\nimport { Spinner } from \"@chakra-ui/spinner\";\nimport { chakra } from \"@chakra-ui/system\";\nimport { cx } from \"@chakra-ui/shared-utils\";\nimport { useMemo } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction ButtonSpinner(props) {\n const {\n label,\n placement,\n spacing = \"0.5rem\",\n children = /* @__PURE__ */ jsx(Spinner, { color: \"currentColor\", width: \"1em\", height: \"1em\" }),\n className,\n __css,\n ...rest\n } = props;\n const _className = cx(\"chakra-button__spinner\", className);\n const marginProp = placement === \"start\" ? \"marginEnd\" : \"marginStart\";\n const spinnerStyles = useMemo(\n () => ({\n display: \"flex\",\n alignItems: \"center\",\n position: label ? \"relative\" : \"absolute\",\n [marginProp]: label ? spacing : 0,\n fontSize: \"1em\",\n lineHeight: \"normal\",\n ...__css\n }),\n [__css, label, marginProp, spacing]\n );\n return /* @__PURE__ */ jsx(chakra.div, { className: _className, ...rest, __css: spinnerStyles, children });\n}\nButtonSpinner.displayName = \"ButtonSpinner\";\n\nexport {\n ButtonSpinner\n};\n","import {\n useButtonType\n} from \"./chunk-FRFD4OXU.mjs\";\nimport {\n useButtonGroup\n} from \"./chunk-DGWZA2DU.mjs\";\nimport {\n ButtonIcon\n} from \"./chunk-HCASMTTF.mjs\";\nimport {\n ButtonSpinner\n} from \"./chunk-HNNHG6RU.mjs\";\n\n// src/button.tsx\nimport { useMergeRefs } from \"@chakra-ui/react-use-merge-refs\";\nimport {\n chakra,\n forwardRef,\n omitThemingProps,\n useStyleConfig\n} from \"@chakra-ui/system\";\nimport { cx, dataAttr } from \"@chakra-ui/shared-utils\";\nimport { useMemo } from \"react\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar Button = forwardRef((props, ref) => {\n const group = useButtonGroup();\n const styles = useStyleConfig(\"Button\", { ...group, ...props });\n const {\n isDisabled = group == null ? void 0 : group.isDisabled,\n isLoading,\n isActive,\n children,\n leftIcon,\n rightIcon,\n loadingText,\n iconSpacing = \"0.5rem\",\n type,\n spinner,\n spinnerPlacement = \"start\",\n className,\n as,\n ...rest\n } = omitThemingProps(props);\n const buttonStyles = useMemo(() => {\n const _focus = { ...styles == null ? void 0 : styles[\"_focus\"], zIndex: 1 };\n return {\n display: \"inline-flex\",\n appearance: \"none\",\n alignItems: \"center\",\n justifyContent: \"center\",\n userSelect: \"none\",\n position: \"relative\",\n whiteSpace: \"nowrap\",\n verticalAlign: \"middle\",\n outline: \"none\",\n ...styles,\n ...!!group && { _focus }\n };\n }, [styles, group]);\n const { ref: _ref, type: defaultType } = useButtonType(as);\n const contentProps = { rightIcon, leftIcon, iconSpacing, children };\n return /* @__PURE__ */ jsxs(\n chakra.button,\n {\n ref: useMergeRefs(ref, _ref),\n as,\n type: type != null ? type : defaultType,\n \"data-active\": dataAttr(isActive),\n \"data-loading\": dataAttr(isLoading),\n __css: buttonStyles,\n className: cx(\"chakra-button\", className),\n ...rest,\n disabled: isDisabled || isLoading,\n children: [\n isLoading && spinnerPlacement === \"start\" && /* @__PURE__ */ jsx(\n ButtonSpinner,\n {\n className: \"chakra-button__spinner--start\",\n label: loadingText,\n placement: \"start\",\n spacing: iconSpacing,\n children: spinner\n }\n ),\n isLoading ? loadingText || /* @__PURE__ */ jsx(chakra.span, { opacity: 0, children: /* @__PURE__ */ jsx(ButtonContent, { ...contentProps }) }) : /* @__PURE__ */ jsx(ButtonContent, { ...contentProps }),\n isLoading && spinnerPlacement === \"end\" && /* @__PURE__ */ jsx(\n ButtonSpinner,\n {\n className: \"chakra-button__spinner--end\",\n label: loadingText,\n placement: \"end\",\n spacing: iconSpacing,\n children: spinner\n }\n )\n ]\n }\n );\n});\nButton.displayName = \"Button\";\nfunction ButtonContent(props) {\n const { leftIcon, rightIcon, children, iconSpacing } = props;\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n leftIcon && /* @__PURE__ */ jsx(ButtonIcon, { marginEnd: iconSpacing, children: leftIcon }),\n children,\n rightIcon && /* @__PURE__ */ jsx(ButtonIcon, { marginStart: iconSpacing, children: rightIcon })\n ] });\n}\n\nexport {\n Button\n};\n","import { Button, ButtonProps } from '@chakra-ui/button'\nimport { ElectionStatus } from '@vocdoni/sdk'\nimport { useElection } from './Election'\n\nexport const VoteButton = (props: ButtonProps) => {\n const { signer, loading, voting, ConnectButton, isAbleToVote, election, voted, trans } = useElection()\n const isDisabled = !signer || !isAbleToVote || election?.status !== ElectionStatus.ONGOING\n\n if (voted) return null\n\n if (!signer && ConnectButton) {\n return \n }\n\n return (\n \n {trans('vote', 'Vote')}\n \n )\n}\n","import { ChakraProps } from '@chakra-ui/system'\nimport { Signer } from '@ethersproject/abstract-signer'\nimport { Wallet } from '@ethersproject/wallet'\nimport { CensusType, CspVote, ElectionStatus, PublishedElection, Vote } from '@vocdoni/sdk'\nimport { ComponentType, createContext, PropsWithChildren, useContext, useEffect, useState } from 'react'\nimport { FieldValues } from 'react-hook-form'\nimport { useClientContext } from '../../client'\nimport { HR } from '../layout'\nimport { ElectionDescription, ElectionHeader, ElectionSchedule, ElectionStatusBadge, ElectionTitle } from './parts'\nimport { QuestionsForm } from './QuestionsForm'\nimport { VoteButton } from './VoteButton'\n\nexport type ElectionProviderProps = {\n id?: string\n election?: PublishedElection\n signer?: Wallet | Signer\n ConnectButton?: ComponentType\n fetchCensus?: boolean\n texts?: ElectionTextsType\n}\n\nexport type ElectionTextsType = Record & {\n required?: string\n empty?: string\n vote?: string\n voted?: string\n}\n\nexport const useElectionProvider = ({\n id,\n election: data,\n signer: s,\n fetchCensus,\n texts,\n ...rest\n}: ElectionProviderProps) => {\n const { client, signer, setSigner } = useClientContext()\n const [loading, setLoading] = useState(false)\n const [voting, setVoting] = useState(false)\n const [loaded, setLoaded] = useState(false)\n const [voted, setVoted] = useState(null)\n const [error, setError] = useState('')\n const [election, setElection] = useState(data)\n const [isAbleToVote, setIsAbleToVote] = useState(undefined)\n const [votesLeft, setVotesLeft] = useState(0)\n const [isInCensus, setIsInCensus] = useState(false)\n const [censusType, setCensusType] = useState(undefined)\n const [voteInstance, setVoteInstance] = useState(undefined)\n const [authToken, setAuthToken] = useState(null)\n const [handler, setHandler] = useState(\"facebook\") // Hardcoded github until we let to choose\n\n const trans = (key: keyof ElectionTextsType, def: string) => {\n if (texts && texts[key]) {\n return texts[key]\n }\n return def\n }\n\n // set signer in case it has been specified in the election\n // provider (rather than the client provider)\n useEffect(() => {\n if (!client || signer || !s) return\n\n setSigner(s)\n }, [signer, client, s])\n\n // fetch election\n useEffect(() => {\n if (election || !id || loaded || !client) return\n ;(async () => {\n setLoading(true)\n try {\n const e = await client.fetchElection(id)\n setLoaded(true)\n setElection(e)\n } catch (e) {\n setError((e as Error).message)\n } finally {\n setLoading(false)\n }\n })()\n }, [election, id, loaded, client])\n\n // set loaded in case election comes from props\n useEffect(() => {\n if (loaded || !data) return\n\n setLoaded(true)\n }, [data, loaded])\n\n // check if logged in user is able to vote\n useEffect(() => {\n if (!fetchCensus || !signer || !election || !loaded || !client || isAbleToVote !== undefined) return\n ;(async () => {\n const censusType: CensusType = election.census.type\n const isIn = await client.isInCensus(election.id)\n\n let left = 0\n if (isIn || censusType == CensusType.WEIGHTED) {\n // no need to check votes left if member ain't in census\n left = await client.votesLeftCount(election.id)\n setVotesLeft(left)\n\n const voted = await client.hasAlreadyVoted(election.id)\n setVoted(voted)\n }\n setCensusType(censusType)\n setIsInCensus(isIn)\n setIsAbleToVote((left > 0 && isIn) || censusType == CensusType.CSP)\n })()\n }, [fetchCensus, election, loaded, client, isAbleToVote, signer])\n\n // Listening for the popup window meessage (oauth flows)\n useEffect(() => {\n ;(async () => {\n if(window.opener) return\n if(!client) return\n if(censusType != CensusType.CSP) return;\n\n window.addEventListener('message', (event) => {\n if(event.data.code && event.data.handler){\n getOAuthToken(client, event.data.code, event.data.handler)\n }\n });\n })()\n },[client, censusType]);\n\n // Posting the message to the main window\n useEffect(() => {\n (async () => {\n if (typeof window == 'undefined') return\n\n const code = window.location.href.split('?')[1].split('&').find((param: string) => param.startsWith('code='))?.split('=')[1]\n const handler = window.location.href.split('?')[1].split('&').find((param: string) => param.startsWith('handler='))?.split('=')[1]\n if(!code || !handler) return;\n\n if(window.opener) {\n // If it is, send the code to the parent window and close the popup\n window.opener.postMessage({ code, handler }, '*');\n window.close();\n }\n })()\n },[]); \n\n // context vote function (the one to be used with the given components)\n const vote = async (values: FieldValues) => {\n if (!client) {\n throw new Error('no client initialized')\n }\n if (!signer) {\n throw new Error('no signer provided')\n }\n if (!election) {\n throw new Error('no election initialized')\n }\n\n setVoting(true)\n setError('')\n\n client.setElectionId(election.id)\n\n // TODO: Modify the following for a working vote!\n\n // map questions back to expected Vote[] values\n const mapped = election.questions.map((q) => parseInt(values[q.title.default], 10))\n let vi = new Vote(mapped)\n setVoteInstance(vi)\n try {\n if (censusType == CensusType.CSP) {\n await cspAuthAndVote()\n }else if (censusType == CensusType.WEIGHTED) {\n await weightedVote()\n }\n } catch (e: any) {\n if ('reason' in e) {\n return setError(e.reason as string)\n }\n if ('message' in e) {\n return setError(e.message as string)\n }\n console.error('could not vote:', e)\n } finally {\n setVoting(false)\n }\n }\n\n const weightedVote = async () => {\n if (!voteInstance) {\n throw new Error('no vote instance')\n }\n if( censusType != CensusType.WEIGHTED ){\n throw new Error('not a Weighted election')\n }\n\n const vid = await client.submitVote(voteInstance)\n setVoted(vid)\n return vid\n }\n\n const cspAuthAndVote = async () => {\n if ( !client ) {\n throw new Error('no client initialized')\n }\n if (!election) {\n throw new Error('no election initialized')\n }\n if( censusType != CensusType.CSP ){\n throw new Error('not a CSP election')\n }\n\n let redirectURL = `${window.location.href}`\n // Add electionId and handler to the redirectURL if it is not there\n if(!redirectURL.includes(`electionId=${election.id}`)){\n redirectURL.includes('?') ? redirectURL += `&electionId=${election.id}` : redirectURL += `?electionId=${election.id}`\n }\n if(!redirectURL.includes(`handler=${handler}`)){\n redirectURL.includes('?') ? redirectURL += `&handler=${handler}` : redirectURL += `?handler=${handler}`\n }\n \n let step0: any;\n try {\n step0 = await client.cspStep(0, [handler, redirectURL])\n } catch (e: any) {\n if ('reason' in e) {\n return setError(e.reason as string)\n }\n }\n\n setAuthToken(step0.authToken)\n openLoginPopup(handler, step0['response'][0])\n }\n\n // Opens a popup window to the service login page\n const openLoginPopup = (handler: string, url: string) => {\n const width = 600\n const height = 600\n const left = (window.outerWidth / 2) - (width / 2)\n const top = (window.outerHeight / 2) - (height / 2)\n const params = [\n `width=${width}`,\n `height=${height}`,\n `top=${top}`,\n `left=${left}`,\n `status=no`,\n `resizable=yes`,\n `scrollbars=yes`,\n ].join(',')\n\n window.open(url, handler, params)\n }\n\n const getOAuthToken = async (vocdoniClient: any, code: string, handler: string) => {\n if (!code) {\n throw new Error('no code provided')\n }\n if (!handler) {\n throw new Error('no handler provided')\n }\n\n // Extract the electionId query param from the redirectURL\n const electionId = window.location.href.split('?')[1].split('&').find((param: string) => param.startsWith('electionId='))?.split('=')[1]\n let redirectURL = `${window.location.href.split('?')[0]}?electionId=${electionId}&handler=${handler}`\n\n let step1;\n try {\n step1 = await vocdoniClient.cspStep(1, [handler, code, redirectURL], authToken)\n cspVote(step1.token);\n } catch(e) {\n setError(\"Not authorized to vote\")\n return false;\n }\n }\n\n const cspVote = async (token: string) => {\n if (!client) {\n throw new Error('no client initialized')\n }\n\n let voteInstance = new Vote([1])\n\n if( censusType != CensusType.CSP ){\n throw new Error('not a CSP election')\n }\n\n try {\n const walletAddress: string = await client.wallet?.getAddress() as string\n const signature: string = await client.cspSign(walletAddress, token)\n const cspVote: CspVote = client.cspVote(voteInstance, signature)\n const vid: string = await client.submitVote(cspVote)\n setVoted(vid)\n return vid\n } catch(e) {\n setError(\"Error submitting vote\")\n return false;\n }\n }\n\n return {\n ...rest,\n election,\n error,\n isAbleToVote,\n isInCensus,\n loading,\n signer,\n trans,\n vote,\n voted,\n votesLeft,\n voting,\n }\n}\n\nexport type ElectionState = ReturnType\n\nexport const ElectionContext = createContext(undefined)\n\nexport const useElection = () => {\n const ctxt = useContext(ElectionContext)\n if (!ctxt) {\n throw new Error(\n 'useElection returned `undefined`, maybe you forgot to wrap the component within ?'\n )\n }\n\n return ctxt\n}\n\nexport type ElectionProviderComponentProps = ElectionProviderProps & ChakraProps\n\nexport const ElectionProvider = ({ children, ...rest }: PropsWithChildren) => {\n const value = useElectionProvider(rest)\n\n return {children}\n}\nElectionProvider.displayName = 'ElectionProvider'\n\nexport const Election = (props: ElectionProviderComponentProps) => (\n \n \n \n \n \n \n
\n \n \n
\n)\nElection.displayName = 'Election'\n","import { HeadingProps } from '@chakra-ui/layout'\nimport { chakra, forwardRef, omitThemingProps, useStyleConfig } from '@chakra-ui/system'\nimport { Account } from '@vocdoni/sdk'\nimport { useOrganization } from './Organization'\n\nexport const OrganizationName = forwardRef((props, ref) => {\n const { organization } = useOrganization()\n const styles = useStyleConfig('OrganizationName', props)\n const rest = omitThemingProps(props)\n\n if (!organization) return null\n\n return (\n \n {((organization as any).metadata as Account).name.default}\n \n )\n})\nOrganizationName.displayName = 'OrganizationName'\n","import { ChakraProps } from '@chakra-ui/system'\nimport { Account, AccountData } from '@vocdoni/sdk'\nimport { createContext, PropsWithChildren, useContext, useEffect, useState } from 'react'\nimport { useClientContext } from '../../client'\nimport { OrganizationName } from './Name'\n\nexport type OrganizationProviderProps = {\n id?: string\n organization?: AccountData\n}\n\nexport const useOrganizationProvider = ({ id, organization: data, ...rest }: OrganizationProviderProps) => {\n const { client, signer, setSigner } = useClientContext()\n const [loading, setLoading] = useState(false)\n const [loaded, setLoaded] = useState(false)\n const [error, setError] = useState('')\n const [organization, setOrganization] = useState(data)\n\n const update = async (account: Account, faucetPackage?: string) => {\n setLoading(true)\n try {\n if (account instanceof Account) {\n await client.updateAccountInfo(account);\n } else {\n await client.createAccountInfo({ account: new Account(account), faucetPackage });\n }\n } catch (e) {\n setError((e as Error).message)\n } finally {\n setLoading(false)\n }\n }\n\n // fetch organization\n useEffect(() => {\n if (organization || !id || loaded || !client) return\n ;(async () => {\n setLoading(true)\n try {\n setOrganization(await client.fetchAccountInfo(id))\n setLoaded(true)\n } catch (e) {\n setError((e as Error).message)\n } finally {\n setLoading(false)\n }\n })()\n }, [organization, id, loaded, client])\n\n // set loaded in case organization comes from props\n useEffect(() => {\n if (loaded || !data) return\n\n setLoaded(true)\n }, [data, loaded])\n\n return {\n ...rest,\n organization,\n error,\n loading,\n loaded,\n update,\n }\n}\n\nexport type OrganizationState = ReturnType\n\nexport const OrganizationContext = createContext(undefined)\n\nexport const useOrganization = () => {\n const ctxt = useContext(OrganizationContext)\n if (!ctxt) {\n throw new Error(\n 'useElection returned `undefined`, maybe you forgot to wrap the component within ?'\n )\n }\n\n return ctxt\n}\n\nexport type OrganizationProviderComponentProps = OrganizationProviderProps & ChakraProps\n\nexport const OrganizationProvider = ({ children, ...rest }: PropsWithChildren) => {\n const value = useOrganizationProvider(rest)\n\n return {children}\n}\nOrganizationProvider.displayName = 'OrganizationProvider'\n\nexport const Organization = (props: OrganizationProviderComponentProps) => (\n \n \n \n)\nOrganization.displayName = 'Election'\n","import { useStyleConfig } from '@chakra-ui/system'\nimport { Image, IPFSImageProps } from '../layout'\nimport { useOrganization } from './Organization'\n\nexport const OrganizationAvatar = (props: IPFSImageProps) => {\n const styles = useStyleConfig('OrganizationAvatar', props)\n\n const { organization } = useOrganization()\n if (!organization) return null\n\n let avatar = ((organization as any).metadata as any).media.avatar\n if (!avatar) {\n // fallback to deprecated logo field\n avatar = ((organization as any).metadata as any).media.logo\n }\n if (!avatar) return null\n\n return \n}\n","import { ChakraProps, useStyleConfig } from '@chakra-ui/system'\nimport { Account } from '@vocdoni/sdk'\nimport { ReactMarkdownProps } from 'react-markdown/lib/complex-types'\nimport { Markdown } from '../layout'\nimport { useOrganization } from './Organization'\n\nexport const OrganizationDescription = (props: Omit & ChakraProps) => {\n const styles = useStyleConfig('OrganizationDescription', props)\n const { organization } = useOrganization()\n\n if (!organization || (organization && !((organization as any).metadata as Account).description)) return null\n\n return (\n \n {((organization as any).metadata as Account).description.default}\n \n )\n}\n","import { useStyleConfig } from '@chakra-ui/system'\nimport { Image, IPFSImageProps } from '../layout'\nimport { useOrganization } from './Organization'\n\nexport const OrganizationHeader = (props: IPFSImageProps) => {\n const styles = useStyleConfig('OrganizationHeader', props)\n\n const { organization } = useOrganization()\n\n if (!organization) return null\n\n const { header } = ((organization as any).metadata as any).media\n if (!header) return null\n\n return \n}\n","// src/foundations/transition.ts\nvar transitionProperty = {\n common: \"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform\",\n colors: \"background-color, border-color, color, fill, stroke\",\n dimensions: \"width, height\",\n position: \"left, right, top, bottom\",\n background: \"background-color, background-image, background-position\"\n};\nvar transitionTimingFunction = {\n \"ease-in\": \"cubic-bezier(0.4, 0, 1, 1)\",\n \"ease-out\": \"cubic-bezier(0, 0, 0.2, 1)\",\n \"ease-in-out\": \"cubic-bezier(0.4, 0, 0.2, 1)\"\n};\nvar transitionDuration = {\n \"ultra-fast\": \"50ms\",\n faster: \"100ms\",\n fast: \"150ms\",\n normal: \"200ms\",\n slow: \"300ms\",\n slower: \"400ms\",\n \"ultra-slow\": \"500ms\"\n};\nvar transition = {\n property: transitionProperty,\n easing: transitionTimingFunction,\n duration: transitionDuration\n};\nvar transition_default = transition;\n\nexport {\n transition_default\n};\n","// src/foundations/z-index.ts\nvar zIndices = {\n hide: -1,\n auto: \"auto\",\n base: 0,\n docked: 10,\n dropdown: 1e3,\n sticky: 1100,\n banner: 1200,\n overlay: 1300,\n modal: 1400,\n popover: 1500,\n skipLink: 1600,\n toast: 1700,\n tooltip: 1800\n};\nvar z_index_default = zIndices;\n\nexport {\n z_index_default\n};\n","// src/foundations/borders.ts\nvar borders = {\n none: 0,\n \"1px\": \"1px solid\",\n \"2px\": \"2px solid\",\n \"4px\": \"4px solid\",\n \"8px\": \"8px solid\"\n};\nvar borders_default = borders;\n\nexport {\n borders_default\n};\n","// src/foundations/breakpoints.ts\nvar breakpoints = {\n base: \"0em\",\n sm: \"30em\",\n md: \"48em\",\n lg: \"62em\",\n xl: \"80em\",\n \"2xl\": \"96em\"\n};\nvar breakpoints_default = breakpoints;\n\nexport {\n breakpoints_default\n};\n","// src/foundations/colors.ts\nvar colors = {\n transparent: \"transparent\",\n current: \"currentColor\",\n black: \"#000000\",\n white: \"#FFFFFF\",\n whiteAlpha: {\n 50: \"rgba(255, 255, 255, 0.04)\",\n 100: \"rgba(255, 255, 255, 0.06)\",\n 200: \"rgba(255, 255, 255, 0.08)\",\n 300: \"rgba(255, 255, 255, 0.16)\",\n 400: \"rgba(255, 255, 255, 0.24)\",\n 500: \"rgba(255, 255, 255, 0.36)\",\n 600: \"rgba(255, 255, 255, 0.48)\",\n 700: \"rgba(255, 255, 255, 0.64)\",\n 800: \"rgba(255, 255, 255, 0.80)\",\n 900: \"rgba(255, 255, 255, 0.92)\"\n },\n blackAlpha: {\n 50: \"rgba(0, 0, 0, 0.04)\",\n 100: \"rgba(0, 0, 0, 0.06)\",\n 200: \"rgba(0, 0, 0, 0.08)\",\n 300: \"rgba(0, 0, 0, 0.16)\",\n 400: \"rgba(0, 0, 0, 0.24)\",\n 500: \"rgba(0, 0, 0, 0.36)\",\n 600: \"rgba(0, 0, 0, 0.48)\",\n 700: \"rgba(0, 0, 0, 0.64)\",\n 800: \"rgba(0, 0, 0, 0.80)\",\n 900: \"rgba(0, 0, 0, 0.92)\"\n },\n gray: {\n 50: \"#F7FAFC\",\n 100: \"#EDF2F7\",\n 200: \"#E2E8F0\",\n 300: \"#CBD5E0\",\n 400: \"#A0AEC0\",\n 500: \"#718096\",\n 600: \"#4A5568\",\n 700: \"#2D3748\",\n 800: \"#1A202C\",\n 900: \"#171923\"\n },\n red: {\n 50: \"#FFF5F5\",\n 100: \"#FED7D7\",\n 200: \"#FEB2B2\",\n 300: \"#FC8181\",\n 400: \"#F56565\",\n 500: \"#E53E3E\",\n 600: \"#C53030\",\n 700: \"#9B2C2C\",\n 800: \"#822727\",\n 900: \"#63171B\"\n },\n orange: {\n 50: \"#FFFAF0\",\n 100: \"#FEEBC8\",\n 200: \"#FBD38D\",\n 300: \"#F6AD55\",\n 400: \"#ED8936\",\n 500: \"#DD6B20\",\n 600: \"#C05621\",\n 700: \"#9C4221\",\n 800: \"#7B341E\",\n 900: \"#652B19\"\n },\n yellow: {\n 50: \"#FFFFF0\",\n 100: \"#FEFCBF\",\n 200: \"#FAF089\",\n 300: \"#F6E05E\",\n 400: \"#ECC94B\",\n 500: \"#D69E2E\",\n 600: \"#B7791F\",\n 700: \"#975A16\",\n 800: \"#744210\",\n 900: \"#5F370E\"\n },\n green: {\n 50: \"#F0FFF4\",\n 100: \"#C6F6D5\",\n 200: \"#9AE6B4\",\n 300: \"#68D391\",\n 400: \"#48BB78\",\n 500: \"#38A169\",\n 600: \"#2F855A\",\n 700: \"#276749\",\n 800: \"#22543D\",\n 900: \"#1C4532\"\n },\n teal: {\n 50: \"#E6FFFA\",\n 100: \"#B2F5EA\",\n 200: \"#81E6D9\",\n 300: \"#4FD1C5\",\n 400: \"#38B2AC\",\n 500: \"#319795\",\n 600: \"#2C7A7B\",\n 700: \"#285E61\",\n 800: \"#234E52\",\n 900: \"#1D4044\"\n },\n blue: {\n 50: \"#ebf8ff\",\n 100: \"#bee3f8\",\n 200: \"#90cdf4\",\n 300: \"#63b3ed\",\n 400: \"#4299e1\",\n 500: \"#3182ce\",\n 600: \"#2b6cb0\",\n 700: \"#2c5282\",\n 800: \"#2a4365\",\n 900: \"#1A365D\"\n },\n cyan: {\n 50: \"#EDFDFD\",\n 100: \"#C4F1F9\",\n 200: \"#9DECF9\",\n 300: \"#76E4F7\",\n 400: \"#0BC5EA\",\n 500: \"#00B5D8\",\n 600: \"#00A3C4\",\n 700: \"#0987A0\",\n 800: \"#086F83\",\n 900: \"#065666\"\n },\n purple: {\n 50: \"#FAF5FF\",\n 100: \"#E9D8FD\",\n 200: \"#D6BCFA\",\n 300: \"#B794F4\",\n 400: \"#9F7AEA\",\n 500: \"#805AD5\",\n 600: \"#6B46C1\",\n 700: \"#553C9A\",\n 800: \"#44337A\",\n 900: \"#322659\"\n },\n pink: {\n 50: \"#FFF5F7\",\n 100: \"#FED7E2\",\n 200: \"#FBB6CE\",\n 300: \"#F687B3\",\n 400: \"#ED64A6\",\n 500: \"#D53F8C\",\n 600: \"#B83280\",\n 700: \"#97266D\",\n 800: \"#702459\",\n 900: \"#521B41\"\n },\n linkedin: {\n 50: \"#E8F4F9\",\n 100: \"#CFEDFB\",\n 200: \"#9BDAF3\",\n 300: \"#68C7EC\",\n 400: \"#34B3E4\",\n 500: \"#00A0DC\",\n 600: \"#008CC9\",\n 700: \"#0077B5\",\n 800: \"#005E93\",\n 900: \"#004471\"\n },\n facebook: {\n 50: \"#E8F4F9\",\n 100: \"#D9DEE9\",\n 200: \"#B7C2DA\",\n 300: \"#6482C0\",\n 400: \"#4267B2\",\n 500: \"#385898\",\n 600: \"#314E89\",\n 700: \"#29487D\",\n 800: \"#223B67\",\n 900: \"#1E355B\"\n },\n messenger: {\n 50: \"#D0E6FF\",\n 100: \"#B9DAFF\",\n 200: \"#A2CDFF\",\n 300: \"#7AB8FF\",\n 400: \"#2E90FF\",\n 500: \"#0078FF\",\n 600: \"#0063D1\",\n 700: \"#0052AC\",\n 800: \"#003C7E\",\n 900: \"#002C5C\"\n },\n whatsapp: {\n 50: \"#dffeec\",\n 100: \"#b9f5d0\",\n 200: \"#90edb3\",\n 300: \"#65e495\",\n 400: \"#3cdd78\",\n 500: \"#22c35e\",\n 600: \"#179848\",\n 700: \"#0c6c33\",\n 800: \"#01421c\",\n 900: \"#001803\"\n },\n twitter: {\n 50: \"#E5F4FD\",\n 100: \"#C8E9FB\",\n 200: \"#A8DCFA\",\n 300: \"#83CDF7\",\n 400: \"#57BBF5\",\n 500: \"#1DA1F2\",\n 600: \"#1A94DA\",\n 700: \"#1681BF\",\n 800: \"#136B9E\",\n 900: \"#0D4D71\"\n },\n telegram: {\n 50: \"#E3F2F9\",\n 100: \"#C5E4F3\",\n 200: \"#A2D4EC\",\n 300: \"#7AC1E4\",\n 400: \"#47A9DA\",\n 500: \"#0088CC\",\n 600: \"#007AB8\",\n 700: \"#006BA1\",\n 800: \"#005885\",\n 900: \"#003F5E\"\n }\n};\nvar colors_default = colors;\n\nexport {\n colors_default\n};\n","// src/foundations/radius.ts\nvar radii = {\n none: \"0\",\n sm: \"0.125rem\",\n base: \"0.25rem\",\n md: \"0.375rem\",\n lg: \"0.5rem\",\n xl: \"0.75rem\",\n \"2xl\": \"1rem\",\n \"3xl\": \"1.5rem\",\n full: \"9999px\"\n};\nvar radius_default = radii;\n\nexport {\n radius_default\n};\n","// src/foundations/shadows.ts\nvar shadows = {\n xs: \"0 0 0 1px rgba(0, 0, 0, 0.05)\",\n sm: \"0 1px 2px 0 rgba(0, 0, 0, 0.05)\",\n base: \"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)\",\n md: \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)\",\n lg: \"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)\",\n xl: \"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)\",\n \"2xl\": \"0 25px 50px -12px rgba(0, 0, 0, 0.25)\",\n outline: \"0 0 0 3px rgba(66, 153, 225, 0.6)\",\n inner: \"inset 0 2px 4px 0 rgba(0,0,0,0.06)\",\n none: \"none\",\n \"dark-lg\": \"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px\"\n};\nvar shadows_default = shadows;\n\nexport {\n shadows_default\n};\n","// src/foundations/blur.ts\nvar blur = {\n none: 0,\n sm: \"4px\",\n base: \"8px\",\n md: \"12px\",\n lg: \"16px\",\n xl: \"24px\",\n \"2xl\": \"40px\",\n \"3xl\": \"64px\"\n};\nvar blur_default = blur;\n\nexport {\n blur_default\n};\n","// src/foundations/typography.ts\nvar typography = {\n letterSpacings: {\n tighter: \"-0.05em\",\n tight: \"-0.025em\",\n normal: \"0\",\n wide: \"0.025em\",\n wider: \"0.05em\",\n widest: \"0.1em\"\n },\n lineHeights: {\n normal: \"normal\",\n none: 1,\n shorter: 1.25,\n short: 1.375,\n base: 1.5,\n tall: 1.625,\n taller: \"2\",\n \"3\": \".75rem\",\n \"4\": \"1rem\",\n \"5\": \"1.25rem\",\n \"6\": \"1.5rem\",\n \"7\": \"1.75rem\",\n \"8\": \"2rem\",\n \"9\": \"2.25rem\",\n \"10\": \"2.5rem\"\n },\n fontWeights: {\n hairline: 100,\n thin: 200,\n light: 300,\n normal: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n extrabold: 800,\n black: 900\n },\n fonts: {\n heading: `-apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"`,\n body: `-apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"`,\n mono: `SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace`\n },\n fontSizes: {\n \"3xs\": \"0.45rem\",\n \"2xs\": \"0.625rem\",\n xs: \"0.75rem\",\n sm: \"0.875rem\",\n md: \"1rem\",\n lg: \"1.125rem\",\n xl: \"1.25rem\",\n \"2xl\": \"1.5rem\",\n \"3xl\": \"1.875rem\",\n \"4xl\": \"2.25rem\",\n \"5xl\": \"3rem\",\n \"6xl\": \"3.75rem\",\n \"7xl\": \"4.5rem\",\n \"8xl\": \"6rem\",\n \"9xl\": \"8rem\"\n }\n};\nvar typography_default = typography;\n\nexport {\n typography_default\n};\n","// src/foundations/spacing.ts\nvar spacing = {\n px: \"1px\",\n 0.5: \"0.125rem\",\n 1: \"0.25rem\",\n 1.5: \"0.375rem\",\n 2: \"0.5rem\",\n 2.5: \"0.625rem\",\n 3: \"0.75rem\",\n 3.5: \"0.875rem\",\n 4: \"1rem\",\n 5: \"1.25rem\",\n 6: \"1.5rem\",\n 7: \"1.75rem\",\n 8: \"2rem\",\n 9: \"2.25rem\",\n 10: \"2.5rem\",\n 12: \"3rem\",\n 14: \"3.5rem\",\n 16: \"4rem\",\n 20: \"5rem\",\n 24: \"6rem\",\n 28: \"7rem\",\n 32: \"8rem\",\n 36: \"9rem\",\n 40: \"10rem\",\n 44: \"11rem\",\n 48: \"12rem\",\n 52: \"13rem\",\n 56: \"14rem\",\n 60: \"15rem\",\n 64: \"16rem\",\n 72: \"18rem\",\n 80: \"20rem\",\n 96: \"24rem\"\n};\n\nexport {\n spacing\n};\n","import {\n spacing\n} from \"./chunk-G3IFUAY5.mjs\";\n\n// src/foundations/sizes.ts\nvar largeSizes = {\n max: \"max-content\",\n min: \"min-content\",\n full: \"100%\",\n \"3xs\": \"14rem\",\n \"2xs\": \"16rem\",\n xs: \"20rem\",\n sm: \"24rem\",\n md: \"28rem\",\n lg: \"32rem\",\n xl: \"36rem\",\n \"2xl\": \"42rem\",\n \"3xl\": \"48rem\",\n \"4xl\": \"56rem\",\n \"5xl\": \"64rem\",\n \"6xl\": \"72rem\",\n \"7xl\": \"80rem\",\n \"8xl\": \"90rem\",\n prose: \"60ch\"\n};\nvar container = {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\"\n};\nvar sizes = {\n ...spacing,\n ...largeSizes,\n container\n};\nvar sizes_default = sizes;\n\nexport {\n sizes_default\n};\n","import {\n transition_default\n} from \"./chunk-AU77DZXY.mjs\";\nimport {\n z_index_default\n} from \"./chunk-7OKLMD4V.mjs\";\nimport {\n borders_default\n} from \"./chunk-ZV5E32CG.mjs\";\nimport {\n breakpoints_default\n} from \"./chunk-DDAHWWWN.mjs\";\nimport {\n colors_default\n} from \"./chunk-C7H5GWRZ.mjs\";\nimport {\n radius_default\n} from \"./chunk-4REDROSM.mjs\";\nimport {\n shadows_default\n} from \"./chunk-DJNGX4VH.mjs\";\nimport {\n blur_default\n} from \"./chunk-OLDNEXT6.mjs\";\nimport {\n typography_default\n} from \"./chunk-HOOF7HHD.mjs\";\nimport {\n sizes_default\n} from \"./chunk-X4JBRTE2.mjs\";\nimport {\n spacing\n} from \"./chunk-G3IFUAY5.mjs\";\n\n// src/foundations/index.ts\nvar foundations = {\n breakpoints: breakpoints_default,\n zIndices: z_index_default,\n radii: radius_default,\n blur: blur_default,\n colors: colors_default,\n ...typography_default,\n sizes: sizes_default,\n shadows: shadows_default,\n space: spacing,\n borders: borders_default,\n transition: transition_default\n};\n\nexport {\n foundations\n};\n","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeMax = Math.max,\n nativeNow = Date.now;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\n/**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\nvar mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n});\n\n/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = mergeWith;\n","// src/utils/create-transform.ts\nimport { isObject } from \"@chakra-ui/shared-utils\";\nvar isImportant = (value) => /!(important)?$/.test(value);\nvar withoutImportant = (value) => typeof value === \"string\" ? value.replace(/!(important)?$/, \"\").trim() : value;\nvar tokenToCSSVar = (scale, value) => (theme) => {\n const valueStr = String(value);\n const important = isImportant(valueStr);\n const valueWithoutImportant = withoutImportant(valueStr);\n const key = scale ? `${scale}.${valueWithoutImportant}` : valueWithoutImportant;\n let transformed = isObject(theme.__cssMap) && key in theme.__cssMap ? theme.__cssMap[key].varRef : value;\n transformed = withoutImportant(transformed);\n return important ? `${transformed} !important` : transformed;\n};\nfunction createTransform(options) {\n const { scale, transform: transform2, compose } = options;\n const fn = (value, theme) => {\n var _a;\n const _value = tokenToCSSVar(scale, value)(theme);\n let result = (_a = transform2 == null ? void 0 : transform2(_value, theme)) != null ? _a : _value;\n if (compose) {\n result = compose(result, theme);\n }\n return result;\n };\n return fn;\n}\n\n// src/utils/pipe.ts\nvar pipe = (...fns) => (v) => fns.reduce((a, b) => b(a), v);\n\n// src/utils/prop-config.ts\nfunction toConfig(scale, transform2) {\n return (property) => {\n const result = { property, scale };\n result.transform = createTransform({\n scale,\n transform: transform2\n });\n return result;\n };\n}\nvar getRtl = ({ rtl, ltr }) => (theme) => theme.direction === \"rtl\" ? rtl : ltr;\nfunction logical(options) {\n const { property, scale, transform: transform2 } = options;\n return {\n scale,\n property: getRtl(property),\n transform: scale ? createTransform({\n scale,\n compose: transform2\n }) : transform2\n };\n}\n\n// src/utils/templates.ts\nvar transformTemplate = [\n \"rotate(var(--chakra-rotate, 0))\",\n \"scaleX(var(--chakra-scale-x, 1))\",\n \"scaleY(var(--chakra-scale-y, 1))\",\n \"skewX(var(--chakra-skew-x, 0))\",\n \"skewY(var(--chakra-skew-y, 0))\"\n];\nfunction getTransformTemplate() {\n return [\n \"translateX(var(--chakra-translate-x, 0))\",\n \"translateY(var(--chakra-translate-y, 0))\",\n ...transformTemplate\n ].join(\" \");\n}\nfunction getTransformGpuTemplate() {\n return [\n \"translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)\",\n ...transformTemplate\n ].join(\" \");\n}\nvar filterTemplate = {\n \"--chakra-blur\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-brightness\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-contrast\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-grayscale\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-hue-rotate\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-invert\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-saturate\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-sepia\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-drop-shadow\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n filter: [\n \"var(--chakra-blur)\",\n \"var(--chakra-brightness)\",\n \"var(--chakra-contrast)\",\n \"var(--chakra-grayscale)\",\n \"var(--chakra-hue-rotate)\",\n \"var(--chakra-invert)\",\n \"var(--chakra-saturate)\",\n \"var(--chakra-sepia)\",\n \"var(--chakra-drop-shadow)\"\n ].join(\" \")\n};\nvar backdropFilterTemplate = {\n backdropFilter: [\n \"var(--chakra-backdrop-blur)\",\n \"var(--chakra-backdrop-brightness)\",\n \"var(--chakra-backdrop-contrast)\",\n \"var(--chakra-backdrop-grayscale)\",\n \"var(--chakra-backdrop-hue-rotate)\",\n \"var(--chakra-backdrop-invert)\",\n \"var(--chakra-backdrop-opacity)\",\n \"var(--chakra-backdrop-saturate)\",\n \"var(--chakra-backdrop-sepia)\"\n ].join(\" \"),\n \"--chakra-backdrop-blur\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-brightness\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-contrast\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-grayscale\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-hue-rotate\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-invert\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-opacity\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-saturate\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-sepia\": \"var(--chakra-empty,/*!*/ /*!*/)\"\n};\nfunction getRingTemplate(value) {\n return {\n \"--chakra-ring-offset-shadow\": `var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)`,\n \"--chakra-ring-shadow\": `var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)`,\n \"--chakra-ring-width\": value,\n boxShadow: [\n `var(--chakra-ring-offset-shadow)`,\n `var(--chakra-ring-shadow)`,\n `var(--chakra-shadow, 0 0 #0000)`\n ].join(\", \")\n };\n}\nvar flexDirectionTemplate = {\n \"row-reverse\": {\n space: \"--chakra-space-x-reverse\",\n divide: \"--chakra-divide-x-reverse\"\n },\n \"column-reverse\": {\n space: \"--chakra-space-y-reverse\",\n divide: \"--chakra-divide-y-reverse\"\n }\n};\n\n// src/utils/parse-gradient.ts\nvar directionMap = {\n \"to-t\": \"to top\",\n \"to-tr\": \"to top right\",\n \"to-r\": \"to right\",\n \"to-br\": \"to bottom right\",\n \"to-b\": \"to bottom\",\n \"to-bl\": \"to bottom left\",\n \"to-l\": \"to left\",\n \"to-tl\": \"to top left\"\n};\nvar valueSet = new Set(Object.values(directionMap));\nvar globalSet = /* @__PURE__ */ new Set([\n \"none\",\n \"-moz-initial\",\n \"inherit\",\n \"initial\",\n \"revert\",\n \"unset\"\n]);\nvar trimSpace = (str) => str.trim();\nfunction parseGradient(value, theme) {\n if (value == null || globalSet.has(value))\n return value;\n const prevent = isCSSFunction(value) || globalSet.has(value);\n if (!prevent)\n return `url('${value}')`;\n const regex = /(^[a-z-A-Z]+)\\((.*)\\)/g;\n const results = regex.exec(value);\n const type = results == null ? void 0 : results[1];\n const values = results == null ? void 0 : results[2];\n if (!type || !values)\n return value;\n const _type = type.includes(\"-gradient\") ? type : `${type}-gradient`;\n const [maybeDirection, ...stops] = values.split(\",\").map(trimSpace).filter(Boolean);\n if ((stops == null ? void 0 : stops.length) === 0)\n return value;\n const direction = maybeDirection in directionMap ? directionMap[maybeDirection] : maybeDirection;\n stops.unshift(direction);\n const _values = stops.map((stop) => {\n if (valueSet.has(stop))\n return stop;\n const firstStop = stop.indexOf(\" \");\n const [_color, _stop] = firstStop !== -1 ? [stop.substr(0, firstStop), stop.substr(firstStop + 1)] : [stop];\n const _stopOrFunc = isCSSFunction(_stop) ? _stop : _stop && _stop.split(\" \");\n const key = `colors.${_color}`;\n const color2 = key in theme.__cssMap ? theme.__cssMap[key].varRef : _color;\n return _stopOrFunc ? [\n color2,\n ...Array.isArray(_stopOrFunc) ? _stopOrFunc : [_stopOrFunc]\n ].join(\" \") : color2;\n });\n return `${_type}(${_values.join(\", \")})`;\n}\nvar isCSSFunction = (value) => {\n return typeof value === \"string\" && value.includes(\"(\") && value.includes(\")\");\n};\nvar gradientTransform = (value, theme) => parseGradient(value, theme != null ? theme : {});\n\n// src/utils/transform-functions.ts\nfunction isCssVar(value) {\n return /^var\\(--.+\\)$/.test(value);\n}\nvar analyzeCSSValue = (value) => {\n const num = parseFloat(value.toString());\n const unit = value.toString().replace(String(num), \"\");\n return { unitless: !unit, value: num, unit };\n};\nvar wrap = (str) => (value) => `${str}(${value})`;\nvar transformFunctions = {\n filter(value) {\n return value !== \"auto\" ? value : filterTemplate;\n },\n backdropFilter(value) {\n return value !== \"auto\" ? value : backdropFilterTemplate;\n },\n ring(value) {\n return getRingTemplate(transformFunctions.px(value));\n },\n bgClip(value) {\n return value === \"text\" ? { color: \"transparent\", backgroundClip: \"text\" } : { backgroundClip: value };\n },\n transform(value) {\n if (value === \"auto\")\n return getTransformTemplate();\n if (value === \"auto-gpu\")\n return getTransformGpuTemplate();\n return value;\n },\n vh(value) {\n return value === \"$100vh\" ? \"var(--chakra-vh)\" : value;\n },\n px(value) {\n if (value == null)\n return value;\n const { unitless } = analyzeCSSValue(value);\n return unitless || typeof value === \"number\" ? `${value}px` : value;\n },\n fraction(value) {\n return !(typeof value === \"number\") || value > 1 ? value : `${value * 100}%`;\n },\n float(value, theme) {\n const map = { left: \"right\", right: \"left\" };\n return theme.direction === \"rtl\" ? map[value] : value;\n },\n degree(value) {\n if (isCssVar(value) || value == null)\n return value;\n const unitless = typeof value === \"string\" && !value.endsWith(\"deg\");\n return typeof value === \"number\" || unitless ? `${value}deg` : value;\n },\n gradient: gradientTransform,\n blur: wrap(\"blur\"),\n opacity: wrap(\"opacity\"),\n brightness: wrap(\"brightness\"),\n contrast: wrap(\"contrast\"),\n dropShadow: wrap(\"drop-shadow\"),\n grayscale: wrap(\"grayscale\"),\n hueRotate: wrap(\"hue-rotate\"),\n invert: wrap(\"invert\"),\n saturate: wrap(\"saturate\"),\n sepia: wrap(\"sepia\"),\n bgImage(value) {\n if (value == null)\n return value;\n const prevent = isCSSFunction(value) || globalSet.has(value);\n return !prevent ? `url(${value})` : value;\n },\n outline(value) {\n const isNoneOrZero = String(value) === \"0\" || String(value) === \"none\";\n return value !== null && isNoneOrZero ? { outline: \"2px solid transparent\", outlineOffset: \"2px\" } : { outline: value };\n },\n flexDirection(value) {\n var _a;\n const { space: space2, divide: divide2 } = (_a = flexDirectionTemplate[value]) != null ? _a : {};\n const result = { flexDirection: value };\n if (space2)\n result[space2] = 1;\n if (divide2)\n result[divide2] = 1;\n return result;\n }\n};\n\n// src/utils/index.ts\nvar t = {\n borderWidths: toConfig(\"borderWidths\"),\n borderStyles: toConfig(\"borderStyles\"),\n colors: toConfig(\"colors\"),\n borders: toConfig(\"borders\"),\n gradients: toConfig(\"gradients\", transformFunctions.gradient),\n radii: toConfig(\"radii\", transformFunctions.px),\n space: toConfig(\"space\", pipe(transformFunctions.vh, transformFunctions.px)),\n spaceT: toConfig(\"space\", pipe(transformFunctions.vh, transformFunctions.px)),\n degreeT(property) {\n return { property, transform: transformFunctions.degree };\n },\n prop(property, scale, transform2) {\n return {\n property,\n scale,\n ...scale && {\n transform: createTransform({ scale, transform: transform2 })\n }\n };\n },\n propT(property, transform2) {\n return { property, transform: transform2 };\n },\n sizes: toConfig(\"sizes\", pipe(transformFunctions.vh, transformFunctions.px)),\n sizesT: toConfig(\"sizes\", pipe(transformFunctions.vh, transformFunctions.fraction)),\n shadows: toConfig(\"shadows\"),\n logical,\n blur: toConfig(\"blur\", transformFunctions.blur)\n};\n\n// src/config/background.ts\nvar background = {\n background: t.colors(\"background\"),\n backgroundColor: t.colors(\"backgroundColor\"),\n backgroundImage: t.gradients(\"backgroundImage\"),\n backgroundSize: true,\n backgroundPosition: true,\n backgroundRepeat: true,\n backgroundAttachment: true,\n backgroundClip: { transform: transformFunctions.bgClip },\n bgSize: t.prop(\"backgroundSize\"),\n bgPosition: t.prop(\"backgroundPosition\"),\n bg: t.colors(\"background\"),\n bgColor: t.colors(\"backgroundColor\"),\n bgPos: t.prop(\"backgroundPosition\"),\n bgRepeat: t.prop(\"backgroundRepeat\"),\n bgAttachment: t.prop(\"backgroundAttachment\"),\n bgGradient: t.gradients(\"backgroundImage\"),\n bgClip: { transform: transformFunctions.bgClip }\n};\nObject.assign(background, {\n bgImage: background.backgroundImage,\n bgImg: background.backgroundImage\n});\n\n// src/config/border.ts\nvar border = {\n border: t.borders(\"border\"),\n borderWidth: t.borderWidths(\"borderWidth\"),\n borderStyle: t.borderStyles(\"borderStyle\"),\n borderColor: t.colors(\"borderColor\"),\n borderRadius: t.radii(\"borderRadius\"),\n borderTop: t.borders(\"borderTop\"),\n borderBlockStart: t.borders(\"borderBlockStart\"),\n borderTopLeftRadius: t.radii(\"borderTopLeftRadius\"),\n borderStartStartRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: \"borderTopLeftRadius\",\n rtl: \"borderTopRightRadius\"\n }\n }),\n borderEndStartRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: \"borderBottomLeftRadius\",\n rtl: \"borderBottomRightRadius\"\n }\n }),\n borderTopRightRadius: t.radii(\"borderTopRightRadius\"),\n borderStartEndRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: \"borderTopRightRadius\",\n rtl: \"borderTopLeftRadius\"\n }\n }),\n borderEndEndRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: \"borderBottomRightRadius\",\n rtl: \"borderBottomLeftRadius\"\n }\n }),\n borderRight: t.borders(\"borderRight\"),\n borderInlineEnd: t.borders(\"borderInlineEnd\"),\n borderBottom: t.borders(\"borderBottom\"),\n borderBlockEnd: t.borders(\"borderBlockEnd\"),\n borderBottomLeftRadius: t.radii(\"borderBottomLeftRadius\"),\n borderBottomRightRadius: t.radii(\"borderBottomRightRadius\"),\n borderLeft: t.borders(\"borderLeft\"),\n borderInlineStart: {\n property: \"borderInlineStart\",\n scale: \"borders\"\n },\n borderInlineStartRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: [\"borderTopLeftRadius\", \"borderBottomLeftRadius\"],\n rtl: [\"borderTopRightRadius\", \"borderBottomRightRadius\"]\n }\n }),\n borderInlineEndRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: [\"borderTopRightRadius\", \"borderBottomRightRadius\"],\n rtl: [\"borderTopLeftRadius\", \"borderBottomLeftRadius\"]\n }\n }),\n borderX: t.borders([\"borderLeft\", \"borderRight\"]),\n borderInline: t.borders(\"borderInline\"),\n borderY: t.borders([\"borderTop\", \"borderBottom\"]),\n borderBlock: t.borders(\"borderBlock\"),\n borderTopWidth: t.borderWidths(\"borderTopWidth\"),\n borderBlockStartWidth: t.borderWidths(\"borderBlockStartWidth\"),\n borderTopColor: t.colors(\"borderTopColor\"),\n borderBlockStartColor: t.colors(\"borderBlockStartColor\"),\n borderTopStyle: t.borderStyles(\"borderTopStyle\"),\n borderBlockStartStyle: t.borderStyles(\"borderBlockStartStyle\"),\n borderBottomWidth: t.borderWidths(\"borderBottomWidth\"),\n borderBlockEndWidth: t.borderWidths(\"borderBlockEndWidth\"),\n borderBottomColor: t.colors(\"borderBottomColor\"),\n borderBlockEndColor: t.colors(\"borderBlockEndColor\"),\n borderBottomStyle: t.borderStyles(\"borderBottomStyle\"),\n borderBlockEndStyle: t.borderStyles(\"borderBlockEndStyle\"),\n borderLeftWidth: t.borderWidths(\"borderLeftWidth\"),\n borderInlineStartWidth: t.borderWidths(\"borderInlineStartWidth\"),\n borderLeftColor: t.colors(\"borderLeftColor\"),\n borderInlineStartColor: t.colors(\"borderInlineStartColor\"),\n borderLeftStyle: t.borderStyles(\"borderLeftStyle\"),\n borderInlineStartStyle: t.borderStyles(\"borderInlineStartStyle\"),\n borderRightWidth: t.borderWidths(\"borderRightWidth\"),\n borderInlineEndWidth: t.borderWidths(\"borderInlineEndWidth\"),\n borderRightColor: t.colors(\"borderRightColor\"),\n borderInlineEndColor: t.colors(\"borderInlineEndColor\"),\n borderRightStyle: t.borderStyles(\"borderRightStyle\"),\n borderInlineEndStyle: t.borderStyles(\"borderInlineEndStyle\"),\n borderTopRadius: t.radii([\"borderTopLeftRadius\", \"borderTopRightRadius\"]),\n borderBottomRadius: t.radii([\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\"\n ]),\n borderLeftRadius: t.radii([\"borderTopLeftRadius\", \"borderBottomLeftRadius\"]),\n borderRightRadius: t.radii([\n \"borderTopRightRadius\",\n \"borderBottomRightRadius\"\n ])\n};\nObject.assign(border, {\n rounded: border.borderRadius,\n roundedTop: border.borderTopRadius,\n roundedTopLeft: border.borderTopLeftRadius,\n roundedTopRight: border.borderTopRightRadius,\n roundedTopStart: border.borderStartStartRadius,\n roundedTopEnd: border.borderStartEndRadius,\n roundedBottom: border.borderBottomRadius,\n roundedBottomLeft: border.borderBottomLeftRadius,\n roundedBottomRight: border.borderBottomRightRadius,\n roundedBottomStart: border.borderEndStartRadius,\n roundedBottomEnd: border.borderEndEndRadius,\n roundedLeft: border.borderLeftRadius,\n roundedRight: border.borderRightRadius,\n roundedStart: border.borderInlineStartRadius,\n roundedEnd: border.borderInlineEndRadius,\n borderStart: border.borderInlineStart,\n borderEnd: border.borderInlineEnd,\n borderTopStartRadius: border.borderStartStartRadius,\n borderTopEndRadius: border.borderStartEndRadius,\n borderBottomStartRadius: border.borderEndStartRadius,\n borderBottomEndRadius: border.borderEndEndRadius,\n borderStartRadius: border.borderInlineStartRadius,\n borderEndRadius: border.borderInlineEndRadius,\n borderStartWidth: border.borderInlineStartWidth,\n borderEndWidth: border.borderInlineEndWidth,\n borderStartColor: border.borderInlineStartColor,\n borderEndColor: border.borderInlineEndColor,\n borderStartStyle: border.borderInlineStartStyle,\n borderEndStyle: border.borderInlineEndStyle\n});\n\n// src/config/color.ts\nvar color = {\n color: t.colors(\"color\"),\n textColor: t.colors(\"color\"),\n fill: t.colors(\"fill\"),\n stroke: t.colors(\"stroke\")\n};\n\n// src/config/effect.ts\nvar effect = {\n boxShadow: t.shadows(\"boxShadow\"),\n mixBlendMode: true,\n blendMode: t.prop(\"mixBlendMode\"),\n backgroundBlendMode: true,\n bgBlendMode: t.prop(\"backgroundBlendMode\"),\n opacity: true\n};\nObject.assign(effect, {\n shadow: effect.boxShadow\n});\n\n// src/config/filter.ts\nvar filter = {\n filter: { transform: transformFunctions.filter },\n blur: t.blur(\"--chakra-blur\"),\n brightness: t.propT(\"--chakra-brightness\", transformFunctions.brightness),\n contrast: t.propT(\"--chakra-contrast\", transformFunctions.contrast),\n hueRotate: t.degreeT(\"--chakra-hue-rotate\"),\n invert: t.propT(\"--chakra-invert\", transformFunctions.invert),\n saturate: t.propT(\"--chakra-saturate\", transformFunctions.saturate),\n dropShadow: t.propT(\"--chakra-drop-shadow\", transformFunctions.dropShadow),\n backdropFilter: { transform: transformFunctions.backdropFilter },\n backdropBlur: t.blur(\"--chakra-backdrop-blur\"),\n backdropBrightness: t.propT(\n \"--chakra-backdrop-brightness\",\n transformFunctions.brightness\n ),\n backdropContrast: t.propT(\"--chakra-backdrop-contrast\", transformFunctions.contrast),\n backdropHueRotate: t.degreeT(\"--chakra-backdrop-hue-rotate\"),\n backdropInvert: t.propT(\"--chakra-backdrop-invert\", transformFunctions.invert),\n backdropSaturate: t.propT(\"--chakra-backdrop-saturate\", transformFunctions.saturate)\n};\n\n// src/config/flexbox.ts\nvar flexbox = {\n alignItems: true,\n alignContent: true,\n justifyItems: true,\n justifyContent: true,\n flexWrap: true,\n flexDirection: { transform: transformFunctions.flexDirection },\n flex: true,\n flexFlow: true,\n flexGrow: true,\n flexShrink: true,\n flexBasis: t.sizes(\"flexBasis\"),\n justifySelf: true,\n alignSelf: true,\n order: true,\n placeItems: true,\n placeContent: true,\n placeSelf: true,\n gap: t.space(\"gap\"),\n rowGap: t.space(\"rowGap\"),\n columnGap: t.space(\"columnGap\")\n};\nObject.assign(flexbox, {\n flexDir: flexbox.flexDirection\n});\n\n// src/config/grid.ts\nvar grid = {\n gridGap: t.space(\"gridGap\"),\n gridColumnGap: t.space(\"gridColumnGap\"),\n gridRowGap: t.space(\"gridRowGap\"),\n gridColumn: true,\n gridRow: true,\n gridAutoFlow: true,\n gridAutoColumns: true,\n gridColumnStart: true,\n gridColumnEnd: true,\n gridRowStart: true,\n gridRowEnd: true,\n gridAutoRows: true,\n gridTemplate: true,\n gridTemplateColumns: true,\n gridTemplateRows: true,\n gridTemplateAreas: true,\n gridArea: true\n};\n\n// src/config/interactivity.ts\nvar interactivity = {\n appearance: true,\n cursor: true,\n resize: true,\n userSelect: true,\n pointerEvents: true,\n outline: { transform: transformFunctions.outline },\n outlineOffset: true,\n outlineColor: t.colors(\"outlineColor\")\n};\n\n// src/config/layout.ts\nvar layout = {\n width: t.sizesT(\"width\"),\n inlineSize: t.sizesT(\"inlineSize\"),\n height: t.sizes(\"height\"),\n blockSize: t.sizes(\"blockSize\"),\n boxSize: t.sizes([\"width\", \"height\"]),\n minWidth: t.sizes(\"minWidth\"),\n minInlineSize: t.sizes(\"minInlineSize\"),\n minHeight: t.sizes(\"minHeight\"),\n minBlockSize: t.sizes(\"minBlockSize\"),\n maxWidth: t.sizes(\"maxWidth\"),\n maxInlineSize: t.sizes(\"maxInlineSize\"),\n maxHeight: t.sizes(\"maxHeight\"),\n maxBlockSize: t.sizes(\"maxBlockSize\"),\n overflow: true,\n overflowX: true,\n overflowY: true,\n overscrollBehavior: true,\n overscrollBehaviorX: true,\n overscrollBehaviorY: true,\n display: true,\n hideFrom: {\n scale: \"breakpoints\",\n transform: (value, theme) => {\n var _a, _b, _c;\n const breakpoint = (_c = (_b = (_a = theme.__breakpoints) == null ? void 0 : _a.get(value)) == null ? void 0 : _b.minW) != null ? _c : value;\n const mq = `@media screen and (min-width: ${breakpoint})`;\n return { [mq]: { display: \"none\" } };\n }\n },\n hideBelow: {\n scale: \"breakpoints\",\n transform: (value, theme) => {\n var _a, _b, _c;\n const breakpoint = (_c = (_b = (_a = theme.__breakpoints) == null ? void 0 : _a.get(value)) == null ? void 0 : _b._minW) != null ? _c : value;\n const mq = `@media screen and (max-width: ${breakpoint})`;\n return { [mq]: { display: \"none\" } };\n }\n },\n verticalAlign: true,\n boxSizing: true,\n boxDecorationBreak: true,\n float: t.propT(\"float\", transformFunctions.float),\n objectFit: true,\n objectPosition: true,\n visibility: true,\n isolation: true\n};\nObject.assign(layout, {\n w: layout.width,\n h: layout.height,\n minW: layout.minWidth,\n maxW: layout.maxWidth,\n minH: layout.minHeight,\n maxH: layout.maxHeight,\n overscroll: layout.overscrollBehavior,\n overscrollX: layout.overscrollBehaviorX,\n overscrollY: layout.overscrollBehaviorY\n});\n\n// src/config/list.ts\nvar list = {\n listStyleType: true,\n listStylePosition: true,\n listStylePos: t.prop(\"listStylePosition\"),\n listStyleImage: true,\n listStyleImg: t.prop(\"listStyleImage\")\n};\n\n// src/get.ts\nfunction get(obj, path, fallback, index) {\n const key = typeof path === \"string\" ? path.split(\".\") : [path];\n for (index = 0; index < key.length; index += 1) {\n if (!obj)\n break;\n obj = obj[key[index]];\n }\n return obj === void 0 ? fallback : obj;\n}\nvar memoize = (fn) => {\n const cache = /* @__PURE__ */ new WeakMap();\n const memoizedFn = (obj, path, fallback, index) => {\n if (typeof obj === \"undefined\") {\n return fn(obj, path, fallback);\n }\n if (!cache.has(obj)) {\n cache.set(obj, /* @__PURE__ */ new Map());\n }\n const map = cache.get(obj);\n if (map.has(path)) {\n return map.get(path);\n }\n const value = fn(obj, path, fallback, index);\n map.set(path, value);\n return value;\n };\n return memoizedFn;\n};\nvar memoizedGet = memoize(get);\n\n// src/config/others.ts\nvar srOnly = {\n border: \"0px\",\n clip: \"rect(0, 0, 0, 0)\",\n width: \"1px\",\n height: \"1px\",\n margin: \"-1px\",\n padding: \"0px\",\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n position: \"absolute\"\n};\nvar srFocusable = {\n position: \"static\",\n width: \"auto\",\n height: \"auto\",\n clip: \"auto\",\n padding: \"0\",\n margin: \"0\",\n overflow: \"visible\",\n whiteSpace: \"normal\"\n};\nvar getWithPriority = (theme, key, styles) => {\n const result = {};\n const obj = memoizedGet(theme, key, {});\n for (const prop in obj) {\n const isInStyles = prop in styles && styles[prop] != null;\n if (!isInStyles)\n result[prop] = obj[prop];\n }\n return result;\n};\nvar others = {\n srOnly: {\n transform(value) {\n if (value === true)\n return srOnly;\n if (value === \"focusable\")\n return srFocusable;\n return {};\n }\n },\n layerStyle: {\n processResult: true,\n transform: (value, theme, styles) => getWithPriority(theme, `layerStyles.${value}`, styles)\n },\n textStyle: {\n processResult: true,\n transform: (value, theme, styles) => getWithPriority(theme, `textStyles.${value}`, styles)\n },\n apply: {\n processResult: true,\n transform: (value, theme, styles) => getWithPriority(theme, value, styles)\n }\n};\n\n// src/config/position.ts\nvar position = {\n position: true,\n pos: t.prop(\"position\"),\n zIndex: t.prop(\"zIndex\", \"zIndices\"),\n inset: t.spaceT(\"inset\"),\n insetX: t.spaceT([\"left\", \"right\"]),\n insetInline: t.spaceT(\"insetInline\"),\n insetY: t.spaceT([\"top\", \"bottom\"]),\n insetBlock: t.spaceT(\"insetBlock\"),\n top: t.spaceT(\"top\"),\n insetBlockStart: t.spaceT(\"insetBlockStart\"),\n bottom: t.spaceT(\"bottom\"),\n insetBlockEnd: t.spaceT(\"insetBlockEnd\"),\n left: t.spaceT(\"left\"),\n insetInlineStart: t.logical({\n scale: \"space\",\n property: { ltr: \"left\", rtl: \"right\" }\n }),\n right: t.spaceT(\"right\"),\n insetInlineEnd: t.logical({\n scale: \"space\",\n property: { ltr: \"right\", rtl: \"left\" }\n })\n};\nObject.assign(position, {\n insetStart: position.insetInlineStart,\n insetEnd: position.insetInlineEnd\n});\n\n// src/config/ring.ts\nvar ring = {\n ring: { transform: transformFunctions.ring },\n ringColor: t.colors(\"--chakra-ring-color\"),\n ringOffset: t.prop(\"--chakra-ring-offset-width\"),\n ringOffsetColor: t.colors(\"--chakra-ring-offset-color\"),\n ringInset: t.prop(\"--chakra-ring-inset\")\n};\n\n// src/config/space.ts\nvar space = {\n margin: t.spaceT(\"margin\"),\n marginTop: t.spaceT(\"marginTop\"),\n marginBlockStart: t.spaceT(\"marginBlockStart\"),\n marginRight: t.spaceT(\"marginRight\"),\n marginInlineEnd: t.spaceT(\"marginInlineEnd\"),\n marginBottom: t.spaceT(\"marginBottom\"),\n marginBlockEnd: t.spaceT(\"marginBlockEnd\"),\n marginLeft: t.spaceT(\"marginLeft\"),\n marginInlineStart: t.spaceT(\"marginInlineStart\"),\n marginX: t.spaceT([\"marginInlineStart\", \"marginInlineEnd\"]),\n marginInline: t.spaceT(\"marginInline\"),\n marginY: t.spaceT([\"marginTop\", \"marginBottom\"]),\n marginBlock: t.spaceT(\"marginBlock\"),\n padding: t.space(\"padding\"),\n paddingTop: t.space(\"paddingTop\"),\n paddingBlockStart: t.space(\"paddingBlockStart\"),\n paddingRight: t.space(\"paddingRight\"),\n paddingBottom: t.space(\"paddingBottom\"),\n paddingBlockEnd: t.space(\"paddingBlockEnd\"),\n paddingLeft: t.space(\"paddingLeft\"),\n paddingInlineStart: t.space(\"paddingInlineStart\"),\n paddingInlineEnd: t.space(\"paddingInlineEnd\"),\n paddingX: t.space([\"paddingInlineStart\", \"paddingInlineEnd\"]),\n paddingInline: t.space(\"paddingInline\"),\n paddingY: t.space([\"paddingTop\", \"paddingBottom\"]),\n paddingBlock: t.space(\"paddingBlock\")\n};\nObject.assign(space, {\n m: space.margin,\n mt: space.marginTop,\n mr: space.marginRight,\n me: space.marginInlineEnd,\n marginEnd: space.marginInlineEnd,\n mb: space.marginBottom,\n ml: space.marginLeft,\n ms: space.marginInlineStart,\n marginStart: space.marginInlineStart,\n mx: space.marginX,\n my: space.marginY,\n p: space.padding,\n pt: space.paddingTop,\n py: space.paddingY,\n px: space.paddingX,\n pb: space.paddingBottom,\n pl: space.paddingLeft,\n ps: space.paddingInlineStart,\n paddingStart: space.paddingInlineStart,\n pr: space.paddingRight,\n pe: space.paddingInlineEnd,\n paddingEnd: space.paddingInlineEnd\n});\n\n// src/config/text-decoration.ts\nvar textDecoration = {\n textDecorationColor: t.colors(\"textDecorationColor\"),\n textDecoration: true,\n textDecor: { property: \"textDecoration\" },\n textDecorationLine: true,\n textDecorationStyle: true,\n textDecorationThickness: true,\n textUnderlineOffset: true,\n textShadow: t.shadows(\"textShadow\")\n};\n\n// src/config/transform.ts\nvar transform = {\n clipPath: true,\n transform: t.propT(\"transform\", transformFunctions.transform),\n transformOrigin: true,\n translateX: t.spaceT(\"--chakra-translate-x\"),\n translateY: t.spaceT(\"--chakra-translate-y\"),\n skewX: t.degreeT(\"--chakra-skew-x\"),\n skewY: t.degreeT(\"--chakra-skew-y\"),\n scaleX: t.prop(\"--chakra-scale-x\"),\n scaleY: t.prop(\"--chakra-scale-y\"),\n scale: t.prop([\"--chakra-scale-x\", \"--chakra-scale-y\"]),\n rotate: t.degreeT(\"--chakra-rotate\")\n};\n\n// src/config/transition.ts\nvar transition = {\n transition: true,\n transitionDelay: true,\n animation: true,\n willChange: true,\n transitionDuration: t.prop(\"transitionDuration\", \"transition.duration\"),\n transitionProperty: t.prop(\"transitionProperty\", \"transition.property\"),\n transitionTimingFunction: t.prop(\n \"transitionTimingFunction\",\n \"transition.easing\"\n )\n};\n\n// src/config/typography.ts\nvar typography = {\n fontFamily: t.prop(\"fontFamily\", \"fonts\"),\n fontSize: t.prop(\"fontSize\", \"fontSizes\", transformFunctions.px),\n fontWeight: t.prop(\"fontWeight\", \"fontWeights\"),\n lineHeight: t.prop(\"lineHeight\", \"lineHeights\"),\n letterSpacing: t.prop(\"letterSpacing\", \"letterSpacings\"),\n textAlign: true,\n fontStyle: true,\n textIndent: true,\n wordBreak: true,\n overflowWrap: true,\n textOverflow: true,\n textTransform: true,\n whiteSpace: true,\n isTruncated: {\n transform(value) {\n if (value === true) {\n return {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\"\n };\n }\n }\n },\n noOfLines: {\n static: {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n display: \"-webkit-box\",\n WebkitBoxOrient: \"vertical\",\n WebkitLineClamp: \"var(--chakra-line-clamp)\"\n },\n property: \"--chakra-line-clamp\"\n }\n};\n\n// src/config/scroll.ts\nvar scroll = {\n scrollBehavior: true,\n scrollSnapAlign: true,\n scrollSnapStop: true,\n scrollSnapType: true,\n scrollMargin: t.spaceT(\"scrollMargin\"),\n scrollMarginTop: t.spaceT(\"scrollMarginTop\"),\n scrollMarginBottom: t.spaceT(\"scrollMarginBottom\"),\n scrollMarginLeft: t.spaceT(\"scrollMarginLeft\"),\n scrollMarginRight: t.spaceT(\"scrollMarginRight\"),\n scrollMarginX: t.spaceT([\"scrollMarginLeft\", \"scrollMarginRight\"]),\n scrollMarginY: t.spaceT([\"scrollMarginTop\", \"scrollMarginBottom\"]),\n scrollPadding: t.spaceT(\"scrollPadding\"),\n scrollPaddingTop: t.spaceT(\"scrollPaddingTop\"),\n scrollPaddingBottom: t.spaceT(\"scrollPaddingBottom\"),\n scrollPaddingLeft: t.spaceT(\"scrollPaddingLeft\"),\n scrollPaddingRight: t.spaceT(\"scrollPaddingRight\"),\n scrollPaddingX: t.spaceT([\"scrollPaddingLeft\", \"scrollPaddingRight\"]),\n scrollPaddingY: t.spaceT([\"scrollPaddingTop\", \"scrollPaddingBottom\"])\n};\n\n// src/create-theme-vars/calc.ts\nimport { isObject as isObject2 } from \"@chakra-ui/shared-utils\";\nfunction resolveReference(operand) {\n if (isObject2(operand) && operand.reference) {\n return operand.reference;\n }\n return String(operand);\n}\nvar toExpression = (operator, ...operands) => operands.map(resolveReference).join(` ${operator} `).replace(/calc/g, \"\");\nvar add = (...operands) => `calc(${toExpression(\"+\", ...operands)})`;\nvar subtract = (...operands) => `calc(${toExpression(\"-\", ...operands)})`;\nvar multiply = (...operands) => `calc(${toExpression(\"*\", ...operands)})`;\nvar divide = (...operands) => `calc(${toExpression(\"/\", ...operands)})`;\nvar negate = (x) => {\n const value = resolveReference(x);\n if (value != null && !Number.isNaN(parseFloat(value))) {\n return String(value).startsWith(\"-\") ? String(value).slice(1) : `-${value}`;\n }\n return multiply(value, -1);\n};\nvar calc = Object.assign(\n (x) => ({\n add: (...operands) => calc(add(x, ...operands)),\n subtract: (...operands) => calc(subtract(x, ...operands)),\n multiply: (...operands) => calc(multiply(x, ...operands)),\n divide: (...operands) => calc(divide(x, ...operands)),\n negate: () => calc(negate(x)),\n toString: () => x.toString()\n }),\n {\n add,\n subtract,\n multiply,\n divide,\n negate\n }\n);\n\n// src/create-theme-vars/css-var.ts\nfunction replaceWhiteSpace(value, replaceValue = \"-\") {\n return value.replace(/\\s+/g, replaceValue);\n}\nfunction escape(value) {\n const valueStr = replaceWhiteSpace(value.toString());\n return escapeSymbol(escapeDot(valueStr));\n}\nfunction escapeDot(value) {\n if (value.includes(\"\\\\.\"))\n return value;\n const isDecimal = !Number.isInteger(parseFloat(value.toString()));\n return isDecimal ? value.replace(\".\", `\\\\.`) : value;\n}\nfunction escapeSymbol(value) {\n return value.replace(/[!-,/:-@[-^`{-~]/g, \"\\\\$&\");\n}\nfunction addPrefix(value, prefix = \"\") {\n return [prefix, value].filter(Boolean).join(\"-\");\n}\nfunction toVarReference(name, fallback) {\n return `var(${name}${fallback ? `, ${fallback}` : \"\"})`;\n}\nfunction toVarDefinition(value, prefix = \"\") {\n return escape(`--${addPrefix(value, prefix)}`);\n}\nfunction cssVar(name, fallback, cssVarPrefix) {\n const cssVariable = toVarDefinition(name, cssVarPrefix);\n return {\n variable: cssVariable,\n reference: toVarReference(cssVariable, fallback)\n };\n}\nfunction defineCssVars(scope, keys2) {\n const vars = {};\n for (const key of keys2) {\n if (Array.isArray(key)) {\n const [name, fallback] = key;\n vars[name] = cssVar(`${scope}-${name}`, fallback);\n continue;\n }\n vars[key] = cssVar(`${scope}-${key}`);\n }\n return vars;\n}\n\n// ../../utilities/breakpoint-utils/src/breakpoint.ts\nimport { isObject as isObject3 } from \"@chakra-ui/shared-utils\";\nfunction getLastItem(array) {\n const length = array == null ? 0 : array.length;\n return length ? array[length - 1] : void 0;\n}\nfunction analyzeCSSValue2(value) {\n const num = parseFloat(value.toString());\n const unit = value.toString().replace(String(num), \"\");\n return { unitless: !unit, value: num, unit };\n}\nfunction px(value) {\n if (value == null)\n return value;\n const { unitless } = analyzeCSSValue2(value);\n return unitless || typeof value === \"number\" ? `${value}px` : value;\n}\nvar sortByBreakpointValue = (a, b) => parseInt(a[1], 10) > parseInt(b[1], 10) ? 1 : -1;\nvar sortBps = (breakpoints) => Object.fromEntries(Object.entries(breakpoints).sort(sortByBreakpointValue));\nfunction normalize(breakpoints) {\n const sorted = sortBps(breakpoints);\n return Object.assign(Object.values(sorted), sorted);\n}\nfunction keys(breakpoints) {\n const value = Object.keys(sortBps(breakpoints));\n return new Set(value);\n}\nfunction subtract2(value) {\n var _a;\n if (!value)\n return value;\n value = (_a = px(value)) != null ? _a : value;\n const OFFSET = -0.02;\n return typeof value === \"number\" ? `${value + OFFSET}` : value.replace(/(\\d+\\.?\\d*)/u, (m) => `${parseFloat(m) + OFFSET}`);\n}\nfunction toMediaQueryString(min, max) {\n const query = [\"@media screen\"];\n if (min)\n query.push(\"and\", `(min-width: ${px(min)})`);\n if (max)\n query.push(\"and\", `(max-width: ${px(max)})`);\n return query.join(\" \");\n}\nfunction analyzeBreakpoints(breakpoints) {\n var _a;\n if (!breakpoints)\n return null;\n breakpoints.base = (_a = breakpoints.base) != null ? _a : \"0px\";\n const normalized = normalize(breakpoints);\n const queries = Object.entries(breakpoints).sort(sortByBreakpointValue).map(([breakpoint, minW], index, entry) => {\n var _a2;\n let [, maxW] = (_a2 = entry[index + 1]) != null ? _a2 : [];\n maxW = parseFloat(maxW) > 0 ? subtract2(maxW) : void 0;\n return {\n _minW: subtract2(minW),\n breakpoint,\n minW,\n maxW,\n maxWQuery: toMediaQueryString(null, maxW),\n minWQuery: toMediaQueryString(minW),\n minMaxQuery: toMediaQueryString(minW, maxW)\n };\n });\n const _keys = keys(breakpoints);\n const _keysArr = Array.from(_keys.values());\n return {\n keys: _keys,\n normalized,\n isResponsive(test) {\n const keys2 = Object.keys(test);\n return keys2.length > 0 && keys2.every((key) => _keys.has(key));\n },\n asObject: sortBps(breakpoints),\n asArray: normalize(breakpoints),\n details: queries,\n get(key) {\n return queries.find((q) => q.breakpoint === key);\n },\n media: [\n null,\n ...normalized.map((minW) => toMediaQueryString(minW)).slice(1)\n ],\n toArrayValue(test) {\n if (!isObject3(test)) {\n throw new Error(\"toArrayValue: value must be an object\");\n }\n const result = _keysArr.map((bp) => {\n var _a2;\n return (_a2 = test[bp]) != null ? _a2 : null;\n });\n while (getLastItem(result) === null) {\n result.pop();\n }\n return result;\n },\n toObjectValue(test) {\n if (!Array.isArray(test)) {\n throw new Error(\"toObjectValue: value must be an array\");\n }\n return test.reduce((acc, value, index) => {\n const key = _keysArr[index];\n if (key != null && value != null)\n acc[key] = value;\n return acc;\n }, {});\n }\n };\n}\n\n// src/create-theme-vars/create-theme-vars.ts\nimport { isObject as isObject4 } from \"@chakra-ui/shared-utils\";\n\n// src/pseudos.ts\nvar state = {\n hover: (str, post) => `${str}:hover ${post}, ${str}[data-hover] ${post}`,\n focus: (str, post) => `${str}:focus ${post}, ${str}[data-focus] ${post}`,\n focusVisible: (str, post) => `${str}:focus-visible ${post}`,\n focusWithin: (str, post) => `${str}:focus-within ${post}`,\n active: (str, post) => `${str}:active ${post}, ${str}[data-active] ${post}`,\n disabled: (str, post) => `${str}:disabled ${post}, ${str}[data-disabled] ${post}`,\n invalid: (str, post) => `${str}:invalid ${post}, ${str}[data-invalid] ${post}`,\n checked: (str, post) => `${str}:checked ${post}, ${str}[data-checked] ${post}`,\n indeterminate: (str, post) => `${str}:indeterminate ${post}, ${str}[aria-checked=mixed] ${post}, ${str}[data-indeterminate] ${post}`,\n readOnly: (str, post) => `${str}:read-only ${post}, ${str}[readonly] ${post}, ${str}[data-read-only] ${post}`,\n expanded: (str, post) => `${str}:read-only ${post}, ${str}[aria-expanded=true] ${post}, ${str}[data-expanded] ${post}`,\n placeholderShown: (str, post) => `${str}:placeholder-shown ${post}`\n};\nvar toGroup = (fn) => merge((v) => fn(v, \"&\"), \"[role=group]\", \"[data-group]\", \".group\");\nvar toPeer = (fn) => merge((v) => fn(v, \"~ &\"), \"[data-peer]\", \".peer\");\nvar merge = (fn, ...selectors) => selectors.map(fn).join(\", \");\nvar pseudoSelectors = {\n _hover: \"&:hover, &[data-hover]\",\n _active: \"&:active, &[data-active]\",\n _focus: \"&:focus, &[data-focus]\",\n _highlighted: \"&[data-highlighted]\",\n _focusWithin: \"&:focus-within\",\n _focusVisible: \"&:focus-visible, &[data-focus-visible]\",\n _disabled: \"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]\",\n _readOnly: \"&[aria-readonly=true], &[readonly], &[data-readonly]\",\n _before: \"&::before\",\n _after: \"&::after\",\n _empty: \"&:empty\",\n _expanded: \"&[aria-expanded=true], &[data-expanded]\",\n _checked: \"&[aria-checked=true], &[data-checked]\",\n _grabbed: \"&[aria-grabbed=true], &[data-grabbed]\",\n _pressed: \"&[aria-pressed=true], &[data-pressed]\",\n _invalid: \"&[aria-invalid=true], &[data-invalid]\",\n _valid: \"&[data-valid], &[data-state=valid]\",\n _loading: \"&[data-loading], &[aria-busy=true]\",\n _selected: \"&[aria-selected=true], &[data-selected]\",\n _hidden: \"&[hidden], &[data-hidden]\",\n _autofill: \"&:-webkit-autofill\",\n _even: \"&:nth-of-type(even)\",\n _odd: \"&:nth-of-type(odd)\",\n _first: \"&:first-of-type\",\n _firstLetter: \"&::first-letter\",\n _last: \"&:last-of-type\",\n _notFirst: \"&:not(:first-of-type)\",\n _notLast: \"&:not(:last-of-type)\",\n _visited: \"&:visited\",\n _activeLink: \"&[aria-current=page]\",\n _activeStep: \"&[aria-current=step]\",\n _indeterminate: \"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]\",\n _groupHover: toGroup(state.hover),\n _peerHover: toPeer(state.hover),\n _groupFocus: toGroup(state.focus),\n _peerFocus: toPeer(state.focus),\n _groupFocusVisible: toGroup(state.focusVisible),\n _peerFocusVisible: toPeer(state.focusVisible),\n _groupActive: toGroup(state.active),\n _peerActive: toPeer(state.active),\n _groupDisabled: toGroup(state.disabled),\n _peerDisabled: toPeer(state.disabled),\n _groupInvalid: toGroup(state.invalid),\n _peerInvalid: toPeer(state.invalid),\n _groupChecked: toGroup(state.checked),\n _peerChecked: toPeer(state.checked),\n _groupFocusWithin: toGroup(state.focusWithin),\n _peerFocusWithin: toPeer(state.focusWithin),\n _peerPlaceholderShown: toPeer(state.placeholderShown),\n _placeholder: \"&::placeholder\",\n _placeholderShown: \"&:placeholder-shown\",\n _fullScreen: \"&:fullscreen\",\n _selection: \"&::selection\",\n _rtl: \"[dir=rtl] &, &[dir=rtl]\",\n _ltr: \"[dir=ltr] &, &[dir=ltr]\",\n _mediaDark: \"@media (prefers-color-scheme: dark)\",\n _mediaReduceMotion: \"@media (prefers-reduced-motion: reduce)\",\n _dark: \".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]\",\n _light: \".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]\"\n};\nvar pseudoPropNames = Object.keys(\n pseudoSelectors\n);\n\n// src/create-theme-vars/create-theme-vars.ts\nimport mergeWith from \"lodash.mergewith\";\nfunction tokenToCssVar(token, prefix) {\n return cssVar(String(token).replace(/\\./g, \"-\"), void 0, prefix);\n}\nfunction createThemeVars(flatTokens, options) {\n let cssVars = {};\n const cssMap = {};\n for (const [token, tokenValue] of Object.entries(flatTokens)) {\n const { isSemantic, value } = tokenValue;\n const { variable, reference } = tokenToCssVar(token, options == null ? void 0 : options.cssVarPrefix);\n if (!isSemantic) {\n if (token.startsWith(\"space\")) {\n const keys2 = token.split(\".\");\n const [firstKey, ...referenceKeys] = keys2;\n const negativeLookupKey = `${firstKey}.-${referenceKeys.join(\".\")}`;\n const negativeValue = calc.negate(value);\n const negatedReference = calc.negate(reference);\n cssMap[negativeLookupKey] = {\n value: negativeValue,\n var: variable,\n varRef: negatedReference\n };\n }\n cssVars[variable] = value;\n cssMap[token] = {\n value,\n var: variable,\n varRef: reference\n };\n continue;\n }\n const lookupToken = (maybeToken) => {\n const scale = String(token).split(\".\")[0];\n const withScale = [scale, maybeToken].join(\".\");\n const resolvedTokenValue = flatTokens[withScale];\n if (!resolvedTokenValue)\n return maybeToken;\n const { reference: reference2 } = tokenToCssVar(withScale, options == null ? void 0 : options.cssVarPrefix);\n return reference2;\n };\n const normalizedValue = isObject4(value) ? value : { default: value };\n cssVars = mergeWith(\n cssVars,\n Object.entries(normalizedValue).reduce(\n (acc, [conditionAlias, conditionValue]) => {\n var _a, _b;\n const maybeReference = lookupToken(conditionValue.toString());\n if (conditionAlias === \"default\") {\n acc[variable] = maybeReference;\n return acc;\n }\n const conditionSelector = (_b = (_a = pseudoSelectors) == null ? void 0 : _a[conditionAlias]) != null ? _b : conditionAlias;\n acc[conditionSelector] = { [variable]: maybeReference };\n return acc;\n },\n {}\n )\n );\n cssMap[token] = {\n value: reference,\n var: variable,\n varRef: reference\n };\n }\n return {\n cssVars,\n cssMap\n };\n}\n\n// ../../utilities/object-utils/src/index.ts\nfunction omit(object, keysToOmit = []) {\n const clone = Object.assign({}, object);\n for (const key of keysToOmit) {\n if (key in clone) {\n delete clone[key];\n }\n }\n return clone;\n}\nfunction pick(object, keysToPick) {\n const result = {};\n for (const key of keysToPick) {\n if (key in object) {\n result[key] = object[key];\n }\n }\n return result;\n}\n\n// src/create-theme-vars/theme-tokens.ts\nvar tokens = [\n \"colors\",\n \"borders\",\n \"borderWidths\",\n \"borderStyles\",\n \"fonts\",\n \"fontSizes\",\n \"fontWeights\",\n \"gradients\",\n \"letterSpacings\",\n \"lineHeights\",\n \"radii\",\n \"space\",\n \"shadows\",\n \"sizes\",\n \"zIndices\",\n \"transition\",\n \"blur\",\n \"breakpoints\"\n];\nfunction extractTokens(theme) {\n const _tokens = tokens;\n return pick(theme, _tokens);\n}\nfunction extractSemanticTokens(theme) {\n return theme.semanticTokens;\n}\nfunction omitVars(rawTheme) {\n const { __cssMap, __cssVars, __breakpoints, ...cleanTheme } = rawTheme;\n return cleanTheme;\n}\n\n// src/create-theme-vars/flatten-tokens.ts\nimport { isObject as isObject5 } from \"@chakra-ui/shared-utils\";\nfunction flattenTokens({\n tokens: tokens2,\n semanticTokens\n}) {\n var _a, _b;\n const tokenEntries = Object.entries((_a = flatten(tokens2)) != null ? _a : {}).map(\n ([token, value]) => {\n const enhancedToken = { isSemantic: false, value };\n return [token, enhancedToken];\n }\n );\n const semanticTokenEntries = Object.entries(\n (_b = flatten(semanticTokens, 1)) != null ? _b : {}\n ).map(([token, value]) => {\n const enhancedToken = { isSemantic: true, value };\n return [token, enhancedToken];\n });\n return Object.fromEntries([\n ...tokenEntries,\n ...semanticTokenEntries\n ]);\n}\nfunction flatten(target, maxDepth = Infinity) {\n if (!isObject5(target) && !Array.isArray(target) || !maxDepth) {\n return target;\n }\n return Object.entries(target).reduce((result, [key, value]) => {\n if (isObject5(value) || Array.isArray(value)) {\n Object.entries(flatten(value, maxDepth - 1)).forEach(\n ([childKey, childValue]) => {\n result[`${key}.${childKey}`] = childValue;\n }\n );\n } else {\n result[key] = value;\n }\n return result;\n }, {});\n}\n\n// src/create-theme-vars/to-css-var.ts\nfunction toCSSVar(rawTheme) {\n var _a;\n const theme = omitVars(rawTheme);\n const tokens2 = extractTokens(theme);\n const semanticTokens = extractSemanticTokens(theme);\n const flatTokens = flattenTokens({ tokens: tokens2, semanticTokens });\n const cssVarPrefix = (_a = theme.config) == null ? void 0 : _a.cssVarPrefix;\n const {\n cssMap,\n cssVars\n } = createThemeVars(flatTokens, { cssVarPrefix });\n const defaultCssVars = {\n \"--chakra-ring-inset\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-ring-offset-width\": \"0px\",\n \"--chakra-ring-offset-color\": \"#fff\",\n \"--chakra-ring-color\": \"rgba(66, 153, 225, 0.6)\",\n \"--chakra-ring-offset-shadow\": \"0 0 #0000\",\n \"--chakra-ring-shadow\": \"0 0 #0000\",\n \"--chakra-space-x-reverse\": \"0\",\n \"--chakra-space-y-reverse\": \"0\"\n };\n Object.assign(theme, {\n __cssVars: { ...defaultCssVars, ...cssVars },\n __cssMap: cssMap,\n __breakpoints: analyzeBreakpoints(theme.breakpoints)\n });\n return theme;\n}\n\n// src/css.ts\nimport { isObject as isObject7, runIfFn as runIfFn2 } from \"@chakra-ui/shared-utils\";\nimport mergeWith3 from \"lodash.mergewith\";\n\n// src/system.ts\nimport mergeWith2 from \"lodash.mergewith\";\nvar systemProps = mergeWith2(\n {},\n background,\n border,\n color,\n flexbox,\n layout,\n filter,\n ring,\n interactivity,\n grid,\n others,\n position,\n effect,\n space,\n scroll,\n typography,\n textDecoration,\n transform,\n list,\n transition\n);\nvar layoutSystem = Object.assign({}, space, layout, flexbox, grid, position);\nvar layoutPropNames = Object.keys(\n layoutSystem\n);\nvar propNames = [...Object.keys(systemProps), ...pseudoPropNames];\nvar styleProps = { ...systemProps, ...pseudoSelectors };\nvar isStyleProp = (prop) => prop in styleProps;\n\n// src/utils/expand-responsive.ts\nimport { isObject as isObject6, runIfFn } from \"@chakra-ui/shared-utils\";\nvar expandResponsive = (styles) => (theme) => {\n if (!theme.__breakpoints)\n return styles;\n const { isResponsive, toArrayValue, media: medias } = theme.__breakpoints;\n const computedStyles = {};\n for (const key in styles) {\n let value = runIfFn(styles[key], theme);\n if (value == null)\n continue;\n value = isObject6(value) && isResponsive(value) ? toArrayValue(value) : value;\n if (!Array.isArray(value)) {\n computedStyles[key] = value;\n continue;\n }\n const queries = value.slice(0, medias.length).length;\n for (let index = 0; index < queries; index += 1) {\n const media = medias == null ? void 0 : medias[index];\n if (!media) {\n computedStyles[key] = value[index];\n continue;\n }\n computedStyles[media] = computedStyles[media] || {};\n if (value[index] == null) {\n continue;\n }\n computedStyles[media][key] = value[index];\n }\n }\n return computedStyles;\n};\n\n// src/utils/split-by-comma.ts\nfunction splitByComma(value) {\n const chunks = [];\n let chunk = \"\";\n let inParens = false;\n for (let i = 0; i < value.length; i++) {\n const char = value[i];\n if (char === \"(\") {\n inParens = true;\n chunk += char;\n } else if (char === \")\") {\n inParens = false;\n chunk += char;\n } else if (char === \",\" && !inParens) {\n chunks.push(chunk);\n chunk = \"\";\n } else {\n chunk += char;\n }\n }\n chunk = chunk.trim();\n if (chunk) {\n chunks.push(chunk);\n }\n return chunks;\n}\n\n// src/css.ts\nfunction isCssVar2(value) {\n return /^var\\(--.+\\)$/.test(value);\n}\nvar isCSSVariableTokenValue = (key, value) => key.startsWith(\"--\") && typeof value === \"string\" && !isCssVar2(value);\nvar resolveTokenValue = (theme, value) => {\n var _a, _b;\n if (value == null)\n return value;\n const getVar = (val) => {\n var _a2, _b2;\n return (_b2 = (_a2 = theme.__cssMap) == null ? void 0 : _a2[val]) == null ? void 0 : _b2.varRef;\n };\n const getValue = (val) => {\n var _a2;\n return (_a2 = getVar(val)) != null ? _a2 : val;\n };\n const [tokenValue, fallbackValue] = splitByComma(value);\n value = (_b = (_a = getVar(tokenValue)) != null ? _a : getValue(fallbackValue)) != null ? _b : getValue(value);\n return value;\n};\nfunction getCss(options) {\n const { configs = {}, pseudos = {}, theme } = options;\n const css2 = (stylesOrFn, nested = false) => {\n var _a, _b, _c;\n const _styles = runIfFn2(stylesOrFn, theme);\n const styles = expandResponsive(_styles)(theme);\n let computedStyles = {};\n for (let key in styles) {\n const valueOrFn = styles[key];\n let value = runIfFn2(valueOrFn, theme);\n if (key in pseudos) {\n key = pseudos[key];\n }\n if (isCSSVariableTokenValue(key, value)) {\n value = resolveTokenValue(theme, value);\n }\n let config = configs[key];\n if (config === true) {\n config = { property: key };\n }\n if (isObject7(value)) {\n computedStyles[key] = (_a = computedStyles[key]) != null ? _a : {};\n computedStyles[key] = mergeWith3(\n {},\n computedStyles[key],\n css2(value, true)\n );\n continue;\n }\n let rawValue = (_c = (_b = config == null ? void 0 : config.transform) == null ? void 0 : _b.call(config, value, theme, _styles)) != null ? _c : value;\n rawValue = (config == null ? void 0 : config.processResult) ? css2(rawValue, true) : rawValue;\n const configProperty = runIfFn2(config == null ? void 0 : config.property, theme);\n if (!nested && (config == null ? void 0 : config.static)) {\n const staticStyles = runIfFn2(config.static, theme);\n computedStyles = mergeWith3({}, computedStyles, staticStyles);\n }\n if (configProperty && Array.isArray(configProperty)) {\n for (const property of configProperty) {\n computedStyles[property] = rawValue;\n }\n continue;\n }\n if (configProperty) {\n if (configProperty === \"&\" && isObject7(rawValue)) {\n computedStyles = mergeWith3({}, computedStyles, rawValue);\n } else {\n computedStyles[configProperty] = rawValue;\n }\n continue;\n }\n if (isObject7(rawValue)) {\n computedStyles = mergeWith3({}, computedStyles, rawValue);\n continue;\n }\n computedStyles[key] = rawValue;\n }\n return computedStyles;\n };\n return css2;\n}\nvar css = (styles) => (theme) => {\n const cssFn = getCss({\n theme,\n pseudos: pseudoSelectors,\n configs: systemProps\n });\n return cssFn(styles);\n};\n\n// src/define-styles.ts\nfunction defineStyle(styles) {\n return styles;\n}\nfunction defineStyleConfig(config) {\n return config;\n}\nfunction createMultiStyleConfigHelpers(parts) {\n return {\n definePartsStyle(config) {\n return config;\n },\n defineMultiStyleConfig(config) {\n return { parts, ...config };\n }\n };\n}\n\n// src/style-config.ts\nimport { runIfFn as runIfFn3, isObject as isObject8 } from \"@chakra-ui/shared-utils\";\nimport mergeWith4 from \"lodash.mergewith\";\nfunction normalize2(value, toArray) {\n if (Array.isArray(value))\n return value;\n if (isObject8(value))\n return toArray(value);\n if (value != null)\n return [value];\n}\nfunction getNextIndex(values, i) {\n for (let j = i + 1; j < values.length; j++) {\n if (values[j] != null)\n return j;\n }\n return -1;\n}\nfunction createResolver(theme) {\n const breakpointUtil = theme.__breakpoints;\n return function resolver(config, prop, value, props) {\n var _a, _b;\n if (!breakpointUtil)\n return;\n const result = {};\n const normalized = normalize2(value, breakpointUtil.toArrayValue);\n if (!normalized)\n return result;\n const len = normalized.length;\n const isSingle = len === 1;\n const isMultipart = !!config.parts;\n for (let i = 0; i < len; i++) {\n const key = breakpointUtil.details[i];\n const nextKey = breakpointUtil.details[getNextIndex(normalized, i)];\n const query = toMediaQueryString(key.minW, nextKey == null ? void 0 : nextKey._minW);\n const styles = runIfFn3((_a = config[prop]) == null ? void 0 : _a[normalized[i]], props);\n if (!styles)\n continue;\n if (isMultipart) {\n (_b = config.parts) == null ? void 0 : _b.forEach((part) => {\n mergeWith4(result, {\n [part]: isSingle ? styles[part] : { [query]: styles[part] }\n });\n });\n continue;\n }\n if (!isMultipart) {\n if (isSingle)\n mergeWith4(result, styles);\n else\n result[query] = styles;\n continue;\n }\n result[query] = styles;\n }\n return result;\n };\n}\nfunction resolveStyleConfig(config) {\n return (props) => {\n var _a;\n const { variant, size, theme } = props;\n const recipe = createResolver(theme);\n return mergeWith4(\n {},\n runIfFn3((_a = config.baseStyle) != null ? _a : {}, props),\n recipe(config, \"sizes\", size, props),\n recipe(config, \"variants\", variant, props)\n );\n };\n}\n\n// src/get-css-var.ts\nfunction getCSSVar(theme, scale, value) {\n var _a, _b, _c;\n return (_c = (_b = (_a = theme.__cssMap) == null ? void 0 : _a[`${scale}.${value}`]) == null ? void 0 : _b.varRef) != null ? _c : value;\n}\n\n// src/theming-props.ts\nfunction omitThemingProps(props) {\n return omit(props, [\"styleConfig\", \"size\", \"variant\", \"colorScheme\"]);\n}\nexport {\n addPrefix,\n background,\n border,\n calc,\n color,\n createMultiStyleConfigHelpers,\n css,\n cssVar,\n defineCssVars,\n defineStyle,\n defineStyleConfig,\n effect,\n filter,\n flatten,\n flattenTokens,\n flexbox,\n getCSSVar,\n getCss,\n grid,\n interactivity,\n isStyleProp,\n layout,\n layoutPropNames,\n list,\n omitThemingProps,\n others,\n position,\n propNames,\n pseudoPropNames,\n pseudoSelectors,\n resolveStyleConfig,\n ring,\n scroll,\n space,\n systemProps,\n textDecoration,\n toCSSVar,\n toVarDefinition,\n toVarReference,\n tokenToCSSVar,\n transform,\n transition,\n typography\n};\n","// src/components/stepper.ts\nimport { createMultiStyleConfigHelpers, cssVar } from \"@chakra-ui/styled-system\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers([\n \"stepper\",\n \"step\",\n \"title\",\n \"description\",\n \"indicator\",\n \"separator\",\n \"icon\",\n \"number\"\n]);\nvar $size = cssVar(\"stepper-indicator-size\");\nvar $iconSize = cssVar(\"stepper-icon-size\");\nvar $titleFontSize = cssVar(\"stepper-title-font-size\");\nvar $descFontSize = cssVar(\"stepper-description-font-size\");\nvar $accentColor = cssVar(\"stepper-accent-color\");\nvar baseStyle = definePartsStyle(({ colorScheme: c }) => ({\n stepper: {\n display: \"flex\",\n justifyContent: \"space-between\",\n gap: \"4\",\n \"&[data-orientation=vertical]\": {\n flexDirection: \"column\",\n alignItems: \"flex-start\"\n },\n \"&[data-orientation=horizontal]\": {\n flexDirection: \"row\",\n alignItems: \"center\"\n },\n [$accentColor.variable]: `colors.${c}.500`,\n _dark: {\n [$accentColor.variable]: `colors.${c}.200`\n }\n },\n title: {\n fontSize: $titleFontSize.reference,\n fontWeight: \"medium\"\n },\n description: {\n fontSize: $descFontSize.reference,\n color: \"chakra-subtle-text\"\n },\n number: {\n fontSize: $titleFontSize.reference\n },\n step: {\n flexShrink: 0,\n position: \"relative\",\n display: \"flex\",\n gap: \"2\",\n \"&[data-orientation=horizontal]\": {\n alignItems: \"center\"\n },\n \"&:not(:last-of-type)\": {\n flex: \"1\"\n }\n },\n icon: {\n flexShrink: 0,\n width: $iconSize.reference,\n height: $iconSize.reference\n },\n indicator: {\n flexShrink: 0,\n borderRadius: \"full\",\n width: $size.reference,\n height: $size.reference,\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n \"&[data-status=active]\": {\n borderWidth: \"2px\",\n borderColor: $accentColor.reference\n },\n \"&[data-status=complete]\": {\n bg: $accentColor.reference,\n color: \"chakra-inverse-text\"\n },\n \"&[data-status=incomplete]\": {\n borderWidth: \"2px\"\n }\n },\n separator: {\n bg: \"chakra-border-color\",\n flex: \"1\",\n \"&[data-status=complete]\": {\n bg: $accentColor.reference\n },\n \"&[data-orientation=horizontal]\": {\n width: \"100%\",\n height: \"2px\",\n marginStart: \"2\"\n },\n \"&[data-orientation=vertical]\": {\n width: \"2px\",\n position: \"absolute\",\n height: \"100%\",\n maxHeight: `calc(100% - ${$size.reference} - 8px)`,\n top: `calc(${$size.reference} + 4px)`,\n insetStart: `calc(${$size.reference} / 2 - 1px)`\n }\n }\n}));\nvar stepperTheme = defineMultiStyleConfig({\n baseStyle,\n sizes: {\n xs: definePartsStyle({\n stepper: {\n [$size.variable]: \"sizes.4\",\n [$iconSize.variable]: \"sizes.3\",\n [$titleFontSize.variable]: \"fontSizes.xs\",\n [$descFontSize.variable]: \"fontSizes.xs\"\n }\n }),\n sm: definePartsStyle({\n stepper: {\n [$size.variable]: \"sizes.6\",\n [$iconSize.variable]: \"sizes.4\",\n [$titleFontSize.variable]: \"fontSizes.sm\",\n [$descFontSize.variable]: \"fontSizes.xs\"\n }\n }),\n md: definePartsStyle({\n stepper: {\n [$size.variable]: \"sizes.8\",\n [$iconSize.variable]: \"sizes.5\",\n [$titleFontSize.variable]: \"fontSizes.md\",\n [$descFontSize.variable]: \"fontSizes.sm\"\n }\n }),\n lg: definePartsStyle({\n stepper: {\n [$size.variable]: \"sizes.10\",\n [$iconSize.variable]: \"sizes.6\",\n [$titleFontSize.variable]: \"fontSizes.lg\",\n [$descFontSize.variable]: \"fontSizes.md\"\n }\n })\n },\n defaultProps: {\n size: \"md\",\n colorScheme: \"blue\"\n }\n});\n\nexport {\n stepperTheme\n};\n","// src/anatomy.ts\nfunction anatomy(name, map = {}) {\n let called = false;\n function assert() {\n if (!called) {\n called = true;\n return;\n }\n throw new Error(\n \"[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?\"\n );\n }\n function parts(...values) {\n assert();\n for (const part of values) {\n ;\n map[part] = toPart(part);\n }\n return anatomy(name, map);\n }\n function extend(...parts2) {\n for (const part of parts2) {\n if (part in map)\n continue;\n map[part] = toPart(part);\n }\n return anatomy(name, map);\n }\n function selectors() {\n const value = Object.fromEntries(\n Object.entries(map).map(([key, part]) => [key, part.selector])\n );\n return value;\n }\n function classnames() {\n const value = Object.fromEntries(\n Object.entries(map).map(([key, part]) => [key, part.className])\n );\n return value;\n }\n function toPart(part) {\n const el = [\"container\", \"root\"].includes(part != null ? part : \"\") ? [name] : [name, part];\n const attr = el.filter(Boolean).join(\"__\");\n const className = `chakra-${attr}`;\n const partObj = {\n className,\n selector: `.${className}`,\n toString: () => part\n };\n return partObj;\n }\n const __type = {};\n return {\n parts,\n toPart,\n extend,\n selectors,\n classnames,\n get keys() {\n return Object.keys(map);\n },\n __type\n };\n}\n\nexport {\n anatomy\n};\n","import {\n anatomy\n} from \"./chunk-ZN6IUO2A.mjs\";\n\n// src/components.ts\nvar accordionAnatomy = anatomy(\"accordion\").parts(\"root\", \"container\", \"button\", \"panel\").extend(\"icon\");\nvar alertAnatomy = anatomy(\"alert\").parts(\"title\", \"description\", \"container\").extend(\"icon\", \"spinner\");\nvar avatarAnatomy = anatomy(\"avatar\").parts(\"label\", \"badge\", \"container\").extend(\"excessLabel\", \"group\");\nvar breadcrumbAnatomy = anatomy(\"breadcrumb\").parts(\"link\", \"item\", \"container\").extend(\"separator\");\nvar buttonAnatomy = anatomy(\"button\").parts();\nvar checkboxAnatomy = anatomy(\"checkbox\").parts(\"control\", \"icon\", \"container\").extend(\"label\");\nvar circularProgressAnatomy = anatomy(\"progress\").parts(\"track\", \"filledTrack\").extend(\"label\");\nvar drawerAnatomy = anatomy(\"drawer\").parts(\"overlay\", \"dialogContainer\", \"dialog\").extend(\"header\", \"closeButton\", \"body\", \"footer\");\nvar editableAnatomy = anatomy(\"editable\").parts(\n \"preview\",\n \"input\",\n \"textarea\"\n);\nvar formAnatomy = anatomy(\"form\").parts(\n \"container\",\n \"requiredIndicator\",\n \"helperText\"\n);\nvar formErrorAnatomy = anatomy(\"formError\").parts(\"text\", \"icon\");\nvar inputAnatomy = anatomy(\"input\").parts(\"addon\", \"field\", \"element\");\nvar listAnatomy = anatomy(\"list\").parts(\"container\", \"item\", \"icon\");\nvar menuAnatomy = anatomy(\"menu\").parts(\"button\", \"list\", \"item\").extend(\"groupTitle\", \"command\", \"divider\");\nvar modalAnatomy = anatomy(\"modal\").parts(\"overlay\", \"dialogContainer\", \"dialog\").extend(\"header\", \"closeButton\", \"body\", \"footer\");\nvar numberInputAnatomy = anatomy(\"numberinput\").parts(\n \"root\",\n \"field\",\n \"stepperGroup\",\n \"stepper\"\n);\nvar pinInputAnatomy = anatomy(\"pininput\").parts(\"field\");\nvar popoverAnatomy = anatomy(\"popover\").parts(\"content\", \"header\", \"body\", \"footer\").extend(\"popper\", \"arrow\", \"closeButton\");\nvar progressAnatomy = anatomy(\"progress\").parts(\n \"label\",\n \"filledTrack\",\n \"track\"\n);\nvar radioAnatomy = anatomy(\"radio\").parts(\n \"container\",\n \"control\",\n \"label\"\n);\nvar selectAnatomy = anatomy(\"select\").parts(\"field\", \"icon\");\nvar sliderAnatomy = anatomy(\"slider\").parts(\n \"container\",\n \"track\",\n \"thumb\",\n \"filledTrack\",\n \"mark\"\n);\nvar statAnatomy = anatomy(\"stat\").parts(\n \"container\",\n \"label\",\n \"helpText\",\n \"number\",\n \"icon\"\n);\nvar switchAnatomy = anatomy(\"switch\").parts(\n \"container\",\n \"track\",\n \"thumb\"\n);\nvar tableAnatomy = anatomy(\"table\").parts(\n \"table\",\n \"thead\",\n \"tbody\",\n \"tr\",\n \"th\",\n \"td\",\n \"tfoot\",\n \"caption\"\n);\nvar tabsAnatomy = anatomy(\"tabs\").parts(\n \"root\",\n \"tab\",\n \"tablist\",\n \"tabpanel\",\n \"tabpanels\",\n \"indicator\"\n);\nvar tagAnatomy = anatomy(\"tag\").parts(\n \"container\",\n \"label\",\n \"closeButton\"\n);\nvar cardAnatomy = anatomy(\"card\").parts(\n \"container\",\n \"header\",\n \"body\",\n \"footer\"\n);\n\nexport {\n accordionAnatomy,\n alertAnatomy,\n avatarAnatomy,\n breadcrumbAnatomy,\n buttonAnatomy,\n checkboxAnatomy,\n circularProgressAnatomy,\n drawerAnatomy,\n editableAnatomy,\n formAnatomy,\n formErrorAnatomy,\n inputAnatomy,\n listAnatomy,\n menuAnatomy,\n modalAnatomy,\n numberInputAnatomy,\n pinInputAnatomy,\n popoverAnatomy,\n progressAnatomy,\n radioAnatomy,\n selectAnatomy,\n sliderAnatomy,\n statAnatomy,\n switchAnatomy,\n tableAnatomy,\n tabsAnatomy,\n tagAnatomy,\n cardAnatomy\n};\n","/**\n * A simple guard function:\n *\n * ```js\n * Math.min(Math.max(low, value), high)\n * ```\n */\nfunction guard(low, high, value) {\n return Math.min(Math.max(low, value), high);\n}\n\nclass ColorError extends Error {\n constructor(color) {\n super(`Failed to parse color: \"${color}\"`);\n }\n}\nvar ColorError$1 = ColorError;\n\n/**\n * Parses a color into red, gree, blue, alpha parts\n *\n * @param color the input color. Can be a RGB, RBGA, HSL, HSLA, or named color\n */\nfunction parseToRgba(color) {\n if (typeof color !== 'string') throw new ColorError$1(color);\n if (color.trim().toLowerCase() === 'transparent') return [0, 0, 0, 0];\n let normalizedColor = color.trim();\n normalizedColor = namedColorRegex.test(color) ? nameToHex(color) : color;\n const reducedHexMatch = reducedHexRegex.exec(normalizedColor);\n if (reducedHexMatch) {\n const arr = Array.from(reducedHexMatch).slice(1);\n return [...arr.slice(0, 3).map(x => parseInt(r(x, 2), 16)), parseInt(r(arr[3] || 'f', 2), 16) / 255];\n }\n const hexMatch = hexRegex.exec(normalizedColor);\n if (hexMatch) {\n const arr = Array.from(hexMatch).slice(1);\n return [...arr.slice(0, 3).map(x => parseInt(x, 16)), parseInt(arr[3] || 'ff', 16) / 255];\n }\n const rgbaMatch = rgbaRegex.exec(normalizedColor);\n if (rgbaMatch) {\n const arr = Array.from(rgbaMatch).slice(1);\n return [...arr.slice(0, 3).map(x => parseInt(x, 10)), parseFloat(arr[3] || '1')];\n }\n const hslaMatch = hslaRegex.exec(normalizedColor);\n if (hslaMatch) {\n const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);\n if (guard(0, 100, s) !== s) throw new ColorError$1(color);\n if (guard(0, 100, l) !== l) throw new ColorError$1(color);\n return [...hslToRgb(h, s, l), Number.isNaN(a) ? 1 : a];\n }\n throw new ColorError$1(color);\n}\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i) {\n hash = hash * 33 ^ str.charCodeAt(--i);\n }\n\n /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed\n * integers. Since we want the results to be always positive, convert the\n * signed int to an unsigned by doing an unsigned bitshift. */\n return (hash >>> 0) % 2341;\n}\nconst colorToInt = x => parseInt(x.replace(/_/g, ''), 36);\nconst compressedColorMap = '1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm'.split(' ').reduce((acc, next) => {\n const key = colorToInt(next.substring(0, 3));\n const hex = colorToInt(next.substring(3)).toString(16);\n\n // NOTE: padStart could be used here but it breaks Node 6 compat\n // https://github.com/ricokahler/color2k/issues/351\n let prefix = '';\n for (let i = 0; i < 6 - hex.length; i++) {\n prefix += '0';\n }\n acc[key] = `${prefix}${hex}`;\n return acc;\n}, {});\n\n/**\n * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.\n */\nfunction nameToHex(color) {\n const normalizedColorName = color.toLowerCase().trim();\n const result = compressedColorMap[hash(normalizedColorName)];\n if (!result) throw new ColorError$1(color);\n return `#${result}`;\n}\nconst r = (str, amount) => Array.from(Array(amount)).map(() => str).join('');\nconst reducedHexRegex = new RegExp(`^#${r('([a-f0-9])', 3)}([a-f0-9])?$`, 'i');\nconst hexRegex = new RegExp(`^#${r('([a-f0-9]{2})', 3)}([a-f0-9]{2})?$`, 'i');\nconst rgbaRegex = new RegExp(`^rgba?\\\\(\\\\s*(\\\\d+)\\\\s*${r(',\\\\s*(\\\\d+)\\\\s*', 2)}(?:,\\\\s*([\\\\d.]+))?\\\\s*\\\\)$`, 'i');\nconst hslaRegex = /^hsla?\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)%\\s*,\\s*([\\d.]+)%(?:\\s*,\\s*([\\d.]+))?\\s*\\)$/i;\nconst namedColorRegex = /^[a-z]+$/i;\nconst roundColor = color => {\n return Math.round(color * 255);\n};\nconst hslToRgb = (hue, saturation, lightness) => {\n let l = lightness / 100;\n if (saturation === 0) {\n // achromatic\n return [l, l, l].map(roundColor);\n }\n\n // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV\n const huePrime = (hue % 360 + 360) % 360 / 60;\n const chroma = (1 - Math.abs(2 * l - 1)) * (saturation / 100);\n const secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));\n let red = 0;\n let green = 0;\n let blue = 0;\n if (huePrime >= 0 && huePrime < 1) {\n red = chroma;\n green = secondComponent;\n } else if (huePrime >= 1 && huePrime < 2) {\n red = secondComponent;\n green = chroma;\n } else if (huePrime >= 2 && huePrime < 3) {\n green = chroma;\n blue = secondComponent;\n } else if (huePrime >= 3 && huePrime < 4) {\n green = secondComponent;\n blue = chroma;\n } else if (huePrime >= 4 && huePrime < 5) {\n red = secondComponent;\n blue = chroma;\n } else if (huePrime >= 5 && huePrime < 6) {\n red = chroma;\n blue = secondComponent;\n }\n const lightnessModification = l - chroma / 2;\n const finalRed = red + lightnessModification;\n const finalGreen = green + lightnessModification;\n const finalBlue = blue + lightnessModification;\n return [finalRed, finalGreen, finalBlue].map(roundColor);\n};\n\n// taken from:\n\n/**\n * Parses a color in hue, saturation, lightness, and the alpha channel.\n *\n * Hue is a number between 0 and 360, saturation, lightness, and alpha are\n * decimal percentages between 0 and 1\n */\nfunction parseToHsla(color) {\n const [red, green, blue, alpha] = parseToRgba(color).map((value, index) =>\n // 3rd index is alpha channel which is already normalized\n index === 3 ? value : value / 255);\n const max = Math.max(red, green, blue);\n const min = Math.min(red, green, blue);\n const lightness = (max + min) / 2;\n\n // achromatic\n if (max === min) return [0, 0, lightness, alpha];\n const delta = max - min;\n const saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);\n const hue = 60 * (red === max ? (green - blue) / delta + (green < blue ? 6 : 0) : green === max ? (blue - red) / delta + 2 : (red - green) / delta + 4);\n return [hue, saturation, lightness, alpha];\n}\n\n/**\n * Takes in hsla parts and constructs an hsla string\n *\n * @param hue The color circle (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue\n * @param saturation Percentage of saturation, given as a decimal between 0 and 1\n * @param lightness Percentage of lightness, given as a decimal between 0 and 1\n * @param alpha Percentage of opacity, given as a decimal between 0 and 1\n */\nfunction hsla(hue, saturation, lightness, alpha) {\n return `hsla(${(hue % 360).toFixed()}, ${guard(0, 100, saturation * 100).toFixed()}%, ${guard(0, 100, lightness * 100).toFixed()}%, ${parseFloat(guard(0, 1, alpha).toFixed(3))})`;\n}\n\n/**\n * Adjusts the current hue of the color by the given degrees. Wraps around when\n * over 360.\n *\n * @param color input color\n * @param degrees degrees to adjust the input color, accepts degree integers\n * (0 - 360) and wraps around on overflow\n */\nfunction adjustHue(color, degrees) {\n const [h, s, l, a] = parseToHsla(color);\n return hsla(h + degrees, s, l, a);\n}\n\n/**\n * Darkens using lightness. This is equivalent to subtracting the lightness\n * from the L in HSL.\n *\n * @param amount The amount to darken, given as a decimal between 0 and 1\n */\nfunction darken(color, amount) {\n const [hue, saturation, lightness, alpha] = parseToHsla(color);\n return hsla(hue, saturation, lightness - amount, alpha);\n}\n\n/**\n * Desaturates the input color by the given amount via subtracting from the `s`\n * in `hsla`.\n *\n * @param amount The amount to desaturate, given as a decimal between 0 and 1\n */\nfunction desaturate(color, amount) {\n const [h, s, l, a] = parseToHsla(color);\n return hsla(h, s - amount, l, a);\n}\n\n// taken from:\n// https://github.com/styled-components/polished/blob/0764c982551b487469043acb56281b0358b3107b/src/color/getLuminance.js\n\n/**\n * Returns a number (float) representing the luminance of a color.\n */\nfunction getLuminance(color) {\n if (color === 'transparent') return 0;\n function f(x) {\n const channel = x / 255;\n return channel <= 0.03928 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);\n }\n const [r, g, b] = parseToRgba(color);\n return 0.2126 * f(r) + 0.7152 * f(g) + 0.0722 * f(b);\n}\n\n// taken from:\n\n/**\n * Returns the contrast ratio between two colors based on\n * [W3's recommended equation for calculating contrast](http://www.w3.org/TR/WCAG20/#contrast-ratiodef).\n */\nfunction getContrast(color1, color2) {\n const luminance1 = getLuminance(color1);\n const luminance2 = getLuminance(color2);\n return luminance1 > luminance2 ? (luminance1 + 0.05) / (luminance2 + 0.05) : (luminance2 + 0.05) / (luminance1 + 0.05);\n}\n\n/**\n * Takes in rgba parts and returns an rgba string\n *\n * @param red The amount of red in the red channel, given in a number between 0 and 255 inclusive\n * @param green The amount of green in the red channel, given in a number between 0 and 255 inclusive\n * @param blue The amount of blue in the red channel, given in a number between 0 and 255 inclusive\n * @param alpha Percentage of opacity, given as a decimal between 0 and 1\n */\nfunction rgba(red, green, blue, alpha) {\n return `rgba(${guard(0, 255, red).toFixed()}, ${guard(0, 255, green).toFixed()}, ${guard(0, 255, blue).toFixed()}, ${parseFloat(guard(0, 1, alpha).toFixed(3))})`;\n}\n\n/**\n * Mixes two colors together. Taken from sass's implementation.\n */\nfunction mix(color1, color2, weight) {\n const normalize = (n, index) =>\n // 3rd index is alpha channel which is already normalized\n index === 3 ? n : n / 255;\n const [r1, g1, b1, a1] = parseToRgba(color1).map(normalize);\n const [r2, g2, b2, a2] = parseToRgba(color2).map(normalize);\n\n // The formula is copied from the original Sass implementation:\n // http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method\n const alphaDelta = a2 - a1;\n const normalizedWeight = weight * 2 - 1;\n const combinedWeight = normalizedWeight * alphaDelta === -1 ? normalizedWeight : normalizedWeight + alphaDelta / (1 + normalizedWeight * alphaDelta);\n const weight2 = (combinedWeight + 1) / 2;\n const weight1 = 1 - weight2;\n const r = (r1 * weight1 + r2 * weight2) * 255;\n const g = (g1 * weight1 + g2 * weight2) * 255;\n const b = (b1 * weight1 + b2 * weight2) * 255;\n const a = a2 * weight + a1 * (1 - weight);\n return rgba(r, g, b, a);\n}\n\n/**\n * Given a series colors, this function will return a `scale(x)` function that\n * accepts a percentage as a decimal between 0 and 1 and returns the color at\n * that percentage in the scale.\n *\n * ```js\n * const scale = getScale('red', 'yellow', 'green');\n * console.log(scale(0)); // rgba(255, 0, 0, 1)\n * console.log(scale(0.5)); // rgba(255, 255, 0, 1)\n * console.log(scale(1)); // rgba(0, 128, 0, 1)\n * ```\n *\n * If you'd like to limit the domain and range like chroma-js, we recommend\n * wrapping scale again.\n *\n * ```js\n * const _scale = getScale('red', 'yellow', 'green');\n * const scale = x => _scale(x / 100);\n *\n * console.log(scale(0)); // rgba(255, 0, 0, 1)\n * console.log(scale(50)); // rgba(255, 255, 0, 1)\n * console.log(scale(100)); // rgba(0, 128, 0, 1)\n * ```\n */\nfunction getScale(...colors) {\n return n => {\n const lastIndex = colors.length - 1;\n const lowIndex = guard(0, lastIndex, Math.floor(n * lastIndex));\n const highIndex = guard(0, lastIndex, Math.ceil(n * lastIndex));\n const color1 = colors[lowIndex];\n const color2 = colors[highIndex];\n const unit = 1 / lastIndex;\n const weight = (n - unit * lowIndex) / unit;\n return mix(color1, color2, weight);\n };\n}\n\nconst guidelines = {\n decorative: 1.5,\n readable: 3,\n aa: 4.5,\n aaa: 7\n};\n\n/**\n * Returns whether or not a color has bad contrast against a background\n * according to a given standard.\n */\nfunction hasBadContrast(color, standard = 'aa', background = '#fff') {\n return getContrast(color, background) < guidelines[standard];\n}\n\n/**\n * Lightens a color by a given amount. This is equivalent to\n * `darken(color, -amount)`\n *\n * @param amount The amount to darken, given as a decimal between 0 and 1\n */\nfunction lighten(color, amount) {\n return darken(color, -amount);\n}\n\n/**\n * Takes in a color and makes it more transparent by convert to `rgba` and\n * decreasing the amount in the alpha channel.\n *\n * @param amount The amount to increase the transparency by, given as a decimal between 0 and 1\n */\nfunction transparentize(color, amount) {\n const [r, g, b, a] = parseToRgba(color);\n return rgba(r, g, b, a - amount);\n}\n\n/**\n * Takes a color and un-transparentizes it. Equivalent to\n * `transparentize(color, -amount)`\n *\n * @param amount The amount to increase the opacity by, given as a decimal between 0 and 1\n */\nfunction opacify(color, amount) {\n return transparentize(color, -amount);\n}\n\n/**\n * An alternative function to `readableColor`. Returns whether or not the \n * readable color (i.e. the color to be place on top the input color) should be\n * black.\n */\nfunction readableColorIsBlack(color) {\n return getLuminance(color) > 0.179;\n}\n\n/**\n * Returns black or white for best contrast depending on the luminosity of the\n * given color.\n */\nfunction readableColor(color) {\n return readableColorIsBlack(color) ? '#000' : '#fff';\n}\n\n/**\n * Saturates a color by converting it to `hsl` and increasing the saturation\n * amount. Equivalent to `desaturate(color, -amount)`\n * \n * @param color Input color\n * @param amount The amount to darken, given as a decimal between 0 and 1\n */\nfunction saturate(color, amount) {\n return desaturate(color, -amount);\n}\n\n/**\n * Takes in any color and returns it as a hex code.\n */\nfunction toHex(color) {\n const [r, g, b, a] = parseToRgba(color);\n let hex = x => {\n const h = guard(0, 255, x).toString(16);\n // NOTE: padStart could be used here but it breaks Node 6 compat\n // https://github.com/ricokahler/color2k/issues/351\n return h.length === 1 ? `0${h}` : h;\n };\n return `#${hex(r)}${hex(g)}${hex(b)}${a < 1 ? hex(Math.round(a * 255)) : ''}`;\n}\n\n/**\n * Takes in any color and returns it as an rgba string.\n */\nfunction toRgba(color) {\n return rgba(...parseToRgba(color));\n}\n\n/**\n * Takes in any color and returns it as an hsla string.\n */\nfunction toHsla(color) {\n return hsla(...parseToHsla(color));\n}\n\nexport { ColorError$1 as ColorError, adjustHue, darken, desaturate, getContrast, getLuminance, getScale, guard, hasBadContrast, hsla, lighten, mix, opacify, parseToHsla, parseToRgba, readableColor, readableColorIsBlack, rgba, saturate, toHex, toHsla, toRgba, transparentize };\n//# sourceMappingURL=index.exports.import.es.mjs.map\n","// src/color.ts\nimport {\n toHex,\n parseToRgba,\n transparentize as setTransparency,\n mix,\n darken as reduceLightness,\n lighten as increaseLightness,\n getContrast,\n parseToHsla,\n hsla,\n getLuminance\n} from \"color2k\";\n\n// ../../../node_modules/.pnpm/dlv@1.1.3/node_modules/dlv/dist/dlv.es.js\nfunction dlv_es_default(t, e, l, n, r) {\n for (e = e.split ? e.split(\".\") : e, n = 0; n < e.length; n++)\n t = t ? t[e[n]] : r;\n return t === r ? l : t;\n}\n\n// src/color.ts\nvar isEmptyObject = (obj) => Object.keys(obj).length === 0;\nvar getColor = (theme, color, fallback) => {\n const hex = dlv_es_default(theme, `colors.${color}`, color);\n try {\n toHex(hex);\n return hex;\n } catch {\n return fallback != null ? fallback : \"#000000\";\n }\n};\nvar getBrightness = (color) => {\n const [r, g, b] = parseToRgba(color);\n return (r * 299 + g * 587 + b * 114) / 1e3;\n};\nvar tone = (color) => (theme) => {\n const hex = getColor(theme, color);\n const brightness = getBrightness(hex);\n const isDark2 = brightness < 128;\n return isDark2 ? \"dark\" : \"light\";\n};\nvar isDark = (color) => (theme) => tone(color)(theme) === \"dark\";\nvar isLight = (color) => (theme) => tone(color)(theme) === \"light\";\nvar transparentize = (color, opacity) => (theme) => {\n const raw = getColor(theme, color);\n return setTransparency(raw, 1 - opacity);\n};\nvar whiten = (color, amount) => (theme) => {\n const raw = getColor(theme, color);\n return toHex(mix(raw, \"#fff\", amount));\n};\nvar blacken = (color, amount) => (theme) => {\n const raw = getColor(theme, color);\n return toHex(mix(raw, \"#000\", amount / 100));\n};\nvar darken = (color, amount) => (theme) => {\n const raw = getColor(theme, color);\n return toHex(reduceLightness(raw, amount / 100));\n};\nvar lighten = (color, amount) => (theme) => {\n const raw = getColor(theme, color);\n toHex(increaseLightness(raw, amount / 100));\n};\nvar contrast = (fg, bg) => (theme) => getContrast(getColor(theme, bg), getColor(theme, fg));\nvar isAccessible = (textColor, bgColor, options) => (theme) => isReadable(getColor(theme, bgColor), getColor(theme, textColor), options);\nfunction isReadable(color1, color2, wcag2 = { level: \"AA\", size: \"small\" }) {\n var _a, _b;\n const readabilityLevel = readability(color1, color2);\n switch (((_a = wcag2.level) != null ? _a : \"AA\") + ((_b = wcag2.size) != null ? _b : \"small\")) {\n case \"AAsmall\":\n case \"AAAlarge\":\n return readabilityLevel >= 4.5;\n case \"AAlarge\":\n return readabilityLevel >= 3;\n case \"AAAsmall\":\n return readabilityLevel >= 7;\n default:\n return false;\n }\n}\nfunction readability(color1, color2) {\n return (Math.max(getLuminance(color1), getLuminance(color2)) + 0.05) / (Math.min(getLuminance(color1), getLuminance(color2)) + 0.05);\n}\nvar complementary = (color) => (theme) => {\n const raw = getColor(theme, color);\n const hsl = parseToHsla(raw);\n const complementHsl = Object.assign(hsl, [\n (hsl[0] + 180) % 360\n ]);\n return toHex(hsla(...complementHsl));\n};\nfunction generateStripe(size = \"1rem\", color = \"rgba(255, 255, 255, 0.15)\") {\n return {\n backgroundImage: `linear-gradient(\n 45deg,\n ${color} 25%,\n transparent 25%,\n transparent 50%,\n ${color} 50%,\n ${color} 75%,\n transparent 75%,\n transparent\n )`,\n backgroundSize: `${size} ${size}`\n };\n}\nvar randomHex = () => `#${Math.floor(Math.random() * 16777215).toString(16).padEnd(6, \"0\")}`;\nfunction randomColor(opts) {\n const fallback = randomHex();\n if (!opts || isEmptyObject(opts)) {\n return fallback;\n }\n if (opts.string && opts.colors) {\n return randomColorFromList(opts.string, opts.colors);\n }\n if (opts.string && !opts.colors) {\n return randomColorFromString(opts.string);\n }\n if (opts.colors && !opts.string) {\n return randomFromList(opts.colors);\n }\n return fallback;\n}\nfunction randomColorFromString(str) {\n let hash = 0;\n if (str.length === 0)\n return hash.toString();\n for (let i = 0; i < str.length; i += 1) {\n hash = str.charCodeAt(i) + ((hash << 5) - hash);\n hash = hash & hash;\n }\n let color = \"#\";\n for (let j = 0; j < 3; j += 1) {\n const value = hash >> j * 8 & 255;\n color += `00${value.toString(16)}`.substr(-2);\n }\n return color;\n}\nfunction randomColorFromList(str, list) {\n let index = 0;\n if (str.length === 0)\n return list[0];\n for (let i = 0; i < str.length; i += 1) {\n index = str.charCodeAt(i) + ((index << 5) - index);\n index = index & index;\n }\n index = (index % list.length + list.length) % list.length;\n return list[index];\n}\nfunction randomFromList(list) {\n return list[Math.floor(Math.random() * list.length)];\n}\n\nexport {\n getColor,\n tone,\n isDark,\n isLight,\n transparentize,\n whiten,\n blacken,\n darken,\n lighten,\n contrast,\n isAccessible,\n isReadable,\n readability,\n complementary,\n generateStripe,\n randomColor\n};\n","// src/component.ts\nfunction mode(light, dark) {\n return (props) => props.colorMode === \"dark\" ? dark : light;\n}\nfunction orient(options) {\n const { orientation, vertical, horizontal } = options;\n if (!orientation)\n return {};\n return orientation === \"vertical\" ? vertical : horizontal;\n}\n\nexport {\n mode,\n orient\n};\n","// src/css-calc.ts\nimport { isObject } from \"@chakra-ui/shared-utils\";\nfunction toRef(operand) {\n if (isObject(operand) && operand.reference) {\n return operand.reference;\n }\n return String(operand);\n}\nvar toExpr = (operator, ...operands) => operands.map(toRef).join(` ${operator} `).replace(/calc/g, \"\");\nvar add = (...operands) => `calc(${toExpr(\"+\", ...operands)})`;\nvar subtract = (...operands) => `calc(${toExpr(\"-\", ...operands)})`;\nvar multiply = (...operands) => `calc(${toExpr(\"*\", ...operands)})`;\nvar divide = (...operands) => `calc(${toExpr(\"/\", ...operands)})`;\nvar negate = (x) => {\n const value = toRef(x);\n if (value != null && !Number.isNaN(parseFloat(value))) {\n return String(value).startsWith(\"-\") ? String(value).slice(1) : `-${value}`;\n }\n return multiply(value, -1);\n};\nvar calc = Object.assign(\n (x) => ({\n add: (...operands) => calc(add(x, ...operands)),\n subtract: (...operands) => calc(subtract(x, ...operands)),\n multiply: (...operands) => calc(multiply(x, ...operands)),\n divide: (...operands) => calc(divide(x, ...operands)),\n negate: () => calc(negate(x)),\n toString: () => x.toString()\n }),\n {\n add,\n subtract,\n multiply,\n divide,\n negate\n }\n);\n\nexport {\n calc\n};\n","// src/css-var.ts\nfunction isDecimal(value) {\n return !Number.isInteger(parseFloat(value.toString()));\n}\nfunction replaceWhiteSpace(value, replaceValue = \"-\") {\n return value.replace(/\\s+/g, replaceValue);\n}\nfunction escape(value) {\n const valueStr = replaceWhiteSpace(value.toString());\n if (valueStr.includes(\"\\\\.\"))\n return value;\n return isDecimal(value) ? valueStr.replace(\".\", `\\\\.`) : value;\n}\nfunction addPrefix(value, prefix = \"\") {\n return [prefix, escape(value)].filter(Boolean).join(\"-\");\n}\nfunction toVarRef(name, fallback) {\n return `var(${escape(name)}${fallback ? `, ${fallback}` : \"\"})`;\n}\nfunction toVar(value, prefix = \"\") {\n return `--${addPrefix(value, prefix)}`;\n}\nfunction cssVar(name, options) {\n const cssVariable = toVar(name, options == null ? void 0 : options.prefix);\n return {\n variable: cssVariable,\n reference: toVarRef(cssVariable, getFallback(options == null ? void 0 : options.fallback))\n };\n}\nfunction getFallback(fallback) {\n if (typeof fallback === \"string\")\n return fallback;\n return fallback == null ? void 0 : fallback.reference;\n}\n\nexport {\n isDecimal,\n addPrefix,\n toVarRef,\n toVar,\n cssVar\n};\n","// src/components/switch.ts\nimport { switchAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nimport { calc, cssVar } from \"@chakra-ui/theme-tools\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar $width = cssVar(\"switch-track-width\");\nvar $height = cssVar(\"switch-track-height\");\nvar $diff = cssVar(\"switch-track-diff\");\nvar diffValue = calc.subtract($width, $height);\nvar $translateX = cssVar(\"switch-thumb-x\");\nvar $bg = cssVar(\"switch-bg\");\nvar baseStyleTrack = defineStyle((props) => {\n const { colorScheme: c } = props;\n return {\n borderRadius: \"full\",\n p: \"0.5\",\n width: [$width.reference],\n height: [$height.reference],\n transitionProperty: \"common\",\n transitionDuration: \"fast\",\n [$bg.variable]: \"colors.gray.300\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.400\"\n },\n _focusVisible: {\n boxShadow: \"outline\"\n },\n _disabled: {\n opacity: 0.4,\n cursor: \"not-allowed\"\n },\n _checked: {\n [$bg.variable]: `colors.${c}.500`,\n _dark: {\n [$bg.variable]: `colors.${c}.200`\n }\n },\n bg: $bg.reference\n };\n});\nvar baseStyleThumb = defineStyle({\n bg: \"white\",\n transitionProperty: \"transform\",\n transitionDuration: \"normal\",\n borderRadius: \"inherit\",\n width: [$height.reference],\n height: [$height.reference],\n _checked: {\n transform: `translateX(${$translateX.reference})`\n }\n});\nvar baseStyle = definePartsStyle((props) => ({\n container: {\n [$diff.variable]: diffValue,\n [$translateX.variable]: $diff.reference,\n _rtl: {\n [$translateX.variable]: calc($diff).negate().toString()\n }\n },\n track: baseStyleTrack(props),\n thumb: baseStyleThumb\n}));\nvar sizes = {\n sm: definePartsStyle({\n container: {\n [$width.variable]: \"1.375rem\",\n [$height.variable]: \"sizes.3\"\n }\n }),\n md: definePartsStyle({\n container: {\n [$width.variable]: \"1.875rem\",\n [$height.variable]: \"sizes.4\"\n }\n }),\n lg: definePartsStyle({\n container: {\n [$width.variable]: \"2.875rem\",\n [$height.variable]: \"sizes.6\"\n }\n })\n};\nvar switchTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n defaultProps: {\n size: \"md\",\n colorScheme: \"blue\"\n }\n});\n\nexport {\n switchTheme\n};\n","// src/components/table.ts\nimport { tableAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nimport { mode } from \"@chakra-ui/theme-tools\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar baseStyle = definePartsStyle({\n table: {\n fontVariantNumeric: \"lining-nums tabular-nums\",\n borderCollapse: \"collapse\",\n width: \"full\"\n },\n th: {\n fontFamily: \"heading\",\n fontWeight: \"bold\",\n textTransform: \"uppercase\",\n letterSpacing: \"wider\",\n textAlign: \"start\"\n },\n td: {\n textAlign: \"start\"\n },\n caption: {\n mt: 4,\n fontFamily: \"heading\",\n textAlign: \"center\",\n fontWeight: \"medium\"\n }\n});\nvar numericStyles = defineStyle({\n \"&[data-is-numeric=true]\": {\n textAlign: \"end\"\n }\n});\nvar variantSimple = definePartsStyle((props) => {\n const { colorScheme: c } = props;\n return {\n th: {\n color: mode(\"gray.600\", \"gray.400\")(props),\n borderBottom: \"1px\",\n borderColor: mode(`${c}.100`, `${c}.700`)(props),\n ...numericStyles\n },\n td: {\n borderBottom: \"1px\",\n borderColor: mode(`${c}.100`, `${c}.700`)(props),\n ...numericStyles\n },\n caption: {\n color: mode(\"gray.600\", \"gray.100\")(props)\n },\n tfoot: {\n tr: {\n \"&:last-of-type\": {\n th: { borderBottomWidth: 0 }\n }\n }\n }\n };\n});\nvar variantStripe = definePartsStyle((props) => {\n const { colorScheme: c } = props;\n return {\n th: {\n color: mode(\"gray.600\", \"gray.400\")(props),\n borderBottom: \"1px\",\n borderColor: mode(`${c}.100`, `${c}.700`)(props),\n ...numericStyles\n },\n td: {\n borderBottom: \"1px\",\n borderColor: mode(`${c}.100`, `${c}.700`)(props),\n ...numericStyles\n },\n caption: {\n color: mode(\"gray.600\", \"gray.100\")(props)\n },\n tbody: {\n tr: {\n \"&:nth-of-type(odd)\": {\n \"th, td\": {\n borderBottomWidth: \"1px\",\n borderColor: mode(`${c}.100`, `${c}.700`)(props)\n },\n td: {\n background: mode(`${c}.100`, `${c}.700`)(props)\n }\n }\n }\n },\n tfoot: {\n tr: {\n \"&:last-of-type\": {\n th: { borderBottomWidth: 0 }\n }\n }\n }\n };\n});\nvar variants = {\n simple: variantSimple,\n striped: variantStripe,\n unstyled: defineStyle({})\n};\nvar sizes = {\n sm: definePartsStyle({\n th: {\n px: \"4\",\n py: \"1\",\n lineHeight: \"4\",\n fontSize: \"xs\"\n },\n td: {\n px: \"4\",\n py: \"2\",\n fontSize: \"sm\",\n lineHeight: \"4\"\n },\n caption: {\n px: \"4\",\n py: \"2\",\n fontSize: \"xs\"\n }\n }),\n md: definePartsStyle({\n th: {\n px: \"6\",\n py: \"3\",\n lineHeight: \"4\",\n fontSize: \"xs\"\n },\n td: {\n px: \"6\",\n py: \"4\",\n lineHeight: \"5\"\n },\n caption: {\n px: \"6\",\n py: \"2\",\n fontSize: \"sm\"\n }\n }),\n lg: definePartsStyle({\n th: {\n px: \"8\",\n py: \"4\",\n lineHeight: \"5\",\n fontSize: \"sm\"\n },\n td: {\n px: \"8\",\n py: \"5\",\n lineHeight: \"6\"\n },\n caption: {\n px: \"6\",\n py: \"2\",\n fontSize: \"md\"\n }\n })\n};\nvar tableTheme = defineMultiStyleConfig({\n baseStyle,\n variants,\n sizes,\n defaultProps: {\n variant: \"simple\",\n size: \"md\",\n colorScheme: \"gray\"\n }\n});\n\nexport {\n tableTheme\n};\n","// src/components/tabs.ts\nimport { tabsAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nimport { getColor } from \"@chakra-ui/theme-tools\";\nvar $fg = cssVar(\"tabs-color\");\nvar $bg = cssVar(\"tabs-bg\");\nvar $border = cssVar(\"tabs-border-color\");\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar baseStyleRoot = defineStyle((props) => {\n const { orientation } = props;\n return {\n display: orientation === \"vertical\" ? \"flex\" : \"block\"\n };\n});\nvar baseStyleTab = defineStyle((props) => {\n const { isFitted } = props;\n return {\n flex: isFitted ? 1 : void 0,\n transitionProperty: \"common\",\n transitionDuration: \"normal\",\n _focusVisible: {\n zIndex: 1,\n boxShadow: \"outline\"\n },\n _disabled: {\n cursor: \"not-allowed\",\n opacity: 0.4\n }\n };\n});\nvar baseStyleTablist = defineStyle((props) => {\n const { align = \"start\", orientation } = props;\n const alignments = {\n end: \"flex-end\",\n center: \"center\",\n start: \"flex-start\"\n };\n return {\n justifyContent: alignments[align],\n flexDirection: orientation === \"vertical\" ? \"column\" : \"row\"\n };\n});\nvar baseStyleTabpanel = defineStyle({\n p: 4\n});\nvar baseStyle = definePartsStyle((props) => ({\n root: baseStyleRoot(props),\n tab: baseStyleTab(props),\n tablist: baseStyleTablist(props),\n tabpanel: baseStyleTabpanel\n}));\nvar sizes = {\n sm: definePartsStyle({\n tab: {\n py: 1,\n px: 4,\n fontSize: \"sm\"\n }\n }),\n md: definePartsStyle({\n tab: {\n fontSize: \"md\",\n py: 2,\n px: 4\n }\n }),\n lg: definePartsStyle({\n tab: {\n fontSize: \"lg\",\n py: 3,\n px: 4\n }\n })\n};\nvar variantLine = definePartsStyle((props) => {\n const { colorScheme: c, orientation } = props;\n const isVertical = orientation === \"vertical\";\n const borderProp = orientation === \"vertical\" ? \"borderStart\" : \"borderBottom\";\n const marginProp = isVertical ? \"marginStart\" : \"marginBottom\";\n return {\n tablist: {\n [borderProp]: \"2px solid\",\n borderColor: \"inherit\"\n },\n tab: {\n [borderProp]: \"2px solid\",\n borderColor: \"transparent\",\n [marginProp]: \"-2px\",\n _selected: {\n [$fg.variable]: `colors.${c}.600`,\n _dark: {\n [$fg.variable]: `colors.${c}.300`\n },\n borderColor: \"currentColor\"\n },\n _active: {\n [$bg.variable]: \"colors.gray.200\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.300\"\n }\n },\n _disabled: {\n _active: { bg: \"none\" }\n },\n color: $fg.reference,\n bg: $bg.reference\n }\n };\n});\nvar variantEnclosed = definePartsStyle((props) => {\n const { colorScheme: c } = props;\n return {\n tab: {\n borderTopRadius: \"md\",\n border: \"1px solid\",\n borderColor: \"transparent\",\n mb: \"-1px\",\n [$border.variable]: \"transparent\",\n _selected: {\n [$fg.variable]: `colors.${c}.600`,\n [$border.variable]: `colors.white`,\n _dark: {\n [$fg.variable]: `colors.${c}.300`,\n [$border.variable]: `colors.gray.800`\n },\n borderColor: \"inherit\",\n borderBottomColor: $border.reference\n },\n color: $fg.reference\n },\n tablist: {\n mb: \"-1px\",\n borderBottom: \"1px solid\",\n borderColor: \"inherit\"\n }\n };\n});\nvar variantEnclosedColored = definePartsStyle((props) => {\n const { colorScheme: c } = props;\n return {\n tab: {\n border: \"1px solid\",\n borderColor: \"inherit\",\n [$bg.variable]: \"colors.gray.50\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.50\"\n },\n mb: \"-1px\",\n _notLast: {\n marginEnd: \"-1px\"\n },\n _selected: {\n [$bg.variable]: \"colors.white\",\n [$fg.variable]: `colors.${c}.600`,\n _dark: {\n [$bg.variable]: \"colors.gray.800\",\n [$fg.variable]: `colors.${c}.300`\n },\n borderColor: \"inherit\",\n borderTopColor: \"currentColor\",\n borderBottomColor: \"transparent\"\n },\n color: $fg.reference,\n bg: $bg.reference\n },\n tablist: {\n mb: \"-1px\",\n borderBottom: \"1px solid\",\n borderColor: \"inherit\"\n }\n };\n});\nvar variantSoftRounded = definePartsStyle((props) => {\n const { colorScheme: c, theme } = props;\n return {\n tab: {\n borderRadius: \"full\",\n fontWeight: \"semibold\",\n color: \"gray.600\",\n _selected: {\n color: getColor(theme, `${c}.700`),\n bg: getColor(theme, `${c}.100`)\n }\n }\n };\n});\nvar variantSolidRounded = definePartsStyle((props) => {\n const { colorScheme: c } = props;\n return {\n tab: {\n borderRadius: \"full\",\n fontWeight: \"semibold\",\n [$fg.variable]: \"colors.gray.600\",\n _dark: {\n [$fg.variable]: \"inherit\"\n },\n _selected: {\n [$fg.variable]: \"colors.white\",\n [$bg.variable]: `colors.${c}.600`,\n _dark: {\n [$fg.variable]: \"colors.gray.800\",\n [$bg.variable]: `colors.${c}.300`\n }\n },\n color: $fg.reference,\n bg: $bg.reference\n }\n };\n});\nvar variantUnstyled = definePartsStyle({});\nvar variants = {\n line: variantLine,\n enclosed: variantEnclosed,\n \"enclosed-colored\": variantEnclosedColored,\n \"soft-rounded\": variantSoftRounded,\n \"solid-rounded\": variantSolidRounded,\n unstyled: variantUnstyled\n};\nvar tabsTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n variants,\n defaultProps: {\n size: \"md\",\n variant: \"line\",\n colorScheme: \"blue\"\n }\n});\n\nexport {\n tabsTheme\n};\n","// src/components/badge.ts\nimport {\n defineCssVars,\n defineStyle,\n defineStyleConfig\n} from \"@chakra-ui/styled-system\";\nimport { transparentize } from \"@chakra-ui/theme-tools\";\nvar vars = defineCssVars(\"badge\", [\"bg\", \"color\", \"shadow\"]);\nvar baseStyle = defineStyle({\n px: 1,\n textTransform: \"uppercase\",\n fontSize: \"xs\",\n borderRadius: \"sm\",\n fontWeight: \"bold\",\n bg: vars.bg.reference,\n color: vars.color.reference,\n boxShadow: vars.shadow.reference\n});\nvar variantSolid = defineStyle((props) => {\n const { colorScheme: c, theme } = props;\n const dark = transparentize(`${c}.500`, 0.6)(theme);\n return {\n [vars.bg.variable]: `colors.${c}.500`,\n [vars.color.variable]: `colors.white`,\n _dark: {\n [vars.bg.variable]: dark,\n [vars.color.variable]: `colors.whiteAlpha.800`\n }\n };\n});\nvar variantSubtle = defineStyle((props) => {\n const { colorScheme: c, theme } = props;\n const darkBg = transparentize(`${c}.200`, 0.16)(theme);\n return {\n [vars.bg.variable]: `colors.${c}.100`,\n [vars.color.variable]: `colors.${c}.800`,\n _dark: {\n [vars.bg.variable]: darkBg,\n [vars.color.variable]: `colors.${c}.200`\n }\n };\n});\nvar variantOutline = defineStyle((props) => {\n const { colorScheme: c, theme } = props;\n const darkColor = transparentize(`${c}.200`, 0.8)(theme);\n return {\n [vars.color.variable]: `colors.${c}.500`,\n _dark: {\n [vars.color.variable]: darkColor\n },\n [vars.shadow.variable]: `inset 0 0 0px 1px ${vars.color.reference}`\n };\n});\nvar variants = {\n solid: variantSolid,\n subtle: variantSubtle,\n outline: variantOutline\n};\nvar badgeTheme = defineStyleConfig({\n baseStyle,\n variants,\n defaultProps: {\n variant: \"subtle\",\n colorScheme: \"gray\"\n }\n});\n\nexport {\n vars,\n badgeTheme\n};\n","import {\n badgeTheme,\n vars\n} from \"./chunk-IBJP6BGU.mjs\";\n\n// src/components/tag.ts\nimport { tagAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar baseStyleContainer = defineStyle({\n fontWeight: \"medium\",\n lineHeight: 1.2,\n outline: 0,\n color: vars.color.reference,\n bg: vars.bg.reference,\n boxShadow: vars.shadow.reference,\n borderRadius: \"md\",\n _focusVisible: {\n boxShadow: \"outline\"\n }\n});\nvar baseStyleLabel = defineStyle({\n lineHeight: 1.2,\n overflow: \"visible\"\n});\nvar baseStyleCloseButton = defineStyle({\n fontSize: \"lg\",\n w: \"5\",\n h: \"5\",\n transitionProperty: \"common\",\n transitionDuration: \"normal\",\n borderRadius: \"full\",\n marginStart: \"1.5\",\n marginEnd: \"-1\",\n opacity: 0.5,\n _disabled: {\n opacity: 0.4\n },\n _focusVisible: {\n boxShadow: \"outline\",\n bg: \"rgba(0, 0, 0, 0.14)\"\n },\n _hover: {\n opacity: 0.8\n },\n _active: {\n opacity: 1\n }\n});\nvar baseStyle = definePartsStyle({\n container: baseStyleContainer,\n label: baseStyleLabel,\n closeButton: baseStyleCloseButton\n});\nvar sizes = {\n sm: definePartsStyle({\n container: {\n minH: \"5\",\n minW: \"5\",\n fontSize: \"xs\",\n px: \"2\"\n },\n closeButton: {\n marginEnd: \"-2px\",\n marginStart: \"0.35rem\"\n }\n }),\n md: definePartsStyle({\n container: {\n minH: \"6\",\n minW: \"6\",\n fontSize: \"sm\",\n px: \"2\"\n }\n }),\n lg: definePartsStyle({\n container: {\n minH: \"8\",\n minW: \"8\",\n fontSize: \"md\",\n px: \"3\"\n }\n })\n};\nvar variants = {\n subtle: definePartsStyle((props) => {\n var _a;\n return {\n container: (_a = badgeTheme.variants) == null ? void 0 : _a.subtle(props)\n };\n }),\n solid: definePartsStyle((props) => {\n var _a;\n return {\n container: (_a = badgeTheme.variants) == null ? void 0 : _a.solid(props)\n };\n }),\n outline: definePartsStyle((props) => {\n var _a;\n return {\n container: (_a = badgeTheme.variants) == null ? void 0 : _a.outline(props)\n };\n })\n};\nvar tagTheme = defineMultiStyleConfig({\n variants,\n baseStyle,\n sizes,\n defaultProps: {\n size: \"md\",\n variant: \"subtle\",\n colorScheme: \"gray\"\n }\n});\n\nexport {\n tagTheme\n};\n","// src/components/input.ts\nimport { inputAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nimport { getColor, mode } from \"@chakra-ui/theme-tools\";\nvar { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nvar baseStyle = definePartsStyle({\n field: {\n width: \"100%\",\n minWidth: 0,\n outline: 0,\n position: \"relative\",\n appearance: \"none\",\n transitionProperty: \"common\",\n transitionDuration: \"normal\",\n _disabled: {\n opacity: 0.4,\n cursor: \"not-allowed\"\n }\n }\n});\nvar size = {\n lg: defineStyle({\n fontSize: \"lg\",\n px: \"4\",\n h: \"12\",\n borderRadius: \"md\"\n }),\n md: defineStyle({\n fontSize: \"md\",\n px: \"4\",\n h: \"10\",\n borderRadius: \"md\"\n }),\n sm: defineStyle({\n fontSize: \"sm\",\n px: \"3\",\n h: \"8\",\n borderRadius: \"sm\"\n }),\n xs: defineStyle({\n fontSize: \"xs\",\n px: \"2\",\n h: \"6\",\n borderRadius: \"sm\"\n })\n};\nvar sizes = {\n lg: definePartsStyle({\n field: size.lg,\n addon: size.lg\n }),\n md: definePartsStyle({\n field: size.md,\n addon: size.md\n }),\n sm: definePartsStyle({\n field: size.sm,\n addon: size.sm\n }),\n xs: definePartsStyle({\n field: size.xs,\n addon: size.xs\n })\n};\nfunction getDefaults(props) {\n const { focusBorderColor: fc, errorBorderColor: ec } = props;\n return {\n focusBorderColor: fc || mode(\"blue.500\", \"blue.300\")(props),\n errorBorderColor: ec || mode(\"red.500\", \"red.300\")(props)\n };\n}\nvar variantOutline = definePartsStyle((props) => {\n const { theme } = props;\n const { focusBorderColor: fc, errorBorderColor: ec } = getDefaults(props);\n return {\n field: {\n border: \"1px solid\",\n borderColor: \"inherit\",\n bg: \"inherit\",\n _hover: {\n borderColor: mode(\"gray.300\", \"whiteAlpha.400\")(props)\n },\n _readOnly: {\n boxShadow: \"none !important\",\n userSelect: \"all\"\n },\n _invalid: {\n borderColor: getColor(theme, ec),\n boxShadow: `0 0 0 1px ${getColor(theme, ec)}`\n },\n _focusVisible: {\n zIndex: 1,\n borderColor: getColor(theme, fc),\n boxShadow: `0 0 0 1px ${getColor(theme, fc)}`\n }\n },\n addon: {\n border: \"1px solid\",\n borderColor: mode(\"inherit\", \"whiteAlpha.50\")(props),\n bg: mode(\"gray.100\", \"whiteAlpha.300\")(props)\n }\n };\n});\nvar variantFilled = definePartsStyle((props) => {\n const { theme } = props;\n const { focusBorderColor: fc, errorBorderColor: ec } = getDefaults(props);\n return {\n field: {\n border: \"2px solid\",\n borderColor: \"transparent\",\n bg: mode(\"gray.100\", \"whiteAlpha.50\")(props),\n _hover: {\n bg: mode(\"gray.200\", \"whiteAlpha.100\")(props)\n },\n _readOnly: {\n boxShadow: \"none !important\",\n userSelect: \"all\"\n },\n _invalid: {\n borderColor: getColor(theme, ec)\n },\n _focusVisible: {\n bg: \"transparent\",\n borderColor: getColor(theme, fc)\n }\n },\n addon: {\n border: \"2px solid\",\n borderColor: \"transparent\",\n bg: mode(\"gray.100\", \"whiteAlpha.50\")(props)\n }\n };\n});\nvar variantFlushed = definePartsStyle((props) => {\n const { theme } = props;\n const { focusBorderColor: fc, errorBorderColor: ec } = getDefaults(props);\n return {\n field: {\n borderBottom: \"1px solid\",\n borderColor: \"inherit\",\n borderRadius: \"0\",\n px: \"0\",\n bg: \"transparent\",\n _readOnly: {\n boxShadow: \"none !important\",\n userSelect: \"all\"\n },\n _invalid: {\n borderColor: getColor(theme, ec),\n boxShadow: `0px 1px 0px 0px ${getColor(theme, ec)}`\n },\n _focusVisible: {\n borderColor: getColor(theme, fc),\n boxShadow: `0px 1px 0px 0px ${getColor(theme, fc)}`\n }\n },\n addon: {\n borderBottom: \"2px solid\",\n borderColor: \"inherit\",\n borderRadius: \"0\",\n px: \"0\",\n bg: \"transparent\"\n }\n };\n});\nvar variantUnstyled = definePartsStyle({\n field: {\n bg: \"transparent\",\n px: \"0\",\n height: \"auto\"\n },\n addon: {\n bg: \"transparent\",\n px: \"0\",\n height: \"auto\"\n }\n});\nvar variants = {\n outline: variantOutline,\n filled: variantFilled,\n flushed: variantFlushed,\n unstyled: variantUnstyled\n};\nvar inputTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n variants,\n defaultProps: {\n size: \"md\",\n variant: \"outline\"\n }\n});\n\nexport {\n inputTheme\n};\n","import {\n inputTheme\n} from \"./chunk-WFLWAEKG.mjs\";\n\n// src/components/textarea.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nvar _a;\nvar baseStyle = defineStyle({\n ...(_a = inputTheme.baseStyle) == null ? void 0 : _a.field,\n paddingY: \"2\",\n minHeight: \"20\",\n lineHeight: \"short\",\n verticalAlign: \"top\"\n});\nvar _a2, _b;\nvar variants = {\n outline: defineStyle(\n (props) => {\n var _a4, _b3;\n return (_b3 = (_a4 = inputTheme.variants) == null ? void 0 : _a4.outline(props).field) != null ? _b3 : {};\n }\n ),\n flushed: defineStyle(\n (props) => {\n var _a4, _b3;\n return (_b3 = (_a4 = inputTheme.variants) == null ? void 0 : _a4.flushed(props).field) != null ? _b3 : {};\n }\n ),\n filled: defineStyle(\n (props) => {\n var _a4, _b3;\n return (_b3 = (_a4 = inputTheme.variants) == null ? void 0 : _a4.filled(props).field) != null ? _b3 : {};\n }\n ),\n unstyled: (_b = (_a2 = inputTheme.variants) == null ? void 0 : _a2.unstyled.field) != null ? _b : {}\n};\nvar _a3, _b2, _c, _d, _e, _f, _g, _h;\nvar sizes = {\n xs: (_b2 = (_a3 = inputTheme.sizes) == null ? void 0 : _a3.xs.field) != null ? _b2 : {},\n sm: (_d = (_c = inputTheme.sizes) == null ? void 0 : _c.sm.field) != null ? _d : {},\n md: (_f = (_e = inputTheme.sizes) == null ? void 0 : _e.md.field) != null ? _f : {},\n lg: (_h = (_g = inputTheme.sizes) == null ? void 0 : _g.lg.field) != null ? _h : {}\n};\nvar textareaTheme = defineStyleConfig({\n baseStyle,\n sizes,\n variants,\n defaultProps: {\n size: \"md\",\n variant: \"outline\"\n }\n});\n\nexport {\n textareaTheme\n};\n","// src/components/tooltip.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nimport { cssVar } from \"@chakra-ui/theme-tools\";\nvar $bg = cssVar(\"tooltip-bg\");\nvar $fg = cssVar(\"tooltip-fg\");\nvar $arrowBg = cssVar(\"popper-arrow-bg\");\nvar baseStyle = defineStyle({\n bg: $bg.reference,\n color: $fg.reference,\n [$bg.variable]: \"colors.gray.700\",\n [$fg.variable]: \"colors.whiteAlpha.900\",\n _dark: {\n [$bg.variable]: \"colors.gray.300\",\n [$fg.variable]: \"colors.gray.900\"\n },\n [$arrowBg.variable]: $bg.reference,\n px: \"2\",\n py: \"0.5\",\n borderRadius: \"sm\",\n fontWeight: \"medium\",\n fontSize: \"sm\",\n boxShadow: \"md\",\n maxW: \"xs\",\n zIndex: \"tooltip\"\n});\nvar tooltipTheme = defineStyleConfig({\n baseStyle\n});\n\nexport {\n tooltipTheme\n};\n","// src/components/progress.ts\nimport { progressAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nimport { generateStripe, getColor, mode } from \"@chakra-ui/theme-tools\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar filledStyle = defineStyle((props) => {\n const { colorScheme: c, theme: t, isIndeterminate, hasStripe } = props;\n const stripeStyle = mode(\n generateStripe(),\n generateStripe(\"1rem\", \"rgba(0,0,0,0.1)\")\n )(props);\n const bgColor = mode(`${c}.500`, `${c}.200`)(props);\n const gradient = `linear-gradient(\n to right,\n transparent 0%,\n ${getColor(t, bgColor)} 50%,\n transparent 100%\n )`;\n const addStripe = !isIndeterminate && hasStripe;\n return {\n ...addStripe && stripeStyle,\n ...isIndeterminate ? { bgImage: gradient } : { bgColor }\n };\n});\nvar baseStyleLabel = defineStyle({\n lineHeight: \"1\",\n fontSize: \"0.25em\",\n fontWeight: \"bold\",\n color: \"white\"\n});\nvar baseStyleTrack = defineStyle((props) => {\n return {\n bg: mode(\"gray.100\", \"whiteAlpha.300\")(props)\n };\n});\nvar baseStyleFilledTrack = defineStyle((props) => {\n return {\n transitionProperty: \"common\",\n transitionDuration: \"slow\",\n ...filledStyle(props)\n };\n});\nvar baseStyle = definePartsStyle((props) => ({\n label: baseStyleLabel,\n filledTrack: baseStyleFilledTrack(props),\n track: baseStyleTrack(props)\n}));\nvar sizes = {\n xs: definePartsStyle({\n track: { h: \"1\" }\n }),\n sm: definePartsStyle({\n track: { h: \"2\" }\n }),\n md: definePartsStyle({\n track: { h: \"3\" }\n }),\n lg: definePartsStyle({\n track: { h: \"4\" }\n })\n};\nvar progressTheme = defineMultiStyleConfig({\n sizes,\n baseStyle,\n defaultProps: {\n size: \"md\",\n colorScheme: \"blue\"\n }\n});\n\nexport {\n progressTheme\n};\n","// src/utils/run-if-fn.ts\nvar isFunction = (value) => typeof value === \"function\";\nfunction runIfFn(valueOrFn, ...args) {\n return isFunction(valueOrFn) ? valueOrFn(...args) : valueOrFn;\n}\n\nexport {\n runIfFn\n};\n","import {\n runIfFn\n} from \"./chunk-EBS47JIL.mjs\";\n\n// src/components/checkbox.ts\nimport { checkboxAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nimport { mode } from \"@chakra-ui/theme-tools\";\nvar { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nvar $size = cssVar(\"checkbox-size\");\nvar baseStyleControl = defineStyle((props) => {\n const { colorScheme: c } = props;\n return {\n w: $size.reference,\n h: $size.reference,\n transitionProperty: \"box-shadow\",\n transitionDuration: \"normal\",\n border: \"2px solid\",\n borderRadius: \"sm\",\n borderColor: \"inherit\",\n color: \"white\",\n _checked: {\n bg: mode(`${c}.500`, `${c}.200`)(props),\n borderColor: mode(`${c}.500`, `${c}.200`)(props),\n color: mode(\"white\", \"gray.900\")(props),\n _hover: {\n bg: mode(`${c}.600`, `${c}.300`)(props),\n borderColor: mode(`${c}.600`, `${c}.300`)(props)\n },\n _disabled: {\n borderColor: mode(\"gray.200\", \"transparent\")(props),\n bg: mode(\"gray.200\", \"whiteAlpha.300\")(props),\n color: mode(\"gray.500\", \"whiteAlpha.500\")(props)\n }\n },\n _indeterminate: {\n bg: mode(`${c}.500`, `${c}.200`)(props),\n borderColor: mode(`${c}.500`, `${c}.200`)(props),\n color: mode(\"white\", \"gray.900\")(props)\n },\n _disabled: {\n bg: mode(\"gray.100\", \"whiteAlpha.100\")(props),\n borderColor: mode(\"gray.100\", \"transparent\")(props)\n },\n _focusVisible: {\n boxShadow: \"outline\"\n },\n _invalid: {\n borderColor: mode(\"red.500\", \"red.300\")(props)\n }\n };\n});\nvar baseStyleContainer = defineStyle({\n _disabled: { cursor: \"not-allowed\" }\n});\nvar baseStyleLabel = defineStyle({\n userSelect: \"none\",\n _disabled: { opacity: 0.4 }\n});\nvar baseStyleIcon = defineStyle({\n transitionProperty: \"transform\",\n transitionDuration: \"normal\"\n});\nvar baseStyle = definePartsStyle((props) => ({\n icon: baseStyleIcon,\n container: baseStyleContainer,\n control: runIfFn(baseStyleControl, props),\n label: baseStyleLabel\n}));\nvar sizes = {\n sm: definePartsStyle({\n control: { [$size.variable]: \"sizes.3\" },\n label: { fontSize: \"sm\" },\n icon: { fontSize: \"3xs\" }\n }),\n md: definePartsStyle({\n control: { [$size.variable]: \"sizes.4\" },\n label: { fontSize: \"md\" },\n icon: { fontSize: \"2xs\" }\n }),\n lg: definePartsStyle({\n control: { [$size.variable]: \"sizes.5\" },\n label: { fontSize: \"lg\" },\n icon: { fontSize: \"2xs\" }\n })\n};\nvar checkboxTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n defaultProps: {\n size: \"md\",\n colorScheme: \"blue\"\n }\n});\n\nexport {\n checkboxTheme\n};\n","import {\n checkboxTheme\n} from \"./chunk-3XG4KRSA.mjs\";\nimport {\n runIfFn\n} from \"./chunk-EBS47JIL.mjs\";\n\n// src/components/radio.ts\nimport { radioAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar baseStyleControl = defineStyle((props) => {\n var _a;\n const controlStyle = (_a = runIfFn(checkboxTheme.baseStyle, props)) == null ? void 0 : _a.control;\n return {\n ...controlStyle,\n borderRadius: \"full\",\n _checked: {\n ...controlStyle == null ? void 0 : controlStyle[\"_checked\"],\n _before: {\n content: `\"\"`,\n display: \"inline-block\",\n pos: \"relative\",\n w: \"50%\",\n h: \"50%\",\n borderRadius: \"50%\",\n bg: \"currentColor\"\n }\n }\n };\n});\nvar baseStyle = definePartsStyle((props) => {\n var _a, _b, _c, _d;\n return {\n label: (_b = (_a = checkboxTheme).baseStyle) == null ? void 0 : _b.call(_a, props).label,\n container: (_d = (_c = checkboxTheme).baseStyle) == null ? void 0 : _d.call(_c, props).container,\n control: baseStyleControl(props)\n };\n});\nvar sizes = {\n md: definePartsStyle({\n control: { w: \"4\", h: \"4\" },\n label: { fontSize: \"md\" }\n }),\n lg: definePartsStyle({\n control: { w: \"5\", h: \"5\" },\n label: { fontSize: \"lg\" }\n }),\n sm: definePartsStyle({\n control: { width: \"3\", height: \"3\" },\n label: { fontSize: \"sm\" }\n })\n};\nvar radioTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n defaultProps: {\n size: \"md\",\n colorScheme: \"blue\"\n }\n});\n\nexport {\n radioTheme\n};\n","import {\n inputTheme\n} from \"./chunk-WFLWAEKG.mjs\";\n\n// src/components/select.ts\nimport { selectAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar $bg = cssVar(\"select-bg\");\nvar _a;\nvar baseStyleField = defineStyle({\n ...(_a = inputTheme.baseStyle) == null ? void 0 : _a.field,\n appearance: \"none\",\n paddingBottom: \"1px\",\n lineHeight: \"normal\",\n bg: $bg.reference,\n [$bg.variable]: \"colors.white\",\n _dark: {\n [$bg.variable]: \"colors.gray.700\"\n },\n \"> option, > optgroup\": {\n bg: $bg.reference\n }\n});\nvar baseStyleIcon = defineStyle({\n width: \"6\",\n height: \"100%\",\n insetEnd: \"2\",\n position: \"relative\",\n color: \"currentColor\",\n fontSize: \"xl\",\n _disabled: {\n opacity: 0.5\n }\n});\nvar baseStyle = definePartsStyle({\n field: baseStyleField,\n icon: baseStyleIcon\n});\nvar iconSpacing = defineStyle({\n paddingInlineEnd: \"8\"\n});\nvar _a2, _b, _c, _d, _e, _f, _g, _h;\nvar sizes = {\n lg: {\n ...(_a2 = inputTheme.sizes) == null ? void 0 : _a2.lg,\n field: {\n ...(_b = inputTheme.sizes) == null ? void 0 : _b.lg.field,\n ...iconSpacing\n }\n },\n md: {\n ...(_c = inputTheme.sizes) == null ? void 0 : _c.md,\n field: {\n ...(_d = inputTheme.sizes) == null ? void 0 : _d.md.field,\n ...iconSpacing\n }\n },\n sm: {\n ...(_e = inputTheme.sizes) == null ? void 0 : _e.sm,\n field: {\n ...(_f = inputTheme.sizes) == null ? void 0 : _f.sm.field,\n ...iconSpacing\n }\n },\n xs: {\n ...(_g = inputTheme.sizes) == null ? void 0 : _g.xs,\n field: {\n ...(_h = inputTheme.sizes) == null ? void 0 : _h.xs.field,\n ...iconSpacing\n },\n icon: {\n insetEnd: \"1\"\n }\n }\n};\nvar selectTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n variants: inputTheme.variants,\n defaultProps: inputTheme.defaultProps\n});\n\nexport {\n selectTheme\n};\n","// src/components/skeleton.ts\nimport {\n cssVar,\n defineStyle,\n defineStyleConfig\n} from \"@chakra-ui/styled-system\";\nvar $startColor = cssVar(\"skeleton-start-color\");\nvar $endColor = cssVar(\"skeleton-end-color\");\nvar baseStyle = defineStyle({\n [$startColor.variable]: \"colors.gray.100\",\n [$endColor.variable]: \"colors.gray.400\",\n _dark: {\n [$startColor.variable]: \"colors.gray.800\",\n [$endColor.variable]: \"colors.gray.600\"\n },\n background: $startColor.reference,\n borderColor: $endColor.reference,\n opacity: 0.7,\n borderRadius: \"sm\"\n});\nvar skeletonTheme = defineStyleConfig({\n baseStyle\n});\n\nexport {\n skeletonTheme\n};\n","// src/components/skip-link.ts\nimport {\n cssVar,\n defineStyle,\n defineStyleConfig\n} from \"@chakra-ui/styled-system\";\nvar $bg = cssVar(\"skip-link-bg\");\nvar baseStyle = defineStyle({\n borderRadius: \"md\",\n fontWeight: \"semibold\",\n _focusVisible: {\n boxShadow: \"outline\",\n padding: \"4\",\n position: \"fixed\",\n top: \"6\",\n insetStart: \"6\",\n [$bg.variable]: \"colors.white\",\n _dark: {\n [$bg.variable]: \"colors.gray.700\"\n },\n bg: $bg.reference\n }\n});\nvar skipLinkTheme = defineStyleConfig({\n baseStyle\n});\n\nexport {\n skipLinkTheme\n};\n","// src/components/slider.ts\nimport { sliderAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nimport { orient } from \"@chakra-ui/theme-tools\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar $thumbSize = cssVar(\"slider-thumb-size\");\nvar $trackSize = cssVar(\"slider-track-size\");\nvar $bg = cssVar(\"slider-bg\");\nvar baseStyleContainer = defineStyle((props) => {\n const { orientation } = props;\n return {\n display: \"inline-block\",\n position: \"relative\",\n cursor: \"pointer\",\n _disabled: {\n opacity: 0.6,\n cursor: \"default\",\n pointerEvents: \"none\"\n },\n ...orient({\n orientation,\n vertical: { h: \"100%\" },\n horizontal: { w: \"100%\" }\n })\n };\n});\nvar baseStyleTrack = defineStyle((props) => {\n const orientationStyles = orient({\n orientation: props.orientation,\n horizontal: { h: $trackSize.reference },\n vertical: { w: $trackSize.reference }\n });\n return {\n ...orientationStyles,\n overflow: \"hidden\",\n borderRadius: \"sm\",\n [$bg.variable]: \"colors.gray.200\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.200\"\n },\n _disabled: {\n [$bg.variable]: \"colors.gray.300\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.300\"\n }\n },\n bg: $bg.reference\n };\n});\nvar baseStyleThumb = defineStyle((props) => {\n const { orientation } = props;\n const orientationStyle = orient({\n orientation,\n vertical: {\n left: \"50%\",\n transform: `translateX(-50%)`,\n _active: {\n transform: `translateX(-50%) scale(1.15)`\n }\n },\n horizontal: {\n top: \"50%\",\n transform: `translateY(-50%)`,\n _active: {\n transform: `translateY(-50%) scale(1.15)`\n }\n }\n });\n return {\n ...orientationStyle,\n w: $thumbSize.reference,\n h: $thumbSize.reference,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"absolute\",\n outline: 0,\n zIndex: 1,\n borderRadius: \"full\",\n bg: \"white\",\n boxShadow: \"base\",\n border: \"1px solid\",\n borderColor: \"transparent\",\n transitionProperty: \"transform\",\n transitionDuration: \"normal\",\n _focusVisible: {\n boxShadow: \"outline\"\n },\n _disabled: {\n bg: \"gray.300\"\n }\n };\n});\nvar baseStyleFilledTrack = defineStyle((props) => {\n const { colorScheme: c } = props;\n return {\n width: \"inherit\",\n height: \"inherit\",\n [$bg.variable]: `colors.${c}.500`,\n _dark: {\n [$bg.variable]: `colors.${c}.200`\n },\n bg: $bg.reference\n };\n});\nvar baseStyle = definePartsStyle((props) => ({\n container: baseStyleContainer(props),\n track: baseStyleTrack(props),\n thumb: baseStyleThumb(props),\n filledTrack: baseStyleFilledTrack(props)\n}));\nvar sizeLg = definePartsStyle({\n container: {\n [$thumbSize.variable]: `sizes.4`,\n [$trackSize.variable]: `sizes.1`\n }\n});\nvar sizeMd = definePartsStyle({\n container: {\n [$thumbSize.variable]: `sizes.3.5`,\n [$trackSize.variable]: `sizes.1`\n }\n});\nvar sizeSm = definePartsStyle({\n container: {\n [$thumbSize.variable]: `sizes.2.5`,\n [$trackSize.variable]: `sizes.0.5`\n }\n});\nvar sizes = {\n lg: sizeLg,\n md: sizeMd,\n sm: sizeSm\n};\nvar sliderTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n defaultProps: {\n size: \"md\",\n colorScheme: \"blue\"\n }\n});\n\nexport {\n sliderTheme\n};\n","// src/components/spinner.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nimport { cssVar } from \"@chakra-ui/theme-tools\";\nvar $size = cssVar(\"spinner-size\");\nvar baseStyle = defineStyle({\n width: [$size.reference],\n height: [$size.reference]\n});\nvar sizes = {\n xs: defineStyle({\n [$size.variable]: \"sizes.3\"\n }),\n sm: defineStyle({\n [$size.variable]: \"sizes.4\"\n }),\n md: defineStyle({\n [$size.variable]: \"sizes.6\"\n }),\n lg: defineStyle({\n [$size.variable]: \"sizes.8\"\n }),\n xl: defineStyle({\n [$size.variable]: \"sizes.12\"\n })\n};\nvar spinnerTheme = defineStyleConfig({\n baseStyle,\n sizes,\n defaultProps: {\n size: \"md\"\n }\n});\n\nexport {\n spinnerTheme\n};\n","// src/components/stat.ts\nimport { statAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar baseStyleLabel = defineStyle({\n fontWeight: \"medium\"\n});\nvar baseStyleHelpText = defineStyle({\n opacity: 0.8,\n marginBottom: \"2\"\n});\nvar baseStyleNumber = defineStyle({\n verticalAlign: \"baseline\",\n fontWeight: \"semibold\"\n});\nvar baseStyleIcon = defineStyle({\n marginEnd: 1,\n w: \"3.5\",\n h: \"3.5\",\n verticalAlign: \"middle\"\n});\nvar baseStyle = definePartsStyle({\n container: {},\n label: baseStyleLabel,\n helpText: baseStyleHelpText,\n number: baseStyleNumber,\n icon: baseStyleIcon\n});\nvar sizes = {\n md: definePartsStyle({\n label: { fontSize: \"sm\" },\n helpText: { fontSize: \"sm\" },\n number: { fontSize: \"2xl\" }\n })\n};\nvar statTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n defaultProps: {\n size: \"md\"\n }\n});\n\nexport {\n statTheme\n};\n","// src/components/kbd.ts\nimport {\n cssVar,\n defineStyle,\n defineStyleConfig\n} from \"@chakra-ui/styled-system\";\nvar $bg = cssVar(\"kbd-bg\");\nvar baseStyle = defineStyle({\n [$bg.variable]: \"colors.gray.100\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.100\"\n },\n bg: $bg.reference,\n borderRadius: \"md\",\n borderWidth: \"1px\",\n borderBottomWidth: \"3px\",\n fontSize: \"0.8em\",\n fontWeight: \"bold\",\n lineHeight: \"normal\",\n px: \"0.4em\",\n whiteSpace: \"nowrap\"\n});\nvar kbdTheme = defineStyleConfig({\n baseStyle\n});\n\nexport {\n kbdTheme\n};\n","// src/components/link.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nvar baseStyle = defineStyle({\n transitionProperty: \"common\",\n transitionDuration: \"fast\",\n transitionTimingFunction: \"ease-out\",\n cursor: \"pointer\",\n textDecoration: \"none\",\n outline: \"none\",\n color: \"inherit\",\n _hover: {\n textDecoration: \"underline\"\n },\n _focusVisible: {\n boxShadow: \"outline\"\n }\n});\nvar linkTheme = defineStyleConfig({\n baseStyle\n});\n\nexport {\n linkTheme\n};\n","// src/components/list.ts\nimport { listAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar baseStyleIcon = defineStyle({\n marginEnd: \"2\",\n display: \"inline\",\n verticalAlign: \"text-bottom\"\n});\nvar baseStyle = definePartsStyle({\n icon: baseStyleIcon\n});\nvar listTheme = defineMultiStyleConfig({\n baseStyle\n});\n\nexport {\n listTheme\n};\n","// src/components/menu.ts\nimport { menuAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar $bg = cssVar(\"menu-bg\");\nvar $shadow = cssVar(\"menu-shadow\");\nvar baseStyleList = defineStyle({\n [$bg.variable]: \"#fff\",\n [$shadow.variable]: \"shadows.sm\",\n _dark: {\n [$bg.variable]: \"colors.gray.700\",\n [$shadow.variable]: \"shadows.dark-lg\"\n },\n color: \"inherit\",\n minW: \"3xs\",\n py: \"2\",\n zIndex: 1,\n borderRadius: \"md\",\n borderWidth: \"1px\",\n bg: $bg.reference,\n boxShadow: $shadow.reference\n});\nvar baseStyleItem = defineStyle({\n py: \"1.5\",\n px: \"3\",\n transitionProperty: \"background\",\n transitionDuration: \"ultra-fast\",\n transitionTimingFunction: \"ease-in\",\n _focus: {\n [$bg.variable]: \"colors.gray.100\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.100\"\n }\n },\n _active: {\n [$bg.variable]: \"colors.gray.200\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.200\"\n }\n },\n _expanded: {\n [$bg.variable]: \"colors.gray.100\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.100\"\n }\n },\n _disabled: {\n opacity: 0.4,\n cursor: \"not-allowed\"\n },\n bg: $bg.reference\n});\nvar baseStyleGroupTitle = defineStyle({\n mx: 4,\n my: 2,\n fontWeight: \"semibold\",\n fontSize: \"sm\"\n});\nvar baseStyleCommand = defineStyle({\n opacity: 0.6\n});\nvar baseStyleDivider = defineStyle({\n border: 0,\n borderBottom: \"1px solid\",\n borderColor: \"inherit\",\n my: \"2\",\n opacity: 0.6\n});\nvar baseStyleButton = defineStyle({\n transitionProperty: \"common\",\n transitionDuration: \"normal\"\n});\nvar baseStyle = definePartsStyle({\n button: baseStyleButton,\n list: baseStyleList,\n item: baseStyleItem,\n groupTitle: baseStyleGroupTitle,\n command: baseStyleCommand,\n divider: baseStyleDivider\n});\nvar menuTheme = defineMultiStyleConfig({\n baseStyle\n});\n\nexport {\n menuTheme\n};\n","import {\n runIfFn\n} from \"./chunk-EBS47JIL.mjs\";\n\n// src/components/modal.ts\nimport { modalAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar $bg = cssVar(\"modal-bg\");\nvar $shadow = cssVar(\"modal-shadow\");\nvar baseStyleOverlay = defineStyle({\n bg: \"blackAlpha.600\",\n zIndex: \"modal\"\n});\nvar baseStyleDialogContainer = defineStyle((props) => {\n const { isCentered, scrollBehavior } = props;\n return {\n display: \"flex\",\n zIndex: \"modal\",\n justifyContent: \"center\",\n alignItems: isCentered ? \"center\" : \"flex-start\",\n overflow: scrollBehavior === \"inside\" ? \"hidden\" : \"auto\",\n overscrollBehaviorY: \"none\"\n };\n});\nvar baseStyleDialog = defineStyle((props) => {\n const { isCentered, scrollBehavior } = props;\n return {\n borderRadius: \"md\",\n color: \"inherit\",\n my: isCentered ? \"auto\" : \"16\",\n mx: isCentered ? \"auto\" : void 0,\n zIndex: \"modal\",\n maxH: scrollBehavior === \"inside\" ? \"calc(100% - 7.5rem)\" : void 0,\n [$bg.variable]: \"colors.white\",\n [$shadow.variable]: \"shadows.lg\",\n _dark: {\n [$bg.variable]: \"colors.gray.700\",\n [$shadow.variable]: \"shadows.dark-lg\"\n },\n bg: $bg.reference,\n boxShadow: $shadow.reference\n };\n});\nvar baseStyleHeader = defineStyle({\n px: \"6\",\n py: \"4\",\n fontSize: \"xl\",\n fontWeight: \"semibold\"\n});\nvar baseStyleCloseButton = defineStyle({\n position: \"absolute\",\n top: \"2\",\n insetEnd: \"3\"\n});\nvar baseStyleBody = defineStyle((props) => {\n const { scrollBehavior } = props;\n return {\n px: \"6\",\n py: \"2\",\n flex: \"1\",\n overflow: scrollBehavior === \"inside\" ? \"auto\" : void 0\n };\n});\nvar baseStyleFooter = defineStyle({\n px: \"6\",\n py: \"4\"\n});\nvar baseStyle = definePartsStyle((props) => ({\n overlay: baseStyleOverlay,\n dialogContainer: runIfFn(baseStyleDialogContainer, props),\n dialog: runIfFn(baseStyleDialog, props),\n header: baseStyleHeader,\n closeButton: baseStyleCloseButton,\n body: runIfFn(baseStyleBody, props),\n footer: baseStyleFooter\n}));\nfunction getSize(value) {\n if (value === \"full\") {\n return definePartsStyle({\n dialog: {\n maxW: \"100vw\",\n minH: \"$100vh\",\n my: \"0\",\n borderRadius: \"0\"\n }\n });\n }\n return definePartsStyle({\n dialog: { maxW: value }\n });\n}\nvar sizes = {\n xs: getSize(\"xs\"),\n sm: getSize(\"sm\"),\n md: getSize(\"md\"),\n lg: getSize(\"lg\"),\n xl: getSize(\"xl\"),\n \"2xl\": getSize(\"2xl\"),\n \"3xl\": getSize(\"3xl\"),\n \"4xl\": getSize(\"4xl\"),\n \"5xl\": getSize(\"5xl\"),\n \"6xl\": getSize(\"6xl\"),\n full: getSize(\"full\")\n};\nvar modalTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n defaultProps: { size: \"md\" }\n});\n\nexport {\n modalTheme\n};\n","import {\n typography_default\n} from \"./chunk-HOOF7HHD.mjs\";\nimport {\n inputTheme\n} from \"./chunk-WFLWAEKG.mjs\";\nimport {\n runIfFn\n} from \"./chunk-EBS47JIL.mjs\";\n\n// src/components/number-input.ts\nimport { numberInputAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nimport { calc, cssVar } from \"@chakra-ui/theme-tools\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar $stepperWidth = cssVar(\"number-input-stepper-width\");\nvar $inputPadding = cssVar(\"number-input-input-padding\");\nvar inputPaddingValue = calc($stepperWidth).add(\"0.5rem\").toString();\nvar $bg = cssVar(\"number-input-bg\");\nvar $fg = cssVar(\"number-input-color\");\nvar $border = cssVar(\"number-input-border-color\");\nvar baseStyleRoot = defineStyle({\n [$stepperWidth.variable]: \"sizes.6\",\n [$inputPadding.variable]: inputPaddingValue\n});\nvar baseStyleField = defineStyle(\n (props) => {\n var _a, _b;\n return (_b = (_a = runIfFn(inputTheme.baseStyle, props)) == null ? void 0 : _a.field) != null ? _b : {};\n }\n);\nvar baseStyleStepperGroup = defineStyle({\n width: $stepperWidth.reference\n});\nvar baseStyleStepper = defineStyle({\n borderStart: \"1px solid\",\n borderStartColor: $border.reference,\n color: $fg.reference,\n bg: $bg.reference,\n [$fg.variable]: \"colors.chakra-body-text\",\n [$border.variable]: \"colors.chakra-border-color\",\n _dark: {\n [$fg.variable]: \"colors.whiteAlpha.800\",\n [$border.variable]: \"colors.whiteAlpha.300\"\n },\n _active: {\n [$bg.variable]: \"colors.gray.200\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.300\"\n }\n },\n _disabled: {\n opacity: 0.4,\n cursor: \"not-allowed\"\n }\n});\nvar baseStyle = definePartsStyle((props) => {\n var _a;\n return {\n root: baseStyleRoot,\n field: (_a = runIfFn(baseStyleField, props)) != null ? _a : {},\n stepperGroup: baseStyleStepperGroup,\n stepper: baseStyleStepper\n };\n});\nfunction getSize(size) {\n var _a, _b, _c;\n const sizeStyle = (_a = inputTheme.sizes) == null ? void 0 : _a[size];\n const radius = {\n lg: \"md\",\n md: \"md\",\n sm: \"sm\",\n xs: \"sm\"\n };\n const _fontSize = (_c = (_b = sizeStyle.field) == null ? void 0 : _b.fontSize) != null ? _c : \"md\";\n const fontSize = typography_default.fontSizes[_fontSize];\n return definePartsStyle({\n field: {\n ...sizeStyle.field,\n paddingInlineEnd: $inputPadding.reference,\n verticalAlign: \"top\"\n },\n stepper: {\n fontSize: calc(fontSize).multiply(0.75).toString(),\n _first: {\n borderTopEndRadius: radius[size]\n },\n _last: {\n borderBottomEndRadius: radius[size],\n mt: \"-1px\",\n borderTopWidth: 1\n }\n }\n });\n}\nvar sizes = {\n xs: getSize(\"xs\"),\n sm: getSize(\"sm\"),\n md: getSize(\"md\"),\n lg: getSize(\"lg\")\n};\nvar numberInputTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n variants: inputTheme.variants,\n defaultProps: inputTheme.defaultProps\n});\n\nexport {\n numberInputTheme\n};\n","import {\n inputTheme\n} from \"./chunk-WFLWAEKG.mjs\";\nimport {\n runIfFn\n} from \"./chunk-EBS47JIL.mjs\";\n\n// src/components/pin-input.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nvar _a;\nvar baseStyle = defineStyle({\n ...(_a = inputTheme.baseStyle) == null ? void 0 : _a.field,\n textAlign: \"center\"\n});\nvar sizes = {\n lg: defineStyle({\n fontSize: \"lg\",\n w: 12,\n h: 12,\n borderRadius: \"md\"\n }),\n md: defineStyle({\n fontSize: \"md\",\n w: 10,\n h: 10,\n borderRadius: \"md\"\n }),\n sm: defineStyle({\n fontSize: \"sm\",\n w: 8,\n h: 8,\n borderRadius: \"sm\"\n }),\n xs: defineStyle({\n fontSize: \"xs\",\n w: 6,\n h: 6,\n borderRadius: \"sm\"\n })\n};\nvar _a2, _b;\nvar variants = {\n outline: defineStyle(\n (props) => {\n var _a3, _b2, _c;\n return (_c = (_b2 = runIfFn((_a3 = inputTheme.variants) == null ? void 0 : _a3.outline, props)) == null ? void 0 : _b2.field) != null ? _c : {};\n }\n ),\n flushed: defineStyle(\n (props) => {\n var _a3, _b2, _c;\n return (_c = (_b2 = runIfFn((_a3 = inputTheme.variants) == null ? void 0 : _a3.flushed, props)) == null ? void 0 : _b2.field) != null ? _c : {};\n }\n ),\n filled: defineStyle(\n (props) => {\n var _a3, _b2, _c;\n return (_c = (_b2 = runIfFn((_a3 = inputTheme.variants) == null ? void 0 : _a3.filled, props)) == null ? void 0 : _b2.field) != null ? _c : {};\n }\n ),\n unstyled: (_b = (_a2 = inputTheme.variants) == null ? void 0 : _a2.unstyled.field) != null ? _b : {}\n};\nvar pinInputTheme = defineStyleConfig({\n baseStyle,\n sizes,\n variants,\n defaultProps: inputTheme.defaultProps\n});\n\nexport {\n pinInputTheme\n};\n","// src/components/popover.ts\nimport { popoverAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nimport { cssVar } from \"@chakra-ui/theme-tools\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar $popperBg = cssVar(\"popper-bg\");\nvar $arrowBg = cssVar(\"popper-arrow-bg\");\nvar $arrowShadowColor = cssVar(\"popper-arrow-shadow-color\");\nvar baseStylePopper = defineStyle({ zIndex: 10 });\nvar baseStyleContent = defineStyle({\n [$popperBg.variable]: `colors.white`,\n bg: $popperBg.reference,\n [$arrowBg.variable]: $popperBg.reference,\n [$arrowShadowColor.variable]: `colors.gray.200`,\n _dark: {\n [$popperBg.variable]: `colors.gray.700`,\n [$arrowShadowColor.variable]: `colors.whiteAlpha.300`\n },\n width: \"xs\",\n border: \"1px solid\",\n borderColor: \"inherit\",\n borderRadius: \"md\",\n boxShadow: \"sm\",\n zIndex: \"inherit\",\n _focusVisible: {\n outline: 0,\n boxShadow: \"outline\"\n }\n});\nvar baseStyleHeader = defineStyle({\n px: 3,\n py: 2,\n borderBottomWidth: \"1px\"\n});\nvar baseStyleBody = defineStyle({\n px: 3,\n py: 2\n});\nvar baseStyleFooter = defineStyle({\n px: 3,\n py: 2,\n borderTopWidth: \"1px\"\n});\nvar baseStyleCloseButton = defineStyle({\n position: \"absolute\",\n borderRadius: \"md\",\n top: 1,\n insetEnd: 2,\n padding: 2\n});\nvar baseStyle = definePartsStyle({\n popper: baseStylePopper,\n content: baseStyleContent,\n header: baseStyleHeader,\n body: baseStyleBody,\n footer: baseStyleFooter,\n closeButton: baseStyleCloseButton\n});\nvar popoverTheme = defineMultiStyleConfig({\n baseStyle\n});\n\nexport {\n popoverTheme\n};\n","import {\n runIfFn\n} from \"./chunk-EBS47JIL.mjs\";\n\n// src/components/drawer.ts\nimport { drawerAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nvar $bg = cssVar(\"drawer-bg\");\nvar $bs = cssVar(\"drawer-box-shadow\");\nfunction getSize(value) {\n if (value === \"full\") {\n return definePartsStyle({\n dialog: { maxW: \"100vw\", h: \"100vh\" }\n });\n }\n return definePartsStyle({\n dialog: { maxW: value }\n });\n}\nvar baseStyleOverlay = defineStyle({\n bg: \"blackAlpha.600\",\n zIndex: \"overlay\"\n});\nvar baseStyleDialogContainer = defineStyle({\n display: \"flex\",\n zIndex: \"modal\",\n justifyContent: \"center\"\n});\nvar baseStyleDialog = defineStyle((props) => {\n const { isFullHeight } = props;\n return {\n ...isFullHeight && { height: \"100vh\" },\n zIndex: \"modal\",\n maxH: \"100vh\",\n color: \"inherit\",\n [$bg.variable]: \"colors.white\",\n [$bs.variable]: \"shadows.lg\",\n _dark: {\n [$bg.variable]: \"colors.gray.700\",\n [$bs.variable]: \"shadows.dark-lg\"\n },\n bg: $bg.reference,\n boxShadow: $bs.reference\n };\n});\nvar baseStyleHeader = defineStyle({\n px: \"6\",\n py: \"4\",\n fontSize: \"xl\",\n fontWeight: \"semibold\"\n});\nvar baseStyleCloseButton = defineStyle({\n position: \"absolute\",\n top: \"2\",\n insetEnd: \"3\"\n});\nvar baseStyleBody = defineStyle({\n px: \"6\",\n py: \"2\",\n flex: \"1\",\n overflow: \"auto\"\n});\nvar baseStyleFooter = defineStyle({\n px: \"6\",\n py: \"4\"\n});\nvar baseStyle = definePartsStyle((props) => ({\n overlay: baseStyleOverlay,\n dialogContainer: baseStyleDialogContainer,\n dialog: runIfFn(baseStyleDialog, props),\n header: baseStyleHeader,\n closeButton: baseStyleCloseButton,\n body: baseStyleBody,\n footer: baseStyleFooter\n}));\nvar sizes = {\n xs: getSize(\"xs\"),\n sm: getSize(\"md\"),\n md: getSize(\"lg\"),\n lg: getSize(\"2xl\"),\n xl: getSize(\"4xl\"),\n full: getSize(\"full\")\n};\nvar drawerTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n defaultProps: {\n size: \"xs\"\n }\n});\n\nexport {\n drawerTheme\n};\n","// src/components/editable.ts\nimport { editableAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nvar baseStylePreview = defineStyle({\n borderRadius: \"md\",\n py: \"1\",\n transitionProperty: \"common\",\n transitionDuration: \"normal\"\n});\nvar baseStyleInput = defineStyle({\n borderRadius: \"md\",\n py: \"1\",\n transitionProperty: \"common\",\n transitionDuration: \"normal\",\n width: \"full\",\n _focusVisible: { boxShadow: \"outline\" },\n _placeholder: { opacity: 0.6 }\n});\nvar baseStyleTextarea = defineStyle({\n borderRadius: \"md\",\n py: \"1\",\n transitionProperty: \"common\",\n transitionDuration: \"normal\",\n width: \"full\",\n _focusVisible: { boxShadow: \"outline\" },\n _placeholder: { opacity: 0.6 }\n});\nvar baseStyle = definePartsStyle({\n preview: baseStylePreview,\n input: baseStyleInput,\n textarea: baseStyleTextarea\n});\nvar editableTheme = defineMultiStyleConfig({\n baseStyle\n});\n\nexport {\n editableTheme\n};\n","// src/components/form-control.ts\nimport { formAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nvar $fg = cssVar(\"form-control-color\");\nvar baseStyleRequiredIndicator = defineStyle({\n marginStart: \"1\",\n [$fg.variable]: \"colors.red.500\",\n _dark: {\n [$fg.variable]: \"colors.red.300\"\n },\n color: $fg.reference\n});\nvar baseStyleHelperText = defineStyle({\n mt: \"2\",\n [$fg.variable]: \"colors.gray.600\",\n _dark: {\n [$fg.variable]: \"colors.whiteAlpha.600\"\n },\n color: $fg.reference,\n lineHeight: \"normal\",\n fontSize: \"sm\"\n});\nvar baseStyle = definePartsStyle({\n container: {\n width: \"100%\",\n position: \"relative\"\n },\n requiredIndicator: baseStyleRequiredIndicator,\n helperText: baseStyleHelperText\n});\nvar formTheme = defineMultiStyleConfig({\n baseStyle\n});\n\nexport {\n formTheme\n};\n","// src/components/form-error.ts\nimport { formErrorAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nvar $fg = cssVar(\"form-error-color\");\nvar baseStyleText = defineStyle({\n [$fg.variable]: `colors.red.500`,\n _dark: {\n [$fg.variable]: `colors.red.300`\n },\n color: $fg.reference,\n mt: \"2\",\n fontSize: \"sm\",\n lineHeight: \"normal\"\n});\nvar baseStyleIcon = defineStyle({\n marginEnd: \"0.5em\",\n [$fg.variable]: `colors.red.500`,\n _dark: {\n [$fg.variable]: `colors.red.300`\n },\n color: $fg.reference\n});\nvar baseStyle = definePartsStyle({\n text: baseStyleText,\n icon: baseStyleIcon\n});\nvar formErrorTheme = defineMultiStyleConfig({\n baseStyle\n});\n\nexport {\n formErrorTheme\n};\n","// src/components/form-label.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nvar baseStyle = defineStyle({\n fontSize: \"md\",\n marginEnd: \"3\",\n mb: \"2\",\n fontWeight: \"medium\",\n transitionProperty: \"common\",\n transitionDuration: \"normal\",\n opacity: 1,\n _disabled: {\n opacity: 0.4\n }\n});\nvar formLabelTheme = defineStyleConfig({\n baseStyle\n});\n\nexport {\n formLabelTheme\n};\n","// src/components/heading.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nvar baseStyle = defineStyle({\n fontFamily: \"heading\",\n fontWeight: \"bold\"\n});\nvar sizes = {\n \"4xl\": defineStyle({\n fontSize: [\"6xl\", null, \"7xl\"],\n lineHeight: 1\n }),\n \"3xl\": defineStyle({\n fontSize: [\"5xl\", null, \"6xl\"],\n lineHeight: 1\n }),\n \"2xl\": defineStyle({\n fontSize: [\"4xl\", null, \"5xl\"],\n lineHeight: [1.2, null, 1]\n }),\n xl: defineStyle({\n fontSize: [\"3xl\", null, \"4xl\"],\n lineHeight: [1.33, null, 1.2]\n }),\n lg: defineStyle({\n fontSize: [\"2xl\", null, \"3xl\"],\n lineHeight: [1.33, null, 1.2]\n }),\n md: defineStyle({\n fontSize: \"xl\",\n lineHeight: 1.2\n }),\n sm: defineStyle({\n fontSize: \"md\",\n lineHeight: 1.2\n }),\n xs: defineStyle({\n fontSize: \"sm\",\n lineHeight: 1.2\n })\n};\nvar headingTheme = defineStyleConfig({\n baseStyle,\n sizes,\n defaultProps: {\n size: \"xl\"\n }\n});\n\nexport {\n headingTheme\n};\n","// src/components/breadcrumb.ts\nimport { breadcrumbAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(parts.keys);\nvar $decor = cssVar(\"breadcrumb-link-decor\");\nvar baseStyleLink = defineStyle({\n transitionProperty: \"common\",\n transitionDuration: \"fast\",\n transitionTimingFunction: \"ease-out\",\n outline: \"none\",\n color: \"inherit\",\n textDecoration: $decor.reference,\n [$decor.variable]: \"none\",\n \"&:not([aria-current=page])\": {\n cursor: \"pointer\",\n _hover: {\n [$decor.variable]: \"underline\"\n },\n _focusVisible: {\n boxShadow: \"outline\"\n }\n }\n});\nvar baseStyle = definePartsStyle({\n link: baseStyleLink\n});\nvar breadcrumbTheme = defineMultiStyleConfig({\n baseStyle\n});\n\nexport {\n breadcrumbTheme\n};\n","import {\n runIfFn\n} from \"./chunk-EBS47JIL.mjs\";\n\n// src/components/button.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nimport { mode, transparentize } from \"@chakra-ui/theme-tools\";\nvar baseStyle = defineStyle({\n lineHeight: \"1.2\",\n borderRadius: \"md\",\n fontWeight: \"semibold\",\n transitionProperty: \"common\",\n transitionDuration: \"normal\",\n _focusVisible: {\n boxShadow: \"outline\"\n },\n _disabled: {\n opacity: 0.4,\n cursor: \"not-allowed\",\n boxShadow: \"none\"\n },\n _hover: {\n _disabled: {\n bg: \"initial\"\n }\n }\n});\nvar variantGhost = defineStyle((props) => {\n const { colorScheme: c, theme } = props;\n if (c === \"gray\") {\n return {\n color: mode(`inherit`, `whiteAlpha.900`)(props),\n _hover: {\n bg: mode(`gray.100`, `whiteAlpha.200`)(props)\n },\n _active: { bg: mode(`gray.200`, `whiteAlpha.300`)(props) }\n };\n }\n const darkHoverBg = transparentize(`${c}.200`, 0.12)(theme);\n const darkActiveBg = transparentize(`${c}.200`, 0.24)(theme);\n return {\n color: mode(`${c}.600`, `${c}.200`)(props),\n bg: \"transparent\",\n _hover: {\n bg: mode(`${c}.50`, darkHoverBg)(props)\n },\n _active: {\n bg: mode(`${c}.100`, darkActiveBg)(props)\n }\n };\n});\nvar variantOutline = defineStyle((props) => {\n const { colorScheme: c } = props;\n const borderColor = mode(`gray.200`, `whiteAlpha.300`)(props);\n return {\n border: \"1px solid\",\n borderColor: c === \"gray\" ? borderColor : \"currentColor\",\n \".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)\": { marginEnd: \"-1px\" },\n \".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)\": { marginBottom: \"-1px\" },\n ...runIfFn(variantGhost, props)\n };\n});\nvar accessibleColorMap = {\n yellow: {\n bg: \"yellow.400\",\n color: \"black\",\n hoverBg: \"yellow.500\",\n activeBg: \"yellow.600\"\n },\n cyan: {\n bg: \"cyan.400\",\n color: \"black\",\n hoverBg: \"cyan.500\",\n activeBg: \"cyan.600\"\n }\n};\nvar variantSolid = defineStyle((props) => {\n var _a;\n const { colorScheme: c } = props;\n if (c === \"gray\") {\n const bg2 = mode(`gray.100`, `whiteAlpha.200`)(props);\n return {\n bg: bg2,\n _hover: {\n bg: mode(`gray.200`, `whiteAlpha.300`)(props),\n _disabled: {\n bg: bg2\n }\n },\n _active: { bg: mode(`gray.300`, `whiteAlpha.400`)(props) }\n };\n }\n const {\n bg = `${c}.500`,\n color = \"white\",\n hoverBg = `${c}.600`,\n activeBg = `${c}.700`\n } = (_a = accessibleColorMap[c]) != null ? _a : {};\n const background = mode(bg, `${c}.200`)(props);\n return {\n bg: background,\n color: mode(color, `gray.800`)(props),\n _hover: {\n bg: mode(hoverBg, `${c}.300`)(props),\n _disabled: {\n bg: background\n }\n },\n _active: { bg: mode(activeBg, `${c}.400`)(props) }\n };\n});\nvar variantLink = defineStyle((props) => {\n const { colorScheme: c } = props;\n return {\n padding: 0,\n height: \"auto\",\n lineHeight: \"normal\",\n verticalAlign: \"baseline\",\n color: mode(`${c}.500`, `${c}.200`)(props),\n _hover: {\n textDecoration: \"underline\",\n _disabled: {\n textDecoration: \"none\"\n }\n },\n _active: {\n color: mode(`${c}.700`, `${c}.500`)(props)\n }\n };\n});\nvar variantUnstyled = defineStyle({\n bg: \"none\",\n color: \"inherit\",\n display: \"inline\",\n lineHeight: \"inherit\",\n m: \"0\",\n p: \"0\"\n});\nvar variants = {\n ghost: variantGhost,\n outline: variantOutline,\n solid: variantSolid,\n link: variantLink,\n unstyled: variantUnstyled\n};\nvar sizes = {\n lg: defineStyle({\n h: \"12\",\n minW: \"12\",\n fontSize: \"lg\",\n px: \"6\"\n }),\n md: defineStyle({\n h: \"10\",\n minW: \"10\",\n fontSize: \"md\",\n px: \"4\"\n }),\n sm: defineStyle({\n h: \"8\",\n minW: \"8\",\n fontSize: \"sm\",\n px: \"3\"\n }),\n xs: defineStyle({\n h: \"6\",\n minW: \"6\",\n fontSize: \"xs\",\n px: \"2\"\n })\n};\nvar buttonTheme = defineStyleConfig({\n baseStyle,\n variants,\n sizes,\n defaultProps: {\n variant: \"solid\",\n size: \"md\",\n colorScheme: \"gray\"\n }\n});\n\nexport {\n buttonTheme\n};\n","// src/components/card.ts\nimport { cardAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport { createMultiStyleConfigHelpers, cssVar } from \"@chakra-ui/styled-system\";\nvar { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nvar $bg = cssVar(\"card-bg\");\nvar $padding = cssVar(\"card-padding\");\nvar $shadow = cssVar(\"card-shadow\");\nvar $radius = cssVar(\"card-radius\");\nvar $border = cssVar(\"card-border-width\", \"0\");\nvar $borderColor = cssVar(\"card-border-color\");\nvar baseStyle = definePartsStyle({\n container: {\n [$bg.variable]: \"colors.chakra-body-bg\",\n backgroundColor: $bg.reference,\n boxShadow: $shadow.reference,\n borderRadius: $radius.reference,\n color: \"chakra-body-text\",\n borderWidth: $border.reference,\n borderColor: $borderColor.reference\n },\n body: {\n padding: $padding.reference,\n flex: \"1 1 0%\"\n },\n header: {\n padding: $padding.reference\n },\n footer: {\n padding: $padding.reference\n }\n});\nvar sizes = {\n sm: definePartsStyle({\n container: {\n [$radius.variable]: \"radii.base\",\n [$padding.variable]: \"space.3\"\n }\n }),\n md: definePartsStyle({\n container: {\n [$radius.variable]: \"radii.md\",\n [$padding.variable]: \"space.5\"\n }\n }),\n lg: definePartsStyle({\n container: {\n [$radius.variable]: \"radii.xl\",\n [$padding.variable]: \"space.7\"\n }\n })\n};\nvar variants = {\n elevated: definePartsStyle({\n container: {\n [$shadow.variable]: \"shadows.base\",\n _dark: {\n [$bg.variable]: \"colors.gray.700\"\n }\n }\n }),\n outline: definePartsStyle({\n container: {\n [$border.variable]: \"1px\",\n [$borderColor.variable]: \"colors.chakra-border-color\"\n }\n }),\n filled: definePartsStyle({\n container: {\n [$bg.variable]: \"colors.chakra-subtle-bg\"\n }\n }),\n unstyled: {\n body: {\n [$padding.variable]: 0\n },\n header: {\n [$padding.variable]: 0\n },\n footer: {\n [$padding.variable]: 0\n }\n }\n};\nvar cardTheme = defineMultiStyleConfig({\n baseStyle,\n variants,\n sizes,\n defaultProps: {\n variant: \"elevated\",\n size: \"md\"\n }\n});\n\nexport {\n cardTheme\n};\n","// src/components/close-button.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nimport { cssVar } from \"@chakra-ui/theme-tools\";\nvar $size = cssVar(\"close-button-size\");\nvar $bg = cssVar(\"close-button-bg\");\nvar baseStyle = defineStyle({\n w: [$size.reference],\n h: [$size.reference],\n borderRadius: \"md\",\n transitionProperty: \"common\",\n transitionDuration: \"normal\",\n _disabled: {\n opacity: 0.4,\n cursor: \"not-allowed\",\n boxShadow: \"none\"\n },\n _hover: {\n [$bg.variable]: \"colors.blackAlpha.100\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.100\"\n }\n },\n _active: {\n [$bg.variable]: \"colors.blackAlpha.200\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.200\"\n }\n },\n _focusVisible: {\n boxShadow: \"outline\"\n },\n bg: $bg.reference\n});\nvar sizes = {\n lg: defineStyle({\n [$size.variable]: \"sizes.10\",\n fontSize: \"md\"\n }),\n md: defineStyle({\n [$size.variable]: \"sizes.8\",\n fontSize: \"xs\"\n }),\n sm: defineStyle({\n [$size.variable]: \"sizes.6\",\n fontSize: \"2xs\"\n })\n};\nvar closeButtonTheme = defineStyleConfig({\n baseStyle,\n sizes,\n defaultProps: {\n size: \"md\"\n }\n});\n\nexport {\n closeButtonTheme\n};\n","import {\n badgeTheme,\n vars\n} from \"./chunk-IBJP6BGU.mjs\";\n\n// src/components/code.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nvar { variants, defaultProps } = badgeTheme;\nvar baseStyle = defineStyle({\n fontFamily: \"mono\",\n fontSize: \"sm\",\n px: \"0.2em\",\n borderRadius: \"sm\",\n bg: vars.bg.reference,\n color: vars.color.reference,\n boxShadow: vars.shadow.reference\n});\nvar codeTheme = defineStyleConfig({\n baseStyle,\n variants,\n defaultProps\n});\n\nexport {\n codeTheme\n};\n","// src/components/container.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nvar baseStyle = defineStyle({\n w: \"100%\",\n mx: \"auto\",\n maxW: \"prose\",\n px: \"4\"\n});\nvar containerTheme = defineStyleConfig({\n baseStyle\n});\n\nexport {\n containerTheme\n};\n","// src/components/divider.ts\nimport { defineStyle, defineStyleConfig } from \"@chakra-ui/styled-system\";\nvar baseStyle = defineStyle({\n opacity: 0.6,\n borderColor: \"inherit\"\n});\nvar variantSolid = defineStyle({\n borderStyle: \"solid\"\n});\nvar variantDashed = defineStyle({\n borderStyle: \"dashed\"\n});\nvar variants = {\n solid: variantSolid,\n dashed: variantDashed\n};\nvar dividerTheme = defineStyleConfig({\n baseStyle,\n variants,\n defaultProps: {\n variant: \"solid\"\n }\n});\n\nexport {\n dividerTheme\n};\n","// src/components/accordion.ts\nimport { accordionAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nvar { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nvar baseStyleContainer = defineStyle({\n borderTopWidth: \"1px\",\n borderColor: \"inherit\",\n _last: {\n borderBottomWidth: \"1px\"\n }\n});\nvar baseStyleButton = defineStyle({\n transitionProperty: \"common\",\n transitionDuration: \"normal\",\n fontSize: \"md\",\n _focusVisible: {\n boxShadow: \"outline\"\n },\n _hover: {\n bg: \"blackAlpha.50\"\n },\n _disabled: {\n opacity: 0.4,\n cursor: \"not-allowed\"\n },\n px: \"4\",\n py: \"2\"\n});\nvar baseStylePanel = defineStyle({\n pt: \"2\",\n px: \"4\",\n pb: \"5\"\n});\nvar baseStyleIcon = defineStyle({\n fontSize: \"1.25em\"\n});\nvar baseStyle = definePartsStyle({\n container: baseStyleContainer,\n button: baseStyleButton,\n panel: baseStylePanel,\n icon: baseStyleIcon\n});\nvar accordionTheme = defineMultiStyleConfig({ baseStyle });\n\nexport {\n accordionTheme\n};\n","// src/components/alert.ts\nimport { alertAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar\n} from \"@chakra-ui/styled-system\";\nimport { transparentize } from \"@chakra-ui/theme-tools\";\nvar { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nvar $fg = cssVar(\"alert-fg\");\nvar $bg = cssVar(\"alert-bg\");\nvar baseStyle = definePartsStyle({\n container: {\n bg: $bg.reference,\n px: \"4\",\n py: \"3\"\n },\n title: {\n fontWeight: \"bold\",\n lineHeight: \"6\",\n marginEnd: \"2\"\n },\n description: {\n lineHeight: \"6\"\n },\n icon: {\n color: $fg.reference,\n flexShrink: 0,\n marginEnd: \"3\",\n w: \"5\",\n h: \"6\"\n },\n spinner: {\n color: $fg.reference,\n flexShrink: 0,\n marginEnd: \"3\",\n w: \"5\",\n h: \"5\"\n }\n});\nfunction getBg(props) {\n const { theme, colorScheme: c } = props;\n const darkBg = transparentize(`${c}.200`, 0.16)(theme);\n return {\n light: `colors.${c}.100`,\n dark: darkBg\n };\n}\nvar variantSubtle = definePartsStyle((props) => {\n const { colorScheme: c } = props;\n const bg = getBg(props);\n return {\n container: {\n [$fg.variable]: `colors.${c}.500`,\n [$bg.variable]: bg.light,\n _dark: {\n [$fg.variable]: `colors.${c}.200`,\n [$bg.variable]: bg.dark\n }\n }\n };\n});\nvar variantLeftAccent = definePartsStyle((props) => {\n const { colorScheme: c } = props;\n const bg = getBg(props);\n return {\n container: {\n [$fg.variable]: `colors.${c}.500`,\n [$bg.variable]: bg.light,\n _dark: {\n [$fg.variable]: `colors.${c}.200`,\n [$bg.variable]: bg.dark\n },\n paddingStart: \"3\",\n borderStartWidth: \"4px\",\n borderStartColor: $fg.reference\n }\n };\n});\nvar variantTopAccent = definePartsStyle((props) => {\n const { colorScheme: c } = props;\n const bg = getBg(props);\n return {\n container: {\n [$fg.variable]: `colors.${c}.500`,\n [$bg.variable]: bg.light,\n _dark: {\n [$fg.variable]: `colors.${c}.200`,\n [$bg.variable]: bg.dark\n },\n pt: \"2\",\n borderTopWidth: \"4px\",\n borderTopColor: $fg.reference\n }\n };\n});\nvar variantSolid = definePartsStyle((props) => {\n const { colorScheme: c } = props;\n return {\n container: {\n [$fg.variable]: `colors.white`,\n [$bg.variable]: `colors.${c}.500`,\n _dark: {\n [$fg.variable]: `colors.gray.900`,\n [$bg.variable]: `colors.${c}.200`\n },\n color: $fg.reference\n }\n };\n});\nvar variants = {\n subtle: variantSubtle,\n \"left-accent\": variantLeftAccent,\n \"top-accent\": variantTopAccent,\n solid: variantSolid\n};\nvar alertTheme = defineMultiStyleConfig({\n baseStyle,\n variants,\n defaultProps: {\n variant: \"subtle\",\n colorScheme: \"blue\"\n }\n});\n\nexport {\n alertTheme\n};\n","import {\n sizes_default\n} from \"./chunk-X4JBRTE2.mjs\";\nimport {\n runIfFn\n} from \"./chunk-EBS47JIL.mjs\";\n\n// src/components/avatar.ts\nimport { avatarAnatomy as parts } from \"@chakra-ui/anatomy\";\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle\n} from \"@chakra-ui/styled-system\";\nimport { isDark, randomColor } from \"@chakra-ui/theme-tools\";\nvar { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys);\nvar $border = cssVar(\"avatar-border-color\");\nvar $bg = cssVar(\"avatar-bg\");\nvar baseStyleBadge = defineStyle({\n borderRadius: \"full\",\n border: \"0.2em solid\",\n [$border.variable]: \"white\",\n _dark: {\n [$border.variable]: \"colors.gray.800\"\n },\n borderColor: $border.reference\n});\nvar baseStyleExcessLabel = defineStyle({\n [$bg.variable]: \"colors.gray.200\",\n _dark: {\n [$bg.variable]: \"colors.whiteAlpha.400\"\n },\n bgColor: $bg.reference\n});\nvar $avatarBg = cssVar(\"avatar-background\");\nvar baseStyleContainer = defineStyle((props) => {\n const { name, theme } = props;\n const bg = name ? randomColor({ string: name }) : \"colors.gray.400\";\n const isBgDark = isDark(bg)(theme);\n let color = \"white\";\n if (!isBgDark)\n color = \"gray.800\";\n return {\n bg: $avatarBg.reference,\n \"&:not([data-loaded])\": {\n [$avatarBg.variable]: bg\n },\n color,\n [$border.variable]: \"colors.white\",\n _dark: {\n [$border.variable]: \"colors.gray.800\"\n },\n borderColor: $border.reference,\n verticalAlign: \"top\"\n };\n});\nvar baseStyle = definePartsStyle((props) => ({\n badge: runIfFn(baseStyleBadge, props),\n excessLabel: runIfFn(baseStyleExcessLabel, props),\n container: runIfFn(baseStyleContainer, props)\n}));\nfunction getSize(size) {\n const themeSize = size !== \"100%\" ? sizes_default[size] : void 0;\n return definePartsStyle({\n container: {\n width: size,\n height: size,\n fontSize: `calc(${themeSize != null ? themeSize : size} / 2.5)`\n },\n excessLabel: {\n width: size,\n height: size\n },\n label: {\n fontSize: `calc(${themeSize != null ? themeSize : size} / 2.5)`,\n lineHeight: size !== \"100%\" ? themeSize != null ? themeSize : size : void 0\n }\n });\n}\nvar sizes = {\n \"2xs\": getSize(4),\n xs: getSize(6),\n sm: getSize(8),\n md: getSize(12),\n lg: getSize(16),\n xl: getSize(24),\n \"2xl\": getSize(32),\n full: getSize(\"100%\")\n};\nvar avatarTheme = defineMultiStyleConfig({\n baseStyle,\n sizes,\n defaultProps: { size: \"md\" }\n});\n\nexport {\n avatarTheme\n};\n","import {\n stepperTheme\n} from \"./chunk-TMUG4XNV.mjs\";\nimport {\n switchTheme\n} from \"./chunk-KGFPXNP4.mjs\";\nimport {\n tableTheme\n} from \"./chunk-WHSEAAWU.mjs\";\nimport {\n tabsTheme\n} from \"./chunk-RBQSCDLK.mjs\";\nimport {\n tagTheme\n} from \"./chunk-CZP5TVGH.mjs\";\nimport {\n textareaTheme\n} from \"./chunk-OIGZPHLT.mjs\";\nimport {\n tooltipTheme\n} from \"./chunk-6Y3UQESG.mjs\";\nimport {\n progressTheme\n} from \"./chunk-VGCCECBM.mjs\";\nimport {\n radioTheme\n} from \"./chunk-JDPWIQ7H.mjs\";\nimport {\n selectTheme\n} from \"./chunk-V3RHVDKJ.mjs\";\nimport {\n skeletonTheme\n} from \"./chunk-YSULOCDF.mjs\";\nimport {\n skipLinkTheme\n} from \"./chunk-RSEFU3LC.mjs\";\nimport {\n sliderTheme\n} from \"./chunk-IBL46MNN.mjs\";\nimport {\n spinnerTheme\n} from \"./chunk-Y6RR3LE6.mjs\";\nimport {\n statTheme\n} from \"./chunk-EY6ACYQS.mjs\";\nimport {\n kbdTheme\n} from \"./chunk-VQ2DUS6J.mjs\";\nimport {\n linkTheme\n} from \"./chunk-2T5TO72C.mjs\";\nimport {\n listTheme\n} from \"./chunk-AQJ6AIMN.mjs\";\nimport {\n menuTheme\n} from \"./chunk-FIWRYWVW.mjs\";\nimport {\n modalTheme\n} from \"./chunk-XHTV2ZQR.mjs\";\nimport {\n numberInputTheme\n} from \"./chunk-XNRZTTJ2.mjs\";\nimport {\n pinInputTheme\n} from \"./chunk-QW3Z4V42.mjs\";\nimport {\n popoverTheme\n} from \"./chunk-YJYMWHG4.mjs\";\nimport {\n drawerTheme\n} from \"./chunk-PQSF5PVS.mjs\";\nimport {\n editableTheme\n} from \"./chunk-YZVOF4MP.mjs\";\nimport {\n formTheme\n} from \"./chunk-RUW3STUO.mjs\";\nimport {\n formErrorTheme\n} from \"./chunk-D55YRTLZ.mjs\";\nimport {\n formLabelTheme\n} from \"./chunk-OYCZTG3L.mjs\";\nimport {\n headingTheme\n} from \"./chunk-X4O3JXYB.mjs\";\nimport {\n inputTheme\n} from \"./chunk-WFLWAEKG.mjs\";\nimport {\n breadcrumbTheme\n} from \"./chunk-OZJFUHHJ.mjs\";\nimport {\n buttonTheme\n} from \"./chunk-AP3MTUHH.mjs\";\nimport {\n cardTheme\n} from \"./chunk-PZHBQTKY.mjs\";\nimport {\n checkboxTheme\n} from \"./chunk-3XG4KRSA.mjs\";\nimport {\n closeButtonTheme\n} from \"./chunk-C4P5PUHY.mjs\";\nimport {\n codeTheme\n} from \"./chunk-CAKKPKRW.mjs\";\nimport {\n containerTheme\n} from \"./chunk-NDGGJV23.mjs\";\nimport {\n dividerTheme\n} from \"./chunk-5Z4IVOU3.mjs\";\nimport {\n accordionTheme\n} from \"./chunk-T276HDLM.mjs\";\nimport {\n alertTheme\n} from \"./chunk-YOXAUO7A.mjs\";\nimport {\n avatarTheme\n} from \"./chunk-O7XTKHT6.mjs\";\nimport {\n badgeTheme\n} from \"./chunk-IBJP6BGU.mjs\";\n\n// src/components/index.ts\nvar components = {\n Accordion: accordionTheme,\n Alert: alertTheme,\n Avatar: avatarTheme,\n Badge: badgeTheme,\n Breadcrumb: breadcrumbTheme,\n Button: buttonTheme,\n Checkbox: checkboxTheme,\n CloseButton: closeButtonTheme,\n Code: codeTheme,\n Container: containerTheme,\n Divider: dividerTheme,\n Drawer: drawerTheme,\n Editable: editableTheme,\n Form: formTheme,\n FormError: formErrorTheme,\n FormLabel: formLabelTheme,\n Heading: headingTheme,\n Input: inputTheme,\n Kbd: kbdTheme,\n Link: linkTheme,\n List: listTheme,\n Menu: menuTheme,\n Modal: modalTheme,\n NumberInput: numberInputTheme,\n PinInput: pinInputTheme,\n Popover: popoverTheme,\n Progress: progressTheme,\n Radio: radioTheme,\n Select: selectTheme,\n Skeleton: skeletonTheme,\n SkipLink: skipLinkTheme,\n Slider: sliderTheme,\n Spinner: spinnerTheme,\n Stat: statTheme,\n Switch: switchTheme,\n Table: tableTheme,\n Tabs: tabsTheme,\n Tag: tagTheme,\n Textarea: textareaTheme,\n Tooltip: tooltipTheme,\n Card: cardTheme,\n Stepper: stepperTheme\n};\n\nexport {\n components\n};\n","// src/semantic-tokens.ts\nvar semanticTokens = {\n colors: {\n \"chakra-body-text\": { _light: \"gray.800\", _dark: \"whiteAlpha.900\" },\n \"chakra-body-bg\": { _light: \"white\", _dark: \"gray.800\" },\n \"chakra-border-color\": { _light: \"gray.200\", _dark: \"whiteAlpha.300\" },\n \"chakra-inverse-text\": { _light: \"white\", _dark: \"gray.800\" },\n \"chakra-subtle-bg\": { _light: \"gray.100\", _dark: \"gray.700\" },\n \"chakra-subtle-text\": { _light: \"gray.600\", _dark: \"gray.400\" },\n \"chakra-placeholder-color\": { _light: \"gray.500\", _dark: \"whiteAlpha.400\" }\n }\n};\n\nexport {\n semanticTokens\n};\n","// src/styles.ts\nvar styles = {\n global: {\n body: {\n fontFamily: \"body\",\n color: \"chakra-body-text\",\n bg: \"chakra-body-bg\",\n transitionProperty: \"background-color\",\n transitionDuration: \"normal\",\n lineHeight: \"base\"\n },\n \"*::placeholder\": {\n color: \"chakra-placeholder-color\"\n },\n \"*, *::before, &::after\": {\n borderColor: \"chakra-border-color\"\n }\n }\n};\n\nexport {\n styles\n};\n","import {\n isChakraTheme,\n requiredChakraThemeKeys\n} from \"./chunk-A6NK776R.mjs\";\nimport {\n foundations\n} from \"./chunk-VYR6F67Y.mjs\";\nimport \"./chunk-AU77DZXY.mjs\";\nimport \"./chunk-7OKLMD4V.mjs\";\nimport \"./chunk-ZV5E32CG.mjs\";\nimport \"./chunk-DDAHWWWN.mjs\";\nimport \"./chunk-C7H5GWRZ.mjs\";\nimport \"./chunk-4REDROSM.mjs\";\nimport \"./chunk-DJNGX4VH.mjs\";\nimport \"./chunk-OLDNEXT6.mjs\";\nimport {\n components\n} from \"./chunk-KCPP2OFG.mjs\";\nimport \"./chunk-TMUG4XNV.mjs\";\nimport \"./chunk-KGFPXNP4.mjs\";\nimport \"./chunk-WHSEAAWU.mjs\";\nimport \"./chunk-RBQSCDLK.mjs\";\nimport \"./chunk-CZP5TVGH.mjs\";\nimport \"./chunk-OIGZPHLT.mjs\";\nimport \"./chunk-6Y3UQESG.mjs\";\nimport \"./chunk-VGCCECBM.mjs\";\nimport \"./chunk-JDPWIQ7H.mjs\";\nimport \"./chunk-V3RHVDKJ.mjs\";\nimport \"./chunk-YSULOCDF.mjs\";\nimport \"./chunk-RSEFU3LC.mjs\";\nimport \"./chunk-IBL46MNN.mjs\";\nimport \"./chunk-Y6RR3LE6.mjs\";\nimport \"./chunk-EY6ACYQS.mjs\";\nimport \"./chunk-VQ2DUS6J.mjs\";\nimport \"./chunk-2T5TO72C.mjs\";\nimport \"./chunk-AQJ6AIMN.mjs\";\nimport \"./chunk-FIWRYWVW.mjs\";\nimport \"./chunk-XHTV2ZQR.mjs\";\nimport \"./chunk-XNRZTTJ2.mjs\";\nimport \"./chunk-HOOF7HHD.mjs\";\nimport \"./chunk-QW3Z4V42.mjs\";\nimport \"./chunk-YJYMWHG4.mjs\";\nimport \"./chunk-PQSF5PVS.mjs\";\nimport \"./chunk-YZVOF4MP.mjs\";\nimport \"./chunk-RUW3STUO.mjs\";\nimport \"./chunk-D55YRTLZ.mjs\";\nimport \"./chunk-OYCZTG3L.mjs\";\nimport \"./chunk-X4O3JXYB.mjs\";\nimport \"./chunk-WFLWAEKG.mjs\";\nimport \"./chunk-OZJFUHHJ.mjs\";\nimport \"./chunk-AP3MTUHH.mjs\";\nimport \"./chunk-PZHBQTKY.mjs\";\nimport \"./chunk-3XG4KRSA.mjs\";\nimport \"./chunk-C4P5PUHY.mjs\";\nimport \"./chunk-CAKKPKRW.mjs\";\nimport \"./chunk-NDGGJV23.mjs\";\nimport \"./chunk-5Z4IVOU3.mjs\";\nimport {\n semanticTokens\n} from \"./chunk-BF6JLLXF.mjs\";\nimport {\n styles\n} from \"./chunk-VHIIIDDT.mjs\";\nimport \"./chunk-RT7D5LFX.mjs\";\nimport \"./chunk-T276HDLM.mjs\";\nimport \"./chunk-YOXAUO7A.mjs\";\nimport \"./chunk-O7XTKHT6.mjs\";\nimport \"./chunk-X4JBRTE2.mjs\";\nimport \"./chunk-G3IFUAY5.mjs\";\nimport \"./chunk-EBS47JIL.mjs\";\nimport \"./chunk-IBJP6BGU.mjs\";\n\n// src/index.ts\nvar direction = \"ltr\";\nvar config = {\n useSystemColorMode: false,\n initialColorMode: \"light\",\n cssVarPrefix: \"chakra\"\n};\nvar theme = {\n semanticTokens,\n direction,\n ...foundations,\n components,\n styles,\n config\n};\nvar src_default = theme;\nvar baseTheme = {\n semanticTokens,\n direction,\n components: {},\n ...foundations,\n styles,\n config\n};\nexport {\n baseTheme,\n src_default as default,\n isChakraTheme,\n requiredChakraThemeKeys,\n theme\n};\n","import { ComponentSingleStyleConfig, theme } from '@chakra-ui/theme'\n\nexport const ElectionTitleTheme: ComponentSingleStyleConfig = {\n baseStyle: {\n ...theme.components.Heading.baseStyle,\n ...theme.components.Heading.sizes?.xl,\n textAlign: 'center',\n lineHeight: 1.1,\n mb: 3,\n },\n}\n\nexport const ElectionScheduleTheme: ComponentSingleStyleConfig = {\n baseStyle: {\n ...theme.components.Heading.baseStyle,\n ...theme.components.Heading.sizes?.sm,\n textAlign: 'center',\n fontStyle: 'italic',\n color: 'gray.400',\n },\n}\n","import { defineStyleConfig } from '@chakra-ui/system'\n\nexport const HorizontalRuler = defineStyleConfig({\n baseStyle: {\n width: '100%',\n height: '2px',\n backgroundColor: 'gray.300',\n marginTop: '1.2em',\n marginBottom: '1.5em',\n },\n})\n","import { createMultiStyleConfigHelpers } from '@chakra-ui/system'\n\nexport const questionsAnatomy = [\n // alert message (when no questions are available)\n 'alert',\n // question wrapper\n 'question',\n // question title\n 'title',\n // question description\n 'description',\n // form radio group\n 'radioGroup',\n // questions stack\n 'stack',\n // form radio\n 'radio',\n // form error message\n 'error',\n]\n\nconst { defineMultiStyleConfig, definePartsStyle } = createMultiStyleConfigHelpers(questionsAnatomy)\n\nconst baseStyle = definePartsStyle({\n question: {\n marginBottom: 8,\n },\n title: {\n fontWeight: 'bold',\n fontSize: 'xl',\n marginBottom: 1,\n },\n description: {\n marginBottom: 4,\n },\n})\n\nexport const QuestionsTheme = defineMultiStyleConfig({\n baseStyle,\n})\n","import { ElectionScheduleTheme as ElectionSchedule, ElectionTitleTheme as ElectionTitle } from './election'\nimport { HorizontalRuler } from './layout'\nimport { QuestionsTheme as Questions } from './questions'\n\nexport const theme = {\n components: {\n ElectionTitle,\n ElectionSchedule,\n HorizontalRuler,\n Questions,\n } as any,\n}\n\nexport * from './election'\nexport * from './questions'\n"],"names":["a","reactJsxDevRuntime_production_min","React","require$$0","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","MAYBE_ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","maybeIterator","ReactSharedInternals","error","format","_len2","args","_key2","printWarning","level","ReactDebugCurrentFrame","stack","argsWithFormat","item","enableScopeAPI","enableCacheElement","enableTransitionTracing","enableLegacyHidden","enableDebugTracing","REACT_MODULE_REFERENCE","isValidElementType","type","getWrappedName","outerType","innerType","wrapperName","displayName","functionName","getContextName","getComponentNameFromType","context","provider","outerName","lazyComponent","payload","init","assign","disabledDepth","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","disabledLog","disableLogs","props","reenableLogs","ReactCurrentDispatcher","prefix","describeBuiltInComponentFrame","name","source","ownerFn","x","match","reentry","componentFrameCache","PossiblyWeakMap","describeNativeComponentFrame","fn","construct","frame","control","previousPrepareStackTrace","previousDispatcher","Fake","sample","sampleLines","controlLines","s","c","_frame","syntheticFrame","describeFunctionComponentFrame","shouldConstruct","Component","prototype","describeUnknownElementTypeFrameInDEV","hasOwnProperty","loggedTypeFailures","setCurrentlyValidatingElement","element","owner","checkPropTypes","typeSpecs","values","location","componentName","has","typeSpecName","error$1","err","ex","isArrayImpl","isArray","typeName","value","hasToStringTag","willCoercionThrow","testStringCoercion","checkKeyStringCoercion","ReactCurrentOwner","RESERVED_PROPS","specialPropKeyWarningShown","specialPropRefWarningShown","didWarnAboutStringRefs","hasValidRef","config","getter","hasValidKey","warnIfStringRefCannotBeAutoConverted","self","defineKeyPropWarningGetter","warnAboutAccessingKey","defineRefPropWarningGetter","warnAboutAccessingRef","ReactElement","key","ref","jsxDEV","maybeKey","propName","defaultProps","ReactCurrentOwner$1","ReactDebugCurrentFrame$1","setCurrentlyValidatingElement$1","propTypesMisspellWarningShown","isValidElement","object","getDeclarationErrorAddendum","getSourceInfoErrorAddendum","fileName","lineNumber","ownerHasKeyUseWarning","getCurrentComponentErrorInfo","parentType","info","parentName","validateExplicitKey","currentComponentErrorInfo","childOwner","validateChildKeys","node","i","child","iteratorFn","iterator","step","validatePropTypes","propTypes","_name","validateFragmentProps","fragment","keys","jsxWithValidation","isStaticChildren","validType","sourceInfo","typeString","children","jsxDEV$1","reactJsxDevRuntime_development","module","require$$1","useClientProvider","client","setClient","useState","signer","setSigner","env","setEnv","account","setAccount","balance","setBalance","useEffect","opts","VocdoniSDKClient","changeSigner","fetchAccount","fetchBalance","accChanged","accs","acc","e","seed","ClientContext","createContext","useClientContext","ctxt","useContext","ClientProvider","rest","this","cx","classNames","isObject","dataAttr","condition","ariaAttr","callAllHandlers","fns","event","callAll","arg","f","k","l","m","n","p","q","g","b","d","h","reactJsxRuntime_production_min","jsxWithValidationStatic","jsxWithValidationDynamic","jsx","jsxs","reactJsxRuntime_development","fallbackIcon","Icon","forwardRef","viewBox","color","focusable","className","__css","_className","customStyles","useStyleConfig","styles","shared","_viewBox","chakra","_path","getErrorMessage","hook","options","strict","hookName","providerName","errorMessage","defaultValue","Context","createReactContext","_a","useReactContext","TagStylesProvider","useTagStyles","Tag","useMultiStyleConfig","ownProps","omitThemingProps","containerStyles","TagLabel","TagLeftIcon","TagRightIcon","TagCloseIcon","TagCloseButton","isDisabled","btnStyles","Balance","HR","variant","NativeImage","htmlWidth","htmlHeight","alt","useSafeLayoutEffect","useLayoutEffect","useImage","loading","src","srcSet","onLoad","onError","crossOrigin","sizes","ignoreFallback","status","setStatus","imageRef","useRef","load","useCallback","flush","img","shouldShowFallbackImage","fallbackStrategy","omit","keysToOmit","clone","Image","fallbackSrc","fallback","align","fit","referrerPolicy","providedFallback","shouldIgnoreFallbackImage","showFallbackImage","linkify","link","gateway","matches","pin","CImage","getValidChildren","Children","ListStylesProvider","useListStyles","List","styleType","stylePosition","spacing","validChildren","spacingStyle","OrderedList","as","UnorderedList","ListItem","ListIcon","mapResponsive","prop","mapper","result","compact","Text","decoration","casing","aliasedProps","StackItem","selector","getStackStyles","direction","directionStyles","getDividerStyles","dividerStyles","Stack","isInline","directionProp","justify","wrap","divider","shouldWrapChildren","useMemo","dividerStyle","hasDivider","shouldUseChildren","clones","index","isLast","_child","clonedDivider","cloneElement","Fragment","Heading","Box","Square","size","centerContent","Circle","Link","isExternal","Code","TableStylesProvider","useTableStyles","Table","layout","tableProps","Tr","MD","ReactMarkdown","remarkGfm","Markdown","toInteger","dirtyNumber","number","requiredArgs","required","_typeof","obj","toDate","argument","argStr","addMilliseconds","dirtyDate","dirtyAmount","timestamp","amount","defaultOptions","getDefaultOptions","getTimezoneOffsetInMilliseconds","date","utcDate","isDate","isValid","subMilliseconds","MILLISECONDS_IN_DAY","getUTCDayOfYear","startOfYearTimestamp","difference","startOfUTCISOWeek","weekStartsOn","day","diff","getUTCISOWeekYear","year","fourthOfJanuaryOfNextYear","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","startOfUTCISOWeekYear","fourthOfJanuary","MILLISECONDS_IN_WEEK","getUTCISOWeek","startOfUTCWeek","_ref","_ref2","_ref3","_options$weekStartsOn","_options$locale","_options$locale$optio","_defaultOptions$local","_defaultOptions$local2","getUTCWeekYear","_options$firstWeekCon","firstWeekContainsDate","firstWeekOfNextYear","firstWeekOfThisYear","startOfUTCWeekYear","firstWeek","getUTCWeek","addLeadingZeros","targetLength","sign","output","formatters","token","signedYear","month","dayPeriodEnumValue","numberOfDigits","milliseconds","fractionalSeconds","formatters$3","dayPeriodEnum","localize","era","lightFormatters","signedWeekYear","weekYear","twoDigitYear","isoWeekYear","quarter","week","isoWeek","dayOfYear","dayOfWeek","localDayOfWeek","isoDayOfWeek","hours","_localize","originalDate","timezoneOffset","formatTimezoneWithOptionalMinutes","formatTimezone","formatTimezoneShort","offset","dirtyDelimiter","absOffset","minutes","delimiter","formatters$1","dateLongFormatter","pattern","formatLong","timeLongFormatter","dateTimeLongFormatter","matchResult","datePattern","timePattern","dateTimeFormat","longFormatters","longFormatters$1","protectedDayOfYearTokens","protectedWeekYearTokens","isProtectedDayOfYearToken","isProtectedWeekYearToken","throwProtectedError","input","formatDistanceLocale","formatDistance","count","tokenValue","formatDistance$1","buildFormatLongFn","width","dateFormats","timeFormats","dateTimeFormats","formatLong$1","formatRelativeLocale","formatRelative","_date","_baseDate","_options","formatRelative$1","buildLocalizeFn","dirtyIndex","valuesArray","defaultWidth","_defaultWidth","_width","eraValues","quarterValues","monthValues","dayValues","dayPeriodValues","formattingDayPeriodValues","ordinalNumber","rem100","localize$1","buildMatchFn","string","matchPattern","matchedString","parsePatterns","findIndex","findKey","predicate","array","buildMatchPatternFn","parseResult","matchOrdinalNumberPattern","parseOrdinalNumberPattern","matchEraPatterns","parseEraPatterns","matchQuarterPatterns","parseQuarterPatterns","matchMonthPatterns","parseMonthPatterns","matchDayPatterns","parseDayPatterns","matchDayPeriodPatterns","parseDayPeriodPatterns","match$1","locale","defaultLocale","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","unescapedLatinCharacterRegExp","dirtyFormatStr","_ref4","_options$locale2","_options$locale2$opti","_ref5","_ref6","_ref7","_options$locale3","_options$locale3$opti","_defaultOptions$local3","_defaultOptions$local4","formatStr","formatterOptions","substring","firstCharacter","longFormatter","cleanEscapedString","formatter","matched","ElectionTitle","election","useElection","ElectionHeader","ElectionDescription","ElectionSchedule","dformat","ElectionStatusBadge","trans","defaults","colorScheme","ElectionStatus","CheckIcon","InfoIcon","WarningIcon","spin","keyframes","Spinner","label","thickness","speed","emptyColor","spinnerStyles","AlertProvider","useAlertContext","AlertStylesProvider","useAlertStyles","STATUSES","getStatusColorScheme","getStatusIcon","AlertIcon","BaseIcon","css","Alert","addRole","alertStyles","isCheckBoxInput","isDateObject","isNullOrUndefined","isObjectType","getEventValue","getNodeParentName","isNameInFieldArray","names","isPlainObject","tempObject","prototypeCopy","isWeb","cloneObject","data","copy","isUndefined","val","get","path","EVENTS","VALIDATION_MODE","INPUT_VALIDATION_RULES","HookFormContext","useFormContext","FormProvider","getProxyFormState","formState","localProxyFormState","isRoot","_key","isEmptyObject","shouldRenderFormState","formStateData","_proxyFormState","updateFormState","convertToArrayPayload","shouldSubscribeByName","signalName","exact","currentName","useSubscribe","_props","subscription","useFormState","methods","disabled","_mounted","_localProxyFormState","isString","generateWatchOutput","_names","formValues","isGlobal","fieldName","useWatch","updateValue","isKey","stringToPath","set","tempPath","length","lastIndex","newValue","objValue","useController","shouldUnregister","isArrayField","_registerProps","_shouldUnregisterField","updateMounted","field","elm","message","Controller","appendErrors","validateAllFieldCriteria","errors","focusFieldBy","fields","callback","fieldsNames","_f","currentField","getValidationModes","mode","isWatched","isBlurEvent","watchName","updateFieldArrayRootError","fieldArrayErrors","isBoolean","isFileInput","isFunction","isHTMLElement","isMessage","isRadioInput","isRegex","defaultResult","validResult","getCheckboxValue","option","defaultReturn","getRadioValue","previous","getValidateError","getValueAndMessage","validationData","validateField","shouldUseNativeValidation","isFieldArray","refs","maxLength","minLength","min","max","validate","valueAsNumber","mount","inputValue","inputRef","setCustomValidity","isRadio","isCheckBox","isRadioOrCheckbox","isEmpty","appendErrorsCurry","getMinMaxMessage","exceedMax","maxLengthMessage","minLengthMessage","maxType","minType","exceedMin","maxOutput","minOutput","valueNumber","valueDate","convertTimeToDate","time","isTime","isWeek","maxLengthOutput","minLengthOutput","patternValue","validateError","validationResult","baseGet","updatePath","isEmptyArray","unset","paths","childObject","createSubject","_observers","observer","isPrimitive","deepEqual","object1","object2","keys1","keys2","val1","val2","isMultipleSelect","live","objectHasFunction","markFieldsDirty","isParentNodeArray","getDirtyFieldsFromDefaultValues","dirtyFieldsFromValues","getDirtyFields","defaultValues","getFieldValueAs","valueAsDate","setValueAs","getFieldValue","getResolverOptions","_fields","criteriaMode","getRuleValue","rule","hasValidation","schemaErrorLookup","foundError","skipValidation","isTouched","isSubmitted","reValidateMode","unsetEmptyArray","createFormControl","flushRootRender","_formState","_defaultValues","_formValues","_state","delayErrorCallback","timer","_subjects","shouldCaptureDirtyFields","validationModeBeforeSubmit","validationModeAfterSubmit","shouldDisplayAllAssociatedErrors","debounce","wait","_updateValid","shouldUpdateValid","_executeSchema","executeBuiltInValidation","_updateIsValidating","_updateFieldArray","method","shouldSetValues","shouldUpdateFieldsAndState","fieldValues","touchedFields","_getDirty","updateErrors","updateValidAndValue","shouldSkipSetValueAs","setFieldValue","updateTouchAndDirty","fieldValue","shouldDirty","shouldRender","shouldUpdateField","isPreviousDirty","isCurrentFieldPristine","isPreviousFieldTouched","shouldRenderByError","fieldState","previousFieldError","updatedFormState","executeSchemaAndUpdateState","shouldOnlyCheckValid","isFieldArrayRoot","fieldError","_removeUnmounted","unregister","getValues","_getWatch","_getFieldArray","fieldReference","optionRef","checkboxRef","radioRef","trigger","setValues","fieldKey","setValue","cloneValue","onChange","target","isFieldValueUpdated","getCurrentFieldValue","shouldSkipValidation","watched","previousErrorLookupResult","errorLookupResult","fieldNames","getFieldState","clearErrors","inputName","setError","watch","register","disabledIsDefined","fieldRef","radioOrCheckbox","_focusError","handleSubmit","onValid","onInvalid","resetField","_reset","keepStateOptions","updatedValues","cloneUpdatedValues","form","reset","useForm","_formControl","assignRef","mergeRefs","useMergeRefs","FormControlStylesProvider","useFormControlStyles","FormControlProvider","useFormControlContext","useFormControlProvider","idProp","isRequired","isInvalid","isReadOnly","htmlProps","uuid","useId","id","labelId","feedbackId","helpTextId","hasFeedbackText","setHasFeedbackText","hasHelpText","setHasHelpText","isFocused","setFocus","getHelpTextProps","props2","forwardedRef","getLabelProps","getErrorMessageProps","getRootProps","getRequiredIndicatorProps","FormControl","_","FormHelperText","FormErrorStylesProvider","useFormErrorStyles","FormErrorMessage","FormErrorIcon","isInputEvent","useRadioGroup","onChangeProp","valueProp","nameProp","isFocusable","isNative","valueState","isControlled","focus","rootNode","query","firstEnabledAndCheckedInput","firstEnabledInput","fallbackName","eventOrValue","nextValue","getRadioProps","ref2","RadioGroupProvider","useRadioGroupContext","RadioGroup","group","hasSetup","modality","hasEventBeforeFocus","hasBlurredWindowRecently","handlers","modality2","handler","isMac","isValidKey","onKeyboardEvent","onPointerEvent","isVirtualClick","onClickEvent","onWindowFocus","onWindowBlur","isFocusVisible","setupGlobalFocusEvents","trackFocusVisible","visuallyHiddenStyle","useRadio","defaultChecked","isCheckedProp","isDisabledProp","isReadOnlyProp","isRequiredProp","isInvalidProp","dataRadioGroup","ariaDescribedBy","formControl","isWithinRadioGroup","setIsFocusVisible","setFocused","isHovered","setHovering","isActive","setActive","isCheckedState","setChecked","isChecked","handleChange","onKeyDown","onKeyUp","onFocus","onBlur","getInputProps","trulyDisabled","stopEvent","split","picked","omitted","Radio","htmlInputProps","getCheckboxProps","layoutProps","otherProps","layoutPropNames","checkboxProps","inputProps","labelProps","rootProps","rootStyles","checkboxStyles","labelStyles","QuestionField","question","isAbleToVote","choice","ck","QuestionsForm","vote","voted","ConnectButton","fmethods","questions","prev","curr","onSubmit","qk","ButtonGroupProvider","useButtonGroup","useButtonType","isButton","setIsButton","ButtonIcon","_children","ButtonSpinner","placement","marginProp","Button","isLoading","leftIcon","rightIcon","loadingText","iconSpacing","spinner","spinnerPlacement","buttonStyles","_focus","defaultType","contentProps","ButtonContent","VoteButton","voting","useElectionProvider","fetchCensus","texts","setLoading","setVoting","loaded","setLoaded","setVoted","setElection","setIsAbleToVote","votesLeft","setVotesLeft","isInCensus","setIsInCensus","censusType","setCensusType","voteInstance","setVoteInstance","authToken","setAuthToken","setHandler","def","isIn","left","CensusType","getOAuthToken","code","param","_b","mapped","vi","Vote","cspAuthAndVote","weightedVote","vid","redirectURL","step0","openLoginPopup","url","params","vocdoniClient","electionId","step1","cspVote","walletAddress","signature","ElectionContext","ElectionProvider","Election","OrganizationName","organization","useOrganization","useOrganizationProvider","setOrganization","update","faucetPackage","Account","OrganizationContext","OrganizationProvider","Organization","OrganizationAvatar","avatar","OrganizationDescription","OrganizationHeader","header","transitionProperty","transitionTimingFunction","transitionDuration","transition","transition_default","zIndices","z_index_default","borders","borders_default","breakpoints","breakpoints_default","colors","colors_default","radii","radius_default","shadows","shadows_default","blur","blur_default","typography","typography_default","largeSizes","container","sizes_default","foundations","LARGE_ARRAY_SIZE","HASH_UNDEFINED","HOT_COUNT","HOT_SPAN","MAX_SAFE_INTEGER","argsTag","arrayTag","asyncTag","boolTag","dateTag","errorTag","funcTag","genTag","mapTag","numberTag","nullTag","objectTag","proxyTag","regexpTag","setTag","stringTag","undefinedTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","reRegExpChar","reIsHostCtor","reIsUint","typedArrayTags","freeGlobal","global","freeSelf","root","freeExports","exports","freeModule","moduleExports","freeProcess","nodeUtil","types","nodeIsTypedArray","apply","func","thisArg","baseTimes","iteratee","baseUnary","getValue","overArg","transform","arrayProto","funcProto","objectProto","coreJsData","funcToString","maskSrcKey","uid","nativeObjectToString","objectCtorString","reIsNative","Buffer","Symbol","Uint8Array","allocUnsafe","getPrototype","objectCreate","propertyIsEnumerable","splice","symToStringTag","defineProperty","getNative","nativeIsBuffer","nativeMax","nativeNow","Map","nativeCreate","baseCreate","proto","Hash","entries","entry","hashClear","hashDelete","hashGet","hashHas","hashSet","ListCache","listCacheClear","listCacheDelete","assocIndexOf","listCacheGet","listCacheHas","listCacheSet","MapCache","mapCacheClear","mapCacheDelete","getMapData","mapCacheGet","mapCacheHas","mapCacheSet","stackClear","stackDelete","stackGet","stackHas","stackSet","pairs","arrayLikeKeys","inherited","isArr","isArg","isArguments","isBuff","isBuffer","isType","isTypedArray","skipIndexes","isIndex","assignMergeValue","eq","baseAssignValue","assignValue","baseFor","createBaseFor","baseGetTag","getRawTag","objectToString","baseIsArguments","isObjectLike","baseIsNative","isMasked","toSource","baseIsTypedArray","isLength","baseKeysIn","nativeKeysIn","isProto","isPrototype","baseMerge","srcIndex","customizer","srcValue","baseMergeDeep","safeGet","keysIn","mergeFunc","stacked","isCommon","isTyped","isArrayLikeObject","copyArray","cloneBuffer","cloneTypedArray","toPlainObject","initCloneObject","baseRest","start","setToString","overRest","identity","baseSetToString","constant","buffer","isDeep","cloneArrayBuffer","arrayBuffer","typedArray","copyObject","isNew","createAssigner","assigner","sources","guard","isIterateeCall","fromRight","keysFunc","iterable","map","isKeyable","isOwn","tag","unmasked","isArrayLike","Ctor","otherArgs","shortOut","lastCalled","stamp","remaining","other","stubFalse","mergeWith","isImportant","withoutImportant","tokenToCSSVar","scale","theme","valueStr","important","valueWithoutImportant","transformed","createTransform","transform2","compose","_value","pipe","v","toConfig","property","getRtl","rtl","ltr","logical","transformTemplate","getTransformTemplate","getTransformGpuTemplate","filterTemplate","backdropFilterTemplate","getRingTemplate","flexDirectionTemplate","directionMap","valueSet","globalSet","trimSpace","str","parseGradient","isCSSFunction","results","_type","maybeDirection","stops","_values","stop","firstStop","_color","_stop","_stopOrFunc","color2","gradientTransform","isCssVar","analyzeCSSValue","num","unit","transformFunctions","unitless","isNoneOrZero","space2","divide2","t","background","border","effect","filter","flexbox","grid","interactivity","_c","list","memoize","cache","memoizedGet","srOnly","srFocusable","getWithPriority","others","position","ring","space","textDecoration","scroll","resolveReference","operand","isObject2","toExpression","operator","operands","add","subtract","multiply","divide","negate","calc","replaceWhiteSpace","replaceValue","escape","escapeSymbol","escapeDot","addPrefix","toVarReference","toVarDefinition","cssVar","cssVarPrefix","cssVariable","defineCssVars","scope","vars","state","post","toGroup","merge","toPeer","selectors","pseudoSelectors","pseudoPropNames","systemProps","mergeWith2","createMultiStyleConfigHelpers","parts","defineMultiStyleConfig","definePartsStyle","$size","$iconSize","$titleFontSize","$descFontSize","$accentColor","baseStyle","stepperTheme","anatomy","called","assert","part","toPart","extend","parts2","classnames","accordionAnatomy","alertAnatomy","avatarAnatomy","breadcrumbAnatomy","checkboxAnatomy","drawerAnatomy","editableAnatomy","formAnatomy","formErrorAnatomy","inputAnatomy","listAnatomy","menuAnatomy","modalAnatomy","numberInputAnatomy","popoverAnatomy","progressAnatomy","radioAnatomy","selectAnatomy","sliderAnatomy","statAnatomy","switchAnatomy","tableAnatomy","tabsAnatomy","tagAnatomy","cardAnatomy","low","high","ColorError","ColorError$1","parseToRgba","normalizedColor","namedColorRegex","nameToHex","reducedHexMatch","reducedHexRegex","arr","r","hexMatch","hexRegex","rgbaMatch","rgbaRegex","hslaMatch","hslaRegex","hslToRgb","hash","colorToInt","compressedColorMap","next","hex","normalizedColorName","roundColor","hue","saturation","lightness","huePrime","chroma","secondComponent","red","green","blue","lightnessModification","finalRed","finalGreen","finalBlue","rgba","alpha","transparentize","toHex","dlv_es_default","getColor","getBrightness","tone","isDark","opacity","raw","setTransparency","generateStripe","randomHex","randomColor","randomColorFromList","randomColorFromString","randomFromList","j","light","dark","orient","orientation","vertical","horizontal","toRef","toExpr","isDecimal","toVarRef","toVar","getFallback","$width","$height","$diff","diffValue","$translateX","$bg","baseStyleTrack","baseStyleThumb","switchTheme","numericStyles","variantSimple","variantStripe","variants","tableTheme","$fg","$border","baseStyleRoot","baseStyleTab","isFitted","baseStyleTablist","baseStyleTabpanel","variantLine","isVertical","borderProp","variantEnclosed","variantEnclosedColored","variantSoftRounded","variantSolidRounded","variantUnstyled","tabsTheme","variantSolid","variantSubtle","darkBg","variantOutline","darkColor","badgeTheme","baseStyleContainer","baseStyleLabel","baseStyleCloseButton","tagTheme","getDefaults","fc","ec","variantFilled","variantFlushed","inputTheme","_a2","_a4","_b3","_a3","_b2","_d","_e","_g","_h","textareaTheme","$arrowBg","tooltipTheme","filledStyle","isIndeterminate","hasStripe","stripeStyle","bgColor","gradient","baseStyleFilledTrack","progressTheme","runIfFn","valueOrFn","baseStyleControl","baseStyleIcon","checkboxTheme","controlStyle","radioTheme","baseStyleField","selectTheme","$startColor","$endColor","skeletonTheme","skipLinkTheme","$thumbSize","$trackSize","sizeLg","sizeMd","sizeSm","sliderTheme","spinnerTheme","baseStyleHelpText","baseStyleNumber","statTheme","kbdTheme","linkTheme","listTheme","$shadow","baseStyleList","baseStyleItem","baseStyleGroupTitle","baseStyleCommand","baseStyleDivider","baseStyleButton","menuTheme","baseStyleOverlay","baseStyleDialogContainer","isCentered","scrollBehavior","baseStyleDialog","baseStyleHeader","baseStyleBody","baseStyleFooter","getSize","modalTheme","$stepperWidth","$inputPadding","inputPaddingValue","baseStyleStepperGroup","baseStyleStepper","sizeStyle","radius","_fontSize","fontSize","numberInputTheme","pinInputTheme","$popperBg","$arrowShadowColor","baseStylePopper","baseStyleContent","popoverTheme","$bs","isFullHeight","drawerTheme","baseStylePreview","baseStyleInput","baseStyleTextarea","editableTheme","baseStyleRequiredIndicator","baseStyleHelperText","formTheme","baseStyleText","formErrorTheme","formLabelTheme","headingTheme","$decor","baseStyleLink","breadcrumbTheme","variantGhost","darkHoverBg","darkActiveBg","borderColor","accessibleColorMap","bg2","bg","hoverBg","activeBg","variantLink","buttonTheme","$padding","$radius","$borderColor","cardTheme","closeButtonTheme","codeTheme","containerTheme","variantDashed","dividerTheme","baseStylePanel","accordionTheme","getBg","variantLeftAccent","variantTopAccent","alertTheme","baseStyleBadge","baseStyleExcessLabel","$avatarBg","isBgDark","themeSize","avatarTheme","components","semanticTokens","ElectionTitleTheme","ElectionScheduleTheme","HorizontalRuler","defineStyleConfig","questionsAnatomy","QuestionsTheme","Questions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AASa,MAAIA,IAAE,OAAO,IAAI,gBAAgB;AAAE,SAAAC,cAAiBD,GAAEC,GAAc,SAAC;;;;;;;;;;;;;;wBCG9E,QAAQ,IAAI,aAAa,gBAC1B,WAAW;AAGd,QAAIC,IAAQC,IAMRC,IAAqB,OAAO,IAAI,eAAe,GAC/CC,IAAoB,OAAO,IAAI,cAAc,GAC7CC,IAAsB,OAAO,IAAI,gBAAgB,GACjDC,IAAyB,OAAO,IAAI,mBAAmB,GACvDC,IAAsB,OAAO,IAAI,gBAAgB,GACjDC,IAAsB,OAAO,IAAI,gBAAgB,GACjDC,IAAqB,OAAO,IAAI,eAAe,GAC/CC,IAAyB,OAAO,IAAI,mBAAmB,GACvDC,IAAsB,OAAO,IAAI,gBAAgB,GACjDC,IAA2B,OAAO,IAAI,qBAAqB,GAC3DC,IAAkB,OAAO,IAAI,YAAY,GACzCC,IAAkB,OAAO,IAAI,YAAY,GACzCC,IAAuB,OAAO,IAAI,iBAAiB,GACnDC,IAAwB,OAAO,UAC/BC,IAAuB;AAC3B,aAASC,EAAcC,GAAe;AACpC,UAAIA,MAAkB,QAAQ,OAAOA,KAAkB;AACrD,eAAO;AAGT,UAAIC,IAAgBJ,KAAyBG,EAAc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C,UAAU;AAAA,IACR,cAAc;AAAA,EAChB;AAAA,EACA,OAAO;AAAA,IACL,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,cAAc;AAAA,EAChB;AAAA,EACA,aAAa;AAAA,IACX,cAAc;AAAA,EAChB;AACF,CAAC,GAEYqS,KAAiBtS,GAAuB;AAAA,EACnD,WAAAO;AACF,CAAC,GCnCYvH,KAAQ;AAAA,EACnB,YAAY;AAAA,IAAA,eACVxwB;AAAAA,IAAA,kBACAK;AAAAA,IACA,iBAAAspC;AAAA,IAAA,WACAI;AAAAA,EACF;AACF;","x_google_ignoreList":[0,1,2,4,5,6,7,8,9,10,13,14,15,16,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,68,69,70,71,72,73,74,75,76,77,78,79,80,81,84,85,86,87,88,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163]} \ No newline at end of file diff --git a/packages/components/dist/theme/election.d.ts b/packages/components/dist/theme/election.d.ts deleted file mode 100644 index 88102d4b..00000000 --- a/packages/components/dist/theme/election.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { ComponentSingleStyleConfig } from '@chakra-ui/theme'; -export declare const ElectionTitleTheme: ComponentSingleStyleConfig; -export declare const ElectionScheduleTheme: ComponentSingleStyleConfig; diff --git a/packages/components/dist/theme/index.d.ts b/packages/components/dist/theme/index.d.ts deleted file mode 100644 index dde71bad..00000000 --- a/packages/components/dist/theme/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare const theme: { - components: any; -}; -export * from './election'; -export * from './questions'; diff --git a/packages/components/dist/theme/layout.d.ts b/packages/components/dist/theme/layout.d.ts deleted file mode 100644 index a8c87e38..00000000 --- a/packages/components/dist/theme/layout.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export declare const HorizontalRuler: { - baseStyle?: { - width: string; - height: string; - backgroundColor: string; - marginTop: string; - marginBottom: string; - } | undefined; - sizes?: { - [key: string]: import("@chakra-ui/styled-system").SystemStyleInterpolation; - } | undefined; - variants?: { - [key: string]: import("@chakra-ui/styled-system").SystemStyleInterpolation; - } | undefined; - defaultProps?: { - size?: string | number | undefined; - variant?: string | number | undefined; - colorScheme?: string | undefined; - } | undefined; -}; diff --git a/packages/components/dist/theme/questions.d.ts b/packages/components/dist/theme/questions.d.ts deleted file mode 100644 index 5f46a37c..00000000 --- a/packages/components/dist/theme/questions.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -export declare const questionsAnatomy: string[]; -export declare const QuestionsTheme: { - baseStyle?: { - question: { - marginBottom: number; - }; - title: { - fontWeight: string; - fontSize: string; - marginBottom: number; - }; - description: { - marginBottom: number; - }; - } | undefined; - sizes?: { - [key: string]: import("@chakra-ui/styled-system").PartsStyleInterpolation<{ - keys: string[]; - }>; - } | undefined; - variants?: { - [key: string]: import("@chakra-ui/styled-system").PartsStyleInterpolation<{ - keys: string[]; - }>; - } | undefined; - defaultProps?: { - size?: string | number | undefined; - variant?: string | number | undefined; - colorScheme?: string | undefined; - } | undefined; - parts: string[]; -};