@canton-network/core-wallet-ui-components 1.18.0 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/dist/components/api-key-card.d.ts.map +1 -1
- package/dist/components/api-key-form.d.ts.map +1 -1
- package/dist/components/app-header.d.ts +3 -0
- package/dist/components/app-header.d.ts.map +1 -1
- package/dist/components/app-layout.d.ts +2 -0
- package/dist/components/app-layout.d.ts.map +1 -1
- package/dist/components/auth-editor.d.ts +2 -0
- package/dist/components/auth-editor.d.ts.map +1 -1
- package/dist/components/back-link.d.ts.map +1 -1
- package/dist/components/copy-button.d.ts.map +1 -1
- package/dist/components/custom-toast.d.ts.map +1 -1
- package/dist/components/error-page.d.ts.map +1 -1
- package/dist/components/form-input.d.ts.map +1 -1
- package/dist/components/idp-card.d.ts.map +1 -1
- package/dist/components/idp-form.d.ts.map +1 -1
- package/dist/components/loading-state.d.ts.map +1 -1
- package/dist/components/login-form.d.ts.map +1 -1
- package/dist/components/message-detail.d.ts.map +1 -1
- package/dist/components/network-card.d.ts.map +1 -1
- package/dist/components/network-form.d.ts.map +1 -1
- package/dist/components/not-found.d.ts.map +1 -1
- package/dist/components/page-header.d.ts +14 -0
- package/dist/components/page-header.d.ts.map +1 -0
- package/dist/components/pagination.d.ts +1 -0
- package/dist/components/pagination.d.ts.map +1 -1
- package/dist/components/transaction-card.d.ts.map +1 -1
- package/dist/components/transaction-detail.d.ts.map +1 -1
- package/dist/components/wallet-card.d.ts +1 -0
- package/dist/components/wallet-card.d.ts.map +1 -1
- package/dist/components/wallet-create-form.d.ts.map +1 -1
- package/dist/components/wallet-edit-form.d.ts +1 -0
- package/dist/components/wallet-edit-form.d.ts.map +1 -1
- package/dist/components/wallet-list.d.ts +18 -0
- package/dist/components/wallet-list.d.ts.map +1 -0
- package/dist/components/wallets-sync.d.ts +14 -7
- package/dist/components/wallets-sync.d.ts.map +1 -1
- package/dist/date-time.d.ts +14 -0
- package/dist/date-time.d.ts.map +1 -0
- package/dist/error-toast-By8cEMjq.cjs +4002 -0
- package/dist/error-toast-By8cEMjq.cjs.map +1 -0
- package/dist/error-toast-DQZ4SB72.js +17335 -0
- package/dist/error-toast-DQZ4SB72.js.map +1 -0
- package/dist/index.cjs +709 -4616
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1528 -16563
- package/dist/index.js.map +1 -1
- package/dist/internal/activity-render.d.ts +6 -1
- package/dist/internal/activity-render.d.ts.map +1 -1
- package/dist/internal/activity-utils.d.ts +0 -1
- package/dist/internal/activity-utils.d.ts.map +1 -1
- package/dist/internal/base-element.d.ts.map +1 -1
- package/dist/logic/index.cjs +1 -0
- package/dist/logic/index.d.ts +2 -0
- package/dist/logic/index.d.ts.map +1 -0
- package/dist/logic/index.js +1 -0
- package/dist/logic/parties.d.ts +59 -0
- package/dist/logic/parties.d.ts.map +1 -0
- package/dist/parties-B5mhMShF.js +111 -0
- package/dist/parties-B5mhMShF.js.map +1 -0
- package/dist/parties-DTtG9UJI.cjs +2 -0
- package/dist/parties-DTtG9UJI.cjs.map +1 -0
- package/dist/react/components/ApiKeyCard.d.ts +5 -7
- package/dist/react/components/ApiKeyCard.d.ts.map +1 -1
- package/dist/react/components/ApiKeyForm.d.ts +5 -7
- package/dist/react/components/ApiKeyForm.d.ts.map +1 -1
- package/dist/react/components/AppHeader.d.ts +6 -29
- package/dist/react/components/AppHeader.d.ts.map +1 -1
- package/dist/react/components/CardDetailRow.d.ts +1 -1
- package/dist/react/components/CardDetailRow.d.ts.map +1 -1
- package/dist/react/components/ErrorPage.d.ts +6 -9
- package/dist/react/components/ErrorPage.d.ts.map +1 -1
- package/dist/react/components/IdpCard.d.ts +7 -8
- package/dist/react/components/IdpCard.d.ts.map +1 -1
- package/dist/react/components/IdpForm.d.ts +8 -18
- package/dist/react/components/IdpForm.d.ts.map +1 -1
- package/dist/react/components/LoginForm.d.ts +6 -29
- package/dist/react/components/LoginForm.d.ts.map +1 -1
- package/dist/react/components/MessageDetail.d.ts +6 -26
- package/dist/react/components/MessageDetail.d.ts.map +1 -1
- package/dist/react/components/NetworkCard.d.ts +7 -12
- package/dist/react/components/NetworkCard.d.ts.map +1 -1
- package/dist/react/components/NetworkForm.d.ts +7 -16
- package/dist/react/components/NetworkForm.d.ts.map +1 -1
- package/dist/react/components/NotFound.d.ts +3 -0
- package/dist/react/components/NotFound.d.ts.map +1 -0
- package/dist/react/components/PageHeader.d.ts +3 -0
- package/dist/react/components/PageHeader.d.ts.map +1 -0
- package/dist/react/components/Pagination.d.ts +5 -12
- package/dist/react/components/Pagination.d.ts.map +1 -1
- package/dist/react/components/TransactionCard.d.ts +5 -16
- package/dist/react/components/TransactionCard.d.ts.map +1 -1
- package/dist/react/components/TransactionDetail.d.ts +6 -28
- package/dist/react/components/TransactionDetail.d.ts.map +1 -1
- package/dist/react/components/WalletCard.d.ts +8 -20
- package/dist/react/components/WalletCard.d.ts.map +1 -1
- package/dist/react/components/WalletCreateForm.d.ts +7 -34
- package/dist/react/components/WalletCreateForm.d.ts.map +1 -1
- package/dist/react/components/WalletEditForm.d.ts +7 -34
- package/dist/react/components/WalletEditForm.d.ts.map +1 -1
- package/dist/react/components/WalletList.d.ts +9 -0
- package/dist/react/components/WalletList.d.ts.map +1 -0
- package/dist/react/components/WalletsSync.d.ts +5 -12
- package/dist/react/components/WalletsSync.d.ts.map +1 -1
- package/dist/react/index.cjs +2 -10
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.ts +3 -1
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +228 -1808
- package/dist/react/index.js.map +1 -1
- package/dist/routing.d.ts +1 -1
- package/dist/routing.d.ts.map +1 -1
- package/package.json +17 -10
- package/themes/default.css +125 -74
- package/dist/activity-utils-CmKMEsoq.cjs +0 -4
- package/dist/activity-utils-CmKMEsoq.cjs.map +0 -1
- package/dist/activity-utils-DI0OIiL2.js +0 -1744
- package/dist/activity-utils-DI0OIiL2.js.map +0 -1
- package/dist/react/components/AuthEditor.d.ts +0 -21
- package/dist/react/components/AuthEditor.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-toast-DQZ4SB72.js","names":["mainStyles","bootstrapCss","defaultTheme","BaseElement","apiKey","customElement","property","ifDefined","css","html","cardStyles","formatDateTime","formatUtcDateTime","ApiKeyCardRevokeEvent","Event","bubbles","composed","type","Object","ApiKeyCard","render","name","dispatchEvent","id","createdAt","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","BaseElement","apiKeyParams","_error","css","html","nothing","customElement","property","state","ApiKeyGenerateEvent","Event","bubbles","composed","type","Object","ApiKeyForm","name","handleSubmit","e","preventDefault","dispatchEvent","render","target","value","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","_dec2","_init__error","_init_extra__init__error","BaseElement","auth","allowedMethods","optional","emptyText","pendingRemoveText","_mode","_backup","_secretReplacement","css","html","nothing","customElement","property","state","chevronDownIcon","AuthEditorChangeEvent","Event","bubbles","composed","type","Object","Array","Boolean","String","AuthEditor","createRenderRoot","connectedCallback","willUpdate","changed","hasUpdated","_initialMode","_hasConfiguredAuth","method","_emit","dispatchEvent","structuredClone","_defaultAuth","clientId","audience","scope","clientSecret","issuer","_maskSecret","secret","_getSummary","rows","key","value","splice","push","identityProviderId","_startAdd","_startEdit","_markForRemove","undefined","_cancelRemove","formState","_cancelEdit","_resolveClientSecret","authObj","trim","backupSecret","_hasExistingSecret","length","_renderUnsupportedMethodWarning","_onAuthMethodChange","e","target","Error","_renderIssuerInput","_renderClientIdInput","_renderClientSecretInput","_renderIdentityProviderIdInput","_renderAuthForm","commonFields","includes","render","map","row","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","_dec2","_dec3","_dec4","_dec5","_dec6","_dec7","_dec8","BaseElement","iconSrc","networkName","networkConnected","dappApiUrl","isAdmin","warningCount","menuOpen","darkMode","css","html","customElement","property","state","toRelPath","menuIcon","clipboardIcon","cantonLogo","LogoutEvent","Event","bubbles","composed","CopyDappApiUrlEvent","type","String","Boolean","Number","AppHeader","localStorage","getItem","connectedCallback","updateThemeAttribute","document","addEventListener","handleOutsideClick","disconnectedCallback","removeEventListener","event","path","composedPath","includes","setAttribute","removeAttribute","toggleMenu","stopPropagation","navigateTo","route","window","location","href","logout","dispatchEvent","warningBadge","label","copyDappApiUrl","render","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","_dec2","_dec3","_dec4","_dec5","_dec6","_dec7","_dec8","cantonLogo","BaseElement","href","label","css","html","customElement","property","chevronLeftIcon","WgBackLink","render","content","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","_dec2","_init_href","_init_extra__init_href","_init_label","_init_extra__init_label","BaseElement","value","label","copied","css","html","customElement","property","state","clipboardIcon","CopySuccessEvent","Event","bubbles","composed","type","String","WgCopyButton","copyToClipboard","e","stopPropagation","navigator","clipboard","writeText","fallbackCopy","dispatchEvent","window","setTimeout","error","console","input","document","createElement","style","position","left","body","appendChild","select","execCommand","removeChild","render","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","_dec2","_dec3","BaseElement","mode","title","message","backHref","performDefaultAction","css","html","customElement","property","arrowLeftIcon","refreshIcon","warningTriangleIcon","toRelPath","ErrorPageBackEvent","Event","bubbles","composed","ErrorPageRefreshEvent","type","String","Boolean","WgErrorPage","onBack","dispatchEvent","window","location","href","onRefresh","reload","render","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","_dec2","_dec3","_dec4","_dec5","_init_mode","_init_extra__init_mode","_init_message","_init_extra__init_message","_init_backHref","_init_extra__init_backHref","BaseElement","heading","css","html","customElement","property","WgPageHeader","render","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","BaseElement","total","pageSize","page","disabled","css","html","customElement","property","arrowLeftIcon","arrowRightIcon","PageChangeEvent","CustomEvent","bubbles","composed","detail","type","Number","Boolean","WgPagination","maxPage","Math","max","ceil","range","start","end","min","updatePage","nextPage","clamped","dispatchEvent","willUpdate","render","atFirstPage","atLastPage","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","_dec2","_dec3","_dec4","_init_disabled","_init_extra__init_disabled","BaseElement","idp","readonly","customElement","property","css","html","cardStyles","IdpCardReviewEvent","Event","bubbles","composed","IdpCardDeleteEvent","IdpCardUpdateEvent","type","Object","Boolean","IdpCard","_onClick","dispatchEvent","render","id","issuer","configUrl","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","_dec2","_init_idp","_init_extra__init_idp","_init_readonly","_init_extra__init_readonly","BaseElement","mode","idp","loading","_error","selectedType","idpIdInput","idpIssuerInput","idpConfigUrlInput","css","html","nothing","customElement","property","query","state","chevronDownIcon","IdpFormSaveEvent","Event","bubbles","composed","IdpFormDeleteEvent","IdpFormCancelEvent","IdpFormBackEvent","type","String","Object","Boolean","IdpFormComponent","id","issuer","configUrl","_draftId","_draftIssuer","_draftConfigUrl","willUpdate","changedProperties","has","handleTypeChange","event","value","target","handleSubmit","e","preventDefault","result","dispatchEvent","_renderIssuerInput","_renderConfigUrlInput","_renderIdpFields","commonFields","render","isReview","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","_dec2","_dec3","_dec4","_dec5","_dec6","_dec7","_dec8","_init_mode","_init_extra__init_mode","_init_loading","_init_extra__init_loading","_init__error","_init_extra__init__error","BaseElement","network","activeSession","accessToken","readonly","customElement","property","css","html","cardStyles","NetworkCardReviewEvent","Event","bubbles","composed","NetworkCardDeleteEvent","NetworkCardUpdateEvent","type","Object","Boolean","String","NetworkCard","_onClick","dispatchEvent","render","syncId","synchronizerId","name","id","authMethod","identityProviderId","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","_dec2","_dec3","_dec4","_init_network","_init_extra__init_network","encode","decode","encode","isObject","isObject","decode","isObject","b64u","encode","isObject","F","isPlainObject","_a","util.jsonStringifyReplacer","initializer","core.$ZodAsyncError","util.finalizeIssue","core.config","validate","validateAsync","_emoji","integer","number","boolean","_null","_undefined","util.nullish","util.floatSafeRemainder","util.NUMBER_FORMAT_RANGES","util.codePointLength","util.getLengthableOrigin","regexes.lowercase","regexes.uppercase","util.escapeRegex","content","util.aborted","util.explicitlyAborted","core.$ZodAsyncError","util.hide","util.finalizeIssue","core.config","regexes.anyString","regexes.guid","regexes.uuid","regexes.email","regexes.emoji","regexes.nanoid","regexes.nanoidOfLength","regexes.cuid","regexes.cuid2","regexes.ulid","regexes.xid","regexes.ksuid","regexes.datetime","regexes.date","regexes.time","regexes.duration","regexes.ipv4","regexes.ipv6","regexes.cidrv4","regexes.cidrv6","regexes.e164","regexes.number","regexes.boolean","regexes.undefined","regexes.null","util.sizeCaps","util.prefixIssues","util.optionalKeys","util.cached","util.isObject","util.esc","allowsEval","util.allowsEval","util.cleanRegex","util.rawShape","util.isPlainObject","util.getEnumValues","util.escapeRegex","core.$ZodEncodeError","util.issue","util.rawShape","util.parsedType","util.stringifyPrimitive","util.joinValues","util.normalizeParams","_undefined","_null","checks.$ZodCheckLessThan","checks.$ZodCheckGreaterThan","checks.$ZodCheckMultipleOf","checks.$ZodCheckMaxLength","checks.$ZodCheckMinLength","checks.$ZodCheckLengthEquals","checks.$ZodCheckRegex","checks.$ZodCheckLowerCase","checks.$ZodCheckUpperCase","checks.$ZodCheckIncludes","checks.$ZodCheckStartsWith","checks.$ZodCheckEndsWith","checks.$ZodCheckOverwrite","util.slugify","issue","util.issue","checks.$ZodCheck","regexes.base64","regexes.base64url","regexes.number","regexes.integer","core.formatError","core.flattenError","util.jsonStringifyReplacer","en","core.memoizer","util.mergeDefs","core.clone","refine","checks.overwrite","optional","exactOptional","nullable","array","union","util.hide","core.standardProps","parse.parse","parse.parseAsync","parse.safeParse","parse.safeParseAsync","parse.validate","parse.validateAsync","parse.encode","parse.decode","parse.encodeAsync","parse.decodeAsync","parse.safeEncode","parse.safeDecode","parse.safeEncodeAsync","parse.safeDecodeAsync","processors.stringProcessor","processors.aggregateChecks","checks.regex","checks.includes","checks.startsWith","checks.endsWith","checks.minLength","checks.maxLength","checks.length","checks.lowercase","checks.uppercase","checks.trim","checks.normalize","checks.toLowerCase","checks.toUpperCase","checks.slugify","core._email","core._url","core._jwt","core._emoji","core._guid","core._uuid","core._uuidv4","core._uuidv6","core._uuidv7","core._nanoid","core._cuid","core._cuid2","core._ulid","core._base64","core._base64url","core._xid","core._ksuid","core._ipv4","core._ipv6","core._cidrv4","core._cidrv6","core._e164","core._isoDateTime","core._isoDate","core._isoTime","core._isoDuration","string","core._string","processors.numberProcessor","checks.gt","checks.gte","checks.lt","checks.lte","checks.multipleOf","number","core._number","core._int","processors.booleanProcessor","core._boolean","processors.undefinedProcessor","core._undefined","processors.nullProcessor","core._null","processors.unknownProcessor","unknown","core._unknown","processors.neverProcessor","never","core._never","processors.arrayProcessor","core._array","processors.objectProcessor","util.extend","util.safeExtend","util.merge","util.pick","util.omit","util.partial","util.required","object","util.normalizeParams","processors.unionProcessor","processors.intersectionProcessor","processors.recordProcessor","record","processors.enumProcessor","processors.literalProcessor","literal","processors.transformProcessor","core.$ZodEncodeError","issue","util.issue","processors.optionalProcessor","processors.nullableProcessor","processors.defaultProcessor","util.shallowClone","processors.prefaultProcessor","processors.nonoptionalProcessor","processors.catchProcessor","core.util.constantCatch","processors.pipeProcessor","processors.readonlyProcessor","processors.customProcessor","core._refine","core._superRefine","isObject","isObject","isObject","object","isObject","superstructObject","$safeStringify","z.url","z.looseObject","z.string","toPrimitive","toPropertyKey","z.object","z.literal","z.discriminatedUnion","z.object","z.url","z.string","z.looseObject","z.literal","z.number","z.union","z.array","BaseElement","mode","network","_error","networkSchema","css","html","nothing","customElement","property","state","AuthEditor","NetworkEditCancelEvent","Event","bubbles","composed","NetworkEditSaveEvent","NetworkDeleteEvent","type","String","Object","NetworkForm","id","name","description","identityProviderId","ledgerApi","auth","method","audience","scope","clientId","handleSubmit","e","preventDefault","parsedData","safeParse","toStoreNetworkForValidation","success","console","error","dispatchEvent","baseUrl","render","isReview","target","value","synchronizerId","val","adminAuth","serviceAccountAuth","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","_dec2","_dec3","AuthEditor","BaseElement","href","html","css","customElement","property","type","String","NotFound","render","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","BaseElement","syncNeeded","syncing","disabled","css","html","customElement","property","refreshIcon","WalletsSyncEvent","Event","bubbles","composed","type","Boolean","WgWalletsSync","onClick","dispatchEvent","render","title","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","_dec2","_dec3","_init_disabled","_init_extra__init_disabled","BaseElement","wallet","verified","loading","editable","selectLabel","selecting","css","html","nothing","customElement","property","PartyLevelRight","cardStyles","WalletSetPrimaryEvent","Event","bubbles","composed","WalletCardEditEvent","WalletAllocateEvent","WalletCardSelectEvent","type","Object","Boolean","WgWalletCard","renderRightsBadges","rights","length","includes","CanActAs","CanReadAs","CanExecuteAs","renderStatusBadge","badge","primary","disabled","renderMeta","excerptedPartyId","partyId","slice","shouldStackReason","reason","externalTxId","hint","signingProviderId","renderEditButton","dispatchEvent","renderActions","editButton","connectedCallback","syncPartyIdAttribute","updated","setAttribute","removeAttribute","render","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","_dec2","_dec3","_dec4","_dec5","_dec6","_init_loading","_init_extra__init_loading","BaseElement","wallets","loading","nonEditableSigningProviderId","css","html","customElement","property","isWalletEditable","partitionWallets","type","Array","Boolean","WgWalletList","undefined","render","verifiedWallets","unverifiedWallets","map","wallet","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","_dec2","_dec3","_init_loading","_init_extra__init_loading","signingProviders","signingProvidersLoading","signingProvidersLoadingLabel","noSigningProvidersLabel","submitting","publicKeysLoading","publicKeys","css","html","nothing","BaseElement","property","SigningProviderChangeEvent","Event","signingProviderId","bubbles","composed","type","Array","Boolean","String","WgWalletForm","hasNoSigningProviders","length","styles","render","onSubmit","formFields","isLoading","submitDisabled","submittingLabel","submitLabel","submittingMessage","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_dec","_dec1","_dec2","_dec3","_dec4","_dec5","_dec6","WgWalletForm","keySigningProviders","showPrimary","partyHint","selectedSigningProvider","isPrimaryValue","publicKeyValue","html","nothing","customElement","property","state","chevronDownIcon","SigningProviderChangeEvent","WalletCreateEvent","Event","signingProviderId","primary","keyName","bubbles","composed","type","Array","Boolean","WgWalletCreateForm","submitLabel","submittingLabel","submittingMessage","submitDisabled","hasNoSigningProviders","onSubmit","event","preventDefault","isLoading","selectedKey","publicKeys","find","key","id","name","dispatchEvent","showPublicKeySelect","includes","onSigningProviderChange","target","value","submitting","signingProvidersLoading","publicKeysLoading","onPartyHintInput","onPublicKeyChange","onPrimaryChange","checked","formFields","signingProvidersLoadingLabel","noSigningProvidersLabel","signingProviders","map","providerId","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_dec","_initClass","_WgWalletForm","_dec1","_dec2","_dec3","_dec4","_dec5","_dec6","_init_selectedSigningProvider","_init_extra__init_selectedSigningProvider","WgWalletForm","partyId","selectedPublicKey","selectedSigningProvider","disabledSigningProviders","css","html","nothing","customElement","property","chevronDownIcon","SigningProviderChangeEvent","WalletEditEvent","Event","signingProviderId","publicKey","bubbles","composed","type","Array","WgWalletEditForm","submitLabel","submittingLabel","submittingMessage","onSubmit","event","preventDefault","isLoading","dispatchEvent","onSigningProviderChange","target","value","onPublicKeyChange","submitting","signingProvidersLoading","submitDisabled","hasNoSigningProviders","length","selectedSigningProviderDisabled","publicKeysLoading","includes","formFields","signingProvidersLoadingLabel","noSigningProvidersLabel","signingProviders","map","providerId","publicKeys","key","name","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_dec1","_dec2","_dec3","_dec4","BaseElement","networks","idps","loading","connecting","backHref","selectedNetwork","message","messageType","css","html","nothing","customElement","property","state","chevronDownIcon","cantonLogo","LoginConnectEvent","Event","selectedIdp","clientId","clientSecret","username","bubbles","composed","LoginBackEvent","cancelable","type","Array","Boolean","String","WgLoginForm","updated","changedProperties","has","reconcileSelectedNetwork","find","idp","id","identityProviderId","isSelectable","network","authMethod","selectedId","current","selectedNetworkIndex","index","findIndex","handleChange","e","raw","target","value","Number","parseInt","isNaN","handleConnect","renderRoot","querySelector","trim","dispatchEvent","handleSubmit","preventDefault","setMessage","clearMessage","render","renderAuthSpecificInputs","map","net","name","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","_dec2","_dec3","_dec4","_dec5","_dec6","_dec7","_dec8","_init_loading","_init_extra__init_loading","_init_backHref","_init_extra__init_backHref","_init_message","_init_extra__init_message","cantonLogo","BaseElement","transactionId","commandId","externalTxId","status","parsed","createdAt","signedAt","origin","loading","css","html","nothing","customElement","property","ifDefined","cardStyles","getActivityAmount","getActivityStatusBadgeClass","getActivityStatusLabel","getActivityType","formatDateTime","formatUtcDateTime","TransactionCardReviewEvent","Event","bubbles","composed","type","Object","WgTransactionCard","renderFieldRow","label","value","options","valueClasses","valueClass","truncate","filter","Boolean","join","title","handleReview","dispatchEvent","render","activityType","amount","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","_dec2","_dec3","_dec4","_dec5","_dec6","_dec7","_dec8","_dec9","_init_commandId","_init_extra__init_commandId","_init_externalTxId","_init_extra__init_externalTxId","_init_status","_init_extra__init_status","_init_parsed","_init_extra__init_parsed","_init_createdAt","_init_extra__init_createdAt","_init_signedAt","_init_extra__init_signedAt","_init_origin","_init_extra__init_origin","BaseElement","commandId","externalTxId","status","txHash","tx","parsed","createdAt","signedAt","origin","backHref","isApproving","isDeleting","isSigning","submitFailed","disabled","decodedExpanded","html","css","nothing","customElement","property","state","chevronDownIcon","getActivityStatusBadgeClass","getActivityStatusLabel","getActivityType","formatDateTime","formatUtcDateTime","renderCopyableValue","TransactionApproveEvent","Event","bubbles","composed","TransactionDeleteEvent","type","Object","Boolean","WgTransactionDetail","isApproveDisabled","isDeleteDisabled","toggleDecoded","renderInlineField","label","value","renderSignatories","signatories","length","map","signatory","renderDecodedBox","decoded","render","activityType","jsonString","display","title","templateId","renderActionButtons","dispatchEvent","styles","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","_dec2","_dec3","_dec4","_dec5","_dec6","_dec7","_dec8","_dec9","_dec10","_init_externalTxId","_init_extra__init_externalTxId","_init_status","_init_extra__init_status","_init_origin","_init_extra__init_origin","_init_backHref","_init_extra__init_backHref","_init_isApproving","_init_extra__init_isApproving","_init_isDeleting","_init_extra__init_isDeleting","_init_isSigning","_init_extra__init_isSigning","_init_disabled","_init_extra__init_disabled","BaseElement","messageId","message","status","externalTxId","origin","backHref","isApproving","isDeleting","isSigning","disabled","html","css","nothing","customElement","property","getActivityStatusBadgeClass","getActivityStatusLabel","renderCopyableValue","MessageApproveEvent","Event","bubbles","composed","MessageDeleteEvent","type","Boolean","WgMessageDetail","isApproveDisabled","isDeleteDisabled","renderInlineField","label","value","render","renderActionButtons","dispatchEvent","styles","errorCodes","JsonRpcError","ERROR_TITLES","provider","userRejectedRequest","unauthorized","unsupportedMethod","disconnected","chainDisconnected","rpc","parse","invalidRequest","methodNotFound","invalidParams","internal","invalidInput","resourceNotFound","resourceUnavailable","transactionRejected","methodNotSupported","limitExceeded","getErrorToastContent","e","fallback","message","Error","title","code","undefined","buttonText","partitionWallets","isWalletEditable","__create","__defProp","__getOwnPropDesc","__getOwnPropNames","__getProtoOf","__hasOwnProp","__commonJSMin","mod","cb","__copyProps","from","keys","i","n","key","to","except","k","desc","__toESM","isNodeMode","target","bootstrap_min_default","default_default","styles_default","css","BaseElement","LitElement","unsafeCSS","cardStyles","pad","value","formatDateTime","date","seconds","formatUtcDateTime","toPrimitive$24","input","prim","res","hint","toPropertyKey$24","arg","checkInRHS$23","setFunctionName$23","name","fn","prefix","_apply_decs_2311$23","symbolMetadata","defineProperty","create","metadata","existingNonFields","hasClassDecs","classDecs","_","createRunInitializers","useStaticThis","thisArg","targetClass","initializers","hasValue","assertCallable","throwUndefined","hint1","hint2","applyDec","assertInstanceIfPrivate","hasPrivateBrand","decs","decInfo","decVal","isClass","ret","isAccessor","kind","isGetter","isSetter","isMethod","bindPropCall","_this","Class","before","desc1","init","isPrivate","isField","isStatic","newValue","decoratorsHaveThis","dec","decThis","decoratorFinishedRef","ctx","initializer","applyMemberDecs","protoInitializers","staticInitializers","pushInitializers","applyMemberDecsOfKind","memberDecs","kindOnly","instanceBrand","defineMetadata","parentClass","classDecsHaveThis","_identity$21","x","_dec$23","_initClass$22","_BaseElement$20","_dec1$23","_init_apiKey","_init_extra__init_apiKey","ApiKeyCardRevokeEvent","apiKey","customElement","property","_ApiKeyCard","_value","#___private_apiKey_1","_v","ifDefined","toPrimitive$23","toPropertyKey$23","checkInRHS$22","setFunctionName$22","_apply_decs_2311$22","_identity$20","_dec$22","_initClass$21","_BaseElement$19","_dec1$22","_dec2$20","_init_apiKeyParams","_init_extra__init_apiKeyParams","_init__error$2","_init_extra__init__error$2","ApiKeyGenerateEvent","apiKeyParams","state","_ApiKeyForm","#___private_apiKeyParams_1","#___private__error_2","nothing","eyeFillIcon","eyeSlashIcon","clipboardIcon","refreshIcon","chevronDownIcon","chevronLeftIcon","warningTriangleIcon","arrowLeftIcon","arrowRightIcon","menuIcon","toPrimitive$22","toPropertyKey$22","checkInRHS$21","setFunctionName$21","_apply_decs_2311$21","_identity$19","_dec$21","_initClass$20","_BaseElement$18","_dec1$21","_dec2$19","_dec3$17","_dec4$13","_dec5$10","_dec6$9","_dec7$6","_dec8$6","_init_auth","_init_extra__init_auth","_init_allowedMethods","_init_extra__init_allowedMethods","_init_optional","_init_extra__init_optional","_init_emptyText","_init_extra__init_emptyText","_init_pendingRemoveText","_init_extra__init_pendingRemoveText","_init__mode","_init_extra__init__mode","_init__backup","_init_extra__init__backup","_init__secretReplacement","_init_extra__init__secretReplacement","AuthEditorChangeEvent","auth","_AuthEditor","#___private_auth_1","#___private_allowedMethods_2","#___private_optional_3","#___private_emptyText_4","#___private_pendingRemoveText_5","#___private__mode_6","#___private__backup_7","#___private__secretReplacement_8","changed","method","secret","rows","formState","backupSecret","authObj","e","commonFields","row","ALLOWED_ROUTES","isAllowedRoute","path","NON_ROOT_ROUTES","route","right","left","normalizePathname","pathname","trimmedPathname","getCurrentRoute","normalizedPath","getGatewayBasePath","currentRoute","toRelPath","basePath","toRelHref","canton_logo_default","toPrimitive$21","toPropertyKey$21","checkInRHS$20","setFunctionName$20","_apply_decs_2311$20","_identity$18","_dec$20","_initClass$19","_BaseElement$17","_dec1$20","_dec2$18","_dec3$16","_dec4$12","_dec5$9","_dec6$8","_dec7$5","_dec8$5","_init_iconSrc","_init_extra__init_iconSrc","_init_networkName","_init_extra__init_networkName","_init_networkConnected","_init_extra__init_networkConnected","_init_dappApiUrl","_init_extra__init_dappApiUrl","_init_isAdmin","_init_extra__init_isAdmin","_init_warningCount","_init_extra__init_warningCount","_init_menuOpen","_init_extra__init_menuOpen","_init_darkMode","_init_extra__init_darkMode","LogoutEvent","CopyDappApiUrlEvent","_AppHeader","#___private_iconSrc_1","#___private_networkName_2","#___private_networkConnected_3","#___private_dappApiUrl_4","#___private_isAdmin_5","#___private_warningCount_6","#___private_menuOpen_7","#___private_darkMode_8","event","label","toPrimitive$20","toPropertyKey$20","checkInRHS$19","setFunctionName$19","_apply_decs_2311$19","_identity$17","_dec$19","_initClass$18","_BaseElement$16","_dec1$19","_dec2$17","_init_href$1","_init_extra__init_href$1","_init_label$1","_init_extra__init_label$1","_WgBackLink","#___private_href_1","#___private_label_2","content","toPrimitive$19","toPropertyKey$19","checkInRHS$18","setFunctionName$18","_apply_decs_2311$18","_identity$16","_dec$18","_initClass$17","_BaseElement$15","_dec1$18","_dec2$16","_dec3$15","_init_value","_init_extra__init_value","_init_label","_init_extra__init_label","_init_copied","_init_extra__init_copied","CopySuccessEvent","_WgCopyButton","#___private_value_1","#___private_copied_3","error","toPrimitive$18","toPropertyKey$18","checkInRHS$17","setFunctionName$17","_apply_decs_2311$17","_identity$15","_dec$17","_initClass$16","_BaseElement$14","_dec1$17","_dec2$15","_dec3$14","_dec4$11","_dec5$8","_init_mode$2","_init_extra__init_mode$2","_init_title","_init_extra__init_title","_init_message$2","_init_extra__init_message$2","_init_backHref$3","_init_extra__init_backHref$3","_init_performDefaultAction","_init_extra__init_performDefaultAction","ErrorPageBackEvent","ErrorPageRefreshEvent","_WgErrorPage","#___private_mode_1","#___private_title_2","#___private_message_3","#___private_backHref_4","#___private_performDefaultAction_5","toPrimitive$17","toPropertyKey$17","checkInRHS$16","setFunctionName$16","_apply_decs_2311$16","_identity$14","_dec$16","_initClass$15","_BaseElement$13","_dec1$16","_init_heading","_init_extra__init_heading","_WgPageHeader","#___private_heading_1","toPrimitive$16","toPropertyKey$16","checkInRHS$15","setFunctionName$15","_apply_decs_2311$15","_identity$13","_dec$15","_initClass$14","_BaseElement$12","_dec1$15","_dec2$14","_dec3$13","_dec4$10","_init_total","_init_extra__init_total","_init_pageSize","_init_extra__init_pageSize","_init_page","_init_extra__init_page","_init_disabled$3","_init_extra__init_disabled$3","PageChangeEvent","_WgPagination","#___private_total_1","#___private_pageSize_2","#___private_page_3","#___private_disabled_4","start","clamped","nextPage","atFirstPage","atLastPage","end","toPrimitive$15","toPropertyKey$15","checkInRHS$14","setFunctionName$14","_apply_decs_2311$14","_identity$12","_dec$14","_initClass$13","_BaseElement$11","_dec1$14","_dec2$13","_init_idp$1","_init_extra__init_idp$1","_init_readonly$1","_init_extra__init_readonly$1","IdpCardReviewEvent","idp","IdpCardDeleteEvent","IdpCardUpdateEvent","_IdpCard","#___private_idp_1","#___private_readonly_2","toPrimitive$14","toPropertyKey$14","checkInRHS$13","setFunctionName$13","_apply_decs_2311$13","_identity$11","_dec$13","_initClass$12","_BaseElement$10","_dec1$13","_dec2$12","_dec3$12","_dec4$9","_dec5$7","_dec6$7","_dec7$4","_dec8$4","_init_mode$1","_init_extra__init_mode$1","_init_idp","_init_extra__init_idp","_init_loading$4","_init_extra__init_loading$4","_init__error$1","_init_extra__init__error$1","_init_selectedType","_init_extra__init_selectedType","_init_idpIdInput","_init_extra__init_idpIdInput","_init_idpIssuerInput","_init_extra__init_idpIssuerInput","_init_idpConfigUrlInput","_init_extra__init_idpConfigUrlInput","IdpFormSaveEvent","IdpFormDeleteEvent","IdpFormCancelEvent","IdpFormBackEvent","query","_IdpFormComponent","#___private_idp_2","#___private_loading_3","#___private__error_4","#___private_selectedType_5","#___private_idpIdInput_6","#___private_idpIssuerInput_7","#___private_idpConfigUrlInput_8","changedProperties","id","type","issuer","configUrl","result","isReview","toPrimitive$13","toPropertyKey$13","checkInRHS$12","setFunctionName$12","_apply_decs_2311$12","_identity$10","_dec$12","_initClass$11","_BaseElement$9","_dec1$12","_dec2$11","_dec3$11","_dec4$8","_init_network$1","_init_extra__init_network$1","_init_activeSession","_init_extra__init_activeSession","_init_accessToken","_init_extra__init_accessToken","_init_readonly","_init_extra__init_readonly","NetworkCardReviewEvent","network","NetworkCardDeleteEvent","NetworkCardUpdateEvent","_NetworkCard","#___private_network_1","#___private_activeSession_2","#___private_accessToken_3","#___private_readonly_4","syncId","encoder","decoder","concat","buffers","size","acc","length","buf","buffer","NON_ASCII","encode$2","string","bytes","code","encodeBase64","url","CHUNK_SIZE","arr","encoded","decodeBase64","binary","JOSEError","message","options","JOSENotSupported","JWSInvalid","JWTInvalid","invalid","decode$1","cause","encode$1","isObject$3","prototype","isDisjoint","headers","parameters","header","parameter","assertNotSet","JWS_RECOGNIZED","validateCritDuplicates","protectedHeader","crit","Err","validateCrit","joseHeader","recognized","recognizedOption","recognizedDefault","validateB64","extensions","b64","serializeJoseHeader","serialized","parsed","tag","jwkMatchesOp","entry","expected","usage","alg","expectedKeyOp","prepareKey","requiresPrivateKey","normalized","keyObject","normalizeJwk","invalidKeyType","key_ops","isKeyLike","expectedType","isCryptoKey","cacheKey","cached","cache","isPublic","crv","nist","params","jwkToKey","isKeyObject","types","last","actual","msg","unusable","prop","checkUsage","checkModulusLength","modulusLength","checkCryptoKey","algorithm","snapshotJwk","jwk","keyOps","operation","keyData","extractable","rawKey","table","out","entries","sig","hmac","subtle","bits","rsa","saltLength","ecdsa","eddsa","mldsa","parameterSet","JWS","jwsAlgorithm","epoch","multipliers","REGEX","invalidDuration","secs","str","matched","durationSeconds","validateInput","validateStringClaim","claim","validateAudienceClaim","member","numericDate","producerClaimsSets","producerClaimsSet","producer","jwtClaimsSetBytes","claimsSet","JWTClaimsBuilder","createSignature","payload","unprotectedHeader","encodedProtectedHeader","rejectUnencoded","encodedPayload","signingPayload","signingInput","encodedPayloadCache","signingKey","jws","createCompactSignature","SignJWT_base","SignJWT","#protectedHeader","getEnumValues","numericValues","v","joinValues","array","stringifyPrimitive","val","separator","jsonStringifyReplacer","Cached","getter","nullish","cleanRegex","source","floatSafeRemainder","ratio","step","roundedRatio","tolerance","assignProp","rawShape","def","sourceShape","schema","deferProp","putProp","mirrorShape","raw","wrap","mirrorProps","mergeDefs","defs","mergedDescriptors","descriptors","esc","slugify","captureStackTrace","_args","isObject$2","data","allowsEval","globalConfig","isPlainObject$1","o","ctor","prot","shallowClone","propertyKeyTypes","escapeRegex","clone","cl","inst","normalizeParams","_params","optionalKeys","shape","NUMBER_FORMAT_RANGES","BIGINT_FORMAT_RANGES","pick","currDef","checks","newShape","maskedKeys","mask","omit","omitted","extend","existingShape","extended","safeExtend","merge","b","a","partial","selected","required","aborted","startIndex","explicitlyAborted","prefixIssues","issues","_a","iss","unwrapMessage","sizeCaps","caps","ch","defChecks","d","max","attachSchema","finalizeIssue","traits","schemaError","config","full","highSurrogate","codePointLength","units","count","getLengthableOrigin","parsedType","obj","issue","args","members","proto","defineBound","own","hide","derived","computes","compute","sentinel","installing","broke","breaker","defineLazyInternal","outer","err","installLazyProp","make","CONSTANT_CATCH","constantCatch","_a$1","_zodDesc","_E","newError","E","saved","Definition","$constructor","zodProto","Internals","protoMembers","initialized","ctorProto","up","Parent","deferred","pp","$ZodAsyncError","$ZodEncodeError","newConfig","_getMessage","internals","_setMessage","_messageDesc","_issuesDesc","_installedToString","$ZodError","node","flattenError","fieldErrors","formErrors","sub","mapper","formatError","processError","fullpath","curr","el","terminal","finalizeParams","callee","_parse","_ctx","_Err","_parseAsync","_safeParse","failure","_safeParseAsync","COMPILE_INVALID","COMPILE_FALLBACK","validate$1","validator","validateFallback","fallbackRun","validateAsync$1","_encode","parse","_decode","_encodeAsync","parseAsync","_decodeAsync","_safeEncode","_safeDecode","_safeEncodeAsync","_safeDecodeAsync","cuid","cuid2","ulid","xid","ksuid","nanoid","nanoidOfLength","duration","guid","uuid","version","email","_emoji$1","emoji","ipv4","ipv6","cidrv4","cidrv6","base64","base64url","httpProtocol","e164","dateSource","anchor","timeSource","hhmm","time","datetime","opts","qualified","timeRegex","anyString","integer$1","number$2","boolean$1","_null$2","_undefined$2","lowercase","uppercase","$ZodCheck","_whenHasLength","numericOriginMap","$ZodCheckLessThan","origin","$ZodCheckGreaterThan","$ZodCheckMultipleOf","$ZodCheckNumberFormat","isInt","minimum","maximum","$ZodCheckMaxLength","$ZodCheckMinLength","$ZodCheckLengthEquals","tooBig","$ZodCheckStringFormat","_b","$ZodCheckRegex","$ZodCheckLowerCase","$ZodCheckUpperCase","$ZodCheckIncludes","escapedRegex","$ZodCheckStartsWith","pattern","$ZodCheckEndsWith","$ZodCheckOverwrite","Doc","closed","lines","minIndent","dedented","line","F","$ZodType","runChecks","isAborted","asyncResult","currLen","handleCanaryResult","canary","checkResult","standardProps","toStandardResult","r","validateAsync","$ZodString","$ZodStringFormat","$ZodGUID","$ZodUUID","$ZodEmail","canParseURL","validateURL","trimmed","parseURLObject","URLStatic","asciiTabOrNewline","stripTabAndNewline","urlHostnameOk","hostname","urlProtocolOk","protocol","$ZodURL","$ZodEmoji","$ZodNanoID","$ZodCUID","$ZodCUID2","$ZodULID","$ZodXID","$ZodKSUID","$ZodISODateTime","$ZodISODate","$ZodISOTime","$ZodISODuration","$ZodIPv4","ipv6Alphabet","isValidIPv6","$ZodIPv6","$ZodCIDRv4","isValidCIDRv6","parts","address","prefixNum","$ZodCIDRv6","isValidBase64","base64Charset","$ZodBase64","base64urlCharset","isValidBase64URL","c","$ZodBase64URL","$ZodE164","isValidJWT","tokensParts","token","parsedHeader","$ZodJWT","$ZodNumber","received","$ZodNumberFormat","$ZodBoolean","$ZodUndefined","$ZodNull","$ZodUnknown","$ZodNever","capSize","cap","arraySize","handleArrayResult","final","index","$ZodArray","memo","proms","abortEarly","item","handlePropertyResult","isPresent","isOptionalOut","optout","optin","NO_SYMBOL_KEYS","normalizeDef","ownSymbols","symbolKeys","allKeys","okeys","handleCatchall","unrecognized","keySet","_catchall","t","seen","$ZodObject","sh","get","newSh","_normalized","zod","propValues","field","isObject","catchall","$ZodObjectJIT","superParse","generateFastpass","syms","doc","parseStr","prefixStr","ids","counter","isOptionalIn","assign","fastpass","jit","fastEnabled","allowsEval$1","handleUnionResults","results","nonaborted","$ZodUnion","option","patterns","p","first","async","discriminatorMap","map","values","$ZodDiscriminatedUnion","_super","undefinedCount","pv","propShape","disc","opt","$ZodIntersection","handleIntersectionResults","mergeValues","bKeys","sharedKeys","newObj","sharedValue","newArray","itemA","itemB","unrecKeys","unrecIssue","keyIssues","collect","side","bothKeys","f","aggregated","merged","$ZodRecord","recordKeys","keyResult","outKey","retryResult","$ZodEnum","valuesSet","patternValues","$ZodLiteral","vals","$ZodTransform","_out","output","handleOptionalResult","$ZodOptional","$ZodExactOptional","$ZodNullable","$ZodDefault","handleDefaultResult","$ZodPrefault","$ZodNonOptional","handleNonOptionalResult","handleCatchResult","$ZodCatch","$ZodPipe","handlePipeResult","next","$ZodReadonly","handleReadonlyResult","$ZodCustom","handleRefineResult","_iss","$ZodCyclicError","STATE","NO_ISSUES","isRef","cloneIssues","recursive","NONE","ASSUMED","PROVEN","isRecursive","stack","check","child","answer","resolve","spread","inner","settle","bucketFor","bucket","handoff","open","empty","base","wrapped","isBackEdge","isRecursiveInst","rechecked","lastCtx","lastBucket","walked","hit","depth","memoizer","backEdges","Sizable","getSizing","FormatDictionary","TypeDictionary","getTypeName","adj","sizing","_issue","en_default","$ZodRegistry","_meta","meta","pm","registry","globalRegistry","snapshotChecks","_string","_email","_guid","_uuid","_uuidv4","_uuidv6","_uuidv7","_url","_emoji","_nanoid","_cuid","_cuid2","_ulid","_xid","_ksuid","_ipv4","_ipv6","_cidrv4","_cidrv6","_base64","_base64url","_e164","_jwt","_isoDateTime","_isoDate","_isoTime","_isoDuration","_number","_int","_boolean","_undefined$1","_null$1","_unknown","_never","_lt","_lte","_gt","_gte","_multipleOf","_maxLength","_minLength","_length","_regex","_lowercase","_uppercase","_includes","_startsWith","_endsWith","_overwrite","_normalize","form","_trim","_toLowerCase","_toUpperCase","_slugify","_array","_refine","_superRefine","issue$2","_check","assignProps","sources","initializeContext","handleUnrepresentable","json","processSchema","overrideSchema","_json","processor","parent","isTransforming","encodeJSONPointerSegment","segment","extractDefs","root","idToSchema","existing","makeURI","defsSegment","externalId","uriGenerator","defUriPrefix","defId","extractToDef","ref","ext","compactTypeUnion","FOLDABLE_KEYS","UNION_KEYS","undeclaredConstraint","extra","foldObjects","objects","properties","object","other","part","folded","constraints","constraint","foldIntersection","allOf","unions","m","union","keyword","rest","branches","branch","finalize","flattenRef","zodSchema","_cached","refSeen","refSchema","parentSeen","rewrite","carriers","rootMetaId","finalized","createStandardJSONSchemaMethod","_schema","createToJSONSchemaMethod","libraryOptions","narrowMin","agg","narrowMax","narrowBoth","addDivisor","addPattern","intersectMime","mime","setFormat","format","minContributor","maxContributor","formatContributor","ranges","contributors","aggregateChecks","list","bag","formatMap","exactPatterns","exactPattern","stringProcessor","laxFormat","contentEncoding","patternList","regex","numberProcessor","exMin","exclusiveMinimum","exMax","exclusiveMaximum","legacy","multipleOf","divisors","divisor","booleanProcessor","nullProcessor","undefinedProcessor","neverProcessor","enumProcessor","literalProcessor","customProcessor","transformProcessor","arrayProcessor","inputOptin","objectProcessor","requiredKeys","unionProcessor","isExclusive","intersectionProcessor","isSimpleIntersection","stringifyKeyNames","visited","bySchema","inlined","mapped","numericType","pendingRecords","rewriteKeyNames","rewrites","record","names","rewritten","carrier","recordProcessor","keyType","valueSchema","pending","keyValues","omittableOnInput","validKeyValues","nullableProcessor","nonoptionalProcessor","UNREPRESENTABLE_DEFAULT","serializeDefaultValue","unrepresentable","defaultProcessor","prefaultProcessor","catchProcessor","catchValue","pipeProcessor","inIsTransform","innerType","readonlyProcessor","optionalProcessor","_installedErrorProtos","_lazyMethod","ZodRealError","self","safeParse","safeParseAsync","encode","decode","encodeAsync","decodeAsync","safeEncode","safeDecode","safeEncodeAsync","safeDecodeAsync","_ensureDefaultLocale","_ensureDefaultMemoizer","ZodType","chks","reg","refine$1","superRefine","refinement","optional$1","exactOptional$1","nullable$1","nonoptional","array$1","union$1","intersection","pipe","transform","tx","_default","prefault","_catch","readonly","_ZodString","ZodString","ZodEmail","ZodURL","ZodJWT","ZodEmoji","ZodGUID","ZodUUID","ZodNanoID","ZodCUID","ZodCUID2","ZodULID","ZodBase64","ZodBase64URL","ZodXID","ZodKSUID","ZodIPv4","ZodIPv6","ZodCIDRv4","ZodCIDRv6","ZodE164","ZodISODateTime","ZodISODate","ZodISOTime","ZodISODuration","string$1","ZodStringFormat","ZodNumber","int","number$1","ZodNumberFormat","ZodBoolean","boolean","ZodUndefined","_undefined","ZodNull","_null","ZodUnknown","unknown$1","ZodNever","never$1","ZodArray","element","ZodObject","_enum","incoming","ZodOptional","ZodExactOptional","ZodNonOptional","object$2","looseObject","ZodUnion","ZodDiscriminatedUnion","discriminatedUnion","ZodIntersection","ZodRecord","record$1","valueType","ZodEnum","newEntries","ZodLiteral","literal$1","ZodTransform","issue$1","ZodNullable","ZodDefault","defaultValue","ZodPrefault","ZodCatch","ZodPipe","in_","ZodReadonly","ZodCustom","StructError","explanation","failures","isIterable","isObject$1","print","shiftIterator","done","toFailure","context","struct","toFailures","validationResult","run","coerce","status","innerKey","innerValue","innerStruct","iterable","Struct","props","coercer","refiner","sym","assert","is","validate","ExactOptionalBrand","ExactOptionalStruct","tuples","tuple","innerTuple","SENSITIVE_REDACTED","SENSITIVE_BRAND","isSensitiveStruct","redactKeys","redacted","sourceObj","withRedactedBranch","redactBranch","parentObj","parentIndex","sensitiveKeys","ancestorIndex","ancestor","childSanitized","childIndex","copy","childFound","childKey","entryKey","entryValue","fieldKey","fieldValue","fieldStruct","define","withSensitiveEntries","parentInBranch","any","Element","arrayValue","integer","literal","description","constant","never","nullable","number","object$1","knowns","Never","unknowns","propertySchema","optional","objectKey","objectValue","Key","Value","Structs","InnerStruct","coerced","unknown","condition","refine","hasProperty","objectToCheck","JsonSize","\"Null\"","\"Comma\"","\"Wrapper\"","\"True\"","\"False\"","\"Quote\"","\"Colon\"","\"Date\"","isPlainObject","hasOptional","exactOptional","validateJson","every","UnsafeJsonStruct","JsonStruct","propKey","propValue","isValidJson","getSafeJson","JsonRpcVersionStruct","JsonRpcIdStruct","JsonRpcErrorStruct","JsonRpcParamsStruct","import_fast_safe_stringify","stringify","deterministicStringify","LIMIT_REPLACE_NODE","CIRCULAR_REPLACE_NODE","replacerStack","defaultOptions","decirc","replacer","spacer","replaceGetterValues","setReplace","propertyDescriptor","replace","edgeIndex","compareFunction","tmp","deterministicDecirc","errorCodes","errorValues","FALLBACK_ERROR_CODE","FALLBACK_MESSAGE","getMessageFromCode","JSON_RPC_SERVER_ERROR_MESSAGE","isValidCode","codeString","isJsonRpcServerError","fallbackMessage","serializeCause","serializeObject","dataHasCause","$importDefault","module","safeStringify","JsonRpcError","stringifyReplacer","logLevels","compareLogLevel","aIndex","bIndex","scopedConfigSymbol","defaultScopedLogger","noFilters","getCurrentScopedConfig","scopedConfig","contextLocalStorage","isCompiledScopedConfig","getActiveScopedConfig","scopedConfigHasSink","getScopedSinkDispatchPlan","category","level","scopedConfigCapturesSourceLocation","categoryKey","captures","logger","emitWithScopedConfig","plan","filterScopedRecord","bypassSinks","emitToSink","sink","activeConfig","getScopedSinkDispatchPlanForPrefix","parentPlan","wrapScopedSinks","collectScopedForwardSinks","firstSink","sinks","appendSink","parentSinks","filters","getScopedFilters","filter","v8FramePrefix","absoluteFilePattern","locationPattern","rejected","parseSourceLocation","parseV8Frame","frameIndex","parseSpiderMonkeyFrame","frame","body","accept","parseLocation","found","location","whole","match","file","column","lazySymbol","throttlingSummaryRecordSymbol","immediateSinkSymbol","internalStringLogRecords","resolvedStringLogRecords","globalSourceLocationCapture","scopedSourceLocationCaptures","isSourceLocationCaptureActive","attachSourceLocation","sourceLocation","isLazy","resolveProperties","resolved","symbolProperties","symbolResolved","isPromiseObject","logStringMessage","resolvedProps","snapshotLogRecordProperties","snapshot","hasEnumerableProperties","shouldSnapshotForSink","getLogger","LoggerImpl","globalRootLoggerSymbol","isMetaLoggerCategory","rootLogger","childRef","#parentSinks","#lowestLevel","subcategory","LoggerCtx","enabled","categoryPrefix","getCategoryPrefix","dispatcher","#sinkPlanCache","#forwardPlanCache","localSinks","baseCategory","fullCategory","fullRecord","snapshot$1","snapshotFailed$1","bypassSinks2","activeBypassSinks","metaLogger","snapshotFailed","implicitContext","getImplicitContextIfAny","rawMessage","cachedProps","cachedMessage","parseMessageTemplate","realizeMessage","callback","tpl","renderMessage","messageTemplate","contextProps","recordWithContext","isNestedAccess","getOwnProperty","parseNextSegment","len","fromIndex","quote","segmentStr","escapeChar","hex","codePoint","indexStr","indexNum","accessProperty","resolvePropertyPath","current","nextIndex","template","char","closeIndex","beforeText","trimmedKey","remainingText","categoryPrefixSymbol","store","require_LRUCacheNode","exports","entryExpirationTimeInMS","cloneFn","prev","onEntryEvicted","onEntryMarkedAsMostRecentlyUsed","require_LRUCache","LRUCacheNode_1","maxSize","currentNodeForKey","entryOptions","expiredNodes","__createBinding","this$1","k2","__exportStar","endpointSchema","_typeof","toPrimitive$12","toPropertyKey$12","_defineProperty","credentials","now","jwt","expirySeconds","keyId","authorizationCodeAuthSchema","clientCredentialsAuthSchema","selfSignedAuthSchema","selfIssuedAuthSchema","clientCredentialsEnvAuthSchema","selfSignedEnvAuthSchema","authSchema","idpSchema","PartyLevelRight","\"CanActAs\"","\"CanReadAs\"","\"CanExecuteAs\"","ledgerApiSchema","networkSchema","postgresFromEnvOrConfig","toPrimitive$11","toPropertyKey$11","checkInRHS$11","setFunctionName$11","_apply_decs_2311$11","_identity$9","_dec$11","_initClass$10","_BaseElement$8","_dec1$11","_dec2$10","_dec3$10","_init_mode","_init_extra__init_mode","_init_network","_init_extra__init_network","_init__error","_init_extra__init__error","NetworkEditCancelEvent","NetworkEditSaveEvent","NetworkDeleteEvent","_NetworkForm","#___private_network_2","#___private__error_3","parsedData","toPrimitive$10","toPropertyKey$10","checkInRHS$10","setFunctionName$10","_apply_decs_2311$10","_identity$8","_dec$10","_initClass$9","_BaseElement$7","_dec1$10","_init_href","_init_extra__init_href","_NotFound","toPrimitive$9","toPropertyKey$9","checkInRHS$9","setFunctionName$9","_apply_decs_2311$9","_identity$7","_dec$9","_initClass$8","_BaseElement$6","_dec1$9","_dec2$9","_dec3$9","_init_syncNeeded","_init_extra__init_syncNeeded","_init_syncing","_init_extra__init_syncing","_init_disabled$2","_init_extra__init_disabled$2","WalletsSyncEvent","_WgWalletsSync","#___private_syncNeeded_1","#___private_syncing_2","#___private_disabled_3","title","toPrimitive$8","toPropertyKey$8","checkInRHS$8","setFunctionName$8","_apply_decs_2311$8","_identity$6","_dec$8","_initClass$7","_BaseElement$5","_dec1$8","_dec2$8","_dec3$8","_dec4$7","_dec5$6","_dec6$6","_init_wallet","_init_extra__init_wallet","_init_verified","_init_extra__init_verified","_init_loading$3","_init_extra__init_loading$3","_init_editable","_init_extra__init_editable","_init_selectLabel","_init_extra__init_selectLabel","_init_selecting","_init_extra__init_selecting","WalletSetPrimaryEvent","wallet","WalletCardEditEvent","WalletAllocateEvent","WalletCardSelectEvent","_WgWalletCard","#___private_wallet_1","#___private_verified_2","#___private_editable_4","#___private_selectLabel_5","#___private_selecting_6","excerptedPartyId","shouldStackReason","badge","editButton","toPrimitive$7","toPropertyKey$7","checkInRHS$7","setFunctionName$7","_apply_decs_2311$7","_identity$5","_dec$7","_initClass$6","_BaseElement$4","_dec1$7","_dec2$7","_dec3$7","_init_wallets","_init_extra__init_wallets","_init_loading$2","_init_extra__init_loading$2","_init_nonEditableSigningProviderId","_init_extra__init_nonEditableSigningProviderId","_WgWalletList","#___private_wallets_1","#___private_loading_2","#___private_nonEditableSigningProviderId_3","unverifiedWallets","verifiedWallets","toPrimitive$6","toPropertyKey$6","checkInRHS$6","setFunctionName$6","_apply_decs_2311$6","_dec$6","_dec1$6","_dec2$6","_dec3$6","_dec4$6","_dec5$5","_dec6$5","_init_signingProviders","_init_extra__init_signingProviders","_init_signingProvidersLoading","_init_extra__init_signingProvidersLoading","_init_signingProvidersLoadingLabel","_init_extra__init_signingProvidersLoadingLabel","_init_noSigningProvidersLabel","_init_extra__init_noSigningProvidersLabel","_init_submitting","_init_extra__init_submitting","_init_publicKeysLoading","_init_extra__init_publicKeysLoading","_init_publicKeys","_init_extra__init_publicKeys","SigningProviderChangeEvent","signingProviderId","WgWalletForm","#___private_signingProviders_1","#___private_signingProvidersLoading_2","#___private_signingProvidersLoadingLabel_3","#___private_noSigningProvidersLabel_4","#___private_submitting_5","#___private_publicKeysLoading_6","#___private_publicKeys_7","toPrimitive$5","toPropertyKey$5","checkInRHS$5","setFunctionName$5","_apply_decs_2311$5","_dec$5","_initClass$5","_WgWalletForm$1","_dec1$5","_dec2$5","_dec3$5","_dec4$5","_dec5$4","_dec6$4","_init_keySigningProviders","_init_extra__init_keySigningProviders","_init_showPrimary","_init_extra__init_showPrimary","_init_partyHint","_init_extra__init_partyHint","_init_selectedSigningProvider$1","_init_extra__init_selectedSigningProvider$1","_init_isPrimaryValue","_init_extra__init_isPrimaryValue","_init_publicKeyValue","_init_extra__init_publicKeyValue","WalletCreateEvent","partyHint","primary","keyName","_WgWalletCreateForm","#___private_keySigningProviders_1","#___private_showPrimary_2","#___private_partyHint_3","#___private_selectedSigningProvider_4","#___private_isPrimaryValue_5","#___private_publicKeyValue_6","providerId","toPrimitive$4","toPropertyKey$4","checkInRHS$4","setFunctionName$4","_apply_decs_2311$4","_identity$4","_dec$4","_initClass$4","_WgWalletForm","_dec1$4","_dec2$4","_dec3$4","_dec4$4","_init_partyId","_init_extra__init_partyId","_init_selectedPublicKey","_init_extra__init_selectedPublicKey","_init_selectedSigningProvider","_init_extra__init_selectedSigningProvider","_init_disabledSigningProviders","_init_extra__init_disabledSigningProviders","WalletEditEvent","partyId","publicKey","_WgWalletEditForm","#___private_partyId_1","#___private_selectedPublicKey_2","#___private_selectedSigningProvider_3","#___private_disabledSigningProviders_4","toPrimitive$3","toPropertyKey$3","checkInRHS$3","setFunctionName$3","_apply_decs_2311$3","_identity$3","_dec$3","_initClass$3","_BaseElement$3","_dec1$3","_dec2$3","_dec3$3","_dec4$3","_dec5$3","_dec6$3","_dec7$3","_dec8$3","_init_networks","_init_extra__init_networks","_init_idps","_init_extra__init_idps","_init_loading$1","_init_extra__init_loading$1","_init_connecting","_init_extra__init_connecting","_init_backHref$2","_init_extra__init_backHref$2","_init_selectedNetwork","_init_extra__init_selectedNetwork","_init_message$1","_init_extra__init_message$1","_init_messageType","_init_extra__init_messageType","LoginConnectEvent","selectedNetwork","selectedIdp","clientId","clientSecret","username","LoginBackEvent","_WgLoginForm","#___private_networks_1","#___private_idps_2","#___private_connecting_4","#___private_backHref_5","#___private_selectedNetwork_6","#___private_message_7","#___private_messageType_8","selectedId","net","getActivityStatusTone","getActivityStatusLabel","getActivityStatusBadgeClass","getActivityType","getActivityAmount","toPrimitive$2","toPropertyKey$2","checkInRHS$2","setFunctionName$2","_apply_decs_2311$2","_identity$2","_dec$2","_initClass$2","_BaseElement$2","_dec1$2","_dec2$2","_dec3$2","_dec4$2","_dec5$2","_dec6$2","_dec7$2","_dec8$2","_dec9$2","_init_transactionId","_init_extra__init_transactionId","_init_commandId$1","_init_extra__init_commandId$1","_init_externalTxId$2","_init_extra__init_externalTxId$2","_init_status$2","_init_extra__init_status$2","_init_parsed$1","_init_extra__init_parsed$1","_init_createdAt$1","_init_extra__init_createdAt$1","_init_signedAt$1","_init_extra__init_signedAt$1","_init_origin$2","_init_extra__init_origin$2","_init_loading","_init_extra__init_loading","TransactionCardReviewEvent","transactionId","commandId","_WgTransactionCard","#___private_transactionId_1","#___private_commandId_2","#___private_externalTxId_3","#___private_status_4","#___private_parsed_5","#___private_createdAt_6","#___private_signedAt_7","#___private_origin_8","#___private_loading_9","valueClasses","activityType","amount","createdAt","renderCopyableValue","resolvedValue","display","copyLabel","toPrimitive$1","toPropertyKey$1","checkInRHS$1","setFunctionName$1","_apply_decs_2311$1","_identity$1","_dec$1","_initClass$1","_BaseElement$1","_dec1$1","_dec2$1","_dec3$1","_dec4$1","_dec5$1","_dec6$1","_dec7$1","_dec8$1","_dec9$1","_dec10$1","_dec11","_dec12","_dec13","_dec14","_dec15","_dec16","_init_commandId","_init_extra__init_commandId","_init_externalTxId$1","_init_extra__init_externalTxId$1","_init_status$1","_init_extra__init_status$1","_init_txHash","_init_extra__init_txHash","_init_tx","_init_extra__init_tx","_init_parsed","_init_extra__init_parsed","_init_createdAt","_init_extra__init_createdAt","_init_signedAt","_init_extra__init_signedAt","_init_origin$1","_init_extra__init_origin$1","_init_backHref$1","_init_extra__init_backHref$1","_init_isApproving$1","_init_extra__init_isApproving$1","_init_isDeleting$1","_init_extra__init_isDeleting$1","_init_isSigning$1","_init_extra__init_isSigning$1","_init_submitFailed","_init_extra__init_submitFailed","_init_disabled$1","_init_extra__init_disabled$1","_init_decodedExpanded","_init_extra__init_decodedExpanded","TransactionApproveEvent","TransactionDeleteEvent","_WgTransactionDetail","#___private_commandId_1","#___private_externalTxId_2","#___private_status_3","#___private_txHash_4","#___private_tx_5","#___private_parsed_6","#___private_createdAt_7","#___private_signedAt_8","#___private_origin_9","#___private_backHref_10","#___private_isApproving_11","#___private_isDeleting_12","#___private_isSigning_13","#___private_submitFailed_14","#___private_disabled_15","#___private_decodedExpanded_16","signatories","signatory","decoded","toPrimitive","toPropertyKey","checkInRHS","setFunctionName","_apply_decs_2311","_identity","_dec","_initClass","_BaseElement","_dec1","_dec2","_dec3","_dec4","_dec5","_dec6","_dec7","_dec8","_dec9","_dec10","_init_messageId","_init_extra__init_messageId","_init_message","_init_extra__init_message","_init_status","_init_extra__init_status","_init_externalTxId","_init_extra__init_externalTxId","_init_origin","_init_extra__init_origin","_init_backHref","_init_extra__init_backHref","_init_isApproving","_init_extra__init_isApproving","_init_isDeleting","_init_extra__init_isDeleting","_init_isSigning","_init_extra__init_isSigning","_init_disabled","_init_extra__init_disabled","MessageApproveEvent","messageId","MessageDeleteEvent","_WgMessageDetail","#___private_messageId_1","#___private_message_2","#___private_externalTxId_4","#___private_origin_5","#___private_backHref_6","#___private_isApproving_7","#___private_isDeleting_8","#___private_isSigning_9","#___private_disabled_10","ERROR_TITLES","getErrorToastContent","fallback"],"sources":["../../../node_modules/.pnpm/bootstrap@5.3.8_@popperjs+core@2.11.8/node_modules/bootstrap/dist/css/bootstrap.min.css?inline","../themes/default.css?inline","../src/styles/index.ts","../src/internal/base-element.ts","../src/styles/card.ts","../src/date-time.ts","../src/components/api-key-card.ts","../src/components/api-key-form.ts","../src/icons/index.ts","../src/components/auth-editor.ts","../src/routing.ts","../images/logos/canton-logo.png","../src/components/app-header.ts","../src/components/back-link.ts","../src/components/copy-button.ts","../src/components/error-page.ts","../src/components/page-header.ts","../src/components/pagination.ts","../src/components/idp-card.ts","../src/components/idp-form.ts","../src/components/network-card.ts","../../../node_modules/.pnpm/jose@6.2.15/node_modules/jose/dist/webapi/lib/buffer_utils.js","../../../node_modules/.pnpm/jose@6.2.15/node_modules/jose/dist/webapi/util/errors.js","../../../node_modules/.pnpm/jose@6.2.15/node_modules/jose/dist/webapi/util/base64url.js","../../../node_modules/.pnpm/jose@6.2.15/node_modules/jose/dist/webapi/lib/validate.js","../../../node_modules/.pnpm/jose@6.2.15/node_modules/jose/dist/webapi/lib/key.js","../../../node_modules/.pnpm/jose@6.2.15/node_modules/jose/dist/webapi/lib/key_descriptor.js","../../../node_modules/.pnpm/jose@6.2.15/node_modules/jose/dist/webapi/lib/jws_algorithms.js","../../../node_modules/.pnpm/jose@6.2.15/node_modules/jose/dist/webapi/lib/jwt_claims_set.js","../../../node_modules/.pnpm/jose@6.2.15/node_modules/jose/dist/webapi/lib/jws_sign.js","../../../node_modules/.pnpm/jose@6.2.15/node_modules/jose/dist/webapi/jwt/sign.js","../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/util.js","../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/core.js","../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/errors.js","../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/parse.js","../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/regexes.js","../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/checks.js","../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/doc.js","../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/versions.js","../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/schemas.js","../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/memoizer.js","../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/locales/en.js","../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/registries.js","../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/api.js","../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/to-json-schema.js","../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/json-schema-processors.js","../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/errors.js","../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/parse.js","../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/schemas.js","../../../node_modules/.pnpm/@metamask+superstruct@3.4.1/node_modules/@metamask/superstruct/dist/error.mjs","../../../node_modules/.pnpm/@metamask+superstruct@3.4.1/node_modules/@metamask/superstruct/dist/utils.mjs","../../../node_modules/.pnpm/@metamask+superstruct@3.4.1/node_modules/@metamask/superstruct/dist/struct.mjs","../../../node_modules/.pnpm/@metamask+superstruct@3.4.1/node_modules/@metamask/superstruct/dist/structs/sensitive.mjs","../../../node_modules/.pnpm/@metamask+superstruct@3.4.1/node_modules/@metamask/superstruct/dist/structs/utilities.mjs","../../../node_modules/.pnpm/@metamask+superstruct@3.4.1/node_modules/@metamask/superstruct/dist/structs/types.mjs","../../../node_modules/.pnpm/@metamask+superstruct@3.4.1/node_modules/@metamask/superstruct/dist/structs/coercions.mjs","../../../node_modules/.pnpm/@metamask+superstruct@3.4.1/node_modules/@metamask/superstruct/dist/structs/refinements.mjs","../../../node_modules/.pnpm/@metamask+utils@11.12.1_supports-color@10.2.2/node_modules/@metamask/utils/dist/misc.mjs","../../../node_modules/.pnpm/@metamask+utils@11.12.1_supports-color@10.2.2/node_modules/@metamask/utils/dist/json.mjs","../../../node_modules/.pnpm/fast-safe-stringify@2.1.1/node_modules/fast-safe-stringify/index.js","../../../node_modules/.pnpm/@metamask+rpc-errors@7.0.3_supports-color@10.2.2/node_modules/@metamask/rpc-errors/dist/error-constants.mjs","../../../node_modules/.pnpm/@metamask+rpc-errors@7.0.3_supports-color@10.2.2/node_modules/@metamask/rpc-errors/dist/utils.mjs","../../../node_modules/.pnpm/@metamask+rpc-errors@7.0.3_supports-color@10.2.2/node_modules/@metamask/rpc-errors/dist/classes.mjs","../../../node_modules/.pnpm/@logtape+logtape@2.4.2/node_modules/@logtape/logtape/dist/level.js","../../../node_modules/.pnpm/@logtape+logtape@2.4.2/node_modules/@logtape/logtape/dist/scoped-config.js","../../../node_modules/.pnpm/@logtape+logtape@2.4.2/node_modules/@logtape/logtape/dist/source-location.js","../../../node_modules/.pnpm/@logtape+logtape@2.4.2/node_modules/@logtape/logtape/dist/logger.js","../../../node_modules/.pnpm/@logtape+logtape@2.4.2/node_modules/@logtape/logtape/dist/context.js","../../../node_modules/.pnpm/typescript-lru-cache@2.0.0/node_modules/typescript-lru-cache/dist/LRUCacheNode.js","../../../node_modules/.pnpm/typescript-lru-cache@2.0.0/node_modules/typescript-lru-cache/dist/LRUCache.js","../../../node_modules/.pnpm/typescript-lru-cache@2.0.0/node_modules/typescript-lru-cache/dist/index.js","../../wallet-auth/dist/index.js","../../wallet-store/dist/index.js","../src/components/network-form.ts","../src/components/not-found.ts","../src/components/wallets-sync.ts","../src/components/wallet-card.ts","../src/components/wallet-list.ts","../src/components/wallet-form.ts","../src/components/wallet-create-form.ts","../src/components/wallet-edit-form.ts","../src/components/login-form.ts","../src/internal/activity-utils.ts","../src/components/transaction-card.ts","../src/internal/activity-render.ts","../src/components/transaction-detail.ts","../src/components/message-detail.ts","../src/internal/error-toast.ts"],"sourcesContent":["@charset \"UTF-8\";/*!\n * Bootstrap v5.3.8 (https://getbootstrap.com/)\n * Copyright 2011-2025 The Bootstrap Authors\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */:root,[data-bs-theme=light]{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-primary-text-emphasis:#052c65;--bs-secondary-text-emphasis:#2b2f32;--bs-success-text-emphasis:#0a3622;--bs-info-text-emphasis:#055160;--bs-warning-text-emphasis:#664d03;--bs-danger-text-emphasis:#58151c;--bs-light-text-emphasis:#495057;--bs-dark-text-emphasis:#495057;--bs-primary-bg-subtle:#cfe2ff;--bs-secondary-bg-subtle:#e2e3e5;--bs-success-bg-subtle:#d1e7dd;--bs-info-bg-subtle:#cff4fc;--bs-warning-bg-subtle:#fff3cd;--bs-danger-bg-subtle:#f8d7da;--bs-light-bg-subtle:#fcfcfd;--bs-dark-bg-subtle:#ced4da;--bs-primary-border-subtle:#9ec5fe;--bs-secondary-border-subtle:#c4c8cb;--bs-success-border-subtle:#a3cfbb;--bs-info-border-subtle:#9eeaf9;--bs-warning-border-subtle:#ffe69c;--bs-danger-border-subtle:#f1aeb5;--bs-light-border-subtle:#e9ecef;--bs-dark-border-subtle:#adb5bd;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-font-sans-serif:system-ui,-apple-system,\"Segoe UI\",Roboto,\"Helvetica Neue\",\"Noto Sans\",\"Liberation Sans\",Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-color-rgb:33,37,41;--bs-body-bg:#fff;--bs-body-bg-rgb:255,255,255;--bs-emphasis-color:#000;--bs-emphasis-color-rgb:0,0,0;--bs-secondary-color:rgba(33, 37, 41, 0.75);--bs-secondary-color-rgb:33,37,41;--bs-secondary-bg:#e9ecef;--bs-secondary-bg-rgb:233,236,239;--bs-tertiary-color:rgba(33, 37, 41, 0.5);--bs-tertiary-color-rgb:33,37,41;--bs-tertiary-bg:#f8f9fa;--bs-tertiary-bg-rgb:248,249,250;--bs-heading-color:inherit;--bs-link-color:#0d6efd;--bs-link-color-rgb:13,110,253;--bs-link-decoration:underline;--bs-link-hover-color:#0a58ca;--bs-link-hover-color-rgb:10,88,202;--bs-code-color:#d63384;--bs-highlight-color:#212529;--bs-highlight-bg:#fff3cd;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, 0.175);--bs-border-radius:0.375rem;--bs-border-radius-sm:0.25rem;--bs-border-radius-lg:0.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-xxl:2rem;--bs-border-radius-2xl:var(--bs-border-radius-xxl);--bs-border-radius-pill:50rem;--bs-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-box-shadow-sm:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);--bs-box-shadow-lg:0 1rem 3rem rgba(0, 0, 0, 0.175);--bs-box-shadow-inset:inset 0 1px 2px rgba(0, 0, 0, 0.075);--bs-focus-ring-width:0.25rem;--bs-focus-ring-opacity:0.25;--bs-focus-ring-color:rgba(13, 110, 253, 0.25);--bs-form-valid-color:#198754;--bs-form-valid-border-color:#198754;--bs-form-invalid-color:#dc3545;--bs-form-invalid-border-color:#dc3545}[data-bs-theme=dark]{color-scheme:dark;--bs-body-color:#dee2e6;--bs-body-color-rgb:222,226,230;--bs-body-bg:#212529;--bs-body-bg-rgb:33,37,41;--bs-emphasis-color:#fff;--bs-emphasis-color-rgb:255,255,255;--bs-secondary-color:rgba(222, 226, 230, 0.75);--bs-secondary-color-rgb:222,226,230;--bs-secondary-bg:#343a40;--bs-secondary-bg-rgb:52,58,64;--bs-tertiary-color:rgba(222, 226, 230, 0.5);--bs-tertiary-color-rgb:222,226,230;--bs-tertiary-bg:#2b3035;--bs-tertiary-bg-rgb:43,48,53;--bs-primary-text-emphasis:#6ea8fe;--bs-secondary-text-emphasis:#a7acb1;--bs-success-text-emphasis:#75b798;--bs-info-text-emphasis:#6edff6;--bs-warning-text-emphasis:#ffda6a;--bs-danger-text-emphasis:#ea868f;--bs-light-text-emphasis:#f8f9fa;--bs-dark-text-emphasis:#dee2e6;--bs-primary-bg-subtle:#031633;--bs-secondary-bg-subtle:#161719;--bs-success-bg-subtle:#051b11;--bs-info-bg-subtle:#032830;--bs-warning-bg-subtle:#332701;--bs-danger-bg-subtle:#2c0b0e;--bs-light-bg-subtle:#343a40;--bs-dark-bg-subtle:#1a1d20;--bs-primary-border-subtle:#084298;--bs-secondary-border-subtle:#41464b;--bs-success-border-subtle:#0f5132;--bs-info-border-subtle:#087990;--bs-warning-border-subtle:#997404;--bs-danger-border-subtle:#842029;--bs-light-border-subtle:#495057;--bs-dark-border-subtle:#343a40;--bs-heading-color:inherit;--bs-link-color:#6ea8fe;--bs-link-hover-color:#8bb9fe;--bs-link-color-rgb:110,168,254;--bs-link-hover-color-rgb:139,185,254;--bs-code-color:#e685b5;--bs-highlight-color:#dee2e6;--bs-highlight-bg:#664d03;--bs-border-color:#495057;--bs-border-color-translucent:rgba(255, 255, 255, 0.15);--bs-form-valid-color:#75b798;--bs-form-valid-border-color:#75b798;--bs-form-invalid-color:#ea868f;--bs-form-invalid-border-color:#ea868f}*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;border:0;border-top:var(--bs-border-width) solid;opacity:.25}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2;color:var(--bs-heading-color)}.h1,h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,h1{font-size:2.5rem}}.h2,h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,h2{font-size:2rem}}.h3,h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){.h3,h3{font-size:1.75rem}}.h4,h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h4,h4{font-size:1.5rem}}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}.small,small{font-size:.875em}.mark,mark{padding:.1875em;color:var(--bs-highlight-color);background-color:var(--bs-highlight-bg)}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:rgba(var(--bs-link-color-rgb),var(--bs-link-opacity,1));text-decoration:underline}a:hover{--bs-link-color-rgb:var(--bs-link-hover-color-rgb)}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:var(--bs-font-monospace);font-size:1em}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:var(--bs-code-color);word-wrap:break-word}a>code{color:inherit}kbd{padding:.1875rem .375rem;font-size:.875em;color:var(--bs-body-bg);background-color:var(--bs-body-color);border-radius:.25rem}kbd kbd{padding:0;font-size:1em}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:var(--bs-secondary-color);text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator{display:none!important}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;line-height:inherit;font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button{cursor:pointer;filter:grayscale(1)}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}::file-selector-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}.lead{font-size:1.25rem;font-weight:300}.display-1{font-weight:300;line-height:1.2;font-size:calc(1.625rem + 4.5vw)}@media (min-width:1200px){.display-1{font-size:5rem}}.display-2{font-weight:300;line-height:1.2;font-size:calc(1.575rem + 3.9vw)}@media (min-width:1200px){.display-2{font-size:4.5rem}}.display-3{font-weight:300;line-height:1.2;font-size:calc(1.525rem + 3.3vw)}@media (min-width:1200px){.display-3{font-size:4rem}}.display-4{font-weight:300;line-height:1.2;font-size:calc(1.475rem + 2.7vw)}@media (min-width:1200px){.display-4{font-size:3.5rem}}.display-5{font-weight:300;line-height:1.2;font-size:calc(1.425rem + 2.1vw)}@media (min-width:1200px){.display-5{font-size:3rem}}.display-6{font-weight:300;line-height:1.2;font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.display-6{font-size:2.5rem}}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:.875em;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote>:last-child{margin-bottom:0}.blockquote-footer{margin-top:-1rem;margin-bottom:1rem;font-size:.875em;color:#6c757d}.blockquote-footer::before{content:\"— \"}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:var(--bs-body-bg);border:var(--bs-border-width) solid var(--bs-border-color);border-radius:var(--bs-border-radius);max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:.875em;color:var(--bs-secondary-color)}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{--bs-gutter-x:1.5rem;--bs-gutter-y:0;width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}@media (min-width:1400px){.container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{max-width:1320px}}:root{--bs-breakpoint-xs:0;--bs-breakpoint-sm:576px;--bs-breakpoint-md:768px;--bs-breakpoint-lg:992px;--bs-breakpoint-xl:1200px;--bs-breakpoint-xxl:1400px}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(-1 * var(--bs-gutter-y));margin-right:calc(-.5 * var(--bs-gutter-x));margin-left:calc(-.5 * var(--bs-gutter-x))}.row>*{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.66666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.33333333%}.col-2{flex:0 0 auto;width:16.66666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.33333333%}.col-5{flex:0 0 auto;width:41.66666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.33333333%}.col-8{flex:0 0 auto;width:66.66666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.33333333%}.col-11{flex:0 0 auto;width:91.66666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width:576px){.col-sm{flex:1 0 0}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.66666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.33333333%}.col-sm-2{flex:0 0 auto;width:16.66666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.33333333%}.col-sm-5{flex:0 0 auto;width:41.66666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.33333333%}.col-sm-8{flex:0 0 auto;width:66.66666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.33333333%}.col-sm-11{flex:0 0 auto;width:91.66666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333333%}.offset-sm-8{margin-left:66.66666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333333%}.offset-sm-11{margin-left:91.66666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width:768px){.col-md{flex:1 0 0}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.66666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.33333333%}.col-md-2{flex:0 0 auto;width:16.66666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.33333333%}.col-md-5{flex:0 0 auto;width:41.66666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.33333333%}.col-md-8{flex:0 0 auto;width:66.66666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.33333333%}.col-md-11{flex:0 0 auto;width:91.66666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333333%}.offset-md-2{margin-left:16.66666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333333%}.offset-md-5{margin-left:41.66666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333333%}.offset-md-8{margin-left:66.66666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333333%}.offset-md-11{margin-left:91.66666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width:992px){.col-lg{flex:1 0 0}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.66666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.33333333%}.col-lg-2{flex:0 0 auto;width:16.66666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.33333333%}.col-lg-5{flex:0 0 auto;width:41.66666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.33333333%}.col-lg-8{flex:0 0 auto;width:66.66666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.33333333%}.col-lg-11{flex:0 0 auto;width:91.66666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333333%}.offset-lg-2{margin-left:16.66666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333333%}.offset-lg-5{margin-left:41.66666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333333%}.offset-lg-8{margin-left:66.66666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333333%}.offset-lg-11{margin-left:91.66666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width:1200px){.col-xl{flex:1 0 0}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.66666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.33333333%}.col-xl-2{flex:0 0 auto;width:16.66666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.33333333%}.col-xl-5{flex:0 0 auto;width:41.66666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.33333333%}.col-xl-8{flex:0 0 auto;width:66.66666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.33333333%}.col-xl-11{flex:0 0 auto;width:91.66666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333333%}.offset-xl-2{margin-left:16.66666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333333%}.offset-xl-5{margin-left:41.66666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333333%}.offset-xl-8{margin-left:66.66666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333333%}.offset-xl-11{margin-left:91.66666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width:1400px){.col-xxl{flex:1 0 0}.row-cols-xxl-auto>*{flex:0 0 auto;width:auto}.row-cols-xxl-1>*{flex:0 0 auto;width:100%}.row-cols-xxl-2>*{flex:0 0 auto;width:50%}.row-cols-xxl-3>*{flex:0 0 auto;width:33.33333333%}.row-cols-xxl-4>*{flex:0 0 auto;width:25%}.row-cols-xxl-5>*{flex:0 0 auto;width:20%}.row-cols-xxl-6>*{flex:0 0 auto;width:16.66666667%}.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-1{flex:0 0 auto;width:8.33333333%}.col-xxl-2{flex:0 0 auto;width:16.66666667%}.col-xxl-3{flex:0 0 auto;width:25%}.col-xxl-4{flex:0 0 auto;width:33.33333333%}.col-xxl-5{flex:0 0 auto;width:41.66666667%}.col-xxl-6{flex:0 0 auto;width:50%}.col-xxl-7{flex:0 0 auto;width:58.33333333%}.col-xxl-8{flex:0 0 auto;width:66.66666667%}.col-xxl-9{flex:0 0 auto;width:75%}.col-xxl-10{flex:0 0 auto;width:83.33333333%}.col-xxl-11{flex:0 0 auto;width:91.66666667%}.col-xxl-12{flex:0 0 auto;width:100%}.offset-xxl-0{margin-left:0}.offset-xxl-1{margin-left:8.33333333%}.offset-xxl-2{margin-left:16.66666667%}.offset-xxl-3{margin-left:25%}.offset-xxl-4{margin-left:33.33333333%}.offset-xxl-5{margin-left:41.66666667%}.offset-xxl-6{margin-left:50%}.offset-xxl-7{margin-left:58.33333333%}.offset-xxl-8{margin-left:66.66666667%}.offset-xxl-9{margin-left:75%}.offset-xxl-10{margin-left:83.33333333%}.offset-xxl-11{margin-left:91.66666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}}.table{--bs-table-color-type:initial;--bs-table-bg-type:initial;--bs-table-color-state:initial;--bs-table-bg-state:initial;--bs-table-color:var(--bs-emphasis-color);--bs-table-bg:var(--bs-body-bg);--bs-table-border-color:var(--bs-border-color);--bs-table-accent-bg:transparent;--bs-table-striped-color:var(--bs-emphasis-color);--bs-table-striped-bg:rgba(var(--bs-emphasis-color-rgb), 0.05);--bs-table-active-color:var(--bs-emphasis-color);--bs-table-active-bg:rgba(var(--bs-emphasis-color-rgb), 0.1);--bs-table-hover-color:var(--bs-emphasis-color);--bs-table-hover-bg:rgba(var(--bs-emphasis-color-rgb), 0.075);width:100%;margin-bottom:1rem;vertical-align:top;border-color:var(--bs-table-border-color)}.table>:not(caption)>*>*{padding:.5rem .5rem;color:var(--bs-table-color-state,var(--bs-table-color-type,var(--bs-table-color)));background-color:var(--bs-table-bg);border-bottom-width:var(--bs-border-width);box-shadow:inset 0 0 0 9999px var(--bs-table-bg-state,var(--bs-table-bg-type,var(--bs-table-accent-bg)))}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.table-group-divider{border-top:calc(var(--bs-border-width) * 2) solid currentcolor}.caption-top{caption-side:top}.table-sm>:not(caption)>*>*{padding:.25rem .25rem}.table-bordered>:not(caption)>*{border-width:var(--bs-border-width) 0}.table-bordered>:not(caption)>*>*{border-width:0 var(--bs-border-width)}.table-borderless>:not(caption)>*>*{border-bottom-width:0}.table-borderless>:not(:first-child){border-top-width:0}.table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-color-type:var(--bs-table-striped-color);--bs-table-bg-type:var(--bs-table-striped-bg)}.table-striped-columns>:not(caption)>tr>:nth-child(2n){--bs-table-color-type:var(--bs-table-striped-color);--bs-table-bg-type:var(--bs-table-striped-bg)}.table-active{--bs-table-color-state:var(--bs-table-active-color);--bs-table-bg-state:var(--bs-table-active-bg)}.table-hover>tbody>tr:hover>*{--bs-table-color-state:var(--bs-table-hover-color);--bs-table-bg-state:var(--bs-table-hover-bg)}.table-primary{--bs-table-color:#000;--bs-table-bg:#cfe2ff;--bs-table-border-color:#a6b5cc;--bs-table-striped-bg:#c5d7f2;--bs-table-striped-color:#000;--bs-table-active-bg:#bacbe6;--bs-table-active-color:#000;--bs-table-hover-bg:#bfd1ec;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-secondary{--bs-table-color:#000;--bs-table-bg:#e2e3e5;--bs-table-border-color:#b5b6b7;--bs-table-striped-bg:#d7d8da;--bs-table-striped-color:#000;--bs-table-active-bg:#cbccce;--bs-table-active-color:#000;--bs-table-hover-bg:#d1d2d4;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-success{--bs-table-color:#000;--bs-table-bg:#d1e7dd;--bs-table-border-color:#a7b9b1;--bs-table-striped-bg:#c7dbd2;--bs-table-striped-color:#000;--bs-table-active-bg:#bcd0c7;--bs-table-active-color:#000;--bs-table-hover-bg:#c1d6cc;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-info{--bs-table-color:#000;--bs-table-bg:#cff4fc;--bs-table-border-color:#a6c3ca;--bs-table-striped-bg:#c5e8ef;--bs-table-striped-color:#000;--bs-table-active-bg:#badce3;--bs-table-active-color:#000;--bs-table-hover-bg:#bfe2e9;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-warning{--bs-table-color:#000;--bs-table-bg:#fff3cd;--bs-table-border-color:#ccc2a4;--bs-table-striped-bg:#f2e7c3;--bs-table-striped-color:#000;--bs-table-active-bg:#e6dbb9;--bs-table-active-color:#000;--bs-table-hover-bg:#ece1be;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-danger{--bs-table-color:#000;--bs-table-bg:#f8d7da;--bs-table-border-color:#c6acae;--bs-table-striped-bg:#eccccf;--bs-table-striped-color:#000;--bs-table-active-bg:#dfc2c4;--bs-table-active-color:#000;--bs-table-hover-bg:#e5c7ca;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-light{--bs-table-color:#000;--bs-table-bg:#f8f9fa;--bs-table-border-color:#c6c7c8;--bs-table-striped-bg:#ecedee;--bs-table-striped-color:#000;--bs-table-active-bg:#dfe0e1;--bs-table-active-color:#000;--bs-table-hover-bg:#e5e6e7;--bs-table-hover-color:#000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-dark{--bs-table-color:#fff;--bs-table-bg:#212529;--bs-table-border-color:#4d5154;--bs-table-striped-bg:#2c3034;--bs-table-striped-color:#fff;--bs-table-active-bg:#373b3e;--bs-table-active-color:#fff;--bs-table-hover-bg:#323539;--bs-table-hover-color:#fff;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}@media (max-width:575.98px){.table-responsive-sm{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:767.98px){.table-responsive-md{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:991.98px){.table-responsive-lg{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1199.98px){.table-responsive-xl{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width:1399.98px){.table-responsive-xxl{overflow-x:auto;-webkit-overflow-scrolling:touch}}.form-label{margin-bottom:.5rem}.col-form-label{padding-top:calc(.375rem + var(--bs-border-width));padding-bottom:calc(.375rem + var(--bs-border-width));margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + var(--bs-border-width));padding-bottom:calc(.5rem + var(--bs-border-width));font-size:1.25rem}.col-form-label-sm{padding-top:calc(.25rem + var(--bs-border-width));padding-bottom:calc(.25rem + var(--bs-border-width));font-size:.875rem}.form-text{margin-top:.25rem;font-size:.875em;color:var(--bs-secondary-color)}.form-control{display:block;width:100%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:var(--bs-body-color);-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--bs-body-bg);background-clip:padding-box;border:var(--bs-border-width) solid var(--bs-border-color);border-radius:var(--bs-border-radius);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control[type=file]{overflow:hidden}.form-control[type=file]:not(:disabled):not([readonly]){cursor:pointer}.form-control:focus{color:var(--bs-body-color);background-color:var(--bs-body-bg);border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-control::-webkit-date-and-time-value{min-width:85px;height:1.5em;margin:0}.form-control::-webkit-datetime-edit{display:block;padding:0}.form-control::placeholder{color:var(--bs-secondary-color);opacity:1}.form-control:disabled{background-color:var(--bs-secondary-bg);opacity:1}.form-control::-webkit-file-upload-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:var(--bs-body-color);background-color:var(--bs-tertiary-bg);pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:var(--bs-border-width);border-radius:0;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control::file-selector-button{padding:.375rem .75rem;margin:-.375rem -.75rem;-webkit-margin-end:.75rem;margin-inline-end:.75rem;color:var(--bs-body-color);background-color:var(--bs-tertiary-bg);pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:var(--bs-border-width);border-radius:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::-webkit-file-upload-button{-webkit-transition:none;transition:none}.form-control::file-selector-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button{background-color:var(--bs-secondary-bg)}.form-control:hover:not(:disabled):not([readonly])::file-selector-button{background-color:var(--bs-secondary-bg)}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;line-height:1.5;color:var(--bs-body-color);background-color:transparent;border:solid transparent;border-width:var(--bs-border-width) 0}.form-control-plaintext:focus{outline:0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{min-height:calc(1.5em + .5rem + calc(var(--bs-border-width) * 2));padding:.25rem .5rem;font-size:.875rem;border-radius:var(--bs-border-radius-sm)}.form-control-sm::-webkit-file-upload-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-sm::file-selector-button{padding:.25rem .5rem;margin:-.25rem -.5rem;-webkit-margin-end:.5rem;margin-inline-end:.5rem}.form-control-lg{min-height:calc(1.5em + 1rem + calc(var(--bs-border-width) * 2));padding:.5rem 1rem;font-size:1.25rem;border-radius:var(--bs-border-radius-lg)}.form-control-lg::-webkit-file-upload-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.form-control-lg::file-selector-button{padding:.5rem 1rem;margin:-.5rem -1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}textarea.form-control{min-height:calc(1.5em + .75rem + calc(var(--bs-border-width) * 2))}textarea.form-control-sm{min-height:calc(1.5em + .5rem + calc(var(--bs-border-width) * 2))}textarea.form-control-lg{min-height:calc(1.5em + 1rem + calc(var(--bs-border-width) * 2))}.form-control-color{width:3rem;height:calc(1.5em + .75rem + calc(var(--bs-border-width) * 2));padding:.375rem}.form-control-color:not(:disabled):not([readonly]){cursor:pointer}.form-control-color::-moz-color-swatch{border:0!important;border-radius:var(--bs-border-radius)}.form-control-color::-webkit-color-swatch{border:0!important;border-radius:var(--bs-border-radius)}.form-control-color.form-control-sm{height:calc(1.5em + .5rem + calc(var(--bs-border-width) * 2))}.form-control-color.form-control-lg{height:calc(1.5em + 1rem + calc(var(--bs-border-width) * 2))}.form-select{--bs-form-select-bg-img:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e\");display:block;width:100%;padding:.375rem 2.25rem .375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:var(--bs-body-color);-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--bs-body-bg);background-image:var(--bs-form-select-bg-img),var(--bs-form-select-bg-icon,none);background-repeat:no-repeat;background-position:right .75rem center;background-size:16px 12px;border:var(--bs-border-width) solid var(--bs-border-color);border-radius:var(--bs-border-radius);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-select{transition:none}}.form-select:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-select[multiple],.form-select[size]:not([size=\"1\"]){padding-right:.75rem;background-image:none}.form-select:disabled{background-color:var(--bs-secondary-bg)}.form-select:-moz-focusring{color:transparent;text-shadow:0 0 0 var(--bs-body-color)}.form-select-sm{padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem;border-radius:var(--bs-border-radius-sm)}.form-select-lg{padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem;border-radius:var(--bs-border-radius-lg)}[data-bs-theme=dark] .form-select{--bs-form-select-bg-img:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23dee2e6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e\")}.form-check{display:block;min-height:1.5rem;padding-left:1.5em;margin-bottom:.125rem}.form-check .form-check-input{float:left;margin-left:-1.5em}.form-check-reverse{padding-right:1.5em;padding-left:0;text-align:right}.form-check-reverse .form-check-input{float:right;margin-right:-1.5em;margin-left:0}.form-check-input{--bs-form-check-bg:var(--bs-body-bg);flex-shrink:0;width:1em;height:1em;margin-top:.25em;vertical-align:top;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--bs-form-check-bg);background-image:var(--bs-form-check-bg-image);background-repeat:no-repeat;background-position:center;background-size:contain;border:var(--bs-border-width) solid var(--bs-border-color);-webkit-print-color-adjust:exact;color-adjust:exact;print-color-adjust:exact}.form-check-input[type=checkbox]{border-radius:.25em}.form-check-input[type=radio]{border-radius:50%}.form-check-input:active{filter:brightness(90%)}.form-check-input:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-check-input:checked{background-color:#0d6efd;border-color:#0d6efd}.form-check-input:checked[type=checkbox]{--bs-form-check-bg-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e\")}.form-check-input:checked[type=radio]{--bs-form-check-bg-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e\")}.form-check-input[type=checkbox]:indeterminate{background-color:#0d6efd;border-color:#0d6efd;--bs-form-check-bg-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e\")}.form-check-input:disabled{pointer-events:none;filter:none;opacity:.5}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:default;opacity:.5}.form-switch{padding-left:2.5em}.form-switch .form-check-input{--bs-form-switch-bg:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e\");width:2em;margin-left:-2.5em;background-image:var(--bs-form-switch-bg);background-position:left center;border-radius:2em;transition:background-position .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-switch .form-check-input{transition:none}}.form-switch .form-check-input:focus{--bs-form-switch-bg:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2386b7fe'/%3e%3c/svg%3e\")}.form-switch .form-check-input:checked{background-position:right center;--bs-form-switch-bg:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e\")}.form-switch.form-check-reverse{padding-right:2.5em;padding-left:0}.form-switch.form-check-reverse .form-check-input{margin-right:-2.5em;margin-left:0}.form-check-inline{display:inline-block;margin-right:1rem}.btn-check{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.btn-check:disabled+.btn,.btn-check[disabled]+.btn{pointer-events:none;filter:none;opacity:.65}[data-bs-theme=dark] .form-switch .form-check-input:not(:checked):not(:focus){--bs-form-switch-bg:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28255, 255, 255, 0.25%29'/%3e%3c/svg%3e\")}.form-range{width:100%;height:1.5rem;padding:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent}.form-range:focus{outline:0}.form-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .25rem rgba(13,110,253,.25)}.form-range::-moz-focus-outer{border:0}.form-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;-webkit-appearance:none;appearance:none;background-color:#0d6efd;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.form-range::-webkit-slider-thumb:active{background-color:#b6d4fe}.form-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:var(--bs-secondary-bg);border-color:transparent;border-radius:1rem}.form-range::-moz-range-thumb{width:1rem;height:1rem;-moz-appearance:none;appearance:none;background-color:#0d6efd;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-range::-moz-range-thumb{-moz-transition:none;transition:none}}.form-range::-moz-range-thumb:active{background-color:#b6d4fe}.form-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:var(--bs-secondary-bg);border-color:transparent;border-radius:1rem}.form-range:disabled{pointer-events:none}.form-range:disabled::-webkit-slider-thumb{background-color:var(--bs-secondary-color)}.form-range:disabled::-moz-range-thumb{background-color:var(--bs-secondary-color)}.form-floating{position:relative}.form-floating>.form-control,.form-floating>.form-control-plaintext,.form-floating>.form-select{height:calc(3.5rem + calc(var(--bs-border-width) * 2));min-height:calc(3.5rem + calc(var(--bs-border-width) * 2));line-height:1.25}.form-floating>label{position:absolute;top:0;left:0;z-index:2;max-width:100%;height:100%;padding:1rem .75rem;overflow:hidden;color:rgba(var(--bs-body-color-rgb),.65);text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:var(--bs-border-width) solid transparent;transform-origin:0 0;transition:opacity .1s ease-in-out,transform .1s ease-in-out}@media (prefers-reduced-motion:reduce){.form-floating>label{transition:none}}.form-floating>.form-control,.form-floating>.form-control-plaintext{padding:1rem .75rem}.form-floating>.form-control-plaintext::placeholder,.form-floating>.form-control::placeholder{color:transparent}.form-floating>.form-control-plaintext:focus,.form-floating>.form-control-plaintext:not(:placeholder-shown),.form-floating>.form-control:focus,.form-floating>.form-control:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control-plaintext:-webkit-autofill,.form-floating>.form-control:-webkit-autofill{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-select{padding-top:1.625rem;padding-bottom:.625rem;padding-left:.75rem}.form-floating>.form-control-plaintext~label,.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.form-floating>.form-select~label{transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:-webkit-autofill~label{transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>textarea:focus~label::after,.form-floating>textarea:not(:placeholder-shown)~label::after{position:absolute;inset:1rem 0.375rem;z-index:-1;height:1.5em;content:\"\";background-color:var(--bs-body-bg);border-radius:var(--bs-border-radius)}.form-floating>textarea:disabled~label::after{background-color:var(--bs-secondary-bg)}.form-floating>.form-control-plaintext~label{border-width:var(--bs-border-width) 0}.form-floating>.form-control:disabled~label,.form-floating>:disabled~label{color:#6c757d}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.form-floating,.input-group>.form-select{position:relative;flex:1 1 auto;width:1%;min-width:0}.input-group>.form-control:focus,.input-group>.form-floating:focus-within,.input-group>.form-select:focus{z-index:5}.input-group .btn{position:relative;z-index:2}.input-group .btn:focus{z-index:5}.input-group-text{display:flex;align-items:center;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:var(--bs-body-color);text-align:center;white-space:nowrap;background-color:var(--bs-tertiary-bg);border:var(--bs-border-width) solid var(--bs-border-color);border-radius:var(--bs-border-radius)}.input-group-lg>.btn,.input-group-lg>.form-control,.input-group-lg>.form-select,.input-group-lg>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;border-radius:var(--bs-border-radius-lg)}.input-group-sm>.btn,.input-group-sm>.form-control,.input-group-sm>.form-select,.input-group-sm>.input-group-text{padding:.25rem .5rem;font-size:.875rem;border-radius:var(--bs-border-radius-sm)}.input-group-lg>.form-select,.input-group-sm>.form-select{padding-right:3rem}.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3),.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-control,.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-select,.input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating){border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.dropdown-toggle:nth-last-child(n+4),.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-control,.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-select,.input-group.has-validation>:nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback){margin-left:calc(-1 * var(--bs-border-width));border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.form-floating:not(:first-child)>.form-control,.input-group>.form-floating:not(:first-child)>.form-select{border-top-left-radius:0;border-bottom-left-radius:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:var(--bs-form-valid-color)}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:var(--bs-success);border-radius:var(--bs-border-radius)}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:var(--bs-form-valid-border-color);padding-right:calc(1.5em + .75rem);background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:var(--bs-form-valid-border-color);box-shadow:0 0 0 .25rem rgba(var(--bs-success-rgb),.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-valid,.was-validated .form-select:valid{border-color:var(--bs-form-valid-border-color)}.form-select.is-valid:not([multiple]):not([size]),.form-select.is-valid:not([multiple])[size=\"1\"],.was-validated .form-select:valid:not([multiple]):not([size]),.was-validated .form-select:valid:not([multiple])[size=\"1\"]{--bs-form-select-bg-icon:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1'/%3e%3c/svg%3e\");padding-right:4.125rem;background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-valid:focus,.was-validated .form-select:valid:focus{border-color:var(--bs-form-valid-border-color);box-shadow:0 0 0 .25rem rgba(var(--bs-success-rgb),.25)}.form-control-color.is-valid,.was-validated .form-control-color:valid{width:calc(3rem + calc(1.5em + .75rem))}.form-check-input.is-valid,.was-validated .form-check-input:valid{border-color:var(--bs-form-valid-border-color)}.form-check-input.is-valid:checked,.was-validated .form-check-input:valid:checked{background-color:var(--bs-form-valid-color)}.form-check-input.is-valid:focus,.was-validated .form-check-input:valid:focus{box-shadow:0 0 0 .25rem rgba(var(--bs-success-rgb),.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:var(--bs-form-valid-color)}.form-check-inline .form-check-input~.valid-feedback{margin-left:.5em}.input-group>.form-control:not(:focus).is-valid,.input-group>.form-floating:not(:focus-within).is-valid,.input-group>.form-select:not(:focus).is-valid,.was-validated .input-group>.form-control:not(:focus):valid,.was-validated .input-group>.form-floating:not(:focus-within):valid,.was-validated .input-group>.form-select:not(:focus):valid{z-index:3}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:var(--bs-form-invalid-color)}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:var(--bs-danger);border-radius:var(--bs-border-radius)}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:var(--bs-form-invalid-border-color);padding-right:calc(1.5em + .75rem);background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:var(--bs-form-invalid-border-color);box-shadow:0 0 0 .25rem rgba(var(--bs-danger-rgb),.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.form-select.is-invalid,.was-validated .form-select:invalid{border-color:var(--bs-form-invalid-border-color)}.form-select.is-invalid:not([multiple]):not([size]),.form-select.is-invalid:not([multiple])[size=\"1\"],.was-validated .form-select:invalid:not([multiple]):not([size]),.was-validated .form-select:invalid:not([multiple])[size=\"1\"]{--bs-form-select-bg-icon:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e\");padding-right:4.125rem;background-position:right .75rem center,center right 2.25rem;background-size:16px 12px,calc(.75em + .375rem) calc(.75em + .375rem)}.form-select.is-invalid:focus,.was-validated .form-select:invalid:focus{border-color:var(--bs-form-invalid-border-color);box-shadow:0 0 0 .25rem rgba(var(--bs-danger-rgb),.25)}.form-control-color.is-invalid,.was-validated .form-control-color:invalid{width:calc(3rem + calc(1.5em + .75rem))}.form-check-input.is-invalid,.was-validated .form-check-input:invalid{border-color:var(--bs-form-invalid-border-color)}.form-check-input.is-invalid:checked,.was-validated .form-check-input:invalid:checked{background-color:var(--bs-form-invalid-color)}.form-check-input.is-invalid:focus,.was-validated .form-check-input:invalid:focus{box-shadow:0 0 0 .25rem rgba(var(--bs-danger-rgb),.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:var(--bs-form-invalid-color)}.form-check-inline .form-check-input~.invalid-feedback{margin-left:.5em}.input-group>.form-control:not(:focus).is-invalid,.input-group>.form-floating:not(:focus-within).is-invalid,.input-group>.form-select:not(:focus).is-invalid,.was-validated .input-group>.form-control:not(:focus):invalid,.was-validated .input-group>.form-floating:not(:focus-within):invalid,.was-validated .input-group>.form-select:not(:focus):invalid{z-index:4}.btn{--bs-btn-padding-x:0.75rem;--bs-btn-padding-y:0.375rem;--bs-btn-font-family: ;--bs-btn-font-size:1rem;--bs-btn-font-weight:400;--bs-btn-line-height:1.5;--bs-btn-color:var(--bs-body-color);--bs-btn-bg:transparent;--bs-btn-border-width:var(--bs-border-width);--bs-btn-border-color:transparent;--bs-btn-border-radius:var(--bs-border-radius);--bs-btn-hover-border-color:transparent;--bs-btn-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.15),0 1px 1px rgba(0, 0, 0, 0.075);--bs-btn-disabled-opacity:0.65;--bs-btn-focus-box-shadow:0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb), .5);display:inline-block;padding:var(--bs-btn-padding-y) var(--bs-btn-padding-x);font-family:var(--bs-btn-font-family);font-size:var(--bs-btn-font-size);font-weight:var(--bs-btn-font-weight);line-height:var(--bs-btn-line-height);color:var(--bs-btn-color);text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;border:var(--bs-btn-border-width) solid var(--bs-btn-border-color);border-radius:var(--bs-btn-border-radius);background-color:var(--bs-btn-bg);transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color)}.btn-check+.btn:hover{color:var(--bs-btn-color);background-color:var(--bs-btn-bg);border-color:var(--bs-btn-border-color)}.btn:focus-visible{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:focus-visible+.btn{border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:checked+.btn,.btn.active,.btn.show,.btn:first-child:active,:not(.btn-check)+.btn:active{color:var(--bs-btn-active-color);background-color:var(--bs-btn-active-bg);border-color:var(--bs-btn-active-border-color)}.btn-check:checked+.btn:focus-visible,.btn.active:focus-visible,.btn.show:focus-visible,.btn:first-child:active:focus-visible,:not(.btn-check)+.btn:active:focus-visible{box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:checked:focus-visible+.btn{box-shadow:var(--bs-btn-focus-box-shadow)}.btn.disabled,.btn:disabled,fieldset:disabled .btn{color:var(--bs-btn-disabled-color);pointer-events:none;background-color:var(--bs-btn-disabled-bg);border-color:var(--bs-btn-disabled-border-color);opacity:var(--bs-btn-disabled-opacity)}.btn-primary{--bs-btn-color:#fff;--bs-btn-bg:#0d6efd;--bs-btn-border-color:#0d6efd;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#0b5ed7;--bs-btn-hover-border-color:#0a58ca;--bs-btn-focus-shadow-rgb:49,132,253;--bs-btn-active-color:#fff;--bs-btn-active-bg:#0a58ca;--bs-btn-active-border-color:#0a53be;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#0d6efd;--bs-btn-disabled-border-color:#0d6efd}.btn-secondary{--bs-btn-color:#fff;--bs-btn-bg:#6c757d;--bs-btn-border-color:#6c757d;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#5c636a;--bs-btn-hover-border-color:#565e64;--bs-btn-focus-shadow-rgb:130,138,145;--bs-btn-active-color:#fff;--bs-btn-active-bg:#565e64;--bs-btn-active-border-color:#51585e;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#6c757d;--bs-btn-disabled-border-color:#6c757d}.btn-success{--bs-btn-color:#fff;--bs-btn-bg:#198754;--bs-btn-border-color:#198754;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#157347;--bs-btn-hover-border-color:#146c43;--bs-btn-focus-shadow-rgb:60,153,110;--bs-btn-active-color:#fff;--bs-btn-active-bg:#146c43;--bs-btn-active-border-color:#13653f;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#198754;--bs-btn-disabled-border-color:#198754}.btn-info{--bs-btn-color:#000;--bs-btn-bg:#0dcaf0;--bs-btn-border-color:#0dcaf0;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#31d2f2;--bs-btn-hover-border-color:#25cff2;--bs-btn-focus-shadow-rgb:11,172,204;--bs-btn-active-color:#000;--bs-btn-active-bg:#3dd5f3;--bs-btn-active-border-color:#25cff2;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#0dcaf0;--bs-btn-disabled-border-color:#0dcaf0}.btn-warning{--bs-btn-color:#000;--bs-btn-bg:#ffc107;--bs-btn-border-color:#ffc107;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#ffca2c;--bs-btn-hover-border-color:#ffc720;--bs-btn-focus-shadow-rgb:217,164,6;--bs-btn-active-color:#000;--bs-btn-active-bg:#ffcd39;--bs-btn-active-border-color:#ffc720;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#ffc107;--bs-btn-disabled-border-color:#ffc107}.btn-danger{--bs-btn-color:#fff;--bs-btn-bg:#dc3545;--bs-btn-border-color:#dc3545;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#bb2d3b;--bs-btn-hover-border-color:#b02a37;--bs-btn-focus-shadow-rgb:225,83,97;--bs-btn-active-color:#fff;--bs-btn-active-bg:#b02a37;--bs-btn-active-border-color:#a52834;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#dc3545;--bs-btn-disabled-border-color:#dc3545}.btn-light{--bs-btn-color:#000;--bs-btn-bg:#f8f9fa;--bs-btn-border-color:#f8f9fa;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#d3d4d5;--bs-btn-hover-border-color:#c6c7c8;--bs-btn-focus-shadow-rgb:211,212,213;--bs-btn-active-color:#000;--bs-btn-active-bg:#c6c7c8;--bs-btn-active-border-color:#babbbc;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#f8f9fa;--bs-btn-disabled-border-color:#f8f9fa}.btn-dark{--bs-btn-color:#fff;--bs-btn-bg:#212529;--bs-btn-border-color:#212529;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#424649;--bs-btn-hover-border-color:#373b3e;--bs-btn-focus-shadow-rgb:66,70,73;--bs-btn-active-color:#fff;--bs-btn-active-bg:#4d5154;--bs-btn-active-border-color:#373b3e;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#212529;--bs-btn-disabled-border-color:#212529}.btn-outline-primary{--bs-btn-color:#0d6efd;--bs-btn-border-color:#0d6efd;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#0d6efd;--bs-btn-hover-border-color:#0d6efd;--bs-btn-focus-shadow-rgb:13,110,253;--bs-btn-active-color:#fff;--bs-btn-active-bg:#0d6efd;--bs-btn-active-border-color:#0d6efd;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#0d6efd;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#0d6efd;--bs-gradient:none}.btn-outline-secondary{--bs-btn-color:#6c757d;--bs-btn-border-color:#6c757d;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#6c757d;--bs-btn-hover-border-color:#6c757d;--bs-btn-focus-shadow-rgb:108,117,125;--bs-btn-active-color:#fff;--bs-btn-active-bg:#6c757d;--bs-btn-active-border-color:#6c757d;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#6c757d;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#6c757d;--bs-gradient:none}.btn-outline-success{--bs-btn-color:#198754;--bs-btn-border-color:#198754;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#198754;--bs-btn-hover-border-color:#198754;--bs-btn-focus-shadow-rgb:25,135,84;--bs-btn-active-color:#fff;--bs-btn-active-bg:#198754;--bs-btn-active-border-color:#198754;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#198754;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#198754;--bs-gradient:none}.btn-outline-info{--bs-btn-color:#0dcaf0;--bs-btn-border-color:#0dcaf0;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#0dcaf0;--bs-btn-hover-border-color:#0dcaf0;--bs-btn-focus-shadow-rgb:13,202,240;--bs-btn-active-color:#000;--bs-btn-active-bg:#0dcaf0;--bs-btn-active-border-color:#0dcaf0;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#0dcaf0;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#0dcaf0;--bs-gradient:none}.btn-outline-warning{--bs-btn-color:#ffc107;--bs-btn-border-color:#ffc107;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#ffc107;--bs-btn-hover-border-color:#ffc107;--bs-btn-focus-shadow-rgb:255,193,7;--bs-btn-active-color:#000;--bs-btn-active-bg:#ffc107;--bs-btn-active-border-color:#ffc107;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#ffc107;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#ffc107;--bs-gradient:none}.btn-outline-danger{--bs-btn-color:#dc3545;--bs-btn-border-color:#dc3545;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#dc3545;--bs-btn-hover-border-color:#dc3545;--bs-btn-focus-shadow-rgb:220,53,69;--bs-btn-active-color:#fff;--bs-btn-active-bg:#dc3545;--bs-btn-active-border-color:#dc3545;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#dc3545;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#dc3545;--bs-gradient:none}.btn-outline-light{--bs-btn-color:#f8f9fa;--bs-btn-border-color:#f8f9fa;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#f8f9fa;--bs-btn-hover-border-color:#f8f9fa;--bs-btn-focus-shadow-rgb:248,249,250;--bs-btn-active-color:#000;--bs-btn-active-bg:#f8f9fa;--bs-btn-active-border-color:#f8f9fa;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#f8f9fa;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#f8f9fa;--bs-gradient:none}.btn-outline-dark{--bs-btn-color:#212529;--bs-btn-border-color:#212529;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#212529;--bs-btn-hover-border-color:#212529;--bs-btn-focus-shadow-rgb:33,37,41;--bs-btn-active-color:#fff;--bs-btn-active-bg:#212529;--bs-btn-active-border-color:#212529;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#212529;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#212529;--bs-gradient:none}.btn-link{--bs-btn-font-weight:400;--bs-btn-color:var(--bs-link-color);--bs-btn-bg:transparent;--bs-btn-border-color:transparent;--bs-btn-hover-color:var(--bs-link-hover-color);--bs-btn-hover-border-color:transparent;--bs-btn-active-color:var(--bs-link-hover-color);--bs-btn-active-border-color:transparent;--bs-btn-disabled-color:#6c757d;--bs-btn-disabled-border-color:transparent;--bs-btn-box-shadow:0 0 0 #000;--bs-btn-focus-shadow-rgb:49,132,253;text-decoration:underline}.btn-link:focus-visible{color:var(--bs-btn-color)}.btn-link:hover{color:var(--bs-btn-hover-color)}.btn-group-lg>.btn,.btn-lg{--bs-btn-padding-y:0.5rem;--bs-btn-padding-x:1rem;--bs-btn-font-size:1.25rem;--bs-btn-border-radius:var(--bs-border-radius-lg)}.btn-group-sm>.btn,.btn-sm{--bs-btn-padding-y:0.25rem;--bs-btn-padding-x:0.5rem;--bs-btn-font-size:0.875rem;--bs-btn-border-radius:var(--bs-border-radius-sm)}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.collapsing.collapse-horizontal{width:0;height:auto;transition:width .35s ease}@media (prefers-reduced-motion:reduce){.collapsing.collapse-horizontal{transition:none}}.dropdown,.dropdown-center,.dropend,.dropstart,.dropup,.dropup-center{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:\"\";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{--bs-dropdown-zindex:1000;--bs-dropdown-min-width:10rem;--bs-dropdown-padding-x:0;--bs-dropdown-padding-y:0.5rem;--bs-dropdown-spacer:0.125rem;--bs-dropdown-font-size:1rem;--bs-dropdown-color:var(--bs-body-color);--bs-dropdown-bg:var(--bs-body-bg);--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-border-radius:var(--bs-border-radius);--bs-dropdown-border-width:var(--bs-border-width);--bs-dropdown-inner-border-radius:calc(var(--bs-border-radius) - var(--bs-border-width));--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-divider-margin-y:0.5rem;--bs-dropdown-box-shadow:var(--bs-box-shadow);--bs-dropdown-link-color:var(--bs-body-color);--bs-dropdown-link-hover-color:var(--bs-body-color);--bs-dropdown-link-hover-bg:var(--bs-tertiary-bg);--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:var(--bs-tertiary-color);--bs-dropdown-item-padding-x:1rem;--bs-dropdown-item-padding-y:0.25rem;--bs-dropdown-header-color:#6c757d;--bs-dropdown-header-padding-x:1rem;--bs-dropdown-header-padding-y:0.5rem;position:absolute;z-index:var(--bs-dropdown-zindex);display:none;min-width:var(--bs-dropdown-min-width);padding:var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x);margin:0;font-size:var(--bs-dropdown-font-size);color:var(--bs-dropdown-color);text-align:left;list-style:none;background-color:var(--bs-dropdown-bg);background-clip:padding-box;border:var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color);border-radius:var(--bs-dropdown-border-radius)}.dropdown-menu[data-bs-popper]{top:100%;left:0;margin-top:var(--bs-dropdown-spacer)}.dropdown-menu-start{--bs-position:start}.dropdown-menu-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-end{--bs-position:end}.dropdown-menu-end[data-bs-popper]{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-start{--bs-position:start}.dropdown-menu-sm-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-sm-end{--bs-position:end}.dropdown-menu-sm-end[data-bs-popper]{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-start{--bs-position:start}.dropdown-menu-md-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-md-end{--bs-position:end}.dropdown-menu-md-end[data-bs-popper]{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-start{--bs-position:start}.dropdown-menu-lg-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-lg-end{--bs-position:end}.dropdown-menu-lg-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-start{--bs-position:start}.dropdown-menu-xl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xl-end{--bs-position:end}.dropdown-menu-xl-end[data-bs-popper]{right:0;left:auto}}@media (min-width:1400px){.dropdown-menu-xxl-start{--bs-position:start}.dropdown-menu-xxl-start[data-bs-popper]{right:auto;left:0}.dropdown-menu-xxl-end{--bs-position:end}.dropdown-menu-xxl-end[data-bs-popper]{right:0;left:auto}}.dropup .dropdown-menu[data-bs-popper]{top:auto;bottom:100%;margin-top:0;margin-bottom:var(--bs-dropdown-spacer)}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:\"\";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-menu[data-bs-popper]{top:0;right:auto;left:100%;margin-top:0;margin-left:var(--bs-dropdown-spacer)}.dropend .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:\"\";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropend .dropdown-toggle:empty::after{margin-left:0}.dropend .dropdown-toggle::after{vertical-align:0}.dropstart .dropdown-menu[data-bs-popper]{top:0;right:100%;left:auto;margin-top:0;margin-right:var(--bs-dropdown-spacer)}.dropstart .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:\"\"}.dropstart .dropdown-toggle::after{display:none}.dropstart .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:\"\";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropstart .dropdown-toggle:empty::after{margin-left:0}.dropstart .dropdown-toggle::before{vertical-align:0}.dropdown-divider{height:0;margin:var(--bs-dropdown-divider-margin-y) 0;overflow:hidden;border-top:1px solid var(--bs-dropdown-divider-bg);opacity:1}.dropdown-item{display:block;width:100%;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);clear:both;font-weight:400;color:var(--bs-dropdown-link-color);text-align:inherit;text-decoration:none;white-space:nowrap;background-color:transparent;border:0;border-radius:var(--bs-dropdown-item-border-radius,0)}.dropdown-item:focus,.dropdown-item:hover{color:var(--bs-dropdown-link-hover-color);background-color:var(--bs-dropdown-link-hover-bg)}.dropdown-item.active,.dropdown-item:active{color:var(--bs-dropdown-link-active-color);text-decoration:none;background-color:var(--bs-dropdown-link-active-bg)}.dropdown-item.disabled,.dropdown-item:disabled{color:var(--bs-dropdown-link-disabled-color);pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:var(--bs-dropdown-header-padding-y) var(--bs-dropdown-header-padding-x);margin-bottom:0;font-size:.875rem;color:var(--bs-dropdown-header-color);white-space:nowrap}.dropdown-item-text{display:block;padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);color:var(--bs-dropdown-link-color)}.dropdown-menu-dark{--bs-dropdown-color:#dee2e6;--bs-dropdown-bg:#343a40;--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-box-shadow: ;--bs-dropdown-link-color:#dee2e6;--bs-dropdown-link-hover-color:#fff;--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-link-hover-bg:rgba(255, 255, 255, 0.15);--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:#adb5bd;--bs-dropdown-header-color:#adb5bd}.btn-group,.btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;flex:1 1 auto}.btn-group-vertical>.btn-check:checked+.btn,.btn-group-vertical>.btn-check:focus+.btn,.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn-check:checked+.btn,.btn-group>.btn-check:focus+.btn,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:1}.btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group{border-radius:var(--bs-border-radius)}.btn-group>.btn-group:not(:first-child),.btn-group>:not(.btn-check:first-child)+.btn{margin-left:calc(-1 * var(--bs-border-width))}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn.dropdown-toggle-split:first-child,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:nth-child(n+3),.btn-group>:not(.btn-check)+.btn{border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropend .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropstart .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:calc(-1 * var(--bs-border-width))}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn:nth-child(n+3),.btn-group-vertical>:not(.btn-check)+.btn{border-top-left-radius:0;border-top-right-radius:0}.nav{--bs-nav-link-padding-x:1rem;--bs-nav-link-padding-y:0.5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color:var(--bs-link-color);--bs-nav-link-hover-color:var(--bs-link-hover-color);--bs-nav-link-disabled-color:var(--bs-secondary-color);display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x);font-size:var(--bs-nav-link-font-size);font-weight:var(--bs-nav-link-font-weight);color:var(--bs-nav-link-color);text-decoration:none;background:0 0;border:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out}@media (prefers-reduced-motion:reduce){.nav-link{transition:none}}.nav-link:focus,.nav-link:hover{color:var(--bs-nav-link-hover-color)}.nav-link:focus-visible{outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.nav-link.disabled,.nav-link:disabled{color:var(--bs-nav-link-disabled-color);pointer-events:none;cursor:default}.nav-tabs{--bs-nav-tabs-border-width:var(--bs-border-width);--bs-nav-tabs-border-color:var(--bs-border-color);--bs-nav-tabs-border-radius:var(--bs-border-radius);--bs-nav-tabs-link-hover-border-color:var(--bs-secondary-bg) var(--bs-secondary-bg) var(--bs-border-color);--bs-nav-tabs-link-active-color:var(--bs-emphasis-color);--bs-nav-tabs-link-active-bg:var(--bs-body-bg);--bs-nav-tabs-link-active-border-color:var(--bs-border-color) var(--bs-border-color) var(--bs-body-bg);border-bottom:var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color)}.nav-tabs .nav-link{margin-bottom:calc(-1 * var(--bs-nav-tabs-border-width));border:var(--bs-nav-tabs-border-width) solid transparent;border-top-left-radius:var(--bs-nav-tabs-border-radius);border-top-right-radius:var(--bs-nav-tabs-border-radius)}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{isolation:isolate;border-color:var(--bs-nav-tabs-link-hover-border-color)}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}.nav-tabs .dropdown-menu{margin-top:calc(-1 * var(--bs-nav-tabs-border-width));border-top-left-radius:0;border-top-right-radius:0}.nav-pills{--bs-nav-pills-border-radius:var(--bs-border-radius);--bs-nav-pills-link-active-color:#fff;--bs-nav-pills-link-active-bg:#0d6efd}.nav-pills .nav-link{border-radius:var(--bs-nav-pills-border-radius)}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:var(--bs-nav-pills-link-active-color);background-color:var(--bs-nav-pills-link-active-bg)}.nav-underline{--bs-nav-underline-gap:1rem;--bs-nav-underline-border-width:0.125rem;--bs-nav-underline-link-active-color:var(--bs-emphasis-color);gap:var(--bs-nav-underline-gap)}.nav-underline .nav-link{padding-right:0;padding-left:0;border-bottom:var(--bs-nav-underline-border-width) solid transparent}.nav-underline .nav-link:focus,.nav-underline .nav-link:hover{border-bottom-color:currentcolor}.nav-underline .nav-link.active,.nav-underline .show>.nav-link{font-weight:700;color:var(--bs-nav-underline-link-active-color);border-bottom-color:currentcolor}.nav-fill .nav-item,.nav-fill>.nav-link{flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{flex-grow:1;flex-basis:0;text-align:center}.nav-fill .nav-item .nav-link,.nav-justified .nav-item .nav-link{width:100%}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{--bs-navbar-padding-x:0;--bs-navbar-padding-y:0.5rem;--bs-navbar-color:rgba(var(--bs-emphasis-color-rgb), 0.65);--bs-navbar-hover-color:rgba(var(--bs-emphasis-color-rgb), 0.8);--bs-navbar-disabled-color:rgba(var(--bs-emphasis-color-rgb), 0.3);--bs-navbar-active-color:rgba(var(--bs-emphasis-color-rgb), 1);--bs-navbar-brand-padding-y:0.3125rem;--bs-navbar-brand-margin-end:1rem;--bs-navbar-brand-font-size:1.25rem;--bs-navbar-brand-color:rgba(var(--bs-emphasis-color-rgb), 1);--bs-navbar-brand-hover-color:rgba(var(--bs-emphasis-color-rgb), 1);--bs-navbar-nav-link-padding-x:0.5rem;--bs-navbar-toggler-padding-y:0.25rem;--bs-navbar-toggler-padding-x:0.75rem;--bs-navbar-toggler-font-size:1.25rem;--bs-navbar-toggler-icon-bg:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e\");--bs-navbar-toggler-border-color:rgba(var(--bs-emphasis-color-rgb), 0.15);--bs-navbar-toggler-border-radius:var(--bs-border-radius);--bs-navbar-toggler-focus-width:0.25rem;--bs-navbar-toggler-transition:box-shadow 0.15s ease-in-out;position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:var(--bs-navbar-padding-y) var(--bs-navbar-padding-x)}.navbar>.container,.navbar>.container-fluid,.navbar>.container-lg,.navbar>.container-md,.navbar>.container-sm,.navbar>.container-xl,.navbar>.container-xxl{display:flex;flex-wrap:inherit;align-items:center;justify-content:space-between}.navbar-brand{padding-top:var(--bs-navbar-brand-padding-y);padding-bottom:var(--bs-navbar-brand-padding-y);margin-right:var(--bs-navbar-brand-margin-end);font-size:var(--bs-navbar-brand-font-size);color:var(--bs-navbar-brand-color);text-decoration:none;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{color:var(--bs-navbar-brand-hover-color)}.navbar-nav{--bs-nav-link-padding-x:0;--bs-nav-link-padding-y:0.5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color:var(--bs-navbar-color);--bs-nav-link-hover-color:var(--bs-navbar-hover-color);--bs-nav-link-disabled-color:var(--bs-navbar-disabled-color);display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link.active,.navbar-nav .nav-link.show{color:var(--bs-navbar-active-color)}.navbar-nav .dropdown-menu{position:static}.navbar-text{padding-top:.5rem;padding-bottom:.5rem;color:var(--bs-navbar-color)}.navbar-text a,.navbar-text a:focus,.navbar-text a:hover{color:var(--bs-navbar-active-color)}.navbar-collapse{flex-grow:1;flex-basis:100%;align-items:center}.navbar-toggler{padding:var(--bs-navbar-toggler-padding-y) var(--bs-navbar-toggler-padding-x);font-size:var(--bs-navbar-toggler-font-size);line-height:1;color:var(--bs-navbar-color);background-color:transparent;border:var(--bs-border-width) solid var(--bs-navbar-toggler-border-color);border-radius:var(--bs-navbar-toggler-border-radius);transition:var(--bs-navbar-toggler-transition)}@media (prefers-reduced-motion:reduce){.navbar-toggler{transition:none}}.navbar-toggler:hover{text-decoration:none}.navbar-toggler:focus{text-decoration:none;outline:0;box-shadow:0 0 0 var(--bs-navbar-toggler-focus-width)}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;background-image:var(--bs-navbar-toggler-icon-bg);background-repeat:no-repeat;background-position:center;background-size:100%}.navbar-nav-scroll{max-height:var(--bs-scroll-height,75vh);overflow-y:auto}@media (min-width:576px){.navbar-expand-sm{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}.navbar-expand-sm .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-sm .offcanvas .offcanvas-header{display:none}.navbar-expand-sm .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:768px){.navbar-expand-md{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}.navbar-expand-md .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-md .offcanvas .offcanvas-header{display:none}.navbar-expand-md .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:992px){.navbar-expand-lg{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}.navbar-expand-lg .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-lg .offcanvas .offcanvas-header{display:none}.navbar-expand-lg .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1200px){.navbar-expand-xl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}.navbar-expand-xl .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-xl .offcanvas .offcanvas-header{display:none}.navbar-expand-xl .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}@media (min-width:1400px){.navbar-expand-xxl{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand-xxl .navbar-nav{flex-direction:row}.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xxl .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand-xxl .navbar-nav-scroll{overflow:visible}.navbar-expand-xxl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xxl .navbar-toggler{display:none}.navbar-expand-xxl .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand-xxl .offcanvas .offcanvas-header{display:none}.navbar-expand-xxl .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}}.navbar-expand{flex-wrap:nowrap;justify-content:flex-start}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:var(--bs-navbar-nav-link-padding-x);padding-left:var(--bs-navbar-nav-link-padding-x)}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-expand .offcanvas{position:static;z-index:auto;flex-grow:1;width:auto!important;height:auto!important;visibility:visible!important;background-color:transparent!important;border:0!important;transform:none!important;transition:none}.navbar-expand .offcanvas .offcanvas-header{display:none}.navbar-expand .offcanvas .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible}.navbar-dark,.navbar[data-bs-theme=dark]{--bs-navbar-color:rgba(255, 255, 255, 0.55);--bs-navbar-hover-color:rgba(255, 255, 255, 0.75);--bs-navbar-disabled-color:rgba(255, 255, 255, 0.25);--bs-navbar-active-color:#fff;--bs-navbar-brand-color:#fff;--bs-navbar-brand-hover-color:#fff;--bs-navbar-toggler-border-color:rgba(255, 255, 255, 0.1);--bs-navbar-toggler-icon-bg:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e\")}[data-bs-theme=dark] .navbar-toggler-icon{--bs-navbar-toggler-icon-bg:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e\")}.card{--bs-card-spacer-y:1rem;--bs-card-spacer-x:1rem;--bs-card-title-spacer-y:0.5rem;--bs-card-title-color: ;--bs-card-subtitle-color: ;--bs-card-border-width:var(--bs-border-width);--bs-card-border-color:var(--bs-border-color-translucent);--bs-card-border-radius:var(--bs-border-radius);--bs-card-box-shadow: ;--bs-card-inner-border-radius:calc(var(--bs-border-radius) - (var(--bs-border-width)));--bs-card-cap-padding-y:0.5rem;--bs-card-cap-padding-x:1rem;--bs-card-cap-bg:rgba(var(--bs-body-color-rgb), 0.03);--bs-card-cap-color: ;--bs-card-height: ;--bs-card-color: ;--bs-card-bg:var(--bs-body-bg);--bs-card-img-overlay-padding:1rem;--bs-card-group-margin:0.75rem;position:relative;display:flex;flex-direction:column;min-width:0;height:var(--bs-card-height);color:var(--bs-body-color);word-wrap:break-word;background-color:var(--bs-card-bg);background-clip:border-box;border:var(--bs-card-border-width) solid var(--bs-card-border-color);border-radius:var(--bs-card-border-radius)}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:var(--bs-card-inner-border-radius);border-top-right-radius:var(--bs-card-inner-border-radius)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:var(--bs-card-inner-border-radius);border-bottom-left-radius:var(--bs-card-inner-border-radius)}.card>.card-header+.list-group,.card>.list-group+.card-footer{border-top:0}.card-body{flex:1 1 auto;padding:var(--bs-card-spacer-y) var(--bs-card-spacer-x);color:var(--bs-card-color)}.card-title{margin-bottom:var(--bs-card-title-spacer-y);color:var(--bs-card-title-color)}.card-subtitle{margin-top:calc(-.5 * var(--bs-card-title-spacer-y));margin-bottom:0;color:var(--bs-card-subtitle-color)}.card-text:last-child{margin-bottom:0}.card-link+.card-link{margin-left:var(--bs-card-spacer-x)}.card-header{padding:var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x);margin-bottom:0;color:var(--bs-card-cap-color);background-color:var(--bs-card-cap-bg);border-bottom:var(--bs-card-border-width) solid var(--bs-card-border-color)}.card-header:first-child{border-radius:var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0}.card-footer{padding:var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x);color:var(--bs-card-cap-color);background-color:var(--bs-card-cap-bg);border-top:var(--bs-card-border-width) solid var(--bs-card-border-color)}.card-footer:last-child{border-radius:0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius)}.card-header-tabs{margin-right:calc(-.5 * var(--bs-card-cap-padding-x));margin-bottom:calc(-1 * var(--bs-card-cap-padding-y));margin-left:calc(-.5 * var(--bs-card-cap-padding-x));border-bottom:0}.card-header-tabs .nav-link.active{background-color:var(--bs-card-bg);border-bottom-color:var(--bs-card-bg)}.card-header-pills{margin-right:calc(-.5 * var(--bs-card-cap-padding-x));margin-left:calc(-.5 * var(--bs-card-cap-padding-x))}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:var(--bs-card-img-overlay-padding);border-radius:var(--bs-card-inner-border-radius)}.card-img,.card-img-bottom,.card-img-top{width:100%}.card-img,.card-img-top{border-top-left-radius:var(--bs-card-inner-border-radius);border-top-right-radius:var(--bs-card-inner-border-radius)}.card-img,.card-img-bottom{border-bottom-right-radius:var(--bs-card-inner-border-radius);border-bottom-left-radius:var(--bs-card-inner-border-radius)}.card-group>.card{margin-bottom:var(--bs-card-group-margin)}@media (min-width:576px){.card-group{display:flex;flex-flow:row wrap}.card-group>.card{flex:1 0 0;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child)>.card-header,.card-group>.card:not(:last-child)>.card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child)>.card-footer,.card-group>.card:not(:last-child)>.card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child)>.card-header,.card-group>.card:not(:first-child)>.card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child)>.card-footer,.card-group>.card:not(:first-child)>.card-img-bottom{border-bottom-left-radius:0}}.accordion{--bs-accordion-color:var(--bs-body-color);--bs-accordion-bg:var(--bs-body-bg);--bs-accordion-transition:color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out,border-radius 0.15s ease;--bs-accordion-border-color:var(--bs-border-color);--bs-accordion-border-width:var(--bs-border-width);--bs-accordion-border-radius:var(--bs-border-radius);--bs-accordion-inner-border-radius:calc(var(--bs-border-radius) - (var(--bs-border-width)));--bs-accordion-btn-padding-x:1.25rem;--bs-accordion-btn-padding-y:1rem;--bs-accordion-btn-color:var(--bs-body-color);--bs-accordion-btn-bg:var(--bs-accordion-bg);--bs-accordion-btn-icon:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23212529' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m2 5 6 6 6-6'/%3e%3c/svg%3e\");--bs-accordion-btn-icon-width:1.25rem;--bs-accordion-btn-icon-transform:rotate(-180deg);--bs-accordion-btn-icon-transition:transform 0.2s ease-in-out;--bs-accordion-btn-active-icon:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23052c65' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m2 5 6 6 6-6'/%3e%3c/svg%3e\");--bs-accordion-btn-focus-box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25);--bs-accordion-body-padding-x:1.25rem;--bs-accordion-body-padding-y:1rem;--bs-accordion-active-color:var(--bs-primary-text-emphasis);--bs-accordion-active-bg:var(--bs-primary-bg-subtle)}.accordion-button{position:relative;display:flex;align-items:center;width:100%;padding:var(--bs-accordion-btn-padding-y) var(--bs-accordion-btn-padding-x);font-size:1rem;color:var(--bs-accordion-btn-color);text-align:left;background-color:var(--bs-accordion-btn-bg);border:0;border-radius:0;overflow-anchor:none;transition:var(--bs-accordion-transition)}@media (prefers-reduced-motion:reduce){.accordion-button{transition:none}}.accordion-button:not(.collapsed){color:var(--bs-accordion-active-color);background-color:var(--bs-accordion-active-bg);box-shadow:inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color)}.accordion-button:not(.collapsed)::after{background-image:var(--bs-accordion-btn-active-icon);transform:var(--bs-accordion-btn-icon-transform)}.accordion-button::after{flex-shrink:0;width:var(--bs-accordion-btn-icon-width);height:var(--bs-accordion-btn-icon-width);margin-left:auto;content:\"\";background-image:var(--bs-accordion-btn-icon);background-repeat:no-repeat;background-size:var(--bs-accordion-btn-icon-width);transition:var(--bs-accordion-btn-icon-transition)}@media (prefers-reduced-motion:reduce){.accordion-button::after{transition:none}}.accordion-button:hover{z-index:2}.accordion-button:focus{z-index:3;outline:0;box-shadow:var(--bs-accordion-btn-focus-box-shadow)}.accordion-header{margin-bottom:0}.accordion-item{color:var(--bs-accordion-color);background-color:var(--bs-accordion-bg);border:var(--bs-accordion-border-width) solid var(--bs-accordion-border-color)}.accordion-item:first-of-type{border-top-left-radius:var(--bs-accordion-border-radius);border-top-right-radius:var(--bs-accordion-border-radius)}.accordion-item:first-of-type>.accordion-header .accordion-button{border-top-left-radius:var(--bs-accordion-inner-border-radius);border-top-right-radius:var(--bs-accordion-inner-border-radius)}.accordion-item:not(:first-of-type){border-top:0}.accordion-item:last-of-type{border-bottom-right-radius:var(--bs-accordion-border-radius);border-bottom-left-radius:var(--bs-accordion-border-radius)}.accordion-item:last-of-type>.accordion-header .accordion-button.collapsed{border-bottom-right-radius:var(--bs-accordion-inner-border-radius);border-bottom-left-radius:var(--bs-accordion-inner-border-radius)}.accordion-item:last-of-type>.accordion-collapse{border-bottom-right-radius:var(--bs-accordion-border-radius);border-bottom-left-radius:var(--bs-accordion-border-radius)}.accordion-body{padding:var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x)}.accordion-flush>.accordion-item{border-right:0;border-left:0;border-radius:0}.accordion-flush>.accordion-item:first-child{border-top:0}.accordion-flush>.accordion-item:last-child{border-bottom:0}.accordion-flush>.accordion-item>.accordion-collapse,.accordion-flush>.accordion-item>.accordion-header .accordion-button,.accordion-flush>.accordion-item>.accordion-header .accordion-button.collapsed{border-radius:0}[data-bs-theme=dark] .accordion-button::after{--bs-accordion-btn-icon:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236ea8fe'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e\");--bs-accordion-btn-active-icon:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236ea8fe'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e\")}.breadcrumb{--bs-breadcrumb-padding-x:0;--bs-breadcrumb-padding-y:0;--bs-breadcrumb-margin-bottom:1rem;--bs-breadcrumb-bg: ;--bs-breadcrumb-border-radius: ;--bs-breadcrumb-divider-color:var(--bs-secondary-color);--bs-breadcrumb-item-padding-x:0.5rem;--bs-breadcrumb-item-active-color:var(--bs-secondary-color);display:flex;flex-wrap:wrap;padding:var(--bs-breadcrumb-padding-y) var(--bs-breadcrumb-padding-x);margin-bottom:var(--bs-breadcrumb-margin-bottom);font-size:var(--bs-breadcrumb-font-size);list-style:none;background-color:var(--bs-breadcrumb-bg);border-radius:var(--bs-breadcrumb-border-radius)}.breadcrumb-item+.breadcrumb-item{padding-left:var(--bs-breadcrumb-item-padding-x)}.breadcrumb-item+.breadcrumb-item::before{float:left;padding-right:var(--bs-breadcrumb-item-padding-x);color:var(--bs-breadcrumb-divider-color);content:var(--bs-breadcrumb-divider, \"/\")}.breadcrumb-item.active{color:var(--bs-breadcrumb-item-active-color)}.pagination{--bs-pagination-padding-x:0.75rem;--bs-pagination-padding-y:0.375rem;--bs-pagination-font-size:1rem;--bs-pagination-color:var(--bs-link-color);--bs-pagination-bg:var(--bs-body-bg);--bs-pagination-border-width:var(--bs-border-width);--bs-pagination-border-color:var(--bs-border-color);--bs-pagination-border-radius:var(--bs-border-radius);--bs-pagination-hover-color:var(--bs-link-hover-color);--bs-pagination-hover-bg:var(--bs-tertiary-bg);--bs-pagination-hover-border-color:var(--bs-border-color);--bs-pagination-focus-color:var(--bs-link-hover-color);--bs-pagination-focus-bg:var(--bs-secondary-bg);--bs-pagination-focus-box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25);--bs-pagination-active-color:#fff;--bs-pagination-active-bg:#0d6efd;--bs-pagination-active-border-color:#0d6efd;--bs-pagination-disabled-color:var(--bs-secondary-color);--bs-pagination-disabled-bg:var(--bs-secondary-bg);--bs-pagination-disabled-border-color:var(--bs-border-color);display:flex;padding-left:0;list-style:none}.page-link{position:relative;display:block;padding:var(--bs-pagination-padding-y) var(--bs-pagination-padding-x);font-size:var(--bs-pagination-font-size);color:var(--bs-pagination-color);text-decoration:none;background-color:var(--bs-pagination-bg);border:var(--bs-pagination-border-width) solid var(--bs-pagination-border-color);transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.page-link{transition:none}}.page-link:hover{z-index:2;color:var(--bs-pagination-hover-color);background-color:var(--bs-pagination-hover-bg);border-color:var(--bs-pagination-hover-border-color)}.page-link:focus{z-index:3;color:var(--bs-pagination-focus-color);background-color:var(--bs-pagination-focus-bg);outline:0;box-shadow:var(--bs-pagination-focus-box-shadow)}.active>.page-link,.page-link.active{z-index:3;color:var(--bs-pagination-active-color);background-color:var(--bs-pagination-active-bg);border-color:var(--bs-pagination-active-border-color)}.disabled>.page-link,.page-link.disabled{color:var(--bs-pagination-disabled-color);pointer-events:none;background-color:var(--bs-pagination-disabled-bg);border-color:var(--bs-pagination-disabled-border-color)}.page-item:not(:first-child) .page-link{margin-left:calc(-1 * var(--bs-border-width))}.page-item:first-child .page-link{border-top-left-radius:var(--bs-pagination-border-radius);border-bottom-left-radius:var(--bs-pagination-border-radius)}.page-item:last-child .page-link{border-top-right-radius:var(--bs-pagination-border-radius);border-bottom-right-radius:var(--bs-pagination-border-radius)}.pagination-lg{--bs-pagination-padding-x:1.5rem;--bs-pagination-padding-y:0.75rem;--bs-pagination-font-size:1.25rem;--bs-pagination-border-radius:var(--bs-border-radius-lg)}.pagination-sm{--bs-pagination-padding-x:0.5rem;--bs-pagination-padding-y:0.25rem;--bs-pagination-font-size:0.875rem;--bs-pagination-border-radius:var(--bs-border-radius-sm)}.badge{--bs-badge-padding-x:0.65em;--bs-badge-padding-y:0.35em;--bs-badge-font-size:0.75em;--bs-badge-font-weight:700;--bs-badge-color:#fff;--bs-badge-border-radius:var(--bs-border-radius);display:inline-block;padding:var(--bs-badge-padding-y) var(--bs-badge-padding-x);font-size:var(--bs-badge-font-size);font-weight:var(--bs-badge-font-weight);line-height:1;color:var(--bs-badge-color);text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:var(--bs-badge-border-radius)}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.alert{--bs-alert-bg:transparent;--bs-alert-padding-x:1rem;--bs-alert-padding-y:1rem;--bs-alert-margin-bottom:1rem;--bs-alert-color:inherit;--bs-alert-border-color:transparent;--bs-alert-border:var(--bs-border-width) solid var(--bs-alert-border-color);--bs-alert-border-radius:var(--bs-border-radius);--bs-alert-link-color:inherit;position:relative;padding:var(--bs-alert-padding-y) var(--bs-alert-padding-x);margin-bottom:var(--bs-alert-margin-bottom);color:var(--bs-alert-color);background-color:var(--bs-alert-bg);border:var(--bs-alert-border);border-radius:var(--bs-alert-border-radius)}.alert-heading{color:inherit}.alert-link{font-weight:700;color:var(--bs-alert-link-color)}.alert-dismissible{padding-right:3rem}.alert-dismissible .btn-close{position:absolute;top:0;right:0;z-index:2;padding:1.25rem 1rem}.alert-primary{--bs-alert-color:var(--bs-primary-text-emphasis);--bs-alert-bg:var(--bs-primary-bg-subtle);--bs-alert-border-color:var(--bs-primary-border-subtle);--bs-alert-link-color:var(--bs-primary-text-emphasis)}.alert-secondary{--bs-alert-color:var(--bs-secondary-text-emphasis);--bs-alert-bg:var(--bs-secondary-bg-subtle);--bs-alert-border-color:var(--bs-secondary-border-subtle);--bs-alert-link-color:var(--bs-secondary-text-emphasis)}.alert-success{--bs-alert-color:var(--bs-success-text-emphasis);--bs-alert-bg:var(--bs-success-bg-subtle);--bs-alert-border-color:var(--bs-success-border-subtle);--bs-alert-link-color:var(--bs-success-text-emphasis)}.alert-info{--bs-alert-color:var(--bs-info-text-emphasis);--bs-alert-bg:var(--bs-info-bg-subtle);--bs-alert-border-color:var(--bs-info-border-subtle);--bs-alert-link-color:var(--bs-info-text-emphasis)}.alert-warning{--bs-alert-color:var(--bs-warning-text-emphasis);--bs-alert-bg:var(--bs-warning-bg-subtle);--bs-alert-border-color:var(--bs-warning-border-subtle);--bs-alert-link-color:var(--bs-warning-text-emphasis)}.alert-danger{--bs-alert-color:var(--bs-danger-text-emphasis);--bs-alert-bg:var(--bs-danger-bg-subtle);--bs-alert-border-color:var(--bs-danger-border-subtle);--bs-alert-link-color:var(--bs-danger-text-emphasis)}.alert-light{--bs-alert-color:var(--bs-light-text-emphasis);--bs-alert-bg:var(--bs-light-bg-subtle);--bs-alert-border-color:var(--bs-light-border-subtle);--bs-alert-link-color:var(--bs-light-text-emphasis)}.alert-dark{--bs-alert-color:var(--bs-dark-text-emphasis);--bs-alert-bg:var(--bs-dark-bg-subtle);--bs-alert-border-color:var(--bs-dark-border-subtle);--bs-alert-link-color:var(--bs-dark-text-emphasis)}@keyframes progress-bar-stripes{0%{background-position-x:var(--bs-progress-height)}}.progress,.progress-stacked{--bs-progress-height:1rem;--bs-progress-font-size:0.75rem;--bs-progress-bg:var(--bs-secondary-bg);--bs-progress-border-radius:var(--bs-border-radius);--bs-progress-box-shadow:var(--bs-box-shadow-inset);--bs-progress-bar-color:#fff;--bs-progress-bar-bg:#0d6efd;--bs-progress-bar-transition:width 0.6s ease;display:flex;height:var(--bs-progress-height);overflow:hidden;font-size:var(--bs-progress-font-size);background-color:var(--bs-progress-bg);border-radius:var(--bs-progress-border-radius)}.progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:var(--bs-progress-bar-color);text-align:center;white-space:nowrap;background-color:var(--bs-progress-bar-bg);transition:var(--bs-progress-bar-transition)}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:var(--bs-progress-height) var(--bs-progress-height)}.progress-stacked>.progress{overflow:visible}.progress-stacked>.progress>.progress-bar{width:100%}.progress-bar-animated{animation:1s linear infinite progress-bar-stripes}@media (prefers-reduced-motion:reduce){.progress-bar-animated{animation:none}}.list-group{--bs-list-group-color:var(--bs-body-color);--bs-list-group-bg:var(--bs-body-bg);--bs-list-group-border-color:var(--bs-border-color);--bs-list-group-border-width:var(--bs-border-width);--bs-list-group-border-radius:var(--bs-border-radius);--bs-list-group-item-padding-x:1rem;--bs-list-group-item-padding-y:0.5rem;--bs-list-group-action-color:var(--bs-secondary-color);--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-tertiary-bg);--bs-list-group-action-active-color:var(--bs-body-color);--bs-list-group-action-active-bg:var(--bs-secondary-bg);--bs-list-group-disabled-color:var(--bs-secondary-color);--bs-list-group-disabled-bg:var(--bs-body-bg);--bs-list-group-active-color:#fff;--bs-list-group-active-bg:#0d6efd;--bs-list-group-active-border-color:#0d6efd;display:flex;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:var(--bs-list-group-border-radius)}.list-group-numbered{list-style-type:none;counter-reset:section}.list-group-numbered>.list-group-item::before{content:counters(section, \".\") \". \";counter-increment:section}.list-group-item{position:relative;display:block;padding:var(--bs-list-group-item-padding-y) var(--bs-list-group-item-padding-x);color:var(--bs-list-group-color);text-decoration:none;background-color:var(--bs-list-group-bg);border:var(--bs-list-group-border-width) solid var(--bs-list-group-border-color)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:var(--bs-list-group-disabled-color);pointer-events:none;background-color:var(--bs-list-group-disabled-bg)}.list-group-item.active{z-index:2;color:var(--bs-list-group-active-color);background-color:var(--bs-list-group-active-bg);border-color:var(--bs-list-group-active-border-color)}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:calc(-1 * var(--bs-list-group-border-width));border-top-width:var(--bs-list-group-border-width)}.list-group-item-action{width:100%;color:var(--bs-list-group-action-color);text-align:inherit}.list-group-item-action:not(.active):focus,.list-group-item-action:not(.active):hover{z-index:1;color:var(--bs-list-group-action-hover-color);text-decoration:none;background-color:var(--bs-list-group-action-hover-bg)}.list-group-item-action:not(.active):active{color:var(--bs-list-group-action-active-color);background-color:var(--bs-list-group-action-active-bg)}.list-group-horizontal{flex-direction:row}.list-group-horizontal>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}@media (min-width:576px){.list-group-horizontal-sm{flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:768px){.list-group-horizontal-md{flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:992px){.list-group-horizontal-lg{flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:1200px){.list-group-horizontal-xl{flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}@media (min-width:1400px){.list-group-horizontal-xxl{flex-direction:row}.list-group-horizontal-xxl>.list-group-item:first-child:not(:last-child){border-bottom-left-radius:var(--bs-list-group-border-radius);border-top-right-radius:0}.list-group-horizontal-xxl>.list-group-item:last-child:not(:first-child){border-top-right-radius:var(--bs-list-group-border-radius);border-bottom-left-radius:0}.list-group-horizontal-xxl>.list-group-item.active{margin-top:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item{border-top-width:var(--bs-list-group-border-width);border-left-width:0}.list-group-horizontal-xxl>.list-group-item+.list-group-item.active{margin-left:calc(-1 * var(--bs-list-group-border-width));border-left-width:var(--bs-list-group-border-width)}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 var(--bs-list-group-border-width)}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{--bs-list-group-color:var(--bs-primary-text-emphasis);--bs-list-group-bg:var(--bs-primary-bg-subtle);--bs-list-group-border-color:var(--bs-primary-border-subtle);--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-primary-border-subtle);--bs-list-group-action-active-color:var(--bs-emphasis-color);--bs-list-group-action-active-bg:var(--bs-primary-border-subtle);--bs-list-group-active-color:var(--bs-primary-bg-subtle);--bs-list-group-active-bg:var(--bs-primary-text-emphasis);--bs-list-group-active-border-color:var(--bs-primary-text-emphasis)}.list-group-item-secondary{--bs-list-group-color:var(--bs-secondary-text-emphasis);--bs-list-group-bg:var(--bs-secondary-bg-subtle);--bs-list-group-border-color:var(--bs-secondary-border-subtle);--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-secondary-border-subtle);--bs-list-group-action-active-color:var(--bs-emphasis-color);--bs-list-group-action-active-bg:var(--bs-secondary-border-subtle);--bs-list-group-active-color:var(--bs-secondary-bg-subtle);--bs-list-group-active-bg:var(--bs-secondary-text-emphasis);--bs-list-group-active-border-color:var(--bs-secondary-text-emphasis)}.list-group-item-success{--bs-list-group-color:var(--bs-success-text-emphasis);--bs-list-group-bg:var(--bs-success-bg-subtle);--bs-list-group-border-color:var(--bs-success-border-subtle);--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-success-border-subtle);--bs-list-group-action-active-color:var(--bs-emphasis-color);--bs-list-group-action-active-bg:var(--bs-success-border-subtle);--bs-list-group-active-color:var(--bs-success-bg-subtle);--bs-list-group-active-bg:var(--bs-success-text-emphasis);--bs-list-group-active-border-color:var(--bs-success-text-emphasis)}.list-group-item-info{--bs-list-group-color:var(--bs-info-text-emphasis);--bs-list-group-bg:var(--bs-info-bg-subtle);--bs-list-group-border-color:var(--bs-info-border-subtle);--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-info-border-subtle);--bs-list-group-action-active-color:var(--bs-emphasis-color);--bs-list-group-action-active-bg:var(--bs-info-border-subtle);--bs-list-group-active-color:var(--bs-info-bg-subtle);--bs-list-group-active-bg:var(--bs-info-text-emphasis);--bs-list-group-active-border-color:var(--bs-info-text-emphasis)}.list-group-item-warning{--bs-list-group-color:var(--bs-warning-text-emphasis);--bs-list-group-bg:var(--bs-warning-bg-subtle);--bs-list-group-border-color:var(--bs-warning-border-subtle);--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-warning-border-subtle);--bs-list-group-action-active-color:var(--bs-emphasis-color);--bs-list-group-action-active-bg:var(--bs-warning-border-subtle);--bs-list-group-active-color:var(--bs-warning-bg-subtle);--bs-list-group-active-bg:var(--bs-warning-text-emphasis);--bs-list-group-active-border-color:var(--bs-warning-text-emphasis)}.list-group-item-danger{--bs-list-group-color:var(--bs-danger-text-emphasis);--bs-list-group-bg:var(--bs-danger-bg-subtle);--bs-list-group-border-color:var(--bs-danger-border-subtle);--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-danger-border-subtle);--bs-list-group-action-active-color:var(--bs-emphasis-color);--bs-list-group-action-active-bg:var(--bs-danger-border-subtle);--bs-list-group-active-color:var(--bs-danger-bg-subtle);--bs-list-group-active-bg:var(--bs-danger-text-emphasis);--bs-list-group-active-border-color:var(--bs-danger-text-emphasis)}.list-group-item-light{--bs-list-group-color:var(--bs-light-text-emphasis);--bs-list-group-bg:var(--bs-light-bg-subtle);--bs-list-group-border-color:var(--bs-light-border-subtle);--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-light-border-subtle);--bs-list-group-action-active-color:var(--bs-emphasis-color);--bs-list-group-action-active-bg:var(--bs-light-border-subtle);--bs-list-group-active-color:var(--bs-light-bg-subtle);--bs-list-group-active-bg:var(--bs-light-text-emphasis);--bs-list-group-active-border-color:var(--bs-light-text-emphasis)}.list-group-item-dark{--bs-list-group-color:var(--bs-dark-text-emphasis);--bs-list-group-bg:var(--bs-dark-bg-subtle);--bs-list-group-border-color:var(--bs-dark-border-subtle);--bs-list-group-action-hover-color:var(--bs-emphasis-color);--bs-list-group-action-hover-bg:var(--bs-dark-border-subtle);--bs-list-group-action-active-color:var(--bs-emphasis-color);--bs-list-group-action-active-bg:var(--bs-dark-border-subtle);--bs-list-group-active-color:var(--bs-dark-bg-subtle);--bs-list-group-active-bg:var(--bs-dark-text-emphasis);--bs-list-group-active-border-color:var(--bs-dark-text-emphasis)}.btn-close{--bs-btn-close-color:#000;--bs-btn-close-bg:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414'/%3e%3c/svg%3e\");--bs-btn-close-opacity:0.5;--bs-btn-close-hover-opacity:0.75;--bs-btn-close-focus-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25);--bs-btn-close-focus-opacity:1;--bs-btn-close-disabled-opacity:0.25;box-sizing:content-box;width:1em;height:1em;padding:.25em .25em;color:var(--bs-btn-close-color);background:transparent var(--bs-btn-close-bg) center/1em auto no-repeat;filter:var(--bs-btn-close-filter);border:0;border-radius:.375rem;opacity:var(--bs-btn-close-opacity)}.btn-close:hover{color:var(--bs-btn-close-color);text-decoration:none;opacity:var(--bs-btn-close-hover-opacity)}.btn-close:focus{outline:0;box-shadow:var(--bs-btn-close-focus-shadow);opacity:var(--bs-btn-close-focus-opacity)}.btn-close.disabled,.btn-close:disabled{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--bs-btn-close-disabled-opacity)}.btn-close-white{--bs-btn-close-filter:invert(1) grayscale(100%) brightness(200%)}:root,[data-bs-theme=light]{--bs-btn-close-filter: }[data-bs-theme=dark]{--bs-btn-close-filter:invert(1) grayscale(100%) brightness(200%)}.toast{--bs-toast-zindex:1090;--bs-toast-padding-x:0.75rem;--bs-toast-padding-y:0.5rem;--bs-toast-spacing:1.5rem;--bs-toast-max-width:350px;--bs-toast-font-size:0.875rem;--bs-toast-color: ;--bs-toast-bg:rgba(var(--bs-body-bg-rgb), 0.85);--bs-toast-border-width:var(--bs-border-width);--bs-toast-border-color:var(--bs-border-color-translucent);--bs-toast-border-radius:var(--bs-border-radius);--bs-toast-box-shadow:var(--bs-box-shadow);--bs-toast-header-color:var(--bs-secondary-color);--bs-toast-header-bg:rgba(var(--bs-body-bg-rgb), 0.85);--bs-toast-header-border-color:var(--bs-border-color-translucent);width:var(--bs-toast-max-width);max-width:100%;font-size:var(--bs-toast-font-size);color:var(--bs-toast-color);pointer-events:auto;background-color:var(--bs-toast-bg);background-clip:padding-box;border:var(--bs-toast-border-width) solid var(--bs-toast-border-color);box-shadow:var(--bs-toast-box-shadow);border-radius:var(--bs-toast-border-radius)}.toast.showing{opacity:0}.toast:not(.show){display:none}.toast-container{--bs-toast-zindex:1090;position:absolute;z-index:var(--bs-toast-zindex);width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:100%;pointer-events:none}.toast-container>:not(:last-child){margin-bottom:var(--bs-toast-spacing)}.toast-header{display:flex;align-items:center;padding:var(--bs-toast-padding-y) var(--bs-toast-padding-x);color:var(--bs-toast-header-color);background-color:var(--bs-toast-header-bg);background-clip:padding-box;border-bottom:var(--bs-toast-border-width) solid var(--bs-toast-header-border-color);border-top-left-radius:calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width));border-top-right-radius:calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width))}.toast-header .btn-close{margin-right:calc(-.5 * var(--bs-toast-padding-x));margin-left:var(--bs-toast-padding-x)}.toast-body{padding:var(--bs-toast-padding-x);word-wrap:break-word}.modal{--bs-modal-zindex:1055;--bs-modal-width:500px;--bs-modal-padding:1rem;--bs-modal-margin:0.5rem;--bs-modal-color:var(--bs-body-color);--bs-modal-bg:var(--bs-body-bg);--bs-modal-border-color:var(--bs-border-color-translucent);--bs-modal-border-width:var(--bs-border-width);--bs-modal-border-radius:var(--bs-border-radius-lg);--bs-modal-box-shadow:var(--bs-box-shadow-sm);--bs-modal-inner-border-radius:calc(var(--bs-border-radius-lg) - (var(--bs-border-width)));--bs-modal-header-padding-x:1rem;--bs-modal-header-padding-y:1rem;--bs-modal-header-padding:1rem 1rem;--bs-modal-header-border-color:var(--bs-border-color);--bs-modal-header-border-width:var(--bs-border-width);--bs-modal-title-line-height:1.5;--bs-modal-footer-gap:0.5rem;--bs-modal-footer-bg: ;--bs-modal-footer-border-color:var(--bs-border-color);--bs-modal-footer-border-width:var(--bs-border-width);position:fixed;top:0;left:0;z-index:var(--bs-modal-zindex);display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}.modal-dialog{position:relative;width:auto;margin:var(--bs-modal-margin);pointer-events:none}.modal.fade .modal-dialog{transform:translate(0,-50px);transition:transform .3s ease-out}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{transform:none}.modal.modal-static .modal-dialog{transform:scale(1.02)}.modal-dialog-scrollable{height:calc(100% - var(--bs-modal-margin) * 2)}.modal-dialog-scrollable .modal-content{max-height:100%;overflow:hidden}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - var(--bs-modal-margin) * 2)}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;color:var(--bs-modal-color);pointer-events:auto;background-color:var(--bs-modal-bg);background-clip:padding-box;border:var(--bs-modal-border-width) solid var(--bs-modal-border-color);border-radius:var(--bs-modal-border-radius);outline:0}.modal-backdrop{--bs-backdrop-zindex:1050;--bs-backdrop-bg:#000;--bs-backdrop-opacity:0.5;position:fixed;top:0;left:0;z-index:var(--bs-backdrop-zindex);width:100vw;height:100vh;background-color:var(--bs-backdrop-bg)}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:var(--bs-backdrop-opacity)}.modal-header{display:flex;flex-shrink:0;align-items:center;padding:var(--bs-modal-header-padding);border-bottom:var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color);border-top-left-radius:var(--bs-modal-inner-border-radius);border-top-right-radius:var(--bs-modal-inner-border-radius)}.modal-header .btn-close{padding:calc(var(--bs-modal-header-padding-y) * .5) calc(var(--bs-modal-header-padding-x) * .5);margin-top:calc(-.5 * var(--bs-modal-header-padding-y));margin-right:calc(-.5 * var(--bs-modal-header-padding-x));margin-bottom:calc(-.5 * var(--bs-modal-header-padding-y));margin-left:auto}.modal-title{margin-bottom:0;line-height:var(--bs-modal-title-line-height)}.modal-body{position:relative;flex:1 1 auto;padding:var(--bs-modal-padding)}.modal-footer{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * .5);background-color:var(--bs-modal-footer-bg);border-top:var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color);border-bottom-right-radius:var(--bs-modal-inner-border-radius);border-bottom-left-radius:var(--bs-modal-inner-border-radius)}.modal-footer>*{margin:calc(var(--bs-modal-footer-gap) * .5)}@media (min-width:576px){.modal{--bs-modal-margin:1.75rem;--bs-modal-box-shadow:var(--bs-box-shadow)}.modal-dialog{max-width:var(--bs-modal-width);margin-right:auto;margin-left:auto}.modal-sm{--bs-modal-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{--bs-modal-width:800px}}@media (min-width:1200px){.modal-xl{--bs-modal-width:1140px}}.modal-fullscreen{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen .modal-footer,.modal-fullscreen .modal-header{border-radius:0}.modal-fullscreen .modal-body{overflow-y:auto}@media (max-width:575.98px){.modal-fullscreen-sm-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-sm-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-sm-down .modal-footer,.modal-fullscreen-sm-down .modal-header{border-radius:0}.modal-fullscreen-sm-down .modal-body{overflow-y:auto}}@media (max-width:767.98px){.modal-fullscreen-md-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-md-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-md-down .modal-footer,.modal-fullscreen-md-down .modal-header{border-radius:0}.modal-fullscreen-md-down .modal-body{overflow-y:auto}}@media (max-width:991.98px){.modal-fullscreen-lg-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-lg-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-lg-down .modal-footer,.modal-fullscreen-lg-down .modal-header{border-radius:0}.modal-fullscreen-lg-down .modal-body{overflow-y:auto}}@media (max-width:1199.98px){.modal-fullscreen-xl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xl-down .modal-footer,.modal-fullscreen-xl-down .modal-header{border-radius:0}.modal-fullscreen-xl-down .modal-body{overflow-y:auto}}@media (max-width:1399.98px){.modal-fullscreen-xxl-down{width:100vw;max-width:none;height:100%;margin:0}.modal-fullscreen-xxl-down .modal-content{height:100%;border:0;border-radius:0}.modal-fullscreen-xxl-down .modal-footer,.modal-fullscreen-xxl-down .modal-header{border-radius:0}.modal-fullscreen-xxl-down .modal-body{overflow-y:auto}}.tooltip{--bs-tooltip-zindex:1080;--bs-tooltip-max-width:200px;--bs-tooltip-padding-x:0.5rem;--bs-tooltip-padding-y:0.25rem;--bs-tooltip-margin: ;--bs-tooltip-font-size:0.875rem;--bs-tooltip-color:var(--bs-body-bg);--bs-tooltip-bg:var(--bs-emphasis-color);--bs-tooltip-border-radius:var(--bs-border-radius);--bs-tooltip-opacity:0.9;--bs-tooltip-arrow-width:0.8rem;--bs-tooltip-arrow-height:0.4rem;z-index:var(--bs-tooltip-zindex);display:block;margin:var(--bs-tooltip-margin);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-tooltip-font-size);word-wrap:break-word;opacity:0}.tooltip.show{opacity:var(--bs-tooltip-opacity)}.tooltip .tooltip-arrow{display:block;width:var(--bs-tooltip-arrow-width);height:var(--bs-tooltip-arrow-height)}.tooltip .tooltip-arrow::before{position:absolute;content:\"\";border-color:transparent;border-style:solid}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow,.bs-tooltip-top .tooltip-arrow{bottom:calc(-1 * var(--bs-tooltip-arrow-height))}.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,.bs-tooltip-top .tooltip-arrow::before{top:-1px;border-width:var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * .5) 0;border-top-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow,.bs-tooltip-end .tooltip-arrow{left:calc(-1 * var(--bs-tooltip-arrow-height));width:var(--bs-tooltip-arrow-height);height:var(--bs-tooltip-arrow-width)}.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before,.bs-tooltip-end .tooltip-arrow::before{right:-1px;border-width:calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * .5) 0;border-right-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow,.bs-tooltip-bottom .tooltip-arrow{top:calc(-1 * var(--bs-tooltip-arrow-height))}.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before,.bs-tooltip-bottom .tooltip-arrow::before{bottom:-1px;border-width:0 calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height);border-bottom-color:var(--bs-tooltip-bg)}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow,.bs-tooltip-start .tooltip-arrow{right:calc(-1 * var(--bs-tooltip-arrow-height));width:var(--bs-tooltip-arrow-height);height:var(--bs-tooltip-arrow-width)}.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before,.bs-tooltip-start .tooltip-arrow::before{left:-1px;border-width:calc(var(--bs-tooltip-arrow-width) * .5) 0 calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height);border-left-color:var(--bs-tooltip-bg)}.tooltip-inner{max-width:var(--bs-tooltip-max-width);padding:var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x);color:var(--bs-tooltip-color);text-align:center;background-color:var(--bs-tooltip-bg);border-radius:var(--bs-tooltip-border-radius)}.popover{--bs-popover-zindex:1070;--bs-popover-max-width:276px;--bs-popover-font-size:0.875rem;--bs-popover-bg:var(--bs-body-bg);--bs-popover-border-width:var(--bs-border-width);--bs-popover-border-color:var(--bs-border-color-translucent);--bs-popover-border-radius:var(--bs-border-radius-lg);--bs-popover-inner-border-radius:calc(var(--bs-border-radius-lg) - var(--bs-border-width));--bs-popover-box-shadow:var(--bs-box-shadow);--bs-popover-header-padding-x:1rem;--bs-popover-header-padding-y:0.5rem;--bs-popover-header-font-size:1rem;--bs-popover-header-color:inherit;--bs-popover-header-bg:var(--bs-secondary-bg);--bs-popover-body-padding-x:1rem;--bs-popover-body-padding-y:1rem;--bs-popover-body-color:var(--bs-body-color);--bs-popover-arrow-width:1rem;--bs-popover-arrow-height:0.5rem;--bs-popover-arrow-border:var(--bs-popover-border-color);z-index:var(--bs-popover-zindex);display:block;max-width:var(--bs-popover-max-width);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-popover-font-size);word-wrap:break-word;background-color:var(--bs-popover-bg);background-clip:padding-box;border:var(--bs-popover-border-width) solid var(--bs-popover-border-color);border-radius:var(--bs-popover-border-radius)}.popover .popover-arrow{display:block;width:var(--bs-popover-arrow-width);height:var(--bs-popover-arrow-height)}.popover .popover-arrow::after,.popover .popover-arrow::before{position:absolute;display:block;content:\"\";border-color:transparent;border-style:solid;border-width:0}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow,.bs-popover-top>.popover-arrow{bottom:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width))}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::after,.bs-popover-top>.popover-arrow::before{border-width:var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * .5) 0}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::before,.bs-popover-top>.popover-arrow::before{bottom:0;border-top-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=top]>.popover-arrow::after,.bs-popover-top>.popover-arrow::after{bottom:var(--bs-popover-border-width);border-top-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow,.bs-popover-end>.popover-arrow{left:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));width:var(--bs-popover-arrow-height);height:var(--bs-popover-arrow-width)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::after,.bs-popover-end>.popover-arrow::before{border-width:calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height) calc(var(--bs-popover-arrow-width) * .5) 0}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::before,.bs-popover-end>.popover-arrow::before{left:0;border-right-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=right]>.popover-arrow::after,.bs-popover-end>.popover-arrow::after{left:var(--bs-popover-border-width);border-right-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow,.bs-popover-bottom>.popover-arrow{top:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width))}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::before{border-width:0 calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::before,.bs-popover-bottom>.popover-arrow::before{top:0;border-bottom-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=bottom]>.popover-arrow::after,.bs-popover-bottom>.popover-arrow::after{top:var(--bs-popover-border-width);border-bottom-color:var(--bs-popover-bg)}.bs-popover-auto[data-popper-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:var(--bs-popover-arrow-width);margin-left:calc(-.5 * var(--bs-popover-arrow-width));content:\"\";border-bottom:var(--bs-popover-border-width) solid var(--bs-popover-header-bg)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow,.bs-popover-start>.popover-arrow{right:calc(-1 * (var(--bs-popover-arrow-height)) - var(--bs-popover-border-width));width:var(--bs-popover-arrow-height);height:var(--bs-popover-arrow-width)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::after,.bs-popover-start>.popover-arrow::before{border-width:calc(var(--bs-popover-arrow-width) * .5) 0 calc(var(--bs-popover-arrow-width) * .5) var(--bs-popover-arrow-height)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::before,.bs-popover-start>.popover-arrow::before{right:0;border-left-color:var(--bs-popover-arrow-border)}.bs-popover-auto[data-popper-placement^=left]>.popover-arrow::after,.bs-popover-start>.popover-arrow::after{right:var(--bs-popover-border-width);border-left-color:var(--bs-popover-bg)}.popover-header{padding:var(--bs-popover-header-padding-y) var(--bs-popover-header-padding-x);margin-bottom:0;font-size:var(--bs-popover-header-font-size);color:var(--bs-popover-header-color);background-color:var(--bs-popover-header-bg);border-bottom:var(--bs-popover-border-width) solid var(--bs-popover-border-color);border-top-left-radius:var(--bs-popover-inner-border-radius);border-top-right-radius:var(--bs-popover-inner-border-radius)}.popover-header:empty{display:none}.popover-body{padding:var(--bs-popover-body-padding-y) var(--bs-popover-body-padding-x);color:var(--bs-popover-body-color)}.carousel{position:relative}.carousel.pointer-event{touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:\"\"}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-end,.carousel-item-next:not(.carousel-item-start){transform:translateX(100%)}.active.carousel-item-start,.carousel-item-prev:not(.carousel-item-end){transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}.carousel-fade .carousel-item-next.carousel-item-start,.carousel-fade .carousel-item-prev.carousel-item-end,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-end,.carousel-fade .active.carousel-item-start{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;padding:0;color:#fff;text-align:center;background:0 0;filter:var(--bs-carousel-control-icon-filter);border:0;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:2rem;height:2rem;background-repeat:no-repeat;background-position:50%;background-size:100% 100%}.carousel-control-prev-icon{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0'/%3e%3c/svg%3e\")}.carousel-control-next-icon{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e\")}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:2;display:flex;justify-content:center;padding:0;margin-right:15%;margin-bottom:1rem;margin-left:15%}.carousel-indicators [data-bs-target]{box-sizing:content-box;flex:0 1 auto;width:30px;height:3px;padding:0;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:var(--bs-carousel-indicator-active-bg);background-clip:padding-box;border:0;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators [data-bs-target]{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:1.25rem;left:15%;padding-top:1.25rem;padding-bottom:1.25rem;color:var(--bs-carousel-caption-color);text-align:center}.carousel-dark{--bs-carousel-indicator-active-bg:#000;--bs-carousel-caption-color:#000;--bs-carousel-control-icon-filter:invert(1) grayscale(100)}:root,[data-bs-theme=light]{--bs-carousel-indicator-active-bg:#fff;--bs-carousel-caption-color:#fff;--bs-carousel-control-icon-filter: }[data-bs-theme=dark]{--bs-carousel-indicator-active-bg:#000;--bs-carousel-caption-color:#000;--bs-carousel-control-icon-filter:invert(1) grayscale(100)}.spinner-border,.spinner-grow{display:inline-block;flex-shrink:0;width:var(--bs-spinner-width);height:var(--bs-spinner-height);vertical-align:var(--bs-spinner-vertical-align);border-radius:50%;animation:var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name)}@keyframes spinner-border{to{transform:rotate(360deg)}}.spinner-border{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-border-width:0.25em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-border;border:var(--bs-spinner-border-width) solid currentcolor;border-right-color:transparent}.spinner-border-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem;--bs-spinner-border-width:0.2em}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-grow;background-color:currentcolor;opacity:0}.spinner-grow-sm{--bs-spinner-width:1rem;--bs-spinner-height:1rem}@media (prefers-reduced-motion:reduce){.spinner-border,.spinner-grow{--bs-spinner-animation-speed:1.5s}}.offcanvas,.offcanvas-lg,.offcanvas-md,.offcanvas-sm,.offcanvas-xl,.offcanvas-xxl{--bs-offcanvas-zindex:1045;--bs-offcanvas-width:400px;--bs-offcanvas-height:30vh;--bs-offcanvas-padding-x:1rem;--bs-offcanvas-padding-y:1rem;--bs-offcanvas-color:var(--bs-body-color);--bs-offcanvas-bg:var(--bs-body-bg);--bs-offcanvas-border-width:var(--bs-border-width);--bs-offcanvas-border-color:var(--bs-border-color-translucent);--bs-offcanvas-box-shadow:var(--bs-box-shadow-sm);--bs-offcanvas-transition:transform 0.3s ease-in-out;--bs-offcanvas-title-line-height:1.5}@media (max-width:575.98px){.offcanvas-sm{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:var(--bs-offcanvas-transition)}}@media (max-width:575.98px) and (prefers-reduced-motion:reduce){.offcanvas-sm{transition:none}}@media (max-width:575.98px){.offcanvas-sm.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}.offcanvas-sm.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}.offcanvas-sm.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}.offcanvas-sm.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}.offcanvas-sm.show:not(.hiding),.offcanvas-sm.showing{transform:none}.offcanvas-sm.hiding,.offcanvas-sm.show,.offcanvas-sm.showing{visibility:visible}}@media (min-width:576px){.offcanvas-sm{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-sm .offcanvas-header{display:none}.offcanvas-sm .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:767.98px){.offcanvas-md{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:var(--bs-offcanvas-transition)}}@media (max-width:767.98px) and (prefers-reduced-motion:reduce){.offcanvas-md{transition:none}}@media (max-width:767.98px){.offcanvas-md.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}.offcanvas-md.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}.offcanvas-md.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}.offcanvas-md.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}.offcanvas-md.show:not(.hiding),.offcanvas-md.showing{transform:none}.offcanvas-md.hiding,.offcanvas-md.show,.offcanvas-md.showing{visibility:visible}}@media (min-width:768px){.offcanvas-md{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-md .offcanvas-header{display:none}.offcanvas-md .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:991.98px){.offcanvas-lg{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:var(--bs-offcanvas-transition)}}@media (max-width:991.98px) and (prefers-reduced-motion:reduce){.offcanvas-lg{transition:none}}@media (max-width:991.98px){.offcanvas-lg.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}.offcanvas-lg.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}.offcanvas-lg.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}.offcanvas-lg.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}.offcanvas-lg.show:not(.hiding),.offcanvas-lg.showing{transform:none}.offcanvas-lg.hiding,.offcanvas-lg.show,.offcanvas-lg.showing{visibility:visible}}@media (min-width:992px){.offcanvas-lg{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-lg .offcanvas-header{display:none}.offcanvas-lg .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:1199.98px){.offcanvas-xl{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:var(--bs-offcanvas-transition)}}@media (max-width:1199.98px) and (prefers-reduced-motion:reduce){.offcanvas-xl{transition:none}}@media (max-width:1199.98px){.offcanvas-xl.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}.offcanvas-xl.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}.offcanvas-xl.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}.offcanvas-xl.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}.offcanvas-xl.show:not(.hiding),.offcanvas-xl.showing{transform:none}.offcanvas-xl.hiding,.offcanvas-xl.show,.offcanvas-xl.showing{visibility:visible}}@media (min-width:1200px){.offcanvas-xl{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-xl .offcanvas-header{display:none}.offcanvas-xl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}@media (max-width:1399.98px){.offcanvas-xxl{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:var(--bs-offcanvas-transition)}}@media (max-width:1399.98px) and (prefers-reduced-motion:reduce){.offcanvas-xxl{transition:none}}@media (max-width:1399.98px){.offcanvas-xxl.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}.offcanvas-xxl.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}.offcanvas-xxl.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}.offcanvas-xxl.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}.offcanvas-xxl.show:not(.hiding),.offcanvas-xxl.showing{transform:none}.offcanvas-xxl.hiding,.offcanvas-xxl.show,.offcanvas-xxl.showing{visibility:visible}}@media (min-width:1400px){.offcanvas-xxl{--bs-offcanvas-height:auto;--bs-offcanvas-border-width:0;background-color:transparent!important}.offcanvas-xxl .offcanvas-header{display:none}.offcanvas-xxl .offcanvas-body{display:flex;flex-grow:0;padding:0;overflow-y:visible;background-color:transparent!important}}.offcanvas{position:fixed;bottom:0;z-index:var(--bs-offcanvas-zindex);display:flex;flex-direction:column;max-width:100%;color:var(--bs-offcanvas-color);visibility:hidden;background-color:var(--bs-offcanvas-bg);background-clip:padding-box;outline:0;transition:var(--bs-offcanvas-transition)}@media (prefers-reduced-motion:reduce){.offcanvas{transition:none}}.offcanvas.offcanvas-start{top:0;left:0;width:var(--bs-offcanvas-width);border-right:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(-100%)}.offcanvas.offcanvas-end{top:0;right:0;width:var(--bs-offcanvas-width);border-left:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateX(100%)}.offcanvas.offcanvas-top{top:0;right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-bottom:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(-100%)}.offcanvas.offcanvas-bottom{right:0;left:0;height:var(--bs-offcanvas-height);max-height:100%;border-top:var(--bs-offcanvas-border-width) solid var(--bs-offcanvas-border-color);transform:translateY(100%)}.offcanvas.show:not(.hiding),.offcanvas.showing{transform:none}.offcanvas.hiding,.offcanvas.show,.offcanvas.showing{visibility:visible}.offcanvas-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.offcanvas-backdrop.fade{opacity:0}.offcanvas-backdrop.show{opacity:.5}.offcanvas-header{display:flex;align-items:center;padding:var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x)}.offcanvas-header .btn-close{padding:calc(var(--bs-offcanvas-padding-y) * .5) calc(var(--bs-offcanvas-padding-x) * .5);margin-top:calc(-.5 * var(--bs-offcanvas-padding-y));margin-right:calc(-.5 * var(--bs-offcanvas-padding-x));margin-bottom:calc(-.5 * var(--bs-offcanvas-padding-y));margin-left:auto}.offcanvas-title{margin-bottom:0;line-height:var(--bs-offcanvas-title-line-height)}.offcanvas-body{flex-grow:1;padding:var(--bs-offcanvas-padding-y) var(--bs-offcanvas-padding-x);overflow-y:auto}.placeholder{display:inline-block;min-height:1em;vertical-align:middle;cursor:wait;background-color:currentcolor;opacity:.5}.placeholder.btn::before{display:inline-block;content:\"\"}.placeholder-xs{min-height:.6em}.placeholder-sm{min-height:.8em}.placeholder-lg{min-height:1.2em}.placeholder-glow .placeholder{animation:placeholder-glow 2s ease-in-out infinite}@keyframes placeholder-glow{50%{opacity:.2}}.placeholder-wave{-webkit-mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);-webkit-mask-size:200% 100%;mask-size:200% 100%;animation:placeholder-wave 2s linear infinite}@keyframes placeholder-wave{100%{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}.clearfix::after{display:block;clear:both;content:\"\"}.text-bg-primary{color:#fff!important;background-color:RGBA(var(--bs-primary-rgb),var(--bs-bg-opacity,1))!important}.text-bg-secondary{color:#fff!important;background-color:RGBA(var(--bs-secondary-rgb),var(--bs-bg-opacity,1))!important}.text-bg-success{color:#fff!important;background-color:RGBA(var(--bs-success-rgb),var(--bs-bg-opacity,1))!important}.text-bg-info{color:#000!important;background-color:RGBA(var(--bs-info-rgb),var(--bs-bg-opacity,1))!important}.text-bg-warning{color:#000!important;background-color:RGBA(var(--bs-warning-rgb),var(--bs-bg-opacity,1))!important}.text-bg-danger{color:#fff!important;background-color:RGBA(var(--bs-danger-rgb),var(--bs-bg-opacity,1))!important}.text-bg-light{color:#000!important;background-color:RGBA(var(--bs-light-rgb),var(--bs-bg-opacity,1))!important}.text-bg-dark{color:#fff!important;background-color:RGBA(var(--bs-dark-rgb),var(--bs-bg-opacity,1))!important}.link-primary{color:RGBA(var(--bs-primary-rgb),var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(var(--bs-primary-rgb),var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(var(--bs-primary-rgb),var(--bs-link-underline-opacity,1))!important}.link-primary:focus,.link-primary:hover{color:RGBA(10,88,202,var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(10,88,202,var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(10,88,202,var(--bs-link-underline-opacity,1))!important}.link-secondary{color:RGBA(var(--bs-secondary-rgb),var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(var(--bs-secondary-rgb),var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(var(--bs-secondary-rgb),var(--bs-link-underline-opacity,1))!important}.link-secondary:focus,.link-secondary:hover{color:RGBA(86,94,100,var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(86,94,100,var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(86,94,100,var(--bs-link-underline-opacity,1))!important}.link-success{color:RGBA(var(--bs-success-rgb),var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(var(--bs-success-rgb),var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(var(--bs-success-rgb),var(--bs-link-underline-opacity,1))!important}.link-success:focus,.link-success:hover{color:RGBA(20,108,67,var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(20,108,67,var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(20,108,67,var(--bs-link-underline-opacity,1))!important}.link-info{color:RGBA(var(--bs-info-rgb),var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(var(--bs-info-rgb),var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(var(--bs-info-rgb),var(--bs-link-underline-opacity,1))!important}.link-info:focus,.link-info:hover{color:RGBA(61,213,243,var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(61,213,243,var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(61,213,243,var(--bs-link-underline-opacity,1))!important}.link-warning{color:RGBA(var(--bs-warning-rgb),var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(var(--bs-warning-rgb),var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(var(--bs-warning-rgb),var(--bs-link-underline-opacity,1))!important}.link-warning:focus,.link-warning:hover{color:RGBA(255,205,57,var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(255,205,57,var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(255,205,57,var(--bs-link-underline-opacity,1))!important}.link-danger{color:RGBA(var(--bs-danger-rgb),var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(var(--bs-danger-rgb),var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(var(--bs-danger-rgb),var(--bs-link-underline-opacity,1))!important}.link-danger:focus,.link-danger:hover{color:RGBA(176,42,55,var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(176,42,55,var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(176,42,55,var(--bs-link-underline-opacity,1))!important}.link-light{color:RGBA(var(--bs-light-rgb),var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(var(--bs-light-rgb),var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(var(--bs-light-rgb),var(--bs-link-underline-opacity,1))!important}.link-light:focus,.link-light:hover{color:RGBA(249,250,251,var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(249,250,251,var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(249,250,251,var(--bs-link-underline-opacity,1))!important}.link-dark{color:RGBA(var(--bs-dark-rgb),var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(var(--bs-dark-rgb),var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(var(--bs-dark-rgb),var(--bs-link-underline-opacity,1))!important}.link-dark:focus,.link-dark:hover{color:RGBA(26,30,33,var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(26,30,33,var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(26,30,33,var(--bs-link-underline-opacity,1))!important}.link-body-emphasis{color:RGBA(var(--bs-emphasis-color-rgb),var(--bs-link-opacity,1))!important;-webkit-text-decoration-color:RGBA(var(--bs-emphasis-color-rgb),var(--bs-link-underline-opacity,1))!important;text-decoration-color:RGBA(var(--bs-emphasis-color-rgb),var(--bs-link-underline-opacity,1))!important}.link-body-emphasis:focus,.link-body-emphasis:hover{color:RGBA(var(--bs-emphasis-color-rgb),var(--bs-link-opacity,.75))!important;-webkit-text-decoration-color:RGBA(var(--bs-emphasis-color-rgb),var(--bs-link-underline-opacity,0.75))!important;text-decoration-color:RGBA(var(--bs-emphasis-color-rgb),var(--bs-link-underline-opacity,0.75))!important}.focus-ring:focus{outline:0;box-shadow:var(--bs-focus-ring-x,0) var(--bs-focus-ring-y,0) var(--bs-focus-ring-blur,0) var(--bs-focus-ring-width) var(--bs-focus-ring-color)}.icon-link{display:inline-flex;gap:.375rem;align-items:center;-webkit-text-decoration-color:rgba(var(--bs-link-color-rgb),var(--bs-link-opacity,0.5));text-decoration-color:rgba(var(--bs-link-color-rgb),var(--bs-link-opacity,0.5));text-underline-offset:0.25em;-webkit-backface-visibility:hidden;backface-visibility:hidden}.icon-link>.bi{flex-shrink:0;width:1em;height:1em;fill:currentcolor;transition:.2s ease-in-out transform}@media (prefers-reduced-motion:reduce){.icon-link>.bi{transition:none}}.icon-link-hover:focus-visible>.bi,.icon-link-hover:hover>.bi{transform:var(--bs-icon-link-transform,translate3d(.25em,0,0))}.ratio{position:relative;width:100%}.ratio::before{display:block;padding-top:var(--bs-aspect-ratio);content:\"\"}.ratio>*{position:absolute;top:0;left:0;width:100%;height:100%}.ratio-1x1{--bs-aspect-ratio:100%}.ratio-4x3{--bs-aspect-ratio:75%}.ratio-16x9{--bs-aspect-ratio:56.25%}.ratio-21x9{--bs-aspect-ratio:42.8571428571%}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}@media (min-width:576px){.sticky-sm-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-sm-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:768px){.sticky-md-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-md-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:992px){.sticky-lg-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-lg-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:1200px){.sticky-xl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-xl-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}@media (min-width:1400px){.sticky-xxl-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}.sticky-xxl-bottom{position:-webkit-sticky;position:sticky;bottom:0;z-index:1020}}.hstack{display:flex;flex-direction:row;align-items:center;align-self:stretch}.vstack{display:flex;flex:1 1 auto;flex-direction:column;align-self:stretch}.visually-hidden,.visually-hidden-focusable:not(:focus):not(:focus-within){width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.visually-hidden-focusable:not(:focus):not(:focus-within):not(caption),.visually-hidden:not(caption){position:absolute!important}.visually-hidden *,.visually-hidden-focusable:not(:focus):not(:focus-within) *{overflow:hidden!important}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:\"\"}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vr{display:inline-block;align-self:stretch;width:var(--bs-border-width);min-height:1em;background-color:currentcolor;opacity:.25}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.float-start{float:left!important}.float-end{float:right!important}.float-none{float:none!important}.object-fit-contain{-o-object-fit:contain!important;object-fit:contain!important}.object-fit-cover{-o-object-fit:cover!important;object-fit:cover!important}.object-fit-fill{-o-object-fit:fill!important;object-fit:fill!important}.object-fit-scale{-o-object-fit:scale-down!important;object-fit:scale-down!important}.object-fit-none{-o-object-fit:none!important;object-fit:none!important}.opacity-0{opacity:0!important}.opacity-25{opacity:.25!important}.opacity-50{opacity:.5!important}.opacity-75{opacity:.75!important}.opacity-100{opacity:1!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.overflow-visible{overflow:visible!important}.overflow-scroll{overflow:scroll!important}.overflow-x-auto{overflow-x:auto!important}.overflow-x-hidden{overflow-x:hidden!important}.overflow-x-visible{overflow-x:visible!important}.overflow-x-scroll{overflow-x:scroll!important}.overflow-y-auto{overflow-y:auto!important}.overflow-y-hidden{overflow-y:hidden!important}.overflow-y-visible{overflow-y:visible!important}.overflow-y-scroll{overflow-y:scroll!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-inline-grid{display:inline-grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.shadow{box-shadow:var(--bs-box-shadow)!important}.shadow-sm{box-shadow:var(--bs-box-shadow-sm)!important}.shadow-lg{box-shadow:var(--bs-box-shadow-lg)!important}.shadow-none{box-shadow:none!important}.focus-ring-primary{--bs-focus-ring-color:rgba(var(--bs-primary-rgb), var(--bs-focus-ring-opacity))}.focus-ring-secondary{--bs-focus-ring-color:rgba(var(--bs-secondary-rgb), var(--bs-focus-ring-opacity))}.focus-ring-success{--bs-focus-ring-color:rgba(var(--bs-success-rgb), var(--bs-focus-ring-opacity))}.focus-ring-info{--bs-focus-ring-color:rgba(var(--bs-info-rgb), var(--bs-focus-ring-opacity))}.focus-ring-warning{--bs-focus-ring-color:rgba(var(--bs-warning-rgb), var(--bs-focus-ring-opacity))}.focus-ring-danger{--bs-focus-ring-color:rgba(var(--bs-danger-rgb), var(--bs-focus-ring-opacity))}.focus-ring-light{--bs-focus-ring-color:rgba(var(--bs-light-rgb), var(--bs-focus-ring-opacity))}.focus-ring-dark{--bs-focus-ring-color:rgba(var(--bs-dark-rgb), var(--bs-focus-ring-opacity))}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.top-0{top:0!important}.top-50{top:50%!important}.top-100{top:100%!important}.bottom-0{bottom:0!important}.bottom-50{bottom:50%!important}.bottom-100{bottom:100%!important}.start-0{left:0!important}.start-50{left:50%!important}.start-100{left:100%!important}.end-0{right:0!important}.end-50{right:50%!important}.end-100{right:100%!important}.translate-middle{transform:translate(-50%,-50%)!important}.translate-middle-x{transform:translateX(-50%)!important}.translate-middle-y{transform:translateY(-50%)!important}.border{border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-0{border:0!important}.border-top{border-top:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-top-0{border-top:0!important}.border-end{border-right:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-end-0{border-right:0!important}.border-bottom{border-bottom:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-bottom-0{border-bottom:0!important}.border-start{border-left:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-start-0{border-left:0!important}.border-primary{--bs-border-opacity:1;border-color:rgba(var(--bs-primary-rgb),var(--bs-border-opacity))!important}.border-secondary{--bs-border-opacity:1;border-color:rgba(var(--bs-secondary-rgb),var(--bs-border-opacity))!important}.border-success{--bs-border-opacity:1;border-color:rgba(var(--bs-success-rgb),var(--bs-border-opacity))!important}.border-info{--bs-border-opacity:1;border-color:rgba(var(--bs-info-rgb),var(--bs-border-opacity))!important}.border-warning{--bs-border-opacity:1;border-color:rgba(var(--bs-warning-rgb),var(--bs-border-opacity))!important}.border-danger{--bs-border-opacity:1;border-color:rgba(var(--bs-danger-rgb),var(--bs-border-opacity))!important}.border-light{--bs-border-opacity:1;border-color:rgba(var(--bs-light-rgb),var(--bs-border-opacity))!important}.border-dark{--bs-border-opacity:1;border-color:rgba(var(--bs-dark-rgb),var(--bs-border-opacity))!important}.border-black{--bs-border-opacity:1;border-color:rgba(var(--bs-black-rgb),var(--bs-border-opacity))!important}.border-white{--bs-border-opacity:1;border-color:rgba(var(--bs-white-rgb),var(--bs-border-opacity))!important}.border-primary-subtle{border-color:var(--bs-primary-border-subtle)!important}.border-secondary-subtle{border-color:var(--bs-secondary-border-subtle)!important}.border-success-subtle{border-color:var(--bs-success-border-subtle)!important}.border-info-subtle{border-color:var(--bs-info-border-subtle)!important}.border-warning-subtle{border-color:var(--bs-warning-border-subtle)!important}.border-danger-subtle{border-color:var(--bs-danger-border-subtle)!important}.border-light-subtle{border-color:var(--bs-light-border-subtle)!important}.border-dark-subtle{border-color:var(--bs-dark-border-subtle)!important}.border-1{border-width:1px!important}.border-2{border-width:2px!important}.border-3{border-width:3px!important}.border-4{border-width:4px!important}.border-5{border-width:5px!important}.border-opacity-10{--bs-border-opacity:0.1}.border-opacity-25{--bs-border-opacity:0.25}.border-opacity-50{--bs-border-opacity:0.5}.border-opacity-75{--bs-border-opacity:0.75}.border-opacity-100{--bs-border-opacity:1}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.mw-100{max-width:100%!important}.vw-100{width:100vw!important}.min-vw-100{min-width:100vw!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mh-100{max-height:100%!important}.vh-100{height:100vh!important}.min-vh-100{min-height:100vh!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.justify-content-evenly{justify-content:space-evenly!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}.order-first{order:-1!important}.order-0{order:0!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.order-4{order:4!important}.order-5{order:5!important}.order-last{order:6!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-auto{margin:auto!important}.mx-0{margin-right:0!important;margin-left:0!important}.mx-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-3{margin-right:1rem!important;margin-left:1rem!important}.mx-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-5{margin-right:3rem!important;margin-left:3rem!important}.mx-auto{margin-right:auto!important;margin-left:auto!important}.my-0{margin-top:0!important;margin-bottom:0!important}.my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-auto{margin-top:auto!important}.me-0{margin-right:0!important}.me-1{margin-right:.25rem!important}.me-2{margin-right:.5rem!important}.me-3{margin-right:1rem!important}.me-4{margin-right:1.5rem!important}.me-5{margin-right:3rem!important}.me-auto{margin-right:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-left:0!important}.ms-1{margin-left:.25rem!important}.ms-2{margin-left:.5rem!important}.ms-3{margin-left:1rem!important}.ms-4{margin-left:1.5rem!important}.ms-5{margin-left:3rem!important}.ms-auto{margin-left:auto!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.px-0{padding-right:0!important;padding-left:0!important}.px-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-3{padding-right:1rem!important;padding-left:1rem!important}.px-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-5{padding-right:3rem!important;padding-left:3rem!important}.py-0{padding-top:0!important;padding-bottom:0!important}.py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-0{padding-top:0!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pe-0{padding-right:0!important}.pe-1{padding-right:.25rem!important}.pe-2{padding-right:.5rem!important}.pe-3{padding-right:1rem!important}.pe-4{padding-right:1.5rem!important}.pe-5{padding-right:3rem!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.pb-5{padding-bottom:3rem!important}.ps-0{padding-left:0!important}.ps-1{padding-left:.25rem!important}.ps-2{padding-left:.5rem!important}.ps-3{padding-left:1rem!important}.ps-4{padding-left:1.5rem!important}.ps-5{padding-left:3rem!important}.gap-0{gap:0!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.gap-3{gap:1rem!important}.gap-4{gap:1.5rem!important}.gap-5{gap:3rem!important}.row-gap-0{row-gap:0!important}.row-gap-1{row-gap:.25rem!important}.row-gap-2{row-gap:.5rem!important}.row-gap-3{row-gap:1rem!important}.row-gap-4{row-gap:1.5rem!important}.row-gap-5{row-gap:3rem!important}.column-gap-0{-moz-column-gap:0!important;column-gap:0!important}.column-gap-1{-moz-column-gap:0.25rem!important;column-gap:.25rem!important}.column-gap-2{-moz-column-gap:0.5rem!important;column-gap:.5rem!important}.column-gap-3{-moz-column-gap:1rem!important;column-gap:1rem!important}.column-gap-4{-moz-column-gap:1.5rem!important;column-gap:1.5rem!important}.column-gap-5{-moz-column-gap:3rem!important;column-gap:3rem!important}.font-monospace{font-family:var(--bs-font-monospace)!important}.fs-1{font-size:calc(1.375rem + 1.5vw)!important}.fs-2{font-size:calc(1.325rem + .9vw)!important}.fs-3{font-size:calc(1.3rem + .6vw)!important}.fs-4{font-size:calc(1.275rem + .3vw)!important}.fs-5{font-size:1.25rem!important}.fs-6{font-size:1rem!important}.fst-italic{font-style:italic!important}.fst-normal{font-style:normal!important}.fw-lighter{font-weight:lighter!important}.fw-light{font-weight:300!important}.fw-normal{font-weight:400!important}.fw-medium{font-weight:500!important}.fw-semibold{font-weight:600!important}.fw-bold{font-weight:700!important}.fw-bolder{font-weight:bolder!important}.lh-1{line-height:1!important}.lh-sm{line-height:1.25!important}.lh-base{line-height:1.5!important}.lh-lg{line-height:2!important}.text-start{text-align:left!important}.text-end{text-align:right!important}.text-center{text-align:center!important}.text-decoration-none{text-decoration:none!important}.text-decoration-underline{text-decoration:underline!important}.text-decoration-line-through{text-decoration:line-through!important}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-break{word-wrap:break-word!important;word-break:break-word!important}.text-primary{--bs-text-opacity:1;color:rgba(var(--bs-primary-rgb),var(--bs-text-opacity))!important}.text-secondary{--bs-text-opacity:1;color:rgba(var(--bs-secondary-rgb),var(--bs-text-opacity))!important}.text-success{--bs-text-opacity:1;color:rgba(var(--bs-success-rgb),var(--bs-text-opacity))!important}.text-info{--bs-text-opacity:1;color:rgba(var(--bs-info-rgb),var(--bs-text-opacity))!important}.text-warning{--bs-text-opacity:1;color:rgba(var(--bs-warning-rgb),var(--bs-text-opacity))!important}.text-danger{--bs-text-opacity:1;color:rgba(var(--bs-danger-rgb),var(--bs-text-opacity))!important}.text-light{--bs-text-opacity:1;color:rgba(var(--bs-light-rgb),var(--bs-text-opacity))!important}.text-dark{--bs-text-opacity:1;color:rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important}.text-black{--bs-text-opacity:1;color:rgba(var(--bs-black-rgb),var(--bs-text-opacity))!important}.text-white{--bs-text-opacity:1;color:rgba(var(--bs-white-rgb),var(--bs-text-opacity))!important}.text-body{--bs-text-opacity:1;color:rgba(var(--bs-body-color-rgb),var(--bs-text-opacity))!important}.text-muted{--bs-text-opacity:1;color:var(--bs-secondary-color)!important}.text-black-50{--bs-text-opacity:1;color:rgba(0,0,0,.5)!important}.text-white-50{--bs-text-opacity:1;color:rgba(255,255,255,.5)!important}.text-body-secondary{--bs-text-opacity:1;color:var(--bs-secondary-color)!important}.text-body-tertiary{--bs-text-opacity:1;color:var(--bs-tertiary-color)!important}.text-body-emphasis{--bs-text-opacity:1;color:var(--bs-emphasis-color)!important}.text-reset{--bs-text-opacity:1;color:inherit!important}.text-opacity-25{--bs-text-opacity:0.25}.text-opacity-50{--bs-text-opacity:0.5}.text-opacity-75{--bs-text-opacity:0.75}.text-opacity-100{--bs-text-opacity:1}.text-primary-emphasis{color:var(--bs-primary-text-emphasis)!important}.text-secondary-emphasis{color:var(--bs-secondary-text-emphasis)!important}.text-success-emphasis{color:var(--bs-success-text-emphasis)!important}.text-info-emphasis{color:var(--bs-info-text-emphasis)!important}.text-warning-emphasis{color:var(--bs-warning-text-emphasis)!important}.text-danger-emphasis{color:var(--bs-danger-text-emphasis)!important}.text-light-emphasis{color:var(--bs-light-text-emphasis)!important}.text-dark-emphasis{color:var(--bs-dark-text-emphasis)!important}.link-opacity-10{--bs-link-opacity:0.1}.link-opacity-10-hover:hover{--bs-link-opacity:0.1}.link-opacity-25{--bs-link-opacity:0.25}.link-opacity-25-hover:hover{--bs-link-opacity:0.25}.link-opacity-50{--bs-link-opacity:0.5}.link-opacity-50-hover:hover{--bs-link-opacity:0.5}.link-opacity-75{--bs-link-opacity:0.75}.link-opacity-75-hover:hover{--bs-link-opacity:0.75}.link-opacity-100{--bs-link-opacity:1}.link-opacity-100-hover:hover{--bs-link-opacity:1}.link-offset-1{text-underline-offset:0.125em!important}.link-offset-1-hover:hover{text-underline-offset:0.125em!important}.link-offset-2{text-underline-offset:0.25em!important}.link-offset-2-hover:hover{text-underline-offset:0.25em!important}.link-offset-3{text-underline-offset:0.375em!important}.link-offset-3-hover:hover{text-underline-offset:0.375em!important}.link-underline-primary{--bs-link-underline-opacity:1;-webkit-text-decoration-color:rgba(var(--bs-primary-rgb),var(--bs-link-underline-opacity))!important;text-decoration-color:rgba(var(--bs-primary-rgb),var(--bs-link-underline-opacity))!important}.link-underline-secondary{--bs-link-underline-opacity:1;-webkit-text-decoration-color:rgba(var(--bs-secondary-rgb),var(--bs-link-underline-opacity))!important;text-decoration-color:rgba(var(--bs-secondary-rgb),var(--bs-link-underline-opacity))!important}.link-underline-success{--bs-link-underline-opacity:1;-webkit-text-decoration-color:rgba(var(--bs-success-rgb),var(--bs-link-underline-opacity))!important;text-decoration-color:rgba(var(--bs-success-rgb),var(--bs-link-underline-opacity))!important}.link-underline-info{--bs-link-underline-opacity:1;-webkit-text-decoration-color:rgba(var(--bs-info-rgb),var(--bs-link-underline-opacity))!important;text-decoration-color:rgba(var(--bs-info-rgb),var(--bs-link-underline-opacity))!important}.link-underline-warning{--bs-link-underline-opacity:1;-webkit-text-decoration-color:rgba(var(--bs-warning-rgb),var(--bs-link-underline-opacity))!important;text-decoration-color:rgba(var(--bs-warning-rgb),var(--bs-link-underline-opacity))!important}.link-underline-danger{--bs-link-underline-opacity:1;-webkit-text-decoration-color:rgba(var(--bs-danger-rgb),var(--bs-link-underline-opacity))!important;text-decoration-color:rgba(var(--bs-danger-rgb),var(--bs-link-underline-opacity))!important}.link-underline-light{--bs-link-underline-opacity:1;-webkit-text-decoration-color:rgba(var(--bs-light-rgb),var(--bs-link-underline-opacity))!important;text-decoration-color:rgba(var(--bs-light-rgb),var(--bs-link-underline-opacity))!important}.link-underline-dark{--bs-link-underline-opacity:1;-webkit-text-decoration-color:rgba(var(--bs-dark-rgb),var(--bs-link-underline-opacity))!important;text-decoration-color:rgba(var(--bs-dark-rgb),var(--bs-link-underline-opacity))!important}.link-underline{--bs-link-underline-opacity:1;-webkit-text-decoration-color:rgba(var(--bs-link-color-rgb),var(--bs-link-underline-opacity,1))!important;text-decoration-color:rgba(var(--bs-link-color-rgb),var(--bs-link-underline-opacity,1))!important}.link-underline-opacity-0{--bs-link-underline-opacity:0}.link-underline-opacity-0-hover:hover{--bs-link-underline-opacity:0}.link-underline-opacity-10{--bs-link-underline-opacity:0.1}.link-underline-opacity-10-hover:hover{--bs-link-underline-opacity:0.1}.link-underline-opacity-25{--bs-link-underline-opacity:0.25}.link-underline-opacity-25-hover:hover{--bs-link-underline-opacity:0.25}.link-underline-opacity-50{--bs-link-underline-opacity:0.5}.link-underline-opacity-50-hover:hover{--bs-link-underline-opacity:0.5}.link-underline-opacity-75{--bs-link-underline-opacity:0.75}.link-underline-opacity-75-hover:hover{--bs-link-underline-opacity:0.75}.link-underline-opacity-100{--bs-link-underline-opacity:1}.link-underline-opacity-100-hover:hover{--bs-link-underline-opacity:1}.bg-primary{--bs-bg-opacity:1;background-color:rgba(var(--bs-primary-rgb),var(--bs-bg-opacity))!important}.bg-secondary{--bs-bg-opacity:1;background-color:rgba(var(--bs-secondary-rgb),var(--bs-bg-opacity))!important}.bg-success{--bs-bg-opacity:1;background-color:rgba(var(--bs-success-rgb),var(--bs-bg-opacity))!important}.bg-info{--bs-bg-opacity:1;background-color:rgba(var(--bs-info-rgb),var(--bs-bg-opacity))!important}.bg-warning{--bs-bg-opacity:1;background-color:rgba(var(--bs-warning-rgb),var(--bs-bg-opacity))!important}.bg-danger{--bs-bg-opacity:1;background-color:rgba(var(--bs-danger-rgb),var(--bs-bg-opacity))!important}.bg-light{--bs-bg-opacity:1;background-color:rgba(var(--bs-light-rgb),var(--bs-bg-opacity))!important}.bg-dark{--bs-bg-opacity:1;background-color:rgba(var(--bs-dark-rgb),var(--bs-bg-opacity))!important}.bg-black{--bs-bg-opacity:1;background-color:rgba(var(--bs-black-rgb),var(--bs-bg-opacity))!important}.bg-white{--bs-bg-opacity:1;background-color:rgba(var(--bs-white-rgb),var(--bs-bg-opacity))!important}.bg-body{--bs-bg-opacity:1;background-color:rgba(var(--bs-body-bg-rgb),var(--bs-bg-opacity))!important}.bg-transparent{--bs-bg-opacity:1;background-color:transparent!important}.bg-body-secondary{--bs-bg-opacity:1;background-color:rgba(var(--bs-secondary-bg-rgb),var(--bs-bg-opacity))!important}.bg-body-tertiary{--bs-bg-opacity:1;background-color:rgba(var(--bs-tertiary-bg-rgb),var(--bs-bg-opacity))!important}.bg-opacity-10{--bs-bg-opacity:0.1}.bg-opacity-25{--bs-bg-opacity:0.25}.bg-opacity-50{--bs-bg-opacity:0.5}.bg-opacity-75{--bs-bg-opacity:0.75}.bg-opacity-100{--bs-bg-opacity:1}.bg-primary-subtle{background-color:var(--bs-primary-bg-subtle)!important}.bg-secondary-subtle{background-color:var(--bs-secondary-bg-subtle)!important}.bg-success-subtle{background-color:var(--bs-success-bg-subtle)!important}.bg-info-subtle{background-color:var(--bs-info-bg-subtle)!important}.bg-warning-subtle{background-color:var(--bs-warning-bg-subtle)!important}.bg-danger-subtle{background-color:var(--bs-danger-bg-subtle)!important}.bg-light-subtle{background-color:var(--bs-light-bg-subtle)!important}.bg-dark-subtle{background-color:var(--bs-dark-bg-subtle)!important}.bg-gradient{background-image:var(--bs-gradient)!important}.user-select-all{-webkit-user-select:all!important;-moz-user-select:all!important;user-select:all!important}.user-select-auto{-webkit-user-select:auto!important;-moz-user-select:auto!important;user-select:auto!important}.user-select-none{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}.pe-none{pointer-events:none!important}.pe-auto{pointer-events:auto!important}.rounded{border-radius:var(--bs-border-radius)!important}.rounded-0{border-radius:0!important}.rounded-1{border-radius:var(--bs-border-radius-sm)!important}.rounded-2{border-radius:var(--bs-border-radius)!important}.rounded-3{border-radius:var(--bs-border-radius-lg)!important}.rounded-4{border-radius:var(--bs-border-radius-xl)!important}.rounded-5{border-radius:var(--bs-border-radius-xxl)!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:var(--bs-border-radius-pill)!important}.rounded-top{border-top-left-radius:var(--bs-border-radius)!important;border-top-right-radius:var(--bs-border-radius)!important}.rounded-top-0{border-top-left-radius:0!important;border-top-right-radius:0!important}.rounded-top-1{border-top-left-radius:var(--bs-border-radius-sm)!important;border-top-right-radius:var(--bs-border-radius-sm)!important}.rounded-top-2{border-top-left-radius:var(--bs-border-radius)!important;border-top-right-radius:var(--bs-border-radius)!important}.rounded-top-3{border-top-left-radius:var(--bs-border-radius-lg)!important;border-top-right-radius:var(--bs-border-radius-lg)!important}.rounded-top-4{border-top-left-radius:var(--bs-border-radius-xl)!important;border-top-right-radius:var(--bs-border-radius-xl)!important}.rounded-top-5{border-top-left-radius:var(--bs-border-radius-xxl)!important;border-top-right-radius:var(--bs-border-radius-xxl)!important}.rounded-top-circle{border-top-left-radius:50%!important;border-top-right-radius:50%!important}.rounded-top-pill{border-top-left-radius:var(--bs-border-radius-pill)!important;border-top-right-radius:var(--bs-border-radius-pill)!important}.rounded-end{border-top-right-radius:var(--bs-border-radius)!important;border-bottom-right-radius:var(--bs-border-radius)!important}.rounded-end-0{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.rounded-end-1{border-top-right-radius:var(--bs-border-radius-sm)!important;border-bottom-right-radius:var(--bs-border-radius-sm)!important}.rounded-end-2{border-top-right-radius:var(--bs-border-radius)!important;border-bottom-right-radius:var(--bs-border-radius)!important}.rounded-end-3{border-top-right-radius:var(--bs-border-radius-lg)!important;border-bottom-right-radius:var(--bs-border-radius-lg)!important}.rounded-end-4{border-top-right-radius:var(--bs-border-radius-xl)!important;border-bottom-right-radius:var(--bs-border-radius-xl)!important}.rounded-end-5{border-top-right-radius:var(--bs-border-radius-xxl)!important;border-bottom-right-radius:var(--bs-border-radius-xxl)!important}.rounded-end-circle{border-top-right-radius:50%!important;border-bottom-right-radius:50%!important}.rounded-end-pill{border-top-right-radius:var(--bs-border-radius-pill)!important;border-bottom-right-radius:var(--bs-border-radius-pill)!important}.rounded-bottom{border-bottom-right-radius:var(--bs-border-radius)!important;border-bottom-left-radius:var(--bs-border-radius)!important}.rounded-bottom-0{border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}.rounded-bottom-1{border-bottom-right-radius:var(--bs-border-radius-sm)!important;border-bottom-left-radius:var(--bs-border-radius-sm)!important}.rounded-bottom-2{border-bottom-right-radius:var(--bs-border-radius)!important;border-bottom-left-radius:var(--bs-border-radius)!important}.rounded-bottom-3{border-bottom-right-radius:var(--bs-border-radius-lg)!important;border-bottom-left-radius:var(--bs-border-radius-lg)!important}.rounded-bottom-4{border-bottom-right-radius:var(--bs-border-radius-xl)!important;border-bottom-left-radius:var(--bs-border-radius-xl)!important}.rounded-bottom-5{border-bottom-right-radius:var(--bs-border-radius-xxl)!important;border-bottom-left-radius:var(--bs-border-radius-xxl)!important}.rounded-bottom-circle{border-bottom-right-radius:50%!important;border-bottom-left-radius:50%!important}.rounded-bottom-pill{border-bottom-right-radius:var(--bs-border-radius-pill)!important;border-bottom-left-radius:var(--bs-border-radius-pill)!important}.rounded-start{border-bottom-left-radius:var(--bs-border-radius)!important;border-top-left-radius:var(--bs-border-radius)!important}.rounded-start-0{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.rounded-start-1{border-bottom-left-radius:var(--bs-border-radius-sm)!important;border-top-left-radius:var(--bs-border-radius-sm)!important}.rounded-start-2{border-bottom-left-radius:var(--bs-border-radius)!important;border-top-left-radius:var(--bs-border-radius)!important}.rounded-start-3{border-bottom-left-radius:var(--bs-border-radius-lg)!important;border-top-left-radius:var(--bs-border-radius-lg)!important}.rounded-start-4{border-bottom-left-radius:var(--bs-border-radius-xl)!important;border-top-left-radius:var(--bs-border-radius-xl)!important}.rounded-start-5{border-bottom-left-radius:var(--bs-border-radius-xxl)!important;border-top-left-radius:var(--bs-border-radius-xxl)!important}.rounded-start-circle{border-bottom-left-radius:50%!important;border-top-left-radius:50%!important}.rounded-start-pill{border-bottom-left-radius:var(--bs-border-radius-pill)!important;border-top-left-radius:var(--bs-border-radius-pill)!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}.z-n1{z-index:-1!important}.z-0{z-index:0!important}.z-1{z-index:1!important}.z-2{z-index:2!important}.z-3{z-index:3!important}@media (min-width:576px){.float-sm-start{float:left!important}.float-sm-end{float:right!important}.float-sm-none{float:none!important}.object-fit-sm-contain{-o-object-fit:contain!important;object-fit:contain!important}.object-fit-sm-cover{-o-object-fit:cover!important;object-fit:cover!important}.object-fit-sm-fill{-o-object-fit:fill!important;object-fit:fill!important}.object-fit-sm-scale{-o-object-fit:scale-down!important;object-fit:scale-down!important}.object-fit-sm-none{-o-object-fit:none!important;object-fit:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-grid{display:grid!important}.d-sm-inline-grid{display:inline-grid!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}.d-sm-none{display:none!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.justify-content-sm-evenly{justify-content:space-evenly!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}.order-sm-first{order:-1!important}.order-sm-0{order:0!important}.order-sm-1{order:1!important}.order-sm-2{order:2!important}.order-sm-3{order:3!important}.order-sm-4{order:4!important}.order-sm-5{order:5!important}.order-sm-last{order:6!important}.m-sm-0{margin:0!important}.m-sm-1{margin:.25rem!important}.m-sm-2{margin:.5rem!important}.m-sm-3{margin:1rem!important}.m-sm-4{margin:1.5rem!important}.m-sm-5{margin:3rem!important}.m-sm-auto{margin:auto!important}.mx-sm-0{margin-right:0!important;margin-left:0!important}.mx-sm-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-sm-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-sm-3{margin-right:1rem!important;margin-left:1rem!important}.mx-sm-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-sm-5{margin-right:3rem!important;margin-left:3rem!important}.mx-sm-auto{margin-right:auto!important;margin-left:auto!important}.my-sm-0{margin-top:0!important;margin-bottom:0!important}.my-sm-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-sm-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-sm-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-sm-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-sm-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-sm-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-sm-0{margin-top:0!important}.mt-sm-1{margin-top:.25rem!important}.mt-sm-2{margin-top:.5rem!important}.mt-sm-3{margin-top:1rem!important}.mt-sm-4{margin-top:1.5rem!important}.mt-sm-5{margin-top:3rem!important}.mt-sm-auto{margin-top:auto!important}.me-sm-0{margin-right:0!important}.me-sm-1{margin-right:.25rem!important}.me-sm-2{margin-right:.5rem!important}.me-sm-3{margin-right:1rem!important}.me-sm-4{margin-right:1.5rem!important}.me-sm-5{margin-right:3rem!important}.me-sm-auto{margin-right:auto!important}.mb-sm-0{margin-bottom:0!important}.mb-sm-1{margin-bottom:.25rem!important}.mb-sm-2{margin-bottom:.5rem!important}.mb-sm-3{margin-bottom:1rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.mb-sm-5{margin-bottom:3rem!important}.mb-sm-auto{margin-bottom:auto!important}.ms-sm-0{margin-left:0!important}.ms-sm-1{margin-left:.25rem!important}.ms-sm-2{margin-left:.5rem!important}.ms-sm-3{margin-left:1rem!important}.ms-sm-4{margin-left:1.5rem!important}.ms-sm-5{margin-left:3rem!important}.ms-sm-auto{margin-left:auto!important}.p-sm-0{padding:0!important}.p-sm-1{padding:.25rem!important}.p-sm-2{padding:.5rem!important}.p-sm-3{padding:1rem!important}.p-sm-4{padding:1.5rem!important}.p-sm-5{padding:3rem!important}.px-sm-0{padding-right:0!important;padding-left:0!important}.px-sm-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-sm-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-sm-3{padding-right:1rem!important;padding-left:1rem!important}.px-sm-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-sm-5{padding-right:3rem!important;padding-left:3rem!important}.py-sm-0{padding-top:0!important;padding-bottom:0!important}.py-sm-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-sm-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-sm-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-sm-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-sm-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-sm-0{padding-top:0!important}.pt-sm-1{padding-top:.25rem!important}.pt-sm-2{padding-top:.5rem!important}.pt-sm-3{padding-top:1rem!important}.pt-sm-4{padding-top:1.5rem!important}.pt-sm-5{padding-top:3rem!important}.pe-sm-0{padding-right:0!important}.pe-sm-1{padding-right:.25rem!important}.pe-sm-2{padding-right:.5rem!important}.pe-sm-3{padding-right:1rem!important}.pe-sm-4{padding-right:1.5rem!important}.pe-sm-5{padding-right:3rem!important}.pb-sm-0{padding-bottom:0!important}.pb-sm-1{padding-bottom:.25rem!important}.pb-sm-2{padding-bottom:.5rem!important}.pb-sm-3{padding-bottom:1rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pb-sm-5{padding-bottom:3rem!important}.ps-sm-0{padding-left:0!important}.ps-sm-1{padding-left:.25rem!important}.ps-sm-2{padding-left:.5rem!important}.ps-sm-3{padding-left:1rem!important}.ps-sm-4{padding-left:1.5rem!important}.ps-sm-5{padding-left:3rem!important}.gap-sm-0{gap:0!important}.gap-sm-1{gap:.25rem!important}.gap-sm-2{gap:.5rem!important}.gap-sm-3{gap:1rem!important}.gap-sm-4{gap:1.5rem!important}.gap-sm-5{gap:3rem!important}.row-gap-sm-0{row-gap:0!important}.row-gap-sm-1{row-gap:.25rem!important}.row-gap-sm-2{row-gap:.5rem!important}.row-gap-sm-3{row-gap:1rem!important}.row-gap-sm-4{row-gap:1.5rem!important}.row-gap-sm-5{row-gap:3rem!important}.column-gap-sm-0{-moz-column-gap:0!important;column-gap:0!important}.column-gap-sm-1{-moz-column-gap:0.25rem!important;column-gap:.25rem!important}.column-gap-sm-2{-moz-column-gap:0.5rem!important;column-gap:.5rem!important}.column-gap-sm-3{-moz-column-gap:1rem!important;column-gap:1rem!important}.column-gap-sm-4{-moz-column-gap:1.5rem!important;column-gap:1.5rem!important}.column-gap-sm-5{-moz-column-gap:3rem!important;column-gap:3rem!important}.text-sm-start{text-align:left!important}.text-sm-end{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.float-md-start{float:left!important}.float-md-end{float:right!important}.float-md-none{float:none!important}.object-fit-md-contain{-o-object-fit:contain!important;object-fit:contain!important}.object-fit-md-cover{-o-object-fit:cover!important;object-fit:cover!important}.object-fit-md-fill{-o-object-fit:fill!important;object-fit:fill!important}.object-fit-md-scale{-o-object-fit:scale-down!important;object-fit:scale-down!important}.object-fit-md-none{-o-object-fit:none!important;object-fit:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-grid{display:grid!important}.d-md-inline-grid{display:inline-grid!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}.d-md-none{display:none!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.justify-content-md-evenly{justify-content:space-evenly!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}.order-md-first{order:-1!important}.order-md-0{order:0!important}.order-md-1{order:1!important}.order-md-2{order:2!important}.order-md-3{order:3!important}.order-md-4{order:4!important}.order-md-5{order:5!important}.order-md-last{order:6!important}.m-md-0{margin:0!important}.m-md-1{margin:.25rem!important}.m-md-2{margin:.5rem!important}.m-md-3{margin:1rem!important}.m-md-4{margin:1.5rem!important}.m-md-5{margin:3rem!important}.m-md-auto{margin:auto!important}.mx-md-0{margin-right:0!important;margin-left:0!important}.mx-md-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-md-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-md-3{margin-right:1rem!important;margin-left:1rem!important}.mx-md-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-md-5{margin-right:3rem!important;margin-left:3rem!important}.mx-md-auto{margin-right:auto!important;margin-left:auto!important}.my-md-0{margin-top:0!important;margin-bottom:0!important}.my-md-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-md-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-md-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-md-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-md-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-md-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-md-0{margin-top:0!important}.mt-md-1{margin-top:.25rem!important}.mt-md-2{margin-top:.5rem!important}.mt-md-3{margin-top:1rem!important}.mt-md-4{margin-top:1.5rem!important}.mt-md-5{margin-top:3rem!important}.mt-md-auto{margin-top:auto!important}.me-md-0{margin-right:0!important}.me-md-1{margin-right:.25rem!important}.me-md-2{margin-right:.5rem!important}.me-md-3{margin-right:1rem!important}.me-md-4{margin-right:1.5rem!important}.me-md-5{margin-right:3rem!important}.me-md-auto{margin-right:auto!important}.mb-md-0{margin-bottom:0!important}.mb-md-1{margin-bottom:.25rem!important}.mb-md-2{margin-bottom:.5rem!important}.mb-md-3{margin-bottom:1rem!important}.mb-md-4{margin-bottom:1.5rem!important}.mb-md-5{margin-bottom:3rem!important}.mb-md-auto{margin-bottom:auto!important}.ms-md-0{margin-left:0!important}.ms-md-1{margin-left:.25rem!important}.ms-md-2{margin-left:.5rem!important}.ms-md-3{margin-left:1rem!important}.ms-md-4{margin-left:1.5rem!important}.ms-md-5{margin-left:3rem!important}.ms-md-auto{margin-left:auto!important}.p-md-0{padding:0!important}.p-md-1{padding:.25rem!important}.p-md-2{padding:.5rem!important}.p-md-3{padding:1rem!important}.p-md-4{padding:1.5rem!important}.p-md-5{padding:3rem!important}.px-md-0{padding-right:0!important;padding-left:0!important}.px-md-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-md-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-md-3{padding-right:1rem!important;padding-left:1rem!important}.px-md-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-md-5{padding-right:3rem!important;padding-left:3rem!important}.py-md-0{padding-top:0!important;padding-bottom:0!important}.py-md-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-md-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-md-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-md-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-md-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-md-0{padding-top:0!important}.pt-md-1{padding-top:.25rem!important}.pt-md-2{padding-top:.5rem!important}.pt-md-3{padding-top:1rem!important}.pt-md-4{padding-top:1.5rem!important}.pt-md-5{padding-top:3rem!important}.pe-md-0{padding-right:0!important}.pe-md-1{padding-right:.25rem!important}.pe-md-2{padding-right:.5rem!important}.pe-md-3{padding-right:1rem!important}.pe-md-4{padding-right:1.5rem!important}.pe-md-5{padding-right:3rem!important}.pb-md-0{padding-bottom:0!important}.pb-md-1{padding-bottom:.25rem!important}.pb-md-2{padding-bottom:.5rem!important}.pb-md-3{padding-bottom:1rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pb-md-5{padding-bottom:3rem!important}.ps-md-0{padding-left:0!important}.ps-md-1{padding-left:.25rem!important}.ps-md-2{padding-left:.5rem!important}.ps-md-3{padding-left:1rem!important}.ps-md-4{padding-left:1.5rem!important}.ps-md-5{padding-left:3rem!important}.gap-md-0{gap:0!important}.gap-md-1{gap:.25rem!important}.gap-md-2{gap:.5rem!important}.gap-md-3{gap:1rem!important}.gap-md-4{gap:1.5rem!important}.gap-md-5{gap:3rem!important}.row-gap-md-0{row-gap:0!important}.row-gap-md-1{row-gap:.25rem!important}.row-gap-md-2{row-gap:.5rem!important}.row-gap-md-3{row-gap:1rem!important}.row-gap-md-4{row-gap:1.5rem!important}.row-gap-md-5{row-gap:3rem!important}.column-gap-md-0{-moz-column-gap:0!important;column-gap:0!important}.column-gap-md-1{-moz-column-gap:0.25rem!important;column-gap:.25rem!important}.column-gap-md-2{-moz-column-gap:0.5rem!important;column-gap:.5rem!important}.column-gap-md-3{-moz-column-gap:1rem!important;column-gap:1rem!important}.column-gap-md-4{-moz-column-gap:1.5rem!important;column-gap:1.5rem!important}.column-gap-md-5{-moz-column-gap:3rem!important;column-gap:3rem!important}.text-md-start{text-align:left!important}.text-md-end{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.float-lg-start{float:left!important}.float-lg-end{float:right!important}.float-lg-none{float:none!important}.object-fit-lg-contain{-o-object-fit:contain!important;object-fit:contain!important}.object-fit-lg-cover{-o-object-fit:cover!important;object-fit:cover!important}.object-fit-lg-fill{-o-object-fit:fill!important;object-fit:fill!important}.object-fit-lg-scale{-o-object-fit:scale-down!important;object-fit:scale-down!important}.object-fit-lg-none{-o-object-fit:none!important;object-fit:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-grid{display:grid!important}.d-lg-inline-grid{display:inline-grid!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}.d-lg-none{display:none!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.justify-content-lg-evenly{justify-content:space-evenly!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}.order-lg-first{order:-1!important}.order-lg-0{order:0!important}.order-lg-1{order:1!important}.order-lg-2{order:2!important}.order-lg-3{order:3!important}.order-lg-4{order:4!important}.order-lg-5{order:5!important}.order-lg-last{order:6!important}.m-lg-0{margin:0!important}.m-lg-1{margin:.25rem!important}.m-lg-2{margin:.5rem!important}.m-lg-3{margin:1rem!important}.m-lg-4{margin:1.5rem!important}.m-lg-5{margin:3rem!important}.m-lg-auto{margin:auto!important}.mx-lg-0{margin-right:0!important;margin-left:0!important}.mx-lg-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-lg-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-lg-3{margin-right:1rem!important;margin-left:1rem!important}.mx-lg-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-lg-5{margin-right:3rem!important;margin-left:3rem!important}.mx-lg-auto{margin-right:auto!important;margin-left:auto!important}.my-lg-0{margin-top:0!important;margin-bottom:0!important}.my-lg-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-lg-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-lg-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-lg-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-lg-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-lg-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-lg-0{margin-top:0!important}.mt-lg-1{margin-top:.25rem!important}.mt-lg-2{margin-top:.5rem!important}.mt-lg-3{margin-top:1rem!important}.mt-lg-4{margin-top:1.5rem!important}.mt-lg-5{margin-top:3rem!important}.mt-lg-auto{margin-top:auto!important}.me-lg-0{margin-right:0!important}.me-lg-1{margin-right:.25rem!important}.me-lg-2{margin-right:.5rem!important}.me-lg-3{margin-right:1rem!important}.me-lg-4{margin-right:1.5rem!important}.me-lg-5{margin-right:3rem!important}.me-lg-auto{margin-right:auto!important}.mb-lg-0{margin-bottom:0!important}.mb-lg-1{margin-bottom:.25rem!important}.mb-lg-2{margin-bottom:.5rem!important}.mb-lg-3{margin-bottom:1rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.mb-lg-5{margin-bottom:3rem!important}.mb-lg-auto{margin-bottom:auto!important}.ms-lg-0{margin-left:0!important}.ms-lg-1{margin-left:.25rem!important}.ms-lg-2{margin-left:.5rem!important}.ms-lg-3{margin-left:1rem!important}.ms-lg-4{margin-left:1.5rem!important}.ms-lg-5{margin-left:3rem!important}.ms-lg-auto{margin-left:auto!important}.p-lg-0{padding:0!important}.p-lg-1{padding:.25rem!important}.p-lg-2{padding:.5rem!important}.p-lg-3{padding:1rem!important}.p-lg-4{padding:1.5rem!important}.p-lg-5{padding:3rem!important}.px-lg-0{padding-right:0!important;padding-left:0!important}.px-lg-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-lg-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-lg-3{padding-right:1rem!important;padding-left:1rem!important}.px-lg-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-lg-5{padding-right:3rem!important;padding-left:3rem!important}.py-lg-0{padding-top:0!important;padding-bottom:0!important}.py-lg-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-lg-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-lg-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-lg-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-lg-0{padding-top:0!important}.pt-lg-1{padding-top:.25rem!important}.pt-lg-2{padding-top:.5rem!important}.pt-lg-3{padding-top:1rem!important}.pt-lg-4{padding-top:1.5rem!important}.pt-lg-5{padding-top:3rem!important}.pe-lg-0{padding-right:0!important}.pe-lg-1{padding-right:.25rem!important}.pe-lg-2{padding-right:.5rem!important}.pe-lg-3{padding-right:1rem!important}.pe-lg-4{padding-right:1.5rem!important}.pe-lg-5{padding-right:3rem!important}.pb-lg-0{padding-bottom:0!important}.pb-lg-1{padding-bottom:.25rem!important}.pb-lg-2{padding-bottom:.5rem!important}.pb-lg-3{padding-bottom:1rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pb-lg-5{padding-bottom:3rem!important}.ps-lg-0{padding-left:0!important}.ps-lg-1{padding-left:.25rem!important}.ps-lg-2{padding-left:.5rem!important}.ps-lg-3{padding-left:1rem!important}.ps-lg-4{padding-left:1.5rem!important}.ps-lg-5{padding-left:3rem!important}.gap-lg-0{gap:0!important}.gap-lg-1{gap:.25rem!important}.gap-lg-2{gap:.5rem!important}.gap-lg-3{gap:1rem!important}.gap-lg-4{gap:1.5rem!important}.gap-lg-5{gap:3rem!important}.row-gap-lg-0{row-gap:0!important}.row-gap-lg-1{row-gap:.25rem!important}.row-gap-lg-2{row-gap:.5rem!important}.row-gap-lg-3{row-gap:1rem!important}.row-gap-lg-4{row-gap:1.5rem!important}.row-gap-lg-5{row-gap:3rem!important}.column-gap-lg-0{-moz-column-gap:0!important;column-gap:0!important}.column-gap-lg-1{-moz-column-gap:0.25rem!important;column-gap:.25rem!important}.column-gap-lg-2{-moz-column-gap:0.5rem!important;column-gap:.5rem!important}.column-gap-lg-3{-moz-column-gap:1rem!important;column-gap:1rem!important}.column-gap-lg-4{-moz-column-gap:1.5rem!important;column-gap:1.5rem!important}.column-gap-lg-5{-moz-column-gap:3rem!important;column-gap:3rem!important}.text-lg-start{text-align:left!important}.text-lg-end{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.float-xl-start{float:left!important}.float-xl-end{float:right!important}.float-xl-none{float:none!important}.object-fit-xl-contain{-o-object-fit:contain!important;object-fit:contain!important}.object-fit-xl-cover{-o-object-fit:cover!important;object-fit:cover!important}.object-fit-xl-fill{-o-object-fit:fill!important;object-fit:fill!important}.object-fit-xl-scale{-o-object-fit:scale-down!important;object-fit:scale-down!important}.object-fit-xl-none{-o-object-fit:none!important;object-fit:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-grid{display:grid!important}.d-xl-inline-grid{display:inline-grid!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}.d-xl-none{display:none!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.justify-content-xl-evenly{justify-content:space-evenly!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}.order-xl-first{order:-1!important}.order-xl-0{order:0!important}.order-xl-1{order:1!important}.order-xl-2{order:2!important}.order-xl-3{order:3!important}.order-xl-4{order:4!important}.order-xl-5{order:5!important}.order-xl-last{order:6!important}.m-xl-0{margin:0!important}.m-xl-1{margin:.25rem!important}.m-xl-2{margin:.5rem!important}.m-xl-3{margin:1rem!important}.m-xl-4{margin:1.5rem!important}.m-xl-5{margin:3rem!important}.m-xl-auto{margin:auto!important}.mx-xl-0{margin-right:0!important;margin-left:0!important}.mx-xl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xl-auto{margin-right:auto!important;margin-left:auto!important}.my-xl-0{margin-top:0!important;margin-bottom:0!important}.my-xl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xl-0{margin-top:0!important}.mt-xl-1{margin-top:.25rem!important}.mt-xl-2{margin-top:.5rem!important}.mt-xl-3{margin-top:1rem!important}.mt-xl-4{margin-top:1.5rem!important}.mt-xl-5{margin-top:3rem!important}.mt-xl-auto{margin-top:auto!important}.me-xl-0{margin-right:0!important}.me-xl-1{margin-right:.25rem!important}.me-xl-2{margin-right:.5rem!important}.me-xl-3{margin-right:1rem!important}.me-xl-4{margin-right:1.5rem!important}.me-xl-5{margin-right:3rem!important}.me-xl-auto{margin-right:auto!important}.mb-xl-0{margin-bottom:0!important}.mb-xl-1{margin-bottom:.25rem!important}.mb-xl-2{margin-bottom:.5rem!important}.mb-xl-3{margin-bottom:1rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.mb-xl-5{margin-bottom:3rem!important}.mb-xl-auto{margin-bottom:auto!important}.ms-xl-0{margin-left:0!important}.ms-xl-1{margin-left:.25rem!important}.ms-xl-2{margin-left:.5rem!important}.ms-xl-3{margin-left:1rem!important}.ms-xl-4{margin-left:1.5rem!important}.ms-xl-5{margin-left:3rem!important}.ms-xl-auto{margin-left:auto!important}.p-xl-0{padding:0!important}.p-xl-1{padding:.25rem!important}.p-xl-2{padding:.5rem!important}.p-xl-3{padding:1rem!important}.p-xl-4{padding:1.5rem!important}.p-xl-5{padding:3rem!important}.px-xl-0{padding-right:0!important;padding-left:0!important}.px-xl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xl-0{padding-top:0!important;padding-bottom:0!important}.py-xl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xl-0{padding-top:0!important}.pt-xl-1{padding-top:.25rem!important}.pt-xl-2{padding-top:.5rem!important}.pt-xl-3{padding-top:1rem!important}.pt-xl-4{padding-top:1.5rem!important}.pt-xl-5{padding-top:3rem!important}.pe-xl-0{padding-right:0!important}.pe-xl-1{padding-right:.25rem!important}.pe-xl-2{padding-right:.5rem!important}.pe-xl-3{padding-right:1rem!important}.pe-xl-4{padding-right:1.5rem!important}.pe-xl-5{padding-right:3rem!important}.pb-xl-0{padding-bottom:0!important}.pb-xl-1{padding-bottom:.25rem!important}.pb-xl-2{padding-bottom:.5rem!important}.pb-xl-3{padding-bottom:1rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pb-xl-5{padding-bottom:3rem!important}.ps-xl-0{padding-left:0!important}.ps-xl-1{padding-left:.25rem!important}.ps-xl-2{padding-left:.5rem!important}.ps-xl-3{padding-left:1rem!important}.ps-xl-4{padding-left:1.5rem!important}.ps-xl-5{padding-left:3rem!important}.gap-xl-0{gap:0!important}.gap-xl-1{gap:.25rem!important}.gap-xl-2{gap:.5rem!important}.gap-xl-3{gap:1rem!important}.gap-xl-4{gap:1.5rem!important}.gap-xl-5{gap:3rem!important}.row-gap-xl-0{row-gap:0!important}.row-gap-xl-1{row-gap:.25rem!important}.row-gap-xl-2{row-gap:.5rem!important}.row-gap-xl-3{row-gap:1rem!important}.row-gap-xl-4{row-gap:1.5rem!important}.row-gap-xl-5{row-gap:3rem!important}.column-gap-xl-0{-moz-column-gap:0!important;column-gap:0!important}.column-gap-xl-1{-moz-column-gap:0.25rem!important;column-gap:.25rem!important}.column-gap-xl-2{-moz-column-gap:0.5rem!important;column-gap:.5rem!important}.column-gap-xl-3{-moz-column-gap:1rem!important;column-gap:1rem!important}.column-gap-xl-4{-moz-column-gap:1.5rem!important;column-gap:1.5rem!important}.column-gap-xl-5{-moz-column-gap:3rem!important;column-gap:3rem!important}.text-xl-start{text-align:left!important}.text-xl-end{text-align:right!important}.text-xl-center{text-align:center!important}}@media (min-width:1400px){.float-xxl-start{float:left!important}.float-xxl-end{float:right!important}.float-xxl-none{float:none!important}.object-fit-xxl-contain{-o-object-fit:contain!important;object-fit:contain!important}.object-fit-xxl-cover{-o-object-fit:cover!important;object-fit:cover!important}.object-fit-xxl-fill{-o-object-fit:fill!important;object-fit:fill!important}.object-fit-xxl-scale{-o-object-fit:scale-down!important;object-fit:scale-down!important}.object-fit-xxl-none{-o-object-fit:none!important;object-fit:none!important}.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-grid{display:grid!important}.d-xxl-inline-grid{display:inline-grid!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}.d-xxl-none{display:none!important}.flex-xxl-fill{flex:1 1 auto!important}.flex-xxl-row{flex-direction:row!important}.flex-xxl-column{flex-direction:column!important}.flex-xxl-row-reverse{flex-direction:row-reverse!important}.flex-xxl-column-reverse{flex-direction:column-reverse!important}.flex-xxl-grow-0{flex-grow:0!important}.flex-xxl-grow-1{flex-grow:1!important}.flex-xxl-shrink-0{flex-shrink:0!important}.flex-xxl-shrink-1{flex-shrink:1!important}.flex-xxl-wrap{flex-wrap:wrap!important}.flex-xxl-nowrap{flex-wrap:nowrap!important}.flex-xxl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xxl-start{justify-content:flex-start!important}.justify-content-xxl-end{justify-content:flex-end!important}.justify-content-xxl-center{justify-content:center!important}.justify-content-xxl-between{justify-content:space-between!important}.justify-content-xxl-around{justify-content:space-around!important}.justify-content-xxl-evenly{justify-content:space-evenly!important}.align-items-xxl-start{align-items:flex-start!important}.align-items-xxl-end{align-items:flex-end!important}.align-items-xxl-center{align-items:center!important}.align-items-xxl-baseline{align-items:baseline!important}.align-items-xxl-stretch{align-items:stretch!important}.align-content-xxl-start{align-content:flex-start!important}.align-content-xxl-end{align-content:flex-end!important}.align-content-xxl-center{align-content:center!important}.align-content-xxl-between{align-content:space-between!important}.align-content-xxl-around{align-content:space-around!important}.align-content-xxl-stretch{align-content:stretch!important}.align-self-xxl-auto{align-self:auto!important}.align-self-xxl-start{align-self:flex-start!important}.align-self-xxl-end{align-self:flex-end!important}.align-self-xxl-center{align-self:center!important}.align-self-xxl-baseline{align-self:baseline!important}.align-self-xxl-stretch{align-self:stretch!important}.order-xxl-first{order:-1!important}.order-xxl-0{order:0!important}.order-xxl-1{order:1!important}.order-xxl-2{order:2!important}.order-xxl-3{order:3!important}.order-xxl-4{order:4!important}.order-xxl-5{order:5!important}.order-xxl-last{order:6!important}.m-xxl-0{margin:0!important}.m-xxl-1{margin:.25rem!important}.m-xxl-2{margin:.5rem!important}.m-xxl-3{margin:1rem!important}.m-xxl-4{margin:1.5rem!important}.m-xxl-5{margin:3rem!important}.m-xxl-auto{margin:auto!important}.mx-xxl-0{margin-right:0!important;margin-left:0!important}.mx-xxl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xxl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xxl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xxl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xxl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xxl-auto{margin-right:auto!important;margin-left:auto!important}.my-xxl-0{margin-top:0!important;margin-bottom:0!important}.my-xxl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xxl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xxl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xxl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xxl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xxl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xxl-0{margin-top:0!important}.mt-xxl-1{margin-top:.25rem!important}.mt-xxl-2{margin-top:.5rem!important}.mt-xxl-3{margin-top:1rem!important}.mt-xxl-4{margin-top:1.5rem!important}.mt-xxl-5{margin-top:3rem!important}.mt-xxl-auto{margin-top:auto!important}.me-xxl-0{margin-right:0!important}.me-xxl-1{margin-right:.25rem!important}.me-xxl-2{margin-right:.5rem!important}.me-xxl-3{margin-right:1rem!important}.me-xxl-4{margin-right:1.5rem!important}.me-xxl-5{margin-right:3rem!important}.me-xxl-auto{margin-right:auto!important}.mb-xxl-0{margin-bottom:0!important}.mb-xxl-1{margin-bottom:.25rem!important}.mb-xxl-2{margin-bottom:.5rem!important}.mb-xxl-3{margin-bottom:1rem!important}.mb-xxl-4{margin-bottom:1.5rem!important}.mb-xxl-5{margin-bottom:3rem!important}.mb-xxl-auto{margin-bottom:auto!important}.ms-xxl-0{margin-left:0!important}.ms-xxl-1{margin-left:.25rem!important}.ms-xxl-2{margin-left:.5rem!important}.ms-xxl-3{margin-left:1rem!important}.ms-xxl-4{margin-left:1.5rem!important}.ms-xxl-5{margin-left:3rem!important}.ms-xxl-auto{margin-left:auto!important}.p-xxl-0{padding:0!important}.p-xxl-1{padding:.25rem!important}.p-xxl-2{padding:.5rem!important}.p-xxl-3{padding:1rem!important}.p-xxl-4{padding:1.5rem!important}.p-xxl-5{padding:3rem!important}.px-xxl-0{padding-right:0!important;padding-left:0!important}.px-xxl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xxl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xxl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xxl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xxl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xxl-0{padding-top:0!important;padding-bottom:0!important}.py-xxl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xxl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xxl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xxl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xxl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xxl-0{padding-top:0!important}.pt-xxl-1{padding-top:.25rem!important}.pt-xxl-2{padding-top:.5rem!important}.pt-xxl-3{padding-top:1rem!important}.pt-xxl-4{padding-top:1.5rem!important}.pt-xxl-5{padding-top:3rem!important}.pe-xxl-0{padding-right:0!important}.pe-xxl-1{padding-right:.25rem!important}.pe-xxl-2{padding-right:.5rem!important}.pe-xxl-3{padding-right:1rem!important}.pe-xxl-4{padding-right:1.5rem!important}.pe-xxl-5{padding-right:3rem!important}.pb-xxl-0{padding-bottom:0!important}.pb-xxl-1{padding-bottom:.25rem!important}.pb-xxl-2{padding-bottom:.5rem!important}.pb-xxl-3{padding-bottom:1rem!important}.pb-xxl-4{padding-bottom:1.5rem!important}.pb-xxl-5{padding-bottom:3rem!important}.ps-xxl-0{padding-left:0!important}.ps-xxl-1{padding-left:.25rem!important}.ps-xxl-2{padding-left:.5rem!important}.ps-xxl-3{padding-left:1rem!important}.ps-xxl-4{padding-left:1.5rem!important}.ps-xxl-5{padding-left:3rem!important}.gap-xxl-0{gap:0!important}.gap-xxl-1{gap:.25rem!important}.gap-xxl-2{gap:.5rem!important}.gap-xxl-3{gap:1rem!important}.gap-xxl-4{gap:1.5rem!important}.gap-xxl-5{gap:3rem!important}.row-gap-xxl-0{row-gap:0!important}.row-gap-xxl-1{row-gap:.25rem!important}.row-gap-xxl-2{row-gap:.5rem!important}.row-gap-xxl-3{row-gap:1rem!important}.row-gap-xxl-4{row-gap:1.5rem!important}.row-gap-xxl-5{row-gap:3rem!important}.column-gap-xxl-0{-moz-column-gap:0!important;column-gap:0!important}.column-gap-xxl-1{-moz-column-gap:0.25rem!important;column-gap:.25rem!important}.column-gap-xxl-2{-moz-column-gap:0.5rem!important;column-gap:.5rem!important}.column-gap-xxl-3{-moz-column-gap:1rem!important;column-gap:1rem!important}.column-gap-xxl-4{-moz-column-gap:1.5rem!important;column-gap:1.5rem!important}.column-gap-xxl-5{-moz-column-gap:3rem!important;column-gap:3rem!important}.text-xxl-start{text-align:left!important}.text-xxl-end{text-align:right!important}.text-xxl-center{text-align:center!important}}@media (min-width:1200px){.fs-1{font-size:2.5rem!important}.fs-2{font-size:2rem!important}.fs-3{font-size:1.75rem!important}.fs-4{font-size:1.5rem!important}}@media print{.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-grid{display:grid!important}.d-print-inline-grid{display:inline-grid!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}.d-print-none{display:none!important}}\n/*# sourceMappingURL=bootstrap.min.css.map */","/*\n * Theme tokens.\n *\n * There are two layers:\n *\n * - `--wg-theme-*` are the base tokens. Their defaults are declared on :root\n * only. Custom properties inherit through shadow roots, so a page can\n * override a base token once, on :root or on any ancestor, and every\n * component below it follows, including components nested inside other\n * components. Don't declare them on :host.\n *\n * - `--wg-*` are the aliases the components use. They are declared on :host\n * so that each component resolves them against the base tokens it\n * inherited. Every alias falls back to the default value, so components\n * also work on a page that doesn't load this file.\n */\n:root {\n /* ---------------------------------------------------------------------\n * Core palette (legacy + runtime wallet-picker variables)\n * ------------------------------------------------------------------ */\n --wg-theme-background-color: #ffffff;\n --wg-theme-text-color: #1a1a1a;\n --wg-theme-text-rgb: 26, 26, 26;\n --wg-theme-text-secondary: #6b7280;\n --wg-theme-font-family:\n -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n\n --wg-theme-border-color: #e5e7eb;\n --wg-theme-surface-color: #ffffff;\n --wg-theme-surface-hover: #ede9fe;\n\n --wg-theme-primary-color: #000000;\n --wg-theme-primary-hover: #363636;\n --wg-theme-primary-text-color: #ffffff;\n --wg-theme-primary-rgb: 128, 222, 234;\n\n --wg-theme-accent-color: #7c3aed;\n --wg-theme-accent-hover: #6d28d9;\n --wg-theme-accent-rgb: 124, 58, 237;\n --wg-theme-success-color: #077e3b;\n --wg-theme-success-rgb: 7, 126, 59;\n\n --wg-theme-error-color: #ef4444;\n --wg-theme-error-rgb: 239, 68, 68;\n\n --wg-theme-icon-bg: rgba(0, 0, 0, 0.04);\n --wg-theme-badge-bg: rgba(0, 0, 0, 0.06);\n /* The colour of faint tints and borders, as `r, g, b` for rgba() */\n --wg-theme-shade-rgb: 15, 23, 42;\n\n /* ---------------------------------------------------------------------\n * Typography\n * ------------------------------------------------------------------ */\n --wg-theme-font-size-xs: 0.75rem;\n --wg-theme-font-size-sm: 0.875rem;\n --wg-theme-font-size-base: 1rem;\n --wg-theme-font-size-lg: 1.125rem;\n --wg-theme-font-size-xl: 1.25rem;\n --wg-theme-font-size-2xl: 1.5rem;\n\n --wg-theme-font-weight-normal: 400;\n --wg-theme-font-weight-medium: 500;\n --wg-theme-font-weight-semibold: 600;\n --wg-theme-font-weight-bold: 700;\n\n --wg-theme-line-height-tight: 1.2;\n --wg-theme-line-height-normal: 1.5;\n --wg-theme-line-height-relaxed: 1.7;\n\n /* ---------------------------------------------------------------------\n * Spacing scale\n * ------------------------------------------------------------------ */\n --wg-theme-space-0: 0;\n --wg-theme-space-1: 0.25rem;\n --wg-theme-space-2: 0.5rem;\n --wg-theme-space-3: 0.75rem;\n --wg-theme-space-4: 1rem;\n --wg-theme-space-5: 1.25rem;\n --wg-theme-space-6: 1.5rem;\n --wg-theme-space-8: 2rem;\n --wg-theme-space-10: 2.5rem;\n --wg-theme-space-12: 3rem;\n\n /* ---------------------------------------------------------------------\n * Radii\n * ------------------------------------------------------------------ */\n --wg-theme-radius-sm: 0.375rem;\n --wg-theme-radius-md: 0.5rem;\n --wg-theme-radius-lg: 0.75rem;\n --wg-theme-radius-xl: 1rem;\n --wg-theme-radius-full: 9999px;\n\n /* ---------------------------------------------------------------------\n * Shadows\n * ------------------------------------------------------------------ */\n --wg-theme-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);\n --wg-theme-shadow-md: 0 6px 18px rgba(15, 23, 42, 0.08);\n --wg-theme-shadow-lg: 0 14px 28px rgba(15, 23, 42, 0.12);\n --wg-theme-shadow-inset: inset 0 1px 2px rgba(15, 23, 42, 0.08);\n\n /* ---------------------------------------------------------------------\n * Form controls\n *\n * --wg-theme-label-color, --wg-theme-input-text and\n * --wg-theme-input-border-focus have no default here. They follow the\n * accent and text colours (see the aliases below) until a page sets them.\n * ------------------------------------------------------------------ */\n --wg-theme-label-required-color: #dc2626;\n --wg-theme-input-bg: #f3f4f6;\n --wg-theme-input-border: #d1d5db;\n --wg-theme-input-placeholder: #9ca3af;\n}\n\n:root,\n:host {\n /* ---------------------------------------------------------------------\n * Canonical --wg-* aliases (for gateway app usage)\n * ------------------------------------------------------------------ */\n --wg-bg: var(--wg-theme-background-color, #ffffff);\n --wg-text: var(--wg-theme-text-color, #1a1a1a);\n --wg-text-rgb: var(--wg-theme-text-rgb, 26, 26, 26);\n --wg-text-secondary: var(--wg-theme-text-secondary, #6b7280);\n --wg-font-family: var(\n --wg-theme-font-family,\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n sans-serif\n );\n\n --wg-border: var(--wg-theme-border-color, #e5e7eb);\n --wg-surface: var(--wg-theme-surface-color, #ffffff);\n --wg-surface-hover: var(--wg-theme-surface-hover, #ede9fe);\n\n --wg-primary: var(--wg-theme-primary-color, #000000);\n --wg-primary-hover: var(--wg-theme-primary-hover, #363636);\n --wg-primary-text: var(--wg-theme-primary-text-color, #ffffff);\n --wg-primary-rgb: var(--wg-theme-primary-rgb, 128, 222, 234);\n --wg-accent: var(--wg-theme-accent-color, #7c3aed);\n --wg-accent-hover: var(--wg-theme-accent-hover, #6d28d9);\n --wg-accent-rgb: var(--wg-theme-accent-rgb, 124, 58, 237);\n --wg-success: var(--wg-theme-success-color, #077e3b);\n --wg-success-rgb: var(--wg-theme-success-rgb, 7, 126, 59);\n\n --wg-error: var(--wg-theme-error-color, #ef4444);\n --wg-error-rgb: var(--wg-theme-error-rgb, 239, 68, 68);\n\n --wg-icon-bg: var(--wg-theme-icon-bg, rgba(0, 0, 0, 0.04));\n --wg-badge-bg: var(--wg-theme-badge-bg, rgba(0, 0, 0, 0.06));\n --wg-shade-rgb: var(--wg-theme-shade-rgb, 15, 23, 42);\n\n --wg-font-size-xs: var(--wg-theme-font-size-xs, 0.75rem);\n --wg-font-size-sm: var(--wg-theme-font-size-sm, 0.875rem);\n --wg-font-size-base: var(--wg-theme-font-size-base, 1rem);\n --wg-font-size-lg: var(--wg-theme-font-size-lg, 1.125rem);\n --wg-font-size-xl: var(--wg-theme-font-size-xl, 1.25rem);\n --wg-font-size-2xl: var(--wg-theme-font-size-2xl, 1.5rem);\n\n --wg-font-weight-normal: var(--wg-theme-font-weight-normal, 400);\n --wg-font-weight-medium: var(--wg-theme-font-weight-medium, 500);\n --wg-font-weight-semibold: var(--wg-theme-font-weight-semibold, 600);\n --wg-font-weight-bold: var(--wg-theme-font-weight-bold, 700);\n\n --wg-line-height-tight: var(--wg-theme-line-height-tight, 1.2);\n --wg-line-height-normal: var(--wg-theme-line-height-normal, 1.5);\n --wg-line-height-relaxed: var(--wg-theme-line-height-relaxed, 1.7);\n\n --wg-space-0: var(--wg-theme-space-0, 0);\n --wg-space-1: var(--wg-theme-space-1, 0.25rem);\n --wg-space-2: var(--wg-theme-space-2, 0.5rem);\n --wg-space-3: var(--wg-theme-space-3, 0.75rem);\n --wg-space-4: var(--wg-theme-space-4, 1rem);\n --wg-space-5: var(--wg-theme-space-5, 1.25rem);\n --wg-space-6: var(--wg-theme-space-6, 1.5rem);\n --wg-space-8: var(--wg-theme-space-8, 2rem);\n --wg-space-10: var(--wg-theme-space-10, 2.5rem);\n --wg-space-12: var(--wg-theme-space-12, 3rem);\n\n --wg-radius-sm: var(--wg-theme-radius-sm, 0.375rem);\n --wg-radius-md: var(--wg-theme-radius-md, 0.5rem);\n --wg-radius-lg: var(--wg-theme-radius-lg, 0.75rem);\n --wg-radius-xl: var(--wg-theme-radius-xl, 1rem);\n --wg-radius-full: var(--wg-theme-radius-full, 9999px);\n\n --wg-shadow-sm: var(--wg-theme-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));\n --wg-shadow-md: var(\n --wg-theme-shadow-md,\n 0 6px 18px rgba(15, 23, 42, 0.08)\n );\n --wg-shadow-lg: var(\n --wg-theme-shadow-lg,\n 0 14px 28px rgba(15, 23, 42, 0.12)\n );\n --wg-shadow-inset: var(\n --wg-theme-shadow-inset,\n inset 0 1px 2px rgba(15, 23, 42, 0.08)\n );\n\n --wg-label-color: var(\n --wg-theme-label-color,\n var(--wg-theme-accent-color, #7c3aed)\n );\n --wg-label-required-color: var(--wg-theme-label-required-color, #dc2626);\n --wg-input-bg: var(--wg-theme-input-bg, #f3f4f6);\n --wg-input-text: var(\n --wg-theme-input-text,\n var(--wg-theme-text-color, #1a1a1a)\n );\n --wg-input-border: var(--wg-theme-input-border, #d1d5db);\n --wg-input-border-focus: var(\n --wg-theme-input-border-focus,\n var(--wg-theme-accent-color, #7c3aed)\n );\n --wg-input-placeholder: var(--wg-theme-input-placeholder, #9ca3af);\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { css, type CSSResultGroup } from 'lit'\n\n/**\n * General styles that affect the whole window\n */\nconst root = css`\n .container {\n padding: 20px;\n }\n`\n\nexport default [root] as CSSResultGroup\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { css, type CSSResultGroup, LitElement, unsafeCSS } from 'lit'\n\nimport 'bootstrap/dist/css/bootstrap.min.css'\nimport '../../themes/default.css'\n\nimport bootstrapCss from 'bootstrap/dist/css/bootstrap.min.css?inline'\nimport defaultTheme from '../../themes/default.css?inline'\nimport mainStyles from '../styles/index.js'\n\n/**\n * Use this element as the base class for all custom elements to ensure consistent theming\n */\nexport class BaseElement extends LitElement {\n static styles = [\n mainStyles,\n css`\n ${unsafeCSS(bootstrapCss.replaceAll(/:root/g, ':root,:host'))}\n ${unsafeCSS(defaultTheme)}\n\n :host {\n --bs-body-font-family: var(--wg-font-family);\n --bs-body-font-size: var(--wg-font-size-base);\n --bs-body-font-weight: var(--wg-font-weight-normal);\n --bs-body-line-height: var(--wg-line-height-normal);\n --bs-body-color: var(--wg-text);\n --bs-body-color-rgb: var(--wg-text-rgb);\n --bs-body-bg: var(--wg-bg);\n\n --bs-border-color: var(--wg-border);\n --bs-border-radius: var(--wg-radius-md);\n\n --bs-primary: var(--wg-primary);\n --bs-primary-rgb: var(--wg-primary-rgb);\n --bs-secondary-color: var(--wg-text-secondary);\n --bs-success: var(--wg-success);\n --bs-success-rgb: var(--wg-success-rgb);\n --bs-danger: var(--wg-error);\n --bs-danger-rgb: var(--wg-error-rgb);\n\n --bs-link-color: var(--wg-accent);\n --bs-link-hover-color: var(--wg-accent-hover);\n\n margin: 0;\n font-family: var(--bs-body-font-family);\n font-size: var(--bs-body-font-size);\n font-weight: var(--bs-body-font-weight);\n line-height: var(--bs-body-line-height);\n color: var(--bs-body-color);\n text-align: var(--bs-body-text-align);\n background-color: var(--bs-body-bg);\n -webkit-text-size-adjust: 100%;\n -webkit-tap-highlight-color: transparent;\n }\n\n .btn-primary {\n --bs-btn-color: var(--wg-primary-text);\n --bs-btn-bg: var(--wg-primary);\n --bs-btn-border-color: var(--wg-primary);\n --bs-btn-hover-color: var(--wg-primary-text);\n --bs-btn-hover-bg: var(--wg-primary-hover);\n --bs-btn-hover-border-color: var(--wg-primary-hover);\n --bs-btn-active-color: var(--wg-primary-text);\n --bs-btn-active-bg: var(--wg-primary-hover);\n --bs-btn-active-border-color: var(--wg-primary-hover);\n --bs-btn-disabled-color: var(--wg-primary-text);\n --bs-btn-disabled-bg: var(--wg-primary);\n --bs-btn-disabled-border-color: var(--wg-primary);\n }\n\n .wg-activity-status-success {\n background-color: rgba(var(--wg-success-rgb), 0.14);\n color: var(--wg-success);\n }\n `,\n ] as CSSResultGroup\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { css } from 'lit'\n\n// TODO: consider creating a common Card.ts web component\nexport const cardStyles = css`\n .wg-card {\n background: var(--wg-surface);\n border: 1px solid var(--wg-border);\n border-radius: var(--wg-radius-lg);\n box-shadow: var(--wg-shadow-sm);\n display: flex;\n flex-direction: column;\n gap: var(--wg-space-2);\n min-width: 0;\n transition:\n box-shadow 0.2s ease,\n border-color 0.2s ease,\n transform 0.2s ease;\n }\n\n .wg-card:hover {\n border-color: var(--wg-accent);\n box-shadow: var(--wg-shadow-md);\n }\n\n .network-card {\n background: var(--wg-surface);\n border: none;\n border-radius: 8px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n min-width: 0;\n }\n\n .network-meta {\n color: var(--wg-text-secondary);\n margin-bottom: 0.5rem;\n word-break: break-all;\n }\n\n .network-desc {\n color: var(--wg-text-secondary);\n margin-bottom: 0.5rem;\n word-break: break-all;\n }\n`\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\ntype DateTimeValue = string | number | Date | null | undefined\n\nconst pad = (value: number) => String(value).padStart(2, '0')\n\n/**\n * Formats a timestamp in the viewer's time zone and locale with two-digit\n * fields and its UTC offset, e.g. \"06/01/2025, 02:34 PM GMT+2\" in en-US or\n * \"01.06.2025, 14:34 GMT+2\" in de-CH. Returns \"N/A\" for a missing value and\n * an unparsable string as is.\n */\nexport function formatDateTime(\n value: DateTimeValue,\n { seconds = false }: { seconds?: boolean } = {}\n): string {\n if (value === null || value === undefined || value === '') {\n return 'N/A'\n }\n\n const date = new Date(value)\n if (Number.isNaN(date.getTime())) {\n return String(value)\n }\n\n return new Intl.DateTimeFormat(undefined, {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n ...(seconds && { second: '2-digit' }),\n timeZoneName: 'shortOffset',\n }).format(date)\n}\n\n/** The exact time in UTC with seconds, e.g. \"2025-06-01 12:34:56 UTC\", for tooltips */\nexport function formatUtcDateTime(value: DateTimeValue): string | undefined {\n if (value === null || value === undefined || value === '') {\n return undefined\n }\n\n const date = new Date(value)\n if (Number.isNaN(date.getTime())) {\n return String(value)\n }\n\n const day = `${date.getUTCFullYear()}-${pad(date.getUTCMonth() + 1)}-${pad(date.getUTCDate())}`\n const time = `${pad(date.getUTCHours())}:${pad(date.getUTCMinutes())}:${pad(date.getUTCSeconds())}`\n return `${day} ${time} UTC`\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { customElement, property } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { BaseElement } from '../internal/base-element'\nimport { css, html } from 'lit'\nimport type { ApiKey } from '@canton-network/core-wallet-user-rpc-client'\nimport { cardStyles } from '../styles/card'\nimport { formatDateTime, formatUtcDateTime } from '../date-time'\n\n/** Emitted when the user clicks the \"Revoke\" button on a api key card */\nexport class ApiKeyCardRevokeEvent extends Event {\n constructor(public apiKey: ApiKey) {\n super('revoke', { bubbles: true, composed: true })\n }\n}\n\nexport\n@customElement('api-key-card')\nclass ApiKeyCard extends BaseElement {\n @property({ type: Object }) accessor apiKey: ApiKey | null = null\n\n static styles = [\n BaseElement.styles,\n cardStyles,\n css`\n :host {\n display: block;\n }\n\n .ak-card {\n padding: var(--wg-space-3);\n cursor: pointer;\n gap: var(--wg-space-3);\n transition:\n border-color 0.2s ease,\n box-shadow 0.2s ease;\n }\n\n .ak-card:hover {\n border-color: var(--wg-accent);\n box-shadow: var(--wg-shadow-md);\n }\n\n .card-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--wg-space-2);\n }\n\n .card-title {\n margin: 0;\n font-size: var(--wg-font-size-base);\n font-weight: var(--wg-font-weight-bold);\n color: var(--wg-text);\n }\n\n .badge-connected {\n display: inline-flex;\n align-items: center;\n border-radius: var(--wg-radius-full);\n padding: 0.15rem 0.55rem;\n font-size: var(--wg-font-size-xs);\n font-weight: var(--wg-font-weight-semibold);\n letter-spacing: 0.04em;\n background: rgba(var(--wg-success-rgb), 0.14);\n color: var(--wg-success);\n }\n\n .meta {\n display: grid;\n gap: var(--wg-space-2);\n }\n\n .meta-row {\n display: grid;\n grid-template-columns:\n minmax(5.5rem, 6rem) minmax(0, 1fr)\n 1.75rem;\n align-items: center;\n column-gap: 0.625rem;\n min-height: 1.75rem;\n min-width: 0;\n }\n\n .meta-row--copy {\n grid-template-columns:\n minmax(5.5rem, 6rem) minmax(0, 1fr)\n 1.75rem;\n }\n\n .meta-row wg-copy-button {\n justify-self: end;\n align-self: center;\n }\n\n .meta-title {\n margin: 0;\n color: var(--wg-text-secondary);\n font-size: var(--wg-font-size-xs);\n font-weight: var(--wg-font-weight-semibold);\n line-height: 1.3;\n white-space: nowrap;\n }\n\n .meta-value {\n margin: 0;\n color: var(--wg-text);\n font-size: var(--wg-font-size-sm);\n min-width: 0;\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 1.35;\n text-align: right;\n white-space: nowrap;\n }\n\n .meta-value-muted {\n color: var(--wg-text-secondary);\n }\n `,\n ]\n\n render() {\n if (!this.apiKey) {\n return html`<article class=\"wg-card ak-card\">\n No API key supplied\n </article>`\n }\n\n return html`\n <article class=\"wg-card ak-card\">\n <div class=\"card-header\">\n <p class=\"card-title\">${this.apiKey.name}</p>\n <button\n class=\"btn btn-danger btn-sm\"\n @click=${() =>\n this.dispatchEvent(\n new ApiKeyCardRevokeEvent(this.apiKey!)\n )}\n >\n Revoke\n </button>\n </div>\n\n <div class=\"meta\">\n <div class=\"meta-row\">\n <p class=\"meta-title\">ID</p>\n <p class=\"meta-value\">${this.apiKey.id}</p>\n </div>\n\n <div class=\"meta-row\">\n <p class=\"meta-title\">Created At</p>\n <p\n class=\"meta-value\"\n title=${ifDefined(formatUtcDateTime(this.apiKey.createdAt))}\n >\n ${formatDateTime(this.apiKey.createdAt)}\n </p>\n </div>\n </div>\n </article>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { css, html, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { BaseElement } from '../internal/base-element'\nimport type { GenerateApiKeyParams } from '@canton-network/core-wallet-user-rpc-client'\n\n/**\n * Emitted when the user clicks the Generate button on the form\n */\nexport class ApiKeyGenerateEvent extends Event {\n constructor(public apiKeyParams: GenerateApiKeyParams) {\n super('api-key-generate', { bubbles: true, composed: true })\n }\n}\n\nexport\n@customElement('api-key-form')\nclass ApiKeyForm extends BaseElement {\n @property({ type: Object })\n accessor apiKeyParams: GenerateApiKeyParams = {\n name: '',\n }\n\n @state() private accessor _error = ''\n\n static styles = [\n BaseElement.styles,\n css`\n :host {\n display: block;\n }\n\n .form-fields {\n gap: var(--wg-space-4);\n }\n\n .field-group {\n gap: var(--wg-space-2);\n }\n\n .field-label {\n font-size: var(--wg-font-size-sm);\n font-weight: var(--wg-font-weight-medium);\n color: var(--wg-text-secondary);\n line-height: var(--wg-line-height-tight);\n }\n\n .required {\n color: var(--wg-label-required-color);\n }\n\n .field-help {\n font-size: var(--wg-font-size-xs);\n color: var(--wg-text-secondary);\n margin-top: calc(-1 * var(--wg-space-1));\n }\n\n .field-control {\n width: 100%;\n border: 1px solid var(--wg-input-border);\n border-radius: 4px;\n background: var(--wg-input-bg);\n color: var(--wg-input-text);\n padding: 12px 14px;\n }\n\n .field-control::placeholder {\n color: var(--wg-input-placeholder);\n }\n\n .field-control:focus {\n border-color: var(--wg-input-border-focus);\n box-shadow: 0 0 0 3px rgba(var(--wg-accent-rgb), 0.12);\n }\n\n .select-wrap {\n position: relative;\n }\n\n .select-wrap .field-control {\n padding-right: 40px;\n appearance: none;\n -webkit-appearance: none;\n }\n\n .select-chevron {\n position: absolute;\n top: 50%;\n right: 12px;\n transform: translateY(-50%);\n color: var(--wg-text-secondary);\n pointer-events: none;\n display: inline-flex;\n }\n\n .section-title {\n margin: var(--wg-space-4) 0 var(--wg-space-2);\n font-size: var(--wg-font-size-base);\n font-weight: var(--wg-font-weight-bold);\n color: var(--wg-text);\n }\n\n .delete-section {\n margin-top: var(--wg-space-8);\n padding-top: var(--wg-space-6);\n border-top: 1px solid var(--wg-border);\n }\n\n .delete-title {\n margin: 0 0 var(--wg-space-2);\n font-size: var(--wg-font-size-base);\n font-weight: var(--wg-font-weight-bold);\n color: var(--wg-text);\n }\n\n .delete-desc {\n margin: 0 0 var(--wg-space-4);\n font-size: var(--wg-font-size-sm);\n color: var(--wg-text-secondary);\n }\n\n .btn-delete {\n display: inline-flex;\n align-items: center;\n gap: var(--wg-space-1);\n border: 1px solid var(--wg-error);\n border-radius: var(--wg-radius-full);\n background: transparent;\n color: var(--wg-error);\n font-size: var(--wg-font-size-sm);\n font-weight: var(--wg-font-weight-semibold);\n padding: 0.4rem 1rem;\n cursor: pointer;\n transition:\n background 0.2s ease,\n color 0.2s ease;\n }\n\n .btn-delete:hover {\n background: rgba(var(--wg-error-rgb), 0.08);\n }\n\n .form-error {\n color: var(--wg-error);\n font-size: var(--wg-font-size-sm);\n margin: var(--wg-space-2) 0;\n }\n\n .form-actions {\n display: flex;\n gap: var(--wg-space-3);\n margin-top: var(--wg-space-6);\n }\n\n .form-actions > button {\n flex: 1 1 0;\n min-width: 0;\n min-height: 2.875rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0.7rem 1.5rem;\n font-size: var(--wg-font-size-base);\n font-weight: var(--wg-font-weight-semibold);\n line-height: 1.2;\n }\n\n .btn-cancel {\n border: 1px solid var(--wg-border);\n border-radius: var(--wg-radius-full);\n background: var(--wg-input-bg);\n color: var(--wg-text);\n cursor: pointer;\n transition:\n background 0.2s ease,\n opacity 0.2s ease;\n }\n\n .btn-cancel:hover {\n background: var(--wg-border);\n }\n\n .btn-submit {\n border-width: 1px;\n }\n `,\n ]\n\n handleSubmit(e: Event) {\n e.preventDefault()\n this.dispatchEvent(new ApiKeyGenerateEvent(this.apiKeyParams))\n }\n\n render() {\n return html`\n <form class=\"d-flex flex-column h-100\" @submit=${this.handleSubmit}>\n <div class=\"form-fields d-flex flex-column\">\n <div class=\"field-group d-flex flex-column\">\n <label class=\"form-label field-label mb-0\">\n Name <span class=\"required\">*</span>\n </label>\n <input\n class=\"form-control field-control\"\n type=\"text\"\n required\n .value=${this.apiKeyParams.name ?? ''}\n @change=${(e: Event) => {\n this.apiKeyParams.name = (\n e.target as HTMLInputElement\n ).value\n }}\n />\n </div>\n </div>\n\n ${\n this._error\n ? html`<div class=\"form-error\">${this._error}</div>`\n : nothing\n }\n\n <div class=\"mt-auto pt-3\">\n <button\n class=\"btn btn-primary rounded-pill w-100\"\n type=\"submit\"\n >\n Generate\n </button>\n </div>\n </form>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html } from 'lit'\n\nexport const eyeFillIcon = html`\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n class=\"bi bi-eye-fill\"\n viewBox=\"0 0 16 16\"\n >\n <path d=\"M10.5 8a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0\" />\n <path\n d=\"M0 8s3-5.5 8-5.5S16 8 16 8s-3 5.5-8 5.5S0 8 0 8m8 3.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7\"\n />\n </svg>\n`\n\nexport const eyeSlashIcon = html`\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n class=\"bi bi-eye-slash\"\n viewBox=\"0 0 16 16\"\n >\n <path\n d=\"M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7 7 0 0 0-2.79.588l.77.771A6 6 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755q-.247.248-.517.486z\"\n />\n <path\n d=\"M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829\"\n />\n <path\n d=\"M3.35 5.47q-.27.24-.518.487A13 13 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7 7 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12z\"\n />\n </svg>\n`\n\nexport const infoCircleFillIcon = html`\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n class=\"bi bi-info-circle-fill\"\n viewBox=\"0 0 16 16\"\n >\n <path\n d=\"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2\"\n />\n </svg>\n`\n\nexport const clipboardIcon = html`\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n class=\"bi bi-copy\"\n viewBox=\"0 0 16 16\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z\"\n />\n </svg>\n`\n\nexport const refreshIcon = html`\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n class=\"bi bi-arrow-clockwise\"\n viewBox=\"0 0 16 16\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2z\"\n />\n <path\n d=\"M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466\"\n />\n </svg>\n`\n\nexport const chevronDownIcon = html`\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n class=\"bi bi-chevron-down\"\n viewBox=\"0 0 16 16\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708\"\n />\n </svg>\n`\n\nexport const chevronRightIcon = html`\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n class=\"bi bi-chevron-right\"\n viewBox=\"0 0 16 16\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708\"\n />\n </svg>\n`\n\nexport const chevronLeftIcon = html`\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"10\"\n height=\"10\"\n fill=\"currentColor\"\n class=\"bi bi-chevron-left\"\n viewBox=\"0 0 16 16\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0\"\n />\n </svg>\n`\n\nexport const warningTriangleIcon = html`\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n class=\"bi bi-exclamation-triangle\"\n viewBox=\"0 0 16 16\"\n >\n <path\n d=\"M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016.15.15 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.2.2 0 0 1-.054.06.1.1 0 0 1-.066.017H1.146a.1.1 0 0 1-.066-.017.2.2 0 0 1-.054-.06.18.18 0 0 1 .002-.183L7.884 2.073a.15.15 0 0 1 .054-.057m1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767z\"\n />\n <path\n d=\"M7.002 12a1 1 0 1 1 2 0 1 1 0 0 1-2 0M7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0z\"\n />\n </svg>\n`\n\nexport const searchIcon = html`\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n class=\"bi bi-search\"\n viewBox=\"0 0 16 16\"\n >\n <path\n d=\"M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0\"\n />\n </svg>\n`\n\nexport const plusIcon = html`\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n class=\"bi bi-plus-lg\"\n viewBox=\"0 0 16 16\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2\"\n />\n </svg>\n`\n\nexport const arrowLeftIcon = html`\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n class=\"bi bi-arrow-left-short\"\n viewBox=\"0 0 16 16\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M12 8a.5.5 0 0 1-.5.5H5.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L5.707 7.5H11.5a.5.5 0 0 1 .5.5\"\n />\n </svg>\n`\n\nexport const arrowRightIcon = html`\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n class=\"bi bi-arrow-right-short\"\n viewBox=\"0 0 16 16\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8\"\n />\n </svg>\n`\n\nexport const menuIcon = html`\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n class=\"bi bi-list\"\n viewBox=\"0 0 16 16\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5\"\n />\n </svg>\n`\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { css, html, nothing, type PropertyValues } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { BaseElement } from '../internal/base-element'\nimport { chevronDownIcon } from '../icons/index.js'\nimport type {\n Auth,\n AuthorizationCodeAuth,\n ClientCredentialsAuth,\n SelfIssuedAuth,\n SelfSignedAuth,\n} from '@canton-network/core-wallet-user-rpc-client'\n\nexport type AuthMethod =\n | 'authorization_code'\n | 'client_credentials'\n | 'self_signed'\n | 'self_issued'\n\ntype EditorMode = 'none' | 'view' | 'edit' | 'add' | 'pending-remove'\n\nexport class AuthEditorChangeEvent extends Event {\n auth: Auth | undefined\n\n constructor(auth?: Auth) {\n super('auth-change', { bubbles: true, composed: true })\n this.auth = auth\n }\n}\n\nexport\n@customElement('auth-editor')\nclass AuthEditor extends BaseElement {\n @property({ type: Object }) accessor auth: Auth | undefined\n @property({ type: Array })\n accessor allowedMethods: AuthMethod[] = [\n 'authorization_code',\n 'client_credentials',\n 'self_signed',\n 'self_issued',\n ]\n @property({ type: Boolean }) accessor optional = false\n @property({ type: String }) accessor emptyText = 'No auth configured.'\n @property({ type: String }) accessor pendingRemoveText =\n 'Auth will be removed after submitting this form.'\n\n @state() private accessor _mode: EditorMode = 'none'\n @state() private accessor _backup: Auth | undefined\n @state() private accessor _secretReplacement = ''\n\n static styles = [\n BaseElement.styles,\n css`\n :host {\n display: block;\n }\n\n .field-group {\n gap: var(--wg-space-2);\n margin-bottom: var(--wg-space-3);\n }\n\n .field-label {\n font-size: var(--wg-font-size-sm);\n font-weight: var(--wg-font-weight-medium);\n color: var(--wg-text-secondary);\n line-height: var(--wg-line-height-tight);\n }\n\n .required {\n color: var(--wg-label-required-color);\n }\n\n .field-control {\n width: 100%;\n border: 1px solid var(--wg-input-border);\n border-radius: 4px;\n background: var(--wg-input-bg);\n color: var(--wg-input-text);\n padding: 12px 14px;\n }\n\n .select-wrap {\n position: relative;\n }\n\n .select-wrap .field-control {\n padding-right: 40px;\n appearance: none;\n -webkit-appearance: none;\n }\n\n .select-chevron {\n position: absolute;\n top: 50%;\n right: 12px;\n transform: translateY(-50%);\n color: var(--wg-text-secondary);\n pointer-events: none;\n display: inline-flex;\n }\n\n .config-panel {\n border: 1px solid var(--wg-border);\n border-radius: 8px;\n padding: var(--wg-space-3);\n background: var(--wg-input-bg);\n display: flex;\n flex-direction: column;\n gap: var(--wg-space-3);\n }\n\n .field-help {\n font-size: var(--wg-font-size-xs);\n color: var(--wg-text-secondary);\n margin: 0;\n }\n\n .auth-summary-list {\n display: flex;\n flex-direction: column;\n gap: var(--wg-space-3);\n }\n\n .auth-summary-item {\n display: flex;\n flex-direction: column;\n gap: var(--wg-space-1);\n }\n\n .auth-summary-label {\n font-size: var(--wg-font-size-xs);\n color: var(--wg-text-secondary);\n font-weight: var(--wg-font-weight-semibold);\n }\n\n .auth-summary-value {\n font-size: var(--wg-font-size-sm);\n color: var(--wg-text);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n margin: 0;\n }\n\n .inline-actions {\n display: flex;\n gap: var(--wg-space-2);\n }\n\n .btn-inline {\n border: 1px solid var(--wg-border);\n border-radius: var(--wg-radius-full);\n background: var(--wg-input-bg);\n color: var(--wg-text);\n font-size: var(--wg-font-size-sm);\n font-weight: var(--wg-font-weight-semibold);\n padding: 0.35rem 0.9rem;\n cursor: pointer;\n }\n\n .btn-inline.danger {\n border-color: var(--wg-error);\n color: var(--wg-error);\n }\n\n .warning-banner {\n border: 1px solid var(--wg-error);\n border-radius: 8px;\n background: rgba(var(--wg-error-rgb), 0.08);\n color: var(--wg-error);\n padding: var(--wg-space-3);\n font-size: var(--wg-font-size-sm);\n }\n `,\n ]\n\n protected createRenderRoot(): HTMLElement {\n return this\n }\n\n connectedCallback(): void {\n super.connectedCallback()\n }\n\n protected willUpdate(changed: PropertyValues<this>): void {\n super.willUpdate(changed)\n if (!this.hasUpdated) {\n this._mode = this._initialMode()\n }\n }\n\n private _hasConfiguredAuth(auth: Auth | undefined): auth is Auth {\n return typeof auth?.method === 'string'\n }\n\n private _initialMode(): EditorMode {\n if (!this.optional) {\n return 'edit'\n }\n if (this._hasConfiguredAuth(this.auth)) {\n return 'view'\n }\n return 'none'\n }\n\n private _emit(auth?: Auth) {\n this.dispatchEvent(new AuthEditorChangeEvent(structuredClone(auth)))\n }\n\n private _defaultAuth(method: AuthMethod): Auth {\n if (method === 'authorization_code') {\n return {\n method,\n clientId: '',\n audience: '',\n scope: '',\n } satisfies AuthorizationCodeAuth\n }\n\n if (method === 'client_credentials') {\n return {\n method,\n clientId: '',\n audience: '',\n scope: '',\n clientSecret: '',\n } satisfies ClientCredentialsAuth\n }\n\n if (method === 'self_issued') {\n return {\n method,\n audience: '',\n scope: '',\n } satisfies SelfIssuedAuth\n }\n\n return {\n method: 'self_signed',\n clientId: '',\n audience: '',\n scope: '',\n issuer: '',\n clientSecret: '',\n } satisfies SelfSignedAuth\n }\n\n private _maskSecret(secret?: string): string {\n return secret ? '********' : '(not set)'\n }\n\n private _getSummary(auth: Auth): Array<{ key: string; value: string }> {\n const rows: Array<{ key: string; value: string }> = [\n { key: 'Method', value: auth.method },\n { key: 'Audience', value: auth.audience ?? '' },\n { key: 'Scope', value: auth.scope ?? '' },\n ]\n\n if ('clientId' in auth) {\n rows.splice(1, 0, {\n key: 'Client Id',\n value: auth.clientId ?? '',\n })\n }\n\n if ('issuer' in auth) {\n rows.push({ key: 'Issuer', value: auth.issuer ?? '' })\n }\n if ('clientSecret' in auth) {\n rows.push({\n key: 'Client Secret',\n value: this._maskSecret(auth.clientSecret),\n })\n }\n\n if (auth.method === 'client_credentials' && auth.identityProviderId) {\n rows.push({\n key: 'Identity Provider Id',\n value: auth.identityProviderId,\n })\n }\n return rows\n }\n\n private _startAdd() {\n this._secretReplacement = ''\n this._mode = 'add'\n }\n\n private _startEdit() {\n if (this.auth) {\n this._backup = structuredClone(this.auth)\n }\n this._secretReplacement = ''\n this._mode = 'edit'\n }\n\n private _markForRemove() {\n if (this.auth) {\n this._backup = structuredClone(this.auth)\n }\n this._emit(undefined)\n this._mode = 'pending-remove'\n }\n\n private _cancelRemove() {\n if (this._backup) {\n const formState: Auth = structuredClone(this._backup)\n this._emit(formState)\n this._mode = 'view'\n } else {\n this._mode = this.optional ? 'none' : 'edit'\n }\n }\n\n private _cancelEdit() {\n if (this._backup) {\n const formState: Auth = structuredClone(this._backup)\n this._emit(formState)\n this._mode = 'view'\n } else {\n this._emit(undefined)\n this._mode = this.optional ? 'none' : 'edit'\n }\n this._secretReplacement = ''\n }\n\n private _resolveClientSecret(\n authObj: ClientCredentialsAuth | SelfSignedAuth\n ): string {\n if (this._secretReplacement.trim() !== '') {\n return this._secretReplacement\n }\n\n if (this._mode === 'add') {\n return ''\n }\n\n const backupSecret =\n this._backup && 'clientSecret' in this._backup\n ? this._backup.clientSecret\n : undefined\n if (typeof backupSecret === 'string') {\n return backupSecret\n }\n\n return authObj.clientSecret ?? ''\n }\n\n private _hasExistingSecret(\n authObj: ClientCredentialsAuth | SelfSignedAuth\n ): boolean {\n if (this._secretReplacement.trim() !== '') {\n return false\n }\n\n if (this._mode === 'add') {\n return false\n }\n\n if (\n typeof authObj.clientSecret === 'string' &&\n authObj.clientSecret !== ''\n ) {\n return true\n }\n\n const backupSecret =\n this._backup && 'clientSecret' in this._backup\n ? this._backup.clientSecret\n : undefined\n return typeof backupSecret === 'string' && backupSecret.length > 0\n }\n\n private _renderUnsupportedMethodWarning(method: string) {\n return html`<div\n class=\"warning-banner\"\n data-test-id=\"auth-editor-unsupported-method-warning\"\n >\n Unsupported auth method \"${method}\". Select a supported method to\n continue.\n </div>`\n }\n\n private _onAuthMethodChange(e: Event) {\n const value = (e.target as HTMLSelectElement).value\n\n switch (value) {\n case 'authorization_code':\n this._emit({\n method: 'authorization_code',\n clientId:\n this.auth && 'clientId' in this.auth\n ? this.auth.clientId\n : '',\n audience: this.auth?.audience ?? '',\n scope: this.auth?.scope ?? '',\n } satisfies AuthorizationCodeAuth)\n break\n\n case 'self_signed':\n this._emit({\n method: 'self_signed',\n clientId:\n this.auth && 'clientId' in this.auth\n ? this.auth.clientId\n : '',\n audience: this.auth?.audience ?? '',\n scope: this.auth?.scope ?? '',\n issuer: (this.auth as SelfSignedAuth)?.issuer ?? '',\n clientSecret:\n (this.auth as SelfSignedAuth)?.clientSecret ?? '',\n } satisfies SelfSignedAuth)\n break\n\n case 'self_issued':\n this._emit({\n method: 'self_issued',\n audience: this.auth?.audience ?? '',\n scope: this.auth?.scope ?? '',\n } satisfies SelfIssuedAuth)\n break\n\n case 'client_credentials':\n this._emit({\n method: 'client_credentials',\n ...(this.auth?.method === 'client_credentials' &&\n this.auth.identityProviderId\n ? { identityProviderId: this.auth.identityProviderId }\n : {}),\n clientId:\n this.auth && 'clientId' in this.auth\n ? this.auth.clientId\n : '',\n audience: this.auth?.audience ?? '',\n scope: this.auth?.scope ?? '',\n clientSecret:\n (this.auth as ClientCredentialsAuth)?.clientSecret ??\n '',\n } satisfies ClientCredentialsAuth)\n break\n default:\n throw new Error(`Unsupported auth method: ${value}`)\n }\n }\n\n _renderIssuerInput(authObj: SelfSignedAuth) {\n return html` <div class=\"field-group d-flex flex-column\">\n <label class=\"form-label field-label mb-0\">\n Issuer <span class=\"required\">*</span>\n </label>\n <input\n class=\"form-control field-control\"\n data-test-id=\"auth-editor-issuer-input\"\n type=\"text\"\n required\n .value=${(authObj as SelfSignedAuth).issuer}\n @change=${(e: Event) => {\n authObj.issuer = (e.target as HTMLInputElement).value\n this._emit(authObj)\n }}\n />\n </div>`\n }\n\n _renderClientIdInput(\n authObj: AuthorizationCodeAuth | ClientCredentialsAuth | SelfSignedAuth\n ) {\n return html` <div class=\"field-group d-flex flex-column\">\n <label class=\"form-label field-label mb-0\">\n Client Id <span class=\"required\">*</span>\n </label>\n <input\n class=\"form-control field-control\"\n data-test-id=\"auth-editor-client-id-input\"\n type=\"text\"\n required\n .value=${authObj.clientId}\n @change=${(e: Event) => {\n authObj.clientId = (e.target as HTMLInputElement).value\n this._emit(authObj)\n }}\n />\n </div>`\n }\n\n _renderClientSecretInput(authObj: ClientCredentialsAuth | SelfSignedAuth) {\n return html` <div class=\"field-group d-flex flex-column\">\n <label class=\"form-label field-label mb-0\">\n Client Secret <span class=\"required\">*</span>\n </label>\n <input\n class=\"form-control field-control\"\n data-test-id=\"auth-editor-client-secret-input\"\n type=\"text\"\n ?required=${!this._hasExistingSecret(authObj)}\n .value=${this._secretReplacement}\n placeholder=${\n this._hasExistingSecret(authObj) ? '********' : ''\n }\n @change=${(e: Event) => {\n this._secretReplacement = (\n e.target as HTMLInputElement\n ).value\n authObj.clientSecret = this._resolveClientSecret(authObj)\n this._emit(authObj)\n }}\n />\n ${\n // oxfmt-ignore\n this._hasExistingSecret(authObj)\n ? html`<p\n class=\"field-help mb-0\"\n data-test-id=\"auth-editor-secret-help\"\n >\n Current secret is hidden. Enter a new value to replace it.\n </p>`\n : nothing\n }\n </div>`\n }\n\n _renderIdentityProviderIdInput(authObj: ClientCredentialsAuth) {\n return html` <div class=\"field-group d-flex flex-column\">\n <label class=\"form-label field-label mb-0\">\n Identity Provider Id Override\n </label>\n <input\n class=\"form-control field-control\"\n data-test-id=\"auth-editor-identity-provider-id-input\"\n type=\"text\"\n .value=${authObj.identityProviderId ?? ''}\n @change=${(e: Event) => {\n const value = (e.target as HTMLInputElement).value.trim()\n if (value) {\n authObj.identityProviderId = value\n } else {\n delete authObj.identityProviderId\n }\n this._emit(authObj)\n }}\n />\n <p class=\"field-help mb-0\">\n Optional. Uses the network identity provider when empty.\n </p>\n </div>`\n }\n\n private _renderAuthForm(authObj: Auth) {\n const method = authObj.method\n const commonFields = html`\n <div class=\"field-group d-flex flex-column\">\n <label class=\"form-label field-label mb-0\">\n Method <span class=\"required\">*</span>\n </label>\n <div class=\"select-wrap\">\n <select\n class=\"form-select field-control\"\n data-test-id=\"auth-editor-method-select\"\n .value=${method}\n @change=${(e: Event) => {\n this._onAuthMethodChange(e)\n }}\n >\n ${\n this.allowedMethods.includes('authorization_code')\n ? html`<option\n value=\"authorization_code\"\n ?selected=${method === 'authorization_code'}\n >\n authorization_code\n </option>`\n : nothing\n }\n ${\n this.allowedMethods.includes('client_credentials')\n ? html`<option\n value=\"client_credentials\"\n ?selected=${method === 'client_credentials'}\n >\n client_credentials\n </option>`\n : nothing\n }\n ${\n this.allowedMethods.includes('self_signed')\n ? html`<option\n value=\"self_signed\"\n ?selected=${method === 'self_signed'}\n >\n self_signed\n </option>`\n : nothing\n }\n ${\n this.allowedMethods.includes('self_issued')\n ? html`<option\n value=\"self_issued\"\n ?selected=${method === 'self_issued'}\n >\n self_issued\n </option>`\n : nothing\n }\n </select>\n <span class=\"select-chevron\">${chevronDownIcon}</span>\n </div>\n </div>\n\n <div class=\"field-group d-flex flex-column\">\n <label class=\"form-label field-label mb-0\">\n Audience <span class=\"required\">*</span>\n </label>\n <input\n class=\"form-control field-control\"\n data-test-id=\"auth-editor-audience-input\"\n type=\"text\"\n required\n .value=${authObj.audience}\n @change=${(e: Event) => {\n authObj.audience = (e.target as HTMLInputElement).value\n this._emit(authObj)\n }}\n />\n </div>\n\n <div class=\"field-group d-flex flex-column\">\n <label class=\"form-label field-label mb-0\">\n Scope <span class=\"required\">*</span>\n </label>\n <input\n class=\"form-control field-control\"\n data-test-id=\"auth-editor-scope-input\"\n type=\"text\"\n required\n .value=${authObj.scope}\n @change=${(e: Event) => {\n authObj.scope = (e.target as HTMLInputElement).value\n this._emit(authObj)\n }}\n />\n </div>\n `\n\n if (method === 'authorization_code') {\n return html`${commonFields} ${this._renderClientIdInput(authObj)}`\n }\n\n if (method === 'self_issued') {\n return commonFields\n }\n\n if (method === 'client_credentials') {\n return html`${commonFields} ${this._renderClientIdInput(authObj)}\n ${this._renderIdentityProviderIdInput(authObj)}\n ${this._renderClientSecretInput(authObj)}`\n }\n\n if (method === 'self_signed') {\n return html`${commonFields} ${this._renderClientIdInput(authObj)}\n ${this._renderIssuerInput(authObj)}\n ${this._renderClientSecretInput(authObj)}`\n }\n\n // shouldn't happen, unless parent passes wrong method value. just in case make it recoverable\n return html` ${commonFields}\n ${this._renderUnsupportedMethodWarning(method)}`\n }\n\n protected render() {\n if (this._mode === 'none') {\n return html`\n <div\n class=\"config-panel\"\n data-test-id=\"auth-editor-empty-state\"\n >\n <p class=\"field-help\" data-test-id=\"auth-editor-empty-text\">\n ${this.emptyText}\n </p>\n <div class=\"inline-actions\">\n <button\n type=\"button\"\n class=\"btn-inline\"\n data-test-id=\"auth-editor-add-button\"\n @click=${this._startAdd}\n >\n Add\n </button>\n </div>\n </div>\n `\n }\n\n if (this._mode === 'pending-remove') {\n return html`\n <div\n class=\"config-panel\"\n data-test-id=\"auth-editor-pending-remove-state\"\n >\n <div\n class=\"warning-banner\"\n data-test-id=\"auth-editor-pending-remove-text\"\n >\n ${this.pendingRemoveText}\n </div>\n <div class=\"inline-actions\">\n <button\n type=\"button\"\n class=\"btn-inline\"\n data-test-id=\"auth-editor-cancel-remove-button\"\n @click=${this._cancelRemove}\n >\n Cancel\n </button>\n </div>\n </div>\n `\n }\n\n if (this._mode === 'view' && this._hasConfiguredAuth(this.auth)) {\n const rows = this._getSummary(this.auth)\n return html`\n <div class=\"config-panel\" data-test-id=\"auth-editor-view-state\">\n <dl\n class=\"auth-summary-list\"\n data-test-id=\"auth-editor-summary-list\"\n >\n ${rows.map(\n (row) => html`\n <div\n class=\"auth-summary-item\"\n data-test-id=\"auth-editor-summary-row\"\n >\n <dt class=\"auth-summary-label\">\n ${row.key}\n </dt>\n <dd\n class=\"auth-summary-value\"\n title=${row.value}\n >\n ${row.value}\n </dd>\n </div>\n `\n )}\n </dl>\n <div class=\"inline-actions\">\n <button\n type=\"button\"\n class=\"btn-inline\"\n data-test-id=\"auth-editor-edit-button\"\n @click=${this._startEdit}\n >\n Edit\n </button>\n <button\n type=\"button\"\n class=\"btn-inline danger\"\n data-test-id=\"auth-editor-remove-button\"\n @click=${this._markForRemove}\n >\n Remove\n </button>\n </div>\n </div>\n `\n }\n\n const auth =\n this.auth && this._hasConfiguredAuth(this.auth)\n ? structuredClone(this.auth)\n : this._defaultAuth(this.allowedMethods[0])\n\n return html`\n <div data-test-id=\"auth-editor-edit-state\">\n ${this._renderAuthForm(auth)}\n </div>\n ${\n this.optional\n ? html`<div class=\"inline-actions\">\n <button\n type=\"button\"\n class=\"btn-inline\"\n data-test-id=\"auth-editor-cancel-edit-button\"\n @click=${this._cancelEdit}\n >\n Cancel\n </button>\n </div>`\n : nothing\n }\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport const ALLOWED_ROUTES = [\n '/api-keys/add',\n '/api-keys',\n '/login',\n '/self-issued-login',\n '/parties/edit',\n '/parties/add',\n '/parties',\n '/wallets',\n '/networks/add',\n '/networks/review',\n '/networks',\n '/identity-providers/add',\n '/identity-providers/review',\n '/identity-providers',\n '/activities',\n '/admin',\n '/approve',\n '/sign-message',\n '/',\n '/404',\n '/callback',\n] as const\n\nexport type AllowedRoute = (typeof ALLOWED_ROUTES)[number]\n\nexport function isAllowedRoute(path: string): path is AllowedRoute {\n return ALLOWED_ROUTES.includes(path as (typeof ALLOWED_ROUTES)[number])\n}\n\nconst NON_ROOT_ROUTES = ALLOWED_ROUTES.filter(\n (route): route is Exclude<AllowedRoute, '/'> => route !== '/'\n).sort((left, right) => right.length - left.length)\n\nfunction normalizePathname(pathname: string): string {\n if (!pathname || pathname === '/') {\n return '/'\n }\n if (pathname.length > 1000) {\n throw new Error('Path is too long')\n }\n\n const trimmedPathname = pathname.replace(/\\/+$/, '') || '/'\n\n if (trimmedPathname === '/index.html') {\n return '/'\n }\n\n if (trimmedPathname.endsWith('/index.html')) {\n return trimmedPathname.slice(0, -'/index.html'.length) || '/'\n }\n\n return trimmedPathname\n}\n\nexport function getCurrentRoute(pathname: string): AllowedRoute | null {\n const normalizedPath = normalizePathname(pathname)\n\n if (normalizedPath === '/') {\n return '/'\n }\n\n for (const route of NON_ROOT_ROUTES) {\n if (normalizedPath === route || normalizedPath.endsWith(`${route}`)) {\n return route\n }\n }\n\n return null\n}\n\nfunction getGatewayBasePath(pathname: string): string {\n const normalizedPath = normalizePathname(pathname)\n const currentRoute = getCurrentRoute(normalizedPath)\n\n if (currentRoute === null || currentRoute === '/') {\n return normalizedPath === '/' ? '' : normalizedPath\n }\n\n const basePath = normalizedPath.slice(0, -currentRoute.length)\n return basePath || ''\n}\n\nexport function toRelPath(\n path: string,\n pathname = window.location.pathname\n): string {\n const basePath = getGatewayBasePath(pathname)\n const normalizedPath = path.startsWith('/') ? path : `/${path}`\n\n if (!basePath) {\n return normalizedPath\n }\n\n if (normalizedPath === '/') {\n return `${basePath}/`\n }\n\n return `${basePath}${normalizedPath}`\n}\n\nexport function toRelHref(\n route: AllowedRoute,\n pathname = window.location.pathname\n): string {\n if (route === '/') {\n return toRelPath('/', pathname)\n }\n\n return toRelPath(`${route}/`, pathname)\n}\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAboAAAG6CAYAAAB+94OFAAA8YklEQVR42u2dX2xc133nv4xqLMWHcFIuYD/Q5GiBsEENkxPADcxi6YzpBJWrCTLOigt56VJU9WBGQiHSD21JPZAOtLHYhUUJm4T0Q0vKqJcN0CwlrMwkQNaU4Up2kBYkrSqbOg8cKSxgB5BJWkAkIwHuPsycqzuXd4ZDzr/75/MFvrEyw5m598y95zO/c37ndxqEECqmWM5x178lqd31N8bu15aizZyNMh7/vuX4/5sOZ1yvRQg51EATICCmRA5e7Q6QxXcJKj8o44BeJgfGjOtxhAAdQiFUXFIyB60uB9hiEWuHTUkruf+u5v6dyf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IL7qk7Fzcj2gK/4uhy+ApLWlKDGciVA9lxMLvwImhy2D+kjyQu9kyNAdCNdGmssOUB4Bc8MTQZXC1ItbeIVQLXVB2mBLAIVRHxSXNSbIwxhUzGc8I+VBJSWt0UBiXDbgk3QlC/tYgwMN4114GcAgBPIzD6LXcvYIQAngYAziEEMDDGMAhhAAexqpPkgmAQyiCwFuiA8QRAFyS2x2haCsp1uFhAIdCKmpdIqfikiYkfVkslEXB1KaylUzmRIk8BOjQDsBLShoHeCggWlG2JN55saUVQmiXSophTczwJEIoIlHesMjWxPX3hrJD7DFuS4QQUR4OE9wWiN7QXsQcHSo3yktKOkoHhKqkq8rOvc2JuTcE6JAPoJeWdEoksKDy4fa2SCxBgA75WAllF6N/HeihEpWRdDEHuas0BwJ0KGjQS+egl6A5kEfkBtwQoEOhUVzM6QG37JzbJbGgGwE6FHLFcrBLi0osYdZmDmqXc5DbpEkQoENRVSIHPjPEGaNJAgu2FQfYVmgSBOgQ8lYyBzzAFxywrYi5NgToECobfF/O/TdOk9RFmRzMVonYEKBDqLqK54DnhB9RX+WjtauSbulBZuQmzYIAHUL1hV88F/11OWCIdhepZXKRWoZmQYAOoWAo4YBeVy7yi2IEuOmA2KojYgNoCNAhFFLFHFGgcbvr8SBBzIAsI2nL8e8Vx/MIATqEkCcMYw4bALbn/usEYtz12lKjxkwBcDkBdcv1twZkQAyhIvr/EHNYRo2EsUQAAAAASUVORK5CYII=\"","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { BaseElement } from '../internal/base-element'\nimport { toRelPath } from '../routing'\nimport { menuIcon, clipboardIcon } from '../icons'\nimport cantonLogo from '../../images/logos/canton-logo.png'\n\nexport class LogoutEvent extends Event {\n constructor() {\n super('logout', { bubbles: true, composed: true })\n }\n}\n\nexport class CopyDappApiUrlEvent extends Event {\n constructor() {\n super('copy-dapp-api-url', { bubbles: true, composed: true })\n }\n}\n\nexport\n@customElement('app-header')\nclass AppHeader extends BaseElement {\n @property({ type: String }) accessor iconSrc: string = 'images/icon.png'\n @property({ type: String }) accessor networkName: string =\n 'No network connected'\n @property({ type: Boolean }) accessor networkConnected = false\n @property({ type: String }) accessor dappApiUrl: string = ''\n @property({ type: Boolean }) accessor isAdmin = false\n // Number of server warnings, shown to the admin user\n @property({ type: Number }) accessor warningCount = 0\n\n @state() private accessor menuOpen = false\n @state() private accessor darkMode =\n localStorage.getItem('theme') === 'dark'\n\n static styles = [\n BaseElement.styles,\n css`\n :host {\n display: block;\n width: 100%;\n background: var(--wg-surface);\n border-bottom: 1px solid var(--wg-border);\n position: sticky;\n top: 0;\n z-index: 1000;\n color: var(--wg-text);\n }\n\n header {\n position: relative;\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);\n align-items: center;\n gap: 0.5rem;\n padding: 0.4rem 0.65rem;\n min-height: 40px;\n }\n\n .brand {\n justify-self: start;\n border: none;\n background: transparent;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n padding: 0;\n flex: 0 0 auto;\n }\n\n .brand img {\n width: 24px;\n height: 24px;\n object-fit: contain;\n display: block;\n }\n\n .network-pill {\n justify-self: center;\n min-width: 0;\n width: auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 0.45rem;\n padding: 0.26rem 0.55rem;\n line-height: 1;\n max-width: min(52vw, 420px);\n }\n\n .status-dot {\n width: 7px;\n height: 7px;\n border-radius: 50%;\n flex: 0 0 auto;\n align-self: center;\n }\n\n .status-dot.online {\n background: var(--wg-success);\n box-shadow: 0 0 0 1.5px rgba(var(--wg-success-rgb), 0.18);\n }\n\n .status-dot.offline {\n background: var(--wg-text-secondary);\n opacity: 0.7;\n }\n\n .network-name {\n display: inline-flex;\n align-items: center;\n font-size: var(--wg-font-size-sm);\n font-weight: var(--wg-font-weight-medium);\n color: var(--wg-text);\n line-height: 1;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: min(36vw, 280px);\n }\n\n .menu-wrap {\n position: relative;\n justify-self: end;\n }\n\n .page-trigger {\n border: none;\n background: var(--wg-surface);\n color: var(--wg-text);\n padding: 0.3rem 0.55rem;\n display: inline-flex;\n align-items: center;\n gap: 0.3rem;\n font-size: var(--wg-font-size-sm);\n font-weight: var(--wg-font-weight-semibold);\n cursor: pointer;\n min-width: 0;\n max-width: 180px;\n }\n\n .page-trigger-icon {\n display: inline-flex;\n transition: transform 0.2s ease;\n }\n\n .page-trigger-icon.open {\n transform: rotate(180deg);\n }\n\n .dropdown {\n position: absolute;\n top: calc(100% + 8px);\n right: 0;\n min-width: 220px;\n max-width: min(92vw, 280px);\n background: var(--menu-bg, var(--wg-surface));\n border: 1px solid var(--wg-border);\n border-radius: var(--wg-radius-lg);\n box-shadow: var(--wg-shadow-md);\n padding: var(--wg-space-2);\n opacity: 0;\n transform: translateY(-4px);\n pointer-events: none;\n transition:\n opacity 0.15s ease,\n transform 0.15s ease;\n }\n\n .dropdown.open {\n opacity: 1;\n transform: translateY(0);\n pointer-events: auto;\n }\n\n .menu-item {\n width: 100%;\n text-align: left;\n border: none;\n border-radius: var(--wg-radius-md);\n background: transparent;\n color: var(--wg-text);\n font-size: var(--wg-font-size-sm);\n padding: 0.5rem 0.6rem;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--wg-space-3);\n }\n\n .menu-item-with-icon {\n justify-content: space-between;\n gap: var(--wg-space-2);\n }\n\n .menu-item-icon {\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n }\n\n .menu-item:hover {\n background: rgba(var(--wg-accent-rgb), 0.1);\n }\n\n .menu-divider {\n height: 1px;\n background: var(--wg-border);\n margin: var(--wg-space-2) 0;\n }\n `,\n ]\n\n connectedCallback() {\n super.connectedCallback()\n this.updateThemeAttribute()\n document.addEventListener('click', this.handleOutsideClick)\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.handleOutsideClick)\n super.disconnectedCallback()\n }\n\n private handleOutsideClick = (event: MouseEvent) => {\n if (!this.menuOpen) return\n\n const path = event.composedPath()\n if (!path.includes(this)) {\n this.menuOpen = false\n }\n }\n\n private updateThemeAttribute() {\n if (this.darkMode) {\n this.setAttribute('theme', 'dark')\n } else {\n this.removeAttribute('theme')\n }\n }\n\n private toggleMenu(event: Event) {\n event.stopPropagation()\n this.menuOpen = !this.menuOpen\n }\n\n private navigateTo(route: string) {\n this.menuOpen = false\n window.location.href = toRelPath(route)\n }\n\n private logout() {\n this.menuOpen = false\n this.dispatchEvent(new LogoutEvent())\n }\n\n private warningBadge() {\n if (!this.isAdmin || this.warningCount === 0) return ''\n const label = `${this.warningCount} server ${\n this.warningCount === 1 ? 'warning' : 'warnings'\n }`\n return html`<span\n class=\"badge rounded-pill text-bg-warning\"\n title=${label}\n aria-label=${label}\n >${this.warningCount}</span\n >`\n }\n\n private copyDappApiUrl() {\n this.menuOpen = false\n this.dispatchEvent(new CopyDappApiUrlEvent())\n }\n\n render() {\n return html`\n <header>\n <button\n class=\"brand\"\n type=\"button\"\n aria-label=\"Go to home\"\n @click=${() => this.navigateTo('/')}\n >\n <img src=${cantonLogo} alt=\"Canton logo\" />\n </button>\n\n <div\n class=\"network-pill\"\n title=${this.networkName}\n data-testid=\"network-status-${this.networkConnected ? 'connected' : 'disconnected'}\"\n >\n <span\n class=\"status-dot ${\n this.networkConnected ? 'online' : 'offline'\n }\"\n ></span>\n <span class=\"network-name\">${this.networkName}</span>\n </div>\n\n <div class=\"menu-wrap\">\n <button\n class=\"page-trigger\"\n type=\"button\"\n aria-haspopup=\"menu\"\n aria-expanded=${this.menuOpen}\n @click=${this.toggleMenu}\n >\n <span\n class=\"page-trigger-icon ${\n this.menuOpen ? 'open' : ''\n }\"\n >\n ${menuIcon}\n </span>\n ${this.warningBadge()}\n </button>\n\n <div class=\"dropdown ${this.menuOpen ? 'open' : ''}\">\n <button\n type=\"button\"\n class=\"menu-item\"\n @click=${() => this.navigateTo('/parties/')}\n >\n <span>Parties</span>\n </button>\n <button\n type=\"button\"\n class=\"menu-item\"\n @click=${() => this.navigateTo('/activities/')}\n >\n <span>Activities</span>\n </button>\n <button\n type=\"button\"\n class=\"menu-item\"\n @click=${() => this.navigateTo('/networks/')}\n >\n <span>Networks</span>\n </button>\n <button\n type=\"button\"\n class=\"menu-item\"\n @click=${() => this.navigateTo('/api-keys/')}\n >\n <span>API Keys</span>\n </button>\n <button\n type=\"button\"\n class=\"menu-item\"\n @click=${() =>\n this.navigateTo('/identity-providers/')}\n >\n <span>Identity Providers</span>\n </button>\n ${\n this.isAdmin\n ? html`\n <button\n type=\"button\"\n class=\"menu-item\"\n @click=${() =>\n this.navigateTo('/admin/')}\n >\n <span>Administration</span>\n ${this.warningBadge()}\n </button>\n `\n : ''\n }\n <button\n type=\"button\"\n class=\"menu-item menu-item-with-icon\"\n title=${this.dappApiUrl || 'Copy dApp API URL'}\n aria-label=${\n this.dappApiUrl\n ? `Copy dApp API URL: ${this.dappApiUrl}`\n : 'Copy dApp API URL'\n }\n @click=${this.copyDappApiUrl}\n >\n <span>Dapp API URL</span>\n <span class=\"menu-item-icon\" aria-hidden=\"true\"\n >${clipboardIcon}</span\n >\n </button>\n\n <div class=\"menu-divider\"></div>\n\n <button\n type=\"button\"\n class=\"menu-item\"\n @click=${this.logout}\n >\n <span>Logout</span>\n </button>\n </div>\n </div>\n </header>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { chevronLeftIcon } from '../icons/index.js'\nimport { BaseElement } from '../internal/base-element.js'\n\nexport\n@customElement('wg-back-link')\nclass WgBackLink extends BaseElement {\n @property() accessor href = ''\n\n @property() accessor label = 'Back'\n\n static styles = [\n BaseElement.styles,\n css`\n :host {\n display: inline-flex;\n flex: 0 0 auto;\n }\n\n .back-link {\n display: inline-flex;\n align-items: center;\n gap: var(--wg-space-1);\n white-space: nowrap;\n }\n\n .icon {\n display: inline-flex;\n align-items: center;\n }\n `,\n ]\n\n render() {\n const content = html`\n <span class=\"icon\">${chevronLeftIcon}</span>\n <span>${this.label}</span>\n `\n\n if (this.href) {\n return html`\n <a\n class=\"back-link btn btn-link btn-sm text-body text-decoration-none p-0\"\n href=${this.href}\n >\n ${content}\n </a>\n `\n }\n\n return html`\n <button\n class=\"back-link btn btn-link btn-sm text-body text-decoration-none p-0\"\n type=\"button\"\n >\n ${content}\n </button>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { BaseElement } from '../internal/base-element'\nimport { clipboardIcon } from '../icons'\n\nexport class CopySuccessEvent extends Event {\n constructor(public value: string) {\n super('copy-success', { bubbles: true, composed: true })\n }\n}\n\nexport\n@customElement('wg-copy-button')\nclass WgCopyButton extends BaseElement {\n @property({ type: String }) accessor value = ''\n @property({ type: String }) accessor label = 'Copy to clipboard'\n\n @state() private accessor copied = false\n\n static styles = [\n BaseElement.styles,\n css`\n :host {\n display: inline-flex;\n flex: 0 0 auto;\n /* BaseElement paints the page background on every host. This\n button sits on cards, whose surface can differ from it. */\n background-color: transparent;\n }\n\n .copy-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 1.75rem;\n min-width: 1.75rem;\n height: 1.75rem;\n min-height: 1.75rem;\n padding: 0;\n border: none;\n border-radius: var(--wg-radius-full);\n background: transparent;\n color: var(--wg-text);\n cursor: pointer;\n line-height: 1;\n flex: 0 0 auto;\n box-sizing: border-box;\n overflow: visible;\n appearance: none;\n -webkit-appearance: none;\n transition:\n transform 0.2s ease,\n color 0.2s ease,\n background-color 0.2s ease,\n box-shadow 0.2s ease;\n }\n\n .copy-btn svg {\n display: block;\n flex: 0 0 auto;\n overflow: visible;\n width: 0.875rem;\n height: 0.875rem;\n }\n\n .copy-btn:hover {\n background: var(--wg-icon-bg);\n }\n\n .copy-btn:focus-visible {\n outline: none;\n background: var(--wg-icon-bg);\n box-shadow: 0 0 0 2px var(--wg-border);\n }\n\n .copy-btn:active {\n transform: scale(0.96);\n }\n\n .copy-btn.copied {\n background: transparent;\n color: var(--wg-success);\n }\n `,\n ]\n\n private async copyToClipboard(e: Event) {\n e.stopPropagation()\n if (!this.value) return\n\n try {\n if (navigator.clipboard?.writeText) {\n await navigator.clipboard.writeText(this.value)\n } else {\n this.fallbackCopy(this.value)\n }\n\n this.copied = true\n this.dispatchEvent(new CopySuccessEvent(this.value))\n window.setTimeout(() => {\n this.copied = false\n }, 1200)\n } catch (error) {\n console.error('Unable to copy value', error)\n }\n }\n\n private fallbackCopy(value: string) {\n const input = document.createElement('textarea')\n input.value = value\n input.style.position = 'fixed'\n input.style.left = '-9999px'\n\n document.body.appendChild(input)\n input.select()\n document.execCommand('copy')\n document.body.removeChild(input)\n }\n\n render() {\n return html`\n <button\n type=\"button\"\n class=\"copy-btn ${this.copied ? 'copied' : ''}\"\n @click=${this.copyToClipboard}\n aria-label=${this.label}\n title=${this.copied ? 'Copied' : this.label}\n >\n ${clipboardIcon}\n </button>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { BaseElement } from '../internal/base-element'\nimport { arrowLeftIcon, refreshIcon, warningTriangleIcon } from '../icons'\nimport { toRelPath } from '../routing'\n\nexport type ErrorPageMode = 'back' | 'refresh'\n\nexport class ErrorPageBackEvent extends Event {\n constructor() {\n super('error-back', { bubbles: true, composed: true })\n }\n}\n\nexport class ErrorPageRefreshEvent extends Event {\n constructor() {\n super('error-refresh', { bubbles: true, composed: true })\n }\n}\n\nexport\n@customElement('wg-error-page')\nclass WgErrorPage extends BaseElement {\n @property({ type: String }) accessor mode: ErrorPageMode = 'back'\n @property({ type: String }) accessor title = 'Something went wrong'\n @property({ type: String }) accessor message =\n 'An unexpected error occurred while loading this page.'\n @property({ type: String }) accessor backHref = '/'\n @property({ type: Boolean }) accessor performDefaultAction = true\n\n static styles = [\n BaseElement.styles,\n css`\n :host {\n display: block;\n }\n\n .error-page {\n min-height: 280px;\n display: grid;\n place-items: center;\n text-align: center;\n padding: var(--wg-space-8) var(--wg-space-4);\n color: var(--wg-text);\n }\n\n .error-card {\n width: min(560px, 100%);\n background: var(--wg-surface);\n border: 1px solid var(--wg-border);\n border-radius: var(--wg-radius-xl);\n box-shadow: var(--wg-shadow-md);\n padding: var(--wg-space-8);\n }\n\n .error-icon {\n color: var(--wg-error);\n display: inline-flex;\n margin-bottom: var(--wg-space-3);\n }\n\n h1 {\n margin: 0;\n font-size: var(--wg-font-size-2xl);\n font-weight: var(--wg-font-weight-bold);\n line-height: var(--wg-line-height-tight);\n }\n\n p {\n margin: var(--wg-space-3) 0 var(--wg-space-6);\n color: var(--wg-text-secondary);\n font-size: var(--wg-font-size-base);\n }\n\n .action-btn {\n border: none;\n border-radius: var(--wg-radius-full);\n display: inline-flex;\n align-items: center;\n gap: var(--wg-space-2);\n padding: 0.55rem 1rem;\n font-size: var(--wg-font-size-sm);\n font-weight: var(--wg-font-weight-semibold);\n cursor: pointer;\n color: var(--wg-accent);\n background: rgba(var(--wg-accent-rgb), 0.1);\n transition: background-color 0.2s ease;\n }\n\n .action-btn:hover {\n background: rgba(var(--wg-accent-rgb), 0.16);\n }\n `,\n ]\n\n private onBack() {\n this.dispatchEvent(new ErrorPageBackEvent())\n if (this.performDefaultAction) {\n window.location.href = toRelPath(this.backHref)\n }\n }\n\n private onRefresh() {\n this.dispatchEvent(new ErrorPageRefreshEvent())\n if (this.performDefaultAction) {\n window.location.reload()\n }\n }\n\n render() {\n return html`\n <section class=\"error-page\">\n <article class=\"error-card\" role=\"alert\" aria-live=\"polite\">\n <div class=\"error-icon\">${warningTriangleIcon}</div>\n <h1>${this.title}</h1>\n <p>${this.message}</p>\n ${\n this.mode === 'refresh'\n ? html`<button\n type=\"button\"\n class=\"action-btn\"\n @click=${this.onRefresh}\n >\n ${refreshIcon} Refresh\n </button>`\n : html`<button\n type=\"button\"\n class=\"action-btn\"\n @click=${this.onBack}\n >\n ${arrowLeftIcon} Back\n </button>`\n }\n </article>\n </section>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { BaseElement } from '../internal/base-element.js'\n\n/**\n * The title row at the top of a page.\n *\n * Slots:\n * - default: actions at the end of the row, such as an add button or a back link\n * - `title-suffix`: content right next to the title, such as a refresh button\n */\nexport\n@customElement('wg-page-header')\nclass WgPageHeader extends BaseElement {\n @property() accessor heading = ''\n\n static styles = [\n BaseElement.styles,\n css`\n :host {\n display: block;\n }\n\n .page-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: var(--wg-space-3);\n margin-bottom: var(--wg-space-4);\n }\n\n .page-title-wrap {\n display: inline-flex;\n align-items: center;\n gap: 0.15rem;\n }\n\n .page-title-wrap > h1 {\n line-height: 1.2;\n }\n `,\n ]\n\n render() {\n return html`\n <div class=\"page-header\">\n <div class=\"page-title-wrap\">\n <h1 class=\"h4 fw-semibold mb-0\">${this.heading}</h1>\n <slot name=\"title-suffix\"></slot>\n </div>\n <slot></slot>\n </div>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { BaseElement } from '../internal/base-element'\nimport { arrowLeftIcon, arrowRightIcon } from '../icons'\n\nexport class PageChangeEvent extends CustomEvent<{ page: number }> {\n constructor(page: number) {\n super('page-change', {\n bubbles: true,\n composed: true,\n detail: { page },\n })\n }\n\n get page() {\n return this.detail.page\n }\n}\n\nexport\n@customElement('wg-pagination')\nclass WgPagination extends BaseElement {\n @property({ type: Number }) accessor total = 0\n @property({ type: Number }) accessor pageSize = 5\n @property({ type: Number }) accessor page = 1\n @property({ type: Boolean }) accessor disabled = false\n\n static styles = [\n BaseElement.styles,\n css`\n :host {\n display: inline-flex;\n align-items: center;\n gap: var(--wg-space-2);\n color: var(--wg-primary);\n }\n\n .pagination {\n display: inline-flex;\n align-items: center;\n gap: var(--wg-space-2);\n font-size: var(--wg-font-size-sm);\n font-weight: var(--wg-font-weight-medium);\n color: var(--wg-primary);\n user-select: none;\n }\n\n .page-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 1.6rem;\n height: 1.6rem;\n border: none;\n border-radius: var(--wg-radius-full);\n background: transparent;\n color: var(--wg-primary);\n cursor: pointer;\n transition:\n opacity 0.2s ease,\n color 0.2s ease;\n }\n\n .page-btn:hover:not(:disabled) {\n opacity: 0.75;\n }\n\n .page-btn:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n `,\n ]\n\n private get maxPage() {\n return Math.max(1, Math.ceil(this.total / Math.max(this.pageSize, 1)))\n }\n\n private get range() {\n if (this.total <= 0) {\n return { start: 0, end: 0 }\n }\n\n const start = (this.page - 1) * this.pageSize + 1\n const end = Math.min(start + this.pageSize - 1, this.total)\n return { start, end }\n }\n\n private updatePage(nextPage: number) {\n const clamped = Math.min(Math.max(nextPage, 1), this.maxPage)\n if (clamped === this.page) {\n return\n }\n\n this.page = clamped\n this.dispatchEvent(new PageChangeEvent(clamped))\n }\n\n protected willUpdate() {\n if (this.pageSize < 1) {\n this.pageSize = 1\n }\n\n if (this.page < 1) {\n this.page = 1\n }\n\n if (this.page > this.maxPage) {\n this.page = this.maxPage\n }\n }\n\n render() {\n const { start, end } = this.range\n const atFirstPage = this.page <= 1\n const atLastPage = this.page >= this.maxPage\n\n return html`\n <div class=\"pagination\" aria-label=\"Pagination\">\n <button\n class=\"page-btn\"\n .disabled=${this.disabled || atFirstPage}\n @click=${() => this.updatePage(this.page - 1)}\n aria-label=\"Previous page\"\n >\n ${arrowLeftIcon}\n </button>\n <span>${start}-${end} of ${this.total}</span>\n <button\n class=\"page-btn\"\n .disabled=${this.disabled || atLastPage}\n @click=${() => this.updatePage(this.page + 1)}\n aria-label=\"Next page\"\n >\n ${arrowRightIcon}\n </button>\n </div>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { customElement, property } from 'lit/decorators.js'\nimport { BaseElement } from '../internal/base-element'\nimport { css, html } from 'lit'\nimport type { Idp } from '@canton-network/core-wallet-user-rpc-client'\nimport { cardStyles } from '../styles/card'\nimport './copy-button.js'\n\n/** Emitted when the user clicks an IDP card to review it */\nexport class IdpCardReviewEvent extends Event {\n constructor(public idp: Idp) {\n super('idp-review', { bubbles: true, composed: true })\n }\n}\n\n/** Emitted when the user clicks the \"Delete\" button on an IDP card */\nexport class IdpCardDeleteEvent extends Event {\n constructor(public idp: Idp) {\n super('delete', { bubbles: true, composed: true })\n }\n}\n\n/** Emitted when the user clicks the \"Update\" button on an IDP card */\nexport class IdpCardUpdateEvent extends Event {\n constructor() {\n super('update', { bubbles: true, composed: true })\n }\n}\n\nexport\n@customElement('idp-card')\nclass IdpCard extends BaseElement {\n @property({ type: Object }) accessor idp: Idp | null = null\n @property({ type: Boolean }) accessor readonly = false\n\n static styles = [\n BaseElement.styles,\n cardStyles,\n css`\n :host {\n display: block;\n }\n\n .idp-card {\n padding: var(--wg-space-3);\n cursor: pointer;\n gap: var(--wg-space-3);\n }\n\n .idp-card.readonly {\n cursor: initial;\n }\n\n .idp-card:not(.readonly):hover {\n border-color: var(--wg-accent);\n box-shadow: var(--wg-shadow-md);\n }\n\n .card-title {\n margin: 0;\n font-size: var(--wg-font-size-base);\n font-weight: var(--wg-font-weight-bold);\n color: var(--wg-text);\n }\n\n .meta {\n display: grid;\n gap: var(--wg-space-2);\n }\n\n .meta-row {\n display: grid;\n grid-template-columns:\n minmax(5.5rem, 6rem) minmax(0, 1fr)\n 1.75rem;\n align-items: center;\n column-gap: 0.625rem;\n min-height: 1.75rem;\n min-width: 0;\n }\n\n .meta-row--copy {\n grid-template-columns:\n minmax(5.5rem, 6rem) minmax(0, 1fr)\n 1.75rem;\n }\n\n .meta-row wg-copy-button {\n justify-self: end;\n align-self: center;\n }\n\n .meta-title {\n margin: 0;\n color: var(--wg-text-secondary);\n font-size: var(--wg-font-size-xs);\n font-weight: var(--wg-font-weight-semibold);\n line-height: 1.3;\n white-space: nowrap;\n }\n\n .meta-value {\n margin: 0;\n color: var(--wg-text);\n font-size: var(--wg-font-size-sm);\n min-width: 0;\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 1.35;\n text-align: right;\n white-space: nowrap;\n }\n `,\n ]\n\n private _onClick() {\n if (this.idp && !this.readonly) {\n this.dispatchEvent(new IdpCardReviewEvent(this.idp))\n }\n }\n\n render() {\n if (!this.idp) {\n return html`<article class=\"wg-card idp-card\">\n No identity provider supplied\n </article>`\n }\n\n return html`\n <article\n class=\"wg-card idp-card${this.readonly ? ' readonly' : ''}\"\n @click=${this._onClick}\n >\n <p class=\"card-title\">${this.idp.id}</p>\n\n <div class=\"meta\">\n <div class=\"meta-row\">\n <p class=\"meta-title\">Type</p>\n <p class=\"meta-value\">${this.idp.type}</p>\n </div>\n\n ${\n 'issuer' in this.idp\n ? html`\n <div class=\"meta-row meta-row--copy\">\n <p class=\"meta-title\">Issuer</p>\n <p\n class=\"meta-value\"\n title=${this.idp.issuer}\n >\n ${this.idp.issuer}\n </p>\n <wg-copy-button\n .value=${this.idp.issuer}\n label=\"Copy issuer URL\"\n ></wg-copy-button>\n </div>\n `\n : ''\n }\n ${\n 'configUrl' in this.idp && this.idp.configUrl\n ? html`\n <div class=\"meta-row meta-row--copy\">\n <p class=\"meta-title\">Config URL</p>\n <p\n class=\"meta-value\"\n title=${this.idp.configUrl}\n >\n ${this.idp.configUrl}\n </p>\n <wg-copy-button\n .value=${this.idp.configUrl}\n label=\"Copy config URL\"\n ></wg-copy-button>\n </div>\n `\n : ''\n }\n </div>\n </article>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { css, html, nothing, type PropertyValues } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport type { Idp } from '@canton-network/core-wallet-user-rpc-client'\nimport { BaseElement } from '../internal/base-element'\nimport { chevronDownIcon } from '../icons/index.js'\n\n/** Emitted when the user saves (add or update) an IDP */\nexport class IdpFormSaveEvent extends Event {\n constructor(public idp: Idp) {\n super('idp-form-save', { bubbles: true, composed: true })\n }\n}\n\n/** Emitted when the user clicks Delete */\nexport class IdpFormDeleteEvent extends Event {\n constructor(public idp: Idp) {\n super('idp-form-delete', { bubbles: true, composed: true })\n }\n}\n\n/** Emitted when the user clicks Cancel */\nexport class IdpFormCancelEvent extends Event {\n constructor() {\n super('idp-form-cancel', { bubbles: true, composed: true })\n }\n}\n\n/** Emitted when the user clicks Back */\nexport class IdpFormBackEvent extends Event {\n constructor() {\n super('idp-form-back', { bubbles: true, composed: true })\n }\n}\n\nexport\n@customElement('idp-form')\nclass IdpFormComponent extends BaseElement {\n /** 'add' = creating a new IDP, 'review' = viewing/editing an existing one */\n @property({ type: String })\n accessor mode: 'add' | 'review' = 'add'\n\n @property({ type: Object })\n accessor idp: Idp = {\n id: '',\n type: 'oauth',\n issuer: '',\n configUrl: '',\n }\n\n @property({ type: Boolean }) accessor loading = false\n\n @state() private accessor _error = ''\n @state() private accessor selectedType: Idp['type'] = 'oauth'\n\n private _draftId = ''\n private _draftIssuer = ''\n private _draftConfigUrl = ''\n\n @query('#idp-id') accessor idpIdInput: HTMLInputElement | null = null\n @query('#idp-issuer') accessor idpIssuerInput: HTMLInputElement | null =\n null\n @query('#idp-config-url')\n accessor idpConfigUrlInput: HTMLInputElement | null = null\n\n static styles = [\n BaseElement.styles,\n css`\n :host {\n display: block;\n }\n\n .form-fields {\n gap: var(--wg-space-4);\n }\n\n .field-group {\n gap: var(--wg-space-2);\n }\n\n .field-label {\n font-size: var(--wg-font-size-sm);\n font-weight: var(--wg-font-weight-medium);\n color: var(--wg-text-secondary);\n line-height: var(--wg-line-height-tight);\n }\n\n .required {\n color: var(--wg-label-required-color);\n }\n\n .field-help {\n font-size: var(--wg-font-size-xs);\n color: var(--wg-text-secondary);\n margin-top: calc(-1 * var(--wg-space-1));\n }\n\n .field-control {\n width: 100%;\n border: 1px solid var(--wg-input-border);\n border-radius: 4px;\n background: var(--wg-input-bg);\n color: var(--wg-input-text);\n padding: 12px 14px;\n }\n\n .field-control::placeholder {\n color: var(--wg-input-placeholder);\n }\n\n .field-control:focus {\n border-color: var(--wg-input-border-focus);\n box-shadow: 0 0 0 3px rgba(var(--wg-accent-rgb), 0.12);\n }\n\n .field-control:disabled {\n background: rgba(var(--wg-shade-rgb), 0.04);\n color: var(--wg-text-secondary);\n opacity: 1;\n }\n\n .select-wrap {\n position: relative;\n }\n\n .select-wrap .field-control {\n padding-right: 40px;\n appearance: none;\n -webkit-appearance: none;\n }\n\n .select-chevron {\n position: absolute;\n top: 50%;\n right: 12px;\n transform: translateY(-50%);\n color: var(--wg-text-secondary);\n pointer-events: none;\n display: inline-flex;\n }\n\n .delete-section {\n margin-top: var(--wg-space-8);\n padding-top: var(--wg-space-6);\n border-top: 1px solid var(--wg-border);\n }\n\n .delete-title {\n margin: 0 0 var(--wg-space-2);\n font-size: var(--wg-font-size-base);\n font-weight: var(--wg-font-weight-bold);\n color: var(--wg-text);\n }\n\n .delete-desc {\n margin: 0 0 var(--wg-space-4);\n font-size: var(--wg-font-size-sm);\n color: var(--wg-text-secondary);\n }\n\n .btn-delete {\n display: inline-flex;\n align-items: center;\n gap: var(--wg-space-1);\n border: 1px solid var(--wg-error);\n border-radius: var(--wg-radius-full);\n background: transparent;\n color: var(--wg-error);\n font-size: var(--wg-font-size-sm);\n font-weight: var(--wg-font-weight-semibold);\n padding: 0.4rem 1rem;\n cursor: pointer;\n transition:\n background 0.2s ease,\n color 0.2s ease;\n }\n\n .btn-delete:hover {\n background: rgba(var(--wg-error-rgb), 0.08);\n }\n\n .form-error {\n color: var(--wg-error);\n font-size: var(--wg-font-size-sm);\n margin: var(--wg-space-2) 0;\n }\n\n .form-actions {\n display: flex;\n gap: var(--wg-space-3);\n margin-top: var(--wg-space-6);\n }\n\n .form-actions > button {\n flex: 1 1 0;\n min-width: 0;\n min-height: 2.875rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0.7rem 1.5rem;\n font-size: var(--wg-font-size-base);\n font-weight: var(--wg-font-weight-semibold);\n line-height: 1.2;\n }\n\n .btn-cancel {\n border: 1px solid var(--wg-border);\n border-radius: var(--wg-radius-full);\n background: var(--wg-input-bg);\n color: var(--wg-text);\n cursor: pointer;\n transition:\n background 0.2s ease,\n opacity 0.2s ease;\n }\n\n .btn-cancel:hover {\n background: var(--wg-border);\n }\n\n .btn-submit {\n border-width: 1px;\n }\n `,\n ]\n\n protected willUpdate(changedProperties: PropertyValues<this>): void {\n if (changedProperties.has('idp')) {\n this.selectedType = this.idp.type\n this._draftId = this.idp.id\n this._draftIssuer = 'issuer' in this.idp ? this.idp.issuer : ''\n this._draftConfigUrl =\n 'configUrl' in this.idp ? this.idp.configUrl : ''\n }\n }\n\n private handleTypeChange(event: Event): void {\n this._draftId = this.idpIdInput?.value ?? this._draftId\n this._draftIssuer = this.idpIssuerInput?.value ?? this._draftIssuer\n this._draftConfigUrl =\n this.idpConfigUrlInput?.value ?? this._draftConfigUrl\n this.selectedType = (event.target as HTMLSelectElement).value as\n | 'oauth'\n | 'self_signed'\n | 'self_issued'\n }\n\n private handleSubmit(e: Event) {\n e.preventDefault()\n\n const id = this.idpIdInput?.value ?? this._draftId\n const type = this.selectedType\n const issuer = this.idpIssuerInput?.value ?? this._draftIssuer\n const configUrl = this.idpConfigUrlInput?.value ?? this._draftConfigUrl\n\n if (\n !id ||\n !type ||\n (type !== 'self_issued' && !issuer) ||\n (type === 'oauth' && !configUrl)\n ) {\n this._error = 'Please fill in all required fields'\n return\n }\n\n this._error = ''\n let result: Idp\n switch (type) {\n case 'oauth':\n result = { id, type, issuer, configUrl: configUrl! }\n break\n case 'self_signed':\n result = { id, type, issuer }\n break\n case 'self_issued':\n result = { id, type }\n break\n }\n this.dispatchEvent(new IdpFormSaveEvent(result))\n }\n\n private _renderIssuerInput() {\n return html`\n <div class=\"field-group d-flex flex-column\">\n <label for=\"idp-issuer\" class=\"form-label field-label mb-0\">\n Issuer URL <span class=\"required\">*</span>\n </label>\n <input\n ?disabled=${this.loading}\n class=\"form-control field-control\"\n id=\"idp-issuer\"\n type=\"text\"\n placeholder=\"Enter the issuer URL\"\n .value=${this._draftIssuer}\n @input=${(event: Event) => {\n this._draftIssuer = (\n event.target as HTMLInputElement\n ).value\n }}\n required\n />\n </div>\n `\n }\n\n private _renderConfigUrlInput() {\n return html`\n <div class=\"field-group d-flex flex-column\">\n <label for=\"idp-config-url\" class=\"form-label field-label mb-0\">\n Config URL <span class=\"required\">*</span>\n </label>\n <input\n ?disabled=${this.loading}\n class=\"form-control field-control\"\n id=\"idp-config-url\"\n type=\"text\"\n placeholder=\"Enter the configuration URL\"\n .value=${this._draftConfigUrl}\n @input=${(event: Event) => {\n this._draftConfigUrl = (\n event.target as HTMLInputElement\n ).value\n }}\n required\n />\n </div>\n `\n }\n\n private _renderIdpFields() {\n const commonFields = html`\n <div class=\"field-group d-flex flex-column\">\n <label for=\"idp-id\" class=\"form-label field-label mb-0\">\n ID <span class=\"required\">*</span>\n </label>\n <input\n ?disabled=${this.loading}\n class=\"form-control field-control\"\n id=\"idp-id\"\n type=\"text\"\n placeholder=\"Enter the identity provider ID\"\n .value=${this._draftId}\n @input=${(event: Event) => {\n this._draftId = (event.target as HTMLInputElement).value\n }}\n required\n />\n <p class=\"field-help mb-0\">\n A unique identifier for the identity provider\n </p>\n </div>\n\n <div class=\"field-group d-flex flex-column\">\n <label for=\"idp-type\" class=\"form-label field-label mb-0\">\n Type <span class=\"required\">*</span>\n </label>\n <div class=\"select-wrap\">\n <select\n ?disabled=${this.loading}\n class=\"form-select field-control\"\n id=\"idp-type\"\n .value=${this.selectedType}\n @change=${this.handleTypeChange}\n required\n >\n <option value=\"oauth\">oauth</option>\n <option value=\"self_signed\">self_signed</option>\n <option value=\"self_issued\">self_issued</option>\n </select>\n <span class=\"select-chevron\">${chevronDownIcon}</span>\n </div>\n </div>\n `\n\n switch (this.selectedType) {\n case 'oauth':\n return html`${commonFields} ${this._renderIssuerInput()}\n ${this._renderConfigUrlInput()}`\n case 'self_signed':\n return html`${commonFields} ${this._renderIssuerInput()}`\n case 'self_issued':\n return commonFields\n }\n }\n\n render() {\n const isReview = this.mode === 'review'\n\n return html`\n <form class=\"d-flex flex-column h-100\" @submit=${this.handleSubmit}>\n <div class=\"form-fields d-flex flex-column\">\n ${this._renderIdpFields()}\n </div>\n\n ${\n this._error\n ? html`<div class=\"form-error\">${this._error}</div>`\n : nothing\n }\n ${\n isReview\n ? html`\n <div class=\"delete-section\">\n <h4 class=\"delete-title\">\n Delete identity provider\n </h4>\n <p class=\"delete-desc\">\n You will not be able to undo the change\n once you delete this Identity Provider.\n </p>\n <button\n type=\"button\"\n class=\"btn-delete\"\n @click=${() =>\n this.dispatchEvent(\n new IdpFormDeleteEvent(this.idp)\n )}\n >\n Delete identity provider\n </button>\n </div>\n\n <div class=\"form-actions\">\n <button\n type=\"button\"\n class=\"btn-cancel\"\n @click=${() =>\n this.dispatchEvent(\n new IdpFormCancelEvent()\n )}\n >\n Cancel\n </button>\n <button\n class=\"btn btn-primary rounded-pill btn-submit\"\n ?disabled=${this.loading}\n type=\"submit\"\n >\n Update\n </button>\n </div>\n `\n : html`\n <div class=\"mt-auto pt-3\">\n <button\n class=\"btn btn-primary rounded-pill w-100\"\n ?disabled=${this.loading}\n type=\"submit\"\n >\n Add\n </button>\n </div>\n `\n }\n </form>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { customElement, property } from 'lit/decorators.js'\nimport { BaseElement } from '../internal/base-element'\nimport { css, html } from 'lit'\nimport type { PublicNetwork } from '@canton-network/core-wallet-user-rpc-client'\nimport { cardStyles } from '../styles/card'\nimport './copy-button.js'\n\n/** Emitted when the user clicks a network card to review it */\nexport class NetworkCardReviewEvent extends Event {\n constructor(public network: PublicNetwork) {\n super('network-review', { bubbles: true, composed: true })\n }\n}\n\n/** Emitted when the user clicks the \"Delete\" button on a network card */\nexport class NetworkCardDeleteEvent extends Event {\n constructor(public network: PublicNetwork) {\n super('delete', { bubbles: true, composed: true })\n }\n}\n\n/** Emitted when the user clicks the \"Update\" button on a network card */\nexport class NetworkCardUpdateEvent extends Event {\n constructor() {\n super('update', { bubbles: true, composed: true })\n }\n}\n\nexport\n@customElement('network-card')\nclass NetworkCard extends BaseElement {\n @property({ type: Object }) accessor network: PublicNetwork | null = null\n @property({ type: Boolean }) accessor activeSession = false\n @property({ type: String }) accessor accessToken = ''\n @property({ type: Boolean }) accessor readonly = false\n\n static styles = [\n BaseElement.styles,\n cardStyles,\n css`\n :host {\n display: block;\n }\n\n .net-card {\n padding: var(--wg-space-3);\n cursor: pointer;\n gap: var(--wg-space-3);\n transition:\n border-color 0.2s ease,\n box-shadow 0.2s ease;\n }\n\n .net-card.readonly {\n cursor: initial;\n }\n\n .net-card:not(.readonly):hover {\n border-color: var(--wg-accent);\n box-shadow: var(--wg-shadow-md);\n }\n\n .card-header {\n display: flex;\n align-items: center;\n gap: var(--wg-space-2);\n }\n\n .card-title {\n margin: 0;\n font-size: var(--wg-font-size-base);\n font-weight: var(--wg-font-weight-bold);\n color: var(--wg-text);\n }\n\n .badge-connected {\n display: inline-flex;\n align-items: center;\n border-radius: var(--wg-radius-full);\n padding: 0.15rem 0.55rem;\n font-size: var(--wg-font-size-xs);\n font-weight: var(--wg-font-weight-semibold);\n letter-spacing: 0.04em;\n background: rgba(var(--wg-success-rgb), 0.14);\n color: var(--wg-success);\n }\n\n .meta {\n display: grid;\n gap: var(--wg-space-2);\n }\n\n .meta-row {\n display: grid;\n grid-template-columns:\n minmax(5.5rem, 6rem) minmax(0, 1fr)\n 1.75rem;\n align-items: center;\n column-gap: 0.625rem;\n min-height: 1.75rem;\n min-width: 0;\n }\n\n .meta-row--copy {\n grid-template-columns:\n minmax(5.5rem, 6rem) minmax(0, 1fr)\n 1.75rem;\n }\n\n .meta-row wg-copy-button {\n justify-self: end;\n align-self: center;\n }\n\n .meta-title {\n margin: 0;\n color: var(--wg-text-secondary);\n font-size: var(--wg-font-size-xs);\n font-weight: var(--wg-font-weight-semibold);\n line-height: 1.3;\n white-space: nowrap;\n }\n\n .meta-value {\n margin: 0;\n color: var(--wg-text);\n font-size: var(--wg-font-size-sm);\n min-width: 0;\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 1.35;\n text-align: right;\n white-space: nowrap;\n }\n\n .meta-value-muted {\n color: var(--wg-text-secondary);\n }\n `,\n ]\n\n private _onClick() {\n if (this.network && !this.readonly) {\n this.dispatchEvent(new NetworkCardReviewEvent(this.network))\n }\n }\n\n render() {\n if (!this.network) {\n return html`<article\n class=\"wg-card net-card${this.readonly ? ' readonly' : ''}\"\n >\n No network supplied\n </article>`\n }\n\n const syncId = this.network.synchronizerId || ''\n\n return html`\n <article\n class=\"wg-card net-card${this.readonly ? ' readonly' : ''}\"\n @click=${this._onClick}\n >\n <div class=\"card-header\">\n <p class=\"card-title\">${this.network.name}</p>\n ${\n this.activeSession\n ? html`<span class=\"badge-connected\"\n >CONNECTED</span\n >`\n : ''\n }\n </div>\n\n <div class=\"meta\">\n <div class=\"meta-row\">\n <p class=\"meta-title\">ID</p>\n <p class=\"meta-value\">${this.network.id}</p>\n </div>\n\n ${\n this.activeSession\n ? html`\n <div class=\"meta-row meta-row--copy\">\n <p class=\"meta-title\">Access Token</p>\n <p class=\"meta-value meta-value-muted\">\n [private]\n </p>\n <wg-copy-button\n .value=${this.accessToken}\n label=\"Copy access token\"\n ></wg-copy-button>\n </div>\n `\n : ''\n }\n\n <div class=\"meta-row\">\n <p class=\"meta-title\">Auth</p>\n <p class=\"meta-value\">${this.network.authMethod}</p>\n </div>\n\n ${\n syncId\n ? html`\n <div class=\"meta-row meta-row--copy\">\n <p class=\"meta-title\">Synchronizer</p>\n <p class=\"meta-value\" title=${syncId}>\n ${syncId}\n </p>\n <wg-copy-button\n .value=${syncId}\n label=\"Copy synchronizer ID\"\n ></wg-copy-button>\n </div>\n `\n : ''\n }\n ${\n this.network.identityProviderId\n ? html`\n <div class=\"meta-row\">\n <p class=\"meta-title\">\n Identity provider\n </p>\n <p\n class=\"meta-value\"\n title=${this.network.identityProviderId}\n >\n ${this.network.identityProviderId}\n </p>\n </div>\n `\n : ''\n }\n </div>\n </article>\n `\n }\n}\n","const encoder = new TextEncoder(), decoder = new TextDecoder(), strictDecoder = new TextDecoder(\"utf-8\", { fatal: !0 }), UINT32_RANGE = 2 ** 32;\nfunction concat(...buffers) {\n const size = buffers.reduce((acc, { length }) => acc + length, 0), buf = new Uint8Array(size);\n let i = 0;\n for (const buffer of buffers)\n buf.set(buffer, i), i += buffer.length;\n return buf;\n}\nfunction writeUInt32BE(buf, value, offset) {\n if (value < 0 || value >= UINT32_RANGE)\n throw new RangeError(`value must be >= 0 and <= ${UINT32_RANGE - 1}. Received ${value}`);\n buf.set([value >>> 24, value >>> 16, value >>> 8, value & 255], offset);\n}\nfunction uint64be(value) {\n const high = Math.floor(value / UINT32_RANGE), low = value % UINT32_RANGE, buf = new Uint8Array(8);\n return writeUInt32BE(buf, high, 0), writeUInt32BE(buf, low, 4), buf;\n}\nfunction uint32be(value) {\n const buf = new Uint8Array(4);\n return writeUInt32BE(buf, value), buf;\n}\nconst NON_ASCII = /[^\\x00-\\x7f]/;\nfunction encode(string) {\n if (typeof string == \"string\" && string.length >= 128) {\n if (NON_ASCII.test(string))\n throw new TypeError(\"non-ASCII string encountered in encode()\");\n return encoder.encode(string);\n }\n const bytes = new Uint8Array(string.length);\n for (let i = 0; i < string.length; i++) {\n const code = string.charCodeAt(i);\n if (code > 127)\n throw new TypeError(\"non-ASCII string encountered in encode()\");\n bytes[i] = code;\n }\n return bytes;\n}\nfunction encodeBase64(input, url = !1) {\n if (Uint8Array.prototype.toBase64)\n return input.toBase64({ alphabet: url ? \"base64url\" : \"base64\", omitPadding: url });\n const CHUNK_SIZE = 32768, arr = [];\n for (let i = 0; i < input.length; i += CHUNK_SIZE)\n arr.push(String.fromCharCode.apply(null, input.subarray(i, i + CHUNK_SIZE)));\n const encoded = btoa(arr.join(\"\"));\n return url ? encoded.replace(/=/g, \"\").replace(/\\+/g, \"-\").replace(/\\//g, \"_\") : encoded;\n}\nfunction decodeBase64(encoded, url = !1) {\n if (Uint8Array.fromBase64)\n return Uint8Array.fromBase64(encoded, { alphabet: url ? \"base64url\" : \"base64\" });\n if (url) {\n if (encoded.includes(\"+\") || encoded.includes(\"/\"))\n throw new TypeError(\"Invalid base64url\");\n encoded = encoded.replace(/-/g, \"+\").replace(/_/g, \"/\");\n }\n const binary = atob(encoded), bytes = new Uint8Array(binary.length);\n for (let i = 0; i < binary.length; i++)\n bytes[i] = binary.charCodeAt(i);\n return bytes;\n}\nasync function digest(algorithm, data) {\n const subtleDigest = `SHA-${algorithm.slice(-3)}`;\n return new Uint8Array(await crypto.subtle.digest(subtleDigest, data));\n}\nexport {\n concat,\n decodeBase64,\n decoder,\n digest,\n encode,\n encodeBase64,\n encoder,\n strictDecoder,\n uint32be,\n uint64be\n};\n","class JOSEError extends Error {\n static code = \"ERR_JOSE_GENERIC\";\n code = \"ERR_JOSE_GENERIC\";\n constructor(message, options) {\n super(message, options), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor);\n }\n}\nclass JWTClaimValidationFailed extends JOSEError {\n static code = \"ERR_JWT_CLAIM_VALIDATION_FAILED\";\n code = \"ERR_JWT_CLAIM_VALIDATION_FAILED\";\n claim;\n reason;\n payload;\n constructor(message, payload, claim = \"unspecified\", reason = \"unspecified\") {\n super(message, { cause: { claim, reason, payload } }), this.claim = claim, this.reason = reason, this.payload = payload;\n }\n}\nclass JWTExpired extends JOSEError {\n static code = \"ERR_JWT_EXPIRED\";\n code = \"ERR_JWT_EXPIRED\";\n claim;\n reason;\n payload;\n constructor(message, payload, claim = \"unspecified\", reason = \"unspecified\") {\n super(message, { cause: { claim, reason, payload } }), this.claim = claim, this.reason = reason, this.payload = payload;\n }\n}\nclass JOSEAlgNotAllowed extends JOSEError {\n static code = \"ERR_JOSE_ALG_NOT_ALLOWED\";\n code = \"ERR_JOSE_ALG_NOT_ALLOWED\";\n}\nclass JOSENotSupported extends JOSEError {\n static code = \"ERR_JOSE_NOT_SUPPORTED\";\n code = \"ERR_JOSE_NOT_SUPPORTED\";\n}\nclass JWEDecryptionFailed extends JOSEError {\n static code = \"ERR_JWE_DECRYPTION_FAILED\";\n code = \"ERR_JWE_DECRYPTION_FAILED\";\n constructor(message = \"decryption operation failed\", options) {\n super(message, options);\n }\n}\nclass JWEInvalid extends JOSEError {\n static code = \"ERR_JWE_INVALID\";\n code = \"ERR_JWE_INVALID\";\n}\nclass JWSInvalid extends JOSEError {\n static code = \"ERR_JWS_INVALID\";\n code = \"ERR_JWS_INVALID\";\n}\nclass JWTInvalid extends JOSEError {\n static code = \"ERR_JWT_INVALID\";\n code = \"ERR_JWT_INVALID\";\n}\nclass JWKInvalid extends JOSEError {\n static code = \"ERR_JWK_INVALID\";\n code = \"ERR_JWK_INVALID\";\n}\nclass JWKSInvalid extends JOSEError {\n static code = \"ERR_JWKS_INVALID\";\n code = \"ERR_JWKS_INVALID\";\n}\nclass JWKSNoMatchingKey extends JOSEError {\n static code = \"ERR_JWKS_NO_MATCHING_KEY\";\n code = \"ERR_JWKS_NO_MATCHING_KEY\";\n constructor(message = \"no applicable key found in the JSON Web Key Set\", options) {\n super(message, options);\n }\n}\nclass JWKSMultipleMatchingKeys extends JOSEError {\n [Symbol.asyncIterator] = async function* () {\n };\n static code = \"ERR_JWKS_MULTIPLE_MATCHING_KEYS\";\n code = \"ERR_JWKS_MULTIPLE_MATCHING_KEYS\";\n constructor(message = \"multiple matching keys found in the JSON Web Key Set\", options) {\n super(message, options);\n }\n}\nclass JWKSTimeout extends JOSEError {\n static code = \"ERR_JWKS_TIMEOUT\";\n code = \"ERR_JWKS_TIMEOUT\";\n constructor(message = \"request timed out\", options) {\n super(message, options);\n }\n}\nclass JWSSignatureVerificationFailed extends JOSEError {\n static code = \"ERR_JWS_SIGNATURE_VERIFICATION_FAILED\";\n code = \"ERR_JWS_SIGNATURE_VERIFICATION_FAILED\";\n constructor(message = \"signature verification failed\", options) {\n super(message, options);\n }\n}\nexport {\n JOSEAlgNotAllowed,\n JOSEError,\n JOSENotSupported,\n JWEDecryptionFailed,\n JWEInvalid,\n JWKInvalid,\n JWKSInvalid,\n JWKSMultipleMatchingKeys,\n JWKSNoMatchingKey,\n JWKSTimeout,\n JWSInvalid,\n JWSSignatureVerificationFailed,\n JWTClaimValidationFailed,\n JWTExpired,\n JWTInvalid\n};\n","import { encoder, decoder, encodeBase64, decodeBase64 } from \"../lib/buffer_utils.js\";\nconst invalid = \"The input to be decoded is not correctly encoded.\";\nfunction decode(input) {\n try {\n return decodeBase64(typeof input == \"string\" ? input : decoder.decode(input), !0);\n } catch (cause) {\n throw new TypeError(invalid, { cause });\n }\n}\nfunction encode(input) {\n return encodeBase64(typeof input == \"string\" ? encoder.encode(input) : input, !0);\n}\nexport {\n decode,\n encode\n};\n","import { JOSENotSupported, JWSInvalid } from \"../util/errors.js\";\nimport { decode } from \"../util/base64url.js\";\nimport { encode, strictDecoder } from \"./buffer_utils.js\";\nfunction assertUint8Array(input, label) {\n if (!(input instanceof Uint8Array))\n throw new TypeError(`${label} must be an instance of Uint8Array`);\n}\nfunction isObject(input) {\n if (typeof input != \"object\" || input === null || Object.prototype.toString.call(input) !== \"[object Object]\")\n return !1;\n const prototype = Object.getPrototypeOf(input);\n return prototype === null || Object.getPrototypeOf(prototype) === null;\n}\nfunction isJwkSet(input) {\n return isObject(input) && Array.isArray(input.keys) && Array.from(input.keys).every(isObject);\n}\nfunction isDisjoint(...headers) {\n const parameters = /* @__PURE__ */ new Set();\n for (const header of headers)\n if (header)\n for (const parameter of Object.keys(header)) {\n if (parameters.has(parameter))\n return !1;\n parameters.add(parameter);\n }\n return !0;\n}\nfunction assertNotSet(value, name) {\n if (value !== void 0)\n throw new TypeError(`${name} can only be called once`);\n}\nfunction decodeBase64url(value, label, ErrorClass) {\n try {\n return decode(value);\n } catch (cause) {\n throw new ErrorClass(`Failed to base64url decode the ${label}`, { cause });\n }\n}\nfunction encodeAsciiMember(value, label, ErrorClass) {\n try {\n return encode(value);\n } catch (cause) {\n throw new ErrorClass(`The ${label} is not a valid base64url string`, { cause });\n }\n}\nfunction parseJoseHeader(encodedProtectedHeader, ErrorClass, message) {\n let parsed;\n try {\n parsed = JSON.parse(strictDecoder.decode(decode(encodedProtectedHeader)));\n } catch (cause) {\n throw new ErrorClass(message, { cause });\n }\n if (!isObject(parsed))\n throw new ErrorClass(message);\n return parsed;\n}\nconst JWS_RECOGNIZED = { __proto__: null, b64: !0 }, JWE_RECOGNIZED = { __proto__: null };\nfunction validateAlgorithms(option, algorithms) {\n if (algorithms !== void 0 && (!Array.isArray(algorithms) || algorithms.some((s) => typeof s != \"string\")))\n throw new TypeError(`\"${option}\" option must be an array of strings`);\n return algorithms === void 0 ? void 0 : new Set(algorithms);\n}\nfunction validateCritDuplicates(Err, protectedHeader) {\n const { crit } = protectedHeader ?? {};\n if (Array.isArray(crit) && new Set(crit).size !== crit.length)\n throw new Err('\"crit\" (Critical) Header Parameter MUST NOT contain duplicate values');\n}\nfunction validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) {\n if (joseHeader.crit !== void 0 && protectedHeader?.crit === void 0)\n throw new Err('\"crit\" (Critical) Header Parameter MUST be integrity protected');\n if (!protectedHeader || protectedHeader.crit === void 0)\n return [];\n if (!Array.isArray(protectedHeader.crit) || protectedHeader.crit.length === 0 || protectedHeader.crit.some((input) => typeof input != \"string\" || input.length === 0))\n throw new Err('\"crit\" (Critical) Header Parameter MUST be an array of non-empty strings when present');\n const recognized = recognizedOption === void 0 ? recognizedDefault : { __proto__: null, ...recognizedOption, ...recognizedDefault };\n for (const parameter of protectedHeader.crit) {\n if (!(parameter in recognized))\n throw new JOSENotSupported(`Extension Header Parameter \"${parameter}\" is not recognized`);\n if (!Object.hasOwn(joseHeader, parameter) || joseHeader[parameter] === void 0)\n throw new Err(`Extension Header Parameter \"${parameter}\" is missing`);\n if (recognized[parameter] && (!Object.hasOwn(protectedHeader, parameter) || protectedHeader[parameter] === void 0))\n throw new Err(`Extension Header Parameter \"${parameter}\" MUST be integrity protected`);\n }\n return protectedHeader.crit;\n}\nfunction validateB64(protectedHeader, extensions) {\n if (extensions.includes(\"b64\")) {\n const b64 = protectedHeader.b64;\n if (typeof b64 != \"boolean\")\n throw new JWSInvalid('The \"b64\" (base64url-encode payload) Header Parameter must be a boolean');\n return b64;\n }\n return !0;\n}\nfunction serializeJoseHeader(Err, header) {\n let serialized, parsed;\n try {\n serialized = JSON.stringify(header), parsed = JSON.parse(serialized);\n } catch (cause) {\n throw new Err(\"JOSE Header is not valid JSON\", { cause });\n }\n if (!isObject(parsed))\n throw new Err(\"JOSE Header is not a JSON object\");\n return [parsed, serialized];\n}\nexport {\n JWE_RECOGNIZED,\n JWS_RECOGNIZED,\n assertNotSet,\n assertUint8Array,\n decodeBase64url,\n encodeAsciiMember,\n isDisjoint,\n isJwkSet,\n isObject,\n parseJoseHeader,\n serializeJoseHeader,\n validateAlgorithms,\n validateB64,\n validateCrit,\n validateCritDuplicates\n};\n","import { isObject } from \"./validate.js\";\nimport { decode } from \"../util/base64url.js\";\nimport { JOSENotSupported } from \"../util/errors.js\";\nconst tag = (key) => key[Symbol.toStringTag], jwkMatchesOp = (entry, key, usage) => {\n const { alg } = entry;\n if (key.use !== void 0) {\n const expected = usage === \"sign\" || usage === \"verify\" ? \"sig\" : \"enc\";\n if (key.use !== expected)\n throw new TypeError(`Invalid key for this operation, its \"use\" must be \"${expected}\" when present`);\n }\n if (key.alg !== void 0 && key.alg !== alg)\n throw new TypeError(`Invalid key for this operation, its \"alg\" must be \"${alg}\" when present`);\n if (Array.isArray(key.key_ops)) {\n const expectedKeyOp = usage === \"encrypt\" || usage === \"decrypt\" ? entry.ops?.[usage === \"encrypt\" ? 0 : 1] : usage;\n if (expectedKeyOp && !key.key_ops.includes(expectedKeyOp))\n throw new TypeError(`Invalid key for this operation, its \"key_ops\" must include \"${expectedKeyOp}\" when present`);\n }\n};\nasync function prepareKey(entry, key, usage) {\n const { alg, secret } = entry, requiresPrivateKey = usage === \"decrypt\" || usage === \"sign\";\n if (secret && key instanceof Uint8Array)\n return key;\n let normalized, keyObject;\n if (isObject(key)) {\n if (normalized = normalizeJwk(key), typeof normalized.kty != \"string\")\n throw invalidKeyType(alg, key, secret);\n if (!(secret ? normalized.kty === \"oct\" && typeof normalized.k == \"string\" : normalized.kty !== \"oct\" && (requiresPrivateKey ? normalized.kty === \"AKP\" && typeof normalized.priv == \"string\" || typeof normalized.d == \"string\" : normalized.d === void 0 && normalized.priv === void 0)))\n throw new TypeError(secret ? 'JSON Web Key for symmetric algorithms must have JWK \"kty\" (Key Type) equal to \"oct\" and the JWK \"k\" (Key Value) present' : `JSON Web Key for this operation must be a ${requiresPrivateKey ? \"private\" : \"public\"} JWK`);\n if (jwkMatchesOp(entry, normalized, usage), normalized.kty === \"oct\")\n return decode(normalized.k);\n if (!Object.isFrozen(key)) {\n const { key_ops } = key;\n Array.isArray(key_ops) && Object.freeze(key_ops), Object.freeze(key);\n }\n } else {\n if (!isKeyLike(key))\n throw invalidKeyType(alg, key, secret);\n const expectedType = secret ? \"secret\" : requiresPrivateKey ? \"private\" : \"public\";\n if (key.type !== expectedType && (secret || [\"secret\", \"public\", \"private\"].includes(key.type)))\n throw new TypeError(`${tag(key)} instances must be of type \"${expectedType}\" for the ${alg} algorithm`);\n if (isCryptoKey(key))\n return key;\n if (keyObject = key, keyObject.type === \"secret\")\n return keyObject.export();\n }\n cache ||= /* @__PURE__ */ new WeakMap();\n const cacheKey = key;\n let cached = cache.get(cacheKey);\n if (cached?.[alg])\n return cached[alg];\n if (cached || cache.set(cacheKey, cached = {}), keyObject && typeof keyObject.toCryptoKey == \"function\") {\n const isPublic = keyObject.type === \"public\", crv = nist[keyObject.asymmetricKeyDetails?.namedCurve], params = entry.resolve?.({ crv, asymmetricKeyType: keyObject.asymmetricKeyType }) ?? entry.subtle;\n return cached[alg] = keyObject.toCryptoKey(params, isPublic, entry.usages[isPublic ? 0 : 1]);\n }\n return normalized ??= keyObject.export({ format: \"jwk\" }), normalized.alg = alg, cached[alg] = await jwkToKey(entry, normalized);\n}\nlet cache;\nconst nist = {\n __proto__: null,\n prime256v1: \"P-256\",\n secp384r1: \"P-384\",\n secp521r1: \"P-521\"\n};\nfunction assertCryptoKey(key) {\n if (!isCryptoKey(key))\n throw new Error(\"CryptoKey instance expected\");\n}\nconst isCryptoKey = (key) => {\n if (key?.[Symbol.toStringTag] === \"CryptoKey\")\n return !0;\n try {\n return key instanceof CryptoKey;\n } catch {\n return !1;\n }\n}, isKeyObject = (key) => key?.[Symbol.toStringTag] === \"KeyObject\", isKeyLike = (key) => isCryptoKey(key) || isKeyObject(key);\nfunction message(msg, actual, ...types) {\n if (types.length > 2) {\n const last = types.pop();\n msg += `one of type ${types.join(\", \")}, or ${last}.`;\n } else types.length === 2 ? msg += `one of type ${types[0]} or ${types[1]}.` : msg += `of type ${types[0]}.`;\n return actual == null ? msg += ` Received ${actual}` : typeof actual == \"function\" && actual.name ? msg += ` Received function ${actual.name}` : typeof actual == \"object\" && actual != null && actual.constructor?.name && (msg += ` Received an instance of ${actual.constructor.name}`), msg;\n}\nconst invalidKeyInput = (actual, ...types) => message(\"Key must be \", actual, ...types);\nfunction invalidKeyType(alg, actual, secret) {\n const types = [\"CryptoKey\", \"KeyObject\", \"JSON Web Key\"];\n return secret && types.push(\"Uint8Array\"), new TypeError(message(`Key for the ${alg} algorithm must be `, actual, ...types));\n}\nconst unusable = (name, prop = \"algorithm.name\") => new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`);\nfunction checkUsage(key, usage) {\n if (usage && !key.usages.includes(usage))\n throw new TypeError(`CryptoKey does not support this operation, its usages must include ${usage}.`);\n}\nfunction checkModulusLength(alg, key) {\n const { modulusLength } = key.algorithm;\n if (typeof modulusLength != \"number\" || modulusLength < 2048)\n throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`);\n}\nfunction checkCryptoKey(key, expected, usage) {\n const algorithm = key.algorithm;\n if (algorithm.name !== expected.name)\n throw unusable(expected.name);\n if (expected.hash && algorithm.hash?.name !== expected.hash)\n throw unusable(expected.hash, \"algorithm.hash\");\n if (expected.namedCurve && algorithm.namedCurve !== expected.namedCurve)\n throw unusable(expected.namedCurve, \"algorithm.namedCurve\");\n if (expected.length !== void 0 && algorithm.length !== expected.length)\n throw unusable(expected.length, \"algorithm.length\");\n checkUsage(key, usage);\n}\nfunction snapshotJwk(jwk) {\n return { __proto__: null, ...jwk };\n}\nfunction normalizeJwk(jwk) {\n const normalized = snapshotJwk(jwk);\n if (normalized.ext !== void 0 && typeof normalized.ext != \"boolean\")\n throw new TypeError('\"ext\" (Extractable) Parameter must be a boolean');\n if (normalized.key_ops !== void 0) {\n const value = normalized.key_ops, keyOps = Array.isArray(value) ? [...value] : void 0;\n if (!keyOps || keyOps.some((operation) => typeof operation != \"string\") || new Set(keyOps).size !== keyOps.length)\n throw new TypeError('\"key_ops\" (Key Operations) Parameter must be an array of unique strings');\n normalized.key_ops = keyOps;\n }\n return normalized;\n}\nfunction validateExtractableOption(extractable) {\n if (extractable !== void 0 && typeof extractable != \"boolean\")\n throw new TypeError('\"extractable\" option must be a boolean');\n return extractable;\n}\nasync function jwkToKey(entry, jwk, extractable) {\n if (!entry.kty.includes(jwk.kty))\n throw new JOSENotSupported('Invalid or unsupported JWK \"alg\" (Algorithm) Parameter value');\n const algorithm = entry.resolve?.({ kty: jwk.kty, crv: jwk.crv }) ?? entry.subtle, isPrivate = !!(jwk.d || jwk.priv), keyData = { ...jwk, ext: extractable ?? jwk.ext };\n return keyData.kty !== \"AKP\" && delete keyData.alg, delete keyData.use, crypto.subtle.importKey(\"jwk\", keyData, algorithm, keyData.ext ?? !isPrivate, jwk.key_ops ?? entry.usages[isPrivate ? 1 : 0]);\n}\nasync function rawKey(key, expected, usage, extractable = !1) {\n return key instanceof Uint8Array && (key = await crypto.subtle.importKey(\"raw\", key, expected, extractable, [usage])), checkCryptoKey(key, expected, usage), key;\n}\nexport {\n assertCryptoKey,\n checkCryptoKey,\n checkModulusLength,\n checkUsage,\n invalidKeyInput,\n isCryptoKey,\n isKeyLike,\n isKeyObject,\n jwkToKey,\n normalizeJwk,\n prepareKey,\n rawKey,\n snapshotJwk,\n validateExtractableOption\n};\n","function table(entries) {\n const out = { __proto__: null };\n for (const alg in entries)\n out[alg] = { ...entries[alg], alg };\n return out;\n}\nexport {\n table\n};\n","import { JOSENotSupported } from \"../util/errors.js\";\nimport { table } from \"./key_descriptor.js\";\nconst sig = [[\"verify\"], [\"sign\"]];\nfunction hmac(bits) {\n const subtle = { name: \"HMAC\", hash: `SHA-${bits}` };\n return { kty: [\"oct\"], secret: !0, subtle, signing: subtle, usages: sig };\n}\nfunction rsa(bits, saltLength) {\n const subtle = { name: saltLength ? \"RSA-PSS\" : \"RSASSA-PKCS1-v1_5\", hash: `SHA-${bits}` };\n return {\n kty: [\"RSA\"],\n subtle,\n signing: saltLength ? { ...subtle, saltLength } : subtle,\n usages: sig,\n minRsaBits: 2048\n };\n}\nfunction ecdsa(crv, bits) {\n return {\n kty: [\"EC\"],\n crv,\n subtle: { name: \"ECDSA\", namedCurve: crv },\n signing: { name: \"ECDSA\", hash: `SHA-${bits}` },\n usages: sig\n };\n}\nfunction eddsa() {\n const subtle = { name: \"Ed25519\" };\n return {\n kty: [\"OKP\"],\n crv: \"Ed25519\",\n subtle,\n signing: subtle,\n usages: sig\n };\n}\nfunction mldsa(parameterSet) {\n const subtle = { name: `ML-DSA-${parameterSet}` };\n return {\n kty: [\"AKP\"],\n subtle,\n signing: subtle,\n usages: sig\n };\n}\nconst JWS = table({\n HS256: hmac(256),\n HS384: hmac(384),\n HS512: hmac(512),\n RS256: rsa(256),\n RS384: rsa(384),\n RS512: rsa(512),\n PS256: rsa(256, 32),\n PS384: rsa(384, 48),\n PS512: rsa(512, 64),\n ES256: ecdsa(\"P-256\", 256),\n ES384: ecdsa(\"P-384\", 384),\n ES512: ecdsa(\"P-521\", 512),\n EdDSA: eddsa(),\n Ed25519: eddsa(),\n \"ML-DSA-44\": mldsa(44),\n \"ML-DSA-65\": mldsa(65),\n \"ML-DSA-87\": mldsa(87)\n});\nfunction jwsAlgorithm(alg) {\n const entry = typeof alg == \"string\" ? JWS[alg] : void 0;\n if (!entry)\n throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);\n return entry;\n}\nexport {\n JWS,\n jwsAlgorithm\n};\n","import { JWTClaimValidationFailed, JWTExpired, JWTInvalid } from \"../util/errors.js\";\nimport { encoder, strictDecoder } from \"./buffer_utils.js\";\nimport { isObject } from \"./validate.js\";\nconst epoch = (date) => Math.floor(date.getTime() / 1e3), multipliers = {\n s: 1,\n m: 60,\n h: 3600,\n d: 86400,\n w: 604800,\n y: 31557600\n}, REGEX = /^(\\+|\\-)? ?(\\d+|\\d+\\.\\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, checkFailed = \"check_failed\";\nfunction invalidDuration() {\n throw new TypeError(\"Invalid time period format\");\n}\nfunction secs(str) {\n typeof str != \"string\" && invalidDuration();\n const matched = REGEX.exec(str);\n (!matched || matched[4] && matched[1]) && invalidDuration();\n const value = parseFloat(matched[2]), durationSeconds = Math.round(value * multipliers[matched[3][0].toLowerCase()]);\n return Number.isFinite(durationSeconds) || invalidDuration(), matched[1] === \"-\" || matched[4] === \"ago\" ? -durationSeconds : durationSeconds;\n}\nfunction validateInput(label, input) {\n if (!Number.isFinite(input))\n throw new TypeError(`Invalid ${label} input`);\n return input;\n}\nfunction validateStringClaim(claim, value) {\n if (typeof value != \"string\")\n throw new TypeError(`\"${claim}\" claim must be a string`);\n}\nfunction validateAudienceClaim(value) {\n if (typeof value != \"string\" && (!Array.isArray(value) || Array.from(value).some((member) => typeof member != \"string\")))\n throw new TypeError('\"aud\" claim must be a string or an array of strings');\n}\nfunction numericDate(value, label) {\n return typeof value == \"number\" ? validateInput(label, value) : value instanceof Date ? validateInput(label, epoch(value)) : epoch(/* @__PURE__ */ new Date()) + secs(value);\n}\nconst normalizeTyp = (value) => {\n const normalized = value.toLowerCase();\n return value.includes(\"/\") ? normalized : `application/${normalized}`;\n}, checkAudiencePresence = (audPayload, audOption) => typeof audPayload == \"string\" ? audOption.includes(audPayload) : Array.isArray(audPayload) ? audOption.some((aud) => audPayload.includes(aud)) : !1;\nfunction validateNumericDate(claimsSet, claim, required = !1) {\n const value = claimsSet[claim];\n if (!(value === void 0 && !required)) {\n if (typeof value != \"number\")\n throw new JWTClaimValidationFailed(`\"${claim}\" claim must be a number`, claimsSet, claim, \"invalid\");\n return value;\n }\n}\nfunction unexpectedClaim(claimsSet, claim) {\n throw new JWTClaimValidationFailed(`unexpected \"${claim}\" claim value`, claimsSet, claim, checkFailed);\n}\nfunction validateClaimsSet(protectedHeader, claimsSetBytes, options = {}) {\n let claimsSet;\n try {\n claimsSet = JSON.parse(strictDecoder.decode(claimsSetBytes));\n } catch (cause) {\n throw new JWTInvalid(\"JWT Claims Set must be a top-level JSON object\", { cause });\n }\n if (!isObject(claimsSet))\n throw new JWTInvalid(\"JWT Claims Set must be a top-level JSON object\");\n const { typ } = options;\n if (typ !== void 0 && (typeof protectedHeader.typ != \"string\" || normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ)))\n throw new JWTClaimValidationFailed('unexpected \"typ\" JWT header value', claimsSet, \"typ\", checkFailed);\n const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options, presenceCheck = [...requiredClaims];\n maxTokenAge !== void 0 && presenceCheck.push(\"iat\"), audience !== void 0 && presenceCheck.push(\"aud\"), subject !== void 0 && presenceCheck.push(\"sub\"), issuer !== void 0 && presenceCheck.push(\"iss\");\n for (const claim of new Set(presenceCheck.reverse()))\n if (!Object.hasOwn(claimsSet, claim))\n throw new JWTClaimValidationFailed(`missing required \"${claim}\" claim`, claimsSet, claim, \"missing\");\n issuer !== void 0 && !(Array.isArray(issuer) ? issuer : [issuer]).includes(claimsSet.iss) && unexpectedClaim(claimsSet, \"iss\"), subject !== void 0 && claimsSet.sub !== subject && unexpectedClaim(claimsSet, \"sub\"), audience !== void 0 && !checkAudiencePresence(claimsSet.aud, typeof audience == \"string\" ? [audience] : audience) && unexpectedClaim(claimsSet, \"aud\");\n const { clockTolerance } = options;\n let tolerance = 0;\n if (typeof clockTolerance == \"string\")\n tolerance = secs(clockTolerance);\n else if (clockTolerance !== void 0) {\n if (typeof clockTolerance != \"number\")\n throw new TypeError(\"Invalid clockTolerance option type\");\n tolerance = clockTolerance;\n }\n if (validateInput(\"clockTolerance option\", tolerance), tolerance < 0)\n throw new TypeError(\"Invalid clockTolerance option input\");\n const { currentDate } = options, now = validateInput(\"currentDate option\", epoch(currentDate === void 0 ? /* @__PURE__ */ new Date() : currentDate)), iat = validateNumericDate(claimsSet, \"iat\", maxTokenAge !== void 0), nbf = validateNumericDate(claimsSet, \"nbf\");\n if (nbf !== void 0 && nbf > now + tolerance)\n throw new JWTClaimValidationFailed('\"nbf\" claim timestamp check failed', claimsSet, \"nbf\", checkFailed);\n const exp = validateNumericDate(claimsSet, \"exp\");\n if (exp !== void 0 && exp <= now - tolerance)\n throw new JWTExpired('\"exp\" claim timestamp check failed', claimsSet, \"exp\", checkFailed);\n if (maxTokenAge !== void 0) {\n const age = now - iat, max = validateInput(\"maxTokenAge option\", typeof maxTokenAge == \"number\" ? maxTokenAge : secs(maxTokenAge));\n if (age - tolerance > max)\n throw new JWTExpired('\"iat\" claim timestamp check failed (too far in the past)', claimsSet, \"iat\", checkFailed);\n if (age < -tolerance)\n throw new JWTClaimValidationFailed('\"iat\" claim timestamp check failed (it should be in the past)', claimsSet, \"iat\", checkFailed);\n }\n return claimsSet;\n}\nlet producerClaimsSets;\nfunction producerClaimsSet(producer) {\n return producerClaimsSets.get(producer);\n}\nfunction jwtClaimsSetBytes(producer) {\n const claimsSet = producerClaimsSet(producer);\n for (const claim of [\"iat\", \"nbf\", \"exp\"]) {\n const value = claimsSet[claim];\n if (typeof value == \"number\" && !Number.isFinite(value))\n throw new TypeError(`\"${claim}\" claim must be a finite number`);\n }\n return encoder.encode(JSON.stringify(claimsSet));\n}\nfunction jwtClaim(producer, claim) {\n return producerClaimsSet(producer)[claim];\n}\nclass JWTClaimsBuilder {\n constructor(claimsSet = {}) {\n if (!isObject(claimsSet))\n throw new TypeError(\"JWT Claims Set MUST be an object\");\n (producerClaimsSets ||= /* @__PURE__ */ new WeakMap()).set(this, structuredClone(claimsSet));\n }\n setIssuer(value) {\n return validateStringClaim(\"iss\", value), producerClaimsSet(this).iss = value, this;\n }\n setSubject(value) {\n return validateStringClaim(\"sub\", value), producerClaimsSet(this).sub = value, this;\n }\n setAudience(value) {\n return validateAudienceClaim(value), producerClaimsSet(this).aud = value, this;\n }\n setJti(value) {\n return validateStringClaim(\"jti\", value), producerClaimsSet(this).jti = value, this;\n }\n setNotBefore(value) {\n return producerClaimsSet(this).nbf = numericDate(value, \"setNotBefore\"), this;\n }\n setExpirationTime(value) {\n return producerClaimsSet(this).exp = numericDate(value, \"setExpirationTime\"), this;\n }\n setIssuedAt(value) {\n const claimsSet = producerClaimsSet(this);\n return value === void 0 ? claimsSet.iat = epoch(/* @__PURE__ */ new Date()) : typeof value == \"string\" ? claimsSet.iat = validateInput(\"setIssuedAt\", epoch(/* @__PURE__ */ new Date()) + secs(value)) : claimsSet.iat = numericDate(value, \"setIssuedAt\"), this;\n }\n}\nexport {\n JWTClaimsBuilder,\n jwtClaim,\n jwtClaimsSetBytes,\n secs,\n validateClaimsSet\n};\n","import { encode as b64u } from \"../util/base64url.js\";\nimport { jwsAlgorithm } from \"./jws_algorithms.js\";\nimport { isDisjoint, serializeJoseHeader, validateB64, validateCrit, validateCritDuplicates, JWS_RECOGNIZED } from \"./validate.js\";\nimport { JWSInvalid } from \"../util/errors.js\";\nimport { concat, encode, encoder } from \"./buffer_utils.js\";\nimport { prepareKey, rawKey, checkModulusLength } from \"./key.js\";\nasync function createSignature(input, key, rejectUnencoded) {\n let [payload, protectedHeader, unprotectedHeader, crit] = input, encodedProtectedHeader = \"\";\n if (protectedHeader !== void 0) {\n const normalized = serializeJoseHeader(JWSInvalid, protectedHeader);\n protectedHeader = normalized[0], encodedProtectedHeader = b64u(normalized[1]);\n }\n if (unprotectedHeader !== void 0 && (unprotectedHeader = serializeJoseHeader(JWSInvalid, unprotectedHeader)[0]), !protectedHeader && !unprotectedHeader)\n throw new JWSInvalid(\"either setProtectedHeader or setUnprotectedHeader must be called before #sign()\");\n if (!isDisjoint(protectedHeader, unprotectedHeader))\n throw new JWSInvalid(\"JWS Protected and JWS Unprotected Header Parameter names must be disjoint\");\n const joseHeader = { ...protectedHeader, ...unprotectedHeader };\n validateCritDuplicates(JWSInvalid, protectedHeader);\n const b64 = validateB64(protectedHeader, validateCrit(JWSInvalid, JWS_RECOGNIZED, crit, protectedHeader, joseHeader));\n b64 || rejectUnencoded?.();\n const { alg } = joseHeader;\n if (typeof alg != \"string\" || !alg)\n throw new JWSInvalid('JWS \"alg\" (Algorithm) Header Parameter missing or invalid');\n const entry = jwsAlgorithm(alg);\n let encodedPayload = \"\", signingPayload = payload, signingInput;\n if (b64) {\n const encodedPayloadCache = input[4];\n encodedPayloadCache ? (encodedPayload = encodedPayloadCache[0] ??= b64u(payload), signingPayload = encodedPayloadCache[1] ??= encode(encodedPayload)) : (encodedPayload = b64u(payload), signingInput = encoder.encode(`${encodedProtectedHeader}.${encodedPayload}`));\n }\n signingInput ??= concat(encode(encodedProtectedHeader), encode(\".\"), signingPayload);\n const signingKey = await rawKey(await prepareKey(entry, key, \"sign\"), entry.subtle, \"sign\");\n entry.minRsaBits && checkModulusLength(entry.alg, signingKey);\n const jws = {\n signature: b64u(new Uint8Array(await crypto.subtle.sign(entry.signing, signingKey, signingInput))),\n payload: encodedPayload\n };\n return protectedHeader && (jws.protected = encodedProtectedHeader), unprotectedHeader && (jws.header = unprotectedHeader), [jws, b64];\n}\nasync function createCompactSignature(payload, protectedHeader, crit, key, rejectUnencoded) {\n const [jws] = await createSignature([payload, protectedHeader, void 0, crit], key, rejectUnencoded);\n return `${jws.protected}.${jws.payload}.${jws.signature}`;\n}\nexport {\n createCompactSignature,\n createSignature\n};\n","import { createCompactSignature } from \"../lib/jws_sign.js\";\nimport { JWTInvalid } from \"../util/errors.js\";\nimport { JWTClaimsBuilder, jwtClaimsSetBytes } from \"../lib/jwt_claims_set.js\";\nimport { assertNotSet } from \"../lib/validate.js\";\nconst SignJWT_base = JWTClaimsBuilder;\nclass SignJWT extends SignJWT_base {\n #protectedHeader;\n setProtectedHeader(protectedHeader) {\n return assertNotSet(this.#protectedHeader, \"setProtectedHeader\"), this.#protectedHeader = protectedHeader, this;\n }\n async sign(key, options) {\n return createCompactSignature(jwtClaimsSetBytes(this), this.#protectedHeader, options?.crit, key, () => {\n throw new JWTInvalid(\"JWTs MUST NOT use unencoded payload\");\n });\n }\n}\nexport {\n SignJWT\n};\n","import { globalConfig } from \"./core.js\";\n// functions\nexport function assertEqual(val) {\n return val;\n}\nexport function assertNotEqual(val) {\n return val;\n}\nexport function toZod() {\n return (schema) => schema;\n}\nexport function assertIs(_arg) { }\nexport function assertNever(_x) {\n throw new Error(\"Unexpected value in exhaustive check\");\n}\nexport function assert(_) { }\nexport function getEnumValues(entries) {\n const numericValues = Object.values(entries).filter((v) => typeof v === \"number\");\n const values = Object.entries(entries)\n .filter(([k, _]) => numericValues.indexOf(+k) === -1)\n .map(([_, v]) => v);\n return values;\n}\nexport function joinValues(array, separator = \"|\") {\n return array.map((val) => stringifyPrimitive(val)).join(separator);\n}\nexport function jsonStringifyReplacer(_, value) {\n if (typeof value === \"bigint\")\n return value.toString();\n return value;\n}\n// the accessor lives on a shared prototype: an own accessor makes every box a dictionary-mode object (~360 B and a slow load per read against ~100 B and an inlined getter here)\nclass Cached {\n constructor(getter) {\n this._getter = getter;\n this._value = undefined;\n }\n get value() {\n const getter = this._getter;\n if (getter !== undefined) {\n this._value = getter();\n this._getter = undefined;\n }\n return this._value;\n }\n}\nexport function cached(getter) {\n return new Cached(getter);\n}\nexport function nullish(input) {\n return input === null || input === undefined;\n}\nexport function cleanRegex(source) {\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n return source.slice(start, end);\n}\nexport function floatSafeRemainder(val, step) {\n const ratio = val / step;\n const roundedRatio = Math.round(ratio);\n // `val` and `step` each round to a double before the division rounds again, so a true decimal multiple's quotient can sit up to 1.5 of these scaled epsilons from the integer. A 1x tolerance therefore rejected 2.03 as a multiple of 0.07; 4x covers the worst case with margin.\n const tolerance = 4 * Number.EPSILON * Math.max(Math.abs(ratio), 1);\n if (Math.abs(ratio - roundedRatio) < tolerance)\n return 0;\n return ratio - roundedRatio;\n}\nconst EVALUATING = /* @__PURE__*/ Symbol(\"evaluating\");\nexport function defineLazy(object, key, getter) {\n let value = undefined;\n Object.defineProperty(object, key, {\n get() {\n if (value === EVALUATING) {\n // Circular reference detected, return undefined to break the cycle\n return undefined;\n }\n if (value === undefined) {\n value = EVALUATING;\n value = getter();\n }\n return value;\n },\n set(v) {\n Object.defineProperty(object, key, {\n value: v,\n // configurable: true,\n });\n // object[key] = v;\n },\n configurable: true,\n });\n}\nexport function objectClone(obj) {\n return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));\n}\nexport function assignProp(target, prop, value) {\n Object.defineProperty(target, prop, {\n value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n}\n/**\n * Whichever object a def's `shape` currently answers from: the one the caller passed until the first read, the frozen copy after it.\n *\n * Its keys and descriptors read without invoking anything, which is what lets a discriminated union check its discriminator, and the cycle walk read a shape, without resolving a getter that references the schema being constructed. A def that answers `shape` from an accessor of its own has none.\n */\nexport function rawShape(def) {\n const desc = Object.getOwnPropertyDescriptor(def, \"shape\");\n return desc?.get ? desc.get.raw : desc?.value;\n}\n// where a builder reads its source's keys and descriptors, resolving only a shape a def answers for itself. A shape resolves by object spread, so only its enumerable keys are ever part of it.\nfunction sourceShape(schema) {\n return rawShape(schema._zod.def) ?? schema._zod.def.shape;\n}\n// a key whose value is not settled yet, self-caching so every read after the first gets the same one\nfunction deferProp(target, key, getter) {\n Object.defineProperty(target, key, {\n get() {\n const value = getter();\n assignProp(this, key, value);\n return value;\n },\n enumerable: true,\n configurable: true,\n });\n}\n// Writes a settled key. A plain assignment is much cheaper than `defineProperty` and produces the same descriptor, but it runs whatever setter already answers to the key — an accessor this shape deferred, or an inherited one, which `__proto__` has on every object and prototype pollution can add for any name.\nfunction putProp(target, key, value) {\n if (key in target)\n assignProp(target, key, value);\n else\n target[key] = value;\n}\n/**\n * Copies `keys` of `source`'s shape onto `target`, each value passed through `wrap`.\n *\n * A key the source has resolved is copied through now, so the derived shape states it outright and nothing has to resolve it to learn what it holds. A key the source still defers stays deferred, and reads back through the source's own `shape`, so it resolves once and both shapes get that one schema.\n */\nfunction mirrorShape(target, source, keys, wrap) {\n const raw = sourceShape(source);\n for (const key of keys) {\n const desc = Object.getOwnPropertyDescriptor(raw, key);\n if (!desc.enumerable)\n continue;\n if (desc.get) {\n deferProp(target, key, () => {\n const value = source._zod.def.shape[key];\n return wrap ? wrap(value, key) : value;\n });\n }\n else\n putProp(target, key, wrap ? wrap(desc.value, key) : desc.value);\n }\n}\n// same, for a plain shape a caller passed rather than a schema's\nfunction mirrorProps(target, source) {\n for (const key of Reflect.ownKeys(source)) {\n const desc = Object.getOwnPropertyDescriptor(source, key);\n if (!desc.enumerable)\n continue;\n if (desc.get)\n deferProp(target, key, () => source[key]);\n else\n putProp(target, key, desc.value);\n }\n}\nexport function mergeDefs(...defs) {\n const mergedDescriptors = {};\n for (const def of defs) {\n const descriptors = Object.getOwnPropertyDescriptors(def);\n Object.assign(mergedDescriptors, descriptors);\n }\n return Object.defineProperties({}, mergedDescriptors);\n}\nexport function cloneDef(schema) {\n return mergeDefs(schema._zod.def);\n}\nexport function getElementAtPath(obj, path) {\n if (!path)\n return obj;\n return path.reduce((acc, key) => acc?.[key], obj);\n}\nexport function promiseAllObject(promisesObj) {\n const keys = Object.keys(promisesObj);\n const promises = keys.map((key) => promisesObj[key]);\n return Promise.all(promises).then((results) => {\n const resolvedObj = {};\n for (let i = 0; i < keys.length; i++) {\n resolvedObj[keys[i]] = results[i];\n }\n return resolvedObj;\n });\n}\nexport function randomString(length = 10) {\n const chars = \"abcdefghijklmnopqrstuvwxyz\";\n let str = \"\";\n for (let i = 0; i < length; i++) {\n str += chars[Math.floor(Math.random() * chars.length)];\n }\n return str;\n}\nexport function esc(str) {\n return JSON.stringify(str);\n}\nexport function slugify(input) {\n return input\n .toLowerCase()\n .trim()\n .replace(/[^\\w\\s-]/g, \"\")\n .replace(/[\\s_-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n}\nexport const captureStackTrace = (\"captureStackTrace\" in Error ? Error.captureStackTrace : (..._args) => { });\nexport function isObject(data) {\n return typeof data === \"object\" && data !== null && !Array.isArray(data);\n}\nexport const allowsEval = /* @__PURE__*/ cached(() => {\n // Skip the probe under `jitless`: strict CSPs report the caught `new Function` as a `securitypolicyviolation` even though the throw is swallowed.\n if (globalConfig.jitless) {\n return false;\n }\n // @ts-ignore\n if (typeof navigator !== \"undefined\" && navigator?.userAgent?.includes(\"Cloudflare\")) {\n return false;\n }\n try {\n const F = Function;\n new F(\"\");\n return true;\n }\n catch (_) {\n return false;\n }\n});\nexport function isPlainObject(o) {\n if (isObject(o) === false)\n return false;\n // modified constructor\n const ctor = o.constructor;\n if (ctor === undefined)\n return true;\n if (typeof ctor !== \"function\")\n return true;\n // modified prototype\n const prot = ctor.prototype;\n if (isObject(prot) === false)\n return false;\n // ctor doesn't have static `isPrototypeOf`\n if (Object.prototype.hasOwnProperty.call(prot, \"isPrototypeOf\") === false) {\n return false;\n }\n return true;\n}\nexport function shallowClone(o) {\n if (isPlainObject(o))\n return { ...o };\n if (Array.isArray(o))\n return [...o];\n if (o instanceof Map)\n return new Map(o);\n if (o instanceof Set)\n return new Set(o);\n return o;\n}\nexport function numKeys(data) {\n let keyCount = 0;\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n keyCount++;\n }\n }\n return keyCount;\n}\nexport const getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return \"undefined\";\n case \"string\":\n return \"string\";\n case \"number\":\n return Number.isNaN(data) ? \"nan\" : \"number\";\n case \"boolean\":\n return \"boolean\";\n case \"function\":\n return \"function\";\n case \"bigint\":\n return \"bigint\";\n case \"symbol\":\n return \"symbol\";\n case \"object\":\n if (Array.isArray(data)) {\n return \"array\";\n }\n if (data === null) {\n return \"null\";\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return \"promise\";\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return \"map\";\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return \"set\";\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return \"date\";\n }\n // @ts-ignore\n if (typeof File !== \"undefined\" && data instanceof File) {\n return \"file\";\n }\n return \"object\";\n default:\n throw new Error(`Unknown data type: ${t}`);\n }\n};\nexport const propertyKeyTypes = /* @__PURE__*/ new Set([\"string\", \"number\", \"symbol\"]);\nexport const primitiveTypes = /* @__PURE__*/ new Set([\n \"string\",\n \"number\",\n \"bigint\",\n \"boolean\",\n \"symbol\",\n \"undefined\",\n]);\nexport function escapeRegex(str) {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n// zod-specific utils\nexport function clone(inst, def, params) {\n const cl = new inst._zod.constr(def ?? inst._zod.def);\n if (!def || params?.parent)\n cl._zod.parent = inst;\n return cl;\n}\nexport function normalizeParams(_params) {\n const params = _params;\n if (!params)\n return {};\n if (typeof params === \"string\")\n return { error: () => params };\n if (params?.message !== undefined) {\n if (params?.error !== undefined)\n throw new Error(\"Cannot specify both `message` and `error` params\");\n params.error = params.message;\n }\n delete params.message;\n if (typeof params.error === \"string\")\n return { ...params, error: () => params.error };\n return params;\n}\nexport function createTransparentProxy(getter) {\n let target;\n return new Proxy({}, {\n get(_, prop, receiver) {\n target ?? (target = getter());\n return Reflect.get(target, prop, receiver);\n },\n set(_, prop, value, receiver) {\n target ?? (target = getter());\n return Reflect.set(target, prop, value, receiver);\n },\n has(_, prop) {\n target ?? (target = getter());\n return Reflect.has(target, prop);\n },\n deleteProperty(_, prop) {\n target ?? (target = getter());\n return Reflect.deleteProperty(target, prop);\n },\n ownKeys(_) {\n target ?? (target = getter());\n return Reflect.ownKeys(target);\n },\n getOwnPropertyDescriptor(_, prop) {\n target ?? (target = getter());\n return Reflect.getOwnPropertyDescriptor(target, prop);\n },\n defineProperty(_, prop, descriptor) {\n target ?? (target = getter());\n return Reflect.defineProperty(target, prop, descriptor);\n },\n });\n}\nexport function stringifyPrimitive(value) {\n if (typeof value === \"bigint\")\n return value.toString() + \"n\";\n if (typeof value === \"string\")\n return `\"${value}\"`;\n return `${value}`;\n}\nexport function optionalKeys(shape) {\n return Object.keys(shape).filter((k) => {\n return shape[k]._zod.optin !== undefined && shape[k]._zod.optout === \"optional\";\n });\n}\n// Wrapped in a `@__PURE__` IIFE: esbuild never tree-shakes a top-level initializer that contains a member access on `Number`, so the bare object literal survived into every bundle.\nexport const NUMBER_FORMAT_RANGES = /*@__PURE__*/ (() => ({\n safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],\n int32: [-2147483648, 2147483647],\n uint32: [0, 4294967295],\n float32: [-3.4028234663852886e38, 3.4028234663852886e38],\n float64: [-Number.MAX_VALUE, Number.MAX_VALUE],\n}))();\nexport const BIGINT_FORMAT_RANGES = {\n int64: [/* @__PURE__*/ BigInt(\"-9223372036854775808\"), /* @__PURE__*/ BigInt(\"9223372036854775807\")],\n uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt(\"18446744073709551615\")],\n};\nexport function pick(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".pick() cannot be used on object schemas containing refinements\");\n }\n const newShape = {};\n mirrorShape(newShape, schema, maskedKeys(schema, mask));\n return clone(schema, mergeDefs(currDef, { shape: newShape, checks: [] }));\n}\n// the mask keys that select something, checked against the source's shape without resolving it\nfunction maskedKeys(schema, mask) {\n const raw = sourceShape(schema);\n const keys = [];\n // `for...in` skips symbols, so a symbol in the mask would select nothing\n for (const key of Reflect.ownKeys(mask)) {\n if (!Object.getOwnPropertyDescriptor(raw, key)?.enumerable) {\n throw new Error(`Unrecognized key: \"${String(key)}\"`);\n }\n if (mask[key])\n keys.push(key);\n }\n return keys;\n}\nexport function omit(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".omit() cannot be used on object schemas containing refinements\");\n }\n const omitted = new Set(maskedKeys(schema, mask));\n const newShape = {};\n mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)).filter((key) => !omitted.has(key)));\n return clone(schema, mergeDefs(currDef, { shape: newShape, checks: [] }));\n}\nexport function extend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to extend: expected a plain object\");\n }\n const checks = schema._zod.def.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n // Only throw if new shape overlaps with existing shape. Use getOwnPropertyDescriptor to check key existence without accessing values\n const existingShape = sourceShape(schema);\n for (const key of Reflect.ownKeys(shape)) {\n if (Object.getOwnPropertyDescriptor(existingShape, key) !== undefined) {\n throw new Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\");\n }\n }\n }\n return clone(schema, mergeDefs(schema._zod.def, { shape: extended(schema, shape) }));\n}\n// the source's keys, then the caller's overlaid on top\nfunction extended(schema, shape) {\n const newShape = {};\n mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)));\n mirrorProps(newShape, shape);\n return newShape;\n}\nexport function safeExtend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to safeExtend: expected a plain object\");\n }\n return clone(schema, mergeDefs(schema._zod.def, { shape: extended(schema, shape) }));\n}\nexport function merge(a, b) {\n if (!b?._zod?.def) {\n throw new Error(\"Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.\");\n }\n if (a._zod.def.checks?.length) {\n throw new Error(\".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.\");\n }\n const newShape = {};\n mirrorShape(newShape, a, Reflect.ownKeys(sourceShape(a)));\n mirrorShape(newShape, b, Reflect.ownKeys(sourceShape(b)));\n const def = mergeDefs(a._zod.def, {\n shape: newShape,\n get catchall() {\n return b._zod.def.catchall;\n },\n checks: b._zod.def.checks ?? [],\n });\n return clone(a, def);\n}\nexport function partial(Class, schema, mask, name = \"partial\") {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(`.${name}() cannot be used on object schemas containing refinements`);\n }\n const selected = mask ? new Set(maskedKeys(schema, mask)) : undefined;\n const newShape = {};\n mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), Class &&\n ((value, key) => (selected && !selected.has(key) ? value : new Class({ type: \"optional\", innerType: value }))));\n return clone(schema, mergeDefs(schema._zod.def, { shape: newShape, checks: [] }));\n}\nexport function required(Class, schema, mask) {\n const selected = mask ? new Set(maskedKeys(schema, mask)) : undefined;\n const newShape = {};\n mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), (value, key) => \n // overwrite with non-optional\n selected && !selected.has(key) ? value : new Class({ type: \"nonoptional\", innerType: value }));\n return clone(schema, mergeDefs(schema._zod.def, { shape: newShape }));\n}\n// invalid_type | too_big | too_small | invalid_format | not_multiple_of | unrecognized_keys | invalid_union | invalid_key | invalid_element | invalid_value | custom\nexport function aborted(x, startIndex = 0) {\n if (x.aborted === true)\n return true;\n for (let i = startIndex; i < x.issues.length; i++) {\n if (x.issues[i]?.continue !== true) {\n return true;\n }\n }\n return false;\n}\n// Checks for explicit abort (continue === false), as opposed to implicit abort (continue === undefined). Used to respect `abort: true` in .refine() even for checks that have a `when` function.\nexport function explicitlyAborted(x, startIndex = 0) {\n if (x.aborted === true)\n return true;\n for (let i = startIndex; i < x.issues.length; i++) {\n if (x.issues[i]?.continue === false) {\n return true;\n }\n }\n return false;\n}\nexport function prefixIssues(path, issues) {\n return issues.map((iss) => {\n var _a;\n (_a = iss).path ?? (_a.path = []);\n iss.path.unshift(path);\n return iss;\n });\n}\nexport function unwrapMessage(message) {\n return typeof message === \"string\" ? message : message?.message;\n}\n/* A check holds no link back to the schema it is attached to — the same check instance is shared by every clone of that schema — so the owner is stamped onto the issues a check just raised, at the only point where both are in scope. Runs on the failure path only; `start` is the issue count from before the check ran. */\n/** The leading size checks of `defChecks` that set an upper bound, each paired with it. */\nexport function sizeCaps(defChecks) {\n const caps = [];\n for (const ch of defChecks ?? []) {\n const d = ch._zod.def;\n // a later check may rewrite the value\n if (!/_(length|size)$|_equals$/.test(d.check))\n break;\n const max = d.maximum ?? d.length ?? d.size;\n if (max >= 0)\n caps.push([max, ch]);\n }\n return caps;\n}\nexport function attachSchema(issues, start, inst) {\n var _a;\n for (let i = start; i < issues.length; i++) {\n (_a = issues[i]).schema ?? (_a.schema = inst);\n }\n}\nexport function finalizeIssue(iss, ctx, config) {\n var _a;\n // A schema that raised an issue itself owns it outright, and outranks any stamp an enclosing check left in `attachSchema`. String formats and z.custom() are schema and check at once, so when they act as a check they defer to that stamp instead.\n const traits = iss.inst?._zod?.traits;\n if (traits?.has(\"$ZodType\")) {\n if (traits.has(\"$ZodCheck\"))\n (_a = iss).schema ?? (_a.schema = iss.inst);\n else\n iss.schema = iss.inst;\n }\n // Decreasing specificity, first map to return a message wins. `inst` is whatever raised the issue, so a check's own map outranks the owning schema's.\n const schemaError = iss.schema !== iss.inst ? iss.schema?._zod.def?.error : undefined;\n const message = iss.message\n ? iss.message\n : (unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ??\n unwrapMessage(schemaError?.(iss)) ??\n unwrapMessage(ctx?.error?.(iss)) ??\n unwrapMessage(config.customError?.(iss)) ??\n unwrapMessage(config.localeError?.(iss)) ??\n \"Invalid input\");\n // an explicit own-key copy beats object rest with excluded keys, which v8 routes through a generic runtime call; Object.keys rather than for-in so an issue pushed with a prototype does not leak inherited keys, and an own __proto__ key is dropped rather than assigned through the setter\n const full = {};\n for (const k of Object.keys(iss)) {\n if (k === \"inst\" || k === \"schema\" || k === \"continue\" || k === \"input\" || k === \"__proto__\")\n continue;\n full[k] = iss[k];\n }\n full.path ?? (full.path = []);\n full.message = message;\n if (ctx?.reportInput) {\n full.input = iss.input;\n }\n return full;\n}\nexport function getSizableOrigin(input) {\n if (input instanceof Set)\n return \"set\";\n if (input instanceof Map)\n return \"map\";\n // @ts-ignore\n if (input instanceof File)\n return \"file\";\n return \"unknown\";\n}\nconst highSurrogate = /[\\uD800-\\uDBFF]/;\n// Code points in `str`: a surrogate pair counts once, a lone surrogate as itself. Hand-rolled because the string iterator allocates and runs ~250x slower on this path; the regex probe exits ~50x quicker for a string with no astral characters.\nexport function codePointLength(str) {\n const units = str.length;\n if (!highSurrogate.test(str))\n return units;\n let count = units;\n for (let i = 0; i < units - 1; i++) {\n if ((str.charCodeAt(i) & 0xfc00) === 0xd800 && (str.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {\n count--;\n i++;\n }\n }\n return count;\n}\nexport function getLengthableOrigin(input) {\n if (Array.isArray(input))\n return \"array\";\n if (typeof input === \"string\")\n return \"string\";\n return \"unknown\";\n}\nexport function parsedType(data) {\n const t = typeof data;\n switch (t) {\n case \"number\": {\n return Number.isNaN(data) ? \"nan\" : \"number\";\n }\n case \"object\": {\n if (data === null) {\n return \"null\";\n }\n if (Array.isArray(data)) {\n return \"array\";\n }\n const obj = data;\n if (obj && Object.getPrototypeOf(obj) !== Object.prototype && \"constructor\" in obj && obj.constructor) {\n return obj.constructor.name;\n }\n }\n }\n return t;\n}\nexport function issue(...args) {\n const [iss, input, inst] = args;\n if (typeof iss === \"string\") {\n return {\n message: iss,\n code: \"custom\",\n input,\n inst,\n };\n }\n return { ...iss };\n}\nexport function cleanEnum(obj) {\n return Object.entries(obj)\n .filter(([k, _]) => {\n // return true if NaN, meaning it's not a number, thus a string key\n return Number.isNaN(Number.parseInt(k, 10));\n })\n .map((el) => el[1]);\n}\n// Codec utility functions\nexport function base64ToUint8Array(base64) {\n const binaryString = atob(base64);\n const bytes = new Uint8Array(binaryString.length);\n for (let i = 0; i < binaryString.length; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n return bytes;\n}\nexport function uint8ArrayToBase64(bytes) {\n let binaryString = \"\";\n for (let i = 0; i < bytes.length; i++) {\n binaryString += String.fromCharCode(bytes[i]);\n }\n return btoa(binaryString);\n}\nexport function base64urlToUint8Array(base64url) {\n const base64 = base64url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padding = \"=\".repeat((4 - (base64.length % 4)) % 4);\n return base64ToUint8Array(base64 + padding);\n}\nexport function uint8ArrayToBase64url(bytes) {\n return uint8ArrayToBase64(bytes).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\nexport function hexToUint8Array(hex) {\n const cleanHex = hex.replace(/^0x/, \"\");\n if (cleanHex.length % 2 !== 0) {\n throw new Error(\"Invalid hex string length\");\n }\n const bytes = new Uint8Array(cleanHex.length / 2);\n for (let i = 0; i < cleanHex.length; i += 2) {\n bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16);\n }\n return bytes;\n}\nexport function uint8ArrayToHex(bytes) {\n return Array.from(bytes)\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\");\n}\n// instanceof\nexport class Class {\n constructor(..._args) { }\n}\n////////// PROTOTYPE INSTALLERS //////////\n//\n// Members live on the prototype and materialize per instance on first read, which keeps own-property count under the step where V8 stops using inline slots. Changing anything here means re-measuring runtime, memory and bundle size together — see \"The three axes\" in AGENTS.md.\n/**\n * Installs a trait's members on its prototype. Each value builds that member for the instance on first read; the built value shadows the accessor as an own property, so a detached `const { parse } = schema` keeps working.\n *\n * Call this from a `proto` initializer, which runs once per prototype — never per instance.\n */\nexport function members(proto, table) {\n for (const key in table) {\n const desc = Object.getOwnPropertyDescriptor(table, key);\n // a getter installs as written, so it stays live: `description` reads through to the registry on every access. not enumerable: an object literal's is, and a prototype member never was\n if (desc.get)\n Object.defineProperty(proto, key, { ...desc, enumerable: false });\n // a method materializes bound on first read, which is what keeps a detached member working: `const opt = schema.optional; opt()`\n else\n defineBound(proto, key, desc.value);\n }\n}\n/** Shadows a prototype member with an own value, so a getter that builds from the instance runs once. */\nexport function own(inst, key, value, enumerable = true) {\n Object.defineProperty(inst, key, { configurable: true, writable: true, enumerable, value });\n return value;\n}\n/** Like {@link own}, for a member that was never an own data property and has to stay out of `Object.keys`. */\nexport function hide(inst, key, value) {\n return own(inst, key, value, false);\n}\n/** Adds members a table derives from the instance: each builds on first read and shadows as own data, and assignment shadows the same way, as when these were own properties. */\nexport /*@__NO_SIDE_EFFECTS__*/ function derived(computes, table) {\n for (const key in computes) {\n const compute = computes[key];\n // an object literal's accessor is configurable and enumerable, and `members` copies the descriptor as written\n Object.defineProperty(table, key, {\n configurable: true,\n enumerable: true,\n get() {\n return own(this, key, compute(this));\n },\n set(value) {\n own(this, key, value);\n },\n });\n }\n return table;\n}\nfunction defineBound(proto, key, fn) {\n Object.defineProperty(proto, key, {\n configurable: true,\n get() {\n // vitest's spyOn calls a prototype getter bare to find the function it wraps, so a nullish receiver answers the raw method\n return this == null ? fn : own(this, key, fn.bind(this));\n },\n set(value) {\n own(this, key, value);\n },\n });\n}\n/** Returns the prototype to install on, or `undefined` if this group is already installed on it. */\nfunction claim(inst, sentinel) {\n const proto = Object.getPrototypeOf(inst);\n // Runs on every construction, so `in` rather than the costlier `hasOwnProperty.call`. Sentinels are keys the group itself defines.\n return sentinel in proto ? undefined : proto;\n}\n// The internals whose init chain is installing. A second call for the same one is a derived constructor overriding its base, so it must not construct another schema in between or the override is dropped.\nlet installing;\n// Set while a getter is running, so a value that resolved through a recursion break is not memoized. One shared descriptor shadows the key for the duration, which costs no per-key allocation.\nlet broke = false;\nconst breaker = {\n configurable: true,\n get() {\n broke = true;\n return undefined;\n },\n};\n/**\n * Installs a lazily-derived internal on the `_zod` prototype of `inst`'s\n * constructor, computed from the internals object itself and cached there on\n * first read. One accessor per constructor rather than one per instance.\n */\nexport function defineLazyInternal(inst, key, compute) {\n const proto = Object.getPrototypeOf(inst._zod);\n if (key in proto && installing !== inst._zod) {\n // A repeat construction: everything is installed already. Cleared here so the reference is not held past the first construction of every type.\n installing = undefined;\n return;\n }\n installing = inst._zod;\n Object.defineProperty(proto, key, {\n configurable: true,\n get() {\n // Shadowed before computing so a re-entrant read from a recursive schema resolves to undefined instead of running the getter again.\n Object.defineProperty(this, key, breaker);\n const outer = broke;\n broke = false;\n try {\n const value = compute(this);\n // A result that resolved through a recursion break is recomputed once the graph is complete; everything else memoizes, undefined included.\n if (broke)\n delete this[key];\n else\n Object.defineProperty(this, key, { configurable: true, writable: true, value });\n broke = broke || outer;\n return value;\n }\n catch (err) {\n // A compute that threw memoizes nothing, so a later read runs it again and fails the same way. The shadow goes with it, since leaving it installed would answer undefined for every later read.\n delete this[key];\n broke = broke || outer;\n throw err;\n }\n },\n set(value) {\n Object.defineProperty(this, key, { configurable: true, writable: true, value });\n },\n });\n}\n/**\n * Installs `key` on `inst`'s prototype, computed by `make` on first read and cached there as an own\n * data property. One accessor per constructor rather than one per instance, because an own accessor\n * puts every instance after the first into v8 dictionary mode. The key doubles as the sentinel.\n */\nexport function installLazyProp(inst, key, make, enumerable) {\n const proto = claim(inst, key);\n if (!proto)\n return;\n Object.defineProperty(proto, key, {\n configurable: true,\n get() {\n // Shadowed before computing, so a re-entrant read from a self-referential shape resolves to undefined instead of running the getter again. A data property rather than an accessor: an own accessor is the dictionary-mode transition this exists to avoid.\n const desc = { configurable: true, writable: true, enumerable, value: undefined };\n Object.defineProperty(this, key, desc);\n // a compute that throws leaves the shadow behind, so later reads answer undefined instead of re-throwing; `defineLazy` did the same, and `defineLazyInternal`'s delete-on-catch would cost bytes in every bundle for a case only a throwing user getter reaches\n desc.value = make(this);\n Object.defineProperty(this, key, desc);\n return desc.value;\n },\n set(value) {\n Object.defineProperty(this, key, { configurable: true, writable: true, enumerable, value });\n },\n });\n}\n/** Marks the thunk `_catch` synthesises for a constant catch value. `Function.length` cannot tell that thunk from a user callback — rest and defaulted parameters both report arity 0 — and a user callback reads `ctx.error`, whose issues only finalize correctly against the caller's per-parse error map. Provenance can say what arity cannot. A plain string key rather than `Symbol.for`, whose call at module scope no bundler can prove pure — the same shape that anchored `urlCanParse` into every build. */\nexport const CONSTANT_CATCH = \"~constantCatch\";\n/** Wraps a constant catch value in a thunk tagged with {@link CONSTANT_CATCH}. */\nexport function constantCatch(value) {\n const fn = () => value;\n fn[CONSTANT_CATCH] = true;\n return fn;\n}\n","var _a;\nimport { members as installMembers } from \"./util.js\";\n/** A special constant with type `never` */\nexport const NEVER = /*@__PURE__*/ Object.freeze({\n status: \"aborted\",\n});\n/* Shared descriptor for installing `_zod`; defineProperty reads it\n * synchronously, so reusing one object avoids a per-instance allocation. */\nconst _zodDesc = { value: undefined, enumerable: false };\n// null where suppressing the capture would be unrecoverable: `parse()` puts the frames back with `captureStackTrace`, so without it the throw would lose its stack. also latched to null once `stackTraceLimit` proves unassignable, which a realm can do at any point by hardening Error\nlet _E = \"captureStackTrace\" in Error ? Error : null;\n// v8 captures a stack trace inside the Error constructor, which dominates a failed parse; costs only the frames, and parse() restores those. the constructor must RUN: Object.create is cheaper and passes instanceof, but Error.isError and util.types.isNativeError check an internal slot\nfunction newError(Definition) {\n const E = _E;\n if (E) {\n const saved = E.stackTraceLimit;\n if (typeof saved === \"number\") {\n try {\n E.stackTraceLimit = 0;\n }\n catch {\n _E = null;\n return new Definition();\n }\n try {\n return new Definition();\n }\n finally {\n E.stackTraceLimit = saved;\n }\n }\n }\n return new Definition();\n}\nexport /*@__NO_SIDE_EFFECTS__*/ function $constructor(name, initializer, \n/** This trait's members, installed once on every prototype that composes it. They cannot be declared in the initializer above: that runs per instance, and the prototype is shared. */\nproto, params) {\n // Prototype for this constructor's `_zod` internals. Lazily-derived fields (`values`, `pattern`, `optin`, …) install here once rather than as an accessor on every instance.\n const zodProto = {};\n // Assigning the fields in the constructor body is what gives instances in-object slots; building the object literally and reparenting it costs a second allocation and a generic property copy.\n function Internals(def) {\n this.def = def;\n this.constr = _;\n this.traits = new Set();\n }\n Internals.prototype = zodProto;\n const protoMembers = proto;\n // One trait's members land on every prototype whose chain composes it, so the answer is per prototype rather than per trait.\n const initialized = protoMembers && new WeakSet();\n function init(inst, def) {\n if (!inst._zod) {\n _zodDesc.value = new Internals(def);\n try {\n Object.defineProperty(inst, \"_zod\", _zodDesc);\n }\n finally {\n // Cleared even on throw, so the shared descriptor never leaks one instance's internals into the next.\n _zodDesc.value = undefined;\n }\n }\n else if (inst._zod.traits.has(name)) {\n return;\n }\n inst._zod.traits.add(name);\n initializer(inst, def);\n if (initialized) {\n // `super(def)` from a user subclass gives `this` a prototype the subclass owns, and installing there would overwrite whatever the subclass declared. `constr` built the instance, so its prototype is the one below the subclass's that should carry the members. A receiver whose chain never reaches that prototype installs on its own, which for a plain object handed straight to `init` means `Object.prototype` — unchanged from before.\n const own = Object.getPrototypeOf(inst);\n const ctorProto = inst._zod.constr.prototype;\n let up = own;\n while (up && up !== ctorProto)\n up = Object.getPrototypeOf(up);\n const target = up ?? own;\n if (!initialized.has(target)) {\n initialized.add(target);\n installMembers(target, protoMembers);\n }\n }\n // support prototype modifications; for-in avoids the array allocation of Object.keys on the (usually empty) prototype\n const proto = _.prototype;\n for (const k in proto) {\n if (!Object.prototype.hasOwnProperty.call(proto, k))\n continue;\n if (!(k in inst)) {\n inst[k] = proto[k].bind(inst);\n }\n }\n }\n // doesn't work if Parent has a constructor with arguments\n const Parent = params?.Parent ?? Object;\n class Definition extends Parent {\n }\n Object.defineProperty(Definition, \"name\", { value: name });\n function _(def) {\n const inst = params?.Parent ? newError(Definition) : this;\n init(inst, def);\n const deferred = inst._zod.deferred;\n if (deferred) {\n for (const fn of deferred) {\n fn();\n }\n // Released: initializers run once, and the list would otherwise be retained for the schema's lifetime.\n inst._zod.deferred = undefined;\n }\n // Global post-processor hook. Internal: installed by `import \"zod/compile\"` to enable AOT compilation for every constructed schema. Runs last, once the instance is fully built, because it hands the instance to compile(). The post-processor is expected to be reentrancy-guarded by its own implementation.\n const pp = globalThis.__zod_globalConfig?.postProcessor;\n if (pp)\n pp(inst);\n return inst;\n }\n Object.defineProperty(_, \"init\", { value: init });\n Object.defineProperty(_, Symbol.hasInstance, {\n value: (inst) => {\n if (params?.Parent && inst instanceof params.Parent)\n return true;\n return inst?._zod?.traits?.has(name);\n },\n });\n Object.defineProperty(_, \"name\", { value: name });\n return _;\n}\n////////////////////////////// UTILITIES ///////////////////////////////////////\nexport const $brand = /*@__PURE__*/ Symbol(\"zod_brand\");\nexport class $ZodAsyncError extends Error {\n constructor() {\n super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);\n }\n}\nexport class $ZodEncodeError extends Error {\n constructor(name) {\n super(`Encountered unidirectional transform during encode: ${name}`);\n this.name = \"ZodEncodeError\";\n }\n}\n(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});\nexport const globalConfig = globalThis.__zod_globalConfig;\nexport function config(newConfig) {\n if (newConfig)\n Object.assign(globalConfig, newConfig);\n return globalConfig;\n}\n","import { $constructor } from \"./core.js\";\nimport * as util from \"./util.js\";\n/* Computing the message eagerly is expensive (pretty-printed JSON of all\n * issues), so defer it until first read. The accessor functions and\n * descriptors are shared across instances to keep error construction\n * cheap; the computed message is cached on the internals object. The\n * setter preserves plain assignment semantics for consumers that\n * overwrite `message`. */\nfunction _getMessage() {\n const internals = this._zod;\n internals.message ?? (internals.message = JSON.stringify(internals.def, util.jsonStringifyReplacer, 2));\n return internals.message;\n}\nfunction _setMessage(value) {\n this._zod.message = value;\n}\nconst _messageDesc = {\n get: _getMessage,\n set: _setMessage,\n enumerable: true,\n configurable: true,\n};\nconst _issuesDesc = { value: undefined, enumerable: false };\n/* Prototypes that already carry the lazy `toString`. Seeded with the\n * intrinsics so that `init` on a foreign object — it accepts any object —\n * can never install an accessor onto a prototype we do not own. */\nconst _installedToString = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);\nconst initializer = (inst, def) => {\n inst.name = \"$ZodError\";\n // `_zod` is already non-enumerable: $constructor's init defined it with this same descriptor\n _issuesDesc.value = def;\n Object.defineProperty(inst, \"issues\", _issuesDesc);\n // Clear the shared slot; a retained `value` pins the last error's issues.\n _issuesDesc.value = undefined;\n Object.defineProperty(inst, \"message\", _messageDesc);\n /* `toString` lives as a non-enumerable lazy getter on the shared\n * prototype; on first access it caches a per-instance closure so\n * detached usage still works. */\n const proto = Object.getPrototypeOf(inst);\n if (!_installedToString.has(proto)) {\n _installedToString.add(proto);\n Object.defineProperty(proto, \"toString\", {\n configurable: true,\n enumerable: false,\n get() {\n const value = () => this.message;\n Object.defineProperty(this, \"toString\", { value, configurable: true, writable: true });\n return value;\n },\n set(value) {\n Object.defineProperty(this, \"toString\", { value, configurable: true, writable: true });\n },\n });\n }\n};\nexport const $ZodError = $constructor(\"$ZodError\", initializer);\nexport const $ZodRealError = $constructor(\"$ZodError\", initializer, undefined, {\n Parent: Error,\n});\n/** Get-or-create `obj[key]` as an own data property. A path segment naming an inherited member\n * (\"toString\", \"constructor\") would otherwise read through to the prototype, and assigning\n * \"__proto__\" would hit the setter instead of creating a key. */\nfunction node(obj, key, make) {\n if (!Object.prototype.hasOwnProperty.call(obj, key)) {\n if (key === \"__proto__\") {\n Object.defineProperty(obj, key, { value: make(), writable: true, enumerable: true, configurable: true });\n }\n else {\n obj[key] = make();\n }\n }\n return obj[key];\n}\nexport function flattenError(error, mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of error.issues) {\n if (sub.path.length > 0) {\n node(fieldErrors, sub.path[0], () => []).push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n}\nexport function formatError(error, mapper = (issue) => issue.message) {\n const fieldErrors = { _errors: [] };\n const processError = (error, path = []) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n // `_errors` is reserved by this legacy format, so merge a matching path segment into the current node instead of treating its array as a child.\n if (el === \"_errors\") {\n if (terminal)\n curr._errors.push(mapper(issue));\n i++;\n continue;\n }\n // A path element may collide with an inherited property name such as\n // \"__proto__\" or \"constructor\". Truthiness checks read the prototype\n // (so no node is created, then ._errors.push throws), and bracket\n // assignment of \"__proto__\" hits the setter instead of creating an\n // own key. Guard the read with hasOwnProperty and create the node\n // with defineProperty so any path element becomes a real own key.\n if (!Object.prototype.hasOwnProperty.call(curr, el)) {\n Object.defineProperty(curr, el, {\n value: { _errors: [] },\n enumerable: true,\n writable: true,\n configurable: true,\n });\n }\n const node = curr[el];\n if (terminal) {\n node._errors.push(mapper(issue));\n }\n curr = node;\n i++;\n }\n }\n }\n }\n };\n processError(error);\n return fieldErrors;\n}\nexport function treeifyError(error, mapper = (issue) => issue.message) {\n const result = { errors: [] };\n const processError = (error, path = []) => {\n var _a;\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n // regular union error\n issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n result.errors.push(mapper(issue));\n continue;\n }\n let curr = result;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n if (typeof el === \"string\") {\n curr.properties ?? (curr.properties = {});\n // el may collide with an inherited property name (\"__proto__\",\n // \"constructor\", ...); ??= reads the prototype so the node is never\n // created and curr.errors.push throws. Guard with hasOwnProperty and\n // create the node with defineProperty so \"__proto__\" becomes a real\n // own key rather than invoking the prototype setter.\n if (!Object.prototype.hasOwnProperty.call(curr.properties, el)) {\n Object.defineProperty(curr.properties, el, {\n value: { errors: [] },\n enumerable: true,\n writable: true,\n configurable: true,\n });\n }\n curr = curr.properties[el];\n }\n else {\n curr.items ?? (curr.items = []);\n (_a = curr.items)[el] ?? (_a[el] = { errors: [] });\n curr = curr.items[el];\n }\n if (terminal) {\n curr.errors.push(mapper(issue));\n }\n i++;\n }\n }\n }\n };\n processError(error);\n return result;\n}\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n * issues: [\n * {\n * expected: 'string',\n * code: 'invalid_type',\n * path: [ 'username' ],\n * message: 'Invalid input: expected string'\n * },\n * {\n * expected: 'number',\n * code: 'invalid_type',\n * path: [ 'favoriteNumbers', 1 ],\n * message: 'Invalid input: expected number'\n * }\n * ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n * ✖ Expected number, received string at \"username\n * favoriteNumbers[0]\n * ✖ Invalid input: expected number\n * ```\n */\nexport function toDotPath(_path) {\n const segs = [];\n const path = _path.map((seg) => (typeof seg === \"object\" ? seg.key : seg));\n for (const seg of path) {\n if (typeof seg === \"number\")\n segs.push(`[${seg}]`);\n else if (typeof seg === \"symbol\")\n segs.push(`[${JSON.stringify(String(seg))}]`);\n else if (/[^\\w$]/.test(seg))\n segs.push(`[${JSON.stringify(seg)}]`);\n else {\n if (segs.length)\n segs.push(\".\");\n segs.push(seg);\n }\n }\n return segs.join(\"\");\n}\nexport function prettifyError(error) {\n const lines = [];\n // sort by path length\n const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);\n // Process each issue\n for (const issue of issues) {\n lines.push(`✖ ${issue.message}`);\n if (issue.path?.length)\n lines.push(` → at ${toDotPath(issue.path)}`);\n }\n // Convert Map to formatted string\n return lines.join(\"\\n\");\n}\n","import * as core from \"./core.js\";\nimport * as errors from \"./errors.js\";\nimport * as util from \"./util.js\";\n// Always both keys, so the `_params` read site in `_parse` sees one object shape rather than two.\nfunction finalizeParams(callee, params) {\n return { callee: params?.callee ?? callee, Err: params?.Err };\n}\nexport const _parse = (_Err) => {\n const fn = (schema, value, _ctx, _params) => {\n const ctx = _ctx ? { ..._ctx, async: false } : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n if (result.issues.length) {\n const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, _params?.callee ?? fn);\n throw e;\n }\n return result.value;\n };\n return fn;\n};\nexport const parse = /* @__PURE__*/ _parse(errors.$ZodRealError);\nexport const _parseAsync = (_Err) => {\n const fn = async (schema, value, _ctx, params) => {\n const ctx = _ctx ? { ..._ctx, async: true } : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n if (result.issues.length) {\n const e = new (params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, params?.callee ?? fn);\n throw e;\n }\n return result.value;\n };\n return fn;\n};\nexport const parseAsync = /* @__PURE__*/ _parseAsync(errors.$ZodRealError);\nexport const _safeParse = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, async: false } : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value };\n};\nexport const safeParse = /* @__PURE__*/ _safeParse(errors.$ZodRealError);\n// the error is built on the first read of `error`: finalizing the issues and constructing the instance is most of a failing parse, and a caller that only branches on `success` never pays it. a getter in the literal keeps this small; the alternative, one shared accessor descriptor plus a hidden state slot, reads ~15% faster but costs ~75 B gzipped in every bundle\nfunction failure(Err, issues, ctx) {\n let error;\n return {\n success: false,\n get error() {\n if (!error) {\n error = new Err(issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n // finalizeIssue drops `input`, so the built error holds nothing; keeping the raw issues past this point pins the parsed value for the life of the result\n issues = undefined;\n ctx = undefined;\n }\n return error;\n },\n set error(e) {\n error = e;\n // a replacement makes the getter's branch unreachable, so the captures have to go here too\n issues = undefined;\n ctx = undefined;\n },\n };\n}\nexport const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, async: true } : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value };\n};\nexport const safeParseAsync = /* @__PURE__*/ _safeParseAsync(errors.$ZodRealError);\n// registry mirrors of the compiler's sentinels, so this module never imports the compiler\nconst COMPILE_INVALID = /* @__PURE__ */ Symbol.for(\"zod.compile.invalid\");\nconst COMPILE_FALLBACK = /* @__PURE__ */ Symbol.for(\"zod.compile.fallback\");\n// Deliberately tiny, because v8 will not inline a body carrying the fallback's object literals and throw. Everything that is not the compiled happy path lives in validateFallback, and that split is worth ~35% on a compiled schema.\nexport const validate = ((schema, value, _ctx) => {\n const validator = schema._zod.bag.validator;\n if (validator !== undefined) {\n if (validator(value) !== COMPILE_INVALID)\n return true;\n // a definite sentinel means the runtime would reject, so skip the re-parse; a ctx can still change the answer\n if (validator.definite === true && _ctx === undefined)\n return false;\n }\n return validateFallback(schema, value, _ctx);\n});\nfunction validateFallback(schema, value, _ctx) {\n const ctx = _ctx\n ? { ..._ctx, async: false, abortEarly: true }\n : { async: false, abortEarly: true };\n const fallbackRun = schema._zod.bag.fallbackRun;\n let result;\n if (fallbackRun) {\n // skip nested fast paths on the fallback, so user callbacks keep the at-most-twice bound\n ctx[COMPILE_FALLBACK] = true;\n result = fallbackRun({ value, issues: [] }, ctx);\n }\n else {\n result = schema._zod.run({ value, issues: [] }, ctx);\n }\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n return result.issues.length === 0;\n}\n// no fast path: the compiler keeps async parses on the runtime, because a promise-returning callback that is not declared async compiles to a throw\nexport const validateAsync = async (schema, value, _ctx) => {\n const ctx = _ctx\n ? { ..._ctx, async: true, abortEarly: true }\n : { async: true, abortEarly: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n return result.issues.length === 0;\n};\nexport const _encode = (_Err) => {\n const parse = _parse(_Err);\n const fn = (schema, value, _ctx, _params) => {\n const ctx = _ctx ? { ..._ctx, direction: \"backward\" } : { direction: \"backward\" };\n return parse(schema, value, ctx, finalizeParams(fn, _params));\n };\n return fn;\n};\nexport const encode = /* @__PURE__*/ _encode(errors.$ZodRealError);\nexport const _decode = (_Err) => {\n const parse = _parse(_Err);\n const fn = (schema, value, _ctx, _params) => {\n return parse(schema, value, _ctx, finalizeParams(fn, _params));\n };\n return fn;\n};\nexport const decode = /* @__PURE__*/ _decode(errors.$ZodRealError);\nexport const _encodeAsync = (_Err) => {\n const parseAsync = _parseAsync(_Err);\n const fn = async (schema, value, _ctx, _params) => {\n const ctx = _ctx ? { ..._ctx, direction: \"backward\" } : { direction: \"backward\" };\n return (await parseAsync(schema, value, ctx, finalizeParams(fn, _params)));\n };\n return fn;\n};\nexport const encodeAsync = /* @__PURE__*/ _encodeAsync(errors.$ZodRealError);\nexport const _decodeAsync = (_Err) => {\n const parseAsync = _parseAsync(_Err);\n const fn = async (schema, value, _ctx, _params) => {\n return await parseAsync(schema, value, _ctx, finalizeParams(fn, _params));\n };\n return fn;\n};\nexport const decodeAsync = /* @__PURE__*/ _decodeAsync(errors.$ZodRealError);\nexport const _safeEncode = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, direction: \"backward\" } : { direction: \"backward\" };\n return _safeParse(_Err)(schema, value, ctx);\n};\nexport const safeEncode = /* @__PURE__*/ _safeEncode(errors.$ZodRealError);\nexport const _safeDecode = (_Err) => (schema, value, _ctx) => {\n return _safeParse(_Err)(schema, value, _ctx);\n};\nexport const safeDecode = /* @__PURE__*/ _safeDecode(errors.$ZodRealError);\nexport const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, direction: \"backward\" } : { direction: \"backward\" };\n return _safeParseAsync(_Err)(schema, value, ctx);\n};\nexport const safeEncodeAsync = /* @__PURE__*/ _safeEncodeAsync(errors.$ZodRealError);\nexport const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {\n return _safeParseAsync(_Err)(schema, value, _ctx);\n};\nexport const safeDecodeAsync = /* @__PURE__*/ _safeDecodeAsync(errors.$ZodRealError);\n","import * as util from \"./util.js\";\n/**\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link cuid2} instead.\n * See https://github.com/paralleldrive/cuid.\n */\nexport const cuid = /^[cC][0-9a-z]{6,}$/;\nexport const cuid2 = /^[0-9a-z]+$/;\nexport const ulid = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;\nexport const xid = /^[0-9a-vA-V]{20}$/;\nexport const ksuid = /^[A-Za-z0-9]{27}$/;\nexport const nanoid = /^[a-zA-Z0-9_-]{21}$/;\nexport function nanoidOfLength(length) {\n return new RegExp(`^[a-zA-Z0-9_-]{${length}}$`);\n}\n/** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */\nexport const duration = /^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/;\n/** Implements ISO 8601-2 extensions like explicit +- prefixes, mixing weeks with other units, and fractional/negative components. */\nexport const extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n/** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */\nexport const guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;\n/** Returns a regex for validating an RFC 9562/4122 UUID.\n *\n * @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */\nexport const uuid = (version) => {\n if (!version)\n return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;\n return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);\n};\nexport const uuid4 = /*@__PURE__*/ uuid(4);\nexport const uuid6 = /*@__PURE__*/ uuid(6);\nexport const uuid7 = /*@__PURE__*/ uuid(7);\n/** Practical email validation */\nexport const email = /^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/;\n/** Equivalent to the HTML5 input[type=email] validation implemented by browsers. Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email */\nexport const html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n/** The classic emailregex.com regex for RFC 5322-compliant emails */\nexport const rfc5322Email = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n/** A loose regex that allows Unicode characters, enforces length limits, and that's about it. */\nexport const unicodeEmail = /^[^\\s@\"]{1,64}@[^\\s@]{1,255}$/u;\nexport const idnEmail = unicodeEmail;\nexport const browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\n// Single character class, not an alternation: the two properties overlap (U+1F9B0-U+1F9B3), so `(A|B)+` backtracks exponentially on a failed match. The leading lookahead then demands one anchor — a pictograph, a regional indicator, or the enclosing keycap — because `\\p{Emoji_Component}` on its own covers ASCII digits, `#`, `*`, ZWJ, variation selectors and skin tone modifiers, none of which is an emoji without a base.\nconst _emoji = `^(?=[\\\\s\\\\S]*[\\\\p{Extended_Pictographic}\\\\p{Regional_Indicator}\\\\u20E3])[\\\\p{Extended_Pictographic}\\\\p{Emoji_Component}]+$`;\nexport function emoji() {\n return new RegExp(_emoji, \"u\");\n}\nexport const ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\nexport const ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;\nexport const mac = (delimiter) => {\n const escapedDelim = util.escapeRegex(delimiter ?? \":\");\n return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);\n};\nexport const cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$/;\nexport const cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript\nexport const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;\nexport const base64url = /^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/;\n// based on https://stackoverflow.com/questions/106179/regular-expression-to-match-dns-hostname-or-ip-address\n// export const hostname: RegExp = /^([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+$/;\nexport const hostname = /^(?=.{1,253}\\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\\.?$/;\nexport const domain = /^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,63}$/;\nexport const httpProtocol = /^https?$/;\n// https://blog.stevenlevithan.com/archives/validate-phone-number#r4-3 (regex sans spaces) E.164: leading digit must be 1-9; total digits (excluding '+') between 7-15\nexport const e164 = /^\\+[1-9]\\d{6,14}$/;\n// Credit card shape: 12–19 digits, optionally separated by single spaces or single hyphens. ISO/IEC 7812 caps the PAN at 19 digits; 12 is the shortest issued length (Maestro).\nexport const creditCard = /^\\d(?:[ -]?\\d){11,18}$/;\n// ISO 4217 alpha codes from the SIX list, regenerated by scripts/update-iso-4217.ts\nexport const currencyCode = /^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/;\n// iban electronic format: 2-letter country, check digits 02-98 (the only values `98 - remainder` can produce), 11-30 bban characters\nexport const iban = /^[A-Z]{2}(?!00|01|99)\\d{2}[A-Z0-9]{11,30}$/;\nconst dateSource = `(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))`;\n/** Anchors a pattern source. The interpolation lives here rather than at the call site because\n * esbuild will not drop a `@__PURE__` call whose own argument interpolates a variable, but it\n * will drop `anchor(dateSource)`. Keeping it inline pinned `date` into every bundle. */\nfunction anchor(source) {\n return new RegExp(`^${source}$`);\n}\nexport const date = /*@__PURE__*/ anchor(dateSource);\nfunction timeSource(args) {\n const hhmm = `(?:[01]\\\\d|2[0-3]):[0-5]\\\\d`;\n const regex = typeof args.precision === \"number\"\n ? args.precision === -1\n ? `${hhmm}`\n : args.precision === 0\n ? `${hhmm}:[0-5]\\\\d`\n : `${hhmm}:[0-5]\\\\d\\\\.\\\\d{${args.precision}}`\n : args.seconds\n ? `${hhmm}:[0-5]\\\\d(?:\\\\.\\\\d+)?`\n : `${hhmm}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`;\n return regex;\n}\nexport function time(args) {\n return new RegExp(`^${timeSource(args)}$`);\n}\n// Adapted from https://stackoverflow.com/a/3143231\nexport function datetime(args) {\n const opts = [\"Z\"];\n // if (args.offset) opts.push(`([+-]\\\\d{2}:\\\\d{2})`);\n if (args.offset)\n opts.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);\n // RFC 3339 mandates seconds wherever the time carries a `Z` or an offset, so only the unqualified form `local` adds may omit them\n const qualified = `${timeSource({ precision: args.precision, seconds: true })}(?:${opts.join(\"|\")})`;\n const timeRegex = args.local ? `${qualified}|${timeSource({ precision: args.precision })}` : qualified;\n return new RegExp(`^${dateSource}T(?:${timeRegex})$`);\n}\n// the unbounded form of `string()` as a literal, so every plain string shares one instance instead of building its own\nexport const anyString = /^[\\s\\S]{0,}$/;\nexport const string = (params) => {\n const regex = params ? `[\\\\s\\\\S]{${params?.minimum ?? 0},${params?.maximum ?? \"\"}}` : `[\\\\s\\\\S]*`;\n return new RegExp(`^${regex}$`);\n};\nexport const bigint = /^-?\\d+n?$/;\nexport const integer = /^-?\\d+$/;\nexport const number = /^-?\\d+(?:\\.\\d+)?$/;\nexport const boolean = /^(?:true|false)$/i;\nconst _null = /^null$/i;\nexport { _null as null };\nconst _undefined = /^undefined$/i;\nexport { _undefined as undefined };\n// regex for string with no uppercase letters\nexport const lowercase = /^[^A-Z]*$/;\n// regex for string with no lowercase letters\nexport const uppercase = /^[^a-z]*$/;\n// regex for hexadecimal strings (any length)\nexport const hex = /^[0-9a-fA-F]*$/;\n// Hash regexes for different algorithms and encodings\n// Helper function to create base64 regex with exact length and padding\nfunction fixedBase64(bodyLength, padding) {\n return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`);\n}\n// Helper function to create base64url regex with exact length (no padding)\nfunction fixedBase64url(length) {\n return new RegExp(`^[A-Za-z0-9_-]{${length}}$`);\n}\n// MD5 (16 bytes): base64 = 24 chars total (22 + \"==\")\nexport const md5_hex = /^[0-9a-fA-F]{32}$/;\nexport const md5_base64 = /*@__PURE__*/ fixedBase64(22, \"==\");\nexport const md5_base64url = /*@__PURE__*/ fixedBase64url(22);\n// SHA1 (20 bytes): base64 = 28 chars total (27 + \"=\")\nexport const sha1_hex = /^[0-9a-fA-F]{40}$/;\nexport const sha1_base64 = /*@__PURE__*/ fixedBase64(27, \"=\");\nexport const sha1_base64url = /*@__PURE__*/ fixedBase64url(27);\n// SHA256 (32 bytes): base64 = 44 chars total (43 + \"=\")\nexport const sha256_hex = /^[0-9a-fA-F]{64}$/;\nexport const sha256_base64 = /*@__PURE__*/ fixedBase64(43, \"=\");\nexport const sha256_base64url = /*@__PURE__*/ fixedBase64url(43);\n// SHA384 (48 bytes): base64 = 64 chars total (no padding)\nexport const sha384_hex = /^[0-9a-fA-F]{96}$/;\nexport const sha384_base64 = /*@__PURE__*/ fixedBase64(64, \"\");\nexport const sha384_base64url = /*@__PURE__*/ fixedBase64url(64);\n// SHA512 (64 bytes): base64 = 88 chars total (86 + \"==\")\nexport const sha512_hex = /^[0-9a-fA-F]{128}$/;\nexport const sha512_base64 = /*@__PURE__*/ fixedBase64(86, \"==\");\nexport const sha512_base64url = /*@__PURE__*/ fixedBase64url(86);\n","// import { $ZodType } from \"./schemas.js\";\nimport * as core from \"./core.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nexport const $ZodCheck = /*@__PURE__*/ core.$constructor(\"$ZodCheck\", (inst, def) => {\n var _a;\n inst._zod ?? (inst._zod = {});\n inst._zod.def = def;\n (_a = inst._zod).onattach ?? (_a.onattach = []);\n});\n/** Default `when` for size-based checks: run only on non-nullish values with a `size`. */\nconst _whenHasSize = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n};\n/** Default `when` for length-based checks: run only on non-nullish values with a `length`. */\nconst _whenHasLength = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n};\nconst numericOriginMap = {\n number: \"number\",\n bigint: \"bigint\",\n object: \"date\",\n};\nexport const $ZodCheckLessThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckLessThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {\n return;\n }\n payload.issues.push({\n origin: numericOriginMap[typeof payload.value] ?? origin,\n code: \"too_big\",\n maximum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckGreaterThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckGreaterThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {\n return;\n }\n payload.issues.push({\n origin: numericOriginMap[typeof payload.value] ?? origin,\n code: \"too_small\",\n minimum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMultipleOf = \n/*@__PURE__*/ core.$constructor(\"$ZodCheckMultipleOf\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n if (typeof payload.value !== typeof def.value)\n throw new Error(\"Cannot mix number and bigint in multiple_of check.\");\n const isMultiple = typeof payload.value === \"bigint\"\n ? // `value % 0n` throws, and nothing is a multiple of zero — the number branch already fails this way via NaN\n def.value !== BigInt(0) && payload.value % def.value === BigInt(0)\n : util.floatSafeRemainder(payload.value, def.value) === 0;\n if (isMultiple)\n return;\n payload.issues.push({\n origin: typeof payload.value,\n code: \"not_multiple_of\",\n divisor: def.value,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckNumberFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n def.format = def.format || \"float64\";\n const isInt = def.format?.includes(\"int\");\n const origin = isInt ? \"int\" : \"number\";\n const [minimum, maximum] = util.NUMBER_FORMAT_RANGES[def.format];\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (isInt) {\n if (!Number.isInteger(input)) {\n // invalid_format issue\n // payload.issues.push({\n // expected: def.format,\n // format: def.format,\n // code: \"invalid_format\",\n // input,\n // inst,\n // });\n // invalid_type issue\n payload.issues.push({\n expected: origin,\n format: def.format,\n code: \"invalid_type\",\n continue: false,\n input,\n inst,\n });\n return;\n // not_multiple_of issue\n // payload.issues.push({\n // code: \"not_multiple_of\",\n // origin: \"number\",\n // input,\n // inst,\n // divisor: 1,\n // });\n }\n if (!Number.isSafeInteger(input)) {\n if (input > 0) {\n // too_big\n payload.issues.push({\n input,\n code: \"too_big\",\n maximum: Number.MAX_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n else {\n // too_small\n payload.issues.push({\n input,\n code: \"too_small\",\n minimum: Number.MIN_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n return;\n }\n }\n if (input < minimum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_small\",\n minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckBigIntFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n const [minimum, maximum] = util.BIGINT_FORMAT_RANGES[def.format];\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (input < minimum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_small\",\n minimum: minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckMaxSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = _whenHasSize);\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size <= def.maximum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = _whenHasSize);\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size >= def.minimum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckSizeEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckSizeEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = _whenHasSize);\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size === def.size)\n return;\n const tooBig = size > def.size;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n ...(tooBig ? { code: \"too_big\", maximum: def.size } : { code: \"too_small\", minimum: def.size }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMaxLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);\n inst._zod.check = (payload) => {\n const input = payload.value;\n const units = input.length;\n // Strings are measured in Unicode code points, not UTF-16 units. A code point is at most two units, so a string that already fits in units fits in code points; only an overflow has to be counted.\n const length = typeof input === \"string\" && units > def.maximum ? util.codePointLength(input) : units;\n if (length <= def.maximum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);\n inst._zod.check = (payload) => {\n const input = payload.value;\n const units = input.length;\n // A code point is one or two UTF-16 units, so fewer units than the floor can never reach it and twice the floor always clears it. Only in between is the exact count in doubt.\n const length = typeof input === \"string\" && units >= def.minimum && units < def.minimum * 2\n ? util.codePointLength(input)\n : units;\n if (length >= def.minimum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLengthEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckLengthEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);\n inst._zod.check = (payload) => {\n const input = payload.value;\n const units = input.length;\n // A code point is one or two UTF-16 units, so outside `[length, length * 2]` units the target is missed either way — and missed in the same direction in both measures.\n const length = typeof input === \"string\" && units >= def.length && units <= def.length * 2\n ? util.codePointLength(input)\n : units;\n if (length === def.length)\n return;\n const origin = util.getLengthableOrigin(input);\n const tooBig = length > def.length;\n payload.issues.push({\n origin,\n ...(tooBig ? { code: \"too_big\", maximum: def.length } : { code: \"too_small\", minimum: def.length }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckStringFormat\", (inst, def) => {\n var _a, _b;\n $ZodCheck.init(inst, def);\n if (def.pattern)\n (_a = inst._zod).check ?? (_a.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n ...(def.pattern ? { pattern: def.pattern.toString() } : {}),\n inst,\n continue: !def.abort,\n });\n });\n else\n (_b = inst._zod).check ?? (_b.check = () => { });\n});\nexport const $ZodCheckRegex = /*@__PURE__*/ core.$constructor(\"$ZodCheckRegex\", (inst, def) => {\n $ZodCheckStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"regex\",\n input: payload.value,\n pattern: def.pattern.toString(),\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLowerCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckLowerCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.lowercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckUpperCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckUpperCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.uppercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckIncludes = /*@__PURE__*/ core.$constructor(\"$ZodCheckIncludes\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const escapedRegex = util.escapeRegex(def.includes);\n // `String.prototype.includes(sub, position)` matches `sub` at `position`\n // OR LATER, so the pattern must allow at least `position` leading chars\n // (`{N,}`), not exactly `position` chars (`{N}`).\n const pattern = new RegExp(typeof def.position === \"number\" ? `^.{${def.position},}${escapedRegex}` : escapedRegex);\n def.pattern = pattern;\n inst._zod.check = (payload) => {\n if (payload.value.includes(def.includes, def.position))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"includes\",\n includes: def.includes,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStartsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckStartsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`^${util.escapeRegex(def.prefix)}.*`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.check = (payload) => {\n if (payload.value.startsWith(def.prefix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"starts_with\",\n prefix: def.prefix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckEndsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckEndsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`.*${util.escapeRegex(def.suffix)}$`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.check = (payload) => {\n if (payload.value.endsWith(def.suffix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"ends_with\",\n suffix: def.suffix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n///////////////////////////////////\n///// $ZodCheckProperty /////\n///////////////////////////////////\nfunction handleCheckPropertyResult(result, payload, property) {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(property, result.issues));\n }\n}\nexport const $ZodCheckProperty = /*@__PURE__*/ core.$constructor(\"$ZodCheckProperty\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n const result = def.schema._zod.run({\n value: payload.value[def.property],\n issues: [],\n }, {});\n if (result instanceof Promise) {\n return result.then((result) => handleCheckPropertyResult(result, payload, def.property));\n }\n handleCheckPropertyResult(result, payload, def.property);\n return;\n };\n});\nexport const $ZodCheckProperties = /*@__PURE__*/ core.$constructor(\"$ZodCheckProperties\", (inst, def) => {\n $ZodCheck.init(inst, def);\n util.hide(inst, Symbol.iterator, function* () {\n yield inst;\n });\n // key and schema snapshotted together: reading one live and the other cached lets a later mutation of the caller's shape object pair a stale key with a missing schema\n let entries;\n inst._zod.check = (payload) => {\n // the base schema already typed the value, so only a nullish one is rejected here: the properties read on a primitive too, matching z.property() on a string's length\n if (payload.value == null) {\n payload.issues.push({ expected: \"object\", code: \"invalid_type\", input: payload.value, inst });\n return undefined;\n }\n entries ?? (entries = Reflect.ownKeys(def.shape).map((key) => [key, def.shape[key]]));\n const input = payload.value;\n let proms;\n for (const [key, schema] of entries) {\n const result = schema._zod.run({ value: input[key], issues: [] }, {});\n if (result instanceof Promise) {\n proms ?? (proms = []);\n proms.push(result.then((result) => handleCheckPropertyResult(result, payload, key)));\n }\n else {\n handleCheckPropertyResult(result, payload, key);\n }\n }\n if (proms)\n return Promise.all(proms).then(() => undefined);\n return undefined;\n };\n});\nexport const $ZodCheckMimeType = /*@__PURE__*/ core.$constructor(\"$ZodCheckMimeType\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const mimeSet = new Set(def.mime);\n inst._zod.check = (payload) => {\n if (mimeSet.has(payload.value.type))\n return;\n payload.issues.push({\n code: \"invalid_value\",\n values: def.mime,\n input: payload.value.type,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckOverwrite = /*@__PURE__*/ core.$constructor(\"$ZodCheckOverwrite\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n payload.value = def.tx(payload.value);\n };\n});\n","export class Doc {\n constructor(args = [], closed = {}) {\n this.content = [];\n this.indent = 0;\n this.args = args;\n this.closed = closed;\n }\n // the compiler catches a child's throw and keeps writing into this doc, so the indent has to unwind with it\n indented(fn) {\n this.indent += 1;\n try {\n fn(this);\n }\n finally {\n this.indent -= 1;\n }\n }\n write(arg) {\n if (typeof arg === \"function\") {\n arg(this, { execution: \"sync\" });\n arg(this, { execution: \"async\" });\n return;\n }\n const content = arg;\n const lines = content.split(\"\\n\").filter((x) => x);\n const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));\n const dedented = lines.map((x) => x.slice(minIndent)).map((x) => \" \".repeat(this.indent * 2) + x);\n for (const line of dedented) {\n this.content.push(line);\n }\n }\n compile() {\n const F = Function;\n const content = this?.content ?? [``];\n const factory = new F(...Object.keys(this.closed), `return function (${this.args.join(\", \")}) {\\n${content.join(\"\\n\")}\\n};`);\n return factory(...Object.values(this.closed));\n }\n}\n","export const version = {\n major: 4,\n minor: 6,\n patch: 7,\n};\n","import * as checks from \"./checks.js\";\nimport * as core from \"./core.js\";\nimport { Doc } from \"./doc.js\";\nimport { parse, parseAsync } from \"./parse.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nimport { version } from \"./versions.js\";\nexport const $ZodType = /*@__PURE__*/ core.$constructor(\"$ZodType\", (inst, def) => {\n var _a;\n inst ?? (inst = {});\n inst._zod.def = def; // set _def property\n inst._zod.bag = inst._zod.bag || {}; // initialize _bag object\n inst._zod.version = version;\n const defChecks = inst._zod.def.checks;\n // if inst is itself a checks.$ZodCheck, run it as a check\n const checks = inst._zod.traits.has(\"$ZodCheck\")\n ? [inst, ...(defChecks ?? [])]\n : defChecks?.length\n ? [...defChecks]\n : [];\n for (const ch of checks) {\n for (const fn of ch._zod.onattach) {\n fn(inst);\n }\n }\n if (checks.length === 0) {\n // deferred initializer inst._zod.parse is not yet defined\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n inst._zod.deferred?.push(() => {\n inst._zod.run = inst._zod.parse;\n });\n }\n else {\n const runChecks = (payload, checks, ctx) => {\n if (payload.memo)\n return payload;\n let isAborted = util.aborted(payload);\n let asyncResult;\n for (const ch of checks) {\n if (ch._zod.def.when) {\n if (util.explicitlyAborted(payload))\n continue;\n const shouldRun = ch._zod.def.when(payload);\n if (!shouldRun)\n continue;\n }\n else if (isAborted) {\n continue;\n }\n const currLen = payload.issues.length;\n const _ = ch._zod.check(payload);\n if (_ instanceof Promise && ctx?.async === false) {\n throw new core.$ZodAsyncError();\n }\n if (asyncResult || _ instanceof Promise) {\n asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {\n await _;\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n return;\n util.attachSchema(payload.issues, currLen, inst);\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n });\n }\n else {\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n continue;\n util.attachSchema(payload.issues, currLen, inst);\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n }\n }\n if (asyncResult) {\n return asyncResult.then(() => {\n return payload;\n });\n }\n return payload;\n };\n const handleCanaryResult = (canary, payload, ctx) => {\n // abort if the canary is aborted\n if (util.aborted(canary)) {\n canary.aborted = true;\n return canary;\n }\n // run checks first, then\n const checkResult = runChecks(payload, checks, ctx);\n if (checkResult instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));\n }\n return inst._zod.parse(checkResult, ctx);\n };\n inst._zod.run = (payload, ctx) => {\n if (ctx.skipChecks) {\n return inst._zod.parse(payload, ctx);\n }\n if (ctx.direction === \"backward\") {\n // run canary initial pass (no checks)\n const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });\n if (canary instanceof Promise) {\n return canary.then((canary) => {\n return handleCanaryResult(canary, payload, ctx);\n });\n }\n return handleCanaryResult(canary, payload, ctx);\n }\n // forward\n const result = inst._zod.parse(payload, ctx);\n if (result instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return result.then((result) => runChecks(result, checks, ctx));\n }\n return runChecks(result, checks, ctx);\n };\n }\n}, {\n // Wrappers extend this by installing a richer factory over it; reading it eagerly would defeat the laziness.\n get \"~standard\"() {\n return util.hide(this, \"~standard\", standardProps(this));\n },\n set \"~standard\"(value) {\n util.own(this, \"~standard\", value);\n },\n});\n/** The Standard Schema surface for `inst`. Shared so wrappers can extend it without forcing it. */\n// a Standard Schema result only reports issues, so a failure finalizes them straight off the raw payload: no ZodError, and no lazy result to read through\nconst toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())) } : { value: r.value };\nasync function validateAsync(inst, value) {\n const ctx = { async: true };\n return toStandardResult((await inst._zod.run({ value, issues: [] }, ctx)), ctx);\n}\nexport function standardProps(inst) {\n return {\n validate: (value) => {\n const ctx = { async: false };\n try {\n const r = inst._zod.run({ value, issues: [] }, ctx);\n if (!(r instanceof Promise))\n return toStandardResult(r, ctx);\n }\n catch (_) { }\n // async function so a synchronously throwing check rejects instead of escaping validate\n return validateAsync(inst, value);\n },\n vendor: \"zod\",\n version: 1,\n };\n}\nexport { clone } from \"./util.js\";\nexport const $ZodString = /*@__PURE__*/ core.$constructor(\"$ZodString\", (inst, def) => {\n $ZodType.init(inst, def);\n // a format's own pattern, else unbounded; a template literal derives the check-aware form itself\n inst._zod.pattern = def.pattern ?? regexes.anyString;\n inst._zod.parse = (payload, _) => {\n if (def.coerce)\n try {\n payload.value = String(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"string\")\n return payload;\n payload.issues.push({\n expected: \"string\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodStringFormat\", (inst, def) => {\n // check initialization must come first\n checks.$ZodCheckStringFormat.init(inst, def);\n $ZodString.init(inst, def);\n});\nexport const $ZodGUID = /*@__PURE__*/ core.$constructor(\"$ZodGUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.guid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodUUID = /*@__PURE__*/ core.$constructor(\"$ZodUUID\", (inst, def) => {\n if (def.version) {\n const versionMap = {\n v1: 1,\n v2: 2,\n v3: 3,\n v4: 4,\n v5: 5,\n v6: 6,\n v7: 7,\n v8: 8,\n };\n const v = versionMap[def.version];\n if (v === undefined)\n throw new Error(`Invalid UUID version: \"${def.version}\"`);\n def.pattern ?? (def.pattern = regexes.uuid(v));\n }\n else\n def.pattern ?? (def.pattern = regexes.uuid());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodEmail = /*@__PURE__*/ core.$constructor(\"$ZodEmail\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.email);\n $ZodStringFormat.init(inst, def);\n});\n/** The `://` guard rejected the input before the URL constructor saw it. */\nexport const URL_BAD_FORMAT = 1;\n/** The URL parser rejected the input. */\nexport const URL_UNPARSEABLE = 2;\nexport function canParseURL(input) {\n try {\n if (typeof URL !== \"undefined\" && typeof URL.canParse === \"function\")\n return URL.canParse(input);\n new URL(input);\n return true;\n }\n catch {\n return false;\n }\n}\nexport function validateURL(trimmed, def) {\n if (!(\"normalize\" in def) && !(\"hostname\" in def) && !(\"protocol\" in def)) {\n return canParseURL(trimmed) || URL_UNPARSEABLE;\n }\n return parseURLObject(trimmed, def);\n}\n/** Parses a URL while preserving the non-normalizing HTTP guard. */\nexport function parseURLObject(trimmed, def) {\n // When normalize is off, require :// for http/https URLs. This prevents strings like \"http:example.com\" or \"https:/path\" from being silently accepted\n if (!def.normalize && def.protocol?.source === regexes.httpProtocol.source && !/^https?:\\/\\//i.test(trimmed)) {\n return URL_BAD_FORMAT;\n }\n try {\n if (typeof URL !== \"undefined\") {\n const URLStatic = URL;\n if (typeof URLStatic.parse === \"function\")\n return URLStatic.parse(trimmed) ?? URL_UNPARSEABLE;\n }\n // @ts-ignore\n return new URL(trimmed);\n }\n catch {\n return URL_UNPARSEABLE;\n }\n}\nconst asciiTabOrNewline = /[\\t\\n\\r]/g;\n/** The URL parser deletes every ASCII tab, LF and CR from its input before it parses, so `new URL(\"https://exa\\nmple.com\")` reports on `example.com`. Applying the same deletion to the returned value closes the half of that divergence which can move the host; the parser's other rewrite, stripping C0 controls at the edges, cannot. */\nexport function stripTabAndNewline(value) {\n return value.replace(asciiTabOrNewline, \"\");\n}\nexport function urlHostnameOk(url, hostname) {\n hostname.lastIndex = 0;\n return hostname.test(url.hostname);\n}\nexport function urlProtocolOk(url, protocol) {\n protocol.lastIndex = 0;\n return protocol.test(url.protocol.endsWith(\":\") ? url.protocol.slice(0, -1) : url.protocol);\n}\nexport const $ZodURL = /*@__PURE__*/ core.$constructor(\"$ZodURL\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n try {\n // Trim whitespace from input\n const trimmed = payload.value.trim();\n const url = validateURL(trimmed, def);\n if (url === URL_BAD_FORMAT) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid URL format\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n return;\n }\n if (url === URL_UNPARSEABLE) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n return;\n }\n if (url === true) {\n payload.value = stripTabAndNewline(trimmed);\n return;\n }\n if (def.hostname && !urlHostnameOk(url, def.hostname)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid hostname\",\n pattern: def.hostname.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n if (def.protocol && !urlProtocolOk(url, def.protocol)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid protocol\",\n pattern: def.protocol.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n // Set the output value based on normalize flag\n payload.value = def.normalize ? url.href : stripTabAndNewline(trimmed);\n return;\n }\n catch (_) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodEmoji = /*@__PURE__*/ core.$constructor(\"$ZodEmoji\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.emoji());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodNanoID = /*@__PURE__*/ core.$constructor(\"$ZodNanoID\", (inst, def) => {\n if (def.length !== undefined && (!Number.isInteger(def.length) || def.length < 1))\n throw new Error(`Invalid nanoid length: ${def.length}`);\n def.pattern ?? (def.pattern = def.length === undefined ? regexes.nanoid : regexes.nanoidOfLength(def.length));\n $ZodStringFormat.init(inst, def);\n});\n/**\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.\n * See https://github.com/paralleldrive/cuid.\n */\nexport const $ZodCUID = /*@__PURE__*/ core.$constructor(\"$ZodCUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCUID2 = /*@__PURE__*/ core.$constructor(\"$ZodCUID2\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid2);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodULID = /*@__PURE__*/ core.$constructor(\"$ZodULID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ulid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodXID = /*@__PURE__*/ core.$constructor(\"$ZodXID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.xid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodKSUID = /*@__PURE__*/ core.$constructor(\"$ZodKSUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ksuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODateTime = /*@__PURE__*/ core.$constructor(\"$ZodISODateTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.datetime(def));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODate = /*@__PURE__*/ core.$constructor(\"$ZodISODate\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.date);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISOTime = /*@__PURE__*/ core.$constructor(\"$ZodISOTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.time(def));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODuration = /*@__PURE__*/ core.$constructor(\"$ZodISODuration\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.duration);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodIPv4 = /*@__PURE__*/ core.$constructor(\"$ZodIPv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv4);\n $ZodStringFormat.init(inst, def);\n});\n/** An IPv6 address is written with hex digits, colons and dots, and nothing else. The guard is what makes the check below an IPv6 check: `new URL(\"http://[...]\")` parses an authority, not an address, so `@` and `\\` re-delimit it and `\"::@1\\\\\"` validates against the host `0.0.0.1`. The URL parser also deletes ASCII tab, LF and CR rather than failing, which is how `\"::1\\n\"` validated as `::1`. */\nconst ipv6Alphabet = /^[0-9a-fA-F:.]+$/;\nexport function isValidIPv6(value) {\n if (!ipv6Alphabet.test(value))\n return false;\n return canParseURL(`http://[${value}]`);\n}\nexport const $ZodIPv6 = /*@__PURE__*/ core.$constructor(\"$ZodIPv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv6);\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (!isValidIPv6(payload.value)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"ipv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodMAC = /*@__PURE__*/ core.$constructor(\"$ZodMAC\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.mac(def.delimiter));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv4);\n $ZodStringFormat.init(inst, def);\n});\nexport function isValidCIDRv6(value) {\n const parts = value.split(\"/\");\n if (parts.length !== 2)\n return false;\n const [address, prefix] = parts;\n if (!prefix)\n return false;\n const prefixNum = Number(prefix);\n if (`${prefixNum}` !== prefix)\n return false;\n if (prefixNum < 0 || prefixNum > 128)\n return false;\n return isValidIPv6(address);\n}\nexport const $ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv6); // not used for validation\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (!isValidCIDRv6(payload.value)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"cidrv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64(data) {\n if (data === \"\")\n return true;\n // atob ignores whitespace, so reject it up front.\n if (/\\s/.test(data))\n return false;\n if (data.length % 4 !== 0)\n return false;\n try {\n // @ts-ignore\n atob(data);\n return true;\n }\n catch {\n return false;\n }\n}\n// lax on purpose: the quantified regexes.base64 overflows the regex stack on multi-MB input and its leading ^$| alternation leaks through template-literal composition; isValidBase64 enforces length and padding\nexport const base64Charset = /^[0-9a-zA-Z+/]*={0,2}$/;\nexport const $ZodBase64 = /*@__PURE__*/ core.$constructor(\"$ZodBase64\", (inst, def) => {\n def.pattern ?? (def.pattern = base64Charset);\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (isValidBase64(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n////////////////////////////// ZodBase64URL //////////////////////////////\n// lax on purpose: the quantified regexes.base64url overflows the regex stack on multi-MB input; isValidBase64 enforces length on the padded string\nexport const base64urlCharset = /^[A-Za-z0-9_-]*$/;\nexport function isValidBase64URL(data) {\n if (!base64urlCharset.test(data))\n return false;\n const base64 = data.replace(/[-_]/g, (c) => (c === \"-\" ? \"+\" : \"/\"));\n const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, \"=\");\n return isValidBase64(padded);\n}\nexport const $ZodBase64URL = /*@__PURE__*/ core.$constructor(\"$ZodBase64URL\", (inst, def) => {\n def.pattern ?? (def.pattern = base64urlCharset);\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (isValidBase64URL(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodE164 = /*@__PURE__*/ core.$constructor(\"$ZodE164\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.e164);\n $ZodStringFormat.init(inst, def);\n});\n////////////////////////////// ZodCreditCard //////////////////////////////\nconst CC_SANITIZE = /[- ]/g;\n/** Luhn checksum on a digit-only string. Adapted from valibot (MIT). */\nfunction isLuhnAlgo(digits) {\n let length = digits.length;\n let bit = 1;\n let sum = 0;\n while (length) {\n const value = digits.charCodeAt(--length) - 48;\n bit ^= 1;\n sum += bit ? [0, 2, 4, 6, 8, 1, 3, 5, 7, 9][value] : value;\n }\n return sum % 10 === 0;\n}\nexport function isValidCreditCard(input) {\n if (!regexes.creditCard.test(input))\n return false;\n return isLuhnAlgo(input.replace(CC_SANITIZE, \"\"));\n}\nexport const $ZodCreditCard = /*@__PURE__*/ core.$constructor(\"$ZodCreditCard\", (inst, def) => {\n // Shape only — the Luhn check below is not expressible as a pattern, so consumers of `pattern` (JSON Schema, template literals) get the length and separator rules alone.\n def.pattern ?? (def.pattern = regexes.creditCard);\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (isValidCreditCard(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"credit_card\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n////////////////////////////// ZodIBAN //////////////////////////////\n// iso 7064 mod 97-10 checksum without BigInt\nfunction isIso7064Mod97(iban) {\n let remainder = 0;\n const len = iban.length;\n for (let i = 4; i < len; i++) {\n const code = iban.charCodeAt(i);\n remainder = (code >= 65 ? remainder * 100 + (code - 55) : remainder * 10 + (code - 48)) % 97;\n }\n for (let i = 0; i < 4; i++) {\n const code = iban.charCodeAt(i);\n remainder = (code >= 65 ? remainder * 100 + (code - 55) : remainder * 10 + (code - 48)) % 97;\n }\n return remainder === 1;\n}\nexport function isValidIBAN(input) {\n if (!regexes.iban.test(input))\n return false;\n return isIso7064Mod97(input);\n}\nexport const $ZodIBAN = /*@__PURE__*/ core.$constructor(\"$ZodIBAN\", (inst, def) => {\n // shape only — checksum is not expressible as a pattern\n def.pattern ?? (def.pattern = regexes.iban);\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (isValidIBAN(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"iban\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n////////////////////////////// ZodJWT //////////////////////////////\nexport function isValidJWT(token, algorithm = null) {\n try {\n const tokensParts = token.split(\".\");\n if (tokensParts.length !== 3)\n return false;\n const [header] = tokensParts;\n if (!header)\n return false;\n // @ts-ignore\n const parsedHeader = JSON.parse(atob(header));\n if (\"typ\" in parsedHeader && parsedHeader?.typ !== \"JWT\")\n return false;\n if (!parsedHeader.alg)\n return false;\n if (algorithm && (!(\"alg\" in parsedHeader) || parsedHeader.alg !== algorithm))\n return false;\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodJWT = /*@__PURE__*/ core.$constructor(\"$ZodJWT\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (isValidJWT(payload.value, def.alg))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"jwt\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCustomStringFormat\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (def.fn(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodNumber = /*@__PURE__*/ core.$constructor(\"$ZodNumber\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.number;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Number(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"number\" && !Number.isNaN(input) && Number.isFinite(input)) {\n return payload;\n }\n const received = typeof input === \"number\"\n ? Number.isNaN(input)\n ? \"NaN\"\n : !Number.isFinite(input)\n ? String(input)\n : undefined\n : undefined;\n payload.issues.push({\n expected: \"number\",\n code: \"invalid_type\",\n input,\n inst,\n ...(received ? { received } : {}),\n });\n return payload;\n };\n});\nexport const $ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodNumberFormat\", (inst, def) => {\n checks.$ZodCheckNumberFormat.init(inst, def);\n $ZodNumber.init(inst, def); // no format checks\n});\nexport const $ZodBoolean = /*@__PURE__*/ core.$constructor(\"$ZodBoolean\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.boolean;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Boolean(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"boolean\")\n return payload;\n payload.issues.push({\n expected: \"boolean\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigInt = /*@__PURE__*/ core.$constructor(\"$ZodBigInt\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.bigint;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = BigInt(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"bigint\")\n return payload;\n payload.issues.push({\n expected: \"bigint\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodBigIntFormat\", (inst, def) => {\n checks.$ZodCheckBigIntFormat.init(inst, def);\n $ZodBigInt.init(inst, def); // no format checks\n});\nexport const $ZodSymbol = /*@__PURE__*/ core.$constructor(\"$ZodSymbol\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"symbol\")\n return payload;\n payload.issues.push({\n expected: \"symbol\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodUndefined = /*@__PURE__*/ core.$constructor(\"$ZodUndefined\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.undefined;\n inst._zod.values = new Set([undefined]);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"undefined\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodNull = /*@__PURE__*/ core.$constructor(\"$ZodNull\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.null;\n inst._zod.values = new Set([null]);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (input === null)\n return payload;\n payload.issues.push({\n expected: \"null\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodAny = /*@__PURE__*/ core.$constructor(\"$ZodAny\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodUnknown = /*@__PURE__*/ core.$constructor(\"$ZodUnknown\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodNever = /*@__PURE__*/ core.$constructor(\"$ZodNever\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n payload.issues.push({\n expected: \"never\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodVoid = /*@__PURE__*/ core.$constructor(\"$ZodVoid\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"void\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodDate = /*@__PURE__*/ core.$constructor(\"$ZodDate\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce) {\n try {\n payload.value = new Date(payload.value);\n }\n catch (_err) { }\n }\n const input = payload.value;\n const isDate = input instanceof Date;\n const isValidDate = isDate && !Number.isNaN(input.getTime());\n if (isValidDate)\n return payload;\n payload.issues.push({\n expected: \"date\",\n code: \"invalid_type\",\n input,\n ...(isDate ? { received: \"Invalid Date\" } : {}),\n inst,\n });\n return payload;\n };\n});\n// an oversized container fails its leading size checks before any element is parsed\nfunction capSize(inst, size) {\n const caps = util.sizeCaps(inst._zod.def.checks);\n if (!caps.length)\n return;\n const cap = Math.min(...caps.map((c) => c[0]));\n const parse = inst._zod.parse;\n inst._zod.parse = (payload, ctx) => {\n const n = size(payload.value);\n if (n > cap && !ctx?.skipChecks && ctx?.direction !== \"backward\") {\n for (const [max, ch] of util.sizeCaps(inst._zod.def.checks)) {\n if (n > max && ch._zod.def.when(payload)) {\n const start = payload.issues.length;\n ch._zod.check(payload);\n // the value is still the raw input, so no later check may read it\n payload.issues[start].continue = false;\n util.attachSchema(payload.issues, start, inst);\n return payload;\n }\n }\n }\n return parse(payload, ctx);\n };\n}\nconst arraySize = (input) => (Array.isArray(input) ? input.length : -1);\nconst mapSize = (input) => (input instanceof Map ? input.size : -1);\nconst setSize = (input) => (input instanceof Set ? input.size : -1);\nfunction handleArrayResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nexport const $ZodArray = /*@__PURE__*/ core.$constructor(\"$ZodArray\", (inst, def) => {\n $ZodType.init(inst, def);\n const memo = core.globalConfig.memoizer;\n memo?.attach(inst);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n expected: \"array\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = memo ? memo.alloc(inst, payload, Array(input.length), ctx) : Array(input.length);\n const proms = [];\n const abortEarly = ctx?.abortEarly;\n for (let i = 0; i < input.length; i++) {\n const item = input[i];\n const result = def.element._zod.run({\n value: item,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleArrayResult(result, payload, i)));\n }\n else {\n handleArrayResult(result, payload, i);\n // the element's payload is authoritative here, since handleArrayResult forwards every issue; an object's is not, because it drops a failed absent optional\n if (abortEarly && result.issues.length !== 0 && util.aborted(result))\n break;\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload; //handleArrayResultsAsync(parseResults, final);\n };\n capSize(inst, arraySize);\n});\nfunction handlePropertyResult(result, final, key, input, optin, optout) {\n const isPresent = key in input;\n const isOptionalOut = optout === \"optional\";\n // The middle rung means \"absence permitted, nothing supplied in its place\", so an absent key contributes nothing — whatever the schema made of `undefined` is invented, not substituted. Only `optional` reaches this with a value: `defaulted` substitutes, and a schema that isn't optional-out has to keep the key.\n if (!isPresent && isOptionalOut && optin === \"optional\") {\n return;\n }\n if (result.issues.length) {\n // For optional-in/out schemas, ignore errors on absent keys.\n if (optin !== undefined && isOptionalOut && !isPresent) {\n return;\n }\n final.issues.push(...util.prefixIssues(key, result.issues));\n }\n if (!isPresent && optin === undefined) {\n if (!result.issues.length) {\n final.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: undefined,\n path: [key],\n });\n }\n return;\n }\n if (result.value === undefined) {\n if (isPresent || (optin === \"defaulted\" && !isOptionalOut)) {\n final.value[key] = undefined;\n }\n }\n else {\n final.value[key] = result.value;\n }\n}\n// one shared instance; a fresh [] per schema cost 56 bytes retained\nconst NO_SYMBOL_KEYS = [];\nfunction normalizeDef(def) {\n const keys = Object.keys(def.shape);\n const ownSymbols = Object.getOwnPropertySymbols(def.shape);\n const symbolKeys = ownSymbols.length ? ownSymbols : NO_SYMBOL_KEYS;\n // aliases `keys` when there are no symbols, so a string-only shape keeps one array\n const allKeys = symbolKeys.length ? [...keys, ...symbolKeys] : keys;\n for (const k of allKeys) {\n if (!def.shape?.[k]?._zod?.traits?.has(\"$ZodType\")) {\n throw new Error(`Invalid element at key \"${String(k)}\": expected a Zod schema`);\n }\n }\n const okeys = util.optionalKeys(def.shape);\n return {\n ...def,\n allKeys,\n symbolKeys,\n // string-only: handleCatchall matches it against `for...in`, which never yields a symbol\n keySet: new Set(keys),\n numKeys: keys.length,\n optionalKeys: new Set(okeys),\n };\n}\nfunction handleCatchall(proms, input, payload, ctx, def, inst, abortEarly) {\n const unrecognized = [];\n const keySet = def.keySet;\n const _catchall = def.catchall._zod;\n const t = _catchall.def.type;\n const optin = _catchall.optin;\n const optout = _catchall.optout;\n // starts at 0, not the current length: the shape phase already ran and may have aborted\n let seen = 0;\n for (const key in input) {\n if (abortEarly && payload.issues.length !== seen) {\n if (util.aborted(payload, seen))\n break;\n seen = payload.issues.length;\n }\n // Must precede the __proto__ branch: a declared key is not unrecognized, even though the shape loop deliberately strips __proto__ from the parsed output.\n if (keySet.has(key))\n continue;\n // Don't copy an undeclared __proto__ into the result; assignment to a plain {} would replace the result prototype. But in strict mode it is still an unknown key, so report it before skipping.\n if (key === \"__proto__\") {\n if (t === \"never\")\n unrecognized.push(key);\n continue;\n }\n if (t === \"never\") {\n unrecognized.push(key);\n continue;\n }\n const r = _catchall.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));\n }\n else {\n handlePropertyResult(r, payload, key, input, optin, optout);\n }\n }\n if (unrecognized.length) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n keys: unrecognized,\n input,\n inst,\n // Describes the shape of the input, not the validity of the parsed value, so it never aborts. The parse still fails; the schema's own checks just get to run first, and an enclosing intersection can reconcile the key against a sibling operand.\n continue: true,\n });\n }\n if (!proms.length)\n return payload;\n return Promise.all(proms).then(() => {\n return payload;\n });\n}\nexport const $ZodObject = /*@__PURE__*/ core.$constructor(\"$ZodObject\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodType.init(inst, def);\n const desc = Object.getOwnPropertyDescriptor(def, \"shape\");\n // a cloned def carries its source's accessor, which knows the shape it answers from; adopting that keeps the clone's keys readable without running it\n const sh = desc?.get ? desc.get.raw : (def.shape ?? {});\n if (sh) {\n // Freezes the shape on first read, so its getters resolve once and every later read sees the same schemas.\n const get = () => {\n const newSh = { ...sh };\n Object.defineProperty(def, \"shape\", { value: newSh });\n get.raw = newSh;\n return newSh;\n };\n get.raw = sh;\n Object.defineProperty(def, \"shape\", { get });\n }\n const _normalized = util.cached(() => normalizeDef(def));\n util.defineLazyInternal(inst, \"propValues\", (zod) => {\n const shape = zod.def.shape;\n const propValues = {};\n for (const key in shape) {\n const field = shape[key]._zod;\n if (field.values) {\n if (!Object.prototype.hasOwnProperty.call(propValues, key)) {\n util.assignProp(propValues, key, new Set());\n }\n for (const v of field.values)\n propValues[key].add(v);\n // An omittable slot reads back as undefined at a discriminator lookup, so it has to claim undefined: two options that can both omit the key are not discriminable on it.\n if (field.optin !== undefined)\n propValues[key].add(undefined);\n }\n }\n return propValues;\n });\n const isObject = util.isObject;\n const catchall = def.catchall;\n let value;\n const memo = core.globalConfig.memoizer;\n memo?.attach(inst);\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};\n const proms = [];\n const shape = value.shape;\n const abortEarly = ctx?.abortEarly;\n let seen = payload.issues.length;\n for (const key of value.allKeys) {\n if (abortEarly && payload.issues.length !== seen) {\n if (util.aborted(payload, seen))\n break;\n seen = payload.issues.length;\n }\n if (key === \"__proto__\")\n continue;\n const el = shape[key];\n const optin = el._zod.optin;\n const optout = el._zod.optout;\n const r = el._zod.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));\n }\n else {\n handlePropertyResult(r, payload, key, input, optin, optout);\n }\n }\n if (!catchall) {\n return proms.length ? Promise.all(proms).then(() => payload) : payload;\n }\n return handleCatchall(proms, input, payload, ctx, _normalized.value, inst, abortEarly === true);\n };\n});\nexport const $ZodObjectJIT = /*@__PURE__*/ core.$constructor(\"$ZodObjectJIT\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodObject.init(inst, def);\n const superParse = inst._zod.parse;\n const _normalized = util.cached(() => normalizeDef(def));\n const memo = core.globalConfig.memoizer;\n const generateFastpass = (shape) => {\n const normalized = _normalized.value;\n const syms = normalized.symbolKeys;\n // a symbol has no source literal, so it is read as `syms[i]` off the closed-over scope\n const doc = new Doc([\"payload\", \"ctx\"], { shape, inst, memo, syms });\n const parseStr = (k) => `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;\n // prefixes in place, like util.prefixIssues. newResult must land before the early return: a catchall runs after this and would otherwise write onto the caller's input\n const prefixStr = (id, k) => `\n let ${id}_ab = false;\n for (let i = 0; i < ${id}.issues.length; i++) {\n const iss = ${id}.issues[i];\n iss.path = iss.path ? [${k}, ...iss.path] : [${k}];\n payload.issues.push(iss);\n if (iss.continue !== true) ${id}_ab = true;\n }\n if (${id}_ab && ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }`;\n doc.write(`const input = payload.value;`);\n const ids = Object.create(null);\n let counter = 0;\n for (const key of normalized.allKeys) {\n ids[key] = `key_${counter++}`;\n }\n // A: preserve key order {\n doc.write(memo ? `const newResult = memo.alloc(inst, payload, {}, ctx);` : `const newResult = {};`);\n for (const key of normalized.allKeys) {\n if (key === \"__proto__\")\n continue;\n const id = ids[key];\n const k = typeof key === \"symbol\" ? `syms[${syms.indexOf(key)}]` : util.esc(key);\n const isPresent = `${k} in input`;\n const schema = shape[key];\n const optin = schema?._zod?.optin;\n const isOptionalIn = optin !== undefined;\n const isOptionalOut = schema?._zod?.optout === \"optional\";\n doc.write(`const ${id} = ${parseStr(k)};`);\n if (isOptionalIn && isOptionalOut) {\n // For optional-in/out schemas, ignore errors on absent keys — and, like the interpreted path, drop the value produced alongside them. The middle rung goes further: it permits absence without supplying anything in its place, so an absent key contributes nothing at all.\n const assign = optin === \"optional\" ? `${id}_present` : `${id}.value !== undefined || ${id}_present`;\n doc.write(`\n const ${id}_present = ${isPresent};\n if (!${id}.issues.length || ${id}_present) {\n if (${id}.issues.length) {${prefixStr(id, k)}\n }\n\n if (${assign}) {\n newResult[${k}] = ${id}.value;\n }\n }\n\n `);\n }\n else if (!isOptionalIn) {\n doc.write(`\n const ${id}_present = ${isPresent};\n if (${id}.issues.length) {${prefixStr(id, k)}\n }\n if (!${id}_present && !${id}.issues.length) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: undefined,\n path: [${k}]\n });\n if (ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }\n }\n\n if (${id}_present) {\n newResult[${k}] = ${id}.value;\n }\n\n `);\n }\n else {\n doc.write(`\n if (${id}.issues.length) {${prefixStr(id, k)}\n }\n `);\n if (optin === \"defaulted\") {\n doc.write(`newResult[${k}] = ${id}.value;`);\n }\n else {\n doc.write(`\n if (${id}.value !== undefined || ${isPresent}) {\n newResult[${k}] = ${id}.value;\n }\n `);\n }\n }\n }\n doc.write(`payload.value = newResult;`);\n doc.write(`return payload;`);\n // closing `shape` in is what pays: turbofan specializes the parser against that one shape object, so every `shape[k]._zod.run` folds to a known callee. as a parameter it stays a generic load and measures 13% slower even with the forwarding frame gone\n return doc.compile();\n };\n let fastpass;\n const isObject = util.isObject;\n const jit = !core.globalConfig.jitless;\n const allowsEval = util.allowsEval;\n const fastEnabled = jit && allowsEval.value; // && !def.catchall;\n const catchall = def.catchall;\n let value;\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {\n // always synchronous\n if (!fastpass)\n fastpass = generateFastpass(def.shape);\n payload = fastpass(payload, ctx);\n if (!catchall)\n return payload;\n return handleCatchall([], input, payload, ctx, value, inst, ctx?.abortEarly === true);\n }\n return superParse(payload, ctx);\n };\n});\nfunction handleUnionResults(results, final, inst, ctx) {\n for (const result of results) {\n if (result.issues.length === 0) {\n final.value = result.value;\n return final;\n }\n }\n const nonaborted = results.filter((r) => !util.aborted(r));\n if (nonaborted.length === 1) {\n final.value = nonaborted[0].value;\n return nonaborted[0];\n }\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n return final;\n}\nexport const $ZodUnion = /*@__PURE__*/ core.$constructor(\"$ZodUnion\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.options.some((o) => o._zod.optin === \"defaulted\")\n ? \"defaulted\"\n : zod.def.options.some((o) => o._zod.optin !== undefined)\n ? \"optional\"\n : undefined);\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.options.some((o) => o._zod.optout === \"optional\") ? \"optional\" : undefined);\n util.defineLazyInternal(inst, \"values\", (zod) => {\n if (zod.def.options.every((o) => o._zod.values)) {\n return new Set(zod.def.options.flatMap((option) => Array.from(option._zod.values)));\n }\n return undefined;\n });\n util.defineLazyInternal(inst, \"pattern\", (zod) => {\n if (zod.def.options.every((o) => o._zod.pattern)) {\n const patterns = zod.def.options.map((o) => o._zod.pattern);\n return new RegExp(`^(${patterns.map((p) => util.cleanRegex(p.source)).join(\"|\")})$`);\n }\n return undefined;\n });\n const first = def.options.length === 1 ? def.options[0]._zod.run : null;\n inst._zod.parse = (payload, ctx) => {\n if (first) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n if (result.issues.length === 0)\n return result;\n results.push(result);\n }\n }\n if (!async)\n return handleUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleUnionResults(results, payload, inst, ctx);\n });\n };\n});\nfunction handleExclusiveUnionResults(results, final, inst, ctx) {\n const matches = [];\n for (let i = 0; i < results.length; i++) {\n if (results[i].issues.length === 0)\n matches.push(i);\n }\n if (matches.length === 1) {\n final.value = results[matches[0]].value;\n return final;\n }\n if (matches.length === 0) {\n // No matches - same as regular union\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n }\n else {\n // Multiple matches - exclusive union failure\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: [],\n inclusive: false,\n matches,\n });\n }\n return final;\n}\nexport const $ZodXor = /*@__PURE__*/ core.$constructor(\"$ZodXor\", (inst, def) => {\n $ZodUnion.init(inst, def);\n def.inclusive = false;\n const first = def.options.length === 1 ? def.options[0]._zod.run : null;\n inst._zod.parse = (payload, ctx) => {\n if (first) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n results.push(result);\n }\n }\n if (!async)\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n });\n };\n});\n/** Returns the option whose discriminator claims `value`, or throws if ambiguous. */\nexport function getDiscriminatedOption(union, value) {\n const internals = union._zod;\n let map = internals.bag.optionsMap;\n if (!map) {\n map = discriminatorMap(internals.def);\n internals.bag.optionsMap = map;\n }\n const option = map.get(value);\n if (option === null)\n throw new Error(`Ambiguous discriminator value \"${String(value)}\"`);\n return option;\n}\nfunction discriminatorMap(def) {\n const map = new Map();\n for (const option of def.options) {\n const values = option._zod.propValues?.[def.discriminator];\n if (!values || values.size === 0)\n throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(option)}\"`);\n for (const value of values) {\n if (map.has(value)) {\n if (value !== undefined)\n throw new Error(`Duplicate discriminator value \"${String(value)}\"`);\n // keep the collision marked so a later member cannot reclaim it\n map.set(value, null);\n }\n else {\n map.set(value, option);\n }\n }\n }\n return map;\n}\nexport const $ZodDiscriminatedUnion = \n/*@__PURE__*/\ncore.$constructor(\"$ZodDiscriminatedUnion\", (inst, def) => {\n def.inclusive = false;\n $ZodUnion.init(inst, def);\n const _super = inst._zod.parse;\n util.defineLazyInternal(inst, \"propValues\", (zod) => {\n const propValues = {};\n let undefinedCount = 0;\n for (const option of zod.def.options) {\n const pv = option._zod.propValues;\n if (!pv || Object.keys(pv).length === 0)\n throw new Error(`Invalid discriminated union option at index \"${zod.def.options.indexOf(option)}\"`);\n if (pv[zod.def.discriminator]?.has(undefined))\n undefinedCount++;\n for (const [k, v] of Object.entries(pv)) {\n if (!Object.prototype.hasOwnProperty.call(propValues, k)) {\n util.assignProp(propValues, k, new Set());\n }\n for (const val of v) {\n propValues[k].add(val);\n }\n }\n }\n if (!zod.def.unionFallback && undefinedCount > 1)\n propValues[zod.def.discriminator]?.delete(undefined);\n return propValues;\n });\n // Checked now rather than in the lookup map below, so an option that lacks the discriminator fails at the `discriminatedUnion` call instead of on the first object parsed. Options whose shape cannot be enumerated without resolving it — pipes and lazies — are left to the map.\n def.options.forEach((option, i) => {\n const propShape = util.rawShape(option._zod.def);\n if (propShape && !Object.prototype.hasOwnProperty.call(propShape, def.discriminator)) {\n throw new Error(`Invalid discriminated union option at index \"${i}\"`);\n }\n });\n const disc = util.cached(() => discriminatorMap(def));\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isObject(input)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"object\",\n input,\n inst,\n });\n return payload;\n }\n const value = input?.[def.discriminator];\n const opt = disc.value.get(value);\n // forward metadata cannot choose an encoder for an absent tag\n if (opt && (value !== undefined || ctx.direction !== \"backward\")) {\n return opt._zod.run(payload, ctx);\n }\n // Fall back to union matching when the fast discriminator path fails:\n // - explicitly enabled via unionFallback, or\n // - during backward direction (encode), since codec-based discriminators have different values in forward vs backward directions\n if (def.unionFallback || ctx.direction === \"backward\") {\n return _super(payload, ctx);\n }\n // no matching discriminator\n payload.issues.push({\n code: \"invalid_union\",\n errors: [],\n note: \"No matching discriminator\",\n discriminator: def.discriminator,\n options: Array.from(disc.value.keys()).filter((value) => disc.value.get(value) !== null),\n input,\n path: [def.discriminator],\n inst,\n });\n return payload;\n };\n});\nexport const $ZodIntersection = /*@__PURE__*/ core.$constructor(\"$ZodIntersection\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n const left = def.left._zod.run({ value: input, issues: [] }, ctx);\n const right = def.right._zod.run({ value: input, issues: [] }, ctx);\n const async = left instanceof Promise || right instanceof Promise;\n if (async) {\n return Promise.all([left, right]).then(([left, right]) => {\n return handleIntersectionResults(payload, left, right);\n });\n }\n return handleIntersectionResults(payload, left, right);\n };\n});\nexport function mergeValues(a, b) {\n // const aType = parse.t(a);\n // const bType = parse.t(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n if (a instanceof Date && b instanceof Date && +a === +b) {\n return { valid: true, data: a };\n }\n if (util.isPlainObject(a) && util.isPlainObject(b)) {\n const bKeys = Object.keys(b);\n const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n if (Object.prototype.hasOwnProperty.call(newObj, \"__proto__\"))\n delete newObj.__proto__;\n for (const key of sharedKeys) {\n if (key === \"__proto__\")\n continue;\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [key, ...sharedValue.mergeErrorPath],\n };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) {\n return { valid: false, mergeErrorPath: [] };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [index, ...sharedValue.mergeErrorPath],\n };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n return { valid: false, mergeErrorPath: [] };\n}\nfunction handleIntersectionResults(result, left, right) {\n // Track which side(s) reject each key. A key rejection is reported only when BOTH sides reject it, so a key owned by one branch survives the other's key schema. strictObject reports these as unrecognized_keys; a record with an open key schema reports one invalid_key per key.\n const unrecKeys = new Map();\n let unrecIssue;\n const keyIssues = new Map();\n const collect = (iss, side) => {\n let keys;\n if (iss.code === \"unrecognized_keys\" && !iss.path?.length) {\n unrecIssue ?? (unrecIssue = iss);\n keys = iss.keys;\n }\n else if (iss.code === \"invalid_key\" && iss.origin === \"record\" && iss.path?.length === 1) {\n const k = String(iss.path[0]);\n if (!keyIssues.has(k))\n keyIssues.set(k, iss);\n keys = [k];\n }\n else {\n return false;\n }\n for (const k of keys) {\n if (!unrecKeys.has(k))\n unrecKeys.set(k, {});\n unrecKeys.get(k)[side] = true;\n }\n return true;\n };\n for (const iss of left.issues) {\n if (!collect(iss, \"l\"))\n result.issues.push(iss);\n }\n for (const iss of right.issues) {\n if (!collect(iss, \"r\"))\n result.issues.push(iss);\n }\n // Report only keys rejected by BOTH sides\n const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);\n if (bothKeys.length) {\n const aggregated = unrecIssue ? bothKeys.filter((k) => unrecIssue.keys.includes(k)) : [];\n if (aggregated.length)\n result.issues.push({ ...unrecIssue, keys: aggregated });\n for (const k of bothKeys) {\n if (!aggregated.includes(k) && keyIssues.has(k))\n result.issues.push(keyIssues.get(k));\n }\n }\n const merged = mergeValues(left.value, right.value);\n if (!merged.valid) {\n if (util.aborted(result))\n return result;\n throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);\n }\n result.value = merged.data;\n return result;\n}\nexport const $ZodTuple = /*@__PURE__*/ core.$constructor(\"$ZodTuple\", (inst, def) => {\n $ZodType.init(inst, def);\n const items = def.items;\n const memo = core.globalConfig.memoizer;\n memo?.attach(inst);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n input,\n inst,\n expected: \"tuple\",\n code: \"invalid_type\",\n });\n return payload;\n }\n payload.value = memo ? memo.alloc(inst, payload, [], ctx) : [];\n const proms = [];\n const optinStart = getTupleOptStart(items, \"optin\");\n const optoutStart = getTupleOptStart(items, \"optout\");\n if (!def.rest) {\n if (input.length < optinStart) {\n payload.issues.push({\n code: \"too_small\",\n minimum: optinStart,\n inclusive: true,\n input,\n inst,\n origin: \"array\",\n });\n return payload;\n }\n if (input.length > items.length) {\n payload.issues.push({\n code: \"too_big\",\n maximum: items.length,\n inclusive: true,\n input,\n inst,\n origin: \"array\",\n });\n }\n }\n // Run every item in parallel, collecting results into an indexed array. The post-processing in `handleTupleResults` walks them in order so it can decide whether an absent optional-output error can truncate the tail or must be reported to preserve required output.\n const itemResults = new Array(items.length);\n // only tracked when there is a rest loop to skip\n const abortEarly = def.rest ? ctx?.abortEarly : undefined;\n let itemAborted = false;\n for (let i = 0; i < items.length; i++) {\n const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((rr) => {\n itemResults[i] = rr;\n }));\n }\n else {\n itemResults[i] = r;\n if (abortEarly && !itemAborted && r.issues.length)\n itemAborted = util.aborted(r);\n }\n }\n // sound because rest is non-empty exactly when every fixed index is present, the one case handleTupleResults cannot discard an item's issues\n if (def.rest && !itemAborted) {\n let i = items.length - 1;\n const rest = input.slice(items.length);\n let seen = payload.issues.length;\n for (const el of rest) {\n if (abortEarly && payload.issues.length !== seen) {\n if (util.aborted(payload, seen))\n break;\n seen = payload.issues.length;\n }\n i++;\n const result = def.rest._zod.run({ value: el, issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((r) => handleTupleResult(r, payload, i)));\n }\n else {\n handleTupleResult(result, payload, i);\n }\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));\n }\n return handleTupleResults(itemResults, payload, items, input, optoutStart);\n };\n});\nfunction getTupleOptStart(items, key) {\n for (let i = items.length - 1; i >= 0; i--) {\n // optin is a three-rung ladder so any rung above `undefined` permits an absent slot; optout stays two-valued.\n const omittable = key === \"optin\" ? items[i]._zod.optin !== undefined : items[i]._zod.optout === \"optional\";\n if (!omittable)\n return i + 1;\n }\n return 0;\n}\nfunction handleTupleResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nfunction handleTupleResults(itemResults, final, items, input, optoutStart) {\n // Walk results in order. Mirror $ZodObject's swallow-on-absent-optional rule, but only after `optoutStart`: the first index where the output tuple tail can be absent.\n for (let i = 0; i < items.length; i++) {\n const r = itemResults[i];\n const isPresent = i < input.length;\n // The array analog of `handlePropertyResult`'s absent-key early return: the middle rung permits absence without supplying anything in its place, so the tail truncates here instead of materializing whatever the item made of `undefined`.\n if (!isPresent && i >= optoutStart && items[i]._zod.optin === \"optional\") {\n final.value.length = i;\n break;\n }\n if (r.issues.length) {\n if (!isPresent && i >= optoutStart) {\n final.value.length = i;\n break;\n }\n final.issues.push(...util.prefixIssues(i, r.issues));\n }\n final.value[i] = r.value;\n }\n // Drop trailing slots that produced `undefined` for absent input\n // (the array analog of an absent optional key on an object). The\n // `i >= input.length` floor is critical: an explicit `undefined`\n // *inside* the input must be preserved even when the schema is\n // optional-out (e.g. `z.string().or(z.undefined())` accepting an\n // explicit undefined value).\n for (let i = final.value.length - 1; i >= input.length; i--) {\n if (items[i]._zod.optout === \"optional\" && final.value[i] === undefined) {\n final.value.length = i;\n }\n else {\n break;\n }\n }\n return final;\n}\nexport const $ZodRecord = /*@__PURE__*/ core.$constructor(\"$ZodRecord\", (inst, def) => {\n $ZodType.init(inst, def);\n const memo = core.globalConfig.memoizer;\n memo?.attach(inst);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isPlainObject(input)) {\n payload.issues.push({\n expected: \"record\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n // no guard in either loop below: a record's invalid_key aborts but an enclosing intersection can reconcile it, so a stopped loop hides keys the sibling does not own and the intersection then rejects nothing\n const proms = [];\n const values = def.keyType._zod.values;\n if (values && !def.partial) {\n payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};\n const recordKeys = new Set();\n for (const key of values) {\n if (typeof key === \"string\" || typeof key === \"number\" || typeof key === \"symbol\") {\n recordKeys.add(typeof key === \"number\" ? key.toString() : key);\n // A declared __proto__ is stripped but is not an unrecognized key.\n if (key === \"__proto__\")\n continue;\n const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n if (keyResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n if (keyResult.issues.length) {\n payload.issues.push({\n code: \"invalid_key\",\n origin: \"record\",\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n input: key,\n path: [key],\n inst,\n });\n continue;\n }\n const outKey = keyResult.value;\n if (outKey === \"__proto__\")\n continue;\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[outKey] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[outKey] = result.value;\n }\n }\n }\n let unrecognized;\n for (const key in input) {\n if (!recordKeys.has(key)) {\n if (def.mode === \"loose\") {\n // skip __proto__ so it can't replace the result prototype via the assignment setter on the plain {} we build into\n if (key === \"__proto__\")\n continue;\n payload.value[key] = input[key];\n }\n else {\n unrecognized = unrecognized ?? [];\n unrecognized.push(key);\n }\n }\n }\n if (unrecognized && unrecognized.length > 0) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n input,\n inst,\n keys: unrecognized,\n continue: true,\n });\n }\n }\n else {\n payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};\n // An enumerable key schema declares which keys the record owns, so a key outside the set is unrecognized. A non-enumerable one (regex, refine) is a constraint every key must satisfy, so a failing key is invalid. Only the former is reconcilable against the other side of an intersection.\n let unrecognized;\n // Reflect.ownKeys for Symbol-key support; filter non-enumerable to match z.object()\n for (const key of Reflect.ownKeys(input)) {\n if (key === \"__proto__\")\n continue;\n if (!Object.prototype.propertyIsEnumerable.call(input, key))\n continue;\n let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n if (keyResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n // Numeric string fallback: if key is a numeric string and failed, retry with Number(key). This handles z.number(), z.literal([1, 2, 3]), and unions containing numeric literals\n const checkNumericKey = typeof key === \"string\" && regexes.number.test(key) && keyResult.issues.length;\n if (checkNumericKey) {\n const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);\n if (retryResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n if (retryResult.issues.length === 0) {\n keyResult = retryResult;\n }\n }\n if (keyResult.issues.length) {\n if (def.mode === \"loose\") {\n // Pass through unchanged\n payload.value[key] = input[key];\n }\n else if (values) {\n unrecognized = unrecognized ?? [];\n unrecognized.push(key);\n }\n else {\n // Default \"strict\" behavior: error on invalid key\n payload.issues.push({\n code: \"invalid_key\",\n origin: \"record\",\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n input: key,\n path: [key],\n inst,\n });\n }\n continue;\n }\n // the guard above tests the raw input key, but the key schema can normalize an ordinary key into __proto__; re-check the key we actually write under\n const outKey = keyResult.value;\n if (outKey === \"__proto__\")\n continue;\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[outKey] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[outKey] = result.value;\n }\n }\n if (unrecognized && unrecognized.length > 0) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n input,\n inst,\n keys: unrecognized,\n continue: true,\n });\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload;\n };\n});\nexport const $ZodMap = /*@__PURE__*/ core.$constructor(\"$ZodMap\", (inst, def) => {\n $ZodType.init(inst, def);\n const memo = core.globalConfig.memoizer;\n memo?.attach(inst);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Map)) {\n payload.issues.push({\n expected: \"map\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n payload.value = memo ? memo.alloc(inst, payload, new Map(), ctx) : new Map();\n const abortEarly = ctx?.abortEarly;\n let seen = payload.issues.length;\n for (const [key, value] of input) {\n if (abortEarly && payload.issues.length !== seen) {\n if (util.aborted(payload, seen))\n break;\n seen = payload.issues.length;\n }\n const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx);\n if (keyResult instanceof Promise || valueResult instanceof Promise) {\n proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }));\n }\n else {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n capSize(inst, mapSize);\n});\nfunction handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {\n if (keyResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, keyResult.issues));\n }\n else {\n final.issues.push({\n code: \"invalid_key\",\n origin: \"map\",\n input,\n inst,\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n if (valueResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, valueResult.issues));\n }\n else {\n final.issues.push({\n origin: \"map\",\n code: \"invalid_element\",\n input,\n inst,\n key: key,\n issues: valueResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n final.value.set(keyResult.value, valueResult.value);\n}\nexport const $ZodSet = /*@__PURE__*/ core.$constructor(\"$ZodSet\", (inst, def) => {\n $ZodType.init(inst, def);\n const memo = core.globalConfig.memoizer;\n memo?.attach(inst);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Set)) {\n payload.issues.push({\n input,\n inst,\n expected: \"set\",\n code: \"invalid_type\",\n });\n return payload;\n }\n const proms = [];\n payload.value = memo ? memo.alloc(inst, payload, new Set(), ctx) : new Set();\n const abortEarly = ctx?.abortEarly;\n let seen = payload.issues.length;\n for (const item of input) {\n if (abortEarly && payload.issues.length !== seen) {\n if (util.aborted(payload, seen))\n break;\n seen = payload.issues.length;\n }\n const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleSetResult(result, payload)));\n }\n else\n handleSetResult(result, payload);\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n capSize(inst, setSize);\n});\nfunction handleSetResult(result, final) {\n if (result.issues.length) {\n final.issues.push(...result.issues);\n }\n final.value.add(result.value);\n}\nexport const $ZodEnum = /*@__PURE__*/ core.$constructor(\"$ZodEnum\", (inst, def) => {\n $ZodType.init(inst, def);\n const values = util.getEnumValues(def.entries);\n const valuesSet = new Set(values);\n inst._zod.values = valuesSet;\n util.defineLazyInternal(inst, \"pattern\", (zod) => {\n const patternValues = util.getEnumValues(zod.def.entries).filter((k) => util.propertyKeyTypes.has(typeof k));\n // unmatchable fallback, RE2-safe: an empty alternation would compile to /^()$/, which matches \"\"\n return new RegExp(patternValues.length ? `^(${patternValues.map((o) => util.escapeRegex(o.toString())).join(\"|\")})$` : \"^[^\\\\s\\\\S]$\");\n });\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (valuesSet.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodLiteral = /*@__PURE__*/ core.$constructor(\"$ZodLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n const values = new Set(def.values);\n inst._zod.values = values;\n util.defineLazyInternal(inst, \"pattern\", (zod) => {\n const vals = zod.def.values;\n // unmatchable fallback, RE2-safe: an empty alternation would compile to /^()$/, which matches \"\"\n return new RegExp(vals.length\n ? `^(${vals\n .map((o) => typeof o === \"string\" ? util.escapeRegex(o) : o ? util.escapeRegex(o.toString()) : String(o))\n .join(\"|\")})$`\n : \"^[^\\\\s\\\\S]$\");\n });\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (values.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values: def.values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodFile = /*@__PURE__*/ core.$constructor(\"$ZodFile\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n // @ts-ignore\n if (input instanceof File)\n return payload;\n payload.issues.push({\n expected: \"file\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodTransform = /*@__PURE__*/ core.$constructor(\"$ZodTransform\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n core.globalConfig.memoizer?.guard(inst);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(inst.constructor.name);\n }\n const _out = def.transform(payload.value, payload);\n if (ctx.async) {\n const output = _out instanceof Promise ? _out : Promise.resolve(_out);\n return output.then((output) => {\n payload.value = output;\n return payload;\n });\n }\n if (_out instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n payload.value = _out;\n return payload;\n };\n});\nfunction handleOptionalResult(payload, result) {\n // A substituting schema that still failed has no usable answer; yield undefined. Its issues are simply dropped: it ran on a payload of its own, so there is no shared array to truncate and nothing of the caller's to lose with it.\n payload.value = result.issues.length ? undefined : result.value;\n return payload;\n}\nexport const $ZodOptional = /*@__PURE__*/ core.$constructor(\"$ZodOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n // .optional() propagates absence rather than substituting for it, so a defaulted inner keeps its rung.\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.innerType._zod.optin === \"defaulted\" ? \"defaulted\" : \"optional\");\n inst._zod.optout = \"optional\";\n util.defineLazyInternal(inst, \"values\", (zod) => {\n const values = zod.def.innerType._zod.values;\n return values ? new Set([...values, undefined]) : undefined;\n });\n util.defineLazyInternal(inst, \"pattern\", (zod) => {\n const pattern = zod.def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)})?$`) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n if (payload.value === undefined) {\n // Only the top rung substitutes a value for absence; everything else leaves it intact, which is what .optional() means.\n if (def.innerType._zod.optin !== \"defaulted\")\n return payload;\n // Its own payload, for the same reason $ZodCatch gets one: a pipe forwards an unrecognized key through the caller's issues array, and this must not read that as the substituting schema failing and drop it.\n const result = def.innerType._zod.run({ value: payload.value, issues: [] }, ctx);\n if (result instanceof Promise)\n return result.then((result) => handleOptionalResult(payload, result));\n return handleOptionalResult(payload, result);\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodExactOptional = /*@__PURE__*/ core.$constructor(\"$ZodExactOptional\", (inst, def) => {\n // Call parent init - inherits optin/optout = \"optional\"\n $ZodOptional.init(inst, def);\n // Override values/pattern to NOT add undefined\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.innerType._zod.values);\n util.defineLazyInternal(inst, \"pattern\", (zod) => zod.def.innerType._zod.pattern);\n // Override parse to just delegate (no undefined handling)\n inst._zod.parse = (payload, ctx) => {\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNullable = /*@__PURE__*/ core.$constructor(\"$ZodNullable\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.innerType._zod.optin);\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.innerType._zod.optout);\n util.defineLazyInternal(inst, \"pattern\", (zod) => {\n const pattern = zod.def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)}|null)$`) : undefined;\n });\n util.defineLazyInternal(inst, \"values\", (zod) => {\n return zod.def.innerType._zod.values ? new Set([...zod.def.innerType._zod.values, null]) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n // Forward direction (decode): allow null to pass through\n if (payload.value === null)\n return payload;\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodDefault = /*@__PURE__*/ core.$constructor(\"$ZodDefault\", (inst, def) => {\n $ZodType.init(inst, def);\n // inst._zod.qin = \"true\";\n inst._zod.optin = \"defaulted\";\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply defaults for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n /**\n * $ZodDefault returns the default value immediately in forward direction.\n * It doesn't pass the default value into the validator (\"prefault\"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a \"prefault\" for the pipe. */\n return payload;\n }\n // Forward direction: continue with default handling\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleDefaultResult(result, def));\n }\n return handleDefaultResult(result, def);\n };\n});\nfunction handleDefaultResult(payload, def) {\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return payload;\n}\nexport const $ZodPrefault = /*@__PURE__*/ core.$constructor(\"$ZodPrefault\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"defaulted\";\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply prefault for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNonOptional = /*@__PURE__*/ core.$constructor(\"$ZodNonOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"values\", (zod) => {\n const v = zod.def.innerType._zod.values;\n return v ? new Set([...v].filter((x) => x !== undefined)) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleNonOptionalResult(result, inst));\n }\n return handleNonOptionalResult(result, inst);\n };\n});\nfunction handleNonOptionalResult(payload, inst) {\n if (!payload.issues.length && payload.value === undefined) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: payload.value,\n inst,\n });\n }\n return payload;\n}\nexport const $ZodSuccess = /*@__PURE__*/ core.$constructor(\"$ZodSuccess\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(\"ZodSuccess\");\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => {\n payload.value = result.issues.length === 0;\n return payload;\n });\n }\n payload.value = result.issues.length === 0;\n return payload;\n };\n});\nfunction handleCatchResult(payload, result, def, ctx) {\n if (!result.issues.length) {\n payload.value = result.value;\n // The value carries up, so the flag describing it has to carry with it: a back-edge into a node still being parsed must not be frozen by an enclosing readonly, and its checks belong to the node itself. Guarded so the ordinary case adds no own property.\n if (result.memo)\n payload.memo = true;\n return payload;\n }\n // Spread the inner's own payload, not ours: `value` has to stay the input the catch was handed, and the inner ran on a payload of its own so its issues are already private to this call.\n payload.value = def.catchValue({\n ...result,\n value: payload.value,\n error: {\n issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n },\n input: payload.value,\n });\n return payload;\n}\nexport const $ZodCatch = /*@__PURE__*/ core.$constructor(\"$ZodCatch\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.innerType._zod.optin === \"defaulted\" ? \"defaulted\" : \"optional\");\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.innerType._zod.optout);\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply catch logic\n const result = def.innerType._zod.run({ value: payload.value, issues: [] }, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleCatchResult(payload, result, def, ctx));\n }\n return handleCatchResult(payload, result, def, ctx);\n };\n});\nexport const $ZodNaN = /*@__PURE__*/ core.$constructor(\"$ZodNaN\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"number\" || !Number.isNaN(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"nan\",\n code: \"invalid_type\",\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodPipe = /*@__PURE__*/ core.$constructor(\"$ZodPipe\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.in._zod.values);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.in._zod.optin);\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.out._zod.optout);\n util.defineLazyInternal(inst, \"propValues\", (zod) => zod.def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handlePipeResult(right, def.in, ctx));\n }\n return handlePipeResult(right, def.in, ctx);\n }\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handlePipeResult(left, def.out, ctx));\n }\n return handlePipeResult(left, def.out, ctx);\n };\n});\nfunction handlePipeResult(left, next, ctx) {\n // Any issue stops the pipe, so a failing refinement never feeds its transform. An unrecognized key is the exception: it describes the input's extra properties, not the value being piped, and an enclosing intersection may yet reconcile it.\n if (left.issues.some((iss) => iss.code !== \"unrecognized_keys\")) {\n // prevent further checks\n left.aborted = true;\n return left;\n }\n return next._zod.run({ value: left.value, issues: left.issues }, ctx);\n}\nexport const $ZodCodec = /*@__PURE__*/ core.$constructor(\"$ZodCodec\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.in._zod.values);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.in._zod.optin);\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.out._zod.optout);\n util.defineLazyInternal(inst, \"propValues\", (zod) => zod.def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handleCodecAResult(left, def, ctx));\n }\n return handleCodecAResult(left, def, ctx);\n }\n else {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handleCodecAResult(right, def, ctx));\n }\n return handleCodecAResult(right, def, ctx);\n }\n };\n});\nfunction handleCodecAResult(result, def, ctx) {\n if (result.issues.length) {\n // prevent further checks\n result.aborted = true;\n return result;\n }\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const transformed = def.transform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));\n }\n return handleCodecTxResult(result, transformed, def.out, ctx);\n }\n else {\n const transformed = def.reverseTransform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));\n }\n return handleCodecTxResult(result, transformed, def.in, ctx);\n }\n}\nfunction handleCodecTxResult(left, value, nextSchema, ctx) {\n // Check if transform added any issues\n if (left.issues.length) {\n left.aborted = true;\n return left;\n }\n return nextSchema._zod.run({ value, issues: left.issues }, ctx);\n}\nexport const $ZodPreprocess = /*@__PURE__*/ core.$constructor(\"$ZodPreprocess\", (inst, def) => {\n $ZodPipe.init(inst, def);\n});\nexport const $ZodReadonly = /*@__PURE__*/ core.$constructor(\"$ZodReadonly\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"propValues\", (zod) => zod.def.innerType._zod.propValues);\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.innerType._zod.values);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.innerType?._zod?.optin);\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.innerType?._zod?.optout);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then(handleReadonlyResult);\n }\n return handleReadonlyResult(result);\n };\n});\nfunction handleReadonlyResult(payload) {\n // A repeat visit hands back a node that is still being built; freezing it here would make the rest of its keys fail to assign.\n if (!payload.memo)\n payload.value = Object.freeze(payload.value);\n return payload;\n}\n// a leaf's pattern source with its own checks folded in: the last pattern-carrying check wins, else length bounds narrow the catch-all, else an integer format narrows the number form. the fold lives here instead of on `_zod.pattern` so a bundle without template literals never pays for it\nfunction leafPattern(schema) {\n const def = schema._zod.def;\n let pattern = def.pattern;\n let isInt = !!def.format?.includes(\"int\");\n let minimum;\n let maximum;\n for (const ch of def.checks ?? []) {\n const d = ch._zod.def;\n if (d.pattern)\n pattern = d.pattern;\n isInt || (isInt = !!d.format?.includes(\"int\"));\n const lo = d.minimum ?? d.length;\n const hi = d.maximum ?? d.length;\n if (lo !== undefined && (minimum === undefined || lo > minimum))\n minimum = lo;\n if (hi !== undefined && (maximum === undefined || hi < maximum))\n maximum = hi;\n }\n if (pattern)\n return pattern.source;\n // an empty range matches nothing at runtime, and `{8,5}` is not a legal quantifier\n if (minimum !== undefined && maximum !== undefined && minimum > maximum)\n return \"(?!)\";\n if (minimum !== undefined || maximum !== undefined)\n return regexes.string({ minimum, maximum }).source;\n const own = schema._zod.pattern;\n return (isInt && own === regexes.number ? regexes.integer : own)?.source;\n}\n// a part's pattern source. a wrapper's pattern embeds its inner pattern's source verbatim, so the folded form is substituted in place without knowing the wrapper's own composition; a union's options are joined the way the union builds its own pattern\nfunction partPattern(schema) {\n const def = schema._zod.def;\n const own = schema._zod.pattern?.source;\n // lazy resolves its inner on the internals, not the def\n const inner = def.innerType ?? schema._zod.innerType;\n if (inner) {\n const before = inner._zod.pattern?.source;\n const after = partPattern(inner);\n if (own && before && after && after !== before) {\n return own.replace(util.cleanRegex(before), () => util.cleanRegex(after));\n }\n return own;\n }\n if (def.options) {\n const sources = def.options.map(partPattern);\n if (sources.every(Boolean))\n return `^(${sources.map((s) => util.cleanRegex(s)).join(\"|\")})$`;\n }\n return leafPattern(schema);\n}\nexport const $ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"$ZodTemplateLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n const regexParts = [];\n for (const part of def.parts) {\n if (typeof part === \"object\" && part !== null) {\n // is Zod schema\n const source = partPattern(part);\n if (!source) {\n throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);\n }\n regexParts.push(util.cleanRegex(source));\n }\n else if (part === null || util.primitiveTypes.has(typeof part)) {\n regexParts.push(util.escapeRegex(`${part}`));\n }\n else {\n throw new Error(`Invalid template literal part: ${part}`);\n }\n }\n inst._zod.pattern = new RegExp(`^${regexParts.join(\"\")}$`);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"string\") {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"string\",\n code: \"invalid_type\",\n });\n return payload;\n }\n inst._zod.pattern.lastIndex = 0;\n if (!inst._zod.pattern.test(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n code: \"invalid_format\",\n format: def.format ?? \"template_literal\",\n pattern: inst._zod.pattern.source,\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodFunction = /*@__PURE__*/ core.$constructor(\"$ZodFunction\", (inst, def) => {\n $ZodType.init(inst, def);\n // Defined, not assigned: the classic prototype exposes `_def` as a getter with no setter.\n Object.defineProperty(inst, \"_def\", { value: def });\n inst._zod.def = def;\n inst.implement = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implement() must be called with a function\");\n }\n // Defined inline so the closure stays anonymous: binding it to a `const` first names it, which costs 256 bytes per implemented function.\n return Object.defineProperty(function (...args) {\n const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;\n const result = Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return parse(inst._def.output, result);\n }\n return result;\n }, \"_zod\", { value: inst._zod, enumerable: false });\n };\n inst.implementAsync = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implementAsync() must be called with a function\");\n }\n return Object.defineProperty(async function (...args) {\n const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;\n const result = await Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return await parseAsync(inst._def.output, result);\n }\n return result;\n }, \"_zod\", { value: inst._zod, enumerable: false });\n };\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"function\") {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"function\",\n input: payload.value,\n inst,\n });\n return payload;\n }\n // Check if output is a promise type to determine if we should use async implementation\n const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === \"promise\";\n if (hasPromiseOutput) {\n payload.value = inst.implementAsync(payload.value);\n }\n else {\n payload.value = inst.implement(payload.value);\n }\n return payload;\n };\n inst.input = (...args) => {\n const F = inst.constructor;\n if (Array.isArray(args[0])) {\n return new F({\n type: \"function\",\n input: new $ZodTuple({\n type: \"tuple\",\n items: args[0],\n rest: args[1],\n }),\n output: inst._def.output,\n });\n }\n return new F({\n type: \"function\",\n input: args[0],\n output: inst._def.output,\n });\n };\n inst.output = (output) => {\n const F = inst.constructor;\n return new F({\n type: \"function\",\n input: inst._def.input,\n output,\n });\n };\n return inst;\n});\nexport const $ZodPromise = /*@__PURE__*/ core.$constructor(\"$ZodPromise\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));\n };\n});\nexport const $ZodLazy = /*@__PURE__*/ core.$constructor(\"$ZodLazy\", (inst, def) => {\n $ZodType.init(inst, def);\n // Cache the resolved inner type on the shared `def` so all clones of this lazy (e.g. via `.describe()`/`.meta()`) share the same inner instance, preserving identity for cycle detection on recursive schemas.\n util.defineLazy(inst._zod, \"innerType\", () => {\n const d = def;\n if (!d._cachedInner)\n d._cachedInner = def.getter();\n return d._cachedInner;\n });\n util.defineLazyInternal(inst, \"pattern\", (zod) => zod.innerType?._zod?.pattern);\n util.defineLazyInternal(inst, \"propValues\", (zod) => zod.innerType?._zod?.propValues);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.innerType?._zod?.optin ?? undefined);\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.innerType?._zod?.optout ?? undefined);\n inst._zod.parse = (payload, ctx) => {\n const inner = inst._zod.innerType;\n return inner._zod.run(payload, ctx);\n };\n});\nexport const $ZodCustom = /*@__PURE__*/ core.$constructor(\"$ZodCustom\", (inst, def) => {\n checks.$ZodCheck.init(inst, def);\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _) => {\n return payload;\n };\n inst._zod.check = (payload) => {\n const input = payload.value;\n const r = def.fn(input);\n if (r instanceof Promise) {\n return r.then((r) => handleRefineResult(r, payload, input, inst));\n }\n handleRefineResult(r, payload, input, inst);\n return;\n };\n});\nfunction handleRefineResult(result, payload, input, inst) {\n if (!result) {\n const _iss = {\n code: \"custom\",\n input,\n inst, // incorporates params.error into issue reporting\n path: [...(inst._zod.def.path ?? [])], // incorporates params.error into issue reporting\n continue: !inst._zod.def.abort,\n // params: inst._zod.def.params,\n };\n if (inst._zod.def.params)\n _iss.params = inst._zod.def.params;\n payload.issues.push(util.issue(_iss));\n }\n}\n","import * as util from \"./util.js\";\nexport class $ZodCyclicError extends Error {\n constructor() {\n super(`Cannot parse a reference cycle that closes through a transform`);\n this.name = \"ZodCyclicError\";\n }\n}\n/** Keyed off the context object every schema in one parse call already shares. */\nconst STATE = \"~memo\";\nconst NO_ISSUES = [];\n// a value a cycle can close through\nfunction isRef(value) {\n return value !== null && typeof value === \"object\";\n}\n// Receivers prefix paths in place, so the cache and every hand-out need their own copies.\nfunction cloneIssues(issues) {\n return issues.map((iss) => (iss.path ? { ...iss, path: iss.path.slice() } : { ...iss }));\n}\nconst recursive = /*@__PURE__*/ new WeakMap();\n/** What the walk established, in order of certainty: ordered so the strongest answer among children wins. */\nconst NONE = 0;\nconst ASSUMED = 1;\nconst PROVEN = 2;\n/** Whether this schema's subtree contains a cycle, so one parse can re-enter it. */\nfunction isRecursive(inst, stack, resolve) {\n const cached = recursive.get(inst);\n if (cached !== undefined)\n return cached ? PROVEN : NONE;\n // Relative to the walk in progress, so not cached.\n if (stack.has(inst))\n return PROVEN;\n stack.add(inst);\n let result = NONE;\n const check = (child) => {\n if (result !== PROVEN && child?._zod) {\n const answer = isRecursive(child, stack, resolve);\n if (answer > result)\n result = answer;\n }\n };\n // `Reflect.ownKeys` rather than `Object.keys`, so a cycle through a declared symbol key is still seen\n const shape = (sh, spread) => {\n let answer = NONE;\n for (const key of Reflect.ownKeys(sh)) {\n const desc = Object.getOwnPropertyDescriptor(sh, key);\n // an object resolves its shape by spread, so a key it does not enumerate is never parsed; `z.properties` reads every own key and so keeps them all\n if (spread && !desc.enumerable)\n continue;\n // resolving runs user code, and a factory mints a fresh subtree per read, so an edge the walk can't follow counts as a cycle\n const child = desc.get ? ASSUMED : desc.value?._zod ? isRecursive(desc.value, stack, resolve) : NONE;\n if (child > answer)\n answer = child;\n }\n return answer;\n };\n const merge = (answer) => {\n if (answer > result)\n result = answer;\n };\n const def = inst._zod.def;\n const kind = def.type;\n switch (kind) {\n case \"object\": {\n const raw = util.rawShape(def);\n // a def with no raw shape answers `shape` from an accessor of its own, and running that can mint a whole fresh subtree\n merge(raw ? shape(raw, true) : ASSUMED);\n check(def.catchall);\n break;\n }\n case \"array\":\n check(def.element);\n break;\n case \"tuple\":\n for (const el of def.items)\n check(el);\n check(def.rest);\n break;\n case \"record\":\n case \"map\":\n check(def.keyType);\n check(def.valueType);\n break;\n case \"set\":\n check(def.valueType);\n break;\n case \"union\":\n for (const el of def.options)\n check(el);\n break;\n case \"intersection\":\n check(def.left);\n check(def.right);\n break;\n case \"optional\":\n case \"nullable\":\n case \"default\":\n case \"prefault\":\n case \"catch\":\n case \"readonly\":\n case \"nonoptional\":\n case \"promise\":\n case \"success\":\n check(def.innerType);\n break;\n case \"pipe\":\n check(def.in);\n check(def.out);\n break;\n case \"function\":\n check(def.input);\n check(def.output);\n break;\n // `$ZodLazy` caches its inner on the def, so a resolved edge is followed exactly\n case \"lazy\": {\n const inner = def._cachedInner ?? (resolve ? inst._zod.innerType : undefined);\n // walked with resolution off: one hop sees past the deferral, and a lazy that yields only another unresolved lazy is generative, so it stops there\n merge(inner ? isRecursive(inner, stack, false) : ASSUMED);\n break;\n }\n // a leaf by choice: `parts` are regex fragments, not data positions\n case \"template_literal\":\n // leaves\n case \"string\":\n case \"number\":\n case \"int\":\n case \"boolean\":\n case \"bigint\":\n case \"symbol\":\n case \"undefined\":\n case \"null\":\n case \"void\":\n case \"never\":\n case \"any\":\n case \"unknown\":\n case \"date\":\n case \"nan\":\n case \"enum\":\n case \"literal\":\n case \"file\":\n case \"transform\":\n case \"custom\":\n break;\n default: {\n // a new built-in kind becomes a compile error here\n kind;\n // a user-defined kind can still hold children, and only its author knows where, so fall back to scanning the def — skipping accessors, since reading one can run user code\n for (const key in def) {\n const desc = Object.getOwnPropertyDescriptor(def, key);\n if (!desc || desc.get)\n continue;\n const value = desc.value;\n if (!value || typeof value !== \"object\")\n continue;\n if (value._zod)\n check(value);\n else if (Array.isArray(value))\n for (const el of value)\n check(el);\n }\n }\n }\n stack.delete(inst);\n return settle(inst, result);\n}\n/** An assumed answer must not outlive the resolution that settles it, so only a certain one is cached. */\nfunction settle(inst, answer) {\n if (answer !== ASSUMED)\n recursive.set(inst, answer === PROVEN);\n return answer;\n}\n/**\n * Whether one parse can re-enter this schema, i.e. its subtree contains a cycle.\n * Exported for `z.compile`, which refuses to compile such a schema: cycle\n * breaking is driven from here off state keyed on the parse context, and a\n * generated fast path has no context to key on.\n */\nexport function isRecursiveSchema(inst) {\n // z.compile never parses, so nothing would ever resolve a lazy for it; it runs once and already treats a throw here as recursive\n return isRecursive(inst, new Set(), true) !== NONE;\n}\nfunction bucketFor(state, inst) {\n let bucket = state.buckets.get(inst);\n if (!bucket) {\n bucket = new WeakMap();\n state.buckets.set(inst, bucket);\n }\n return bucket;\n}\n// Set immediately before delegating to core and cleared immediately after, so `alloc` registers only for a visit this module is driving.\nlet handoff;\n// Allocated but unfinished entries. `alloc` and the matching pop both happen in the synchronous part of a parse, so they nest even when children are async, and one stack serves every schema.\nconst open = [];\nconst memo = {\n alloc(_inst, payload, empty) {\n const bucket = handoff;\n if (!bucket)\n return empty;\n handoff = undefined;\n const entry = { value: empty, issues: null };\n bucket.set(payload.value, entry);\n open.push(entry);\n return empty;\n },\n guard(inst) {\n var _a;\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n inst._zod.deferred.push(() => {\n const base = inst._zod.parse;\n const wrapped = (payload, ctx) => {\n // The value is a placeholder a back-edge is still waiting on, so the cycle closes through this transform. Its output can't exist in time to bind.\n if (ctx.direction !== \"backward\" && isBackEdge(ctx, payload.value))\n throw new $ZodCyclicError();\n return base(payload, ctx);\n };\n inst._zod.parse = wrapped;\n if (inst._zod.run === base)\n inst._zod.run = wrapped;\n });\n },\n attach(inst) {\n var _a;\n let isRecursiveInst;\n let rechecked = false;\n // a recursive schema is re-entered many times per parse and its bucket never changes\n let lastCtx;\n let lastBucket;\n // Wraps `parse` in a deferred so it sees the container's final parse. Core's own deferred copies `parse` into `run` when there are no checks, and it ran first, so `run` is patched to match; with checks, `run` reads `parse` dynamically.\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n inst._zod.deferred.push(() => {\n const base = inst._zod.parse;\n const wrapped = (payload, ctx) => {\n if (isRecursiveInst === undefined) {\n const walked = isRecursive(inst, new Set(), false);\n if (walked === NONE) {\n // Nothing here can ever fire, so take it back out.\n inst._zod.parse = base;\n if (inst._zod.run === wrapped)\n inst._zod.run = base;\n return base(payload, ctx);\n }\n // this parse resolves the deferred edges on its own path, so ask once more before latching\n if (walked === PROVEN || rechecked)\n isRecursiveInst = true;\n else\n rechecked = true;\n }\n const input = payload.value;\n if (!isRef(input))\n return base(payload, ctx);\n let state = ctx[STATE];\n if (!state) {\n state = { buckets: new WeakMap(), backEdges: undefined };\n ctx[STATE] = state;\n }\n let bucket;\n if (lastCtx === ctx) {\n bucket = lastBucket;\n }\n else {\n bucket = bucketFor(state, inst);\n lastCtx = ctx;\n lastBucket = bucket;\n }\n const hit = bucket.get(input);\n if (hit) {\n payload.value = hit.value;\n if (hit.issues) {\n if (hit.issues.length)\n payload.issues.push(...cloneIssues(hit.issues));\n }\n else {\n // Still being parsed: its own checks cover it, so skip them here.\n payload.memo = true;\n state.backEdges ?? (state.backEdges = new WeakSet());\n state.backEdges.add(hit.value);\n }\n return payload;\n }\n handoff = bucket;\n const depth = open.length;\n const result = base(payload, ctx);\n handoff = undefined;\n // A container that rejected its input outright allocated nothing.\n const entry = open.length > depth ? open.pop() : undefined;\n // Both paths written out so the sync one allocates no closure. It runs once per node, and capturing here cost more than everything else combined.\n if (result instanceof Promise) {\n return result.then((r) => {\n if (entry)\n entry.issues = r.issues.length ? cloneIssues(r.issues) : NO_ISSUES;\n return r;\n });\n }\n if (entry)\n entry.issues = result.issues.length ? cloneIssues(result.issues) : NO_ISSUES;\n return result;\n };\n inst._zod.parse = wrapped;\n if (inst._zod.run === base)\n inst._zod.run = wrapped;\n });\n },\n};\n/** The memoizer that gives containers cycle support. `zod` installs it by default; `zod/mini` opts in with `config({ memoizer: memoizer() })`. */\nexport function memoizer() {\n return memo;\n}\n/** Whether this value is a node a back-edge resolved to before it finished. */\nexport function isBackEdge(ctx, value) {\n const backEdges = ctx[STATE]?.backEdges;\n return backEdges !== undefined && isRef(value) && backEdges.has(value);\n}\n","import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"characters\", verb: \"to have\" },\n file: { unit: \"bytes\", verb: \"to have\" },\n array: { unit: \"items\", verb: \"to have\" },\n set: { unit: \"items\", verb: \"to have\" },\n map: { unit: \"entries\", verb: \"to have\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"email address\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datetime\",\n date: \"ISO date\",\n time: \"ISO time\",\n duration: \"ISO duration\",\n ipv4: \"IPv4 address\",\n ipv6: \"IPv6 address\",\n mac: \"MAC address\",\n cidrv4: \"IPv4 range\",\n cidrv6: \"IPv6 range\",\n base64: \"base64-encoded string\",\n base64url: \"base64url-encoded string\",\n json_string: \"JSON string\",\n e164: \"E.164 number\",\n currency_code: \"currency code\",\n credit_card: \"credit card number\",\n iban: \"IBAN\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n // type names: missing keys = do not translate (use raw value via ?? fallback)\n const TypeDictionary = {\n // Compatibility: \"nan\" -> \"NaN\" for display\n nan: \"NaN\",\n // All other type names omitted - they fall back to raw values via ?? operator\n };\n function getTypeName(type, input) {\n if (type === \"number\" && typeof input === \"number\" && !Number.isFinite(input)) {\n return String(input);\n }\n return TypeDictionary[type] ?? type;\n }\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = getTypeName(issue.expected);\n const receivedType = util.parsedType(issue.input);\n const received = getTypeName(receivedType, issue.input);\n return `Invalid input: expected ${expected}, received ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Invalid input: expected ${util.stringifyPrimitive(issue.values[0])}`;\n return `Invalid option: expected one of ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.exact ? \"exactly \" : issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Too big: expected ${issue.origin ?? \"value\"} to have ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elements\"}`;\n return `Too big: expected ${issue.origin ?? \"value\"} to be ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.exact ? \"exactly \" : issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Too small: expected ${issue.origin} to have ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Too small: expected ${issue.origin} to be ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Invalid string: must start with \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Invalid string: must end with \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Invalid string: must include \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Invalid string: must match pattern ${_issue.pattern}`;\n return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Invalid number: must be a multiple of ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Unrecognized key${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Invalid key in ${issue.origin}`;\n case \"invalid_union\":\n if (issue.options && Array.isArray(issue.options) && issue.options.length > 0) {\n const opts = issue.options.map((o) => `'${o}'`).join(\" | \");\n return `Invalid discriminator value. Expected ${opts}`;\n }\n if (issue.inclusive === false) {\n return \"Invalid input: more than one option matched\";\n }\n return \"Invalid input\";\n case \"invalid_element\":\n return `Invalid value in ${issue.origin}`;\n default:\n return `Invalid input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n","var _a;\nexport const $output = /*@__PURE__*/ Symbol(\"ZodOutput\");\nexport const $input = /*@__PURE__*/ Symbol(\"ZodInput\");\nexport class $ZodRegistry {\n constructor() {\n this._map = new WeakMap();\n this._idmap = new Map();\n }\n add(schema, ..._meta) {\n const meta = _meta[0];\n this._map.set(schema, meta);\n if (meta && typeof meta === \"object\" && \"id\" in meta) {\n this._idmap.set(meta.id, schema);\n }\n return this;\n }\n clear() {\n this._map = new WeakMap();\n this._idmap = new Map();\n return this;\n }\n remove(schema) {\n const meta = this._map.get(schema);\n if (meta && typeof meta === \"object\" && \"id\" in meta) {\n this._idmap.delete(meta.id);\n }\n this._map.delete(schema);\n return this;\n }\n get(schema) {\n // return this._map.get(schema) as any;\n // inherit metadata\n const p = schema._zod.parent;\n if (p) {\n const pm = { ...(this.get(p) ?? {}) };\n delete pm.id; // do not inherit id\n const f = { ...pm, ...this._map.get(schema) };\n return Object.keys(f).length ? f : undefined;\n }\n return this._map.get(schema);\n }\n has(schema) {\n return this._map.has(schema);\n }\n}\n// registries\nexport function registry() {\n return new $ZodRegistry();\n}\n(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());\nexport const globalRegistry = globalThis.__zod_globalRegistry;\n","import * as checks from \"./checks.js\";\nimport * as registries from \"./registries.js\";\nimport * as schemas from \"./schemas.js\";\nimport * as util from \"./util.js\";\nfunction snapshotChecks(def) {\n if (def.checks)\n def.checks = [...def.checks];\n return def;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _string(Class, params) {\n return new Class(snapshotChecks({ type: \"string\", ...util.normalizeParams(params) }));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedString(Class, params) {\n return new Class(snapshotChecks({ type: \"string\", coerce: true, ...util.normalizeParams(params) }));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _email(Class, params) {\n return new Class({\n type: \"string\",\n format: \"email\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _guid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"guid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v4\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v6\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv7(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v7\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _emoji(Class, params) {\n return new Class({\n type: \"string\",\n format: \"emoji\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nanoid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"nanoid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n/**\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link _cuid2} instead.\n * See https://github.com/paralleldrive/cuid.\n */\n// @__NO_SIDE_EFFECTS__\nexport function _cuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cuid2(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid2\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ulid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ulid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _xid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"xid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ksuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ksuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mac(Class, params) {\n return new Class({\n type: \"string\",\n format: \"mac\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _e164(Class, params) {\n return new Class({\n type: \"string\",\n format: \"e164\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _creditCard(Class, params) {\n return new Class({\n type: \"string\",\n format: \"credit_card\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _iban(Class, params) {\n return new Class({\n type: \"string\",\n format: \"iban\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _jwt(Class, params) {\n return new Class({\n type: \"string\",\n format: \"jwt\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport const TimePrecision = {\n Any: null,\n Minute: -1,\n Second: 0,\n Millisecond: 3,\n Microsecond: 6,\n};\n// @__NO_SIDE_EFFECTS__\nexport function _isoDateTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"datetime\",\n check: \"string_format\",\n offset: false,\n local: false,\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDate(Class, params) {\n return new Class({\n type: \"string\",\n format: \"date\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"time\",\n check: \"string_format\",\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDuration(Class, params) {\n return new Class({\n type: \"string\",\n format: \"duration\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _number(Class, params) {\n return new Class(snapshotChecks({ type: \"number\", checks: [], ...util.normalizeParams(params) }));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedNumber(Class, params) {\n return new Class(snapshotChecks({ type: \"number\", coerce: true, checks: [], ...util.normalizeParams(params) }));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"safeint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float64(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"int32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"uint32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _boolean(Class, params) {\n return new Class({\n type: \"boolean\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBoolean(Class, params) {\n return new Class({\n type: \"boolean\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _bigint(Class, params) {\n return new Class({\n type: \"bigint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBigint(Class, params) {\n return new Class({\n type: \"bigint\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"int64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"uint64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _symbol(Class, params) {\n return new Class({\n type: \"symbol\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _undefined(Class, params) {\n return new Class({\n type: \"undefined\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _null(Class, params) {\n return new Class({\n type: \"null\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _any(Class) {\n return new Class({\n type: \"any\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _unknown(Class) {\n return new Class({\n type: \"unknown\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _never(Class, params) {\n return new Class({\n type: \"never\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _void(Class, params) {\n return new Class({\n type: \"void\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _date(Class, params) {\n return new Class({\n type: \"date\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedDate(Class, params) {\n return new Class({\n type: \"date\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nan(Class, params) {\n return new Class({\n type: \"nan\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lt(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lte(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.lte()` instead. */\n_lte as _max, };\n// @__NO_SIDE_EFFECTS__\nexport function _gt(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _gte(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.gte()` instead. */\n_gte as _min, };\n// @__NO_SIDE_EFFECTS__\nexport function _positive(params) {\n return _gt(0, params);\n}\n// negative\n// @__NO_SIDE_EFFECTS__\nexport function _negative(params) {\n return _lt(0, params);\n}\n// nonpositive\n// @__NO_SIDE_EFFECTS__\nexport function _nonpositive(params) {\n return _lte(0, params);\n}\n// nonnegative\n// @__NO_SIDE_EFFECTS__\nexport function _nonnegative(params) {\n return _gte(0, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function _multipleOf(value, params) {\n return new checks.$ZodCheckMultipleOf({\n check: \"multiple_of\",\n ...util.normalizeParams(params),\n value,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxSize(maximum, params) {\n return new checks.$ZodCheckMaxSize({\n check: \"max_size\",\n ...util.normalizeParams(params),\n maximum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minSize(minimum, params) {\n return new checks.$ZodCheckMinSize({\n check: \"min_size\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _size(size, params) {\n return new checks.$ZodCheckSizeEquals({\n check: \"size_equals\",\n ...util.normalizeParams(params),\n size,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxLength(maximum, params) {\n const ch = new checks.$ZodCheckMaxLength({\n check: \"max_length\",\n ...util.normalizeParams(params),\n maximum,\n });\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minLength(minimum, params) {\n return new checks.$ZodCheckMinLength({\n check: \"min_length\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _length(length, params) {\n return new checks.$ZodCheckLengthEquals({\n check: \"length_equals\",\n ...util.normalizeParams(params),\n length,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _regex(pattern, params) {\n return new checks.$ZodCheckRegex({\n check: \"string_format\",\n format: \"regex\",\n ...util.normalizeParams(params),\n pattern,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lowercase(params) {\n return new checks.$ZodCheckLowerCase({\n check: \"string_format\",\n format: \"lowercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uppercase(params) {\n return new checks.$ZodCheckUpperCase({\n check: \"string_format\",\n format: \"uppercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _includes(includes, params) {\n return new checks.$ZodCheckIncludes({\n check: \"string_format\",\n format: \"includes\",\n ...util.normalizeParams(params),\n includes,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _startsWith(prefix, params) {\n return new checks.$ZodCheckStartsWith({\n check: \"string_format\",\n format: \"starts_with\",\n ...util.normalizeParams(params),\n prefix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _endsWith(suffix, params) {\n return new checks.$ZodCheckEndsWith({\n check: \"string_format\",\n format: \"ends_with\",\n ...util.normalizeParams(params),\n suffix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _property(property, schema, params) {\n return new checks.$ZodCheckProperty({\n check: \"property\",\n property,\n schema,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _properties(shape, params) {\n return new checks.$ZodCheckProperties({\n check: \"properties\",\n shape,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mime(types, params) {\n return new checks.$ZodCheckMimeType({\n check: \"mime_type\",\n mime: types,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _overwrite(tx) {\n return new checks.$ZodCheckOverwrite({\n check: \"overwrite\",\n tx,\n });\n}\n// normalize\n// @__NO_SIDE_EFFECTS__\nexport function _normalize(form) {\n return _overwrite((input) => input.normalize(form));\n}\n// trim\n// @__NO_SIDE_EFFECTS__\nexport function _trim() {\n return _overwrite((input) => input.trim());\n}\n// toLowerCase\n// @__NO_SIDE_EFFECTS__\nexport function _toLowerCase() {\n return _overwrite((input) => input.toLowerCase());\n}\n// toUpperCase\n// @__NO_SIDE_EFFECTS__\nexport function _toUpperCase() {\n return _overwrite((input) => input.toUpperCase());\n}\n// slugify\n// @__NO_SIDE_EFFECTS__\nexport function _slugify() {\n return _overwrite((input) => util.slugify(input));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _array(Class, element, params) {\n return new Class({\n type: \"array\",\n element,\n // get element() {\n // return element;\n // },\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _union(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n ...util.normalizeParams(params),\n });\n}\nexport function _xor(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _discriminatedUnion(Class, discriminator, options, params) {\n return new Class({\n type: \"union\",\n options: options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _intersection(Class, left, right) {\n return new Class({\n type: \"intersection\",\n left,\n right,\n });\n}\n// export function _tuple(\n// Class: util.SchemaClass<schemas.$ZodTuple>,\n// items: [],\n// params?: string | $ZodTupleParams\n// ): schemas.$ZodTuple<[], null>;\n// @__NO_SIDE_EFFECTS__\nexport function _tuple(Class, items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof schemas.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new Class({\n type: \"tuple\",\n items,\n rest,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _record(Class, keyType, valueType, params) {\n return new Class({\n type: \"record\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _map(Class, keyType, valueType, params) {\n return new Class({\n type: \"map\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _set(Class, valueType, params) {\n return new Class({\n type: \"set\",\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _enum(Class, values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n // if (Array.isArray(values)) {\n // for (const value of values) {\n // entries[value] = value;\n // }\n // } else {\n // Object.assign(entries, values);\n // }\n // const entries: util.EnumLike = {};\n // for (const val of values) {\n // entries[val] = val;\n // }\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function _nativeEnum(Class, entries, params) {\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _literal(Class, value, params) {\n return new Class({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _file(Class, params) {\n return new Class({\n type: \"file\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _transform(Class, fn) {\n return new Class({\n type: \"transform\",\n transform: fn,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _optional(Class, innerType) {\n return new Class({\n type: \"optional\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nullable(Class, innerType) {\n return new Class({\n type: \"nullable\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _default(Class, innerType, defaultValue) {\n return new Class({\n type: \"default\",\n innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nonoptional(Class, innerType, params) {\n return new Class({\n type: \"nonoptional\",\n innerType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _success(Class, innerType) {\n return new Class({\n type: \"success\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _catch(Class, innerType, catchValue) {\n return new Class({\n type: \"catch\",\n innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : util.constantCatch(catchValue)),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _pipe(Class, in_, out) {\n return new Class({\n type: \"pipe\",\n in: in_,\n out,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _readonly(Class, innerType) {\n return new Class({\n type: \"readonly\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _templateLiteral(Class, parts, params) {\n return new Class({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lazy(Class, getter) {\n return new Class({\n type: \"lazy\",\n getter,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _promise(Class, innerType) {\n return new Class({\n type: \"promise\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _custom(Class, fn, _params) {\n const norm = util.normalizeParams(_params);\n norm.abort ?? (norm.abort = true); // default to abort:false\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...norm,\n });\n return schema;\n}\n// same as _custom but defaults to abort:false\n// @__NO_SIDE_EFFECTS__\nexport function _refine(Class, fn, _params) {\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...util.normalizeParams(_params),\n });\n return schema;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _superRefine(fn, params) {\n const ch = _check((payload) => {\n payload.addIssue = (issue) => {\n if (typeof issue === \"string\") {\n payload.issues.push(util.issue(issue, payload.value, ch._zod.def));\n }\n else {\n // for Zod 3 backwards compatibility\n const _issue = issue;\n if (_issue.fatal)\n _issue.continue = false;\n _issue.code ?? (_issue.code = \"custom\");\n if (!(\"input\" in _issue))\n _issue.input = payload.value;\n _issue.inst ?? (_issue.inst = ch);\n _issue.continue ?? (_issue.continue = !ch._zod.def.abort); // abort is always undefined, so this is always true...\n payload.issues.push(util.issue(_issue));\n }\n };\n return fn(payload.value, payload);\n }, params);\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _check(fn, params) {\n const ch = new checks.$ZodCheck({\n check: \"custom\",\n ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function describe(description) {\n const ch = new checks.$ZodCheck({ check: \"describe\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, description });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function meta(metadata) {\n const ch = new checks.$ZodCheck({ check: \"meta\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, ...metadata });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringbool(Classes, _params) {\n const params = util.normalizeParams(_params);\n let truthyArray = params.truthy ?? [\"true\", \"1\", \"yes\", \"on\", \"y\", \"enabled\"];\n let falsyArray = params.falsy ?? [\"false\", \"0\", \"no\", \"off\", \"n\", \"disabled\"];\n if (params.case !== \"sensitive\") {\n truthyArray = truthyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n falsyArray = falsyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n }\n const truthySet = new Set(truthyArray);\n const falsySet = new Set(falsyArray);\n const _Codec = Classes.Codec ?? schemas.$ZodCodec;\n const _Boolean = Classes.Boolean ?? schemas.$ZodBoolean;\n const _String = Classes.String ?? schemas.$ZodString;\n const stringSchema = new _String({ type: \"string\", error: params.error });\n const booleanSchema = new _Boolean({ type: \"boolean\", error: params.error });\n const codec = new _Codec({\n type: \"pipe\",\n in: stringSchema,\n out: booleanSchema,\n transform: ((input, payload) => {\n let data = input;\n if (params.case !== \"sensitive\")\n data = data.toLowerCase();\n if (truthySet.has(data)) {\n return true;\n }\n else if (falsySet.has(data)) {\n return false;\n }\n else {\n payload.issues.push({\n code: \"invalid_value\",\n expected: \"stringbool\",\n values: [...truthySet, ...falsySet],\n input: payload.value,\n inst: codec,\n continue: false,\n });\n return {};\n }\n }),\n reverseTransform: ((input, _payload) => {\n if (input === true) {\n return truthyArray[0] || \"true\";\n }\n else {\n return falsyArray[0] || \"false\";\n }\n }),\n error: params.error,\n });\n codec._zod.bag.truthy = truthyArray;\n codec._zod.bag.falsy = falsyArray;\n codec._zod.bag.case = params.case ?? \"insensitive\";\n return codec;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringFormat(Class, format, fnOrRegex, _params = {}) {\n const params = util.normalizeParams(_params);\n const def = {\n check: \"string_format\",\n type: \"string\",\n format,\n fn: typeof fnOrRegex === \"function\" ? fnOrRegex : (val) => fnOrRegex.test(val),\n ...params,\n };\n if (fnOrRegex instanceof RegExp) {\n def.pattern = fnOrRegex;\n }\n const inst = new Class(def);\n return inst;\n}\n","import { globalRegistry } from \"./registries.js\";\nimport { assignProp } from \"./util.js\";\nfunction assignProps(target, ...sources) {\n for (const source of sources) {\n for (const key of Reflect.ownKeys(source)) {\n if (Object.prototype.propertyIsEnumerable.call(source, key)) {\n assignProp(target, key, source[key]);\n }\n }\n }\n return target;\n}\n// function initializeContext<T extends schemas.$ZodType>(inputs: JSONSchemaGeneratorParams<T>): ToJSONSchemaContext<T> {\n// return {\n// processor: inputs.processor,\n// metadataRegistry: inputs.metadata ?? globalRegistry,\n// target: inputs.target ?? \"draft-2020-12\",\n// unrepresentable: inputs.unrepresentable ?? \"throw\",\n// };\n// }\nexport function initializeContext(params) {\n // Normalize target: convert old non-hyphenated versions to hyphenated versions\n let target = params?.target ?? \"draft-2020-12\";\n if (target === \"draft-4\")\n target = \"draft-04\";\n if (target === \"draft-7\")\n target = \"draft-07\";\n return {\n processors: params.processors ?? {},\n metadataRegistry: params?.metadata ?? globalRegistry,\n target,\n unrepresentable: params?.unrepresentable ?? \"throw\",\n override: params?.override ?? (() => { }),\n io: params?.io ?? \"output\",\n counter: 0,\n seen: new Map(),\n sharedDefsExtractedFor: undefined,\n sharedEmitDoneFor: undefined,\n cycles: params?.cycles ?? \"ref\",\n reused: params?.reused ?? \"inline\",\n intersections: [],\n deferred: [],\n external: params?.external ?? undefined,\n };\n}\n/**\n * Applies the `unrepresentable` setting at a site that has no JSON Schema equivalent. Throws\n * `message` unless the setting (or the handler's return value) says otherwise. Returns `true` if a\n * custom JSON Schema was written into `json`, in which case the caller must not write its own.\n */\nexport function handleUnrepresentable(schema, ctx, json, params, message) {\n const result = typeof ctx.unrepresentable === \"function\"\n ? ctx.unrepresentable({ zodSchema: schema, path: params.path, message })\n : ctx.unrepresentable;\n if (result === \"any\")\n return false;\n if (result === undefined || result === \"throw\")\n throw new Error(message);\n Object.assign(json, result);\n return true;\n}\n// never rename this back to `process`: bundler polyfills inject a top-level `const process` that a lexical declaration of the same name collides with (#6397)\nexport function processSchema(schema, ctx, _params = { path: [], schemaPath: [] }) {\n var _a;\n const def = schema._zod.def;\n // check for schema in seens\n const seen = ctx.seen.get(schema);\n if (seen) {\n seen.count++;\n // check if cycle\n const isCycle = _params.schemaPath.includes(schema);\n if (isCycle) {\n seen.cycle = _params.path;\n }\n return seen.schema;\n }\n // initialize\n const result = { schema: {}, count: 1, cycle: undefined, path: _params.path };\n ctx.seen.set(schema, result);\n ctx.sharedDefsExtractedFor = undefined;\n ctx.sharedEmitDoneFor = undefined;\n // custom method overrides default behavior\n const overrideSchema = schema._zod.toJSONSchema?.();\n if (overrideSchema) {\n result.schema = overrideSchema;\n }\n else {\n const params = {\n ..._params,\n schemaPath: [..._params.schemaPath, schema],\n path: _params.path,\n };\n if (schema._zod.processJSONSchema) {\n schema._zod.processJSONSchema(ctx, result.schema, params);\n }\n else {\n const _json = result.schema;\n const processor = ctx.processors[def.type];\n if (!processor) {\n throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);\n }\n processor(schema, ctx, _json, params);\n }\n const parent = schema._zod.parent;\n if (parent) {\n // Also set ref if processor didn't (for inheritance)\n if (!result.ref)\n result.ref = parent;\n processSchema(parent, ctx, params);\n ctx.seen.get(parent).isParent = true;\n }\n }\n // metadata\n const meta = ctx.metadataRegistry.get(schema);\n if (meta)\n assignProps(result.schema, meta);\n if (ctx.io === \"input\" && isTransforming(schema)) {\n // examples/defaults only apply to output type of pipe\n delete result.schema.examples;\n delete result.schema.default;\n }\n // set prefault as default\n if (ctx.io === \"input\" && \"_prefault\" in result.schema)\n (_a = result.schema).default ?? (_a.default = result.schema._prefault);\n delete result.schema._prefault;\n // pulling fresh from ctx.seen in case it was overwritten\n const _result = ctx.seen.get(schema);\n return _result.schema;\n}\n/** @deprecated Renamed to `processSchema`. An export alias declares no binding, so it is safe to keep. */\nexport { processSchema as process };\n// Escape a reference token for use in a JSON Pointer fragment (RFC 6901): `~` becomes `~0` and `/` becomes `~1`. The `~` replacement must run first.\nfunction encodeJSONPointerSegment(segment) {\n return segment.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n}\nexport function extractDefs(ctx, schema\n// params: EmitParams\n) {\n // iterate over seen map;\n const root = ctx.seen.get(schema);\n if (!root)\n throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n // With `external` set, every registered schema resolves through the external branch of `makeURI`, so the root branch below produces the same ref the external branch would — this pass is identical whichever schema it is called with, and only needs to run once.\n if (ctx.external && ctx.sharedDefsExtractedFor === ctx.external)\n return;\n // Track ids to detect duplicates across different schemas\n const idToSchema = new Map();\n for (const entry of ctx.seen.entries()) {\n const id = ctx.metadataRegistry.get(entry[0])?.id;\n if (id) {\n const existing = idToSchema.get(id);\n if (existing && existing !== entry[0]) {\n throw new Error(`Duplicate schema id \"${id}\" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);\n }\n idToSchema.set(id, entry[0]);\n }\n }\n // returns a ref to the schema defId will be empty if the ref points to an external schema (or #)\n const makeURI = (entry) => {\n // comparing the seen objects because sometimes multiple schemas map to the same seen object. e.g. lazy\n // external is configured\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n if (ctx.external) {\n const externalId = ctx.external.registry.get(entry[0])?.id; // ?? \"__shared\";// `__schema${ctx.counter++}`;\n // check if schema is in the external registry\n const uriGenerator = ctx.external.uri ?? ((id) => id);\n if (externalId) {\n return { ref: uriGenerator(externalId) };\n }\n // otherwise, add to __shared\n const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;\n entry[1].defId = id; // set defId so it will be reused if needed\n return { defId: id, ref: `${uriGenerator(\"__shared\")}#/${defsSegment}/${encodeJSONPointerSegment(id)}` };\n }\n const uriPrefix = `#`;\n const defUriPrefix = `${uriPrefix}/${defsSegment}/`;\n // an id-less root has nowhere to be extracted to, so it stays inline and self-references as `#`\n if (entry[1] === root && !entry[1].schema.id) {\n return { ref: uriPrefix };\n }\n // self-contained schema\n const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;\n return { defId, ref: defUriPrefix + encodeJSONPointerSegment(defId) };\n };\n // stored cached version in `def` property remove all properties, set $ref\n const extractToDef = (entry) => {\n // if the schema is already a reference, do not extract it\n if (entry[1].schema.$ref) {\n return;\n }\n const seen = entry[1];\n const { ref, defId } = makeURI(entry);\n seen.def = { ...seen.schema };\n // defId won't be set if the schema is a reference to an external schema or if the schema is the root schema\n if (defId)\n seen.defId = defId;\n // wipe away all properties except $ref\n const schema = seen.schema;\n for (const key in schema) {\n delete schema[key];\n }\n schema.$ref = ref;\n };\n // throw on cycles\n // break cycles\n if (ctx.cycles === \"throw\") {\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n if (seen.cycle) {\n throw new Error(\"Cycle detected: \" +\n `#/${seen.cycle?.join(\"/\")}/<root>` +\n '\\n\\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.');\n }\n }\n }\n // extract schemas into $defs\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n // convert root schema to # $ref\n if (schema === entry[0]) {\n extractToDef(entry); // this has special handling for the root schema\n continue;\n }\n // extract schemas that are in the external registry\n if (ctx.external) {\n const ext = ctx.external.registry.get(entry[0])?.id;\n if (schema !== entry[0] && ext) {\n extractToDef(entry);\n continue;\n }\n }\n // extract schemas with `id` meta\n const id = ctx.metadataRegistry.get(entry[0])?.id;\n if (id) {\n extractToDef(entry);\n continue;\n }\n // break cycles\n if (seen.cycle) {\n // any\n extractToDef(entry);\n continue;\n }\n // extract reused schemas\n if (seen.count > 1) {\n if (ctx.reused === \"ref\") {\n extractToDef(entry);\n }\n }\n }\n if (ctx.external)\n ctx.sharedDefsExtractedFor = ctx.external;\n}\n/** Rewrites `anyOf: [{type: \"a\"}, {type: \"b\"}]` to `type: [\"a\", \"b\"]`, which every JSON Schema draft treats as equivalent and most consumers render far better for the nullable case. Only branches that are a bare type assertion qualify — anything carrying a constraint, `$ref`, `const` or metadata is left alone. Runs after `flattenRef`, so a branch an override decorated or `$defs` extraction turned into a `$ref` is no longer bare and correctly stays in `anyOf`. `oneOf` is excluded: `integer` and `number` overlap, so \"exactly one\" and \"at least one\" are not the same there. OpenAPI 3.0 is excluded: its `type` must be a single string. */\nfunction compactTypeUnion(schema) {\n const options = schema.anyOf;\n if (!Array.isArray(options) || options.length === 0 || schema.type !== undefined)\n return;\n const types = [];\n for (const option of options) {\n if (!option || typeof option !== \"object\")\n return;\n // A branch that is itself a compactible union folds into this one — nested `anyOf` and a flat `type` array say the same thing. Compacting it first also makes the result independent of the order this pass walks the seen map in.\n compactTypeUnion(option);\n const keys = Object.keys(option);\n if (keys.length !== 1 || keys[0] !== \"type\")\n return;\n const type = option.type;\n for (const member of Array.isArray(type) ? type : [type]) {\n if (typeof member !== \"string\")\n return;\n if (!types.includes(member))\n types.push(member);\n }\n }\n delete schema.anyOf;\n // A `type` array must be non-empty and unique (metaschema); a single member is spelled as a bare string.\n schema.type = types.length === 1 ? types[0] : types;\n}\n/** Keywords `foldIntersection` knows how to combine. Anything else — `$ref`, `patternProperties`,\n * an annotation like `description` — makes a member unfoldable, so a constraint this does not\n * understand leaves the `allOf` alone instead of being silently dropped or misattributed. */\nconst FOLDABLE_KEYS = new Set([\"type\", \"properties\", \"required\", \"additionalProperties\"]);\nconst UNION_KEYS = [\"oneOf\", \"anyOf\"];\n/** A member's constraint on a key it does not declare itself. A `catchall` states one; `false`, an absent `additionalProperties`, and the empty schema a loose object emits state nothing. */\nfunction undeclaredConstraint(member) {\n const extra = member.additionalProperties;\n if (extra === undefined || extra === false || typeof extra !== \"object\" || extra === null)\n return null;\n return Object.keys(extra).length ? extra : null;\n}\n/** Combines object members into the single object they describe together, or returns `null` if any of them carries a keyword outside {@link FOLDABLE_KEYS}. */\nfunction foldObjects(members) {\n const objects = [];\n for (const member of members) {\n // A boolean subschema is legal JSON Schema and carries no keywords to fold.\n if (typeof member !== \"object\" || member.type !== \"object\")\n return null;\n for (const key in member) {\n if (!FOLDABLE_KEYS.has(key))\n return null;\n }\n objects.push(member);\n }\n const properties = {};\n const required = new Set();\n for (const object of objects) {\n for (const key in object.properties) {\n // `in` would report a `__proto__` key as already present via the prototype chain and skip it.\n if (Object.prototype.hasOwnProperty.call(properties, key))\n continue;\n // Every member constrains this key: the ones that declare it say how, and a `catchall` member constrains it too even though it does not name it. The key has to satisfy all of them, which is the same intersection one level down.\n const parts = [];\n for (const other of objects) {\n const part = other.properties?.[key] ?? undeclaredConstraint(other);\n if (part === null || part === undefined)\n continue;\n if (!parts.some((seen) => JSON.stringify(seen) === JSON.stringify(part)))\n parts.push(part);\n }\n const merged = parts.length === 1\n ? parts[0]\n : (foldObjects(parts) ?? { allOf: parts });\n assignProp(properties, key, merged);\n }\n for (const key of object.required ?? [])\n required.add(key);\n }\n const folded = { type: \"object\", properties };\n if (required.size)\n folded.required = [...required];\n // A key no member declares is rejected only when every member rejects it, so the fold is closed only when every member is. Otherwise it carries whatever the `catchall` members demand of such a key.\n if (objects.every((object) => object.additionalProperties === false)) {\n folded.additionalProperties = false;\n }\n else {\n const constraints = [];\n for (const object of objects) {\n const constraint = undeclaredConstraint(object);\n if (constraint && !constraints.some((seen) => JSON.stringify(seen) === JSON.stringify(constraint)))\n constraints.push(constraint);\n }\n if (constraints.length === 1)\n folded.additionalProperties = constraints[0];\n else if (constraints.length > 1)\n folded.additionalProperties = { allOf: constraints };\n }\n return folded;\n}\n/** `additionalProperties` in an `allOf` member sees only that member's own `properties`, so two\n * closed object members reject each other's keys and the schema validates nothing. Zod's parser\n * pools the key sets instead — `handleIntersectionResults` reports a key as unrecognized only when\n * *every* side rejects it — so the emitted schema has to pool them too, and folding the members\n * into one object is the encoding that says so on every target.\n *\n * This runs from `finalize`, after `extractDefs`, which is what keeps it clear of the `$ref`\n * machinery: a member extracted into `$defs` is already a `$ref` by now and declines to fold, so it\n * keeps its reference and its own closedness rather than being inlined as a stale copy. */\nfunction foldIntersection(json) {\n const allOf = json.allOf;\n if (!Array.isArray(allOf) || allOf.length < 2)\n return;\n // An `override` runs before this pass and may have written object keywords onto the intersection itself. Those are deliberate, so decline rather than overwrite them.\n for (const key of FOLDABLE_KEYS)\n if (key in json)\n return;\n // An intersection distributes over a union: `A & (X | Y)` is `(A & X) | (A & Y)`. Only the first union is distributed over; a second one stays among the members every branch folds against, where it fails the object check and declines the whole intersection rather than multiplying out.\n const unions = allOf.filter((m) => UNION_KEYS.some((k) => Array.isArray(m[k])));\n let folded = null;\n if (!unions.length) {\n folded = foldObjects(allOf);\n }\n else {\n const union = unions[0];\n const keyword = UNION_KEYS.find((k) => Array.isArray(union[k]));\n if (Object.keys(union).length !== 1)\n return;\n const rest = allOf.filter((m) => m !== union);\n const branches = union[keyword].map((branch) => foldObjects([...rest, branch]));\n if (branches.some((b) => !b))\n return;\n folded = { [keyword]: branches };\n }\n if (!folded)\n return;\n delete json.allOf;\n assignProps(json, folded);\n}\nexport function finalize(ctx, schema) {\n const root = ctx.seen.get(schema);\n if (!root)\n throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n // flatten refs - inherit properties from parent schemas\n const flattenRef = (zodSchema) => {\n const seen = ctx.seen.get(zodSchema);\n // already processed\n if (seen.ref === null)\n return;\n const schema = seen.def ?? seen.schema;\n const _cached = { ...schema };\n const ref = seen.ref;\n seen.ref = null; // prevent infinite recursion\n if (ref) {\n flattenRef(ref);\n const refSeen = ctx.seen.get(ref);\n const refSchema = refSeen.schema;\n // merge referenced schema into current\n if (refSchema.$ref && (ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\")) {\n // older drafts can't combine $ref with other properties\n schema.allOf = schema.allOf ?? [];\n schema.allOf.push(refSchema);\n }\n else {\n assignProps(schema, refSchema);\n }\n // restore child's own properties (child wins)\n assignProps(schema, _cached);\n const isParentRef = zodSchema._zod.parent === ref;\n // For parent chain, child is a refinement - remove parent-only properties\n if (isParentRef) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (!(key in _cached)) {\n delete schema[key];\n }\n }\n }\n // When ref was extracted to $defs, remove properties that match the definition\n if (refSchema.$ref && refSeen.def) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (key in refSeen.def && JSON.stringify(schema[key]) === JSON.stringify(refSeen.def[key])) {\n delete schema[key];\n }\n }\n }\n }\n // If parent was extracted (has $ref), propagate $ref to this schema. This handles cases like: readonly().meta({id}).describe() where processor sets ref to innerType but parent should be referenced\n const parent = zodSchema._zod.parent;\n if (parent && parent !== ref) {\n // Ensure parent is processed first so its def has inherited properties\n flattenRef(parent);\n const parentSeen = ctx.seen.get(parent);\n if (parentSeen?.schema.$ref) {\n schema.$ref = parentSeen.schema.$ref;\n // De-duplicate with parent's definition\n if (parentSeen.def) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (key in parentSeen.def && JSON.stringify(schema[key]) === JSON.stringify(parentSeen.def[key])) {\n delete schema[key];\n }\n }\n }\n }\n }\n // execute overrides\n ctx.override({\n zodSchema: zodSchema,\n jsonSchema: schema,\n path: seen.path ?? [],\n });\n };\n // Flattening walks the whole map and clears each `ref` as it goes, so a second call over the same map is a no-op scan. Skip it outright once it has run for a registry conversion.\n if (!ctx.external || ctx.sharedEmitDoneFor !== ctx.external) {\n for (const entry of [...ctx.seen.entries()].reverse()) {\n flattenRef(entry[0]);\n }\n if (ctx.target !== \"openapi-3.0\") {\n for (const entry of ctx.seen.entries()) {\n compactTypeUnion(entry[1].def ?? entry[1].schema);\n }\n }\n for (const rewrite of ctx.deferred)\n rewrite();\n // After flattening, every member that was extracted is a `$ref`, so the fold sees the final shape. A schema that inherits an intersection — through `z.lazy`, or any `ref` chain — holds the same `allOf` array, so fold by array identity to catch every copy.\n if (ctx.intersections.length) {\n const carriers = new Map();\n for (const seen of ctx.seen.values()) {\n for (const json of [seen.schema, seen.def]) {\n const allOf = json?.allOf;\n if (!Array.isArray(allOf))\n continue;\n const existing = carriers.get(allOf);\n if (existing)\n existing.push(json);\n else\n carriers.set(allOf, [json]);\n }\n }\n for (const allOf of ctx.intersections) {\n for (const json of carriers.get(allOf) ?? [])\n foldIntersection(json);\n }\n }\n }\n const result = {};\n if (ctx.target === \"draft-2020-12\") {\n result.$schema = \"https://json-schema.org/draft/2020-12/schema\";\n }\n else if (ctx.target === \"draft-07\") {\n result.$schema = \"http://json-schema.org/draft-07/schema#\";\n }\n else if (ctx.target === \"draft-04\") {\n result.$schema = \"http://json-schema.org/draft-04/schema#\";\n }\n else if (ctx.target === \"openapi-3.0\") {\n // OpenAPI 3.0 schema objects should not include a $schema property\n }\n else {\n // Arbitrary string values are allowed but won't have a $schema property set\n }\n if (ctx.external?.uri) {\n const id = ctx.external.registry.get(schema)?.id;\n if (!id)\n throw new Error(\"Schema is missing an `id` property\");\n result.$id = ctx.external.uri(id);\n }\n // when the root was extracted into $defs, `root.schema` is the `$ref` wrapper and `root.def` is the body that now lives under $defs\n assignProps(result, root.defId ? root.schema : (root.def ?? root.schema));\n // The `id` in `.meta()` is a Zod-specific registration tag used to extract schemas into $defs — it is not user-facing JSON Schema metadata. Strip it from the output body where it would otherwise leak. The id is preserved implicitly via the $defs key (and via $ref paths).\n const rootMetaId = ctx.metadataRegistry.get(schema)?.id;\n if (rootMetaId !== undefined && result.id === rootMetaId)\n delete result.id;\n // build defs object. With `external`, `defs` is the shared object every schema writes into, so the same entries are reassigned on every call. Without it, `defs` is fresh per call and must be rebuilt.\n const defs = ctx.external?.defs ?? {};\n if (!ctx.external || ctx.sharedEmitDoneFor !== ctx.external) {\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n if (seen.def && seen.defId) {\n if (seen.def.id === seen.defId)\n delete seen.def.id;\n assignProp(defs, seen.defId, seen.def);\n }\n }\n }\n if (ctx.external)\n ctx.sharedEmitDoneFor = ctx.external;\n // set definitions in result\n if (ctx.external) {\n }\n else {\n if (Object.keys(defs).length > 0) {\n if (ctx.target === \"draft-2020-12\") {\n result.$defs = defs;\n }\n else {\n result.definitions = defs;\n }\n }\n }\n try {\n // this \"finalizes\" this schema and ensures all cycles are removed each call to finalize() is functionally independent though the seen map is shared\n const finalized = JSON.parse(JSON.stringify(result));\n Object.defineProperty(finalized, \"~standard\", {\n value: {\n ...schema[\"~standard\"],\n jsonSchema: {\n input: createStandardJSONSchemaMethod(schema, \"input\", ctx.processors),\n output: createStandardJSONSchemaMethod(schema, \"output\", ctx.processors),\n },\n },\n enumerable: false,\n writable: false,\n });\n return finalized;\n }\n catch (_err) {\n throw new Error(\"Error converting schema to JSON.\");\n }\n}\nfunction isTransforming(_schema, _ctx) {\n const ctx = _ctx ?? { seen: new Set() };\n if (ctx.seen.has(_schema))\n return false;\n ctx.seen.add(_schema);\n const def = _schema._zod.def;\n if (def.type === \"transform\")\n return true;\n if (def.type === \"array\")\n return isTransforming(def.element, ctx);\n if (def.type === \"set\")\n return isTransforming(def.valueType, ctx);\n if (def.type === \"lazy\")\n return isTransforming(def.getter(), ctx);\n if (def.type === \"promise\" ||\n def.type === \"optional\" ||\n def.type === \"nonoptional\" ||\n def.type === \"nullable\" ||\n def.type === \"readonly\" ||\n def.type === \"default\" ||\n def.type === \"prefault\" ||\n def.type === \"catch\") {\n return isTransforming(def.innerType, ctx);\n }\n if (def.type === \"intersection\") {\n return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);\n }\n if (def.type === \"record\" || def.type === \"map\") {\n return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);\n }\n if (def.type === \"pipe\") {\n if (_schema._zod.traits.has(\"$ZodCodec\"))\n return true;\n return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);\n }\n if (def.type === \"object\") {\n for (const key in def.shape) {\n if (isTransforming(def.shape[key], ctx))\n return true;\n }\n return false;\n }\n if (def.type === \"union\") {\n for (const option of def.options) {\n if (isTransforming(option, ctx))\n return true;\n }\n return false;\n }\n if (def.type === \"tuple\") {\n for (const item of def.items) {\n if (isTransforming(item, ctx))\n return true;\n }\n if (def.rest && isTransforming(def.rest, ctx))\n return true;\n return false;\n }\n return false;\n}\n/**\n * Creates a toJSONSchema method for a schema instance.\n * This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.\n */\nexport const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {\n const ctx = initializeContext({ ...params, processors });\n processSchema(schema, ctx);\n extractDefs(ctx, schema);\n return finalize(ctx, schema);\n};\nexport const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {\n const { libraryOptions, target } = params ?? {};\n const ctx = initializeContext({ ...(libraryOptions ?? {}), target, io, processors });\n processSchema(schema, ctx);\n extractDefs(ctx, schema);\n return finalize(ctx, schema);\n};\n","import * as regexes from \"./regexes.js\";\nimport { base64Charset, base64urlCharset } from \"./schemas.js\";\nimport { extractDefs, finalize, handleUnrepresentable, initializeContext, processSchema, } from \"./to-json-schema.js\";\nimport { BIGINT_FORMAT_RANGES, NUMBER_FORMAT_RANGES, assignProp, getEnumValues } from \"./util.js\";\nconst narrowMin = (agg, key, value) => {\n if (agg[key] === undefined || value > agg[key])\n agg[key] = value;\n};\nconst narrowMax = (agg, key, value) => {\n if (agg[key] === undefined || value < agg[key])\n agg[key] = value;\n};\nconst narrowBoth = (agg, value) => {\n narrowMin(agg, \"minimum\", value);\n narrowMax(agg, \"maximum\", value);\n};\nconst addDivisor = (agg, value) => {\n agg.multipleOf ?? (agg.multipleOf = []);\n if (!agg.multipleOf.includes(value))\n agg.multipleOf.push(value);\n};\nconst addPattern = (agg, pattern) => {\n agg.patterns ?? (agg.patterns = new Set());\n agg.patterns.add(pattern);\n};\nconst intersectMime = (agg, mime) => {\n agg.mime = agg.mime ? agg.mime.filter((m) => mime.includes(m)) : [...mime];\n};\n// last-wins, matching the bag's historical write order; the flag keeps an integer format from being lost to a later float one\nconst setFormat = (agg, format) => {\n agg.format = format;\n if (format.includes(\"int\"))\n agg.isInt = true;\n};\nconst minContributor = (agg, def) => narrowMin(agg, \"minimum\", def.minimum);\nconst maxContributor = (agg, def) => narrowMax(agg, \"maximum\", def.maximum);\nconst formatContributor = (ranges) => (agg, def) => {\n setFormat(agg, def.format);\n const [minimum, maximum] = ranges[def.format];\n narrowMin(agg, \"minimum\", minimum);\n narrowMax(agg, \"maximum\", maximum);\n};\nconst contributors = {\n greater_than: (agg, def) => narrowMin(agg, def.inclusive ? \"minimum\" : \"exclusiveMinimum\", def.value),\n less_than: (agg, def) => narrowMax(agg, def.inclusive ? \"maximum\" : \"exclusiveMaximum\", def.value),\n multiple_of: (agg, def) => addDivisor(agg, def.value),\n number_format: formatContributor(NUMBER_FORMAT_RANGES),\n bigint_format: formatContributor(BIGINT_FORMAT_RANGES),\n min_length: minContributor,\n max_length: maxContributor,\n length_equals: (agg, def) => narrowBoth(agg, def.length),\n min_size: minContributor,\n max_size: maxContributor,\n size_equals: (agg, def) => narrowBoth(agg, def.size),\n string_format: (agg, def) => {\n setFormat(agg, def.format);\n if (def.pattern)\n addPattern(agg, def.pattern);\n if (def.format === \"base64\" || def.format === \"base64url\")\n agg.contentEncoding = def.format;\n if (def.local || def.precision === -1)\n agg.laxFormat = true;\n },\n mime_type: (agg, def) => intersectMime(agg, def.mime),\n};\nexport function aggregateChecks(schema) {\n const agg = {};\n const def = schema._zod.def;\n // a format schema is its own first check, same rule as $ZodType init\n const list = schema._zod.traits.has(\"$ZodCheck\")\n ? [schema, ...(def.checks ?? [])]\n : (def.checks ?? []);\n for (const ch of list)\n contributors[ch._zod.def.check]?.(agg, ch._zod.def);\n // reconcile with the bag so third-party onattach contributions still land; first-party residue is never tighter than the fold, so merging it back is idempotent for one and additive for the other\n const bag = schema._zod.bag;\n if (bag.minimum !== undefined)\n narrowMin(agg, \"minimum\", bag.minimum);\n if (bag.exclusiveMinimum !== undefined)\n narrowMin(agg, \"exclusiveMinimum\", bag.exclusiveMinimum);\n if (bag.maximum !== undefined)\n narrowMax(agg, \"maximum\", bag.maximum);\n if (bag.exclusiveMaximum !== undefined)\n narrowMax(agg, \"exclusiveMaximum\", bag.exclusiveMaximum);\n if (bag.multipleOf !== undefined)\n addDivisor(agg, bag.multipleOf);\n if (bag.format !== undefined) {\n agg.format ?? (agg.format = bag.format);\n if (bag.format.includes(\"int\"))\n agg.isInt = true;\n }\n if (bag.mime)\n intersectMime(agg, bag.mime);\n for (const pattern of bag.patterns ?? [])\n addPattern(agg, pattern);\n return agg;\n}\nconst formatMap = {\n guid: \"uuid\",\n url: \"uri\",\n datetime: \"date-time\",\n json_string: \"json-string\",\n regex: \"\", // do not set\n};\n// ==================== SIMPLE TYPE PROCESSORS ====================\n// the runtime patterns are lax so parse paths never overflow the regex stack; the emitted schema swaps in the exact block forms, which zod itself never executes\nconst exactPatterns = new Map([\n [base64Charset, regexes.base64],\n [base64urlCharset, regexes.base64url],\n]);\nconst exactPattern = (p) => exactPatterns.get(p) ?? p;\nexport const stringProcessor = (schema, ctx, _json, _params) => {\n const json = _json;\n json.type = \"string\";\n const { minimum, maximum, format, patterns, contentEncoding, laxFormat } = aggregateChecks(schema);\n if (typeof minimum === \"number\")\n json.minLength = minimum;\n if (typeof maximum === \"number\")\n json.maxLength = maximum;\n // custom pattern overrides format\n if (format) {\n json.format = formatMap[format] ?? format;\n if (json.format === \"\")\n delete json.format; // empty format is not valid\n // `z.iso.time()` is never full-time, and `laxFormat` carries the datetime shapes that also accept what their keyword forbids\n if (format === \"time\" || laxFormat) {\n delete json.format;\n }\n }\n if (contentEncoding)\n json.contentEncoding = contentEncoding;\n if (patterns && patterns.size > 0) {\n const patternList = [...patterns].map(exactPattern);\n if (patternList.length === 1)\n json.pattern = patternList[0].source;\n else if (patternList.length > 1) {\n json.allOf = [\n ...patternList.map((regex) => ({\n ...(ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\"\n ? { type: \"string\" }\n : {}),\n pattern: regex.source,\n })),\n ];\n }\n }\n};\nexport const numberProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const { minimum, maximum, multipleOf, exclusiveMaximum, exclusiveMinimum, isInt } = aggregateChecks(schema);\n json.type = isInt ? \"integer\" : \"number\";\n // when both minimum and exclusiveMinimum exist, pick the more restrictive one\n const exMin = typeof exclusiveMinimum === \"number\" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);\n const exMax = typeof exclusiveMaximum === \"number\" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);\n const legacy = ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\";\n if (exMin) {\n if (legacy) {\n json.minimum = exclusiveMinimum;\n json.exclusiveMinimum = true;\n }\n else {\n json.exclusiveMinimum = exclusiveMinimum;\n }\n }\n else if (typeof minimum === \"number\") {\n json.minimum = minimum;\n }\n if (exMax) {\n if (legacy) {\n json.maximum = exclusiveMaximum;\n json.exclusiveMaximum = true;\n }\n else {\n json.exclusiveMaximum = exclusiveMaximum;\n }\n }\n else if (typeof maximum === \"number\") {\n json.maximum = maximum;\n }\n if (multipleOf) {\n // JSON Schema requires a divisor strictly greater than zero, and a non-finite one does not survive JSON at all. A negative divisor accepts exactly what its absolute value accepts, so it still maps; zero, NaN and Infinity have no keyword form.\n const divisors = new Set();\n for (const divisor of multipleOf) {\n if (Number.isFinite(divisor) && divisor !== 0)\n divisors.add(Math.abs(divisor));\n else\n handleUnrepresentable(schema, ctx, json, params, `A multipleOf divisor of ${divisor} cannot be represented in JSON Schema`);\n }\n // chained divisors are a conjunction the keyword cannot carry alone, so extras ride an allOf, same as stacked patterns\n const [first, ...rest] = divisors;\n if (first !== undefined)\n json.multipleOf = first;\n if (rest.length)\n json.allOf = [...(json.allOf ?? []), ...rest.map((m) => ({ multipleOf: m }))];\n }\n};\nexport const booleanProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const bigintProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"BigInt cannot be represented in JSON Schema\");\n};\nexport const symbolProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Symbols cannot be represented in JSON Schema\");\n};\nexport const nullProcessor = (_schema, ctx, json, _params) => {\n if (ctx.target === \"openapi-3.0\") {\n json.type = \"string\";\n json.nullable = true;\n json.enum = [null];\n }\n else {\n json.type = \"null\";\n }\n};\nexport const undefinedProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Undefined cannot be represented in JSON Schema\");\n};\nexport const voidProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Void cannot be represented in JSON Schema\");\n};\nexport const neverProcessor = (_schema, _ctx, json, _params) => {\n json.not = {};\n};\nexport const anyProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const unknownProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const dateProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Date cannot be represented in JSON Schema\");\n};\nexport const enumProcessor = (schema, _ctx, json, _params) => {\n const def = schema._zod.def;\n const values = getEnumValues(def.entries);\n // an empty enum accepts nothing, same as z.never()\n if (values.length === 0) {\n json.not = {};\n return;\n }\n // Number enums can have both string and number values\n if (values.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (values.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n json.enum = values;\n};\nexport const literalProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n // a literal with no values accepts nothing, same as z.never()\n if (def.values.length === 0) {\n json.not = {};\n return;\n }\n const vals = [];\n for (const val of def.values) {\n if (val === undefined) {\n // a custom schema replaces the whole literal, so there is nothing left to accumulate\n if (handleUnrepresentable(schema, ctx, json, params, \"Literal `undefined` cannot be represented in JSON Schema\"))\n return;\n // otherwise do not add to vals\n }\n else if (typeof val === \"bigint\") {\n if (handleUnrepresentable(schema, ctx, json, params, \"BigInt literals cannot be represented in JSON Schema\"))\n return;\n vals.push(Number(val));\n }\n else {\n vals.push(val);\n }\n }\n if (vals.length === 0) {\n // do nothing (an undefined literal was stripped)\n }\n else if (vals.length === 1) {\n const val = vals[0];\n json.type = val === null ? \"null\" : typeof val;\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.enum = [val];\n }\n else {\n json.const = val;\n }\n }\n else {\n if (vals.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (vals.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n if (vals.every((v) => typeof v === \"boolean\"))\n json.type = \"boolean\";\n if (vals.every((v) => v === null))\n json.type = \"null\";\n json.enum = vals;\n }\n};\nexport const nanProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"NaN cannot be represented in JSON Schema\");\n};\nexport const templateLiteralProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const pattern = schema._zod.pattern;\n if (!pattern)\n throw new Error(\"Pattern not found in template literal\");\n _json.type = \"string\";\n _json.pattern = pattern.source;\n};\nexport const fileProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n _json.type = \"string\";\n _json.format = \"binary\";\n _json.contentEncoding = \"binary\";\n const { minimum, maximum, mime } = aggregateChecks(schema);\n if (minimum !== undefined)\n _json.minLength = minimum;\n if (maximum !== undefined)\n _json.maxLength = maximum;\n if (!mime)\n return;\n // an empty intersection means the mime checks share no value, so nothing passes at runtime; `anyOf` must be non-empty, so the false schema is `not: {}`\n if (mime.length === 0)\n _json.not = {};\n else if (mime.length === 1)\n _json.contentMediaType = mime[0];\n // only contentMediaType differs, so the shared props stay at the root\n else\n _json.anyOf = mime.map((m) => ({ contentMediaType: m }));\n};\nexport const successProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const customProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Custom types cannot be represented in JSON Schema\");\n};\nexport const functionProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Function types cannot be represented in JSON Schema\");\n};\nexport const transformProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Transforms cannot be represented in JSON Schema\");\n};\nexport const mapProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Map cannot be represented in JSON Schema\");\n};\nexport const setProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Set cannot be represented in JSON Schema\");\n};\n// ==================== COMPOSITE TYPE PROCESSORS ====================\nexport const arrayProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n const { minimum, maximum } = aggregateChecks(schema);\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n json.type = \"array\";\n json.items = processSchema(def.element, ctx, {\n ...params,\n path: [...params.path, \"items\"],\n });\n};\n// Transform and catch set `optin = \"optional\"` at runtime so the parser lets them observe an\n// absent key, but their declared input type stays required. An input JSON Schema describes the\n// declared type, so resolve past them to the schema that actually carries the optionality.\n// Used by both `objectProcessor` (for `required`) and `tupleProcessor` (for `minItems`); see\n// wiki/optionality.md, \"The JSON Schema emitter reads the *static* value\".\nfunction inputOptin(schema) {\n const def = schema._zod.def;\n if (def.type === \"pipe\" && def.in._zod.traits.has(\"$ZodTransform\")) {\n return inputOptin(def.out);\n }\n if (def.type === \"catch\") {\n return inputOptin(def.innerType);\n }\n return schema._zod.optin;\n}\nexport const objectProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n const shape = def.shape;\n // dropping it while still emitting `additionalProperties: false` would emit a schema that rejects data this one requires\n const symbolKeys = Object.getOwnPropertySymbols(shape);\n if (symbolKeys.length &&\n handleUnrepresentable(schema, ctx, json, params, \"Symbol keys cannot be represented in JSON Schema\")) {\n return;\n }\n json.type = \"object\";\n json.properties = {};\n for (const key in shape) {\n // assignProp so a __proto__ key becomes an own property instead of hitting the inherited setter on the plain {} we build into\n assignProp(json.properties, key, processSchema(shape[key], ctx, {\n ...params,\n path: [...params.path, \"properties\", key],\n }));\n }\n // required keys\n const requiredKeys = [];\n for (const key of Object.keys(shape)) {\n const field = def.shape[key];\n if (ctx.io === \"input\" ? inputOptin(field) === undefined : field._zod.optout === undefined) {\n requiredKeys.push(key);\n }\n }\n if (requiredKeys.length > 0) {\n json.required = requiredKeys;\n }\n // catchall\n if (def.catchall?._zod.def.type === \"never\") {\n // strict\n json.additionalProperties = false;\n }\n else if (!def.catchall) {\n // regular\n if (ctx.io === \"output\")\n json.additionalProperties = false;\n }\n else if (def.catchall) {\n json.additionalProperties = processSchema(def.catchall, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n};\nexport const unionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n // Exclusive unions (inclusive === false) use oneOf (exactly one match) instead of anyOf (one or more matches). This includes both z.xor() and discriminated unions\n const isExclusive = def.inclusive === false;\n const options = def.options.map((x, i) => processSchema(x, ctx, {\n ...params,\n path: [...params.path, isExclusive ? \"oneOf\" : \"anyOf\", i],\n }));\n if (isExclusive) {\n json.oneOf = options;\n }\n else {\n json.anyOf = options;\n }\n};\nexport const intersectionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const a = processSchema(def.left, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 0],\n });\n const b = processSchema(def.right, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 1],\n });\n const isSimpleIntersection = (val) => \"allOf\" in val && Object.keys(val).length === 1;\n const allOf = [\n ...(isSimpleIntersection(a) ? a.allOf : [a]),\n ...(isSimpleIntersection(b) ? b.allOf : [b]),\n ];\n json.allOf = allOf;\n // Recorded innermost first, so a nested intersection has already folded by the time this one is considered. The array is the handle rather than the schema, because a wrapper that inherits this schema shares the same array; `finalize` folds every object holding it. See `foldIntersection`.\n ctx.intersections.push(allOf);\n};\nexport const tupleProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"array\";\n const prefixPath = ctx.target === \"draft-2020-12\" ? \"prefixItems\" : \"items\";\n const restPath = ctx.target === \"draft-2020-12\" ? \"items\" : ctx.target === \"openapi-3.0\" ? \"items\" : \"additionalItems\";\n const prefixItems = def.items.map((x, i) => processSchema(x, ctx, {\n ...params,\n path: [...params.path, prefixPath, i],\n }));\n const rest = def.rest\n ? processSchema(def.rest, ctx, {\n ...params,\n path: [...params.path, restPath, ...(ctx.target === \"openapi-3.0\" ? [def.items.length] : [])],\n })\n : null;\n let minItems = def.items.length;\n while (minItems > 0) {\n const item = def.items[minItems - 1];\n const optional = ctx.io === \"input\" ? inputOptin(item) !== undefined : item._zod.optout === \"optional\";\n if (!optional)\n break;\n minItems--;\n }\n const maxItems = def.items.length;\n const isClosed = !def.rest;\n if (ctx.target === \"draft-2020-12\") {\n json.prefixItems = prefixItems;\n if (isClosed) {\n json.items = false;\n }\n else if (rest) {\n json.items = rest;\n }\n if (minItems > 0)\n json.minItems = minItems;\n if (isClosed)\n json.maxItems = maxItems;\n }\n else if (ctx.target === \"openapi-3.0\") {\n json.items = {\n anyOf: prefixItems,\n };\n if (rest) {\n json.items.anyOf.push(rest);\n }\n if (minItems > 0)\n json.minItems = minItems;\n if (isClosed)\n json.maxItems = maxItems;\n }\n else {\n json.items = prefixItems;\n if (isClosed) {\n json.additionalItems = false;\n }\n else if (rest) {\n json.additionalItems = rest;\n }\n if (minItems > 0)\n json.minItems = minItems;\n if (isClosed)\n json.maxItems = maxItems;\n }\n // explicit user-defined length checks take precedence\n const { minimum, maximum } = aggregateChecks(schema);\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n};\n/** JSON object keys are always strings, so a numeric record key schema is re-expressed over the\n * numeric-string form the record parser matches. Deferred to `finalize`, after the flatten: a key\n * behind a wrapper only carries its own `type` before then, and a union key only has its branches.\n *\n * A numeric bound cannot apply to a property name, so `minimum` and its siblings are dropped rather\n * than carried over: keeping them beside `type: \"string\"` reproduces the match-nothing schema this\n * exists to fix. A key that carries one therefore emits wider than the record parses — `z.record(z.number().min(5), V)`\n * accepts `\"3\"` — which is the deliberate trade, since throwing on it would reject an ordinary schema\n * outright. */\nfunction stringifyKeyNames(bySchema, json, visited) {\n // an extracted key that rewrites cannot go on sharing its definition — the string form a key position needs is not the number form every other reference wants — so it inlines. One that does not rewrite keeps the `$ref`.\n if (json.$ref) {\n // a recursive key holds its own reference inside its definition, so a node already on the path is left alone rather than resolved again\n if (visited.has(json))\n return json;\n visited.add(json);\n const def = bySchema.get(json)?.def;\n if (!def)\n return json;\n const inlined = stringifyKeyNames(bySchema, def, visited);\n return inlined === def ? json : inlined;\n }\n for (const keyword of [\"anyOf\", \"oneOf\"]) {\n const branches = json[keyword];\n if (!Array.isArray(branches))\n continue;\n const mapped = branches.map((branch) => stringifyKeyNames(bySchema, branch, visited));\n // rebuilding regardless would detach a key that had nothing to re-express, dropping its `$ref` and leaking the internal `id`\n if (mapped.some((branch, i) => branch !== branches[i]))\n json = { ...json, [keyword]: mapped };\n }\n // a member that already admits a string leaves the key unconstrained, so the node's own type re-expresses only when every member is numeric\n const types = Array.isArray(json.type) ? json.type : [json.type];\n const numericType = !types.includes(\"string\") && types.some((t) => t === \"number\" || t === \"integer\");\n // a heterogeneous key carries no type at all, so its numeric members are caught here instead\n const values = json.enum ?? (json.const !== undefined ? [json.const] : undefined);\n if (!numericType && !values?.some((v) => typeof v === \"number\"))\n return json;\n const { minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, format, id, ...rest } = json;\n if (rest.enum)\n rest.enum = rest.enum.map((v) => (typeof v === \"number\" ? String(v) : v));\n else if (typeof rest.const === \"number\")\n rest.const = String(rest.const);\n // a heterogeneous key keeps its absent type: the stringified members already say what a key may be\n if (!numericType)\n return rest;\n rest.type = \"string\";\n if (!values)\n rest.pattern = (types.includes(\"number\") ? regexes.number : regexes.integer).source;\n return rest;\n}\n/** Every record of one conversion, so the carriers are found in a single pass rather than once per record. */\nconst pendingRecords = new WeakMap();\nfunction rewriteKeyNames(ctx) {\n // an extracted key is resolved by the object `extractToDef` left in its place, so the map is built once rather than searched per reference. `_zod.toJSONSchema` can hand the same object to two schemas, so the first entry carrying a body wins, as a search would have found it.\n const bySchema = new Map();\n for (const entry of ctx.seen.values()) {\n if (entry.def && !bySchema.has(entry.schema))\n bySchema.set(entry.schema, entry);\n }\n const rewrites = new Map();\n for (const record of pendingRecords.get(ctx) ?? []) {\n const seen = ctx.seen.get(record);\n const names = (seen?.def ?? seen?.schema)?.propertyNames;\n if (!names || names === true || rewrites.has(names))\n continue;\n const rewritten = stringifyKeyNames(bySchema, names, new Set());\n if (rewritten !== names)\n rewrites.set(names, rewritten);\n }\n if (!rewrites.size)\n return;\n // the flatten has already copied each record's own properties onto every wrapper by reference, and an extracted body is another such copy, so every carrier holding a rewritten key is updated together\n for (const entry of ctx.seen.values()) {\n for (const carrier of [entry.schema, entry.def]) {\n const rewritten = carrier && rewrites.get(carrier.propertyNames);\n if (rewritten)\n carrier.propertyNames = rewritten;\n }\n }\n}\nexport const recordProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"object\";\n // For looseRecord with regex patterns, use patternProperties. This correctly represents \"only validate keys matching the pattern\" semantics and composes well with allOf (intersections)\n const keyType = def.keyType;\n const patterns = aggregateChecks(keyType).patterns;\n if (def.mode === \"loose\" && patterns && patterns.size > 0) {\n // Use patternProperties for looseRecord with regex patterns\n const valueSchema = processSchema(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"patternProperties\", \"*\"],\n });\n json.patternProperties = {};\n for (const pattern of patterns) {\n assignProp(json.patternProperties, exactPattern(pattern).source, valueSchema);\n }\n }\n else {\n // Default behavior: use propertyNames + additionalProperties\n if (ctx.target === \"draft-07\" || ctx.target === \"draft-2020-12\") {\n json.propertyNames = processSchema(def.keyType, ctx, {\n ...params,\n path: [...params.path, \"propertyNames\"],\n });\n let pending = pendingRecords.get(ctx);\n if (!pending) {\n pending = [];\n pendingRecords.set(ctx, pending);\n ctx.deferred.push(() => rewriteKeyNames(ctx));\n }\n pending.push(schema);\n }\n json.additionalProperties = processSchema(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n // Add required for keys with discrete values (enum, literal, etc.)\n const keyValues = keyType._zod.values;\n // Every key shares one value schema, so an optional-in value makes the whole key set omittable on input. Output keeps them: the exhaustive branch assigns every key, even one whose value came back undefined.\n const omittableOnInput = ctx.io === \"input\" && inputOptin(def.valueType) !== undefined;\n if (keyValues && !def.partial && !omittableOnInput) {\n const validKeyValues = [...keyValues].filter((v) => typeof v === \"string\" || typeof v === \"number\");\n if (validKeyValues.length > 0) {\n json.required = validKeyValues.map(String);\n }\n }\n};\nexport const nullableProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const inner = processSchema(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n if (ctx.target === \"openapi-3.0\") {\n seen.ref = def.innerType;\n json.nullable = true;\n }\n else {\n json.anyOf = [inner, { type: \"null\" }];\n }\n};\nexport const nonoptionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n processSchema(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\n/** Round-trips a default value through JSON so the emitted schema is guaranteed to be valid JSON.\n * A BigInt has no reliable encoding, so it goes through `unrepresentable` like any other\n * unrepresentable value. Returns a sentinel when the caller must not write a default of its own. */\nconst UNREPRESENTABLE_DEFAULT = Symbol();\nfunction serializeDefaultValue(value, schema, ctx, json, params) {\n let unrepresentable = false;\n const serialized = JSON.stringify(value, (_, val) => {\n if (typeof val !== \"bigint\")\n return val;\n unrepresentable = true;\n return null;\n });\n if (!unrepresentable)\n return JSON.parse(serialized);\n handleUnrepresentable(schema, ctx, json, params, \"BigInt defaults cannot be represented in JSON Schema\");\n return UNREPRESENTABLE_DEFAULT;\n}\nexport const defaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n processSchema(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n const value = serializeDefaultValue(def.defaultValue, schema, ctx, json, params);\n if (value !== UNREPRESENTABLE_DEFAULT)\n json.default = value;\n};\nexport const prefaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n processSchema(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n if (ctx.io !== \"input\")\n return;\n const value = serializeDefaultValue(def.defaultValue, schema, ctx, json, params);\n if (value !== UNREPRESENTABLE_DEFAULT)\n json._prefault = value;\n};\nexport const catchProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n processSchema(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n let catchValue;\n try {\n catchValue = def.catchValue(undefined);\n }\n catch {\n handleUnrepresentable(schema, ctx, json, params, \"Dynamic catch values are not supported in JSON Schema\");\n return;\n }\n json.default = catchValue;\n};\nexport const pipeProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n const inIsTransform = def.in._zod.traits.has(\"$ZodTransform\");\n const innerType = ctx.io === \"input\" ? (inIsTransform ? def.out : def.in) : def.out;\n processSchema(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\nexport const readonlyProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n processSchema(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n json.readOnly = true;\n};\nexport const promiseProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n processSchema(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const optionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n processSchema(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const lazyProcessor = (schema, ctx, _json, params) => {\n const innerType = schema._zod.innerType;\n processSchema(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\n// ==================== ALL PROCESSORS ====================\nexport const allProcessors = {\n string: stringProcessor,\n number: numberProcessor,\n boolean: booleanProcessor,\n bigint: bigintProcessor,\n symbol: symbolProcessor,\n null: nullProcessor,\n undefined: undefinedProcessor,\n void: voidProcessor,\n never: neverProcessor,\n any: anyProcessor,\n unknown: unknownProcessor,\n date: dateProcessor,\n enum: enumProcessor,\n literal: literalProcessor,\n nan: nanProcessor,\n template_literal: templateLiteralProcessor,\n file: fileProcessor,\n success: successProcessor,\n custom: customProcessor,\n function: functionProcessor,\n transform: transformProcessor,\n map: mapProcessor,\n set: setProcessor,\n array: arrayProcessor,\n object: objectProcessor,\n union: unionProcessor,\n intersection: intersectionProcessor,\n tuple: tupleProcessor,\n record: recordProcessor,\n nullable: nullableProcessor,\n nonoptional: nonoptionalProcessor,\n default: defaultProcessor,\n prefault: prefaultProcessor,\n catch: catchProcessor,\n pipe: pipeProcessor,\n readonly: readonlyProcessor,\n promise: promiseProcessor,\n optional: optionalProcessor,\n lazy: lazyProcessor,\n};\nexport function toJSONSchema(input, params) {\n if (\"_idmap\" in input) {\n // Registry case\n const registry = input;\n const ctx = initializeContext({ ...params, processors: allProcessors });\n const defs = {};\n // First pass: process all schemas to build the seen map\n for (const entry of registry._idmap.entries()) {\n const [_, schema] = entry;\n processSchema(schema, ctx);\n }\n const schemas = {};\n const external = {\n registry,\n uri: params?.uri,\n defs,\n };\n // Update the context with external configuration\n ctx.external = external;\n // Second pass: emit each schema\n for (const entry of registry._idmap.entries()) {\n const [key, schema] = entry;\n extractDefs(ctx, schema);\n assignProp(schemas, key, finalize(ctx, schema));\n }\n if (Object.keys(defs).length > 0) {\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n schemas.__shared = {\n [defsSegment]: defs,\n };\n }\n return { schemas };\n }\n // Single schema case\n const ctx = initializeContext({ ...params, processors: allProcessors });\n processSchema(input, ctx);\n extractDefs(ctx, input);\n return finalize(ctx, input);\n}\n","import * as core from \"../core/index.js\";\nimport { $ZodError } from \"../core/index.js\";\nimport * as util from \"../core/util.js\";\n/* Prototypes that already carry the lazy helper methods. Seeded with the\n * intrinsics so that `init` on a foreign object — it accepts any object —\n * can never install an accessor onto a prototype we do not own. */\nconst _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);\n/* Helper methods live as non-enumerable lazy getters on the shared\n * prototype instead of own properties on every instance. On first\n * access the getter allocates the per-instance closure and caches it\n * as a non-enumerable own property, so detached usage still works and\n * the allocation only happens for methods actually touched. */\nfunction _lazyMethod(proto, key, make) {\n Object.defineProperty(proto, key, {\n configurable: true,\n enumerable: false,\n get() {\n const value = make(this);\n Object.defineProperty(this, key, { value, configurable: true, writable: true });\n return value;\n },\n set(value) {\n Object.defineProperty(this, key, { value, configurable: true, writable: true });\n },\n });\n}\nconst initializer = (inst, issues) => {\n $ZodError.init(inst, issues);\n inst.name = \"ZodError\";\n const proto = Object.getPrototypeOf(inst);\n if (_installedErrorProtos.has(proto))\n return;\n _installedErrorProtos.add(proto);\n _lazyMethod(proto, \"format\", (self) => (mapper) => core.formatError(self, mapper));\n _lazyMethod(proto, \"flatten\", (self) => (mapper) => core.flattenError(self, mapper));\n _lazyMethod(proto, \"addIssue\", (self) => (issue) => {\n self.issues.push(issue);\n self.message = JSON.stringify(self.issues, util.jsonStringifyReplacer, 2);\n });\n _lazyMethod(proto, \"addIssues\", (self) => (issues) => {\n self.issues.push(...issues);\n self.message = JSON.stringify(self.issues, util.jsonStringifyReplacer, 2);\n });\n Object.defineProperty(proto, \"isEmpty\", {\n configurable: true,\n enumerable: false,\n get() {\n return this.issues.length === 0;\n },\n });\n};\nexport const ZodError = /*@__PURE__*/ core.$constructor(\"ZodError\", initializer);\nexport const ZodRealError = /*@__PURE__*/ core.$constructor(\"ZodError\", initializer, undefined, {\n Parent: Error,\n});\n// /** @deprecated Use `z.core.$ZodErrorMapCtx` instead. */\n// export type ErrorMapCtx = core.$ZodErrorMapCtx;\n","import * as core from \"../core/index.js\";\nimport { ZodRealError } from \"./errors.js\";\nexport const parse = /* @__PURE__ */ core._parse(ZodRealError);\nexport const parseAsync = /* @__PURE__ */ core._parseAsync(ZodRealError);\nexport const safeParse = /* @__PURE__ */ core._safeParse(ZodRealError);\nexport const safeParseAsync = /* @__PURE__ */ core._safeParseAsync(ZodRealError);\nexport { validate, validateAsync } from \"../core/index.js\";\n// Codec functions\nexport const encode = /* @__PURE__ */ core._encode(ZodRealError);\nexport const decode = /* @__PURE__ */ core._decode(ZodRealError);\nexport const encodeAsync = /* @__PURE__ */ core._encodeAsync(ZodRealError);\nexport const decodeAsync = /* @__PURE__ */ core._decodeAsync(ZodRealError);\nexport const safeEncode = /* @__PURE__ */ core._safeEncode(ZodRealError);\nexport const safeDecode = /* @__PURE__ */ core._safeDecode(ZodRealError);\nexport const safeEncodeAsync = /* @__PURE__ */ core._safeEncodeAsync(ZodRealError);\nexport const safeDecodeAsync = /* @__PURE__ */ core._safeDecodeAsync(ZodRealError);\n","import * as core from \"../core/index.js\";\nimport { util } from \"../core/index.js\";\nimport * as processors from \"../core/json-schema-processors.js\";\nimport * as regexes from \"../core/regexes.js\";\nimport { createStandardJSONSchemaMethod, createToJSONSchemaMethod } from \"../core/to-json-schema.js\";\nimport en from \"../locales/en.js\";\nimport * as checks from \"./checks.js\";\nimport * as parse from \"./parse.js\";\n// Register English as the default locale on first ZodType construction. Hooked into the `ZodType` `$constructor` (rather than a top-level `config(en())` in `external.ts`) so bundlers honoring `sideEffects: false` can't tree-shake it out — see #5953, #5725. An explicit `z.config(z.locales.xx())` call wins regardless of order, since this only sets the default when none is present.\nfunction _ensureDefaultLocale() {\n if (!core.globalConfig.localeError)\n core.config(en());\n}\n// the default memoizer is read by the core container init, which runs before `ZodType.init`, so each container calls this first\nfunction _ensureDefaultMemoizer() {\n if (!core.globalConfig.memoizer)\n core.config({ memoizer: core.memoizer() });\n}\nexport const ZodType = /*@__PURE__*/ core.$constructor(\"ZodType\", (inst, def) => {\n _ensureDefaultLocale();\n core.$ZodType.init(inst, def);\n inst.def = def;\n inst.type = def.type;\n return inst;\n}, {\n check(...chks) {\n const def = this.def;\n return this.clone(util.mergeDefs(def, {\n checks: [\n ...(def.checks ?? []),\n ...chks.map((ch) => typeof ch === \"function\" ? { _zod: { check: ch, def: { check: \"custom\" }, onattach: [] } } : ch),\n ],\n }), { parent: true });\n },\n with(...chks) {\n return this.check(...chks);\n },\n clone(def, params) {\n return core.clone(this, def, params);\n },\n brand() {\n return this;\n },\n register(reg, meta) {\n reg.add(this, meta);\n return this;\n },\n refine(check, params) {\n return this.check(refine(check, params));\n },\n superRefine(refinement, params) {\n return this.check(superRefine(refinement, params));\n },\n overwrite(fn) {\n return this.check(checks.overwrite(fn));\n },\n optional() {\n return optional(this);\n },\n exactOptional() {\n return exactOptional(this);\n },\n nullable() {\n return nullable(this);\n },\n nullish() {\n return optional(nullable(this));\n },\n nonoptional(params) {\n return nonoptional(this, params);\n },\n array() {\n return array(this);\n },\n or(arg) {\n return union([this, arg]);\n },\n and(arg) {\n return intersection(this, arg);\n },\n transform(tx) {\n return pipe(this, transform(tx));\n },\n default(d) {\n return _default(this, d);\n },\n prefault(d) {\n return prefault(this, d);\n },\n catch(params) {\n return _catch(this, params);\n },\n pipe(target) {\n return pipe(this, target);\n },\n readonly() {\n return readonly(this);\n },\n describe(description) {\n const cl = this.clone();\n core.globalRegistry.add(cl, { description });\n return cl;\n },\n meta(...args) {\n // overloaded: meta() returns the registered metadata, meta(data) returns a clone with `data` registered. The mapped type picks up the second overload, so we accept variadic any-args and return `any` to satisfy both at runtime.\n if (args.length === 0)\n return core.globalRegistry.get(this);\n const cl = this.clone();\n core.globalRegistry.add(cl, args[0]);\n return cl;\n },\n isOptional() {\n return this.safeParse(undefined).success;\n },\n isNullable() {\n return this.safeParse(null).success;\n },\n apply(fn, ...args) {\n return args.length === 0 ? fn(this) : fn(this, ...args);\n },\n // Overrides core's `~standard` to add `jsonSchema`. Must stay a prototype entry: redefining it per instance demotes instances to dictionary mode.\n get \"~standard\"() {\n return util.hide(this, \"~standard\", {\n ...core.standardProps(this),\n jsonSchema: {\n input: createStandardJSONSchemaMethod(this, \"input\"),\n output: createStandardJSONSchemaMethod(this, \"output\"),\n },\n });\n },\n set \"~standard\"(value) {\n util.own(this, \"~standard\", value);\n },\n parse: function _parse(data, params) {\n return parse.parse(this, data, params, { callee: _parse });\n },\n parseAsync: async function _parseAsync(data, params) {\n return await parse.parseAsync(this, data, params, { callee: _parseAsync });\n },\n safeParse(data, params) {\n return parse.safeParse(this, data, params);\n },\n async safeParseAsync(data, params) {\n return parse.safeParseAsync(this, data, params);\n },\n // `spa` is an alias: same function object as `safeParseAsync`, as before.\n get spa() {\n return this?.safeParseAsync;\n },\n set spa(value) {\n util.own(this, \"spa\", value);\n },\n validate(data, params) {\n return parse.validate(this, data, params);\n },\n validateAsync(data, params) {\n return parse.validateAsync(this, data, params);\n },\n encode: function _encode(data, params) {\n return parse.encode(this, data, params, { callee: _encode });\n },\n decode: function _decode(data, params) {\n return parse.decode(this, data, params, { callee: _decode });\n },\n encodeAsync: async function _encodeAsync(data, params) {\n return await parse.encodeAsync(this, data, params, { callee: _encodeAsync });\n },\n decodeAsync: async function _decodeAsync(data, params) {\n return await parse.decodeAsync(this, data, params, { callee: _decodeAsync });\n },\n safeEncode(data, params) {\n return parse.safeEncode(this, data, params);\n },\n safeDecode(data, params) {\n return parse.safeDecode(this, data, params);\n },\n async safeEncodeAsync(data, params) {\n return parse.safeEncodeAsync(this, data, params);\n },\n async safeDecodeAsync(data, params) {\n return parse.safeDecodeAsync(this, data, params);\n },\n toJSONSchema(params) {\n return createToJSONSchemaMethod(this, {})(params);\n },\n // Reads through to the registry on every access, so it must not cache.\n get description() {\n return core.globalRegistry.get(this)?.description;\n },\n // No setter: `schema._def = x` throws, as it did when `_def` was a non-writable own property.\n get _def() {\n return this._zod.def;\n },\n});\n/** @internal */\nexport const _ZodString = /*@__PURE__*/ core.$constructor(\"_ZodString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.stringProcessor(inst, ctx, json, params);\n}, \n/*@__PURE__*/ util.derived({\n format: (inst) => processors.aggregateChecks(inst).format ?? null,\n minLength: (inst) => processors.aggregateChecks(inst).minimum ?? null,\n maxLength: (inst) => processors.aggregateChecks(inst).maximum ?? null,\n}, {\n regex(...args) {\n return this.check(checks.regex(...args));\n },\n includes(...args) {\n return this.check(checks.includes(...args));\n },\n startsWith(...args) {\n return this.check(checks.startsWith(...args));\n },\n endsWith(...args) {\n return this.check(checks.endsWith(...args));\n },\n min(...args) {\n return this.check(checks.minLength(...args));\n },\n max(...args) {\n return this.check(checks.maxLength(...args));\n },\n length(...args) {\n return this.check(checks.length(...args));\n },\n nonempty(...args) {\n return this.check(checks.minLength(1, ...args));\n },\n lowercase(params) {\n return this.check(checks.lowercase(params));\n },\n uppercase(params) {\n return this.check(checks.uppercase(params));\n },\n trim() {\n return this.check(checks.trim());\n },\n normalize(...args) {\n return this.check(checks.normalize(...args));\n },\n toLowerCase() {\n return this.check(checks.toLowerCase());\n },\n toUpperCase() {\n return this.check(checks.toUpperCase());\n },\n slugify() {\n return this.check(checks.slugify());\n },\n}));\nexport const ZodString = /*@__PURE__*/ core.$constructor(\"ZodString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n _ZodString.init(inst, def);\n}, {\n email(params) {\n return this.check(core._email(ZodEmail, params));\n },\n url(params) {\n return this.check(core._url(ZodURL, params));\n },\n jwt(params) {\n return this.check(core._jwt(ZodJWT, params));\n },\n emoji(params) {\n return this.check(core._emoji(ZodEmoji, params));\n },\n guid(params) {\n return this.check(core._guid(ZodGUID, params));\n },\n uuid(params) {\n return this.check(core._uuid(ZodUUID, params));\n },\n uuidv4(params) {\n return this.check(core._uuidv4(ZodUUID, params));\n },\n uuidv6(params) {\n return this.check(core._uuidv6(ZodUUID, params));\n },\n uuidv7(params) {\n return this.check(core._uuidv7(ZodUUID, params));\n },\n nanoid(params) {\n return this.check(core._nanoid(ZodNanoID, params));\n },\n cuid(params) {\n return this.check(core._cuid(ZodCUID, params));\n },\n cuid2(params) {\n return this.check(core._cuid2(ZodCUID2, params));\n },\n ulid(params) {\n return this.check(core._ulid(ZodULID, params));\n },\n base64(params) {\n return this.check(core._base64(ZodBase64, params));\n },\n base64url(params) {\n return this.check(core._base64url(ZodBase64URL, params));\n },\n xid(params) {\n return this.check(core._xid(ZodXID, params));\n },\n ksuid(params) {\n return this.check(core._ksuid(ZodKSUID, params));\n },\n ipv4(params) {\n return this.check(core._ipv4(ZodIPv4, params));\n },\n ipv6(params) {\n return this.check(core._ipv6(ZodIPv6, params));\n },\n cidrv4(params) {\n return this.check(core._cidrv4(ZodCIDRv4, params));\n },\n cidrv6(params) {\n return this.check(core._cidrv6(ZodCIDRv6, params));\n },\n e164(params) {\n return this.check(core._e164(ZodE164, params));\n },\n datetime(params) {\n return this.check(core._isoDateTime(ZodISODateTime, params));\n },\n date(params) {\n return this.check(core._isoDate(ZodISODate, params));\n },\n time(params) {\n return this.check(core._isoTime(ZodISOTime, params));\n },\n duration(params) {\n return this.check(core._isoDuration(ZodISODuration, params));\n },\n});\nexport function string(params) {\n return core._string(ZodString, params);\n}\nexport const ZodStringFormat = /*@__PURE__*/ core.$constructor(\"ZodStringFormat\", (inst, def) => {\n core.$ZodStringFormat.init(inst, def);\n _ZodString.init(inst, def);\n});\nexport const ZodISODateTime = /*@__PURE__*/ core.$constructor(\"ZodISODateTime\", (inst, def) => {\n core.$ZodISODateTime.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport const ZodISODate = /*@__PURE__*/ core.$constructor(\"ZodISODate\", (inst, def) => {\n core.$ZodISODate.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport const ZodISOTime = /*@__PURE__*/ core.$constructor(\"ZodISOTime\", (inst, def) => {\n core.$ZodISOTime.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport const ZodISODuration = /*@__PURE__*/ core.$constructor(\"ZodISODuration\", (inst, def) => {\n core.$ZodISODuration.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport const ZodEmail = /*@__PURE__*/ core.$constructor(\"ZodEmail\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodEmail.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function email(params) {\n return core._email(ZodEmail, params);\n}\nexport const ZodGUID = /*@__PURE__*/ core.$constructor(\"ZodGUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodGUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function guid(params) {\n return core._guid(ZodGUID, params);\n}\nexport const ZodUUID = /*@__PURE__*/ core.$constructor(\"ZodUUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodUUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function uuid(params) {\n return core._uuid(ZodUUID, params);\n}\nexport function uuidv4(params) {\n return core._uuidv4(ZodUUID, params);\n}\n// ZodUUIDv6\nexport function uuidv6(params) {\n return core._uuidv6(ZodUUID, params);\n}\n// ZodUUIDv7\nexport function uuidv7(params) {\n return core._uuidv7(ZodUUID, params);\n}\nexport const ZodURL = /*@__PURE__*/ core.$constructor(\"ZodURL\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodURL.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function url(params) {\n return core._url(ZodURL, params);\n}\nexport function httpUrl(params) {\n return core._url(ZodURL, {\n protocol: regexes.httpProtocol,\n hostname: regexes.domain,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodEmoji = /*@__PURE__*/ core.$constructor(\"ZodEmoji\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodEmoji.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function emoji(params) {\n return core._emoji(ZodEmoji, params);\n}\nexport const ZodNanoID = /*@__PURE__*/ core.$constructor(\"ZodNanoID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodNanoID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function nanoid(params) {\n return core._nanoid(ZodNanoID, params);\n}\n/**\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link ZodCUID2} instead.\n * See https://github.com/paralleldrive/cuid.\n */\nexport const ZodCUID = /*@__PURE__*/ core.$constructor(\"ZodCUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\n/**\n * Validates a CUID v1 string.\n *\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link cuid2 | `z.cuid2()`} instead.\n * See https://github.com/paralleldrive/cuid.\n */\nexport function cuid(params) {\n return core._cuid(ZodCUID, params);\n}\nexport const ZodCUID2 = /*@__PURE__*/ core.$constructor(\"ZodCUID2\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCUID2.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cuid2(params) {\n return core._cuid2(ZodCUID2, params);\n}\nexport const ZodULID = /*@__PURE__*/ core.$constructor(\"ZodULID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodULID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ulid(params) {\n return core._ulid(ZodULID, params);\n}\nexport const ZodXID = /*@__PURE__*/ core.$constructor(\"ZodXID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodXID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function xid(params) {\n return core._xid(ZodXID, params);\n}\nexport const ZodKSUID = /*@__PURE__*/ core.$constructor(\"ZodKSUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodKSUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ksuid(params) {\n return core._ksuid(ZodKSUID, params);\n}\nexport const ZodIPv4 = /*@__PURE__*/ core.$constructor(\"ZodIPv4\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodIPv4.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ipv4(params) {\n return core._ipv4(ZodIPv4, params);\n}\nexport const ZodMAC = /*@__PURE__*/ core.$constructor(\"ZodMAC\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodMAC.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function mac(params) {\n return core._mac(ZodMAC, params);\n}\nexport const ZodIPv6 = /*@__PURE__*/ core.$constructor(\"ZodIPv6\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodIPv6.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ipv6(params) {\n return core._ipv6(ZodIPv6, params);\n}\nexport const ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"ZodCIDRv4\", (inst, def) => {\n core.$ZodCIDRv4.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cidrv4(params) {\n return core._cidrv4(ZodCIDRv4, params);\n}\nexport const ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"ZodCIDRv6\", (inst, def) => {\n core.$ZodCIDRv6.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cidrv6(params) {\n return core._cidrv6(ZodCIDRv6, params);\n}\nexport const ZodBase64 = /*@__PURE__*/ core.$constructor(\"ZodBase64\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodBase64.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function base64(params) {\n return core._base64(ZodBase64, params);\n}\nexport const ZodBase64URL = /*@__PURE__*/ core.$constructor(\"ZodBase64URL\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodBase64URL.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function base64url(params) {\n return core._base64url(ZodBase64URL, params);\n}\nexport const ZodE164 = /*@__PURE__*/ core.$constructor(\"ZodE164\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodE164.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function e164(params) {\n return core._e164(ZodE164, params);\n}\nexport const ZodCreditCard = /*@__PURE__*/ core.$constructor(\"ZodCreditCard\", (inst, def) => {\n core.$ZodCreditCard.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function creditCard(params) {\n return core._creditCard(ZodCreditCard, params);\n}\nexport const ZodIBAN = /*@__PURE__*/ core.$constructor(\"ZodIBAN\", (inst, def) => {\n core.$ZodIBAN.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function iban(params) {\n return core._iban(ZodIBAN, params);\n}\nexport const ZodJWT = /*@__PURE__*/ core.$constructor(\"ZodJWT\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodJWT.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function jwt(params) {\n return core._jwt(ZodJWT, params);\n}\nexport const ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"ZodCustomStringFormat\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCustomStringFormat.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function stringFormat(format, fnOrRegex, _params = {}) {\n return core._stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);\n}\nexport function hostname(_params) {\n return core._stringFormat(ZodCustomStringFormat, \"hostname\", regexes.hostname, _params);\n}\nexport function hex(_params) {\n return core._stringFormat(ZodCustomStringFormat, \"hex\", regexes.hex, _params);\n}\nexport function currencyCode(_params) {\n return core._stringFormat(ZodCustomStringFormat, \"currency_code\", regexes.currencyCode, _params);\n}\nexport function hash(alg, params) {\n const enc = params?.enc ?? \"hex\";\n const format = `${alg}_${enc}`;\n const regex = core.regexes[format];\n if (!regex)\n throw new Error(`Unrecognized hash format: ${format}`);\n return core._stringFormat(ZodCustomStringFormat, format, regex, params);\n}\nexport const ZodNumber = /*@__PURE__*/ core.$constructor(\"ZodNumber\", (inst, def) => {\n core.$ZodNumber.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.numberProcessor(inst, ctx, json, params);\n inst.isFinite = true;\n}, \n/*@__PURE__*/ util.derived({\n minValue: (inst) => {\n const { minimum, exclusiveMinimum } = processors.aggregateChecks(inst);\n return Math.max(minimum ?? Number.NEGATIVE_INFINITY, exclusiveMinimum ?? Number.NEGATIVE_INFINITY);\n },\n maxValue: (inst) => {\n const { maximum, exclusiveMaximum } = processors.aggregateChecks(inst);\n return Math.min(maximum ?? Number.POSITIVE_INFINITY, exclusiveMaximum ?? Number.POSITIVE_INFINITY);\n },\n isInt: (inst) => {\n const { isInt, multipleOf } = processors.aggregateChecks(inst);\n return !!isInt || !!multipleOf?.some(Number.isSafeInteger);\n },\n format: (inst) => processors.aggregateChecks(inst).format ?? null,\n}, {\n gt(value, params) {\n return this.check(checks.gt(value, params));\n },\n gte(value, params) {\n return this.check(checks.gte(value, params));\n },\n min(value, params) {\n return this.check(checks.gte(value, params));\n },\n lt(value, params) {\n return this.check(checks.lt(value, params));\n },\n lte(value, params) {\n return this.check(checks.lte(value, params));\n },\n max(value, params) {\n return this.check(checks.lte(value, params));\n },\n int(params) {\n return this.check(int(params));\n },\n safe(params) {\n return this.check(int(params));\n },\n positive(params) {\n return this.check(checks.gt(0, params));\n },\n nonnegative(params) {\n return this.check(checks.gte(0, params));\n },\n negative(params) {\n return this.check(checks.lt(0, params));\n },\n nonpositive(params) {\n return this.check(checks.lte(0, params));\n },\n multipleOf(value, params) {\n return this.check(checks.multipleOf(value, params));\n },\n step(value, params) {\n return this.check(checks.multipleOf(value, params));\n },\n finite() {\n return this;\n },\n}));\nexport function number(params) {\n return core._number(ZodNumber, params);\n}\nexport const ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"ZodNumberFormat\", (inst, def) => {\n core.$ZodNumberFormat.init(inst, def);\n ZodNumber.init(inst, def);\n});\nexport function int(params) {\n return core._int(ZodNumberFormat, params);\n}\nexport function float32(params) {\n return core._float32(ZodNumberFormat, params);\n}\nexport function float64(params) {\n return core._float64(ZodNumberFormat, params);\n}\nexport function int32(params) {\n return core._int32(ZodNumberFormat, params);\n}\nexport function uint32(params) {\n return core._uint32(ZodNumberFormat, params);\n}\nexport const ZodBoolean = /*@__PURE__*/ core.$constructor(\"ZodBoolean\", (inst, def) => {\n core.$ZodBoolean.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.booleanProcessor(inst, ctx, json, params);\n});\nexport function boolean(params) {\n return core._boolean(ZodBoolean, params);\n}\nexport const ZodBigInt = /*@__PURE__*/ core.$constructor(\"ZodBigInt\", (inst, def) => {\n core.$ZodBigInt.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.bigintProcessor(inst, ctx, json, params);\n}, \n/*@__PURE__*/ util.derived({\n minValue: (inst) => processors.aggregateChecks(inst).minimum ?? null,\n maxValue: (inst) => processors.aggregateChecks(inst).maximum ?? null,\n format: (inst) => processors.aggregateChecks(inst).format ?? null,\n}, {\n gte(value, params) {\n return this.check(checks.gte(value, params));\n },\n min(value, params) {\n return this.check(checks.gte(value, params));\n },\n gt(value, params) {\n return this.check(checks.gt(value, params));\n },\n lt(value, params) {\n return this.check(checks.lt(value, params));\n },\n lte(value, params) {\n return this.check(checks.lte(value, params));\n },\n max(value, params) {\n return this.check(checks.lte(value, params));\n },\n positive(params) {\n return this.check(checks.gt(BigInt(0), params));\n },\n negative(params) {\n return this.check(checks.lt(BigInt(0), params));\n },\n nonpositive(params) {\n return this.check(checks.lte(BigInt(0), params));\n },\n nonnegative(params) {\n return this.check(checks.gte(BigInt(0), params));\n },\n multipleOf(value, params) {\n return this.check(checks.multipleOf(value, params));\n },\n}));\nexport function bigint(params) {\n return core._bigint(ZodBigInt, params);\n}\nexport const ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"ZodBigIntFormat\", (inst, def) => {\n core.$ZodBigIntFormat.init(inst, def);\n ZodBigInt.init(inst, def);\n});\nexport function int64(params) {\n return core._int64(ZodBigIntFormat, params);\n}\nexport function uint64(params) {\n return core._uint64(ZodBigIntFormat, params);\n}\nexport const ZodSymbol = /*@__PURE__*/ core.$constructor(\"ZodSymbol\", (inst, def) => {\n core.$ZodSymbol.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.symbolProcessor(inst, ctx, json, params);\n});\nexport function symbol(params) {\n return core._symbol(ZodSymbol, params);\n}\nexport const ZodUndefined = /*@__PURE__*/ core.$constructor(\"ZodUndefined\", (inst, def) => {\n core.$ZodUndefined.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.undefinedProcessor(inst, ctx, json, params);\n});\nfunction _undefined(params) {\n return core._undefined(ZodUndefined, params);\n}\nexport { _undefined as undefined };\nexport const ZodNull = /*@__PURE__*/ core.$constructor(\"ZodNull\", (inst, def) => {\n core.$ZodNull.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nullProcessor(inst, ctx, json, params);\n});\nfunction _null(params) {\n return core._null(ZodNull, params);\n}\nexport { _null as null };\nexport const ZodAny = /*@__PURE__*/ core.$constructor(\"ZodAny\", (inst, def) => {\n core.$ZodAny.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.anyProcessor(inst, ctx, json, params);\n});\nexport function any() {\n return core._any(ZodAny);\n}\nexport const ZodUnknown = /*@__PURE__*/ core.$constructor(\"ZodUnknown\", (inst, def) => {\n core.$ZodUnknown.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unknownProcessor(inst, ctx, json, params);\n});\nexport function unknown() {\n return core._unknown(ZodUnknown);\n}\nexport const ZodNever = /*@__PURE__*/ core.$constructor(\"ZodNever\", (inst, def) => {\n core.$ZodNever.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.neverProcessor(inst, ctx, json, params);\n});\nexport function never(params) {\n return core._never(ZodNever, params);\n}\nexport const ZodVoid = /*@__PURE__*/ core.$constructor(\"ZodVoid\", (inst, def) => {\n core.$ZodVoid.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.voidProcessor(inst, ctx, json, params);\n});\nfunction _void(params) {\n return core._void(ZodVoid, params);\n}\nexport { _void as void };\nexport const ZodDate = /*@__PURE__*/ core.$constructor(\"ZodDate\", (inst, def) => {\n core.$ZodDate.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.dateProcessor(inst, ctx, json, params);\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.max = (value, params) => inst.check(checks.lte(value, params));\n}, \n/*@__PURE__*/ util.derived({\n minDate: (inst) => {\n const { minimum } = processors.aggregateChecks(inst);\n return minimum ? new Date(minimum) : null;\n },\n maxDate: (inst) => {\n const { maximum } = processors.aggregateChecks(inst);\n return maximum ? new Date(maximum) : null;\n },\n}, {}));\nexport function date(params) {\n return core._date(ZodDate, params);\n}\nexport const ZodArray = /*@__PURE__*/ core.$constructor(\"ZodArray\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodArray.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.arrayProcessor(inst, ctx, json, params);\n inst.element = def.element;\n}, {\n min(n, params) {\n return this.check(checks.minLength(n, params));\n },\n nonempty(params) {\n return this.check(checks.minLength(1, params));\n },\n max(n, params) {\n return this.check(checks.maxLength(n, params));\n },\n length(n, params) {\n return this.check(checks.length(n, params));\n },\n unwrap() {\n return this.element;\n },\n});\nexport function array(element, params) {\n return core._array(ZodArray, element, params);\n}\n// .keyof\nexport function keyof(schema) {\n const shape = schema._zod.def.shape;\n return _enum(Object.keys(shape));\n}\nexport const ZodObject = /*@__PURE__*/ core.$constructor(\"ZodObject\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodObjectJIT.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.objectProcessor(inst, ctx, json, params);\n util.installLazyProp(inst, \"shape\", (self) => self._zod.def.shape, false);\n}, {\n keyof() {\n return _enum(Object.keys(this._zod.def.shape));\n },\n catchall(catchall) {\n // `mergeDefs` rather than a spread: spreading reads `shape`, and resolving it can mint a whole fresh subtree\n return this.clone(util.mergeDefs(this._zod.def, { catchall: catchall }));\n },\n passthrough() {\n return this.clone(util.mergeDefs(this._zod.def, { catchall: unknown() }));\n },\n loose() {\n return this.clone(util.mergeDefs(this._zod.def, { catchall: unknown() }));\n },\n strict() {\n return this.clone(util.mergeDefs(this._zod.def, { catchall: never() }));\n },\n strip() {\n return this.clone(util.mergeDefs(this._zod.def, { catchall: undefined }));\n },\n extend(incoming) {\n return util.extend(this, incoming);\n },\n safeExtend(incoming) {\n return util.safeExtend(this, incoming);\n },\n merge(other) {\n return util.merge(this, other);\n },\n pick(mask) {\n return util.pick(this, mask);\n },\n omit(mask) {\n return util.omit(this, mask);\n },\n partial(...args) {\n return util.partial(ZodOptional, this, args[0]);\n },\n exactPartial(...args) {\n return util.partial(ZodExactOptional, this, args[0], \"exactPartial\");\n },\n required(...args) {\n return util.required(ZodNonOptional, this, args[0]);\n },\n});\nexport function object(shape, params) {\n const def = {\n type: \"object\",\n shape: shape ?? {},\n ...util.normalizeParams(params),\n };\n return new ZodObject(def);\n}\n// strictObject\nexport function strictObject(shape, params) {\n return new ZodObject({\n type: \"object\",\n shape,\n catchall: never(),\n ...util.normalizeParams(params),\n });\n}\n// looseObject\nexport function looseObject(shape, params) {\n return new ZodObject({\n type: \"object\",\n shape,\n catchall: unknown(),\n ...util.normalizeParams(params),\n });\n}\nexport const ZodUnion = /*@__PURE__*/ core.$constructor(\"ZodUnion\", (inst, def) => {\n core.$ZodUnion.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unionProcessor(inst, ctx, json, params);\n inst.options = def.options;\n});\nexport function union(options, params) {\n return new ZodUnion({\n type: \"union\",\n options: options,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodXor = /*@__PURE__*/ core.$constructor(\"ZodXor\", (inst, def) => {\n ZodUnion.init(inst, def);\n core.$ZodXor.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unionProcessor(inst, ctx, json, params);\n inst.options = def.options;\n});\n/** Creates an exclusive union (XOR) where exactly one option must match.\n * Unlike regular unions that succeed when any option matches, xor fails if\n * zero or more than one option matches the input. */\nexport function xor(options, params) {\n return new ZodXor({\n type: \"union\",\n options: options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodDiscriminatedUnion = /*@__PURE__*/ core.$constructor(\"ZodDiscriminatedUnion\", (inst, def) => {\n ZodUnion.init(inst, def);\n core.$ZodDiscriminatedUnion.init(inst, def);\n});\nexport function discriminatedUnion(discriminator, options, params) {\n // const [options, params] = args;\n return new ZodDiscriminatedUnion({\n type: \"union\",\n options: options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodIntersection = /*@__PURE__*/ core.$constructor(\"ZodIntersection\", (inst, def) => {\n core.$ZodIntersection.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.intersectionProcessor(inst, ctx, json, params);\n});\nexport function intersection(left, right) {\n return new ZodIntersection({\n type: \"intersection\",\n left: left,\n right: right,\n });\n}\nexport const ZodTuple = /*@__PURE__*/ core.$constructor(\"ZodTuple\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodTuple.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.tupleProcessor(inst, ctx, json, params);\n}, {\n rest(rest) {\n return this.clone({\n ...this._zod.def,\n rest: rest,\n });\n },\n partial() {\n const def = this._zod.def;\n // a refinement was authored against the full arity; partialing would run it on a shorter array\n if (def.checks?.length)\n throw new Error(\".partial() cannot be used on tuple schemas containing refinements\");\n return this.clone({\n ...def,\n items: def.items.map((item) => new ZodOptional({ type: \"optional\", innerType: item })),\n });\n },\n});\nexport function tuple(items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof core.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new ZodTuple({\n type: \"tuple\",\n items: items,\n rest,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodRecord = /*@__PURE__*/ core.$constructor(\"ZodRecord\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodRecord.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.recordProcessor(inst, ctx, json, params);\n inst.keyType = def.keyType;\n inst.valueType = def.valueType;\n});\nexport function record(keyType, valueType, params) {\n // v3-compat: z.record(valueType, params?) — defaults keyType to z.string()\n if (!valueType || !valueType._zod) {\n return new ZodRecord({\n type: \"record\",\n keyType: string(),\n valueType: keyType,\n ...util.normalizeParams(valueType),\n });\n }\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\n// type alksjf = core.output<core.$ZodRecordKey>;\nexport function partialRecord(keyType, valueType, params) {\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n partial: true,\n });\n}\nexport function looseRecord(keyType, valueType, params) {\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n mode: \"loose\",\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMap = /*@__PURE__*/ core.$constructor(\"ZodMap\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodMap.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.mapProcessor(inst, ctx, json, params);\n inst.keyType = def.keyType;\n inst.valueType = def.valueType;\n inst.min = (...args) => inst.check(core._minSize(...args));\n inst.nonempty = (params) => inst.check(core._minSize(1, params));\n inst.max = (...args) => inst.check(core._maxSize(...args));\n inst.size = (...args) => inst.check(core._size(...args));\n});\nexport function map(keyType, valueType, params) {\n return new ZodMap({\n type: \"map\",\n keyType: keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodSet = /*@__PURE__*/ core.$constructor(\"ZodSet\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodSet.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.setProcessor(inst, ctx, json, params);\n inst.min = (...args) => inst.check(core._minSize(...args));\n inst.nonempty = (params) => inst.check(core._minSize(1, params));\n inst.max = (...args) => inst.check(core._maxSize(...args));\n inst.size = (...args) => inst.check(core._size(...args));\n});\nexport function set(valueType, params) {\n return new ZodSet({\n type: \"set\",\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodEnum = /*@__PURE__*/ core.$constructor(\"ZodEnum\", (inst, def) => {\n core.$ZodEnum.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.enumProcessor(inst, ctx, json, params);\n inst.enum = def.entries;\n // reuse the parsed value set so a numeric TS enum's reverse-mapping keys stay out\n inst.options = [...inst._zod.values];\n const keys = new Set(Object.keys(def.entries));\n inst.extract = (values, params) => {\n const newEntries = {};\n for (const value of values) {\n if (keys.has(value)) {\n newEntries[value] = def.entries[value];\n }\n else\n throw new Error(`Key ${value} not found in enum`);\n }\n return new ZodEnum({\n ...def,\n checks: [],\n ...util.normalizeParams(params),\n entries: newEntries,\n });\n };\n inst.exclude = (values, params) => {\n const newEntries = { ...def.entries };\n for (const value of values) {\n if (keys.has(value)) {\n delete newEntries[value];\n }\n else\n throw new Error(`Key ${value} not found in enum`);\n }\n return new ZodEnum({\n ...def,\n checks: [],\n ...util.normalizeParams(params),\n entries: newEntries,\n });\n };\n});\nfunction _enum(values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n return new ZodEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport { _enum as enum };\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function nativeEnum(entries, params) {\n return new ZodEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodLiteral = /*@__PURE__*/ core.$constructor(\"ZodLiteral\", (inst, def) => {\n core.$ZodLiteral.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.literalProcessor(inst, ctx, json, params);\n inst.values = new Set(def.values);\n Object.defineProperty(inst, \"value\", {\n get() {\n if (def.values.length > 1) {\n throw new Error(\"This schema contains multiple valid literal values. Use `.values` instead.\");\n }\n return def.values[0];\n },\n });\n});\nexport function literal(value, params) {\n return new ZodLiteral({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\nexport const ZodFile = /*@__PURE__*/ core.$constructor(\"ZodFile\", (inst, def) => {\n core.$ZodFile.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.fileProcessor(inst, ctx, json, params);\n inst.min = (size, params) => inst.check(core._minSize(size, params));\n inst.max = (size, params) => inst.check(core._maxSize(size, params));\n inst.mime = (types, params) => inst.check(core._mime(Array.isArray(types) ? types : [types], params));\n});\nexport function file(params) {\n return core._file(ZodFile, params);\n}\nexport const ZodTransform = /*@__PURE__*/ core.$constructor(\"ZodTransform\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodTransform.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.transformProcessor(inst, ctx, json, params);\n inst._zod.parse = (payload, _ctx) => {\n if (_ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(inst.constructor.name);\n }\n payload.addIssue = (issue) => {\n if (typeof issue === \"string\") {\n payload.issues.push(util.issue(issue, payload.value, def));\n }\n else {\n // for Zod 3 backwards compatibility\n const _issue = issue;\n if (_issue.fatal)\n _issue.continue = false;\n _issue.code ?? (_issue.code = \"custom\");\n if (!(\"input\" in _issue))\n _issue.input = payload.value;\n _issue.inst ?? (_issue.inst = inst);\n // _issue.continue ??= true;\n payload.issues.push(util.issue(_issue));\n }\n };\n const output = def.transform(payload.value, payload);\n if (output instanceof Promise) {\n return output.then((output) => {\n payload.value = output;\n return payload;\n });\n }\n payload.value = output;\n return payload;\n };\n});\nexport function transform(fn) {\n return new ZodTransform({\n type: \"transform\",\n transform: fn,\n });\n}\nexport const ZodOptional = /*@__PURE__*/ core.$constructor(\"ZodOptional\", (inst, def) => {\n core.$ZodOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.optionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function optional(innerType) {\n return new ZodOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodExactOptional = /*@__PURE__*/ core.$constructor(\"ZodExactOptional\", (inst, def) => {\n core.$ZodExactOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.optionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function exactOptional(innerType) {\n return new ZodExactOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodNullable = /*@__PURE__*/ core.$constructor(\"ZodNullable\", (inst, def) => {\n core.$ZodNullable.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nullableProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function nullable(innerType) {\n return new ZodNullable({\n type: \"nullable\",\n innerType: innerType,\n });\n}\n// nullish\nexport function nullish(innerType) {\n return optional(nullable(innerType));\n}\nexport const ZodDefault = /*@__PURE__*/ core.$constructor(\"ZodDefault\", (inst, def) => {\n core.$ZodDefault.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.defaultProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n inst.removeDefault = inst.unwrap;\n});\nexport function _default(innerType, defaultValue) {\n return new ZodDefault({\n type: \"default\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodPrefault = /*@__PURE__*/ core.$constructor(\"ZodPrefault\", (inst, def) => {\n core.$ZodPrefault.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.prefaultProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function prefault(innerType, defaultValue) {\n return new ZodPrefault({\n type: \"prefault\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodNonOptional = /*@__PURE__*/ core.$constructor(\"ZodNonOptional\", (inst, def) => {\n core.$ZodNonOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nonoptionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function nonoptional(innerType, params) {\n return new ZodNonOptional({\n type: \"nonoptional\",\n innerType: innerType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodSuccess = /*@__PURE__*/ core.$constructor(\"ZodSuccess\", (inst, def) => {\n core.$ZodSuccess.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.successProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function success(innerType) {\n return new ZodSuccess({\n type: \"success\",\n innerType: innerType,\n });\n}\nexport const ZodCatch = /*@__PURE__*/ core.$constructor(\"ZodCatch\", (inst, def) => {\n core.$ZodCatch.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.catchProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n inst.removeCatch = inst.unwrap;\n});\nfunction _catch(innerType, catchValue) {\n return new ZodCatch({\n type: \"catch\",\n innerType: innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : core.util.constantCatch(catchValue)),\n });\n}\nexport { _catch as catch };\nexport const ZodNaN = /*@__PURE__*/ core.$constructor(\"ZodNaN\", (inst, def) => {\n core.$ZodNaN.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nanProcessor(inst, ctx, json, params);\n});\nexport function nan(params) {\n return core._nan(ZodNaN, params);\n}\nexport const ZodPipe = /*@__PURE__*/ core.$constructor(\"ZodPipe\", (inst, def) => {\n core.$ZodPipe.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.pipeProcessor(inst, ctx, json, params);\n inst.in = def.in;\n inst.out = def.out;\n});\nexport function pipe(in_, out) {\n return new ZodPipe({\n type: \"pipe\",\n in: in_,\n out: out,\n // ...util.normalizeParams(params),\n });\n}\nexport const ZodCodec = /*@__PURE__*/ core.$constructor(\"ZodCodec\", (inst, def) => {\n ZodPipe.init(inst, def);\n core.$ZodCodec.init(inst, def);\n});\nexport function codec(in_, out, params) {\n return new ZodCodec({\n type: \"pipe\",\n in: in_,\n out: out,\n transform: params.decode,\n reverseTransform: params.encode,\n });\n}\nexport function invertCodec(codec) {\n const def = codec._zod.def;\n return new ZodCodec({\n type: \"pipe\",\n in: def.out,\n out: def.in,\n transform: def.reverseTransform,\n reverseTransform: def.transform,\n });\n}\nexport const ZodPreprocess = /*@__PURE__*/ core.$constructor(\"ZodPreprocess\", (inst, def) => {\n ZodPipe.init(inst, def);\n core.$ZodPreprocess.init(inst, def);\n});\nexport const ZodReadonly = /*@__PURE__*/ core.$constructor(\"ZodReadonly\", (inst, def) => {\n core.$ZodReadonly.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.readonlyProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function readonly(innerType) {\n return new ZodReadonly({\n type: \"readonly\",\n innerType: innerType,\n });\n}\nexport const ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"ZodTemplateLiteral\", (inst, def) => {\n core.$ZodTemplateLiteral.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.templateLiteralProcessor(inst, ctx, json, params);\n});\nexport function templateLiteral(parts, params) {\n return new ZodTemplateLiteral({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodLazy = /*@__PURE__*/ core.$constructor(\"ZodLazy\", (inst, def) => {\n core.$ZodLazy.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.lazyProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.getter();\n});\nexport function lazy(getter) {\n return new ZodLazy({\n type: \"lazy\",\n getter: getter,\n });\n}\nexport const ZodPromise = /*@__PURE__*/ core.$constructor(\"ZodPromise\", (inst, def) => {\n core.$ZodPromise.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.promiseProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function promise(innerType) {\n return new ZodPromise({\n type: \"promise\",\n innerType: innerType,\n });\n}\nexport const ZodFunction = /*@__PURE__*/ core.$constructor(\"ZodFunction\", (inst, def) => {\n core.$ZodFunction.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.functionProcessor(inst, ctx, json, params);\n});\nexport function _function(params) {\n return new ZodFunction({\n type: \"function\",\n input: Array.isArray(params?.input) ? tuple(params?.input) : (params?.input ?? array(unknown())),\n output: params?.output ?? unknown(),\n });\n}\nexport { _function as function };\nexport const ZodCustom = /*@__PURE__*/ core.$constructor(\"ZodCustom\", (inst, def) => {\n core.$ZodCustom.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.customProcessor(inst, ctx, json, params);\n});\n// custom checks\nexport function check(fn) {\n const ch = new core.$ZodCheck({\n check: \"custom\",\n // ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\nexport function custom(fn, _params) {\n return core._custom(ZodCustom, fn ?? (() => true), _params);\n}\nexport function refine(fn, _params = {}) {\n return core._refine(ZodCustom, fn, _params);\n}\n// superRefine\nexport function superRefine(fn, params) {\n return core._superRefine(fn, params);\n}\n// Re-export describe and meta from core\nexport const describe = core.describe;\nexport const meta = core.meta;\nexport const ZodInstanceOf = /*@__PURE__*/ core.$constructor(\"ZodInstanceOf\", (inst, def) => {\n ZodCustom.init(inst, def);\n}, {\n properties(shape, params) {\n // asserts in place, so the narrowed output type is truthful without a wrapper\n return this.check(core._properties(shape, params));\n },\n});\nfunction _instanceof(cls, params = {}) {\n const inst = new ZodInstanceOf({\n type: \"custom\",\n check: \"custom\",\n fn: (data) => data instanceof cls,\n abort: true,\n ...util.normalizeParams(params),\n });\n inst._zod.bag.Class = cls;\n // Override check to emit invalid_type instead of custom\n inst._zod.check = (payload) => {\n if (!(payload.value instanceof cls)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: cls.name,\n input: payload.value,\n inst,\n path: [...(inst._zod.def.path ?? [])],\n });\n }\n };\n return inst;\n}\nexport { _instanceof as instanceof };\n// stringbool\nexport const stringbool = (...args) => core._stringbool({\n Codec: ZodCodec,\n Boolean: ZodBoolean,\n String: ZodString,\n}, ...args);\nexport function json(params) {\n const jsonSchema = lazy(() => {\n return union([string(params), number(), boolean(), _null(), array(jsonSchema), record(string(), jsonSchema)]);\n });\n return jsonSchema;\n}\n// preprocess\nexport function preprocess(fn, schema) {\n return new ZodPreprocess({\n type: \"pipe\",\n in: transform(fn),\n out: schema,\n });\n}\n","/**\n * A `StructFailure` represents a single specific failure in validation.\n */\n/**\n * `StructError` objects are thrown (or returned) when validation fails.\n *\n * Validation logic is design to exit early for maximum performance. The error\n * represents the first error encountered during validation. For more detail,\n * the `error.failures` property is a generator function that can be run to\n * continue validation and receive all the failures in the data.\n */\nexport class StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const { message, explanation, ...rest } = failure;\n const { path } = failure;\n const cause = path.length === 0 ? message : `At path: ${path.join('.')} -- ${message}`;\n super(explanation ?? cause);\n if (explanation !== null && explanation !== undefined) {\n this.cause = cause;\n }\n Object.assign(this, rest);\n this.name = this.constructor.name;\n this.failures = () => {\n return (cached ?? (cached = [failure, ...failures()]));\n };\n }\n}\n//# sourceMappingURL=error.mjs.map","/**\n * Check if a value is an iterator.\n *\n * @param value - The value to check.\n * @returns Whether the value is an iterator.\n */\nfunction isIterable(value) {\n return isObject(value) && typeof value[Symbol.iterator] === 'function';\n}\n/**\n * Check if a value is a plain object.\n *\n * @param value - The value to check.\n * @returns Whether the value is a plain object.\n */\nexport function isObject(value) {\n return typeof value === 'object' && value !== null;\n}\n/**\n * Check if a value is a plain object.\n *\n * @param value - The value to check.\n * @returns Whether the value is a plain object.\n */\nexport function isPlainObject(value) {\n if (Object.prototype.toString.call(value) !== '[object Object]') {\n return false;\n }\n const prototype = Object.getPrototypeOf(value);\n return prototype === null || prototype === Object.prototype;\n}\n/**\n * Return a value as a printable string.\n *\n * @param value - The value to print.\n * @returns The value as a string.\n */\nexport function print(value) {\n if (typeof value === 'symbol') {\n return value.toString();\n }\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n return typeof value === 'string' ? JSON.stringify(value) : `${value}`;\n}\n/**\n * Shift (remove and return) the first value from the `input` iterator.\n * Like `Array.prototype.shift()` but for an `Iterator`.\n *\n * @param input - The iterator to shift.\n * @returns The first value of the iterator, or `undefined` if the iterator is\n * empty.\n */\nexport function shiftIterator(input) {\n const { done, value } = input.next();\n return done ? undefined : value;\n}\n/**\n * Convert a single validation result to a failure.\n *\n * @param result - The result to convert.\n * @param context - The context of the validation.\n * @param struct - The struct being validated.\n * @param value - The value being validated.\n * @returns A failure if the result is a failure, or `undefined` if the result\n * is a success.\n */\nexport function toFailure(result, context, struct, value) {\n if (result === true) {\n return undefined;\n }\n else if (result === false) {\n // eslint-disable-next-line no-param-reassign\n result = {};\n }\n else if (typeof result === 'string') {\n // eslint-disable-next-line no-param-reassign\n result = { message: result };\n }\n const { path, branch } = context;\n const { type } = struct;\n const { refinement, message = `Expected a value of type \\`${type}\\`${refinement ? ` with refinement \\`${refinement}\\`` : ''}, but received: \\`${print(value)}\\``, } = result;\n return {\n value,\n type,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message,\n };\n}\n/**\n * Convert a validation result to an iterable of failures.\n *\n * @param result - The result to convert.\n * @param context - The context of the validation.\n * @param struct - The struct being validated.\n * @param value - The value being validated.\n * @yields The failures.\n * @returns An iterable of failures.\n */\nexport function* toFailures(result, context, struct, value) {\n if (!isIterable(result)) {\n // eslint-disable-next-line no-param-reassign\n result = [result];\n }\n for (const validationResult of result) {\n const failure = toFailure(validationResult, context, struct, value);\n if (failure) {\n yield failure;\n }\n }\n}\n/**\n * Check a value against a struct, traversing deeply into nested values, and\n * returning an iterator of failures or success.\n *\n * @param value - The value to check.\n * @param struct - The struct to check against.\n * @param options - Optional settings.\n * @param options.path - The path to the value in the input data.\n * @param options.branch - The branch of the value in the input data.\n * @param options.coerce - Whether to coerce the value before validating it.\n * @param options.mask - Whether to mask the value before validating it.\n * @param options.message - An optional message to include in the error.\n * @yields An iterator of failures or success.\n * @returns An iterator of failures or success.\n */\nexport function* run(value, struct, options = {}) {\n const { path = [], branch = [value], coerce = false, mask = false } = options;\n const context = { path, branch };\n if (coerce) {\n // eslint-disable-next-line no-param-reassign\n value = struct.coercer(value, context);\n if (mask &&\n struct.type !== 'type' &&\n isObject(struct.schema) &&\n isObject(value) &&\n !Array.isArray(value)) {\n for (const key in value) {\n if (struct.schema[key] === undefined) {\n delete value[key];\n }\n }\n }\n }\n let status = 'valid';\n for (const failure of struct.validator(value, context)) {\n failure.explanation = options.message;\n status = 'not_valid';\n yield [failure, undefined];\n }\n // eslint-disable-next-line prefer-const\n for (let [innerKey, innerValue, innerStruct] of struct.entries(value, context)) {\n const iterable = run(innerValue, innerStruct, {\n path: innerKey === undefined ? path : [...path, innerKey],\n branch: innerKey === undefined ? branch : [...branch, innerValue],\n coerce,\n mask,\n message: options.message,\n });\n for (const result of iterable) {\n if (result[0]) {\n status =\n result[0].refinement === null || result[0].refinement === undefined\n ? 'not_valid'\n : 'not_refined';\n yield [result[0], undefined];\n }\n else if (coerce) {\n innerValue = result[1];\n if (innerKey === undefined) {\n // eslint-disable-next-line no-param-reassign\n value = innerValue;\n }\n else if (value instanceof Map) {\n value.set(innerKey, innerValue);\n }\n else if (value instanceof Set) {\n value.add(innerValue);\n }\n else if (isObject(value)) {\n if (innerValue !== undefined || innerKey in value) {\n value[innerKey] = innerValue;\n }\n }\n }\n }\n }\n if (status !== 'not_valid') {\n for (const failure of struct.refiner(value, context)) {\n failure.explanation = options.message;\n status = 'not_refined';\n yield [failure, undefined];\n }\n }\n if (status === 'valid') {\n yield [undefined, value];\n }\n}\n//# sourceMappingURL=utils.mjs.map","import { StructError } from \"./error.mjs\";\nimport { isObject, toFailures, shiftIterator, run } from \"./utils.mjs\";\n/**\n * `Struct` objects encapsulate the validation logic for a specific type of\n * values. Once constructed, you use the `assert`, `is` or `validate` helpers to\n * validate unknown input data against the struct.\n */\nexport class Struct {\n constructor(props) {\n const { type, schema, validator, refiner, coercer = (value) => value, entries = function* () {\n /* noop */\n }, } = props;\n this.type = type;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n }\n else {\n this.validator = () => [];\n }\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n }\n else {\n this.refiner = () => [];\n }\n // Copy Symbol-keyed properties from `props` so that brands set on an inner\n // struct (e.g. the sensitive marker) are automatically inherited by any\n // wrapper that spreads the struct into a new constructor call.\n for (const sym of Object.getOwnPropertySymbols(props)) {\n Object.defineProperty(this, sym, \n // No need to check for undefined, since we are iterating over\n // `Object.getOwnPropertySymbols`.\n Object.getOwnPropertyDescriptor(props, sym));\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n assert(value, message) {\n return assert(value, this, message);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n create(value, message) {\n return create(value, this, message);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema.\n */\n mask(value, message) {\n return mask(value, this, message);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `withCoercion` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful.\n */\n validate(value, options = {}) {\n return validate(value, this, options);\n }\n}\n// String instead of a Symbol in case of multiple different versions of this library.\nconst ExactOptionalBrand = 'EXACT_OPTIONAL';\n/**\n * An `ExactOptionalStruct` is a `Struct` that is used to create exactly optional\n * properties of `object()` structs.\n */\nexport class ExactOptionalStruct extends Struct {\n constructor(props) {\n super({\n ...props,\n type: `exact optional ${props.type}`,\n });\n this.brand = ExactOptionalBrand;\n }\n static isExactOptional(value) {\n return (isObject(value) && 'brand' in value && value.brand === ExactOptionalBrand);\n }\n}\n/**\n * Assert that a value passes a struct, throwing if it doesn't.\n *\n * @param value - The value to validate.\n * @param struct - The struct to validate against.\n * @param message - An optional message to include in the error.\n */\nexport function assert(value, struct, message) {\n const result = validate(value, struct, { message });\n if (result[0]) {\n throw result[0];\n }\n}\n/**\n * Create a value with the coercion logic of struct and validate it.\n *\n * @param value - The value to coerce and validate.\n * @param struct - The struct to validate against.\n * @param message - An optional message to include in the error.\n * @returns The coerced and validated value.\n */\nexport function create(value, struct, message) {\n const result = validate(value, struct, { coerce: true, message });\n if (result[0]) {\n throw result[0];\n }\n else {\n return result[1];\n }\n}\n/**\n * Mask a value, returning only the subset of properties defined by a struct.\n *\n * @param value - The value to mask.\n * @param struct - The struct to mask against.\n * @param message - An optional message to include in the error.\n * @returns The masked value.\n */\nexport function mask(value, struct, message) {\n const result = validate(value, struct, { coerce: true, mask: true, message });\n if (result[0]) {\n throw result[0];\n }\n else {\n return result[1];\n }\n}\n/**\n * Check if a value passes a struct.\n *\n * @param value - The value to validate.\n * @param struct - The struct to validate against.\n * @returns `true` if the value passes the struct, `false` otherwise.\n */\nexport function is(value, struct) {\n const result = validate(value, struct);\n return !result[0];\n}\n/**\n * Validate a value against a struct, returning an error if invalid, or the\n * value (with potential coercion) if valid.\n *\n * @param value - The value to validate.\n * @param struct - The struct to validate against.\n * @param options - Optional settings.\n * @param options.coerce - Whether to coerce the value before validating it.\n * @param options.mask - Whether to mask the value before validating it.\n * @param options.message - An optional message to include in the error.\n * @returns A tuple containing the error (if invalid) and the validated value.\n */\nexport function validate(value, struct, options = {}) {\n const tuples = run(value, struct, options);\n const tuple = shiftIterator(tuples);\n if (tuple[0]) {\n const error = new StructError(tuple[0], function* () {\n for (const innerTuple of tuples) {\n if (innerTuple[0]) {\n yield innerTuple[0];\n }\n }\n });\n return [error, undefined];\n }\n const validatedValue = tuple[1];\n return [undefined, validatedValue];\n}\n//# sourceMappingURL=struct.mjs.map","import { Struct } from \"../struct.mjs\";\nimport { isObject } from \"../utils.mjs\";\nconst SENSITIVE_REDACTED = '***';\n// Global-registry Symbol so the brand is shared across multiple instances of\n// this library loaded in the same runtime (e.g. npm dedup failure). Compare\n// with `ExactOptionalBrand`, which uses a plain string for the same reason.\n// Using Symbol.for() (not Symbol()) means isSensitiveStruct() works even when\n// `sensitive()` and `object()` come from different copies of this package.\nconst SENSITIVE_BRAND = Symbol.for('superstruct.sensitive');\n/**\n * Check whether a struct was created by `sensitive()`, or wraps one.\n *\n * @param struct - The struct to check.\n * @returns `true` if the struct carries the sensitive brand.\n */\nexport function isSensitiveStruct(struct) {\n return Object.prototype.hasOwnProperty.call(struct, SENSITIVE_BRAND);\n}\n/**\n * Return a shallow copy of `sourceObj` with each key in `keys` replaced by\n * the redaction placeholder.\n *\n * @param sourceObj - The source object to copy and redact.\n * @param keys - The property names to redact.\n * @returns A shallow copy with the specified keys replaced.\n */\nfunction redactKeys(sourceObj, keys) {\n const redacted = { ...sourceObj };\n for (const key of keys) {\n if (key in redacted) {\n redacted[key] = SENSITIVE_REDACTED;\n }\n }\n return redacted;\n}\n/**\n * Wrap a struct so that every failure it (and any of its entries) emits is\n * fully redacted: `value` and every item in `branch` are replaced with\n * `SENSITIVE_REDACTED`. Field structs yielded by `entries` are wrapped\n * recursively so that nested object failures are covered too.\n *\n * This is the internal workhorse for `sensitive()`. It deliberately does NOT\n * stamp the `SENSITIVE_BRAND` so that only the user-facing wrapper is\n * detectable via `isSensitiveStruct()`.\n *\n * @param struct - The struct to wrap.\n * @returns The wrapped struct with identical validation logic but fully\n * redacted failures.\n */\nfunction wrapWithRedaction(struct) {\n // eslint-disable-next-line jsdoc/require-jsdoc\n function* redact(failures) {\n for (const failure of failures) {\n yield {\n ...failure,\n value: SENSITIVE_REDACTED,\n // We cannot safely preserve `failure.message` even for refiner\n // failures: a refiner that returns `false` gets a default message from\n // `toFailure` that embeds the raw value. There is no field on `Failure`\n // that distinguishes a custom refiner string from that generated\n // default, so preserving the original message risks leaking the\n // sensitive value. We rebuild the template from scratch, mirroring\n // `toFailure`'s own default, and include the refinement name when\n // present so callers can still tell which constraint failed.\n message: `Expected a value of type \\`${struct.type}\\`${failure.refinement ? ` with refinement \\`${failure.refinement}\\`` : ''}, but received: \\`${SENSITIVE_REDACTED}\\``,\n branch: new Array(failure.branch.length).fill(SENSITIVE_REDACTED),\n };\n }\n }\n return new Struct({\n ...struct,\n validator(value, context) {\n return redact(struct.validator(value, context));\n },\n refiner(value, context) {\n return redact(struct.refiner(value, context));\n },\n *entries(value, context) {\n for (const [key, val, fieldStruct] of struct.entries(value, context)) {\n yield [key, val, wrapWithRedaction(fieldStruct)];\n }\n },\n });\n}\n/**\n * Wrap a struct so that every failure it emits has any occurrence of\n * `parentObj` in `failure.branch` replaced with a sanitised copy where\n * `sensitiveKeys` are redacted. This prevents the parent object (which holds\n * secret field values) from leaking through sibling-field failures.\n *\n * The wrapping propagates recursively through `entries` so that failures from\n * deeply nested sibling structs are covered too.\n *\n * @param struct - The struct whose failures should be patched.\n * @param parentObj - The parent-object reference to look for in branch arrays.\n * @param sensitiveKeys - Keys to redact from `parentObj` when it appears.\n * @returns The wrapped struct.\n */\nexport function withRedactedBranch(struct, parentObj, sensitiveKeys) {\n // eslint-disable-next-line jsdoc/require-jsdoc\n function* redactBranch(failures) {\n for (const failure of failures) {\n if (!isObject(parentObj)) {\n yield failure;\n continue;\n }\n // Locate this specific parent. If it isn't in the branch (e.g. the\n // failure came from a different scope), pass it through.\n const parentIndex = failure.branch.indexOf(parentObj);\n if (parentIndex === -1) {\n yield failure;\n continue;\n }\n // Sanitize the parent entry.\n const branch = [...failure.branch];\n branch[parentIndex] = redactKeys(parentObj, sensitiveKeys);\n // Walk backward through every ancestor in the branch. Each ancestor\n // holds a direct reference to the child below it - without this step,\n // outer objects would still expose the unredacted child through their\n // own properties (e.g. root.wrapper.secret would remain visible\n // even after wrapper was sanitised at branch[1]).\n //\n // For each level we use the original child reference to find which\n // property key points to it (via ===), then replace that entry with\n // the already-sanitised child from the patched branch.\n for (let ancestorIndex = parentIndex - 1; ancestorIndex >= 0; ancestorIndex--) {\n const ancestor = branch[ancestorIndex];\n // No reference to update in this case.\n if (!isObject(ancestor)) {\n break;\n }\n // Keep the original child reference, so we can detect it.\n const child = failure.branch[ancestorIndex + 1];\n // The already-sanitised child from the patched branch.\n const childSanitized = branch[ancestorIndex + 1];\n // If we find the (original) child (not redacted) in one of the ancestor's\n // properties/entries, we replace it with the redacted version (re-using the same\n // sanitized child from the patched branch).\n if (Array.isArray(ancestor)) {\n const childIndex = ancestor.indexOf(child);\n if (childIndex === -1) {\n break;\n }\n const copy = [...ancestor];\n copy[childIndex] = childSanitized;\n branch[ancestorIndex] = copy;\n }\n else if (ancestor instanceof Map) {\n // Use a flag instead of relying on `undefined` since that could be a valid key in a `Map`.\n let childFound = false;\n let childKey;\n for (const [entryKey, entryValue] of ancestor) {\n if (entryValue === child) {\n childKey = entryKey;\n childFound = true;\n break;\n }\n }\n if (!childFound) {\n break;\n }\n const copy = new Map(ancestor);\n copy.set(childKey, childSanitized);\n branch[ancestorIndex] = copy;\n }\n else {\n const childKey = Object.keys(ancestor).find((key) => ancestor[key] === child);\n if (childKey === undefined) {\n break;\n }\n branch[ancestorIndex] = { ...ancestor, [childKey]: childSanitized };\n }\n }\n yield { ...failure, branch };\n }\n }\n return new Struct({\n ...struct,\n validator(value, context) {\n return redactBranch(struct.validator(value, context));\n },\n refiner(value, context) {\n return redactBranch(struct.refiner(value, context));\n },\n // Propagate branch redaction recursively so that failures originating from\n // any depth inside a sibling struct are also sanitised.\n *entries(value, context) {\n for (const entry of struct.entries(value, context)) {\n const [fieldKey, fieldValue, fieldStruct] = entry;\n yield [\n fieldKey,\n fieldValue,\n // `AnyStruct` is `Struct<any, any>`, while the tuple narrows only to\n // `Struct<any> | Struct<never>` (second generic left as `unknown`).\n // The cast is safe because both forms represent untyped structs at runtime.\n withRedactedBranch(fieldStruct, parentObj, sensitiveKeys),\n ];\n }\n },\n });\n}\n/**\n * Wrap a struct so that any validation failure redacts the actual value from\n * the error message, `StructError.value`, and `StructError.branch`. Use this\n * for fields that hold secrets to prevent\n * sensitive material from leaking into error logs or external services.\n *\n * When composed with the `object()` or `type()` structs, sibling-field\n * failures will also have the parent object's sensitive keys redacted from\n * their branch.\n *\n * @example\n * ```ts\n * const MyStruct = object({ secret: sensitive(string()) });\n * assert({ secret: 123 }, MyStruct);\n * // throws: At path: secret -- Expected a value of type `string`,\n * // but received: `***`\n * ```\n * @param struct - The struct to wrap.\n * @returns The wrapped struct with identical validation logic but redacted\n * failures.\n */\nexport function sensitive(struct) {\n const wrapped = wrapWithRedaction(struct);\n // Brand the wrapped struct. The `Struct` constructor copies Symbol-keyed\n // properties on spread, so any wrapper (optional, nullable, exactOptional,\n // deprecated, ...) automatically inherits this brand without needing changes.\n Object.defineProperty(wrapped, SENSITIVE_BRAND, {\n value: true,\n enumerable: true,\n configurable: true,\n writable: false,\n });\n return wrapped;\n}\n//# sourceMappingURL=sensitive.mjs.map","import { Struct } from \"../struct.mjs\";\nimport { object, optional, type } from \"./types.mjs\";\n/**\n * Create a new struct that combines the properties from multiple object or type\n * structs. Its return type will match the first parameter's type.\n *\n * @param Structs - The structs to combine.\n * @returns A new struct that combines the properties of the input structs.\n */\nexport function assign(...Structs) {\n const isType = Structs[0]?.type === 'type';\n const schemas = Structs.map(({ schema }) => schema);\n const schema = Object.assign({}, ...schemas);\n return isType ? type(schema) : object(schema);\n}\n/**\n * Define a new struct type with a custom validation function.\n *\n * @param name - The name of the struct type.\n * @param validator - The validation function.\n * @returns A new struct type.\n */\nexport function define(name, validator) {\n return new Struct({ type: name, schema: null, validator });\n}\n/**\n * Create a new struct based on an existing struct, but the value is allowed to\n * be `undefined`. `log` will be called if the value is not `undefined`.\n *\n * @param struct - The struct to augment.\n * @param log - The function to call when the value is not `undefined`.\n * @returns A new struct that will only accept `undefined` or values that pass\n * the input struct.\n */\nexport function deprecated(struct, log) {\n return new Struct({\n ...struct,\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n validator(value, ctx) {\n if (value === undefined) {\n return true;\n }\n log(value, ctx);\n return struct.validator(value, ctx);\n },\n });\n}\n/**\n * Create a struct with dynamic validation logic.\n *\n * The callback will receive the value currently being validated, and must\n * return a struct object to validate it with. This can be useful to model\n * validation logic that changes based on its input.\n *\n * @param fn - The callback to create the struct.\n * @returns A new struct with dynamic validation logic.\n */\nexport function dynamic(fn) {\n return new Struct({\n type: 'dynamic',\n schema: null,\n *entries(value, ctx) {\n const struct = fn(value, ctx);\n yield* struct.entries(value, ctx);\n },\n validator(value, ctx) {\n const struct = fn(value, ctx);\n return struct.validator(value, ctx);\n },\n coercer(value, ctx) {\n const struct = fn(value, ctx);\n return struct.coercer(value, ctx);\n },\n refiner(value, ctx) {\n const struct = fn(value, ctx);\n return struct.refiner(value, ctx);\n },\n });\n}\n/**\n * Create a struct with lazily evaluated validation logic.\n *\n * The first time validation is run with the struct, the callback will be called\n * and must return a struct object to use. This is useful for cases where you\n * want to have self-referential structs for nested data structures to avoid a\n * circular definition problem.\n *\n * @param fn - The callback to create the struct.\n * @returns A new struct with lazily evaluated validation logic.\n */\nexport function lazy(fn) {\n let struct;\n return new Struct({\n type: 'lazy',\n schema: null,\n *entries(value, ctx) {\n struct ?? (struct = fn());\n yield* struct.entries(value, ctx);\n },\n validator(value, ctx) {\n struct ?? (struct = fn());\n return struct.validator(value, ctx);\n },\n coercer(value, ctx) {\n struct ?? (struct = fn());\n return struct.coercer(value, ctx);\n },\n refiner(value, ctx) {\n struct ?? (struct = fn());\n return struct.refiner(value, ctx);\n },\n });\n}\n/**\n * Create a new struct based on an existing object struct, but excluding\n * specific properties.\n *\n * Like TypeScript's `Omit` utility.\n *\n * @param struct - The struct to augment.\n * @param keys - The keys to omit.\n * @returns A new struct that will not accept the input keys.\n */\nexport function omit(struct, keys) {\n const { schema } = struct;\n const subschema = { ...schema };\n for (const key of keys) {\n delete subschema[key];\n }\n switch (struct.type) {\n case 'type':\n return type(subschema);\n default:\n return object(subschema);\n }\n}\n/**\n * Create a new struct based on an existing object struct, but with all of its\n * properties allowed to be `undefined`.\n *\n * Like TypeScript's `Partial` utility.\n *\n * @param struct - The struct to augment.\n * @returns A new struct that will accept the input keys as `undefined`.\n */\nexport function partial(struct) {\n const isStruct = struct instanceof Struct;\n const schema = isStruct ? { ...struct.schema } : { ...struct };\n // eslint-disable-next-line guard-for-in\n for (const key in schema) {\n schema[key] = optional(schema[key]);\n }\n if (isStruct && struct.type === 'type') {\n return type(schema);\n }\n return object(schema);\n}\n/**\n * Create a new struct based on an existing object struct, but only including\n * specific properties.\n *\n * Like TypeScript's `Pick` utility.\n *\n * @param struct - The struct to augment.\n * @param keys - The keys to pick.\n * @returns A new struct that will only accept the input keys.\n */\nexport function pick(struct, keys) {\n const { schema } = struct;\n const subschema = {};\n for (const key of keys) {\n subschema[key] = schema[key];\n }\n switch (struct.type) {\n case 'type':\n return type(subschema);\n default:\n return object(subschema);\n }\n}\n//# sourceMappingURL=utilities.mjs.map","import { ExactOptionalStruct, Struct } from \"../struct.mjs\";\nimport { print, run, isObject } from \"../utils.mjs\";\nimport { isSensitiveStruct, withRedactedBranch } from \"./sensitive.mjs\";\nimport { define } from \"./utilities.mjs\";\n/**\n * Wrap a base struct so that entry-level failures from sibling fields have the\n * parent object's sensitive keys redacted from their branch. If `schema`\n * contains no sensitive-marked fields, `base` is returned as-is to avoid the\n * overhead of wrapping every entry.\n *\n * Used by both `object()` and `type()` to share the sensitive-entry wrapping\n * logic without duplication.\n *\n * @param base - The base struct to potentially wrap.\n * @param schema - The object schema to inspect for sensitive fields.\n * @returns The wrapped struct, or `base` unchanged when no sensitive fields\n * are present.\n */\nfunction withSensitiveEntries(base, schema) {\n const sensitiveKeys = Object.keys(schema).filter(\n // `noUncheckedIndexedAccess` makes `schema[key]` return `AnyStruct |\n // undefined`. After the `!== undefined` guard, TypeScript still treats the\n // second `schema[key]` access as potentially undefined (it does not\n // re-narrow repeated index reads), so the cast to `AnyStruct` is required.\n (key) => schema[key] !== undefined && isSensitiveStruct(schema[key]));\n if (sensitiveKeys.length === 0) {\n return base;\n }\n return new Struct({\n ...base,\n *entries(value, context) {\n // `run` initialises `branch` before coercion runs, so `value` here may\n // be a freshly-created coerced copy (e.g. `object()`'s `{ ...value }`)\n // while `context.branch[last]` still holds the original reference that\n // ends up in failure branches. Using the branch reference ensures the\n // `===` check inside `withRedactedBranch` matches when coercion is active.\n // Falls back to `value` if branch is somehow empty (entries called outside\n // of `run`).\n const parentInBranch = context.branch[context.branch.length - 1] ?? value;\n for (const entry of base.entries(value, context)) {\n const [fieldKey, fieldValue, fieldStruct] = entry;\n // The entries tuple types the third element as `Struct<any> |\n // Struct<never>`. `AnyStruct` is `Struct<any, any>`, which differs\n // only in the second generic. The cast is safe because both forms\n // represent untyped structs at runtime.\n yield [\n fieldKey,\n fieldValue,\n withRedactedBranch(fieldStruct, parentInBranch, sensitiveKeys),\n ];\n }\n },\n });\n}\n/**\n * Ensure that any value passes validation.\n *\n * @returns A struct that will always pass validation.\n */\nexport function any() {\n return define('any', () => true);\n}\n/**\n * Ensure that a value is an array and that its elements are of a specific type.\n *\n * Note: If you omit the element struct, the arrays elements will not be\n * iterated at all. This can be helpful for cases where performance is critical,\n * and it is preferred to using `array(any())`.\n *\n * @param Element - The struct to validate each element in the array against.\n * @returns A new struct that will only accept arrays of the given type.\n */\nexport function array(Element) {\n return new Struct({\n type: 'array',\n schema: Element,\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [index, arrayValue] of value.entries()) {\n yield [index, arrayValue, Element];\n }\n }\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n validator(value) {\n return (Array.isArray(value) ||\n `Expected an array value, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a bigint.\n *\n * @returns A new struct that will only accept bigints.\n */\nexport function bigint() {\n return define('bigint', (value) => {\n return typeof value === 'bigint';\n });\n}\n/**\n * Ensure that a value is a boolean.\n *\n * @returns A new struct that will only accept booleans.\n */\nexport function boolean() {\n return define('boolean', (value) => {\n return typeof value === 'boolean';\n });\n}\n/**\n * Ensure that a value is a valid `Date`.\n *\n * Note: this also ensures that the value is *not* an invalid `Date` object,\n * which can occur when parsing a date fails but still returns a `Date`.\n *\n * @returns A new struct that will only accept valid `Date` objects.\n */\nexport function date() {\n return define('date', (value) => {\n return ((value instanceof Date && !isNaN(value.getTime())) ||\n `Expected a valid \\`Date\\` object, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value is one of a set of potential values.\n *\n * Note: after creating the struct, you can access the definition of the\n * potential values as `struct.schema`.\n *\n * @param values - The potential values that the input can be.\n * @returns A new struct that will only accept the given values.\n */\nexport function enums(values) {\n const schema = {};\n const description = values.map((value) => print(value)).join();\n for (const key of values) {\n schema[key] = key;\n }\n return new Struct({\n type: 'enums',\n schema,\n validator(value) {\n return (values.includes(value) ||\n `Expected one of \\`${description}\\`, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a function.\n *\n * @returns A new struct that will only accept functions.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function func() {\n return define('func', (value) => {\n return (typeof value === 'function' ||\n `Expected a function, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value is an instance of a specific class.\n *\n * @param Class - The class that the value must be an instance of.\n * @returns A new struct that will only accept instances of the given class.\n */\nexport function instance(Class) {\n return define('instance', (value) => {\n return (value instanceof Class ||\n `Expected a \\`${Class.name}\\` instance, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value is an integer.\n *\n * @returns A new struct that will only accept integers.\n */\nexport function integer() {\n return define('integer', (value) => {\n return ((typeof value === 'number' && !isNaN(value) && Number.isInteger(value)) ||\n `Expected an integer, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value matches all of a set of types.\n *\n * @param Structs - The set of structs that the value must match.\n * @returns A new struct that will only accept values that match all of the\n * given structs.\n */\nexport function intersection(Structs) {\n return new Struct({\n type: 'intersection',\n schema: null,\n *entries(value, context) {\n for (const { entries } of Structs) {\n yield* entries(value, context);\n }\n },\n *validator(value, context) {\n for (const { validator } of Structs) {\n yield* validator(value, context);\n }\n },\n *refiner(value, context) {\n for (const { refiner } of Structs) {\n yield* refiner(value, context);\n }\n },\n });\n}\n/**\n * Ensure that a value is an exact value, using `===` for comparison.\n *\n * @param constant - The exact value that the input must be.\n * @returns A new struct that will only accept the exact given value.\n */\nexport function literal(constant) {\n const description = print(constant);\n const valueType = typeof constant;\n return new Struct({\n type: 'literal',\n schema: valueType === 'string' ||\n valueType === 'number' ||\n valueType === 'boolean'\n ? constant\n : null,\n validator(value) {\n return (value === constant ||\n `Expected the literal \\`${description}\\`, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a `Map` object, and that its keys and values are of\n * specific types.\n *\n * @param Key - The struct to validate each key in the map against.\n * @param Value - The struct to validate each value in the map against.\n * @returns A new struct that will only accept `Map` objects.\n */\nexport function map(Key, Value) {\n return new Struct({\n type: 'map',\n schema: null,\n *entries(value) {\n if (Key && Value && value instanceof Map) {\n for (const [mapKey, mapValue] of value.entries()) {\n yield [mapKey, mapKey, Key];\n yield [mapKey, mapValue, Value];\n }\n }\n },\n coercer(value) {\n return value instanceof Map ? new Map(value) : value;\n },\n validator(value) {\n return (value instanceof Map ||\n `Expected a \\`Map\\` object, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that no value ever passes validation.\n *\n * @returns A new struct that will never pass validation.\n */\nexport function never() {\n return define('never', () => false);\n}\n/**\n * Augment an existing struct to allow `null` values.\n *\n * @param struct - The struct to augment.\n * @returns A new struct that will accept `null` values.\n */\nexport function nullable(struct) {\n return new Struct({\n ...struct,\n validator: (value, ctx) => value === null || struct.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct.refiner(value, ctx),\n });\n}\n/**\n * Ensure that a value is a number.\n *\n * @returns A new struct that will only accept numbers.\n */\nexport function number() {\n return define('number', (value) => {\n return ((typeof value === 'number' && !isNaN(value)) ||\n `Expected a number, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value is an object, that it has a known set of properties,\n * and that its properties are of specific types.\n *\n * Note: Unrecognized properties will fail validation.\n *\n * @param schema - An object that defines the structure of the object.\n * @returns A new struct that will only accept objects.\n */\nexport function object(schema) {\n const knowns = schema ? Object.keys(schema) : [];\n const Never = never();\n const base = new Struct({\n type: 'object',\n schema: schema ?? null,\n *entries(value) {\n if (schema && isObject(value)) {\n const unknowns = new Set(Object.keys(value));\n for (const key of knowns) {\n unknowns.delete(key);\n const propertySchema = schema[key];\n if (ExactOptionalStruct.isExactOptional(propertySchema) &&\n !Object.prototype.hasOwnProperty.call(value, key)) {\n continue;\n }\n yield [key, value[key], schema[key]];\n }\n for (const key of unknowns) {\n yield [key, value[key], Never];\n }\n }\n },\n validator(value) {\n return (isObject(value) || `Expected an object, but received: ${print(value)}`);\n },\n coercer(value) {\n return isObject(value) ? { ...value } : value;\n },\n });\n if (!schema) {\n return base;\n }\n // `base` is typed as `Struct<unknown, Schema | null>` because the `Struct`\n // constructor receives `schema ?? null`. At this point `schema` is defined,\n // so the schema slot is actually `Schema`. The cast strips the `| null` so\n // `withSensitiveEntries` can accept it.\n return withSensitiveEntries(base, schema);\n}\n/**\n * Augment a struct to allow `undefined` values.\n *\n * @param struct - The struct to augment.\n * @returns A new struct that will accept `undefined` values.\n */\nexport function optional(struct) {\n return new Struct({\n ...struct,\n validator: (value, ctx) => value === undefined || struct.validator(value, ctx),\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n });\n}\n/**\n * Augment a struct such that, if it is the property of an object, it is exactly optional.\n * In other words, it is either present with the correct type, or not present at all.\n *\n * NOTE: Only intended for use with `object()` structs.\n *\n * @param struct - The struct to augment.\n * @returns A new struct that can be used to create exactly optional properties of `object()`\n * structs.\n */\nexport function exactOptional(struct) {\n return new ExactOptionalStruct(struct);\n}\n/**\n * Ensure that a value is an object with keys and values of specific types, but\n * without ensuring any specific shape of properties.\n *\n * Like TypeScript's `Record` utility.\n */\n/**\n * Ensure that a value is an object with keys and values of specific types, but\n * without ensuring any specific shape of properties.\n *\n * @param Key - The struct to validate each key in the record against.\n * @param Value - The struct to validate each value in the record against.\n * @returns A new struct that will only accept objects.\n */\nexport function record(Key, Value) {\n return new Struct({\n type: 'record',\n schema: null,\n *entries(value) {\n if (isObject(value)) {\n // eslint-disable-next-line guard-for-in\n for (const objectKey in value) {\n const objectValue = value[objectKey];\n yield [objectKey, objectKey, Key];\n yield [objectKey, objectValue, Value];\n }\n }\n },\n validator(value) {\n return (isObject(value) || `Expected an object, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a `RegExp`.\n *\n * Note: this does not test the value against the regular expression! For that\n * you need to use the `pattern()` refinement.\n *\n * @returns A new struct that will only accept `RegExp` objects.\n */\nexport function regexp() {\n return define('regexp', (value) => {\n return value instanceof RegExp;\n });\n}\n/**\n * Ensure that a value is a `Set` object, and that its elements are of a\n * specific type.\n *\n * @param Element - The struct to validate each element in the set against.\n * @returns A new struct that will only accept `Set` objects.\n */\nexport function set(Element) {\n return new Struct({\n type: 'set',\n schema: null,\n *entries(value) {\n if (Element && value instanceof Set) {\n for (const setValue of value) {\n yield [setValue, setValue, Element];\n }\n }\n },\n coercer(value) {\n return value instanceof Set ? new Set(value) : value;\n },\n validator(value) {\n return (value instanceof Set ||\n `Expected a \\`Set\\` object, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a string.\n *\n * @returns A new struct that will only accept strings.\n */\nexport function string() {\n return define('string', (value) => {\n return (typeof value === 'string' ||\n `Expected a string, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value is a tuple of a specific length, and that each of its\n * elements is of a specific type.\n *\n * @param Structs - The set of structs that the value must match.\n * @returns A new struct that will only accept tuples of the given types.\n */\nexport function tuple(Structs) {\n const Never = never();\n return new Struct({\n type: 'tuple',\n schema: null,\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Structs.length, value.length);\n for (let i = 0; i < length; i++) {\n yield [i, value[i], Structs[i] || Never];\n }\n }\n },\n validator(value) {\n return (Array.isArray(value) ||\n `Expected an array, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value has a set of known properties of specific types.\n *\n * Note: Unrecognized properties are allowed and untouched. This is similar to\n * how TypeScript's structural typing works.\n *\n * @param schema - An object that defines the structure of the object.\n * @returns A new struct that will only accept objects.\n */\nexport function type(schema) {\n const keys = Object.keys(schema);\n const base = new Struct({\n type: 'type',\n schema,\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n if (ExactOptionalStruct.isExactOptional(schema[k]) &&\n !Object.prototype.hasOwnProperty.call(value, k)) {\n continue;\n }\n yield [k, value[k], schema[k]];\n }\n }\n },\n validator(value) {\n return (isObject(value) || `Expected an object, but received: ${print(value)}`);\n },\n coercer(value) {\n return isObject(value) ? { ...value } : value;\n },\n });\n return withSensitiveEntries(base, schema);\n}\n/**\n * Ensure that a value matches one of a set of types.\n *\n * @param Structs - The set of structs that the value must match.\n * @returns A new struct that will only accept values that match one of the\n * given structs.\n */\nexport function union(Structs) {\n const description = Structs.map((struct) => struct.type).join(' | ');\n return new Struct({\n type: 'union',\n schema: null,\n coercer(value) {\n for (const InnerStruct of Structs) {\n const [error, coerced] = InnerStruct.validate(value, { coerce: true });\n if (!error) {\n return coerced;\n }\n }\n return value;\n },\n validator(value, ctx) {\n const failures = [];\n for (const InnerStruct of Structs) {\n const [...tuples] = run(value, InnerStruct, ctx);\n const [first] = tuples;\n if (!first?.[0]) {\n return [];\n }\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n return [\n `Expected the value to satisfy a union of \\`${description}\\`, but received: ${print(value)}`,\n ...failures,\n ];\n },\n });\n}\n/**\n * Ensure that any value passes validation, without widening its type to `any`.\n *\n * @returns A struct that will always pass validation.\n */\nexport function unknown() {\n return define('unknown', () => true);\n}\n//# sourceMappingURL=types.mjs.map","import { Struct, is } from \"../struct.mjs\";\nimport { isPlainObject } from \"../utils.mjs\";\nimport { string, unknown } from \"./types.mjs\";\n/**\n * Augment a `Struct` to add an additional coercion step to its input.\n *\n * This allows you to transform input data before validating it, to increase the\n * likelihood that it passes validation—for example for default values, parsing\n * different formats, etc.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n *\n * @param struct - The struct to augment.\n * @param condition - A struct that the input must pass to be coerced.\n * @param coercer - A function that takes the input and returns the coerced\n * value.\n * @returns A new struct that will coerce its input before validating it.\n */\nexport function coerce(struct, condition, coercer) {\n return new Struct({\n ...struct,\n coercer: (value, ctx) => {\n return is(value, condition)\n ? struct.coercer(coercer(value, ctx), ctx)\n : struct.coercer(value, ctx);\n },\n });\n}\n/**\n * Augment a struct to replace `undefined` values with a default.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n *\n * @param struct - The struct to augment.\n * @param fallback - The value to use when the input is `undefined`.\n * @param options - An optional options object.\n * @param options.strict - When `true`, the fallback will only be used when the\n * input is `undefined`. When `false`, the fallback will be used when the input\n * is `undefined` or when the input is a plain object and the fallback is a\n * plain object, and any keys in the fallback are missing from the input.\n * @returns A new struct that will replace `undefined` inputs with a default.\n */\nexport function defaulted(struct, fallback, options = {}) {\n return coerce(struct, unknown(), (value) => {\n const result = typeof fallback === 'function' ? fallback() : fallback;\n if (value === undefined) {\n return result;\n }\n if (!options.strict && isPlainObject(value) && isPlainObject(result)) {\n const ret = { ...value };\n let changed = false;\n for (const key in result) {\n if (ret[key] === undefined) {\n ret[key] = result[key];\n changed = true;\n }\n }\n if (changed) {\n return ret;\n }\n }\n return value;\n });\n}\n/**\n * Augment a struct to trim string inputs.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n *\n * @param struct - The struct to augment.\n * @returns A new struct that will trim string inputs before validating them.\n */\nexport function trimmed(struct) {\n return coerce(struct, string(), (value) => value.trim());\n}\n//# sourceMappingURL=coercions.mjs.map","import { Struct } from \"../struct.mjs\";\nimport { toFailures } from \"../utils.mjs\";\n/**\n * Ensure that a string, array, map, or set is empty.\n *\n * @param struct - The struct to augment.\n * @returns A new struct that will only accept empty values.\n */\nexport function empty(struct) {\n return refine(struct, 'empty', (value) => {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const size = getSize(value);\n return (size === 0 ||\n `Expected an empty ${struct.type} but received one with a size of \\`${size}\\``);\n });\n}\n/**\n * Get the size of a string, array, map, or set.\n *\n * @param value - The value to measure.\n * @returns The size of the value.\n */\nfunction getSize(value) {\n if (value instanceof Map || value instanceof Set) {\n return value.size;\n }\n return value.length;\n}\n/**\n * Ensure that a number or date is below a threshold.\n *\n * @param struct - The struct to augment.\n * @param threshold - The maximum value that the input can be.\n * @param options - An optional options object.\n * @param options.exclusive - When `true`, the input must be strictly less than\n * the threshold. When `false`, the input must be less than or equal to the\n * threshold.\n * @returns A new struct that will only accept values below the threshold.\n */\nexport function max(struct, threshold, options = {}) {\n const { exclusive } = options;\n return refine(struct, 'max', (value) => {\n return exclusive\n ? value < threshold\n : value <= threshold ||\n `Expected a ${struct.type} less than ${exclusive ? '' : 'or equal to '\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n }${threshold} but received \\`${value}\\``;\n });\n}\n/**\n * Ensure that a number or date is above a threshold.\n *\n * @param struct - The struct to augment.\n * @param threshold - The minimum value that the input can be.\n * @param options - An optional options object.\n * @param options.exclusive - When `true`, the input must be strictly greater\n * than the threshold. When `false`, the input must be greater than or equal to\n * the threshold.\n * @returns A new struct that will only accept values above the threshold.\n */\nexport function min(struct, threshold, options = {}) {\n const { exclusive } = options;\n return refine(struct, 'min', (value) => {\n return exclusive\n ? value > threshold\n : value >= threshold ||\n `Expected a ${struct.type} greater than ${exclusive ? '' : 'or equal to '\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n }${threshold} but received \\`${value}\\``;\n });\n}\n/**\n * Ensure that a string, array, map or set is not empty.\n *\n * @param struct - The struct to augment.\n * @returns A new struct that will only accept non-empty values.\n */\nexport function nonempty(struct) {\n return refine(struct, 'nonempty', (value) => {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const size = getSize(value);\n return (size > 0 || `Expected a nonempty ${struct.type} but received an empty one`);\n });\n}\n/**\n * Ensure that a string matches a regular expression.\n *\n * @param struct - The struct to augment.\n * @param regexp - The regular expression to match against.\n * @returns A new struct that will only accept strings matching the regular\n * expression.\n */\nexport function pattern(struct, regexp) {\n return refine(struct, 'pattern', (value) => {\n return (regexp.test(value) ||\n `Expected a ${struct.type} matching \\`/${regexp.source}/\\` but received \"${value}\"`);\n });\n}\n/**\n * Ensure that a string, array, number, date, map, or set has a size (or length,\n * or time) between `min` and `max`.\n *\n * @param struct - The struct to augment.\n * @param minimum - The minimum size that the input can be.\n * @param maximum - The maximum size that the input can be.\n * @returns A new struct that will only accept values within the given size\n * range.\n */\nexport function size(struct, minimum, maximum = minimum) {\n const expected = `Expected a ${struct.type}`;\n const of = minimum === maximum\n ? `of \\`${minimum}\\``\n : `between \\`${minimum}\\` and \\`${maximum}\\``;\n return refine(struct, 'size', (value) => {\n if (typeof value === 'number' || value instanceof Date) {\n return ((minimum <= value && value <= maximum) ||\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n `${expected} ${of} but received \\`${value}\\``);\n }\n else if (value instanceof Map || value instanceof Set) {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { size } = value;\n return ((minimum <= size && size <= maximum) ||\n `${expected} with a size ${of} but received one with a size of \\`${size}\\``);\n }\n const { length } = value;\n return ((minimum <= length && length <= maximum) ||\n `${expected} with a length ${of} but received one with a length of \\`${length}\\``);\n });\n}\n/**\n * Augment a `Struct` to add an additional refinement to the validation.\n *\n * The refiner function is guaranteed to receive a value of the struct's type,\n * because the struct's existing validation will already have passed. This\n * allows you to layer additional validation on top of existing structs.\n *\n * @param struct - The struct to augment.\n * @param name - The name of the refinement.\n * @param refiner - The refiner function.\n * @returns A new struct that will run the refiner function after the existing\n * validation.\n */\nexport function refine(struct, name, refiner) {\n return new Struct({\n ...struct,\n *refiner(value, ctx) {\n yield* struct.refiner(value, ctx);\n const result = refiner(value, ctx);\n const failures = toFailures(result, ctx, struct, value);\n for (const failure of failures) {\n yield { ...failure, refinement: name };\n }\n },\n });\n}\n//# sourceMappingURL=refinements.mjs.map","//\n// Types\n//\n//\n// Type Guards\n//\n/**\n * A {@link NonEmptyArray} type guard.\n *\n * @template Element - The non-empty array member type.\n * @param value - The value to check.\n * @returns Whether the value is a non-empty array.\n */\nexport function isNonEmptyArray(value) {\n return Array.isArray(value) && value.length > 0;\n}\n/**\n * Type guard for \"nullishness\".\n *\n * @param value - Any value.\n * @returns `true` if the value is null or undefined, `false` otherwise.\n */\nexport function isNullOrUndefined(value) {\n return value === null || value === undefined;\n}\n/**\n * A type guard for {@link RuntimeObject}.\n *\n * @param value - The value to check.\n * @returns Whether the specified value has a runtime type of `object` and is\n * neither `null` nor an `Array`.\n */\nexport function isObject(value) {\n return Boolean(value) && typeof value === 'object' && !Array.isArray(value);\n}\n//\n// Other utility functions\n//\n/**\n * A type guard for ensuring an object has a property.\n *\n * @param objectToCheck - The object to check.\n * @param name - The property name to check for.\n * @returns Whether the specified object has an own property with the specified\n * name, regardless of whether it is enumerable or not.\n */\nexport const hasProperty = (objectToCheck, name) => Object.hasOwnProperty.call(objectToCheck, name);\n/**\n * `Object.getOwnPropertyNames()` is intentionally generic: it returns the\n * immediate property names of an object, but it cannot make guarantees about\n * the contents of that object, so the type of the property names is merely\n * `string[]`. While this is technically accurate, it is also unnecessary if we\n * have an object with a type that we own (such as an enum).\n *\n * @param object - The plain object.\n * @returns The own property names of the object which are assigned a type\n * derived from the object itself.\n */\nexport function getKnownPropertyNames(object) {\n return Object.getOwnPropertyNames(object);\n}\n/**\n * Predefined sizes (in Bytes) of specific parts of JSON structure.\n */\nexport var JsonSize;\n(function (JsonSize) {\n JsonSize[JsonSize[\"Null\"] = 4] = \"Null\";\n JsonSize[JsonSize[\"Comma\"] = 1] = \"Comma\";\n JsonSize[JsonSize[\"Wrapper\"] = 1] = \"Wrapper\";\n JsonSize[JsonSize[\"True\"] = 4] = \"True\";\n JsonSize[JsonSize[\"False\"] = 5] = \"False\";\n JsonSize[JsonSize[\"Quote\"] = 1] = \"Quote\";\n JsonSize[JsonSize[\"Colon\"] = 1] = \"Colon\";\n // eslint-disable-next-line @typescript-eslint/no-shadow\n JsonSize[JsonSize[\"Date\"] = 24] = \"Date\";\n})(JsonSize = JsonSize || (JsonSize = {}));\n/**\n * Regular expression with pattern matching for (special) escaped characters.\n */\nexport const ESCAPE_CHARACTERS_REGEXP = /\"|\\\\|\\n|\\r|\\t/gu;\n/**\n * Check if the value is plain object.\n *\n * @param value - Value to be checked.\n * @returns True if an object is the plain JavaScript object,\n * false if the object is not plain (e.g. function).\n */\nexport function isPlainObject(value) {\n if (typeof value !== 'object' || value === null) {\n return false;\n }\n try {\n let proto = value;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(value) === proto;\n }\n catch (_) {\n return false;\n }\n}\n/**\n * Check if character is ASCII.\n *\n * @param character - Character.\n * @returns True if a character code is ASCII, false if not.\n */\nexport function isASCII(character) {\n return character.charCodeAt(0) <= 127;\n}\n/**\n * Calculate string size.\n *\n * @param value - String value to calculate size.\n * @returns Number of bytes used to store whole string value.\n */\nexport function calculateStringSize(value) {\n const size = value.split('').reduce((total, character) => {\n if (isASCII(character)) {\n return total + 1;\n }\n return total + 2;\n }, 0);\n // Also detect characters that need backslash escape\n return size + (value.match(ESCAPE_CHARACTERS_REGEXP) ?? []).length;\n}\n/**\n * Calculate size of a number ofter JSON serialization.\n *\n * @param value - Number value to calculate size.\n * @returns Number of bytes used to store whole number in JSON.\n */\nexport function calculateNumberSize(value) {\n return value.toString().length;\n}\n//# sourceMappingURL=misc.mjs.map","import { any, array, coerce, create, define, integer, is, literal, nullable, number, object as superstructObject, optional, record, string, union, unknown, Struct, refine } from \"@metamask/superstruct\";\nimport { assertStruct } from \"./assert.mjs\";\nimport { hasProperty } from \"./misc.mjs\";\n/**\n * A struct to check if the given value is a valid object, with support for\n * {@link exactOptional} types.\n *\n * @deprecated Use `exactOptional` and `object` from `@metamask/superstruct@>=3.2.0` instead.\n * @param schema - The schema of the object.\n * @returns A struct to check if the given value is an object.\n */\nexport const object = (schema) => \n// The type is slightly different from a regular object struct, because we\n// want to make properties with `undefined` in their type optional, but not\n// `undefined` itself. This means that we need a type cast.\nsuperstructObject(schema);\n/**\n * Check the last field of a path is present.\n *\n * @param context - The context to check.\n * @param context.path - The path to check.\n * @param context.branch - The branch to check.\n * @returns Whether the last field of a path is present.\n */\nfunction hasOptional({ path, branch }) {\n const field = path[path.length - 1];\n return hasProperty(branch[branch.length - 2], field);\n}\n/**\n * A struct which allows the property of an object to be absent, or to be present\n * as long as it's valid and not set to `undefined`.\n *\n * This struct should be used in conjunction with the {@link object} from this\n * library, to get proper type inference.\n *\n * @deprecated Use `exactOptional` and `object` from `@metamask/superstruct@>=3.2.0` instead.\n * @param struct - The struct to check the value against, if present.\n * @returns A struct to check if the given value is valid, or not present.\n * @example\n * ```ts\n * const struct = object({\n * foo: exactOptional(string()),\n * bar: exactOptional(number()),\n * baz: optional(boolean()),\n * qux: unknown(),\n * });\n *\n * type Type = Infer<typeof struct>;\n * // Type is equivalent to:\n * // {\n * // foo?: string;\n * // bar?: number;\n * // baz?: boolean | undefined;\n * // qux: unknown;\n * // }\n * ```\n */\nexport function exactOptional(struct) {\n return new Struct({\n ...struct,\n type: `optional ${struct.type}`,\n validator: (value, context) => !hasOptional(context) || struct.validator(value, context),\n refiner: (value, context) => !hasOptional(context) || struct.refiner(value, context),\n });\n}\n/**\n * Validate an unknown input to be valid JSON.\n *\n * Useful for constructing JSON structs.\n *\n * @param json - An unknown value.\n * @returns True if the value is valid JSON, otherwise false.\n */\nfunction validateJson(json) {\n if (json === null || typeof json === 'boolean' || typeof json === 'string') {\n return true;\n }\n if (typeof json === 'number' && Number.isFinite(json)) {\n return true;\n }\n if (typeof json === 'object') {\n let every = true;\n if (Array.isArray(json)) {\n // Ignoring linting error since for-of is significantly slower than a normal for-loop\n // and performance is important in this specific function.\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < json.length; i++) {\n if (!validateJson(json[i])) {\n every = false;\n break;\n }\n }\n return every;\n }\n const entries = Object.entries(json);\n // Ignoring linting errors since for-of is significantly slower than a normal for-loop\n // and performance is important in this specific function.\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < entries.length; i++) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (typeof entries[i][0] !== 'string' || !validateJson(entries[i][1])) {\n every = false;\n break;\n }\n }\n return every;\n }\n return false;\n}\n/**\n * A struct to check if the given value is a valid JSON-serializable value.\n *\n * Note that this struct is unsafe. For safe validation, use {@link JsonStruct}.\n */\nexport const UnsafeJsonStruct = define('JSON', (json) => validateJson(json));\n/**\n * A struct to check if the given value is a valid JSON-serializable value.\n *\n * This struct sanitizes the value before validating it, so that it is safe to\n * use with untrusted input.\n */\nexport const JsonStruct = coerce(UnsafeJsonStruct, refine(any(), 'JSON', (value) => is(value, UnsafeJsonStruct)), (value) => JSON.parse(JSON.stringify(value, (propKey, propValue) => {\n // Strip __proto__ and constructor properties to prevent prototype pollution.\n if (propKey === '__proto__' || propKey === 'constructor') {\n return undefined;\n }\n return propValue;\n})));\n/**\n * Check if the given value is a valid {@link Json} value, i.e., a value that is\n * serializable to JSON.\n *\n * @param value - The value to check.\n * @returns Whether the value is a valid {@link Json} value.\n */\nexport function isValidJson(value) {\n try {\n getSafeJson(value);\n return true;\n }\n catch {\n return false;\n }\n}\n/**\n * Validate and return sanitized JSON.\n *\n * Note:\n * This function uses sanitized JsonStruct for validation\n * that applies stringify and then parse of a value provided\n * to ensure that there are no getters which can have side effects\n * that can cause security issues.\n *\n * @param value - JSON structure to be processed.\n * @returns Sanitized JSON structure.\n */\nexport function getSafeJson(value) {\n return create(value, JsonStruct);\n}\n/**\n * Get the size of a JSON value in bytes. This also validates the value.\n *\n * @param value - The JSON value to get the size of.\n * @returns The size of the JSON value in bytes.\n */\nexport function getJsonSize(value) {\n assertStruct(value, JsonStruct, 'Invalid JSON value');\n const json = JSON.stringify(value);\n return new TextEncoder().encode(json).byteLength;\n}\n/**\n * The string '2.0'.\n */\nexport const jsonrpc2 = '2.0';\nexport const JsonRpcVersionStruct = literal(jsonrpc2);\nexport const JsonRpcIdStruct = nullable(union([number(), string()]));\nexport const JsonRpcErrorStruct = object({\n code: integer(),\n message: string(),\n data: exactOptional(JsonStruct),\n stack: exactOptional(string()),\n});\nexport const JsonRpcParamsStruct = union([record(string(), JsonStruct), array(JsonStruct)]);\nexport const JsonRpcRequestStruct = object({\n id: JsonRpcIdStruct,\n jsonrpc: JsonRpcVersionStruct,\n method: string(),\n params: exactOptional(JsonRpcParamsStruct),\n});\nexport const JsonRpcNotificationStruct = object({\n jsonrpc: JsonRpcVersionStruct,\n method: string(),\n params: exactOptional(JsonRpcParamsStruct),\n});\n/**\n * Check if the given value is a valid {@link JsonRpcNotification} object.\n *\n * @param value - The value to check.\n * @returns Whether the given value is a valid {@link JsonRpcNotification}\n * object.\n */\nexport function isJsonRpcNotification(value) {\n return is(value, JsonRpcNotificationStruct);\n}\n/**\n * Assert that the given value is a valid {@link JsonRpcNotification} object.\n *\n * @param value - The value to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link JsonRpcNotification} object.\n */\nexport function assertIsJsonRpcNotification(value, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n assertStruct(value, JsonRpcNotificationStruct, 'Invalid JSON-RPC notification', ErrorWrapper);\n}\n/**\n * Check if the given value is a valid {@link JsonRpcRequest} object.\n *\n * @param value - The value to check.\n * @returns Whether the given value is a valid {@link JsonRpcRequest} object.\n */\nexport function isJsonRpcRequest(value) {\n return is(value, JsonRpcRequestStruct);\n}\n/**\n * Assert that the given value is a valid {@link JsonRpcRequest} object.\n *\n * @param value - The JSON-RPC request or notification to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link JsonRpcRequest} object.\n */\nexport function assertIsJsonRpcRequest(value, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n assertStruct(value, JsonRpcRequestStruct, 'Invalid JSON-RPC request', ErrorWrapper);\n}\nexport const PendingJsonRpcResponseStruct = superstructObject({\n id: JsonRpcIdStruct,\n jsonrpc: JsonRpcVersionStruct,\n result: optional(unknown()),\n error: optional(JsonRpcErrorStruct),\n});\nexport const JsonRpcSuccessStruct = object({\n id: JsonRpcIdStruct,\n jsonrpc: JsonRpcVersionStruct,\n result: JsonStruct,\n});\nexport const JsonRpcFailureStruct = object({\n id: JsonRpcIdStruct,\n jsonrpc: JsonRpcVersionStruct,\n error: JsonRpcErrorStruct,\n});\nexport const JsonRpcResponseStruct = union([\n JsonRpcSuccessStruct,\n JsonRpcFailureStruct,\n]);\n/**\n * Type guard to check whether specified JSON-RPC response is a\n * {@link PendingJsonRpcResponse}.\n *\n * @param response - The JSON-RPC response to check.\n * @returns Whether the specified JSON-RPC response is pending.\n */\nexport function isPendingJsonRpcResponse(response) {\n return is(response, PendingJsonRpcResponseStruct);\n}\n/**\n * Assert that the given value is a valid {@link PendingJsonRpcResponse} object.\n *\n * @param response - The JSON-RPC response to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link PendingJsonRpcResponse}\n * object.\n */\nexport function assertIsPendingJsonRpcResponse(response, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n assertStruct(response, PendingJsonRpcResponseStruct, 'Invalid pending JSON-RPC response', ErrorWrapper);\n}\n/**\n * Type guard to check if a value is a {@link JsonRpcResponse}.\n *\n * @param response - The object to check.\n * @returns Whether the object is a JsonRpcResponse.\n */\nexport function isJsonRpcResponse(response) {\n return is(response, JsonRpcResponseStruct);\n}\n/**\n * Assert that the given value is a valid {@link JsonRpcResponse} object.\n *\n * @param value - The value to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link JsonRpcResponse} object.\n */\nexport function assertIsJsonRpcResponse(value, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n assertStruct(value, JsonRpcResponseStruct, 'Invalid JSON-RPC response', ErrorWrapper);\n}\n/**\n * Check if the given value is a valid {@link JsonRpcSuccess} object.\n *\n * @param value - The value to check.\n * @returns Whether the given value is a valid {@link JsonRpcSuccess} object.\n */\nexport function isJsonRpcSuccess(value) {\n return is(value, JsonRpcSuccessStruct);\n}\n/**\n * Assert that the given value is a valid {@link JsonRpcSuccess} object.\n *\n * @param value - The value to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link JsonRpcSuccess} object.\n */\nexport function assertIsJsonRpcSuccess(value, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n assertStruct(value, JsonRpcSuccessStruct, 'Invalid JSON-RPC success response', ErrorWrapper);\n}\n/**\n * Check if the given value is a valid {@link JsonRpcFailure} object.\n *\n * @param value - The value to check.\n * @returns Whether the given value is a valid {@link JsonRpcFailure} object.\n */\nexport function isJsonRpcFailure(value) {\n return is(value, JsonRpcFailureStruct);\n}\n/**\n * Assert that the given value is a valid {@link JsonRpcFailure} object.\n *\n * @param value - The value to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link JsonRpcFailure} object.\n */\nexport function assertIsJsonRpcFailure(value, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n assertStruct(value, JsonRpcFailureStruct, 'Invalid JSON-RPC failure response', ErrorWrapper);\n}\n/**\n * Check if the given value is a valid {@link JsonRpcError} object.\n *\n * @param value - The value to check.\n * @returns Whether the given value is a valid {@link JsonRpcError} object.\n */\nexport function isJsonRpcError(value) {\n return is(value, JsonRpcErrorStruct);\n}\n/**\n * Assert that the given value is a valid {@link JsonRpcError} object.\n *\n * @param value - The value to check.\n * @param ErrorWrapper - The error class to throw if the assertion fails.\n * Defaults to {@link AssertionError}.\n * @throws If the given value is not a valid {@link JsonRpcError} object.\n */\nexport function assertIsJsonRpcError(value, \n// eslint-disable-next-line @typescript-eslint/naming-convention\nErrorWrapper) {\n assertStruct(value, JsonRpcErrorStruct, 'Invalid JSON-RPC error', ErrorWrapper);\n}\n/**\n * Gets a function for validating JSON-RPC request / response `id` values.\n *\n * By manipulating the options of this factory, you can control the behavior\n * of the resulting validator for some edge cases. This is useful because e.g.\n * `null` should sometimes but not always be permitted.\n *\n * Note that the empty string (`''`) is always permitted by the JSON-RPC\n * specification, but that kind of sucks and you may want to forbid it in some\n * instances anyway.\n *\n * For more details, see the\n * [JSON-RPC Specification](https://www.jsonrpc.org/specification).\n *\n * @param options - An options object.\n * @param options.permitEmptyString - Whether the empty string (i.e. `''`)\n * should be treated as a valid ID. Default: `true`\n * @param options.permitFractions - Whether fractional numbers (e.g. `1.2`)\n * should be treated as valid IDs. Default: `false`\n * @param options.permitNull - Whether `null` should be treated as a valid ID.\n * Default: `true`\n * @returns The JSON-RPC ID validator function.\n */\nexport function getJsonRpcIdValidator(options) {\n const { permitEmptyString, permitFractions, permitNull } = {\n permitEmptyString: true,\n permitFractions: false,\n permitNull: true,\n ...options,\n };\n /**\n * Type guard for {@link JsonRpcId}.\n *\n * @param id - The JSON-RPC ID value to check.\n * @returns Whether the given ID is valid per the options given to the\n * factory.\n */\n const isValidJsonRpcId = (id) => {\n return Boolean((typeof id === 'number' && (permitFractions || Number.isInteger(id))) ||\n (typeof id === 'string' && (permitEmptyString || id.length > 0)) ||\n (permitNull && id === null));\n };\n return isValidJsonRpcId;\n}\n//# sourceMappingURL=json.mjs.map","module.exports = stringify\nstringify.default = stringify\nstringify.stable = deterministicStringify\nstringify.stableStringify = deterministicStringify\n\nvar LIMIT_REPLACE_NODE = '[...]'\nvar CIRCULAR_REPLACE_NODE = '[Circular]'\n\nvar arr = []\nvar replacerStack = []\n\nfunction defaultOptions () {\n return {\n depthLimit: Number.MAX_SAFE_INTEGER,\n edgesLimit: Number.MAX_SAFE_INTEGER\n }\n}\n\n// Regular stringify\nfunction stringify (obj, replacer, spacer, options) {\n if (typeof options === 'undefined') {\n options = defaultOptions()\n }\n\n decirc(obj, '', 0, [], undefined, 0, options)\n var res\n try {\n if (replacerStack.length === 0) {\n res = JSON.stringify(obj, replacer, spacer)\n } else {\n res = JSON.stringify(obj, replaceGetterValues(replacer), spacer)\n }\n } catch (_) {\n return JSON.stringify('[unable to serialize, circular reference is too complex to analyze]')\n } finally {\n while (arr.length !== 0) {\n var part = arr.pop()\n if (part.length === 4) {\n Object.defineProperty(part[0], part[1], part[3])\n } else {\n part[0][part[1]] = part[2]\n }\n }\n }\n return res\n}\n\nfunction setReplace (replace, val, k, parent) {\n var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k)\n if (propertyDescriptor.get !== undefined) {\n if (propertyDescriptor.configurable) {\n Object.defineProperty(parent, k, { value: replace })\n arr.push([parent, k, val, propertyDescriptor])\n } else {\n replacerStack.push([val, k, replace])\n }\n } else {\n parent[k] = replace\n arr.push([parent, k, val])\n }\n}\n\nfunction decirc (val, k, edgeIndex, stack, parent, depth, options) {\n depth += 1\n var i\n if (typeof val === 'object' && val !== null) {\n for (i = 0; i < stack.length; i++) {\n if (stack[i] === val) {\n setReplace(CIRCULAR_REPLACE_NODE, val, k, parent)\n return\n }\n }\n\n if (\n typeof options.depthLimit !== 'undefined' &&\n depth > options.depthLimit\n ) {\n setReplace(LIMIT_REPLACE_NODE, val, k, parent)\n return\n }\n\n if (\n typeof options.edgesLimit !== 'undefined' &&\n edgeIndex + 1 > options.edgesLimit\n ) {\n setReplace(LIMIT_REPLACE_NODE, val, k, parent)\n return\n }\n\n stack.push(val)\n // Optimize for Arrays. Big arrays could kill the performance otherwise!\n if (Array.isArray(val)) {\n for (i = 0; i < val.length; i++) {\n decirc(val[i], i, i, stack, val, depth, options)\n }\n } else {\n var keys = Object.keys(val)\n for (i = 0; i < keys.length; i++) {\n var key = keys[i]\n decirc(val[key], key, i, stack, val, depth, options)\n }\n }\n stack.pop()\n }\n}\n\n// Stable-stringify\nfunction compareFunction (a, b) {\n if (a < b) {\n return -1\n }\n if (a > b) {\n return 1\n }\n return 0\n}\n\nfunction deterministicStringify (obj, replacer, spacer, options) {\n if (typeof options === 'undefined') {\n options = defaultOptions()\n }\n\n var tmp = deterministicDecirc(obj, '', 0, [], undefined, 0, options) || obj\n var res\n try {\n if (replacerStack.length === 0) {\n res = JSON.stringify(tmp, replacer, spacer)\n } else {\n res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer)\n }\n } catch (_) {\n return JSON.stringify('[unable to serialize, circular reference is too complex to analyze]')\n } finally {\n // Ensure that we restore the object as it was.\n while (arr.length !== 0) {\n var part = arr.pop()\n if (part.length === 4) {\n Object.defineProperty(part[0], part[1], part[3])\n } else {\n part[0][part[1]] = part[2]\n }\n }\n }\n return res\n}\n\nfunction deterministicDecirc (val, k, edgeIndex, stack, parent, depth, options) {\n depth += 1\n var i\n if (typeof val === 'object' && val !== null) {\n for (i = 0; i < stack.length; i++) {\n if (stack[i] === val) {\n setReplace(CIRCULAR_REPLACE_NODE, val, k, parent)\n return\n }\n }\n try {\n if (typeof val.toJSON === 'function') {\n return\n }\n } catch (_) {\n return\n }\n\n if (\n typeof options.depthLimit !== 'undefined' &&\n depth > options.depthLimit\n ) {\n setReplace(LIMIT_REPLACE_NODE, val, k, parent)\n return\n }\n\n if (\n typeof options.edgesLimit !== 'undefined' &&\n edgeIndex + 1 > options.edgesLimit\n ) {\n setReplace(LIMIT_REPLACE_NODE, val, k, parent)\n return\n }\n\n stack.push(val)\n // Optimize for Arrays. Big arrays could kill the performance otherwise!\n if (Array.isArray(val)) {\n for (i = 0; i < val.length; i++) {\n deterministicDecirc(val[i], i, i, stack, val, depth, options)\n }\n } else {\n // Create a temporary object in the required way\n var tmp = {}\n var keys = Object.keys(val).sort(compareFunction)\n for (i = 0; i < keys.length; i++) {\n var key = keys[i]\n deterministicDecirc(val[key], key, i, stack, val, depth, options)\n tmp[key] = val[key]\n }\n if (typeof parent !== 'undefined') {\n arr.push([parent, k, val])\n parent[k] = tmp\n } else {\n return tmp\n }\n }\n stack.pop()\n }\n}\n\n// wraps replacer function to handle values we couldn't replace\n// and mark them as replaced value\nfunction replaceGetterValues (replacer) {\n replacer =\n typeof replacer !== 'undefined'\n ? replacer\n : function (k, v) {\n return v\n }\n return function (key, val) {\n if (replacerStack.length > 0) {\n for (var i = 0; i < replacerStack.length; i++) {\n var part = replacerStack[i]\n if (part[1] === key && part[0] === val) {\n val = part[2]\n replacerStack.splice(i, 1)\n break\n }\n }\n }\n return replacer.call(this, key, val)\n }\n}\n","export const errorCodes = {\n rpc: {\n invalidInput: -32000,\n resourceNotFound: -32001,\n resourceUnavailable: -32002,\n transactionRejected: -32003,\n methodNotSupported: -32004,\n limitExceeded: -32005,\n parse: -32700,\n invalidRequest: -32600,\n methodNotFound: -32601,\n invalidParams: -32602,\n internal: -32603,\n },\n provider: {\n userRejectedRequest: 4001,\n unauthorized: 4100,\n unsupportedMethod: 4200,\n disconnected: 4900,\n chainDisconnected: 4901,\n },\n};\n/* eslint-disable @typescript-eslint/naming-convention */\nexport const errorValues = {\n '-32700': {\n standard: 'JSON RPC 2.0',\n message: 'Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.',\n },\n '-32600': {\n standard: 'JSON RPC 2.0',\n message: 'The JSON sent is not a valid Request object.',\n },\n '-32601': {\n standard: 'JSON RPC 2.0',\n message: 'The method does not exist / is not available.',\n },\n '-32602': {\n standard: 'JSON RPC 2.0',\n message: 'Invalid method parameter(s).',\n },\n '-32603': {\n standard: 'JSON RPC 2.0',\n message: 'Internal JSON-RPC error.',\n },\n '-32000': {\n standard: 'EIP-1474',\n message: 'Invalid input.',\n },\n '-32001': {\n standard: 'EIP-1474',\n message: 'Resource not found.',\n },\n '-32002': {\n standard: 'EIP-1474',\n message: 'Resource unavailable.',\n },\n '-32003': {\n standard: 'EIP-1474',\n message: 'Transaction rejected.',\n },\n '-32004': {\n standard: 'EIP-1474',\n message: 'Method not supported.',\n },\n '-32005': {\n standard: 'EIP-1474',\n message: 'Request limit exceeded.',\n },\n '4001': {\n standard: 'EIP-1193',\n message: 'User rejected the request.',\n },\n '4100': {\n standard: 'EIP-1193',\n message: 'The requested account and/or method has not been authorized by the user.',\n },\n '4200': {\n standard: 'EIP-1193',\n message: 'The requested method is not supported by this Ethereum provider.',\n },\n '4900': {\n standard: 'EIP-1193',\n message: 'The provider is disconnected from all chains.',\n },\n '4901': {\n standard: 'EIP-1193',\n message: 'The provider is disconnected from the specified chain.',\n },\n};\n/* eslint-enable @typescript-eslint/naming-convention */\n//# sourceMappingURL=error-constants.mjs.map","import { hasProperty, isValidJson, isObject, isJsonRpcError } from \"@metamask/utils\";\nimport { errorCodes, errorValues } from \"./error-constants.mjs\";\nconst FALLBACK_ERROR_CODE = errorCodes.rpc.internal;\nconst FALLBACK_MESSAGE = 'Unspecified error message. This is a bug, please report it.';\nconst FALLBACK_ERROR = {\n code: FALLBACK_ERROR_CODE,\n message: getMessageFromCode(FALLBACK_ERROR_CODE),\n};\nexport const JSON_RPC_SERVER_ERROR_MESSAGE = 'Unspecified server error.';\n/**\n * Gets the message for a given code, or a fallback message if the code has\n * no corresponding message.\n *\n * @param code - The error code.\n * @param fallbackMessage - The fallback message to use if the code has no\n * corresponding message.\n * @returns The message for the given code, or the fallback message if the code\n * has no corresponding message.\n */\nexport function getMessageFromCode(code, fallbackMessage = FALLBACK_MESSAGE) {\n if (isValidCode(code)) {\n const codeString = code.toString();\n if (hasProperty(errorValues, codeString)) {\n return errorValues[codeString].message;\n }\n if (isJsonRpcServerError(code)) {\n return JSON_RPC_SERVER_ERROR_MESSAGE;\n }\n }\n return fallbackMessage;\n}\n/**\n * Returns whether the given code is valid.\n * A code is valid if it is an integer.\n *\n * @param code - The error code.\n * @returns Whether the given code is valid.\n */\nexport function isValidCode(code) {\n return Number.isInteger(code);\n}\n/**\n * Serializes the given error to an Ethereum JSON RPC-compatible error object.\n * If the given error is not fully compatible, it will be preserved on the\n * returned object's data.cause property.\n *\n * @param error - The error to serialize.\n * @param options - Options bag.\n * @param options.fallbackError - The error to return if the given error is\n * not compatible. Should be a JSON-serializable value.\n * @param options.shouldIncludeStack - Whether to include the error's stack\n * on the returned object.\n * @param options.shouldPreserveMessage - Whether to preserve the error's\n * message if the fallback error is used.\n * @returns The serialized error.\n */\nexport function serializeError(error, { fallbackError = FALLBACK_ERROR, shouldIncludeStack = true, shouldPreserveMessage = true, } = {}) {\n if (!isJsonRpcError(fallbackError)) {\n throw new Error('Must provide fallback error with integer number code and string message.');\n }\n const serialized = buildError(error, fallbackError, shouldPreserveMessage);\n if (!shouldIncludeStack) {\n delete serialized.stack;\n }\n return serialized;\n}\n/**\n * Construct a JSON-serializable object given an error and a JSON-serializable `fallbackError`\n *\n * @param error - The error in question.\n * @param fallbackError - A JSON-serializable fallback error.\n * @param shouldPreserveMessage - Whether to preserve the error's message if the fallback\n * error is used.\n * @returns A JSON-serializable error object.\n */\nfunction buildError(error, fallbackError, shouldPreserveMessage) {\n // If an error specifies a `serialize` function, we call it and return the result.\n if (error &&\n typeof error === 'object' &&\n 'serialize' in error &&\n typeof error.serialize === 'function') {\n return error.serialize();\n }\n if (isJsonRpcError(error)) {\n return error;\n }\n const originalMessage = getOriginalMessage(error);\n // If the error does not match the JsonRpcError type, use the fallback error, but try to include the original error as `cause`.\n const cause = serializeCause(error);\n const fallbackWithCause = {\n ...fallbackError,\n ...(shouldPreserveMessage &&\n originalMessage && { message: originalMessage }),\n data: { cause },\n };\n return fallbackWithCause;\n}\n/**\n * Attempts to extract the original `message` property from an error value of uncertain shape.\n *\n * @param error - The error in question.\n * @returns The original message, if it exists and is a non-empty string.\n */\nfunction getOriginalMessage(error) {\n if (isObject(error) &&\n hasProperty(error, 'message') &&\n typeof error.message === 'string' &&\n error.message.length > 0) {\n return error.message;\n }\n return undefined;\n}\n/**\n * Check if the given code is a valid JSON-RPC server error code.\n *\n * @param code - The error code.\n * @returns Whether the given code is a valid JSON-RPC server error code.\n */\nfunction isJsonRpcServerError(code) {\n return code >= -32099 && code <= -32000;\n}\n/**\n * Serializes an unknown error to be used as the `cause` in a fallback error.\n *\n * @param error - The unknown error.\n * @returns A JSON-serializable object containing as much information about the original error as possible.\n */\nexport function serializeCause(error) {\n if (Array.isArray(error)) {\n return error.map((entry) => {\n if (isValidJson(entry)) {\n return entry;\n }\n else if (isObject(entry)) {\n return serializeObject(entry);\n }\n return null;\n });\n }\n else if (isObject(error)) {\n return serializeObject(error);\n }\n if (isValidJson(error)) {\n return error;\n }\n return null;\n}\n/**\n * Extracts all JSON-serializable properties from an object.\n *\n * @param object - The object in question.\n * @returns An object containing all the JSON-serializable properties.\n */\nfunction serializeObject(object) {\n return Object.getOwnPropertyNames(object).reduce((acc, key) => {\n const value = object[key];\n if (isValidJson(value)) {\n acc[key] = value;\n }\n return acc;\n }, {});\n}\n/**\n * Returns true if supplied error data has a usable `cause` property; false otherwise.\n *\n * @param data - Optional data to validate.\n * @returns Whether cause property is present and an object.\n */\nexport function dataHasCause(data) {\n return isObject(data) && hasProperty(data, 'cause') && isObject(data.cause);\n}\n//# sourceMappingURL=utils.mjs.map","function $importDefault(module) {\n if (module?.__esModule) {\n return module.default;\n }\n return module;\n}\nimport { hasProperty, isPlainObject } from \"@metamask/utils\";\nimport $safeStringify from \"fast-safe-stringify\";\nconst safeStringify = $importDefault($safeStringify);\nimport { dataHasCause, serializeCause } from \"./utils.mjs\";\n/**\n * Error subclass implementing JSON RPC 2.0 errors and Ethereum RPC errors\n * per EIP-1474.\n *\n * Permits any integer error code.\n */\nexport class JsonRpcError extends Error {\n constructor(code, message, data) {\n if (!Number.isInteger(code)) {\n throw new Error('\"code\" must be an integer.');\n }\n if (!message || typeof message !== 'string') {\n throw new Error('\"message\" must be a non-empty string.');\n }\n if (dataHasCause(data)) {\n // @ts-expect-error - Error class does accept options argument depending on runtime, but types are mapping to oldest supported\n super(message, { cause: data.cause });\n // Browser backwards-compatibility fallback\n if (!hasProperty(this, 'cause')) {\n Object.assign(this, { cause: data.cause });\n }\n }\n else {\n super(message);\n }\n if (data !== undefined) {\n this.data = data;\n }\n this.code = code;\n }\n /**\n * Get the error as JSON-serializable object.\n *\n * @returns A plain object with all public class properties.\n */\n serialize() {\n const serialized = {\n code: this.code,\n message: this.message,\n };\n if (this.data !== undefined) {\n // `this.data` is not guaranteed to be a plain object, but this simplifies\n // the type guard below. We can safely cast it because we know it's a\n // JSON-serializable value.\n serialized.data = this.data;\n if (isPlainObject(this.data)) {\n serialized.data.cause = serializeCause(this.data.cause);\n }\n }\n if (this.stack) {\n serialized.stack = this.stack;\n }\n return serialized;\n }\n /**\n * Get a string representation of the serialized error, omitting any circular\n * references.\n *\n * @returns A string representation of the serialized error.\n */\n toString() {\n return safeStringify(this.serialize(), stringifyReplacer, 2);\n }\n}\n/**\n * Error subclass implementing Ethereum Provider errors per EIP-1193.\n * Permits integer error codes in the [ 1000 <= 4999 ] range.\n */\nexport class EthereumProviderError extends JsonRpcError {\n /**\n * Create an Ethereum Provider JSON-RPC error.\n *\n * @param code - The JSON-RPC error code. Must be an integer in the\n * `1000 <= n <= 4999` range.\n * @param message - The JSON-RPC error message.\n * @param data - Optional data to include in the error.\n */\n constructor(code, message, data) {\n if (!isValidEthProviderCode(code)) {\n throw new Error('\"code\" must be an integer such that: 1000 <= code <= 4999');\n }\n super(code, message, data);\n }\n}\n/**\n * Check if the given code is a valid JSON-RPC error code.\n *\n * @param code - The code to check.\n * @returns Whether the code is valid.\n */\nfunction isValidEthProviderCode(code) {\n return Number.isInteger(code) && code >= 1000 && code <= 4999;\n}\n/**\n * A JSON replacer function that omits circular references.\n *\n * @param _ - The key being replaced.\n * @param value - The value being replaced.\n * @returns The value to use in place of the original value.\n */\nfunction stringifyReplacer(_, value) {\n if (value === '[Circular]') {\n return undefined;\n }\n return value;\n}\n//# sourceMappingURL=classes.mjs.map","//#region src/level.ts\nconst logLevels = [\n\t\"trace\",\n\t\"debug\",\n\t\"info\",\n\t\"warning\",\n\t\"error\",\n\t\"fatal\"\n];\n/**\n* Lists all available log levels with the order of their severity.\n* The `\"trace\"` level goes first, and the `\"fatal\"` level goes last.\n* @returns A new copy of the array of log levels.\n* @since 1.0.0\n*/\nfunction getLogLevels() {\n\treturn [...logLevels];\n}\n/**\n* Parses a log level from a string.\n*\n* @param level The log level as a string. This is case-insensitive.\n* @returns The log level.\n* @throws {TypeError} If the log level is invalid.\n*/\nfunction parseLogLevel(level) {\n\tlevel = level.toLowerCase();\n\tswitch (level) {\n\t\tcase \"trace\":\n\t\tcase \"debug\":\n\t\tcase \"info\":\n\t\tcase \"warning\":\n\t\tcase \"error\":\n\t\tcase \"fatal\": return level;\n\t\tdefault: throw new TypeError(`Invalid log level: ${level}.`);\n\t}\n}\n/**\n* Checks if a string is a valid log level. This function can be used as\n* as a type guard to narrow the type of a string to a {@link LogLevel}.\n*\n* @param level The log level as a string. This is case-sensitive.\n* @returns `true` if the string is a valid log level.\n*/\nfunction isLogLevel(level) {\n\tswitch (level) {\n\t\tcase \"trace\":\n\t\tcase \"debug\":\n\t\tcase \"info\":\n\t\tcase \"warning\":\n\t\tcase \"error\":\n\t\tcase \"fatal\": return true;\n\t\tdefault: return false;\n\t}\n}\n/**\n* Compares two log levels.\n* @param a The first log level.\n* @param b The second log level.\n* @returns A negative number if `a` is less than `b`, a positive number if `a`\n* is greater than `b`, or zero if they are equal.\n* @since 0.8.0\n*/\nfunction compareLogLevel(a, b) {\n\tconst aIndex = logLevels.indexOf(a);\n\tif (aIndex < 0) throw new TypeError(`Invalid log level: ${JSON.stringify(a)}.`);\n\tconst bIndex = logLevels.indexOf(b);\n\tif (bIndex < 0) throw new TypeError(`Invalid log level: ${JSON.stringify(b)}.`);\n\treturn aIndex - bIndex;\n}\n\n//#endregion\nexport { compareLogLevel, getLogLevels, isLogLevel, parseLogLevel };\n//# sourceMappingURL=level.js.map","import { asyncDisposeSymbol, disposeSymbol } from \"./disposable.js\";\nimport { toFilter } from \"./filter.js\";\nimport { compareLogLevel, isLogLevel } from \"./level.js\";\n\n//#region src/scoped-config.ts\nconst scopedConfigSymbol = Symbol.for(\"logtape.scopedConfig\");\nconst defaultScopedLogger = {\n\tfilters: [],\n\tfilterIds: [],\n\tlowestLevel: \"trace\",\n\tparentSinks: \"inherit\",\n\tsinks: [],\n\tsinkIds: [],\n\tcaptureSourceLocation: void 0\n};\nconst noFilters = [];\nfunction compileScopedConfig(config, allowAsync, createError) {\n\tif (!isObjectLike(config)) throw createError(\"Configuration must be an object.\");\n\tif (!isObjectLike(config.sinks)) throw createError(\"Configuration must include a sinks object.\");\n\tif (!Array.isArray(config.loggers)) throw createError(\"Configuration must include a loggers array.\");\n\tif (config.filters !== void 0 && !isObjectLike(config.filters)) throw createError(\"Configuration filters must be an object.\");\n\tconst nodes = /* @__PURE__ */ new Map();\n\tconst configuredCategories = /* @__PURE__ */ new Set();\n\tlet capturesSourceLocation = false;\n\tfor (const logger of config.loggers) {\n\t\tif (!isObjectLike(logger)) throw createError(\"Logger configuration must be an object.\");\n\t\tconst loggerConfig = logger;\n\t\tconst category = normalizeCategory(loggerConfig.category, createError);\n\t\tif (loggerConfig.sinks !== void 0 && !Array.isArray(loggerConfig.sinks)) throw createError(\"Logger sinks must be an array.\");\n\t\tif (loggerConfig.filters !== void 0 && !Array.isArray(loggerConfig.filters)) throw createError(\"Logger filters must be an array.\");\n\t\tif (loggerConfig.parentSinks !== void 0 && loggerConfig.parentSinks !== \"inherit\" && loggerConfig.parentSinks !== \"override\" && loggerConfig.parentSinks !== \"forward\") throw createError(\"Logger parentSinks must be \\\"inherit\\\", \\\"override\\\", or \\\"forward\\\".\");\n\t\tif (loggerConfig.lowestLevel !== void 0 && loggerConfig.lowestLevel !== null && !isLogLevel(loggerConfig.lowestLevel)) throw createError(\"Logger lowestLevel must be a log level or null.\");\n\t\tif (loggerConfig.captureSourceLocation !== void 0 && typeof loggerConfig.captureSourceLocation !== \"boolean\") throw createError(\"Logger captureSourceLocation must be a boolean.\");\n\t\tconst key = categoryKey(category);\n\t\tif (configuredCategories.has(key)) throw createError(`Duplicate logger configuration for category: ${key}. Each category can only be configured once.`);\n\t\tconfiguredCategories.add(key);\n\t\tconst sinks$1 = [];\n\t\tconst sinkIds = loggerConfig.sinks ?? [];\n\t\tfor (const sinkId of sinkIds) {\n\t\t\tconst sink = config.sinks[sinkId];\n\t\t\tif (!sink) throw createError(`Sink not found: ${sinkId}.`);\n\t\t\tif (typeof sink !== \"function\") throw createError(`Sink must be a function: ${sinkId}.`);\n\t\t\tsinks$1.push(sink);\n\t\t}\n\t\tconst filters = [];\n\t\tconst filterIds = loggerConfig.filters ?? [];\n\t\tfor (const filterId of filterIds) {\n\t\t\tconst filter = config.filters?.[filterId];\n\t\t\tif (filter === void 0) throw createError(`Filter not found: ${filterId}.`);\n\t\t\tif (!isFilterLike(filter)) throw createError(`Filter must be a function, log level, or null: ${filterId}.`);\n\t\t\tfilters.push(toFilter(filter));\n\t\t}\n\t\tnodes.set(key, {\n\t\t\tfilters,\n\t\t\tfilterIds: [...filterIds],\n\t\t\tlowestLevel: loggerConfig.lowestLevel === void 0 ? \"trace\" : loggerConfig.lowestLevel,\n\t\t\tparentSinks: loggerConfig.parentSinks ?? \"inherit\",\n\t\t\tsinks: sinks$1,\n\t\t\tsinkIds: [...sinkIds],\n\t\t\tcaptureSourceLocation: loggerConfig.captureSourceLocation\n\t\t});\n\t\tif (loggerConfig.captureSourceLocation === true) capturesSourceLocation = true;\n\t}\n\tconst syncFilters = /* @__PURE__ */ new Set();\n\tconst asyncFilters = /* @__PURE__ */ new Set();\n\tconst syncSinks = /* @__PURE__ */ new Set();\n\tconst asyncSinks = /* @__PURE__ */ new Set();\n\tconst sinks = /* @__PURE__ */ new Set();\n\tfor (const sink of Object.values(config.sinks)) {\n\t\tif (!isObjectLike(sink)) continue;\n\t\tsinks.add(sink);\n\t\tif (asyncDisposeSymbol in sink) {\n\t\t\tif (!allowAsync) throw createError(\"Async disposables cannot be used with withConfigSync().\");\n\t\t\tasyncSinks.add(sink);\n\t\t} else if (disposeSymbol in sink) syncSinks.add(sink);\n\t}\n\tfor (const filter of Object.values(config.filters ?? {})) {\n\t\tif (!isObjectLike(filter)) continue;\n\t\tif (asyncDisposeSymbol in filter) {\n\t\t\tif (!allowAsync) throw createError(\"Async disposables cannot be used with withConfigSync().\");\n\t\t\tasyncFilters.add(filter);\n\t\t\tasyncSinks.delete(filter);\n\t\t} else if (disposeSymbol in filter) {\n\t\t\tsyncFilters.add(filter);\n\t\t\tsyncSinks.delete(filter);\n\t\t}\n\t}\n\treturn {\n\t\tasyncFilters,\n\t\tasyncSinks,\n\t\tcapturesSourceLocation,\n\t\tdispatchCache: /* @__PURE__ */ new Map(),\n\t\tdisposed: false,\n\t\tfilterCache: /* @__PURE__ */ new Map(),\n\t\tnodes,\n\t\tparent: void 0,\n\t\tsinks,\n\t\tsourceLocationCaptureCache: /* @__PURE__ */ new Map(),\n\t\tsyncFilters,\n\t\tsyncSinks\n\t};\n}\nfunction getCurrentScopedConfig(contextLocalStorage) {\n\tconst store = contextLocalStorage?.getStore();\n\tconst scopedConfig = store?.[scopedConfigSymbol];\n\treturn isCompiledScopedConfig(scopedConfig) ? getActiveScopedConfig(scopedConfig) : void 0;\n}\nfunction runWithScopedConfig(contextLocalStorage, scopedConfig, callback) {\n\tconst parentStore = contextLocalStorage.getStore() ?? {};\n\tscopedConfig.parent = getCurrentScopedConfig(contextLocalStorage);\n\treturn contextLocalStorage.run({\n\t\t...parentStore,\n\t\t[scopedConfigSymbol]: scopedConfig\n\t}, callback);\n}\n/**\n* Gets the compiled logger configured for exactly the given category in a\n* scoped configuration, without touching its dispatch or filter caches.\n*/\nfunction getScopedLogger(scopedConfig, category) {\n\treturn scopedConfig.nodes.get(categoryKey(category));\n}\nfunction scopedConfigHasSink(scopedConfig, category, level) {\n\treturn getScopedSinkDispatchPlan(scopedConfig, category, level).kind !== \"none\";\n}\n/**\n* Resolves whether source locations are captured for the given category\n* under the scoped configuration: the setting of the nearest configured\n* category, from the category itself up to the root, wins.\n*/\nfunction scopedConfigCapturesSourceLocation(scopedConfig, category) {\n\tif (!scopedConfig.capturesSourceLocation) return false;\n\tconst key = categoryKey(category);\n\tlet captures = scopedConfig.sourceLocationCaptureCache.get(key);\n\tif (captures == null) {\n\t\tcaptures = false;\n\t\tfor (let length = category.length; length >= 0; length--) {\n\t\t\tconst logger = scopedConfig.nodes.get(categoryKey(category.slice(0, length)));\n\t\t\tif (logger?.captureSourceLocation == null) continue;\n\t\t\tcaptures = logger.captureSourceLocation;\n\t\t\tbreak;\n\t\t}\n\t\tscopedConfig.sourceLocationCaptureCache.set(key, captures);\n\t}\n\treturn captures;\n}\nfunction emitWithScopedConfig(scopedConfig, record, bypassSinks, emitToSink) {\n\tconst plan = getScopedSinkDispatchPlan(scopedConfig, record.category, record.level);\n\tif (plan.kind === \"none\") return;\n\tif (!filterScopedRecord(scopedConfig, record.category, record)) return;\n\tif (plan.kind === \"one\") {\n\t\tif (!bypassSinks?.has(plan.sink)) emitToSink(plan.sink, bypassSinks);\n\t\treturn;\n\t}\n\tfor (const sink of plan.sinks) {\n\t\tif (bypassSinks?.has(sink)) continue;\n\t\temitToSink(sink, bypassSinks);\n\t}\n}\nasync function disposeScopedConfig(scopedConfig, retainedDisposables) {\n\tconst parentDisposables = getParentScopedDisposables(scopedConfig, retainedDisposables);\n\tscopedConfig.disposed = true;\n\tconst errors = [];\n\ttry {\n\t\tdisposeSyncDisposables(scopedConfig.syncFilters, parentDisposables);\n\t} catch (error) {\n\t\terrors.push(error);\n\t}\n\ttry {\n\t\tawait disposeAsyncDisposables(scopedConfig.asyncFilters, parentDisposables);\n\t} catch (error) {\n\t\terrors.push(error);\n\t}\n\ttry {\n\t\tdisposeSyncDisposables(scopedConfig.syncSinks, parentDisposables);\n\t} catch (error) {\n\t\terrors.push(error);\n\t}\n\ttry {\n\t\tawait disposeAsyncDisposables(scopedConfig.asyncSinks, parentDisposables);\n\t} catch (error) {\n\t\terrors.push(error);\n\t}\n\tthrowDisposeErrors(errors);\n}\nfunction disposeScopedConfigSync(scopedConfig, retainedDisposables) {\n\tconst parentDisposables = getParentScopedDisposables(scopedConfig, retainedDisposables);\n\tscopedConfig.disposed = true;\n\tconst errors = [];\n\ttry {\n\t\tdisposeSyncDisposables(scopedConfig.syncFilters, parentDisposables);\n\t} catch (error) {\n\t\terrors.push(error);\n\t}\n\ttry {\n\t\tdisposeSyncDisposables(scopedConfig.syncSinks, parentDisposables);\n\t} catch (error) {\n\t\terrors.push(error);\n\t}\n\tthrowDisposeErrors(errors);\n}\nfunction throwCombinedErrors(primary, secondary) {\n\tthrow new AggregateError(flattenErrors(primary, secondary), \"Multiple errors occurred while running LogTape scoped configuration.\");\n}\nfunction isCompiledScopedConfig(value) {\n\treturn value != null && typeof value === \"object\" && \"nodes\" in value;\n}\nfunction isObjectLike(value) {\n\treturn value != null && (typeof value === \"object\" || typeof value === \"function\");\n}\nfunction isFilterLike(value) {\n\treturn value == null || typeof value === \"function\" || typeof value === \"string\" && isLogLevel(value);\n}\nfunction getActiveScopedConfig(scopedConfig) {\n\tlet activeConfig = scopedConfig;\n\twhile (activeConfig?.disposed) activeConfig = activeConfig.parent;\n\treturn activeConfig;\n}\nfunction getParentScopedDisposables(scopedConfig, extraRetained) {\n\tconst disposables = new Set(extraRetained);\n\tlet parent = scopedConfig.parent;\n\twhile (parent != null) {\n\t\tconst activeParent = getActiveScopedConfig(parent);\n\t\tif (activeParent == null) break;\n\t\taddScopedDisposables(disposables, activeParent);\n\t\tparent = activeParent.parent;\n\t}\n\treturn disposables;\n}\nfunction addScopedDisposables(disposables, scopedConfig) {\n\tfor (const disposable of scopedConfig.syncFilters) disposables.add(disposable);\n\tfor (const disposable of scopedConfig.asyncFilters) disposables.add(disposable);\n\tfor (const disposable of scopedConfig.syncSinks) disposables.add(disposable);\n\tfor (const disposable of scopedConfig.asyncSinks) disposables.add(disposable);\n}\nfunction normalizeCategory(category, createError) {\n\tif (typeof category === \"string\") return [category];\n\tif (!Array.isArray(category)) throw createError(\"Logger category must be a string or array of strings.\");\n\tif (category.some((part) => typeof part !== \"string\")) throw createError(\"Logger category must only contain strings.\");\n\treturn [...category];\n}\nfunction categoryKey(category) {\n\treturn JSON.stringify(category);\n}\nfunction getScopedSinkDispatchPlan(scopedConfig, category, level) {\n\tconst cacheKey = `${categoryKey(category)}:${level}`;\n\tlet plan = scopedConfig.dispatchCache.get(cacheKey);\n\tif (plan == null) {\n\t\tplan = getScopedSinkDispatchPlanForPrefix(scopedConfig, category, category.length, level);\n\t\tscopedConfig.dispatchCache.set(cacheKey, plan);\n\t}\n\treturn plan;\n}\nfunction getScopedSinkDispatchPlanForPrefix(scopedConfig, category, length, level) {\n\tconst prefix = category.slice(0, length);\n\tconst logger = scopedConfig.nodes.get(categoryKey(prefix)) ?? defaultScopedLogger;\n\tif (logger.lowestLevel === null || compareLogLevel(level, logger.lowestLevel) < 0) return { kind: \"none\" };\n\tconst parentPlan = length > 0 && logger.parentSinks === \"inherit\" ? getScopedSinkDispatchPlanForPrefix(scopedConfig, category, length - 1, level) : length > 0 && logger.parentSinks === \"forward\" ? wrapScopedSinks(collectScopedForwardSinks(scopedConfig, category, length - 1)) : { kind: \"none\" };\n\tlet firstSink;\n\tlet sinks;\n\tconst appendSink = (sink) => {\n\t\tif (sinks != null) sinks.push(sink);\n\t\telse if (firstSink == null) firstSink = sink;\n\t\telse sinks = [firstSink, sink];\n\t};\n\tif (parentPlan.kind === \"one\") appendSink(parentPlan.sink);\n\telse if (parentPlan.kind === \"many\") for (const sink of parentPlan.sinks) appendSink(sink);\n\tfor (const sink of logger.sinks) appendSink(sink);\n\tif (sinks != null) return {\n\t\tkind: \"many\",\n\t\tsinks\n\t};\n\tif (firstSink != null) return {\n\t\tkind: \"one\",\n\t\tsink: firstSink\n\t};\n\treturn { kind: \"none\" };\n}\nfunction collectScopedForwardSinks(scopedConfig, category, length) {\n\tconst logger = scopedConfig.nodes.get(categoryKey(category.slice(0, length))) ?? defaultScopedLogger;\n\tconst parentSinks = length > 0 && logger.parentSinks !== \"override\" ? collectScopedForwardSinks(scopedConfig, category, length - 1) : [];\n\tif (logger.sinks.length < 1) return parentSinks;\n\tif (parentSinks.length < 1) return logger.sinks;\n\treturn [...parentSinks, ...logger.sinks];\n}\nfunction wrapScopedSinks(sinks) {\n\tif (sinks.length < 1) return { kind: \"none\" };\n\tif (sinks.length === 1) return {\n\t\tkind: \"one\",\n\t\tsink: sinks[0]\n\t};\n\treturn {\n\t\tkind: \"many\",\n\t\tsinks\n\t};\n}\nfunction filterScopedRecord(scopedConfig, category, record) {\n\tconst key = categoryKey(category);\n\tlet filters = scopedConfig.filterCache.get(key);\n\tif (filters == null) {\n\t\tfilters = getScopedFilters(scopedConfig, category);\n\t\tscopedConfig.filterCache.set(key, filters);\n\t}\n\treturn filters.every((filter) => filter(record));\n}\nfunction getScopedFilters(scopedConfig, category) {\n\tfor (let length = category.length; length >= 0; length--) {\n\t\tconst logger = scopedConfig.nodes.get(categoryKey(category.slice(0, length)));\n\t\tif (logger == null || logger.filters.length < 1) continue;\n\t\treturn logger.filters;\n\t}\n\treturn noFilters;\n}\nfunction disposeSyncDisposables(disposables, retainedDisposables) {\n\tconst disposableList = filterRetainedDisposables(disposables, retainedDisposables);\n\tconst errors = [];\n\ttry {\n\t\tfor (const disposable of disposableList) try {\n\t\t\tdisposable[disposeSymbol]();\n\t\t} catch (error) {\n\t\t\terrors.push(error);\n\t\t}\n\t} finally {\n\t\tdisposables.clear();\n\t}\n\tthrowDisposeErrors(errors);\n}\nasync function disposeAsyncDisposables(disposables, retainedDisposables) {\n\tconst disposableList = filterRetainedDisposables(disposables, retainedDisposables);\n\tfor (const disposable of disposableList) disposables.delete(disposable);\n\ttry {\n\t\tconst results = await Promise.allSettled(disposableList.map((disposable) => Promise.resolve().then(() => disposable[asyncDisposeSymbol]())));\n\t\tthrowDisposeErrors(results.filter((result) => result.status === \"rejected\").map((result) => result.reason));\n\t} finally {\n\t\tdisposables.clear();\n\t}\n}\nfunction filterRetainedDisposables(disposables, retainedDisposables) {\n\treturn Array.from(disposables).filter((disposable) => !retainedDisposables.has(disposable));\n}\nfunction throwDisposeErrors(errors) {\n\tif (errors.length < 1) return;\n\tif (errors.length === 1) throw errors[0];\n\tthrow new AggregateError(errors, \"Multiple errors occurred while disposing LogTape scoped resources.\");\n}\nfunction flattenErrors(...errors) {\n\tconst flattened = [];\n\tfor (const error of errors) if (error instanceof AggregateError) flattened.push(...error.errors);\n\telse flattened.push(error);\n\treturn flattened;\n}\n\n//#endregion\nexport { compileScopedConfig, disposeScopedConfig, disposeScopedConfigSync, emitWithScopedConfig, getCurrentScopedConfig, getScopedLogger, runWithScopedConfig, scopedConfigCapturesSourceLocation, scopedConfigHasSink, throwCombinedErrors };\n//# sourceMappingURL=scoped-config.js.map","//#region src/source-location.ts\n/**\n* The prefix of each frame in V8 and JavaScriptCore (Bun) stack traces.\n*/\nconst v8FramePrefix = \" at \";\n/**\n* Matches a file that starts with a URL scheme (e.g., `file:`, `http:`,\n* `node:`, or a Windows drive letter), a slash, or a UNC prefix.\n*/\nconst absoluteFilePattern = /^(?:[A-Za-z][A-Za-z0-9+.-]*:|\\/|\\\\\\\\)/;\n/**\n* Matches a `file:line:column` location.\n*/\nconst locationPattern = /^(.+):(\\d+):(\\d+)$/;\n/**\n* Marks a location that matched the grammar but must not be reported.\n*/\nconst rejected = Symbol(\"rejected\");\n/**\n* Parses the source location of a frame from the stack trace of an `Error`\n* that was constructed without a message.\n*\n* The parser is deliberately conservative: whenever the frame could be read\n* in more than one way, or it does not point to a position in a source file\n* (native code, `eval()`, bytecode offsets), it returns `undefined` rather\n* than a possibly wrong location. It never throws.\n*\n* @param stack The `stack` property of an `Error` constructed without\n* a message.\n* @param frameIndex The zero-based index of the frame to parse, where `0`\n* is the function that constructed the `Error`.\n* @returns The source location of the frame, or `undefined` if it could not\n* be determined unambiguously.\n*/\nfunction parseSourceLocation(stack, frameIndex) {\n\tif (typeof stack !== \"string\") return void 0;\n\tconst lines = stack.split(\"\\n\");\n\tif (lines[0].trim() === \"Error\") {\n\t\tif (lines.length < 2 || !lines[1].startsWith(v8FramePrefix)) return void 0;\n\t\treturn parseV8Frame(lines[frameIndex + 1]);\n\t}\n\tif (lines[0] === \"\" || /^\\s/.test(lines[0])) return void 0;\n\treturn parseSpiderMonkeyFrame(lines[frameIndex]);\n}\nfunction parseV8Frame(frame) {\n\tif (frame == null || !frame.startsWith(v8FramePrefix)) return void 0;\n\tconst body = frame.slice(v8FramePrefix.length);\n\tif (body.includes(\"eval at \")) return void 0;\n\tif (!body.endsWith(\")\")) return accept(parseLocation(body.startsWith(\"async \") ? body.slice(6) : body));\n\tlet found;\n\tfor (let i = body.indexOf(\" (\"); i >= 0; i = body.indexOf(\" (\", i + 1)) {\n\t\tconst location = parseLocation(body.slice(i + 2, -1));\n\t\tif (location === rejected) return void 0;\n\t\tif (location == null) continue;\n\t\tif (found != null) return void 0;\n\t\tfound = location;\n\t}\n\treturn found;\n}\nfunction parseSpiderMonkeyFrame(frame) {\n\tif (frame == null) return void 0;\n\tconst whole = parseLocation(frame);\n\tif (whole === rejected) return void 0;\n\tif (whole != null && absoluteFilePattern.test(whole.file)) return void 0;\n\tlet found;\n\tfor (let i = frame.indexOf(\"@\"); i >= 0; i = frame.indexOf(\"@\", i + 1)) {\n\t\tconst location = parseLocation(frame.slice(i + 1));\n\t\tif (location === rejected) return void 0;\n\t\tif (location == null || !absoluteFilePattern.test(location.file)) continue;\n\t\tif (found != null) return void 0;\n\t\tfound = location;\n\t}\n\treturn found;\n}\nfunction accept(location) {\n\treturn location === rejected ? void 0 : location;\n}\nfunction parseLocation(location) {\n\tconst match = locationPattern.exec(location);\n\tif (match == null) return void 0;\n\tconst file = match[1];\n\tconst line = Number(match[2]);\n\tconst column = Number(match[3]);\n\tif (file === \"native\" || file === \"<anonymous>\" || file === \"[native code]\" || file.includes(\"address at \") || file.includes(\"eval at \") || file.includes(\" > eval\") || file.includes(\" > Function\") || line < 1 || column < 1) return rejected;\n\treturn {\n\t\tfile,\n\t\tline,\n\t\tcolumn\n\t};\n}\n\n//#endregion\nexport { parseSourceLocation };\n//# sourceMappingURL=source-location.js.map","import { getCategoryPrefix, getImplicitContextIfAny } from \"./context.js\";\nimport { compareLogLevel } from \"./level.js\";\nimport { emitWithScopedConfig, getCurrentScopedConfig, scopedConfigCapturesSourceLocation, scopedConfigHasSink } from \"./scoped-config.js\";\nimport { parseSourceLocation } from \"./source-location.js\";\n\n//#region src/logger.ts\n/**\n* Symbol to identify lazy values.\n*/\nconst lazySymbol = Symbol.for(\"logtape.lazy\");\nconst throttlingSummaryRecordSymbol = Symbol.for(\"LogTape.throttlingSummaryRecord\");\nconst immediateSinkSymbol = Symbol.for(\"LogTape.sinkSnapshotPolicy.immediate\");\nconst internalStringLogRecords = /* @__PURE__ */ new WeakSet();\nconst resolvedStringLogRecords = /* @__PURE__ */ new WeakSet();\nlet globalSourceLocationCapture = false;\nlet scopedSourceLocationCaptures = 0;\nfunction isSourceLocationCaptureActive() {\n\treturn globalSourceLocationCapture || scopedSourceLocationCaptures > 0;\n}\nfunction attachSourceLocation(record, sourceLocation) {\n\tif (sourceLocation == null) return;\n\trecord.sourceLocation = sourceLocation;\n}\n/**\n* Checks if a value is a lazy value.\n*\n* @param value The value to check.\n* @returns `true` if the value is a lazy value, `false` otherwise.\n* @since 2.0.0\n*/\nfunction isLazy(value) {\n\treturn value != null && typeof value === \"object\" && lazySymbol in value && value[lazySymbol] === true;\n}\n/**\n* Creates a lazy value that is evaluated at logging time.\n*\n* This is useful for logging contextual properties that may change over time,\n* such as the current user or request context.\n*\n* @example\n* ```typescript\n* let currentUser: string | null = null;\n* const logger = getLogger(\"app\").with({ user: lazy(() => currentUser) });\n*\n* logger.info(\"User action\"); // logs with user: null\n* currentUser = \"alice\";\n* logger.info(\"User action\"); // logs with user: \"alice\"\n* ```\n*\n* @typeParam T The type of the value.\n* @param getter A function that returns the value.\n* @returns A lazy value.\n* @since 2.0.0\n*/\nfunction lazy(getter) {\n\treturn {\n\t\t[lazySymbol]: true,\n\t\tgetter\n\t};\n}\n/**\n* Resolves lazy values in a properties object.\n*\n* @param properties The properties object with potential lazy values.\n* @returns A new object with all lazy values resolved.\n*/\nfunction resolveProperties(properties) {\n\tconst resolved = {};\n\tfor (const key in properties) {\n\t\tconst value = properties[key];\n\t\tresolved[key] = isLazy(value) ? value.getter() : value;\n\t}\n\tconst symbolProperties = properties;\n\tconst symbolResolved = resolved;\n\tif (Object.prototype.propertyIsEnumerable.call(properties, throttlingSummaryRecordSymbol)) {\n\t\tconst value = symbolProperties[throttlingSummaryRecordSymbol];\n\t\tsymbolResolved[throttlingSummaryRecordSymbol] = isLazy(value) ? value.getter() : value;\n\t}\n\treturn resolved;\n}\nfunction isPromiseObject(value) {\n\tif (value instanceof Promise) return true;\n\treturn Object.prototype.toString.call(value) === \"[object Promise]\" && typeof value.then === \"function\";\n}\nfunction logStringMessage(logger, level, message, props, sourceLocation) {\n\tif (typeof props !== \"function\") {\n\t\tconst properties = props ?? {};\n\t\tlogger.log(level, message, properties, void 0, sourceLocation);\n\t\treturn;\n\t}\n\tif (!logger.isEnabledFor(level)) return Promise.resolve();\n\tconst result = props();\n\tif (isPromiseObject(result)) return Promise.resolve(result).then((resolvedProps) => {\n\t\tlogger.log(level, message, resolvedProps, void 0, sourceLocation);\n\t});\n\tlogger.log(level, message, result, void 0, sourceLocation);\n}\nfunction snapshotLogRecordProperties(record) {\n\tif (resolvedStringLogRecords.has(record)) return record;\n\tconst properties = resolveProperties(record.properties);\n\tif (internalStringLogRecords.has(record)) {\n\t\tconst snapshot = {\n\t\t\tcategory: record.category,\n\t\t\tlevel: record.level,\n\t\t\tget message() {\n\t\t\t\treturn record.message;\n\t\t\t},\n\t\t\trawMessage: record.rawMessage,\n\t\t\ttimestamp: record.timestamp,\n\t\t\tproperties\n\t\t};\n\t\tattachSourceLocation(snapshot, record.sourceLocation);\n\t\treturn snapshot;\n\t}\n\tconst descriptors = Object.getOwnPropertyDescriptors(record);\n\tdescriptors.properties = {\n\t\tvalue: properties,\n\t\tenumerable: true,\n\t\tconfigurable: true\n\t};\n\treturn Object.defineProperties({}, descriptors);\n}\nfunction hasEnumerableProperties(properties) {\n\tif (properties == null || typeof properties !== \"object\") return false;\n\treturn Object.keys(properties).length > 0 || Object.prototype.propertyIsEnumerable.call(properties, throttlingSummaryRecordSymbol);\n}\nfunction shouldSnapshotForSink(sink) {\n\treturn sink[immediateSinkSymbol] !== true;\n}\n/**\n* Get a logger with the given category.\n*\n* ```typescript\n* const logger = getLogger([\"my-app\"]);\n* ```\n*\n* @param category The category of the logger. It can be a string or an array\n* of strings. If it is a string, it is equivalent to an array\n* with a single element.\n* @returns The logger.\n*/\nfunction getLogger(category = []) {\n\treturn LoggerImpl.getLogger(category);\n}\n/**\n* Enumerate every logger in the category tree rooted at the given logger,\n* including the given logger itself, in depth-first pre-order.\n*\n* ```typescript\n* const all = getLoggers(); // the whole tree, from the root down\n* const mine = getLoggers(\"my-app\"); // \"my-app\" and its descendants only\n* ```\n*\n* This only reflects loggers that have actually been *materialized* by a\n* `getLogger()` call somewhere in the running program. A category that has\n* been configured via `configure()` but never reached by a `getLogger()`\n* call (e.g. inside an unexecuted code path) will not appear.\n*\n* @param logger The logger (or its category, as a string or array of\n* strings) to start from. Defaults to the root logger.\n* @returns Every logger in the subtree, starting with the resolved logger\n* itself, in depth-first pre-order.\n* @since 2.4.0\n*/\nfunction getLoggers(logger) {\n\tconst category = logger == null ? [] : isCategory(logger) ? logger : logger.category;\n\treturn collectDescendants(LoggerImpl.getLogger(category));\n}\nfunction isCategory(value) {\n\treturn typeof value === \"string\" || Array.isArray(value);\n}\nfunction collectDescendants(logger) {\n\tconst loggers = [logger];\n\tfor (const childRef of Object.values(logger.children)) {\n\t\tconst child = childRef instanceof LoggerImpl ? childRef : childRef.deref();\n\t\tif (child != null) loggers.push(...collectDescendants(child));\n\t}\n\treturn loggers;\n}\n/**\n* The symbol for the global root logger.\n*/\nconst globalRootLoggerSymbol = Symbol.for(\"logtape.rootLogger\");\n/**\n* Checks whether the given category is the meta logger's category or one of\n* its descendants, to which category prefixes do not apply.\n*/\nfunction isMetaLoggerCategory(category) {\n\treturn category.length >= 2 && category[0] === \"logtape\" && category[1] === \"meta\";\n}\n/**\n* Finds the logger with the given category without creating it or any of its\n* ancestors.\n* @param category The category of the logger to find.\n* @returns The logger, or `undefined` if it has not been created.\n*/\nfunction findLogger(category) {\n\tlet logger = globalThis[globalRootLoggerSymbol];\n\tfor (const name of category) {\n\t\tif (logger == null) return void 0;\n\t\tconst childRef = Object.prototype.hasOwnProperty.call(logger.children, name) ? logger.children[name] : void 0;\n\t\tlogger = childRef == null || typeof childRef.deref !== \"function\" ? childRef : childRef.deref();\n\t}\n\treturn logger;\n}\n/**\n* A logger implementation. Do not use this directly; use {@link getLogger}\n* instead. This class is exported for testing purposes.\n*/\nvar LoggerImpl = class LoggerImpl {\n\tparent;\n\tchildren;\n\tcategory;\n\tsinks;\n\tfilters;\n\tcontextLocalStorage;\n\t/**\n\t* Whether to capture source locations for this logger and its\n\t* descendants. `undefined` inherits the setting from the parent.\n\t*/\n\tsourceLocationCapture = void 0;\n\t#parentSinks = \"inherit\";\n\t#lowestLevel = \"trace\";\n\t#sinkPlanCache = {};\n\t#forwardPlanCache = void 0;\n\tstatic getLogger(category = []) {\n\t\tlet rootLogger = globalRootLoggerSymbol in globalThis ? globalThis[globalRootLoggerSymbol] ?? null : null;\n\t\tif (rootLogger == null) {\n\t\t\trootLogger = new LoggerImpl(null, []);\n\t\t\tglobalThis[globalRootLoggerSymbol] = rootLogger;\n\t\t}\n\t\tif (typeof category === \"string\") return rootLogger.getChild(category);\n\t\tif (category.length === 0) return rootLogger;\n\t\treturn rootLogger.getChild(category);\n\t}\n\tstatic getNearestExistingLogger(category) {\n\t\tlet logger = LoggerImpl.getLogger();\n\t\tfor (const name of category) {\n\t\t\tconst childRef = logger.children[name];\n\t\t\tconst child = childRef instanceof LoggerImpl ? childRef : childRef?.deref();\n\t\t\tif (child == null) break;\n\t\t\tlogger = child;\n\t\t}\n\t\treturn logger;\n\t}\n\tconstructor(parent, category) {\n\t\tthis.parent = parent;\n\t\tthis.children = {};\n\t\tthis.category = category;\n\t\tthis.sinks = [];\n\t\tthis.filters = [];\n\t}\n\tget parentSinks() {\n\t\treturn this.#parentSinks;\n\t}\n\tset parentSinks(value) {\n\t\tif (this.#parentSinks === value) return;\n\t\tthis.#parentSinks = value;\n\t}\n\tget lowestLevel() {\n\t\treturn this.#lowestLevel;\n\t}\n\tset lowestLevel(value) {\n\t\tif (this.#lowestLevel === value) return;\n\t\tthis.#lowestLevel = value;\n\t}\n\tgetChild(subcategory) {\n\t\tconst name = typeof subcategory === \"string\" ? subcategory : subcategory[0];\n\t\tconst childRef = this.children[name];\n\t\tlet child = childRef instanceof LoggerImpl ? childRef : childRef?.deref();\n\t\tif (child == null) {\n\t\t\tchild = new LoggerImpl(this, [...this.category, name]);\n\t\t\tthis.children[name] = \"WeakRef\" in globalThis ? new WeakRef(child) : child;\n\t\t}\n\t\tif (typeof subcategory === \"string\" || subcategory.length === 1) return child;\n\t\treturn child.getChild(subcategory.slice(1));\n\t}\n\t/**\n\t* Reset the logger. This removes all sinks and filters from the logger.\n\t*/\n\treset() {\n\t\twhile (this.sinks.length > 0) this.sinks.shift();\n\t\tthis.parentSinks = \"inherit\";\n\t\twhile (this.filters.length > 0) this.filters.shift();\n\t\tthis.lowestLevel = \"trace\";\n\t\tthis.sourceLocationCapture = void 0;\n\t}\n\t/**\n\t* Reset the logger and all its descendants. This removes all sinks and\n\t* filters from the logger and all its descendants.\n\t*/\n\tresetDescendants() {\n\t\tfor (const child of Object.values(this.children)) {\n\t\t\tconst logger = child instanceof LoggerImpl ? child : child.deref();\n\t\t\tif (logger != null) logger.resetDescendants();\n\t\t}\n\t\tthis.reset();\n\t}\n\twith(properties) {\n\t\treturn new LoggerCtx(this, { ...properties });\n\t}\n\t/**\n\t* Sets whether the global configuration enables source location capture\n\t* for any category. Call this on the root logger only.\n\t*/\n\tsetGlobalSourceLocationCapture(enabled) {\n\t\tglobalSourceLocationCapture = enabled;\n\t}\n\t/**\n\t* Records that a scoped configuration which enables source location\n\t* capture for some category became active. Call this on the root logger\n\t* only, and balance it with\n\t* {@link LoggerImpl.releaseScopedSourceLocationCapture}.\n\t*/\n\tretainScopedSourceLocationCapture() {\n\t\tscopedSourceLocationCaptures++;\n\t}\n\t/**\n\t* Records that a scoped configuration retained with\n\t* {@link LoggerImpl.retainScopedSourceLocationCapture} ended. Call this on\n\t* the root logger only.\n\t*/\n\treleaseScopedSourceLocationCapture() {\n\t\tif (scopedSourceLocationCaptures > 0) scopedSourceLocationCaptures--;\n\t}\n\t/**\n\t* Captures where user code called the public logging method that called\n\t* this method, if source location capture is enabled for this logger and\n\t* a record of the given level could be emitted.\n\t*\n\t* It must be called directly by the public logging method that user code\n\t* called (e.g., {@link LoggerImpl.info} or {@link LoggerCtx.info}), and\n\t* not in tail position, because the location is read from the third frame\n\t* of a stack trace constructed here: this method, the logging method, and\n\t* then its caller. JavaScriptCore implements proper tail calls, so a call\n\t* in tail position would remove the logging method's frame.\n\t* @param level The log level of the record to be made.\n\t* @returns The source location, or `undefined` if capture is disabled, the\n\t* record would certainly be dropped, or the stack trace could not\n\t* be parsed.\n\t*/\n\tcaptureSourceLocation(level) {\n\t\tif (isMetaLoggerCategory(this.category)) return void 0;\n\t\tconst categoryPrefix = getCategoryPrefix();\n\t\tconst scopedConfig = getCurrentScopedConfig(LoggerImpl.getLogger().contextLocalStorage);\n\t\tif (scopedConfig != null) {\n\t\t\tconst category = categoryPrefix.length > 0 ? [...categoryPrefix, ...this.category] : this.category;\n\t\t\tif (!scopedConfigHasSink(scopedConfig, category, level) || !scopedConfigCapturesSourceLocation(scopedConfig, category)) return void 0;\n\t\t} else {\n\t\t\tconst dispatcher = this.getDispatcher(categoryPrefix);\n\t\t\tif (dispatcher.isCertainlyDroppedResolved(level) || !dispatcher.capturesSourceLocation()) return void 0;\n\t\t}\n\t\ttry {\n\t\t\treturn parseSourceLocation(new Error().stack, 2);\n\t\t} catch {\n\t\t\treturn void 0;\n\t\t}\n\t}\n\t/**\n\t* Resolves whether this logger or the nearest ancestor that configures it\n\t* captures source locations.\n\t*/\n\tcapturesSourceLocation() {\n\t\tif (this.sourceLocationCapture != null) return this.sourceLocationCapture;\n\t\treturn this.parent?.capturesSourceLocation() ?? false;\n\t}\n\tfilter(record) {\n\t\tfor (const filter of this.filters) if (!filter(record)) return false;\n\t\tif (this.filters.length < 1) return this.parent?.filter(record) ?? true;\n\t\treturn true;\n\t}\n\t*getSinks(level) {\n\t\tconst plan = this.getSinkDispatchPlan(level);\n\t\tswitch (plan.kind) {\n\t\t\tcase \"none\": return;\n\t\t\tcase \"one\":\n\t\t\t\tyield plan.sink;\n\t\t\t\treturn;\n\t\t\tcase \"many\":\n\t\t\t\tyield* plan.sinks;\n\t\t\t\treturn;\n\t\t}\n\t}\n\tgetSinkDispatchPlan(level) {\n\t\tconst cached = this.#sinkPlanCache[level];\n\t\tif (cached != null && this.isSinkDispatchPlanFresh(level, cached)) return cached;\n\t\tconst plan = this.createSinkDispatchPlan(level, this.resolveParentPlan(level));\n\t\tthis.#sinkPlanCache[level] = plan;\n\t\treturn plan;\n\t}\n\tresolveParentPlan(level) {\n\t\tif (this.parent == null) return void 0;\n\t\tif (this.parentSinks === \"inherit\") return this.parent.getSinkDispatchPlan(level);\n\t\tif (this.parentSinks === \"forward\") return this.parent.getForwardSinkPlan();\n\t\treturn void 0;\n\t}\n\tisSinkDispatchPlanFresh(level, plan) {\n\t\tif (plan.lowestLevel !== this.lowestLevel || plan.parentSinks !== this.parentSinks || plan.localSinks.length !== this.sinks.length) return false;\n\t\tfor (let i = 0; i < plan.localSinks.length; i++) if (plan.localSinks[i] !== this.sinks[i]) return false;\n\t\treturn plan.parentPlan === this.resolveParentPlan(level);\n\t}\n\tgetForwardSinkPlan() {\n\t\tconst cached = this.#forwardPlanCache;\n\t\tif (cached != null && this.isForwardSinkPlanFresh(cached)) return cached;\n\t\tconst parentPlan = this.parent != null && this.parentSinks !== \"override\" ? this.parent.getForwardSinkPlan() : void 0;\n\t\tconst plan = this.createForwardSinkPlan(parentPlan);\n\t\tthis.#forwardPlanCache = plan;\n\t\treturn plan;\n\t}\n\tisForwardSinkPlanFresh(plan) {\n\t\tif (plan.parentSinks !== this.parentSinks || plan.localSinks.length !== this.sinks.length) return false;\n\t\tfor (let i = 0; i < plan.localSinks.length; i++) if (plan.localSinks[i] !== this.sinks[i]) return false;\n\t\tconst parentPlan = this.parent != null && this.parentSinks !== \"override\" ? this.parent.getForwardSinkPlan() : void 0;\n\t\treturn plan.parentPlan === parentPlan;\n\t}\n\tcreateForwardSinkPlan(parentPlan) {\n\t\tconst localSinks = [...this.sinks];\n\t\tconst sinks = parentPlan == null || parentPlan.sinks.length < 1 ? localSinks : [...parentPlan.sinks, ...localSinks];\n\t\treturn {\n\t\t\tkind: \"forward\",\n\t\t\tlocalSinks,\n\t\t\tparentSinks: this.parentSinks,\n\t\t\tparentPlan,\n\t\t\tsinks\n\t\t};\n\t}\n\tcreateSinkDispatchPlan(level, parentPlan) {\n\t\tconst state = {\n\t\t\tlocalSinks: [...this.sinks],\n\t\t\tparentSinks: this.parentSinks,\n\t\t\tlowestLevel: this.lowestLevel,\n\t\t\tparentPlan\n\t\t};\n\t\tif (state.lowestLevel === null) return {\n\t\t\t...state,\n\t\t\tkind: \"none\"\n\t\t};\n\t\tif (compareLogLevel(level, state.lowestLevel) < 0) return {\n\t\t\t...state,\n\t\t\tkind: \"none\"\n\t\t};\n\t\tlet firstSink;\n\t\tlet sinks;\n\t\tconst appendSink = (sink) => {\n\t\t\tif (sinks != null) sinks.push(sink);\n\t\t\telse if (firstSink == null) firstSink = sink;\n\t\t\telse sinks = [firstSink, sink];\n\t\t};\n\t\tif (parentPlan != null) {\n\t\t\tif (parentPlan.kind === \"one\") firstSink = parentPlan.sink;\n\t\t\telse if (parentPlan.kind === \"many\") sinks = [...parentPlan.sinks];\n\t\t\telse if (parentPlan.kind === \"forward\") {\n\t\t\t\tif (parentPlan.sinks.length === 1) firstSink = parentPlan.sinks[0];\n\t\t\t\telse if (parentPlan.sinks.length > 1) sinks = [...parentPlan.sinks];\n\t\t\t}\n\t\t}\n\t\tfor (const sink of state.localSinks) appendSink(sink);\n\t\tif (sinks != null) return {\n\t\t\t...state,\n\t\t\tkind: \"many\",\n\t\t\tsinks\n\t\t};\n\t\tif (firstSink != null) return {\n\t\t\t...state,\n\t\t\tkind: \"one\",\n\t\t\tsink: firstSink\n\t\t};\n\t\treturn {\n\t\t\t...state,\n\t\t\tkind: \"none\"\n\t\t};\n\t}\n\tisEnabledFor(level) {\n\t\tconst categoryPrefix = isMetaLoggerCategory(this.category) ? [] : getCategoryPrefix();\n\t\tconst scopedConfig = getCurrentScopedConfig(LoggerImpl.getLogger().contextLocalStorage);\n\t\tif (scopedConfig != null) return scopedConfigHasSink(scopedConfig, categoryPrefix.length > 0 ? [...categoryPrefix, ...this.category] : this.category, level);\n\t\treturn this.getDispatcher(categoryPrefix).isEnabledForResolved(level);\n\t}\n\t/**\n\t* Checks whether a record of the given level logged through this logger\n\t* would certainly be dropped without being seen by any filter or sink.\n\t* Logging methods use this to return before building a record.\n\t*\n\t* This assumes the context-local storage's store does not change between\n\t* synchronous reads within a single logging call, which holds for\n\t* `AsyncLocalStorage` and for the stores set up by `withContext()`,\n\t* `withCategoryPrefix()`, and `withConfig()`.\n\t* @param level The log level of the record.\n\t* @returns `true` if emitting such a record would have no observable\n\t* effect, `false` otherwise.\n\t*/\n\tisCertainlyDropped(level) {\n\t\tconst categoryPrefix = isMetaLoggerCategory(this.category) ? [] : getCategoryPrefix();\n\t\tconst scopedConfig = getCurrentScopedConfig(LoggerImpl.getLogger().contextLocalStorage);\n\t\tif (scopedConfig != null) return !scopedConfigHasSink(scopedConfig, categoryPrefix.length > 0 ? [...categoryPrefix, ...this.category] : this.category, level);\n\t\treturn this.getDispatcher(categoryPrefix).isCertainlyDroppedResolved(level);\n\t}\n\t/**\n\t* Checks whether a record of the given level dispatched by this logger,\n\t* without a scoped configuration, would certainly be dropped. See\n\t* {@link LoggerImpl.isCertainlyDropped}.\n\t*/\n\tisCertainlyDroppedResolved(level) {\n\t\tif (this.lowestLevel === null || compareLogLevel(level, this.lowestLevel) < 0) return true;\n\t\treturn !this.isEnabledForResolved(level) && !this.hasEffectiveFilters();\n\t}\n\t/**\n\t* Resolves the logger that actually dispatches records logged through this\n\t* logger under the given category prefix. It must stay in sync with\n\t* the dispatcher resolution in {@link LoggerImpl.emit}.\n\t*/\n\tgetDispatcher(categoryPrefix) {\n\t\treturn categoryPrefix.length > 0 ? LoggerImpl.getNearestExistingLogger([...categoryPrefix, ...this.category]) : this;\n\t}\n\t/**\n\t* Checks whether {@link LoggerImpl.filter} would run any filter, i.e.,\n\t* whether this logger or any of its ancestors has a filter.\n\t*/\n\thasEffectiveFilters() {\n\t\tif (this.filters.length > 0) return true;\n\t\treturn this.parent?.hasEffectiveFilters() ?? false;\n\t}\n\t/**\n\t* Checks whether {@link LoggerImpl.getSinks} would yield any sink for\n\t* the given level, without building or validating sink dispatch plans.\n\t* It must stay in sync with {@link LoggerImpl.createSinkDispatchPlan}.\n\t*/\n\tisEnabledForResolved(level) {\n\t\tif (this.lowestLevel === null || compareLogLevel(level, this.lowestLevel) < 0) return false;\n\t\tif (this.sinks.length > 0) return true;\n\t\tif (this.parent == null) return false;\n\t\tif (this.parentSinks === \"inherit\") return this.parent.isEnabledForResolved(level);\n\t\tif (this.parentSinks === \"forward\") return this.parent.hasForwardSinks();\n\t\treturn false;\n\t}\n\t/**\n\t* Checks whether {@link LoggerImpl.getForwardSinkPlan} would collect any\n\t* sink, i.e., whether this logger or an ancestor up to and including the\n\t* nearest one whose `parentSinks` is `\"override\"` has local sinks.\n\t*/\n\thasForwardSinks() {\n\t\tif (this.sinks.length > 0) return true;\n\t\treturn this.parent != null && this.parentSinks !== \"override\" && this.parent.hasForwardSinks();\n\t}\n\temit(record, bypassSinks) {\n\t\tconst hasCategory = \"category\" in record;\n\t\tconst baseCategory = hasCategory ? record.category : this.category;\n\t\tconst categoryPrefix = isMetaLoggerCategory(baseCategory) ? [] : getCategoryPrefix();\n\t\tconst fullCategory = categoryPrefix.length > 0 ? [...categoryPrefix, ...baseCategory] : baseCategory;\n\t\tif (categoryPrefix.length < 1 && Object.prototype.hasOwnProperty.call(record, \"category\")) {\n\t\t\tthis.emitResolved(record, bypassSinks);\n\t\t\treturn;\n\t\t}\n\t\tconst descriptors = Object.getOwnPropertyDescriptors(record);\n\t\tdescriptors.category = {\n\t\t\tvalue: fullCategory,\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true\n\t\t};\n\t\tconst fullRecord = Object.defineProperties({}, descriptors);\n\t\tconst dispatcher = categoryPrefix.length > 0 ? LoggerImpl.getNearestExistingLogger(fullCategory) : this;\n\t\tdispatcher.emitResolved(fullRecord, bypassSinks);\n\t}\n\temitResolved(record, bypassSinks) {\n\t\tconst scopedConfig = getCurrentScopedConfig(LoggerImpl.getLogger().contextLocalStorage);\n\t\tif (scopedConfig != null) {\n\t\t\tlet snapshot$1;\n\t\t\tlet snapshotFailed$1 = false;\n\t\t\temitWithScopedConfig(scopedConfig, record, bypassSinks, (sink, activeBypassSinks) => {\n\t\t\t\ttry {\n\t\t\t\t\tif (shouldSnapshotForSink(sink)) try {\n\t\t\t\t\t\tsnapshot$1 ??= snapshotLogRecordProperties(record);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\tsnapshotFailed$1 = true;\n\t\t\t\t\t\tsnapshot$1 = record;\n\t\t\t\t\t}\n\t\t\t\t\tsink(snapshot$1 ?? record);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconst bypassSinks2 = new Set(activeBypassSinks);\n\t\t\t\t\tbypassSinks2.add(sink);\n\t\t\t\t\tmetaLogger.log(\"fatal\", \"Failed to emit a log record to sink {sink}: {error}\", {\n\t\t\t\t\t\tsink,\n\t\t\t\t\t\terror,\n\t\t\t\t\t\trecord\n\t\t\t\t\t}, bypassSinks2);\n\t\t\t\t}\n\t\t\t\tif (snapshotFailed$1) snapshot$1 = record;\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (this.lowestLevel === null || compareLogLevel(record.level, this.lowestLevel) < 0 || !this.filter(record)) return;\n\t\tconst plan = this.getSinkDispatchPlan(record.level);\n\t\tif (plan.kind === \"none\") return;\n\t\tlet snapshot;\n\t\tlet snapshotFailed = false;\n\t\tif (plan.kind === \"one\") {\n\t\t\tconst sink = plan.sink;\n\t\t\tif (bypassSinks?.has(sink)) return;\n\t\t\ttry {\n\t\t\t\tif (shouldSnapshotForSink(sink)) try {\n\t\t\t\t\tsnapshot = snapshotLogRecordProperties(record);\n\t\t\t\t} catch {\n\t\t\t\t\tsnapshotFailed = true;\n\t\t\t\t\tsnapshot = record;\n\t\t\t\t}\n\t\t\t\tsink(snapshot ?? record);\n\t\t\t} catch (error) {\n\t\t\t\tconst bypassSinks2 = new Set(bypassSinks);\n\t\t\t\tbypassSinks2.add(sink);\n\t\t\t\tmetaLogger.log(\"fatal\", \"Failed to emit a log record to sink {sink}: {error}\", {\n\t\t\t\t\tsink,\n\t\t\t\t\terror,\n\t\t\t\t\trecord\n\t\t\t\t}, bypassSinks2);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tfor (const sink of plan.sinks) {\n\t\t\tif (bypassSinks?.has(sink)) continue;\n\t\t\ttry {\n\t\t\t\tif (snapshot == null && !snapshotFailed && shouldSnapshotForSink(sink)) try {\n\t\t\t\t\tsnapshot = snapshotLogRecordProperties(record);\n\t\t\t\t} catch {\n\t\t\t\t\tsnapshotFailed = true;\n\t\t\t\t\tsnapshot = record;\n\t\t\t\t}\n\t\t\t\tsink(snapshot ?? record);\n\t\t\t} catch (error) {\n\t\t\t\tconst bypassSinks2 = new Set(bypassSinks);\n\t\t\t\tbypassSinks2.add(sink);\n\t\t\t\tmetaLogger.log(\"fatal\", \"Failed to emit a log record to sink {sink}: {error}\", {\n\t\t\t\t\tsink,\n\t\t\t\t\terror,\n\t\t\t\t\trecord\n\t\t\t\t}, bypassSinks2);\n\t\t\t}\n\t\t}\n\t}\n\tlog(level, rawMessage, properties, bypassSinks, sourceLocation) {\n\t\tif (this.isCertainlyDropped(level)) return;\n\t\tconst implicitContext = getImplicitContextIfAny();\n\t\tif (typeof properties !== \"function\" && implicitContext == null && !rawMessage.includes(\"{\") && !hasEnumerableProperties(properties)) {\n\t\t\tconst record$1 = {\n\t\t\t\tcategory: this.category,\n\t\t\t\tlevel,\n\t\t\t\tmessage: [rawMessage],\n\t\t\t\trawMessage,\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t\tproperties: {}\n\t\t\t};\n\t\t\tattachSourceLocation(record$1, sourceLocation);\n\t\t\tresolvedStringLogRecords.add(record$1);\n\t\t\tthis.emit(record$1, bypassSinks);\n\t\t\treturn;\n\t\t}\n\t\tlet cachedProps = void 0;\n\t\tlet cachedMessage = void 0;\n\t\tconst record = typeof properties === \"function\" ? {\n\t\t\tcategory: this.category,\n\t\t\tlevel,\n\t\t\ttimestamp: Date.now(),\n\t\t\tget message() {\n\t\t\t\tif (cachedMessage == null) cachedMessage = parseMessageTemplate(rawMessage, this.properties);\n\t\t\t\treturn cachedMessage;\n\t\t\t},\n\t\t\trawMessage,\n\t\t\tget properties() {\n\t\t\t\tif (cachedProps == null) cachedProps = resolveProperties({\n\t\t\t\t\t...implicitContext ?? {},\n\t\t\t\t\t...properties()\n\t\t\t\t});\n\t\t\t\treturn cachedProps;\n\t\t\t}\n\t\t} : {\n\t\t\tcategory: this.category,\n\t\t\tlevel,\n\t\t\ttimestamp: Date.now(),\n\t\t\tget message() {\n\t\t\t\tif (cachedMessage == null) cachedMessage = parseMessageTemplate(rawMessage, this.properties);\n\t\t\t\treturn cachedMessage;\n\t\t\t},\n\t\t\trawMessage,\n\t\t\tget properties() {\n\t\t\t\tif (cachedProps == null) cachedProps = resolveProperties({\n\t\t\t\t\t...implicitContext ?? {},\n\t\t\t\t\t...properties\n\t\t\t\t});\n\t\t\t\treturn cachedProps;\n\t\t\t}\n\t\t};\n\t\tattachSourceLocation(record, sourceLocation);\n\t\tinternalStringLogRecords.add(record);\n\t\tthis.emit(record, bypassSinks);\n\t}\n\tlogLazily(level, callback, properties = {}, sourceLocation) {\n\t\tif (this.isCertainlyDropped(level)) return;\n\t\tconst implicitContext = getImplicitContextIfAny();\n\t\tlet rawMessage = void 0;\n\t\tlet msg = void 0;\n\t\tfunction realizeMessage() {\n\t\t\tif (msg == null || rawMessage == null) {\n\t\t\t\tmsg = callback((tpl, ...values) => {\n\t\t\t\t\trawMessage = tpl;\n\t\t\t\t\treturn renderMessage(tpl, values);\n\t\t\t\t});\n\t\t\t\tif (rawMessage == null) throw new TypeError(\"No log record was made.\");\n\t\t\t}\n\t\t\treturn [msg, rawMessage];\n\t\t}\n\t\tconst record = {\n\t\t\tcategory: this.category,\n\t\t\tlevel,\n\t\t\tget message() {\n\t\t\t\treturn realizeMessage()[0];\n\t\t\t},\n\t\t\tget rawMessage() {\n\t\t\t\treturn realizeMessage()[1];\n\t\t\t},\n\t\t\ttimestamp: Date.now(),\n\t\t\tproperties: {\n\t\t\t\t...implicitContext ?? {},\n\t\t\t\t...properties\n\t\t\t}\n\t\t};\n\t\tattachSourceLocation(record, sourceLocation);\n\t\tthis.emit(record);\n\t}\n\tlogTemplate(level, messageTemplate, values, properties = {}, sourceLocation) {\n\t\tif (this.isCertainlyDropped(level)) return;\n\t\tconst implicitContext = getImplicitContextIfAny();\n\t\tconst record = {\n\t\t\tcategory: this.category,\n\t\t\tlevel,\n\t\t\tmessage: renderMessage(messageTemplate, values),\n\t\t\trawMessage: messageTemplate,\n\t\t\ttimestamp: Date.now(),\n\t\t\tproperties: {\n\t\t\t\t...implicitContext ?? {},\n\t\t\t\t...properties\n\t\t\t}\n\t\t};\n\t\tattachSourceLocation(record, sourceLocation);\n\t\tthis.emit(record);\n\t}\n\ttrace(message, ...values) {\n\t\tconst sourceLocation = isSourceLocationCaptureActive() ? this.captureSourceLocation(\"trace\") : void 0;\n\t\tif (typeof message === \"string\") return logStringMessage(this, \"trace\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"function\") this.logLazily(\"trace\", message, void 0, sourceLocation);\n\t\telse if (!Array.isArray(message)) this.log(\"trace\", \"{*}\", message, void 0, sourceLocation);\n\t\telse this.logTemplate(\"trace\", message, values, void 0, sourceLocation);\n\t}\n\tdebug(message, ...values) {\n\t\tconst sourceLocation = isSourceLocationCaptureActive() ? this.captureSourceLocation(\"debug\") : void 0;\n\t\tif (typeof message === \"string\") return logStringMessage(this, \"debug\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"function\") this.logLazily(\"debug\", message, void 0, sourceLocation);\n\t\telse if (!Array.isArray(message)) this.log(\"debug\", \"{*}\", message, void 0, sourceLocation);\n\t\telse this.logTemplate(\"debug\", message, values, void 0, sourceLocation);\n\t}\n\tinfo(message, ...values) {\n\t\tconst sourceLocation = isSourceLocationCaptureActive() ? this.captureSourceLocation(\"info\") : void 0;\n\t\tif (typeof message === \"string\") return logStringMessage(this, \"info\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"function\") this.logLazily(\"info\", message, void 0, sourceLocation);\n\t\telse if (!Array.isArray(message)) this.log(\"info\", \"{*}\", message, void 0, sourceLocation);\n\t\telse this.logTemplate(\"info\", message, values, void 0, sourceLocation);\n\t}\n\tlogError(level, error, props, sourceLocation) {\n\t\tif (typeof props !== \"function\") {\n\t\t\tthis.log(level, \"{error.message}\", {\n\t\t\t\t...props,\n\t\t\t\terror\n\t\t\t}, void 0, sourceLocation);\n\t\t\treturn;\n\t\t}\n\t\tif (!this.isEnabledFor(level)) return Promise.resolve();\n\t\tconst result = props();\n\t\tif (result instanceof Promise) return result.then((resolved) => {\n\t\t\tthis.log(level, \"{error.message}\", {\n\t\t\t\t...resolved,\n\t\t\t\terror\n\t\t\t}, void 0, sourceLocation);\n\t\t});\n\t\tthis.log(level, \"{error.message}\", {\n\t\t\t...result,\n\t\t\terror\n\t\t}, void 0, sourceLocation);\n\t}\n\twarn(message, ...values) {\n\t\tconst sourceLocation = isSourceLocationCaptureActive() ? this.captureSourceLocation(\"warning\") : void 0;\n\t\tif (message instanceof Error) return this.logError(\"warning\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"string\" && values[0] instanceof Error) this.log(\"warning\", message, { error: values[0] }, void 0, sourceLocation);\n\t\telse if (typeof message === \"string\") return logStringMessage(this, \"warning\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"function\") this.logLazily(\"warning\", message, void 0, sourceLocation);\n\t\telse if (!Array.isArray(message)) this.log(\"warning\", \"{*}\", message, void 0, sourceLocation);\n\t\telse this.logTemplate(\"warning\", message, values, void 0, sourceLocation);\n\t}\n\twarning(message, ...values) {\n\t\tconst sourceLocation = isSourceLocationCaptureActive() ? this.captureSourceLocation(\"warning\") : void 0;\n\t\tif (message instanceof Error) return this.logError(\"warning\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"string\" && values[0] instanceof Error) this.log(\"warning\", message, { error: values[0] }, void 0, sourceLocation);\n\t\telse if (typeof message === \"string\") return logStringMessage(this, \"warning\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"function\") this.logLazily(\"warning\", message, void 0, sourceLocation);\n\t\telse if (!Array.isArray(message)) this.log(\"warning\", \"{*}\", message, void 0, sourceLocation);\n\t\telse this.logTemplate(\"warning\", message, values, void 0, sourceLocation);\n\t}\n\terror(message, ...values) {\n\t\tconst sourceLocation = isSourceLocationCaptureActive() ? this.captureSourceLocation(\"error\") : void 0;\n\t\tif (message instanceof Error) return this.logError(\"error\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"string\" && values[0] instanceof Error) this.log(\"error\", message, { error: values[0] }, void 0, sourceLocation);\n\t\telse if (typeof message === \"string\") return logStringMessage(this, \"error\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"function\") this.logLazily(\"error\", message, void 0, sourceLocation);\n\t\telse if (!Array.isArray(message)) this.log(\"error\", \"{*}\", message, void 0, sourceLocation);\n\t\telse this.logTemplate(\"error\", message, values, void 0, sourceLocation);\n\t}\n\tfatal(message, ...values) {\n\t\tconst sourceLocation = isSourceLocationCaptureActive() ? this.captureSourceLocation(\"fatal\") : void 0;\n\t\tif (message instanceof Error) return this.logError(\"fatal\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"string\" && values[0] instanceof Error) this.log(\"fatal\", message, { error: values[0] }, void 0, sourceLocation);\n\t\telse if (typeof message === \"string\") return logStringMessage(this, \"fatal\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"function\") this.logLazily(\"fatal\", message, void 0, sourceLocation);\n\t\telse if (!Array.isArray(message)) this.log(\"fatal\", \"{*}\", message, void 0, sourceLocation);\n\t\telse this.logTemplate(\"fatal\", message, values, void 0, sourceLocation);\n\t}\n};\n/**\n* A logger implementation with contextual properties. Do not use this\n* directly; use {@link Logger.with} instead. This class is exported\n* for testing purposes.\n*/\nvar LoggerCtx = class LoggerCtx {\n\tlogger;\n\tproperties;\n\tconstructor(logger, properties) {\n\t\tthis.logger = logger;\n\t\tthis.properties = properties;\n\t}\n\tget category() {\n\t\treturn this.logger.category;\n\t}\n\tget parent() {\n\t\treturn this.logger.parent;\n\t}\n\tgetChild(subcategory) {\n\t\treturn this.logger.getChild(subcategory).with(this.properties);\n\t}\n\twith(properties) {\n\t\treturn new LoggerCtx(this.logger, {\n\t\t\t...this.properties,\n\t\t\t...properties\n\t\t});\n\t}\n\tlog(level, message, properties, bypassSinks, sourceLocation) {\n\t\tif (this.logger.isCertainlyDropped(level)) return;\n\t\tconst contextProps = this.properties;\n\t\tthis.logger.log(level, message, typeof properties === \"function\" ? () => resolveProperties({\n\t\t\t...contextProps,\n\t\t\t...properties()\n\t\t}) : () => resolveProperties({\n\t\t\t...contextProps,\n\t\t\t...properties\n\t\t}), bypassSinks, sourceLocation);\n\t}\n\tlogLazily(level, callback, sourceLocation) {\n\t\tif (this.logger.isCertainlyDropped(level)) return;\n\t\tthis.logger.logLazily(level, callback, resolveProperties(this.properties), sourceLocation);\n\t}\n\tlogTemplate(level, messageTemplate, values, sourceLocation) {\n\t\tif (this.logger.isCertainlyDropped(level)) return;\n\t\tthis.logger.logTemplate(level, messageTemplate, values, resolveProperties(this.properties), sourceLocation);\n\t}\n\temit(record) {\n\t\tconst recordWithContext = {\n\t\t\t...record,\n\t\t\tproperties: resolveProperties({\n\t\t\t\t...this.properties,\n\t\t\t\t...record.properties\n\t\t\t})\n\t\t};\n\t\tthis.logger.emit(recordWithContext);\n\t}\n\tisEnabledFor(level) {\n\t\treturn this.logger.isEnabledFor(level);\n\t}\n\ttrace(message, ...values) {\n\t\tconst sourceLocation = isSourceLocationCaptureActive() ? this.logger.captureSourceLocation(\"trace\") : void 0;\n\t\tif (typeof message === \"string\") return logStringMessage(this, \"trace\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"function\") this.logLazily(\"trace\", message, sourceLocation);\n\t\telse if (!Array.isArray(message)) this.log(\"trace\", \"{*}\", message, void 0, sourceLocation);\n\t\telse this.logTemplate(\"trace\", message, values, sourceLocation);\n\t}\n\tdebug(message, ...values) {\n\t\tconst sourceLocation = isSourceLocationCaptureActive() ? this.logger.captureSourceLocation(\"debug\") : void 0;\n\t\tif (typeof message === \"string\") return logStringMessage(this, \"debug\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"function\") this.logLazily(\"debug\", message, sourceLocation);\n\t\telse if (!Array.isArray(message)) this.log(\"debug\", \"{*}\", message, void 0, sourceLocation);\n\t\telse this.logTemplate(\"debug\", message, values, sourceLocation);\n\t}\n\tinfo(message, ...values) {\n\t\tconst sourceLocation = isSourceLocationCaptureActive() ? this.logger.captureSourceLocation(\"info\") : void 0;\n\t\tif (typeof message === \"string\") return logStringMessage(this, \"info\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"function\") this.logLazily(\"info\", message, sourceLocation);\n\t\telse if (!Array.isArray(message)) this.log(\"info\", \"{*}\", message, void 0, sourceLocation);\n\t\telse this.logTemplate(\"info\", message, values, sourceLocation);\n\t}\n\tlogError(level, error, props, sourceLocation) {\n\t\tif (typeof props !== \"function\") {\n\t\t\tthis.log(level, \"{error.message}\", {\n\t\t\t\t...props,\n\t\t\t\terror\n\t\t\t}, void 0, sourceLocation);\n\t\t\treturn;\n\t\t}\n\t\tif (!this.isEnabledFor(level)) return Promise.resolve();\n\t\tconst result = props();\n\t\tif (result instanceof Promise) return result.then((resolved) => {\n\t\t\tthis.log(level, \"{error.message}\", {\n\t\t\t\t...resolved,\n\t\t\t\terror\n\t\t\t}, void 0, sourceLocation);\n\t\t});\n\t\tthis.log(level, \"{error.message}\", {\n\t\t\t...result,\n\t\t\terror\n\t\t}, void 0, sourceLocation);\n\t}\n\twarn(message, ...values) {\n\t\tconst sourceLocation = isSourceLocationCaptureActive() ? this.logger.captureSourceLocation(\"warning\") : void 0;\n\t\tif (message instanceof Error) return this.logError(\"warning\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"string\" && values[0] instanceof Error) this.log(\"warning\", message, { error: values[0] }, void 0, sourceLocation);\n\t\telse if (typeof message === \"string\") return logStringMessage(this, \"warning\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"function\") this.logLazily(\"warning\", message, sourceLocation);\n\t\telse if (!Array.isArray(message)) this.log(\"warning\", \"{*}\", message, void 0, sourceLocation);\n\t\telse this.logTemplate(\"warning\", message, values, sourceLocation);\n\t}\n\twarning(message, ...values) {\n\t\tconst sourceLocation = isSourceLocationCaptureActive() ? this.logger.captureSourceLocation(\"warning\") : void 0;\n\t\tif (message instanceof Error) return this.logError(\"warning\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"string\" && values[0] instanceof Error) this.log(\"warning\", message, { error: values[0] }, void 0, sourceLocation);\n\t\telse if (typeof message === \"string\") return logStringMessage(this, \"warning\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"function\") this.logLazily(\"warning\", message, sourceLocation);\n\t\telse if (!Array.isArray(message)) this.log(\"warning\", \"{*}\", message, void 0, sourceLocation);\n\t\telse this.logTemplate(\"warning\", message, values, sourceLocation);\n\t}\n\terror(message, ...values) {\n\t\tconst sourceLocation = isSourceLocationCaptureActive() ? this.logger.captureSourceLocation(\"error\") : void 0;\n\t\tif (message instanceof Error) return this.logError(\"error\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"string\" && values[0] instanceof Error) this.log(\"error\", message, { error: values[0] }, void 0, sourceLocation);\n\t\telse if (typeof message === \"string\") return logStringMessage(this, \"error\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"function\") this.logLazily(\"error\", message, sourceLocation);\n\t\telse if (!Array.isArray(message)) this.log(\"error\", \"{*}\", message, void 0, sourceLocation);\n\t\telse this.logTemplate(\"error\", message, values, sourceLocation);\n\t}\n\tfatal(message, ...values) {\n\t\tconst sourceLocation = isSourceLocationCaptureActive() ? this.logger.captureSourceLocation(\"fatal\") : void 0;\n\t\tif (message instanceof Error) return this.logError(\"fatal\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"string\" && values[0] instanceof Error) this.log(\"fatal\", message, { error: values[0] }, void 0, sourceLocation);\n\t\telse if (typeof message === \"string\") return logStringMessage(this, \"fatal\", message, values[0], sourceLocation);\n\t\telse if (typeof message === \"function\") this.logLazily(\"fatal\", message, sourceLocation);\n\t\telse if (!Array.isArray(message)) this.log(\"fatal\", \"{*}\", message, void 0, sourceLocation);\n\t\telse this.logTemplate(\"fatal\", message, values, sourceLocation);\n\t}\n};\n/**\n* The meta logger. It is a logger with the category `[\"logtape\", \"meta\"]`.\n*/\nconst metaLogger = LoggerImpl.getLogger([\"logtape\", \"meta\"]);\n/**\n* Check if a property access key contains nested access patterns.\n* @param key The property key to check.\n* @returns True if the key contains nested access patterns.\n*/\nfunction isNestedAccess(key) {\n\treturn key.includes(\".\") || key.includes(\"[\") || key.includes(\"?.\");\n}\n/**\n* Safely access an own property from an object, blocking prototype pollution.\n*\n* @param obj The object to access the property from.\n* @param key The property key to access.\n* @returns The property value or undefined if not accessible.\n*/\nfunction getOwnProperty(obj, key) {\n\tif (key === \"__proto__\" || key === \"prototype\" || key === \"constructor\") return void 0;\n\tif ((typeof obj === \"object\" || typeof obj === \"function\") && obj !== null) return Object.prototype.hasOwnProperty.call(obj, key) ? obj[key] : void 0;\n\treturn void 0;\n}\n/**\n* Parse the next segment from a property path string.\n*\n* @param path The full property path string.\n* @param fromIndex The index to start parsing from.\n* @returns The parsed segment and next index, or null if parsing fails.\n*/\nfunction parseNextSegment(path, fromIndex) {\n\tconst len = path.length;\n\tlet i = fromIndex;\n\tif (i >= len) return null;\n\tlet segment;\n\tif (path[i] === \"[\") {\n\t\ti++;\n\t\tif (i >= len) return null;\n\t\tif (path[i] === \"\\\"\" || path[i] === \"'\") {\n\t\t\tconst quote = path[i];\n\t\t\ti++;\n\t\t\tlet segmentStr = \"\";\n\t\t\twhile (i < len && path[i] !== quote) if (path[i] === \"\\\\\") {\n\t\t\t\ti++;\n\t\t\t\tif (i < len) {\n\t\t\t\t\tconst escapeChar = path[i];\n\t\t\t\t\tswitch (escapeChar) {\n\t\t\t\t\t\tcase \"n\":\n\t\t\t\t\t\t\tsegmentStr += \"\\n\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"t\":\n\t\t\t\t\t\t\tsegmentStr += \"\t\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"r\":\n\t\t\t\t\t\t\tsegmentStr += \"\\r\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"b\":\n\t\t\t\t\t\t\tsegmentStr += \"\\b\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"f\":\n\t\t\t\t\t\t\tsegmentStr += \"\\f\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"v\":\n\t\t\t\t\t\t\tsegmentStr += \"\\v\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"0\":\n\t\t\t\t\t\t\tsegmentStr += \"\\0\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"\\\\\":\n\t\t\t\t\t\t\tsegmentStr += \"\\\\\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"\\\"\":\n\t\t\t\t\t\t\tsegmentStr += \"\\\"\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"'\":\n\t\t\t\t\t\t\tsegmentStr += \"'\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"u\":\n\t\t\t\t\t\t\tif (i + 4 < len) {\n\t\t\t\t\t\t\t\tconst hex = path.slice(i + 1, i + 5);\n\t\t\t\t\t\t\t\tconst codePoint = Number.parseInt(hex, 16);\n\t\t\t\t\t\t\t\tif (!Number.isNaN(codePoint)) {\n\t\t\t\t\t\t\t\t\tsegmentStr += String.fromCharCode(codePoint);\n\t\t\t\t\t\t\t\t\ti += 4;\n\t\t\t\t\t\t\t\t} else segmentStr += escapeChar;\n\t\t\t\t\t\t\t} else segmentStr += escapeChar;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: segmentStr += escapeChar;\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsegmentStr += path[i];\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (i >= len) return null;\n\t\t\tsegment = segmentStr;\n\t\t\ti++;\n\t\t} else {\n\t\t\tconst startIndex = i;\n\t\t\twhile (i < len && path[i] !== \"]\" && path[i] !== \"'\" && path[i] !== \"\\\"\") i++;\n\t\t\tif (i >= len) return null;\n\t\t\tconst indexStr = path.slice(startIndex, i);\n\t\t\tif (indexStr.length === 0) return null;\n\t\t\tconst indexNum = Number(indexStr);\n\t\t\tsegment = Number.isNaN(indexNum) ? indexStr : indexNum;\n\t\t}\n\t\twhile (i < len && path[i] !== \"]\") i++;\n\t\tif (i < len) i++;\n\t} else {\n\t\tconst startIndex = i;\n\t\twhile (i < len && path[i] !== \".\" && path[i] !== \"[\" && path[i] !== \"?\" && path[i] !== \"]\") i++;\n\t\tsegment = path.slice(startIndex, i);\n\t\tif (segment.length === 0) return null;\n\t}\n\tif (i < len && path[i] === \".\") i++;\n\treturn {\n\t\tsegment,\n\t\tnextIndex: i\n\t};\n}\n/**\n* Access a property or index on an object or array.\n*\n* @param obj The object or array to access.\n* @param segment The property key or array index.\n* @returns The accessed value or undefined if not accessible.\n*/\nfunction accessProperty(obj, segment) {\n\tif (typeof segment === \"string\") return getOwnProperty(obj, segment);\n\tif (Array.isArray(obj) && segment >= 0 && segment < obj.length) return obj[segment];\n\treturn void 0;\n}\n/**\n* Resolve a nested property path from an object.\n*\n* There are two types of property access patterns:\n* 1. Array/index access: [0] or [\"prop\"]\n* 2. Property access: prop or prop?.next\n*\n* @param obj The object to traverse.\n* @param path The property path (e.g., \"user.name\", \"users[0].email\", \"user['full-name']\").\n* @returns The resolved value or undefined if path doesn't exist.\n*/\nfunction resolvePropertyPath(obj, path) {\n\tif (obj == null) return void 0;\n\tif (path.length === 0 || path.endsWith(\".\")) return void 0;\n\tlet current = obj;\n\tlet i = 0;\n\tconst len = path.length;\n\twhile (i < len) {\n\t\tconst isOptional = path.slice(i, i + 2) === \"?.\";\n\t\tif (isOptional) {\n\t\t\ti += 2;\n\t\t\tif (current == null) return void 0;\n\t\t} else if (current == null) return void 0;\n\t\tconst result = parseNextSegment(path, i);\n\t\tif (result === null) return void 0;\n\t\tconst { segment, nextIndex } = result;\n\t\ti = nextIndex;\n\t\tcurrent = accessProperty(current, segment);\n\t\tif (current === void 0) return void 0;\n\t}\n\treturn current;\n}\n/**\n* Parse a message template into a message template array and a values array.\n*\n* Placeholders to be replaced with `values` are indicated by keys in curly braces\n* (e.g., `{value}`). The system supports both simple property access and nested\n* property access patterns:\n*\n* **Simple property access:**\n* ```ts\n* parseMessageTemplate(\"Hello, {user}!\", { user: \"foo\" })\n* // Returns: [\"Hello, \", \"foo\", \"!\"]\n* ```\n*\n* **Nested property access (dot notation):**\n* ```ts\n* parseMessageTemplate(\"Hello, {user.name}!\", {\n* user: { name: \"foo\", email: \"foo@example.com\" }\n* })\n* // Returns: [\"Hello, \", \"foo\", \"!\"]\n* ```\n*\n* **Array indexing:**\n* ```ts\n* parseMessageTemplate(\"First: {users[0]}\", {\n* users: [\"foo\", \"bar\", \"baz\"]\n* })\n* // Returns: [\"First: \", \"foo\", \"\"]\n* ```\n*\n* **Bracket notation for special property names:**\n* ```ts\n* parseMessageTemplate(\"Name: {user[\\\"full-name\\\"]}\", {\n* user: { \"full-name\": \"foo bar\" }\n* })\n* // Returns: [\"Name: \", \"foo bar\", \"\"]\n* ```\n*\n* **Optional chaining for safe navigation:**\n* ```ts\n* parseMessageTemplate(\"Email: {user?.profile?.email}\", {\n* user: { name: \"foo\" }\n* })\n* // Returns: [\"Email: \", undefined, \"\"]\n* ```\n*\n* **Wildcard patterns:**\n* - `{*}` - Replaced with the entire properties object\n* - `{ key-with-whitespace }` - Whitespace is trimmed when looking up keys\n*\n* **Escaping:**\n* - `{{` and `}}` are escaped literal braces\n*\n* **Error handling:**\n* - Non-existent paths return `undefined`\n* - Malformed expressions resolve to `undefined` without throwing errors\n* - Out of bounds array access returns `undefined`\n*\n* @param template The message template string containing placeholders.\n* @param properties The values to replace placeholders with.\n* @returns The message template array with values interleaved between text segments.\n*/\nfunction parseMessageTemplate(template, properties) {\n\tconst length = template.length;\n\tif (length === 0) return [\"\"];\n\tif (!template.includes(\"{\")) return [template];\n\tconst message = [];\n\tlet startIndex = 0;\n\tfor (let i = 0; i < length; i++) {\n\t\tconst char = template[i];\n\t\tif (char === \"{\") {\n\t\t\tconst nextChar = i + 1 < length ? template[i + 1] : \"\";\n\t\t\tif (nextChar === \"{\") {\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst closeIndex = template.indexOf(\"}\", i + 1);\n\t\t\tif (closeIndex === -1) continue;\n\t\t\tconst beforeText = template.slice(startIndex, i);\n\t\t\tmessage.push(beforeText.replace(/{{/g, \"{\").replace(/}}/g, \"}\"));\n\t\t\tconst key = template.slice(i + 1, closeIndex);\n\t\t\tlet prop;\n\t\t\tconst trimmedKey = key.trim();\n\t\t\tif (trimmedKey === \"*\") prop = key in properties ? properties[key] : \"*\" in properties ? properties[\"*\"] : properties;\n\t\t\telse {\n\t\t\t\tif (key !== trimmedKey) prop = key in properties ? properties[key] : properties[trimmedKey];\n\t\t\t\telse prop = properties[key];\n\t\t\t\tif (prop === void 0 && isNestedAccess(trimmedKey)) prop = resolvePropertyPath(properties, trimmedKey);\n\t\t\t}\n\t\t\tmessage.push(prop);\n\t\t\ti = closeIndex;\n\t\t\tstartIndex = i + 1;\n\t\t} else if (char === \"}\" && i + 1 < length && template[i + 1] === \"}\") i++;\n\t}\n\tconst remainingText = template.slice(startIndex);\n\tmessage.push(remainingText.replace(/{{/g, \"{\").replace(/}}/g, \"}\"));\n\treturn message;\n}\n/**\n* Render a message template with values.\n* @param template The message template.\n* @param values The message template values.\n* @returns The message template values interleaved between the substitution\n* values.\n*/\nfunction renderMessage(template, values) {\n\tconst args = [];\n\tfor (let i = 0; i < template.length; i++) {\n\t\targs.push(template[i]);\n\t\tif (i < values.length) args.push(values[i]);\n\t}\n\treturn args;\n}\n\n//#endregion\nexport { LoggerImpl, findLogger, getLogger, getLoggers, isLazy, isMetaLoggerCategory, lazy };\n//# sourceMappingURL=logger.js.map","import { LoggerImpl } from \"./logger.js\";\n\n//#region src/context.ts\n/**\n* Internal symbol for storing category prefix in context.\n*/\nconst categoryPrefixSymbol = Symbol.for(\"logtape.categoryPrefix\");\n/**\n* Runs a callback with the given implicit context. Every single log record\n* in the callback will have the given context.\n*\n* If no `contextLocalStorage` is configured, this function does nothing and\n* just returns the return value of the callback. It also logs a warning to\n* the `[\"logtape\", \"meta\"]` logger in this case.\n* @param context The context to inject.\n* @param callback The callback to run.\n* @returns The return value of the callback.\n* @since 0.7.0\n*/\nfunction withContext(context, callback) {\n\tconst rootLogger = LoggerImpl.getLogger();\n\tif (rootLogger.contextLocalStorage == null) {\n\t\tLoggerImpl.getLogger([\"logtape\", \"meta\"]).warn(\"Context-local storage is not configured. Specify contextLocalStorage option in the configure() function.\");\n\t\treturn callback();\n\t}\n\tconst parentContext = rootLogger.contextLocalStorage.getStore() ?? {};\n\treturn rootLogger.contextLocalStorage.run({\n\t\t...parentContext,\n\t\t...context\n\t}, callback);\n}\n/**\n* Gets the current category prefix from context local storage.\n* @returns The current category prefix, or an empty array if not set.\n* @since 1.3.0\n*/\nfunction getCategoryPrefix() {\n\tconst rootLogger = LoggerImpl.getLogger();\n\tconst store = rootLogger.contextLocalStorage?.getStore();\n\tif (store == null) return [];\n\tconst prefix = store[categoryPrefixSymbol];\n\treturn Array.isArray(prefix) ? prefix : [];\n}\n/**\n* Gets the current implicit context only when user-visible context keys exist.\n*\n* This is intentionally not exported from the public entry point. Hot logging\n* paths use it to avoid allocating a fresh `{}` when no implicit context is\n* active, while `getImplicitContext()` keeps its public return contract.\n* @returns The current implicit context without internal symbol keys, or\n* `undefined` if there is no user-visible implicit context.\n*/\nfunction getImplicitContextIfAny() {\n\tconst rootLogger = LoggerImpl.getLogger();\n\tconst store = rootLogger.contextLocalStorage?.getStore();\n\tif (store == null) return void 0;\n\tconst keys = Object.keys(store);\n\tif (keys.length < 1) return void 0;\n\tconst result = {};\n\tfor (const key of keys) result[key] = store[key];\n\treturn result;\n}\n/**\n* Runs a callback with the given category prefix prepended to all log\n* categories within the callback context.\n*\n* This is useful for SDKs or libraries that want to add their own category\n* as a prefix to logs from their internal dependencies.\n*\n* If no `contextLocalStorage` is configured, this function does nothing and\n* just returns the return value of the callback. It also logs a warning to\n* the `[\"logtape\", \"meta\"]` logger in this case.\n*\n* @example Basic usage\n* ```typescript\n* import { getLogger, withCategoryPrefix } from \"@logtape/logtape\";\n*\n* export function sdkFunction() {\n* return withCategoryPrefix([\"my-sdk\"], () => {\n* // Any logs from internal libraries within this context\n* // will have [\"my-sdk\"] prepended to their category\n* return internalLibraryFunction();\n* });\n* }\n* ```\n*\n* @param prefix The category prefix to prepend. Can be a string or an array\n* of strings.\n* @param callback The callback to run.\n* @returns The return value of the callback.\n* @since 1.3.0\n*/\nfunction withCategoryPrefix(prefix, callback) {\n\tconst rootLogger = LoggerImpl.getLogger();\n\tif (rootLogger.contextLocalStorage == null) {\n\t\tLoggerImpl.getLogger([\"logtape\", \"meta\"]).warn(\"Context-local storage is not configured. Specify contextLocalStorage option in the configure() function.\");\n\t\treturn callback();\n\t}\n\tconst parentContext = rootLogger.contextLocalStorage.getStore() ?? {};\n\tconst parentPrefix = getCategoryPrefix();\n\tconst newPrefix = typeof prefix === \"string\" ? [prefix] : [...prefix];\n\treturn rootLogger.contextLocalStorage.run({\n\t\t...parentContext,\n\t\t[categoryPrefixSymbol]: [...parentPrefix, ...newPrefix]\n\t}, callback);\n}\n\n//#endregion\nexport { getCategoryPrefix, getImplicitContextIfAny, withCategoryPrefix, withContext };\n//# sourceMappingURL=context.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.LRUCacheNode = void 0;\r\nclass LRUCacheNode {\r\n constructor(key, value, options) {\r\n const { entryExpirationTimeInMS = null, next = null, prev = null, onEntryEvicted, onEntryMarkedAsMostRecentlyUsed, clone, cloneFn } = options !== null && options !== void 0 ? options : {};\r\n if (typeof entryExpirationTimeInMS === 'number' &&\r\n (entryExpirationTimeInMS <= 0 || Number.isNaN(entryExpirationTimeInMS))) {\r\n throw new Error('entryExpirationTimeInMS must either be null (no expiry) or greater than 0');\r\n }\r\n this.clone = clone !== null && clone !== void 0 ? clone : false;\r\n this.cloneFn = cloneFn !== null && cloneFn !== void 0 ? cloneFn : this.defaultClone;\r\n this.key = key;\r\n this.internalValue = this.clone ? this.cloneFn(value) : value;\r\n this.created = Date.now();\r\n this.entryExpirationTimeInMS = entryExpirationTimeInMS;\r\n this.next = next;\r\n this.prev = prev;\r\n this.onEntryEvicted = onEntryEvicted;\r\n this.onEntryMarkedAsMostRecentlyUsed = onEntryMarkedAsMostRecentlyUsed;\r\n }\r\n get value() {\r\n return this.clone ? this.cloneFn(this.internalValue) : this.internalValue;\r\n }\r\n get isExpired() {\r\n return typeof this.entryExpirationTimeInMS === 'number' && Date.now() - this.created > this.entryExpirationTimeInMS;\r\n }\r\n invokeOnEvicted() {\r\n if (this.onEntryEvicted) {\r\n const { key, value, isExpired } = this;\r\n this.onEntryEvicted({ key, value, isExpired });\r\n }\r\n }\r\n invokeOnEntryMarkedAsMostRecentlyUsed() {\r\n if (this.onEntryMarkedAsMostRecentlyUsed) {\r\n const { key, value } = this;\r\n this.onEntryMarkedAsMostRecentlyUsed({ key, value });\r\n }\r\n }\r\n defaultClone(value) {\r\n if (typeof value === 'boolean' || typeof value === 'string' || typeof value === 'number') {\r\n return value;\r\n }\r\n return JSON.parse(JSON.stringify(value));\r\n }\r\n}\r\nexports.LRUCacheNode = LRUCacheNode;\r\n//# sourceMappingURL=LRUCacheNode.js.map","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.LRUCache = void 0;\r\nconst LRUCacheNode_1 = require(\"./LRUCacheNode\");\r\n/**\r\n * A key value cache that implements the LRU policy.\r\n *\r\n * @typeparam TKey The type of the keys in the cache. Defaults to `string`.\r\n * @typeparam TValue The type of the values in the cache. Defaults to `any`.\r\n *\r\n * @see {@link https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)}\r\n */\r\nclass LRUCache {\r\n /**\r\n * Creates a new instance of the LRUCache.\r\n *\r\n * @param options Additional configuration options for the LRUCache.\r\n *\r\n * @example\r\n * ```typescript\r\n * // No options.\r\n * const cache = new LRUCache();\r\n *\r\n * // With options.\r\n * const cache = new LRUCache({\r\n * entryExpirationTimeInMS: 10000\r\n * });\r\n * ```\r\n */\r\n constructor(options) {\r\n this.lookupTable = new Map();\r\n this.head = null;\r\n this.tail = null;\r\n const { maxSize = 25, entryExpirationTimeInMS = null, onEntryEvicted, onEntryMarkedAsMostRecentlyUsed, cloneFn, clone } = options !== null && options !== void 0 ? options : {};\r\n if (Number.isNaN(maxSize) || maxSize <= 0) {\r\n throw new Error('maxSize must be greater than 0.');\r\n }\r\n if (typeof entryExpirationTimeInMS === 'number' &&\r\n (entryExpirationTimeInMS <= 0 || Number.isNaN(entryExpirationTimeInMS))) {\r\n throw new Error('entryExpirationTimeInMS must either be null (no expiry) or greater than 0');\r\n }\r\n this.maxSizeInternal = maxSize;\r\n this.entryExpirationTimeInMS = entryExpirationTimeInMS;\r\n this.onEntryEvicted = onEntryEvicted;\r\n this.onEntryMarkedAsMostRecentlyUsed = onEntryMarkedAsMostRecentlyUsed;\r\n this.clone = clone;\r\n this.cloneFn = cloneFn;\r\n }\r\n /**\r\n * Returns the number of entries in the LRUCache object.\r\n * If the cache has entryExpirationTimeInMS set, expired entries will be removed before the size is returned.\r\n *\r\n * @returns The number of entries in the cache.\r\n *\r\n * @example\r\n * ```typescript\r\n * const cache = new LRUCache();\r\n *\r\n * cache.set('testKey', 'testValue');\r\n *\r\n * const size = cache.size;\r\n *\r\n * // Will log 1\r\n * console.log(size);\r\n * ```\r\n */\r\n get size() {\r\n this.cleanCache();\r\n return this.lookupTable.size;\r\n }\r\n /**\r\n * Returns the number of entries that can still be added to the LRUCache without evicting existing entries.\r\n *\r\n * @returns The number of entries that can still be added without evicting existing entries.\r\n *\r\n * @example\r\n * ```typescript\r\n * const cache = new LRUCache({ maxSize: 10 });\r\n *\r\n * cache.set('testKey', 'testValue');\r\n *\r\n * const remainingSize = cache.remainingSize;\r\n *\r\n * // Will log 9 due to 9 spots remaining before reaching maxSize of 10.\r\n * console.log(remainingSize);\r\n * ```\r\n */\r\n get remainingSize() {\r\n return this.maxSizeInternal - this.size;\r\n }\r\n /**\r\n * Returns the most recently used (newest) entry in the cache.\r\n * This will not mark the entry as recently used.\r\n * If the newest node is expired, it will be removed.\r\n *\r\n * @returns The most recently used (newest) entry in the cache.\r\n *\r\n * @example\r\n * ```typescript\r\n * const cache = new LRUCache({ maxSize: 10 });\r\n *\r\n * cache.set('testKey', 'testValue');\r\n *\r\n * const newest = cache.newest;\r\n *\r\n * // Will log testValue\r\n * console.log(newest.value);\r\n *\r\n * // Will log testKey\r\n * console.log(newest.key);\r\n * ```\r\n */\r\n get newest() {\r\n if (!this.head) {\r\n return null;\r\n }\r\n if (this.head.isExpired) {\r\n this.removeNodeFromListAndLookupTable(this.head);\r\n return this.newest;\r\n }\r\n return this.mapNodeToEntry(this.head);\r\n }\r\n /**\r\n * Returns the least recently used (oldest) entry in the cache.\r\n * This will not mark the entry as recently used.\r\n * If the oldest node is expired, it will be removed.\r\n *\r\n * @returns The least recently used (oldest) entry in the cache.\r\n *\r\n * @example\r\n * ```typescript\r\n * const cache = new LRUCache({ maxSize: 10 });\r\n *\r\n * cache.set('testKey', 'testValue');\r\n *\r\n * const oldest = cache.oldest;\r\n *\r\n * // Will log testValue\r\n * console.log(oldest.value);\r\n *\r\n * // Will log testKey\r\n * console.log(oldest.key);\r\n * ```\r\n */\r\n get oldest() {\r\n if (!this.tail) {\r\n return null;\r\n }\r\n if (this.tail.isExpired) {\r\n this.removeNodeFromListAndLookupTable(this.tail);\r\n return this.oldest;\r\n }\r\n return this.mapNodeToEntry(this.tail);\r\n }\r\n /**\r\n * Gets or sets the maxSize of the cache.\r\n * This will evict the least recently used entries if needed to reach new maxSize.\r\n *\r\n * @param value The new value for maxSize. Must be greater than 0.\r\n *\r\n * @example\r\n * ```typescript\r\n * const cache = new LRUCache({ maxSize: 10 });\r\n *\r\n * cache.set('testKey', 'testValue');\r\n *\r\n * // Will be 10\r\n * const maxSize = cache.maxSize;\r\n *\r\n * // Set new maxSize to 5. If there are more than 5 items in the cache, the least recently used entries will be removed until cache size is 5.\r\n * cache.maxSize = 5;\r\n * ```\r\n */\r\n get maxSize() {\r\n return this.maxSizeInternal;\r\n }\r\n set maxSize(value) {\r\n if (Number.isNaN(value) || value <= 0) {\r\n throw new Error('maxSize must be greater than 0.');\r\n }\r\n this.maxSizeInternal = value;\r\n this.enforceSizeLimit();\r\n }\r\n /**\r\n * Sets the value for the key in the LRUCache object. Returns the LRUCache object.\r\n * This marks the newly added entry as the most recently used entry.\r\n * If adding the new entry makes the cache size go above maxSize,\r\n * this will evict the least recently used entries until size is equal to maxSize.\r\n *\r\n * @param key The key of the entry.\r\n * @param value The value to set for the key.\r\n * @param entryOptions Additional configuration options for the cache entry.\r\n *\r\n * @returns The LRUCache instance.\r\n *\r\n * @example\r\n * ```typescript\r\n * const cache = new LRUCache();\r\n *\r\n * // Set the key testKey to value testValue\r\n * cache.set('testKey', 'testValue');\r\n *\r\n * // Set the key key2 to value value2. Pass in optional options.\r\n * cache.set('key2', 'value2', { entryExpirationTimeInMS: 10 });\r\n * ```\r\n */\r\n set(key, value, entryOptions) {\r\n const currentNodeForKey = this.lookupTable.get(key);\r\n if (currentNodeForKey) {\r\n this.removeNodeFromListAndLookupTable(currentNodeForKey);\r\n }\r\n const node = new LRUCacheNode_1.LRUCacheNode(key, value, {\r\n entryExpirationTimeInMS: this.entryExpirationTimeInMS,\r\n onEntryEvicted: this.onEntryEvicted,\r\n onEntryMarkedAsMostRecentlyUsed: this.onEntryMarkedAsMostRecentlyUsed,\r\n clone: this.clone,\r\n cloneFn: this.cloneFn,\r\n ...entryOptions\r\n });\r\n this.setNodeAsHead(node);\r\n this.lookupTable.set(key, node);\r\n this.enforceSizeLimit();\r\n return this;\r\n }\r\n /**\r\n * Returns the value associated to the key, or null if there is none or if the entry is expired.\r\n * If an entry is returned, this marks the returned entry as the most recently used entry.\r\n *\r\n * @param key The key of the entry to get.\r\n *\r\n * @returns The cached value or null.\r\n *\r\n * @example\r\n * ```typescript\r\n * const cache = new LRUCache();\r\n *\r\n * // Set the key testKey to value testValue\r\n * cache.set('testKey', 'testValue');\r\n *\r\n * // Will be 'testValue'. Entry will now be most recently used.\r\n * const item1 = cache.get('testKey');\r\n *\r\n * // Will be null\r\n * const item2 = cache.get('keyNotInCache');\r\n * ```\r\n */\r\n get(key) {\r\n const node = this.lookupTable.get(key);\r\n if (!node) {\r\n return null;\r\n }\r\n if (node.isExpired) {\r\n this.removeNodeFromListAndLookupTable(node);\r\n return null;\r\n }\r\n this.setNodeAsHead(node);\r\n return node.value;\r\n }\r\n /**\r\n * Returns the value associated to the key, or null if there is none or if the entry is expired.\r\n * If an entry is returned, this will not mark the entry as most recently accessed.\r\n * Useful if a value is needed but the order of the cache should not be changed.\r\n *\r\n * @param key The key of the entry to get.\r\n *\r\n * @returns The cached value or null.\r\n *\r\n * @example\r\n * ```typescript\r\n * const cache = new LRUCache();\r\n *\r\n * // Set the key testKey to value testValue\r\n * cache.set('testKey', 'testValue');\r\n *\r\n * // Will be 'testValue'\r\n * const item1 = cache.peek('testKey');\r\n *\r\n * // Will be null\r\n * const item2 = cache.peek('keyNotInCache');\r\n * ```\r\n */\r\n peek(key) {\r\n const node = this.lookupTable.get(key);\r\n if (!node) {\r\n return null;\r\n }\r\n if (node.isExpired) {\r\n this.removeNodeFromListAndLookupTable(node);\r\n return null;\r\n }\r\n return node.value;\r\n }\r\n /**\r\n * Deletes the entry for the passed in key.\r\n *\r\n * @param key The key of the entry to delete\r\n *\r\n * @returns True if an element in the LRUCache object existed and has been removed,\r\n * or false if the element does not exist.\r\n *\r\n * @example\r\n * ```typescript\r\n * const cache = new LRUCache();\r\n *\r\n * // Set the key testKey to value testValue\r\n * cache.set('testKey', 'testValue');\r\n *\r\n * // Will be true\r\n * const wasDeleted = cache.delete('testKey');\r\n *\r\n * // Will be false\r\n * const wasDeleted2 = cache.delete('keyNotInCache');\r\n * ```\r\n */\r\n delete(key) {\r\n const node = this.lookupTable.get(key);\r\n if (!node) {\r\n return false;\r\n }\r\n return this.removeNodeFromListAndLookupTable(node);\r\n }\r\n /**\r\n * Returns a boolean asserting whether a value has been associated to the key in the LRUCache object or not.\r\n * This does not mark the entry as recently used.\r\n * If the cache has a key but the entry is expired, it will be removed and false will be returned.\r\n *\r\n * @param key The key of the entry to check if exists\r\n *\r\n * @returns true if the cache contains the supplied key. False if not.\r\n *\r\n * @example\r\n * ```typescript\r\n * const cache = new LRUCache();\r\n *\r\n * // Set the key testKey to value testValue\r\n * cache.set('testKey', 'testValue');\r\n *\r\n * // Will be true\r\n * const wasDeleted = cache.has('testKey');\r\n *\r\n * // Will be false\r\n * const wasDeleted2 = cache.has('keyNotInCache');\r\n * ```\r\n */\r\n has(key) {\r\n const node = this.lookupTable.get(key);\r\n if (!node) {\r\n return false;\r\n }\r\n if (node.isExpired) {\r\n this.removeNodeFromListAndLookupTable(node);\r\n return false;\r\n }\r\n return true;\r\n }\r\n /**\r\n * Removes all entries in the cache.\r\n *\r\n * @example\r\n * ```typescript\r\n * const cache = new LRUCache();\r\n *\r\n * // Set the key testKey to value testValue\r\n * cache.set('testKey', 'testValue');\r\n *\r\n * // Clear cache.\r\n * cache.clear();\r\n * ```\r\n */\r\n clear() {\r\n this.head = null;\r\n this.tail = null;\r\n this.lookupTable.clear();\r\n }\r\n /**\r\n * Searches the cache for an entry matching the passed in condition.\r\n * Expired entries will be skipped (and removed).\r\n * If multiply entries in the cache match the condition, the most recently used entry will be returned.\r\n * If an entry is returned, this marks the returned entry as the most recently used entry.\r\n *\r\n * @param condition The condition to apply to each entry in the\r\n *\r\n * @returns The first cache entry to match the condition. Null if none match.\r\n *\r\n * @example\r\n * ```typescript\r\n * const cache = new LRUCache();\r\n *\r\n * // Set the key testKey to value testValue\r\n * cache.set('testKey', 'testValue');\r\n *\r\n * // item will be { key: 'testKey', value: 'testValue }\r\n * const item = cache.find(entry => {\r\n * const { key, value } = entry;\r\n *\r\n * if (key === 'testKey' || value === 'something') {\r\n * return true;\r\n * }\r\n *\r\n * return false;\r\n * });\r\n *\r\n * // item2 will be null\r\n * const item2 = cache.find(entry => entry.key === 'notInCache');\r\n * ```\r\n */\r\n find(condition) {\r\n let node = this.head;\r\n while (node) {\r\n if (node.isExpired) {\r\n const next = node.next;\r\n this.removeNodeFromListAndLookupTable(node);\r\n node = next;\r\n continue;\r\n }\r\n const entry = this.mapNodeToEntry(node);\r\n if (condition(entry)) {\r\n this.setNodeAsHead(node);\r\n return entry;\r\n }\r\n node = node.next;\r\n }\r\n return null;\r\n }\r\n /**\r\n * Iterates over and applies the callback function to each entry in the cache.\r\n * Iterates in order from most recently accessed entry to least recently.\r\n * Expired entries will be skipped (and removed).\r\n * No entry will be marked as recently used.\r\n *\r\n * @param callback the callback function to apply to the entry\r\n *\r\n * @example\r\n * ```typescript\r\n * const cache = new LRUCache();\r\n *\r\n * // Set the key testKey to value testValue\r\n * cache.set('testKey', 'testValue');\r\n *\r\n * cache.forEach((key, value, index) => {\r\n * // do something with key, value, and/or index\r\n * });\r\n * ```\r\n */\r\n forEach(callback) {\r\n let node = this.head;\r\n let index = 0;\r\n while (node) {\r\n if (node.isExpired) {\r\n const next = node.next;\r\n this.removeNodeFromListAndLookupTable(node);\r\n node = next;\r\n continue;\r\n }\r\n callback(node.value, node.key, index);\r\n node = node.next;\r\n index++;\r\n }\r\n }\r\n /**\r\n * Creates a Generator which can be used with for ... of ... to iterate over the cache values.\r\n * Iterates in order from most recently accessed entry to least recently.\r\n * Expired entries will be skipped (and removed).\r\n * No entry will be marked as accessed.\r\n *\r\n * @returns A Generator for the cache values.\r\n *\r\n * @example\r\n * ```typescript\r\n * const cache = new LRUCache();\r\n *\r\n * // Set the key testKey to value testValue\r\n * cache.set('testKey', 'testValue');\r\n *\r\n * for (const value of cache.values()) {\r\n * // do something with the value\r\n * }\r\n * ```\r\n */\r\n *values() {\r\n let node = this.head;\r\n while (node) {\r\n if (node.isExpired) {\r\n const next = node.next;\r\n this.removeNodeFromListAndLookupTable(node);\r\n node = next;\r\n continue;\r\n }\r\n yield node.value;\r\n node = node.next;\r\n }\r\n }\r\n /**\r\n * Creates a Generator which can be used with for ... of ... to iterate over the cache keys.\r\n * Iterates in order from most recently accessed entry to least recently.\r\n * Expired entries will be skipped (and removed).\r\n * No entry will be marked as accessed.\r\n *\r\n * @returns A Generator for the cache keys.\r\n *\r\n * @example\r\n * ```typescript\r\n * const cache = new LRUCache();\r\n *\r\n * // Set the key testKey to value testValue\r\n * cache.set('testKey', 'testValue');\r\n *\r\n * for (const key of cache.keys()) {\r\n * // do something with the key\r\n * }\r\n * ```\r\n */\r\n *keys() {\r\n let node = this.head;\r\n while (node) {\r\n if (node.isExpired) {\r\n const next = node.next;\r\n this.removeNodeFromListAndLookupTable(node);\r\n node = next;\r\n continue;\r\n }\r\n yield node.key;\r\n node = node.next;\r\n }\r\n }\r\n /**\r\n * Creates a Generator which can be used with for ... of ... to iterate over the cache entries.\r\n * Iterates in order from most recently accessed entry to least recently.\r\n * Expired entries will be skipped (and removed).\r\n * No entry will be marked as accessed.\r\n *\r\n * @returns A Generator for the cache entries.\r\n *\r\n * @example\r\n * ```typescript\r\n * const cache = new LRUCache();\r\n *\r\n * // Set the key testKey to value testValue\r\n * cache.set('testKey', 'testValue');\r\n *\r\n * for (const entry of cache.entries()) {\r\n * const { key, value } = entry;\r\n * // do something with the entry\r\n * }\r\n * ```\r\n */\r\n *entries() {\r\n let node = this.head;\r\n while (node) {\r\n if (node.isExpired) {\r\n const next = node.next;\r\n this.removeNodeFromListAndLookupTable(node);\r\n node = next;\r\n continue;\r\n }\r\n yield this.mapNodeToEntry(node);\r\n node = node.next;\r\n }\r\n }\r\n /**\r\n * Creates a Generator which can be used with for ... of ... to iterate over the cache entries.\r\n * Iterates in order from most recently accessed entry to least recently.\r\n * Expired entries will be skipped (and removed).\r\n * No entry will be marked as accessed.\r\n *\r\n * @returns A Generator for the cache entries.\r\n *\r\n * @example\r\n * ```typescript\r\n * const cache = new LRUCache();\r\n *\r\n * // Set the key testKey to value testValue\r\n * cache.set('testKey', 'testValue');\r\n *\r\n * for (const entry of cache) {\r\n * const { key, value } = entry;\r\n * // do something with the entry\r\n * }\r\n * ```\r\n */\r\n *[Symbol.iterator]() {\r\n let node = this.head;\r\n while (node) {\r\n if (node.isExpired) {\r\n const next = node.next;\r\n this.removeNodeFromListAndLookupTable(node);\r\n node = next;\r\n continue;\r\n }\r\n yield this.mapNodeToEntry(node);\r\n node = node.next;\r\n }\r\n }\r\n enforceSizeLimit() {\r\n let node = this.tail;\r\n while (node !== null && this.size > this.maxSizeInternal) {\r\n const prev = node.prev;\r\n this.removeNodeFromListAndLookupTable(node);\r\n node = prev;\r\n }\r\n }\r\n mapNodeToEntry({ key, value }) {\r\n return {\r\n key,\r\n value\r\n };\r\n }\r\n setNodeAsHead(node) {\r\n this.removeNodeFromList(node);\r\n if (!this.head) {\r\n this.head = node;\r\n this.tail = node;\r\n }\r\n else {\r\n node.next = this.head;\r\n this.head.prev = node;\r\n this.head = node;\r\n }\r\n node.invokeOnEntryMarkedAsMostRecentlyUsed();\r\n }\r\n removeNodeFromList(node) {\r\n if (node.prev !== null) {\r\n node.prev.next = node.next;\r\n }\r\n if (node.next !== null) {\r\n node.next.prev = node.prev;\r\n }\r\n if (this.head === node) {\r\n this.head = node.next;\r\n }\r\n if (this.tail === node) {\r\n this.tail = node.prev;\r\n }\r\n node.next = null;\r\n node.prev = null;\r\n }\r\n removeNodeFromListAndLookupTable(node) {\r\n node.invokeOnEvicted();\r\n this.removeNodeFromList(node);\r\n return this.lookupTable.delete(node.key);\r\n }\r\n cleanCache() {\r\n // Don't spend time cleaning if entries don't expire.\r\n if (!this.entryExpirationTimeInMS) {\r\n return;\r\n }\r\n const expiredNodes = [];\r\n for (const node of this.lookupTable.values()) {\r\n if (node.isExpired) {\r\n expiredNodes.push(node);\r\n }\r\n }\r\n expiredNodes.forEach(node => this.removeNodeFromListAndLookupTable(node));\r\n }\r\n}\r\nexports.LRUCache = LRUCache;\r\n//# sourceMappingURL=LRUCache.js.map","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n__exportStar(require(\"./LRUCache\"), exports);\r\n//# sourceMappingURL=index.js.map","import { SignJWT, base64url, calculateJwkThumbprint, decodeJwt } from \"jose\";\nimport { z } from \"zod\";\nimport { providerErrors } from \"@canton-network/core-rpc-errors\";\nimport { getLogger, lazy } from \"@logtape/logtape\";\nimport { LRUCache } from \"typescript-lru-cache\";\n// src/auth-service.ts\n/**\n* Thrown when a token could not be verified because the identity provider\n* could not be reached or returned unusable data, as opposed to the token\n* itself being invalid.\n*/\nvar IdpUnavailableError = class extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = \"IdpUnavailableError\";\n\t}\n};\n// src/auth-utils.ts\nfunction assertIsConnected(authContext) {\n\tif (!authContext) throw providerErrors.unauthorized({ message: \"User is not connected\" });\n}\nfunction assertConnected(authContext) {\n\tassertIsConnected(authContext);\n\treturn authContext;\n}\n/**\n* Extract a User ID from the `sub` claim of a JWT. Throws if `sub` is missing.\n*\n* @param token a base64 encoded JWT token\n* @returns\n*/\nfunction jwtUserId(token) {\n\tconst { sub } = decodeJwt(token);\n\tif (!sub) throw new Error(\"token did not contain a subject field\");\n\treturn sub;\n}\n/**\n* Extract the optional `email` claim from a JWT.\n*\n* @param token a base64 encoded JWT token\n* @returns email when present, otherwise undefined\n*/\nfunction jwtUserEmail(token) {\n\tconst { email } = decodeJwt(token);\n\tif (typeof email !== \"string\" || email.length === 0) return;\n\treturn email;\n}\n/**\n* Extract the expiry from the `exp` claim of a JWT. Throws if `exp` is missing.\n*\n* @param token a base64url encoded JWT token\n* @returns the expiry\n*/\nfunction jwtExpiresAt(token) {\n\tconst { exp } = decodeJwt(token);\n\tif (typeof exp !== \"number\") throw new Error(\"token did not contain an expiry field\");\n\treturn /* @__PURE__ */ new Date(exp * 1e3);\n}\n/**\n* An invalid endpoint is treated as missing, so it only fails the callers\n* that actually need it\n*/\nconst endpointSchema = z.url({ protocol: /^https?$/ }).optional().catch(void 0);\n/**\n* The parts of the OIDC discovery document (/.well-known/openid-configuration)\n* we rely on. Every field is optional because IDPs differ in what they expose;\n* callers must check the fields they need.\n* https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata\n*/\nconst oidcDiscoverySchema = z.looseObject({\n\tissuer: z.string().optional(),\n\tauthorization_endpoint: endpointSchema,\n\ttoken_endpoint: endpointSchema,\n\tuserinfo_endpoint: endpointSchema,\n\tjwks_uri: endpointSchema\n});\n/**\n* The UserInfo claims we rely on, other standard claims are passed through\n* untouched. Only `sub` is required by the spec; `email_verified` and friends\n* are deliberately not validated since IDPs disagree on their type (e.g. the\n* string \"true\").\n* https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims\n*/\nconst oidcUserInfoSchema = z.looseObject({\n\tsub: z.string(),\n\tname: z.string().optional(),\n\tpreferred_username: z.string().optional(),\n\temail: z.string().optional()\n});\n/**\n* The successful response of an OAuth token endpoint.\n* https://datatracker.ietf.org/doc/html/rfc6749#section-5.1\n*/\nconst oidcTokenResponseSchema = z.looseObject({ access_token: z.string().min(1) });\n/**\n* Validate a JSON response received from an IDP, throwing a readable error\n* instead of a raw ZodError.\n*/\nfunction parseIdpResponse(schema, data, description) {\n\tconst result = schema.safeParse(data);\n\tif (!result.success) throw new Error(`Invalid ${description}: ${z.prettifyError(result.error)}`);\n\treturn result.data;\n}\n/**\n* Fetches and validates the OIDC discovery document.\n*\n* @param configUrl - The OIDC discovery document URL (/.well-known/openid-configuration)\n* @throws {IdpUnavailableError} If the request fails or the response is not a valid discovery document\n*/\nasync function fetchOidcDiscovery(configUrl) {\n\tlet response;\n\ttry {\n\t\tresponse = await fetch(configUrl, { headers: { Accept: \"application/json\" } });\n\t} catch (error) {\n\t\tthrow new IdpUnavailableError(`Failed to fetch OIDC discovery document: ${error instanceof Error ? error.message : String(error)}`, { cause: error });\n\t}\n\tif (!response.ok) throw new IdpUnavailableError(`Failed to fetch OIDC discovery document: ${response.status} ${response.statusText}`);\n\tlet data;\n\ttry {\n\t\tdata = await response.json();\n\t} catch (error) {\n\t\tthrow new IdpUnavailableError(`Failed to parse OIDC discovery document: ${error instanceof Error ? error.message : String(error)}`, { cause: error });\n\t}\n\ttry {\n\t\treturn parseIdpResponse(oidcDiscoverySchema, data, \"OIDC discovery document\");\n\t} catch (error) {\n\t\tthrow new IdpUnavailableError(error instanceof Error ? error.message : String(error), { cause: error });\n\t}\n}\n/**\n* Fetches user claims from an OIDC UserInfo endpoint.\n*\n* @param userinfoEndpoint - The `userinfo_endpoint` from the discovery document\n* @param accessToken - The user's bearer access token\n* @returns The UserInfo claims\n* @throws If the request fails or the response is malformed\n*/\nasync function fetchOidcUserInfo(userinfoEndpoint, accessToken) {\n\tconst userInfoResponse = await fetch(userinfoEndpoint, { headers: {\n\t\tAccept: \"application/json\",\n\t\tAuthorization: `Bearer ${accessToken}`\n\t} });\n\tif (!userInfoResponse.ok) throw new Error(`Failed to fetch OIDC userinfo: ${userInfoResponse.status} ${userInfoResponse.statusText}`);\n\treturn parseIdpResponse(oidcUserInfoSchema, await userInfoResponse.json(), \"OIDC userinfo response\");\n}\n/**\n* Determine if a given JWT is still valid based on its expiry time.\n*\n* @param token a base64 encoded JWT token\n* @returns true if the token is expired, false if not\n*/\nfunction jwtExpired(token) {\n\ttry {\n\t\tconst payload = decodeJwt(token);\n\t\tconst now = Math.floor(Date.now() / 1e3);\n\t\treturn typeof payload.exp === \"number\" && payload.exp <= now;\n\t} catch {\n\t\treturn true;\n\t}\n}\n// \\0@oxc-project+runtime@0.156.0/helpers/esm/typeof.js\nfunction _typeof(o) {\n\t\"@babel/helpers - typeof\";\n\treturn _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(o) {\n\t\treturn typeof o;\n\t} : function(o) {\n\t\treturn o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n\t}, _typeof(o);\n}\n// \\0@oxc-project+runtime@0.156.0/helpers/esm/toPrimitive.js\nfunction toPrimitive(t, r) {\n\tif (\"object\" != _typeof(t) || !t) return t;\n\tvar e = t[Symbol.toPrimitive];\n\tif (void 0 !== e) {\n\t\tvar i = e.call(t, r || \"default\");\n\t\tif (\"object\" != _typeof(i)) return i;\n\t\tthrow new TypeError(\"@@toPrimitive must return a primitive value.\");\n\t}\n\treturn (\"string\" === r ? String : Number)(t);\n}\n// \\0@oxc-project+runtime@0.156.0/helpers/esm/toPropertyKey.js\nfunction toPropertyKey(t) {\n\tvar i = toPrimitive(t, \"string\");\n\treturn \"symbol\" == _typeof(i) ? i : i + \"\";\n}\n// \\0@oxc-project+runtime@0.156.0/helpers/esm/defineProperty.js\nfunction _defineProperty(e, r, t) {\n\treturn (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n\t\tvalue: t,\n\t\tenumerable: !0,\n\t\tconfigurable: !0,\n\t\twritable: !0\n\t}) : e[r] = t, e;\n}\n// src/client-credentials-service.ts\nvar ClientCredentialsService = class {\n\tconstructor(configUrl) {\n\t\tthis.configUrl = configUrl;\n\t\t_defineProperty(this, \"logger\", getLogger([\n\t\t\t\"core\",\n\t\t\t\"wallet-auth\",\n\t\t\t\"client-credentials-service\"\n\t\t]).with({ configUrl: lazy(() => this.configUrl) }));\n\t}\n\t/**\n\t* Fetches the JWT token (M2M) using client credentials.\n\t*\n\t* @returns The JWT access token as a string.\n\t* @throws If fetching the token fails or the response is invalid.\n\t*/\n\tasync fetchToken(credentials) {\n\t\ttry {\n\t\t\tconst oidcConfig = await this.getOIDCConfig(this.configUrl);\n\t\t\tthis.logger.debug(\"Fetched OIDC config\", { oidcConfig });\n\t\t\tconst res = await this.fetchTokenEndpoint(oidcConfig.token_endpoint, credentials);\n\t\t\tconst json = parseIdpResponse(oidcTokenResponseSchema, await res.json(), \"token endpoint response\");\n\t\t\tif (this.logger.isEnabledFor(\"debug\")) this.logger.debug(`Fetched admin token for clientId: {clientId}`, { clientId: credentials.clientId });\n\t\t\telse this.logger.info(`Fetched admin token for clientId: {clientId}`, {\n\t\t\t\tclientId: credentials.clientId,\n\t\t\t\tresponse: json\n\t\t\t});\n\t\t\treturn json.access_token;\n\t\t} catch (error) {\n\t\t\tthis.logger.warn(\"Failed to fetch admin token\", { error });\n\t\t\tthrow error;\n\t\t}\n\t}\n\tasync fetchTokenEndpoint(tokenEndpoint, credentials) {\n\t\tconst params = new URLSearchParams({\n\t\t\tgrant_type: \"client_credentials\",\n\t\t\tscope: credentials.scope ?? \"\",\n\t\t\taudience: credentials.audience ?? \"\"\n\t\t});\n\t\tconst password = toClientPassword(credentials.clientId, credentials.clientSecret);\n\t\tconst res = await fetch(tokenEndpoint, {\n\t\t\tmethod: \"POST\",\n\t\t\theaders: {\n\t\t\t\t\"Content-Type\": \"application/x-www-form-urlencoded\",\n\t\t\t\tAccept: \"application/json\",\n\t\t\t\tAuthorization: `Basic ${password}`\n\t\t\t},\n\t\t\tbody: params.toString()\n\t\t});\n\t\tif (!res.ok) {\n\t\t\tthis.logger.warn(\"Token endpoint error\", {\n\t\t\t\tstatus: res.status,\n\t\t\t\tstatusText: res.statusText\n\t\t\t});\n\t\t\tthrow new Error(`Token endpoint error: ${res.status} ${res.statusText}`);\n\t\t}\n\t\treturn res;\n\t}\n\tasync getOIDCConfig(url) {\n\t\tlet config;\n\t\ttry {\n\t\t\tconfig = await fetchOidcDiscovery(url);\n\t\t} catch (error) {\n\t\t\tthis.logger.error(\"Failed to fetch OIDC config\", { error });\n\t\t\tthrow error;\n\t\t}\n\t\tif (!config.token_endpoint) throw new Error(\"OIDC config has no token_endpoint\");\n\t\treturn {\n\t\t\t...config,\n\t\t\ttoken_endpoint: config.token_endpoint\n\t\t};\n\t}\n};\nconst toClientPassword = (clientId, clientSecret) => {\n\tconst credentials = `${clientId}:${clientSecret}`;\n\treturn btoa(credentials);\n};\nconst clientCredentialsService = (configUrl) => ({ fetchToken: async (credentials) => new ClientCredentialsService(configUrl).fetchToken(credentials) });\n// src/self-signed-token-service.ts\nvar SelfSignedTokenService = class {\n\tstatic async fetchToken(credentials, issuer, expirySeconds = 3600, keyId) {\n\t\tconst secret = new TextEncoder().encode(credentials.clientSecret);\n\t\tconst now = Math.floor(Date.now() / 1e3);\n\t\tconst jwt = await new SignJWT({\n\t\t\tsub: credentials.clientId,\n\t\t\taud: credentials.audience || \"\",\n\t\t\tscope: credentials.scope || \"\",\n\t\t\tiat: now,\n\t\t\texp: now + expirySeconds,\n\t\t\tiss: issuer\n\t\t}).setProtectedHeader({\n\t\t\talg: \"HS256\",\n\t\t\t...keyId ? { kid: keyId } : {}\n\t\t}).sign(secret);\n\t\tthis.logger.debug(\"Generated self-signed JWT token\");\n\t\treturn jwt;\n\t}\n};\n_defineProperty(SelfSignedTokenService, \"logger\", getLogger([\n\t\"core\",\n\t\"wallet-auth\",\n\t\"SelfSignedTokenService\"\n]));\n// src/auth-token-provider.ts\n/**\n* AuthTokenProvider provides some common functionality across token providers.\n*\n* 1. Token caching: tokens are cached in-memory, so long as the token lifespan is not expired.\n* 2. Context retrieval: deriving a user context from the stored access token.\n*\n*\n* The following programmatic methods of token fetching are supported:\n*\n* - `static`: a fixed, in-memory token. Only used for compatibility, it will totally break for expired tokens.\n* - `self_signed`: only for development purposes, used for Canton setups that accept HMAC256 self signed tokens.\n* - `client_credentials`: used to programmatically acquire tokens via oauth2, a.k.a \"machine-to-machine\" tokens.\n*/\nvar AuthTokenProvider = class AuthTokenProvider {\n\tconstructor(config) {\n\t\tthis.config = config;\n\t\t_defineProperty(this, \"logger\", getLogger([\n\t\t\t\"core\",\n\t\t\t\"wallet-auth\",\n\t\t\t\"AuthTokenProvider\"\n\t\t]).with({ method: lazy(() => this.config.method) }));\n\t\t_defineProperty(this, \"cachedToken\", void 0);\n\t}\n\tstatic fromToken(token) {\n\t\treturn new AuthTokenProvider({\n\t\t\tmethod: \"static\",\n\t\t\ttoken\n\t\t});\n\t}\n\tstatic fromGatewayConfig(idp, auth) {\n\t\tif (auth.method === \"self_signed\") return new AuthTokenProvider({\n\t\t\tmethod: auth.method,\n\t\t\tissuer: auth.issuer,\n\t\t\tcredentials: {\n\t\t\t\tclientId: auth.clientId,\n\t\t\t\tclientSecret: auth.clientSecret,\n\t\t\t\tscope: auth.scope,\n\t\t\t\taudience: auth.audience\n\t\t\t}\n\t\t});\n\t\tif (auth.method === \"client_credentials\") {\n\t\t\tif (idp.type === \"oauth\") return new AuthTokenProvider({\n\t\t\t\tmethod: auth.method,\n\t\t\t\tconfigUrl: idp.configUrl,\n\t\t\t\tcredentials: {\n\t\t\t\t\tclientId: auth.clientId,\n\t\t\t\t\tclientSecret: auth.clientSecret,\n\t\t\t\t\tscope: auth.scope,\n\t\t\t\t\taudience: auth.audience\n\t\t\t\t}\n\t\t\t});\n\t\t\telse throw new Error(`IDP type ${idp.type} not supported for client_credentials auth`);\n\t\t}\n\t\tthrow new Error(`Auth method ${auth.method} not supported for programmatic access token`);\n\t}\n\tasync _fetchToken() {\n\t\tthis.logger.debug(\"Fetching user auth token\");\n\t\tswitch (this.config.method) {\n\t\t\tcase \"static\": return this.config.token;\n\t\t\tcase \"self_signed\": return SelfSignedTokenService.fetchToken(this.config.credentials, this.config.issuer, void 0, this.config.keyId);\n\t\t\tcase \"client_credentials\": return clientCredentialsService(this.config.configUrl).fetchToken(this.config.credentials);\n\t\t}\n\t}\n\t/**\n\t*\n\t* @returns A valid JWT token retrieved according to the auth configuration given.\n\t*/\n\tasync getAccessToken() {\n\t\tif (this.cachedToken && !jwtExpired(this.cachedToken)) return this.cachedToken;\n\t\telse {\n\t\t\tconst newToken = await this._fetchToken();\n\t\t\tif (jwtExpired(newToken)) throw new Error(\"Attempted to refresh a token, but it came back expired.\");\n\t\t\tthis.cachedToken = newToken;\n\t\t\treturn newToken;\n\t\t}\n\t}\n\t/**\n\t*\n\t* @returns An AuthContext containing a valid token and userId.\n\t*/\n\tasync getAuthContext() {\n\t\tconst accessToken = await this.getAccessToken();\n\t\tconst userId = jwtUserId(accessToken);\n\t\tconst email = jwtUserEmail(accessToken);\n\t\treturn {\n\t\t\taccessToken,\n\t\t\tuserId,\n\t\t\t...email ? { email } : {}\n\t\t};\n\t}\n};\n// src/config/schema.ts\nconst authorizationCodeAuthSchema = z.object({\n\tmethod: z.literal(\"authorization_code\"),\n\taudience: z.string().meta({ description: \"Participant ID prefixed with \\\"https://daml.com/jwt/aud/participant/\\\".\" }),\n\tscope: z.string(),\n\tclientId: z.string()\n}).meta({ description: \"Authorization code flow authentication configuration. This is used for browser-based application login.\" });\nconst clientCredentialsAuthSchema = z.object({\n\tmethod: z.literal(\"client_credentials\"),\n\tidentityProviderId: z.string().optional().meta({ description: \"Overrides the network's identity provider for client credentials token acquisition.\" }),\n\taudience: z.string().meta({ description: \"Participant ID prefixed with \\\"https://daml.com/jwt/aud/participant/\\\".\" }),\n\tscope: z.string(),\n\tclientId: z.string(),\n\tclientSecret: z.string()\n});\nconst selfSignedAuthSchema = z.object({\n\tmethod: z.literal(\"self_signed\"),\n\tissuer: z.string(),\n\taudience: z.string().meta({ description: \"Participant ID prefixed with \\\"https://daml.com/jwt/aud/participant/\\\".\" }),\n\tscope: z.string(),\n\tclientId: z.string(),\n\tclientSecret: z.string()\n});\nconst selfIssuedAuthSchema = z.object({\n\tmethod: z.literal(\"self_issued\"),\n\taudience: z.string().meta({ description: \"Only participant ID, with no https://daml.com/jwt/aud/participant/ prefix (unlike the other auth methods).\" }),\n\tscope: z.string()\n});\nconst clientCredentialsEnvAuthSchema = z.object({\n\tmethod: z.literal(\"client_credentials\"),\n\tidentityProviderId: z.string().optional().meta({ description: \"Overrides the network's identity provider for client credentials token acquisition.\" }),\n\taudience: z.string(),\n\tscope: z.string(),\n\tclientId: z.string(),\n\tclientSecretEnv: z.string()\n});\nconst selfSignedEnvAuthSchema = z.object({\n\tmethod: z.literal(\"self_signed\"),\n\tissuer: z.string(),\n\taudience: z.string(),\n\tscope: z.string(),\n\tclientId: z.string(),\n\tclientSecretEnv: z.string()\n});\nconst authSchema = z.discriminatedUnion(\"method\", [\n\tauthorizationCodeAuthSchema,\n\tclientCredentialsAuthSchema,\n\tselfSignedAuthSchema,\n\tselfIssuedAuthSchema\n]);\nconst authFromEnvSchema = z.discriminatedUnion(\"method\", [\n\tauthorizationCodeAuthSchema,\n\tclientCredentialsEnvAuthSchema,\n\tselfSignedEnvAuthSchema,\n\tselfIssuedAuthSchema\n]);\nfunction resolveAuthIdentityProviderId(auth, networkIdentityProviderId) {\n\treturn auth.method === \"client_credentials\" ? auth.identityProviderId ?? networkIdentityProviderId : networkIdentityProviderId;\n}\nconst idpSchema = z.discriminatedUnion(\"type\", [\n\tz.object({\n\t\tid: z.string(),\n\t\ttype: z.literal(\"self_signed\"),\n\t\tissuer: z.string()\n\t}),\n\tz.object({\n\t\tid: z.string(),\n\t\ttype: z.literal(\"self_issued\")\n\t}).strict(),\n\tz.object({\n\t\tid: z.string(),\n\t\ttype: z.literal(\"oauth\"),\n\t\tissuer: z.string(),\n\t\tconfigUrl: z.url()\n\t})\n]);\n// src/oidc-client.ts\n/**\n* How long discovery documents and userinfo responses are reused. Matches\n* jose's default `cacheMaxAge` for remote JWKS.\n*/\nconst OIDC_CACHE_TTL_MS = 6e5;\nconst OIDC_CACHE_MAX_ENTRIES = 1e4;\n/**\n* Identifies an access token without keeping it, so the cache doesn't hold\n* usable tokens after their requests are done.\n*/\nasync function hashToken(accessToken) {\n\tconst digest = await crypto.subtle.digest(\"SHA-256\", new TextEncoder().encode(accessToken));\n\treturn base64url.encode(new Uint8Array(digest));\n}\n/**\n* Creates an OIDC client that reuses discovery documents and userinfo\n* responses for {@link OIDC_CACHE_TTL_MS}, so the IDP isn't contacted on\n* every request. Failures aren't cached.\n*/\nfunction createOidcClient() {\n\tconst discoveries = new LRUCache({\n\t\tmaxSize: OIDC_CACHE_MAX_ENTRIES,\n\t\tentryExpirationTimeInMS: OIDC_CACHE_TTL_MS\n\t});\n\tconst userInfos = new LRUCache({\n\t\tmaxSize: OIDC_CACHE_MAX_ENTRIES,\n\t\tentryExpirationTimeInMS: OIDC_CACHE_TTL_MS\n\t});\n\t/**\n\t* Cached {@link fetchOidcDiscovery}\n\t*\n\t* @throws {IdpUnavailableError} If the request fails, or the document's\n\t* issuer isn't `issuer` or it has no `jwks_uri`\n\t*/\n\tasync function fetchDiscovery(configUrl, issuer) {\n\t\tconst key = `${configUrl}|${issuer}`;\n\t\tlet config = discoveries.get(key);\n\t\tif (!config) {\n\t\t\tconst fetched = await fetchOidcDiscovery(configUrl);\n\t\t\tif (fetched.issuer !== issuer) throw new IdpUnavailableError(`OIDC discovery document issuer ${fetched.issuer} does not match the identity provider issuer ${issuer}`);\n\t\t\tif (!fetched.jwks_uri) throw new IdpUnavailableError(\"OIDC discovery document has no jwks_uri\");\n\t\t\tconfig = {\n\t\t\t\t...fetched,\n\t\t\t\tjwks_uri: fetched.jwks_uri\n\t\t\t};\n\t\t\tdiscoveries.set(key, config);\n\t\t}\n\t\treturn config;\n\t}\n\t/**\n\t* Cached {@link fetchOidcUserInfo}\n\t*\n\t* @param subject - The verified `sub` of `accessToken`\n\t* @throws If the response's `sub` isn't `subject`, its claims may be about\n\t* another user (OpenID Connect Core 1.0, 5.3.2)\n\t*/\n\tasync function fetchUserInfo(userinfoEndpoint, accessToken, subject) {\n\t\tconst key = `${userinfoEndpoint}|${subject}|${await hashToken(accessToken)}`;\n\t\tlet userInfo = userInfos.get(key);\n\t\tif (!userInfo) {\n\t\t\tuserInfo = await fetchOidcUserInfo(userinfoEndpoint, accessToken);\n\t\t\tif (userInfo.sub !== subject) throw new Error(`OIDC userinfo subject ${userInfo.sub} does not match the token subject ${subject}`);\n\t\t\tuserInfos.set(key, userInfo);\n\t\t}\n\t\treturn userInfo;\n\t}\n\treturn {\n\t\tfetchDiscovery,\n\t\tfetchUserInfo\n\t};\n}\n// src/self-issued-token-service.ts\nvar SelfIssuedTokenService = class SelfIssuedTokenService {\n\tstatic publicKeyToEd25519Jwk(publicKeyBase64) {\n\t\treturn {\n\t\t\tkty: \"OKP\",\n\t\t\tcrv: \"Ed25519\",\n\t\t\tx: base64url.encode(SelfIssuedTokenService.publicKeyBytes(publicKeyBase64))\n\t\t};\n\t}\n\tstatic async prepareForSigning(publicKeyBase64, claims) {\n\t\tconst now = Math.floor(Date.now() / 1e3);\n\t\tconst kid = await calculateJwkThumbprint(SelfIssuedTokenService.publicKeyToEd25519Jwk(publicKeyBase64), \"sha256\");\n\t\treturn `${SelfIssuedTokenService.encodeJson({\n\t\t\talg: \"EdDSA\",\n\t\t\ttyp: \"JWT\",\n\t\t\tkid\n\t\t})}.${SelfIssuedTokenService.encodeJson({\n\t\t\taud: claims.audience,\n\t\t\tscope: claims.scope,\n\t\t\texp: now + claims.ttlSeconds,\n\t\t\tiss: claims.partyId,\n\t\t\tsub: claims.partyId,\n\t\t\t\"daml.com\": {\n\t\t\t\tsyn: claims.synchronizerId,\n\t\t\t\tusr: claims.username\n\t\t\t}\n\t\t})}`;\n\t}\n\tstatic isSigningInputExpired(signingInput) {\n\t\ttry {\n\t\t\treturn jwtExpiresAt(`${signingInput}.`).getTime() <= Date.now();\n\t\t} catch {\n\t\t\treturn true;\n\t\t}\n\t}\n\tstatic appendJwtSignature(signingInput, base64Signature) {\n\t\tconst signatureBytes = Uint8Array.from(atob(base64Signature), (char) => char.charCodeAt(0));\n\t\treturn `${signingInput}.${base64url.encode(signatureBytes)}`;\n\t}\n\tstatic publicKeyBytes(publicKeyBase64) {\n\t\treturn Uint8Array.from(atob(publicKeyBase64), (char) => char.charCodeAt(0));\n\t}\n\tstatic encodeJson(value) {\n\t\treturn base64url.encode(new TextEncoder().encode(JSON.stringify(value)));\n\t}\n};\nexport { AuthTokenProvider, ClientCredentialsService, IdpUnavailableError, OIDC_CACHE_TTL_MS, SelfIssuedTokenService, assertConnected, assertIsConnected, authFromEnvSchema, authSchema, clientCredentialsService, createOidcClient, fetchOidcDiscovery, fetchOidcUserInfo, idpSchema, jwtExpired, jwtExpiresAt, jwtUserEmail, jwtUserId, oidcDiscoverySchema, oidcTokenResponseSchema, oidcUserInfoSchema, parseIdpResponse, resolveAuthIdentityProviderId };\n\n//# sourceMappingURL=index.js.map","import { authSchema, idpSchema } from \"@canton-network/core-wallet-auth\";\nimport { z } from \"zod\";\n// src/Store.ts\nlet AddressType = /* @__PURE__ */ function(AddressType) {\n\tAddressType[\"PaperAddress\"] = \"PaperAddress\";\n\tAddressType[\"CCSPAddress\"] = \"CCSPAddress\";\n\treturn AddressType;\n}({});\nlet PartyLevelRight = /* @__PURE__ */ function(PartyLevelRight) {\n\tPartyLevelRight[\"CanActAs\"] = \"CanActAs\";\n\tPartyLevelRight[\"CanReadAs\"] = \"CanReadAs\";\n\tPartyLevelRight[\"CanExecuteAs\"] = \"CanExecuteAs\";\n\treturn PartyLevelRight;\n}({});\nlet UserLevelRight = /* @__PURE__ */ function(UserLevelRight) {\n\tUserLevelRight[\"CanReadAsAnyParty\"] = \"CanReadAsAnyParty\";\n\tUserLevelRight[\"CanExecuteAsAnyParty\"] = \"CanExecuteAsAnyParty\";\n\treturn UserLevelRight;\n}({});\n// src/config/schema.ts\nconst ledgerApiSchema = z.object({ baseUrl: z.url() });\nconst networkSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tdescription: z.string(),\n\tsynchronizerId: z.string().includes(\"::\").min(10).optional(),\n\tidentityProviderId: z.string(),\n\tledgerApi: ledgerApiSchema,\n\tauth: authSchema,\n\tadminAuth: authSchema.optional(),\n\tserviceAccountAuth: authSchema.optional()\n});\nconst postgresSchema = z.looseObject({\n\ttype: z.literal(\"postgres\"),\n\thost: z.string(),\n\tport: z.number(),\n\tuser: z.string(),\n\tpassword: z.string(),\n\tdatabase: z.string()\n});\nconst postgresEnvSchema = z.looseObject({\n\ttype: z.literal(\"postgres\"),\n\thost: z.string(),\n\tport: z.number(),\n\tuser: z.string(),\n\tpasswordEnv: z.string(),\n\tdatabase: z.string()\n});\nconst postgresFromEnvOrConfig = z.union([postgresSchema, postgresEnvSchema]);\nconst storeConfigSchema = z.object({ connection: z.union([\n\tz.object({ type: z.literal(\"memory\") }),\n\tz.object({\n\t\ttype: z.literal(\"sqlite\"),\n\t\tdatabase: z.string()\n\t}),\n\tpostgresFromEnvOrConfig\n]) });\nconst bootstrapConfigSchema = z.object({\n\tidps: z.array(idpSchema),\n\tnetworks: z.array(networkSchema)\n});\n// src/utils.ts\nfunction assertUniqueSelfIssuedAudience(networks, candidate, excludeNetworkId) {\n\tif (candidate.auth.method !== \"self_issued\") return;\n\tconst collision = networks.find((network) => network.id !== excludeNetworkId && network.auth.method === \"self_issued\" && network.auth.audience === candidate.auth.audience);\n\tif (!collision) return;\n\tthrow new Error(`Self-issued audience \"${candidate.auth.audience}\" is already used by network \"${collision.id}\"`);\n}\nfunction resolveSelfIssuedNetworkByAudiences(networks, audiences) {\n\tconst audienceSet = new Set(audiences);\n\tconst matches = networks.filter((network) => network.auth.method === \"self_issued\" && audienceSet.has(network.auth.audience));\n\tif (matches.length > 1) throw new Error(`Multiple self-issued networks match token audience: ${matches.map((network) => network.id).join(\", \")}`);\n\treturn matches[0] ?? void 0;\n}\nexport { AddressType, PartyLevelRight, UserLevelRight, assertUniqueSelfIssuedAudience, bootstrapConfigSchema, ledgerApiSchema, networkSchema, postgresEnvSchema, postgresFromEnvOrConfig, postgresSchema, resolveSelfIssuedNetworkByAudiences, storeConfigSchema };\n\n//# sourceMappingURL=index.js.map","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Network as ApiNetwork } from '@canton-network/core-wallet-user-rpc-client'\nimport {\n type Network as StoreNetwork,\n networkSchema,\n} from '@canton-network/core-wallet-store'\nimport { css, html, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { BaseElement } from '../internal/base-element'\nimport { AuthEditor, type AuthEditorChangeEvent } from './auth-editor.js'\nimport './auth-editor.js'\n\n/**\n * Emitted when the user clicks the Cancel button on the form\n */\nexport class NetworkEditCancelEvent extends Event {\n constructor() {\n super('network-edit-cancel', { bubbles: true, composed: true })\n }\n}\n\n/**\n * Emitted when the user clicks the Save/Add/Update button on the form\n */\nexport class NetworkEditSaveEvent extends Event {\n network: ApiNetwork\n\n constructor(network: ApiNetwork) {\n super('network-edit-save', { bubbles: true, composed: true })\n this.network = network\n }\n}\n\n/**\n * Emitted when the user clicks the Delete button\n */\nexport class NetworkDeleteEvent extends Event {\n network: ApiNetwork\n\n constructor(network: ApiNetwork) {\n super('network-delete', { bubbles: true, composed: true })\n this.network = network\n }\n}\n\nexport\n@customElement('network-form')\nclass NetworkForm extends BaseElement {\n @property({ type: String })\n accessor mode: 'add' | 'review' = 'add'\n\n @property({ type: Object })\n accessor network: ApiNetwork = {\n id: '',\n name: '',\n description: '',\n identityProviderId: '',\n ledgerApi: '',\n auth: {\n method: 'authorization_code',\n audience: '',\n scope: '',\n clientId: '',\n },\n }\n\n @state() private accessor _error = ''\n\n static styles = [\n BaseElement.styles,\n css`\n :host {\n display: block;\n }\n\n .form-fields {\n gap: var(--wg-space-4);\n }\n\n .field-group {\n gap: var(--wg-space-2);\n }\n\n .field-label {\n font-size: var(--wg-font-size-sm);\n font-weight: var(--wg-font-weight-medium);\n color: var(--wg-text-secondary);\n line-height: var(--wg-line-height-tight);\n }\n\n .required {\n color: var(--wg-label-required-color);\n }\n\n .field-help {\n font-size: var(--wg-font-size-xs);\n color: var(--wg-text-secondary);\n margin-top: calc(-1 * var(--wg-space-1));\n }\n\n .field-control {\n width: 100%;\n border: 1px solid var(--wg-input-border);\n border-radius: 4px;\n background: var(--wg-input-bg);\n color: var(--wg-input-text);\n padding: 12px 14px;\n }\n\n .field-control::placeholder {\n color: var(--wg-input-placeholder);\n }\n\n .field-control:focus {\n border-color: var(--wg-input-border-focus);\n box-shadow: 0 0 0 3px rgba(var(--wg-accent-rgb), 0.12);\n }\n\n .select-wrap {\n position: relative;\n }\n\n .select-wrap .field-control {\n padding-right: 40px;\n appearance: none;\n -webkit-appearance: none;\n }\n\n .select-chevron {\n position: absolute;\n top: 50%;\n right: 12px;\n transform: translateY(-50%);\n color: var(--wg-text-secondary);\n pointer-events: none;\n display: inline-flex;\n }\n\n .section-title {\n margin: var(--wg-space-4) 0 var(--wg-space-2);\n font-size: var(--wg-font-size-base);\n font-weight: var(--wg-font-weight-bold);\n color: var(--wg-text);\n }\n\n .delete-section {\n margin-top: var(--wg-space-8);\n padding-top: var(--wg-space-6);\n border-top: 1px solid var(--wg-border);\n }\n\n .delete-title {\n margin: 0 0 var(--wg-space-2);\n font-size: var(--wg-font-size-base);\n font-weight: var(--wg-font-weight-bold);\n color: var(--wg-text);\n }\n\n .delete-desc {\n margin: 0 0 var(--wg-space-4);\n font-size: var(--wg-font-size-sm);\n color: var(--wg-text-secondary);\n }\n\n .btn-delete {\n display: inline-flex;\n align-items: center;\n gap: var(--wg-space-1);\n border: 1px solid var(--wg-error);\n border-radius: var(--wg-radius-full);\n background: transparent;\n color: var(--wg-error);\n font-size: var(--wg-font-size-sm);\n font-weight: var(--wg-font-weight-semibold);\n padding: 0.4rem 1rem;\n cursor: pointer;\n transition:\n background 0.2s ease,\n color 0.2s ease;\n }\n\n .btn-delete:hover {\n background: rgba(var(--wg-error-rgb), 0.08);\n }\n\n .form-error {\n color: var(--wg-error);\n font-size: var(--wg-font-size-sm);\n margin: var(--wg-space-2) 0;\n }\n\n .form-actions {\n display: flex;\n gap: var(--wg-space-3);\n margin-top: var(--wg-space-6);\n }\n\n .form-actions > button {\n flex: 1 1 0;\n min-width: 0;\n min-height: 2.875rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0.7rem 1.5rem;\n font-size: var(--wg-font-size-base);\n font-weight: var(--wg-font-weight-semibold);\n line-height: 1.2;\n }\n\n .btn-cancel {\n border: 1px solid var(--wg-border);\n border-radius: var(--wg-radius-full);\n background: var(--wg-input-bg);\n color: var(--wg-text);\n cursor: pointer;\n transition:\n background 0.2s ease,\n opacity 0.2s ease;\n }\n\n .btn-cancel:hover {\n background: var(--wg-border);\n }\n\n .btn-submit {\n border-width: 1px;\n }\n `,\n AuthEditor.styles,\n ]\n\n handleSubmit(e: Event) {\n e.preventDefault()\n\n const parsedData = networkSchema.safeParse(\n this.toStoreNetworkForValidation(this.network)\n )\n\n if (!parsedData.success) {\n this._error =\n 'Invalid network data, please ensure all fields are set correctly'\n console.error('Error parsing network data: ', parsedData.error)\n return\n } else {\n this.dispatchEvent(new NetworkEditSaveEvent(this.network))\n }\n }\n\n private toStoreNetworkForValidation(network: ApiNetwork): StoreNetwork {\n return {\n ...network,\n ledgerApi: { baseUrl: network.ledgerApi },\n } as StoreNetwork\n }\n\n render() {\n const isReview = this.mode === 'review'\n\n return html`\n <form class=\"d-flex flex-column h-100\" @submit=${this.handleSubmit}>\n <div class=\"form-fields d-flex flex-column\">\n <div class=\"field-group d-flex flex-column\">\n <label class=\"form-label field-label mb-0\">\n Network Id <span class=\"required\">*</span>\n </label>\n <input\n class=\"form-control field-control\"\n type=\"text\"\n required\n .value=${this.network.id ?? ''}\n @change=${(e: Event) => {\n this.network.id = (\n e.target as HTMLInputElement\n ).value\n }}\n />\n <p class=\"field-help mb-0\">\n A unique identifier for the network\n </p>\n </div>\n\n <div class=\"field-group d-flex flex-column\">\n <label class=\"form-label field-label mb-0\">\n Name <span class=\"required\">*</span>\n </label>\n <input\n class=\"form-control field-control\"\n type=\"text\"\n required\n .value=${this.network.name ?? ''}\n @change=${(e: Event) => {\n this.network.name = (\n e.target as HTMLInputElement\n ).value\n }}\n />\n </div>\n\n <div class=\"field-group d-flex flex-column\">\n <label class=\"form-label field-label mb-0\">\n Description <span class=\"required\">*</span>\n </label>\n <input\n class=\"form-control field-control\"\n type=\"text\"\n required\n .value=${this.network.description ?? ''}\n @change=${(e: Event) => {\n this.network.description = (\n e.target as HTMLInputElement\n ).value\n }}\n />\n </div>\n\n <div class=\"field-group d-flex flex-column\">\n <label class=\"form-label field-label mb-0\">\n Synchronizer Id\n </label>\n <input\n class=\"form-control field-control\"\n type=\"text\"\n .value=${this.network.synchronizerId ?? ''}\n @change=${(e: Event) => {\n const val = (e.target as HTMLInputElement).value\n\n // oxlint-disable-next-line no-unused-vars\n const { synchronizerId, ...network } =\n this.network\n this.network = {\n ...network,\n ...(val && { synchronizerId: val }),\n }\n }}\n />\n </div>\n\n <div class=\"field-group d-flex flex-column\">\n <label class=\"form-label field-label mb-0\">\n Identity Provider Id\n <span class=\"required\">*</span>\n </label>\n <input\n class=\"form-control field-control\"\n type=\"text\"\n required\n .value=${this.network.identityProviderId ?? ''}\n @change=${(e: Event) => {\n this.network.identityProviderId = (\n e.target as HTMLInputElement\n ).value\n }}\n />\n </div>\n\n <div class=\"field-group d-flex flex-column\">\n <label class=\"form-label field-label mb-0\">\n Ledger API Base Url\n <span class=\"required\">*</span>\n </label>\n <input\n class=\"form-control field-control\"\n type=\"text\"\n required\n .value=${this.network.ledgerApi ?? ''}\n @change=${(e: Event) => {\n this.network.ledgerApi = (\n e.target as HTMLInputElement\n ).value\n }}\n />\n </div>\n\n <h3 class=\"section-title\">Configure user auth</h3>\n <auth-editor\n .auth=${this.network.auth}\n @auth-change=${(e: AuthEditorChangeEvent) => {\n if (e.auth) {\n this.network = {\n ...this.network,\n auth: e.auth,\n }\n }\n }}\n ></auth-editor>\n\n <h3 class=\"section-title\">Configure admin auth</h3>\n <auth-editor\n .auth=${this.network.adminAuth}\n .optional=${true}\n .emptyText=${'No admin auth configured.'}\n .pendingRemoveText=${'Admin auth will be removed after submitting this form.'}\n @auth-change=${(e: AuthEditorChangeEvent) => {\n // oxlint-disable-next-line no-unused-vars\n const { adminAuth, ...network } = this.network\n this.network = {\n ...network,\n ...(e.auth && { adminAuth: e.auth }),\n }\n }}\n ></auth-editor>\n\n <h3 class=\"section-title\">\n Configure service account auth\n </h3>\n <auth-editor\n .auth=${this.network.serviceAccountAuth}\n .allowedMethods=${['client_credentials']}\n .optional=${true}\n .emptyText=${'No service account auth configured.'}\n .pendingRemoveText=${'Service account auth will be removed after submitting this form.'}\n @auth-change=${(e: AuthEditorChangeEvent) => {\n // oxlint-disable-next-line no-unused-vars\n const { serviceAccountAuth, ...network } =\n this.network\n this.network = {\n ...network,\n ...(e.auth && { serviceAccountAuth: e.auth }),\n }\n }}\n ></auth-editor>\n </div>\n\n ${\n this._error\n ? html`<div class=\"form-error\">${this._error}</div>`\n : nothing\n }\n ${\n isReview\n ? html`\n <div class=\"delete-section\">\n <h4 class=\"delete-title\">Delete network</h4>\n <p class=\"delete-desc\">\n You will not be able to undo the change\n once you delete this network.\n </p>\n <button\n type=\"button\"\n class=\"btn-delete\"\n @click=${() =>\n this.dispatchEvent(\n new NetworkDeleteEvent(\n this.network\n )\n )}\n >\n Delete Network\n </button>\n </div>\n\n <div class=\"form-actions\">\n <button\n type=\"button\"\n class=\"btn-cancel\"\n @click=${() =>\n this.dispatchEvent(\n new NetworkEditCancelEvent()\n )}\n >\n Cancel\n </button>\n <button\n data-test-id=\"update-network-button\"\n class=\"btn btn-primary rounded-pill btn-submit\"\n type=\"submit\"\n >\n Update\n </button>\n </div>\n `\n : html`\n <div class=\"mt-auto pt-3\">\n <button\n data-test-id=\"add-network-button\"\n class=\"btn btn-primary rounded-pill w-100\"\n type=\"submit\"\n >\n Add\n </button>\n </div>\n `\n }\n </form>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, css } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { BaseElement } from '../internal/base-element'\nimport './error-page' // ensure wg-error-page is registered\n\nexport\n@customElement('not-found')\nclass NotFound extends BaseElement {\n static styles = [\n BaseElement.styles,\n css`\n :host {\n display: block;\n }\n `,\n ]\n\n @property({ type: String }) accessor href: string = '/'\n\n render() {\n return html`\n <wg-error-page\n mode=\"back\"\n title=\"Page not found\"\n message=\"Sorry, the page you're looking for doesn't exist. It may have been moved or deleted.\"\n backHref=${this.href}\n ></wg-error-page>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { BaseElement } from '../internal/base-element'\nimport { refreshIcon } from '../icons'\n\nexport class WalletsSyncEvent extends Event {\n constructor() {\n super('wallets-sync', { bubbles: true, composed: true })\n }\n}\n\n/**\n * Refresh button for the parties list. It only reports clicks: the page does\n * the sync, shows the result and refreshes the wallets.\n */\nexport\n@customElement('wg-wallets-sync')\nclass WgWalletsSync extends BaseElement {\n static styles = [\n BaseElement.styles,\n css`\n :host {\n display: inline-flex;\n align-items: center;\n line-height: 1;\n vertical-align: middle;\n }\n\n .sync-button {\n border: none;\n background: transparent;\n color: var(--wg-text-secondary);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 1.4rem;\n height: 1.4rem;\n padding: 0;\n line-height: 1;\n border-radius: var(--wg-radius-full);\n transition:\n color 0.2s ease,\n background-color 0.2s ease,\n transform 0.2s ease;\n }\n\n .sync-button:hover:not(:disabled) {\n color: var(--wg-accent);\n }\n\n .sync-button:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .sync-button.out-of-sync {\n color: var(--wg-accent);\n }\n\n .sync-icon {\n width: 0.9rem;\n height: 0.9rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n\n .sync-icon.spinning {\n animation: spin 1s linear infinite;\n }\n\n @keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n `,\n ]\n\n /** Highlights the button to show that there are changes to sync */\n @property({ type: Boolean }) accessor syncNeeded = false\n /** Shows a spinner and disables the button while a sync is in progress */\n @property({ type: Boolean }) accessor syncing = false\n /** Disables the button, e.g. while there is no API client yet */\n @property({ type: Boolean }) accessor disabled = false\n\n private onClick = () => {\n this.dispatchEvent(new WalletsSyncEvent())\n }\n\n protected render() {\n const title = this.syncing\n ? 'Syncing parties...'\n : this.syncNeeded\n ? 'Refresh parties (changes available)'\n : 'Refresh parties'\n\n return html`\n <button\n class=\"sync-button ${this.syncNeeded ? 'out-of-sync' : ''}\"\n .disabled=${this.disabled || this.syncing}\n @click=${this.onClick}\n title=${title}\n aria-label=${title}\n >\n <span class=\"sync-icon ${this.syncing ? 'spinning' : ''}\">\n ${refreshIcon}\n </span>\n </button>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { css, html, nothing } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { BaseElement } from '../internal/base-element.js'\nimport { PartyLevelRight, type Wallet } from '@canton-network/core-wallet-store'\nimport { cardStyles } from '../styles/card.js'\nimport './copy-button.js'\n\nexport class WalletSetPrimaryEvent extends Event {\n constructor(public wallet: Wallet) {\n super('wallet-set-primary', { bubbles: true, composed: true })\n }\n}\n\nexport class WalletCardEditEvent extends Event {\n constructor(public wallet: Wallet) {\n super('wallet-edit', { bubbles: true, composed: true })\n }\n}\n\nexport class WalletAllocateEvent extends Event {\n constructor(public wallet: Wallet) {\n super('wallet-allocate', { bubbles: true, composed: true })\n }\n}\n\nexport class WalletCardSelectEvent extends Event {\n constructor(public wallet: Wallet) {\n super('wallet-select', { bubbles: true, composed: true })\n }\n}\n\nexport\n@customElement('wg-wallet-card')\nclass WgWalletCard extends BaseElement {\n @property({ type: Object }) accessor wallet: Wallet | null = null\n @property({ type: Boolean }) accessor verified = false\n @property({ type: Boolean }) accessor loading = false\n @property({ type: Boolean }) accessor editable = true\n // When set, the card has action button instead of edit, allocate, or set-primary\n @property() accessor selectLabel = ''\n @property({ type: Boolean }) accessor selecting = false\n\n static styles = [\n BaseElement.styles,\n cardStyles,\n css`\n .party-card {\n padding: var(--wg-space-3);\n gap: var(--wg-space-3);\n min-height: 13em;\n }\n\n .badge {\n border-radius: var(--wg-radius-full);\n padding: 0.15rem 0.6rem;\n font-size: var(--wg-font-size-xs);\n font-weight: var(--wg-font-weight-semibold);\n letter-spacing: 0.04em;\n line-height: 1.2;\n }\n\n .badge-primary {\n background: rgba(var(--wg-success-rgb), 0.14);\n color: var(--wg-success);\n }\n\n .badge-disabled {\n background: rgba(var(--wg-error-rgb), 0.14);\n color: var(--wg-error);\n }\n\n .badge-right {\n background: var(--wg-badge-bg);\n color: var(--wg-text);\n }\n\n .rights-badges {\n display: inline-flex;\n flex-wrap: wrap;\n justify-content: flex-end;\n gap: 0.25rem;\n line-height: 1;\n }\n\n .meta {\n display: grid;\n gap: var(--wg-space-2);\n }\n\n .meta-row {\n display: grid;\n grid-template-columns:\n minmax(5.5rem, 6rem) minmax(0, 1fr)\n 1.75rem;\n align-items: center;\n column-gap: 0.625rem;\n min-height: 1.75rem;\n min-width: 0;\n }\n\n .meta-row--copy {\n grid-template-columns:\n minmax(5.5rem, 6rem) minmax(0, 1fr)\n 1.75rem;\n }\n\n .meta-row--stacked {\n grid-template-columns: minmax(0, 1fr);\n align-items: start;\n }\n\n .meta-row wg-copy-button {\n justify-self: end;\n align-self: center;\n }\n\n .meta-title {\n margin: 0;\n color: var(--wg-text-secondary);\n font-size: var(--wg-font-size-xs);\n font-weight: var(--wg-font-weight-semibold);\n line-height: 1.3;\n white-space: nowrap;\n }\n\n .meta-value {\n margin: 0;\n color: var(--wg-text);\n font-size: var(--wg-font-size-sm);\n min-width: 0;\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 1.35;\n text-align: right;\n white-space: nowrap;\n }\n\n .meta-value--badges {\n display: inline-flex;\n justify-content: flex-end;\n align-items: center;\n overflow: visible;\n white-space: normal;\n }\n\n .party-id-value {\n max-width: min(15rem, 100%);\n }\n\n .meta-value-wrap {\n overflow: visible;\n text-overflow: unset;\n white-space: normal;\n text-align: left;\n }\n\n .card-actions {\n margin-top: var(--wg-space-1);\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 0.375rem;\n }\n\n .link-action {\n border: none;\n background: transparent;\n padding: 0;\n color: var(--wg-accent);\n font-size: var(--wg-font-size-sm);\n font-weight: var(--wg-font-weight-medium);\n line-height: 1.2;\n text-decoration: none;\n text-underline-offset: 2px;\n }\n `,\n ]\n\n private renderRightsBadges() {\n if (!this.wallet?.rights?.length) return null\n\n return html`\n <span class=\"rights-badges\">\n ${\n this.wallet.rights.includes(PartyLevelRight.CanActAs)\n ? html`<span class=\"badge badge-right\">CanActAs</span>`\n : ''\n }\n ${\n this.wallet.rights.includes(PartyLevelRight.CanReadAs)\n ? html`<span class=\"badge badge-right\">CanReadAs</span>`\n : ''\n }\n ${\n this.wallet.rights.includes(PartyLevelRight.CanExecuteAs)\n ? html`<span class=\"badge badge-right\"\n >CanExecuteAs</span\n >`\n : ''\n }\n </span>\n `\n }\n\n private renderStatusBadge() {\n if (!this.wallet) return nothing\n\n const badge = this.wallet.primary\n ? html`<span class=\"badge badge-primary\">PRIMARY</span>`\n : this.wallet.disabled\n ? html`<span class=\"badge badge-disabled\">Disabled</span>`\n : nothing\n\n return badge\n }\n\n private renderMeta() {\n if (!this.wallet) return nothing\n\n const excerptedPartyId =\n this.wallet.partyId.length > 24\n ? `${this.wallet.partyId.slice(0, 10)}...${this.wallet.partyId.slice(-10)}`\n : this.wallet.partyId\n const shouldStackReason = Boolean(\n this.wallet.reason &&\n (this.wallet.reason.length > 72 ||\n this.wallet.reason.includes('\\n'))\n )\n\n return html`\n <div\n class=\"meta\"\n data-test-external-tx-id=${this.wallet.externalTxId || ''}\n >\n <div\n class=${\n this.wallet.hint\n ? 'meta-row meta-row--copy'\n : 'meta-row'\n }\n >\n <p class=\"meta-title\">Party hint</p>\n <p class=\"meta-value\" title=${this.wallet.hint || '-'}>\n ${this.wallet.hint || '-'}\n </p>\n ${\n this.wallet.hint\n ? html`\n <wg-copy-button\n .value=${this.wallet.hint}\n label=\"Copy party hint\"\n ></wg-copy-button>\n `\n : null\n }\n </div>\n\n <div class=\"meta-row meta-row--copy\">\n <p class=\"meta-title\">Party ID</p>\n <p\n class=\"meta-value party-id-value\"\n title=${this.wallet.partyId}\n >\n ${excerptedPartyId}\n </p>\n <wg-copy-button\n .value=${this.wallet.partyId}\n label=\"Copy party ID\"\n ></wg-copy-button>\n </div>\n\n <div class=\"meta-row\">\n <p class=\"meta-title\">Signing provider</p>\n <p\n class=\"meta-value\"\n title=${this.wallet.signingProviderId}\n >\n ${this.wallet.signingProviderId}\n </p>\n </div>\n\n ${\n this.wallet.reason\n ? html`\n <div\n class=${\n shouldStackReason\n ? 'meta-row meta-row--stacked'\n : 'meta-row'\n }\n >\n <p class=\"meta-title\">Reason</p>\n <p\n class=${\n shouldStackReason\n ? 'meta-value meta-value-wrap'\n : 'meta-value'\n }\n title=${this.wallet.reason}\n >\n ${this.wallet.reason}\n </p>\n </div>\n `\n : null\n }\n ${\n this.wallet.rights?.length\n ? html`\n <div class=\"meta-row\">\n <p class=\"meta-title\">Permissions</p>\n <p class=\"meta-value meta-value--badges\">\n ${this.renderRightsBadges()}\n </p>\n </div>\n `\n : null\n }\n </div>\n `\n }\n\n private renderEditButton() {\n return this.editable || this.wallet?.disabled\n ? html`\n <button\n type=\"button\"\n class=\"link-action\"\n ?disabled=${this.loading}\n @click=${() =>\n this.dispatchEvent(\n new WalletCardEditEvent(this.wallet!)\n )}\n >\n Edit\n </button>\n `\n : nothing\n }\n\n private renderActions() {\n if (!this.wallet) return null\n\n if (this.selectLabel) {\n return html`\n <div class=\"card-actions\">\n <button\n type=\"button\"\n class=\"btn btn-outline-secondary btn-sm rounded-pill d-inline-flex align-items-center gap-2\"\n ?disabled=${this.loading || this.selecting}\n @click=${() =>\n this.dispatchEvent(\n new WalletCardSelectEvent(this.wallet!)\n )}\n >\n ${\n this.selecting\n ? html`<span\n class=\"spinner-border spinner-border-sm\"\n aria-hidden=\"true\"\n ></span>`\n : nothing\n }\n ${this.selectLabel}\n </button>\n </div>\n `\n }\n\n const badge = this.renderStatusBadge()\n const editButton = this.renderEditButton()\n\n if (this.verified) {\n if (this.wallet.primary || this.wallet.disabled) {\n if (!badge) return null\n\n return html`\n <div class=\"card-actions\">${badge} ${editButton}</div>\n `\n }\n\n return html`\n <div class=\"card-actions\">\n ${badge}\n <button\n type=\"button\"\n class=\"link-action\"\n ?disabled=${this.loading}\n @click=${() =>\n this.dispatchEvent(\n new WalletSetPrimaryEvent(this.wallet!)\n )}\n >\n Set as primary\n </button>\n ${editButton}\n </div>\n `\n }\n\n return html`\n <div class=\"card-actions\">\n ${badge}\n <button\n class=\"btn btn-outline-secondary btn-sm rounded-pill\"\n ?disabled=${this.loading || this.wallet.disabled}\n @click=${() =>\n this.dispatchEvent(\n new WalletAllocateEvent(this.wallet!)\n )}\n >\n Allocate party\n </button>\n </div>\n `\n }\n\n override connectedCallback() {\n super.connectedCallback()\n this.syncPartyIdAttribute()\n }\n\n override updated() {\n this.syncPartyIdAttribute()\n }\n\n private syncPartyIdAttribute() {\n if (this.wallet?.partyId) {\n this.setAttribute('party-id', this.wallet.partyId)\n } else {\n this.removeAttribute('party-id')\n }\n }\n\n protected render() {\n if (!this.wallet) {\n return html`<article class=\"wg-card party-card\">\n No party supplied\n </article>`\n }\n\n return html`\n <article\n class=\"wg-card party-card d-flex flex-column h-100 justify-content-between\"\n >\n ${this.renderMeta()} ${this.renderActions()}\n </article>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Wallet } from '@canton-network/core-wallet-user-rpc-client'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { isWalletEditable, partitionWallets } from '../logic/parties.js'\nimport { BaseElement } from '../internal/base-element.js'\nimport './wallet-card.js'\n\n/**\n * The grid of party cards: wallets that still need to be allocated first, then\n * the allocated ones. The cards' `wallet-allocate`, `wallet-edit` and\n * `wallet-set-primary` events bubble out of this element.\n */\nexport\n@customElement('wg-wallet-list')\nclass WgWalletList extends BaseElement {\n /** The wallets to show. While it is undefined, a loading text is shown */\n @property({ type: Array }) accessor wallets: Wallet[] | undefined =\n undefined\n /** Disables the cards' actions, e.g. while a request is in flight */\n @property({ type: Boolean }) accessor loading = false\n /** Wallets of this signing provider can't be edited */\n @property() accessor nonEditableSigningProviderId = ''\n\n static styles = [\n BaseElement.styles,\n css`\n :host {\n display: block;\n }\n `,\n ]\n\n render() {\n const { verifiedWallets, unverifiedWallets } = partitionWallets(\n this.wallets\n )\n\n return html`\n ${\n this.wallets === undefined\n ? html`<p class=\"text-body-secondary mb-3\">\n Loading parties...\n </p>`\n : ''\n }\n\n <div class=\"row g-3 my-1\">\n ${unverifiedWallets.map(\n (wallet) => html`\n <div class=\"col-md-6 col-lg-4\">\n <wg-wallet-card\n .wallet=${wallet}\n ?loading=${this.loading}\n ></wg-wallet-card>\n </div>\n `\n )}\n </div>\n\n <div class=\"row g-3 my-1\">\n ${verifiedWallets.map(\n (wallet) => html`\n <div class=\"col-md-6 col-lg-4\">\n <wg-wallet-card\n .wallet=${wallet}\n verified\n .editable=${isWalletEditable(\n wallet,\n this.nonEditableSigningProviderId\n )}\n ?loading=${this.loading}\n ></wg-wallet-card>\n </div>\n `\n )}\n </div>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { css, html, nothing, type TemplateResult } from 'lit'\nimport { BaseElement } from '../internal/base-element.js'\nimport type {\n Key,\n SigningProviderId,\n} from '@canton-network/core-wallet-user-rpc-client'\nimport { property } from 'lit/decorators.js'\n\nexport class SigningProviderChangeEvent extends Event {\n constructor(public signingProviderId: SigningProviderId) {\n super('signing-provider-change', { bubbles: true, composed: true })\n }\n}\n\nexport abstract class WgWalletForm extends BaseElement {\n protected abstract onSubmit: (event: SubmitEvent) => void | Promise<void>\n protected abstract submittingLabel: string\n protected abstract submitLabel: string\n protected abstract submittingMessage: string\n protected abstract get formFields(): TemplateResult\n protected abstract get isLoading(): boolean\n protected abstract get submitDisabled(): boolean\n\n @property({ type: Array }) accessor signingProviders: string[] = []\n @property({ type: Boolean }) accessor signingProvidersLoading = false\n @property({ type: String }) accessor signingProvidersLoadingLabel =\n 'Loading signing providers...'\n @property({ type: String }) accessor noSigningProvidersLabel =\n 'No signing providers available'\n @property({ type: Boolean }) accessor submitting = false\n @property({ type: Boolean }) accessor publicKeysLoading = false\n @property({ type: Array }) accessor publicKeys: Key[] = []\n\n protected get hasNoSigningProviders(): boolean {\n return (\n !this.signingProvidersLoading && this.signingProviders.length === 0\n )\n }\n\n static styles = [\n BaseElement.styles,\n css`\n :host {\n display: block;\n }\n\n .form-fields {\n gap: var(--wg-space-4);\n }\n\n .field-group {\n gap: var(--wg-space-2);\n }\n\n .field-label {\n font-size: var(--wg-font-size-sm);\n font-weight: var(--wg-font-weight-medium);\n color: var(--wg-text-secondary);\n line-height: var(--wg-line-height-tight);\n }\n\n .required {\n color: var(--wg-label-required-color);\n }\n\n .field-control {\n width: 100%;\n border: 1px solid var(--wg-input-border);\n border-radius: 4px;\n background: var(--wg-input-bg);\n color: var(--wg-input-text);\n padding: 12px 14px;\n }\n\n .field-control::placeholder {\n color: var(--wg-input-placeholder);\n }\n\n .field-control:focus {\n border-color: var(--wg-input-border-focus);\n box-shadow: 0 0 0 3px rgba(var(--wg-accent-rgb), 0.12);\n }\n\n .field-control:disabled {\n background: rgba(var(--wg-shade-rgb), 0.04);\n color: var(--wg-text-secondary);\n opacity: 1;\n }\n\n .select-wrap {\n position: relative;\n }\n\n .select-wrap .field-control {\n padding-right: 40px;\n appearance: none;\n -webkit-appearance: none;\n }\n\n .select-chevron {\n position: absolute;\n top: 50%;\n right: 12px;\n transform: translateY(-50%);\n color: var(--wg-text-secondary);\n pointer-events: none;\n display: inline-flex;\n }\n\n .primary-row {\n display: flex;\n align-items: center;\n gap: var(--wg-space-2);\n margin-top: var(--wg-space-1);\n padding: 0;\n border: none;\n background: transparent;\n }\n\n .form-check-input {\n accent-color: var(--wg-primary);\n margin: 0;\n flex: 0 0 auto;\n }\n\n .primary-row .form-check-input {\n float: none;\n margin-left: 0;\n }\n\n .form-check-input:focus {\n box-shadow: 0 0 0 3px rgba(var(--wg-accent-rgb), 0.12);\n }\n\n .primary-label {\n color: var(--wg-text-secondary);\n font-size: var(--wg-font-size-sm);\n font-weight: var(--wg-font-weight-medium);\n }\n\n .submit-wrap {\n gap: var(--wg-space-3);\n }\n\n .submit-button {\n min-height: 44px;\n }\n\n .loading-message {\n margin: 0;\n color: var(--wg-text-secondary);\n font-size: var(--wg-font-size-sm);\n text-align: center;\n }\n `,\n ]\n\n protected render() {\n return html`\n <form class=\"d-flex flex-column h-100\" @submit=${this.onSubmit}>\n <div class=\"form-fields d-flex flex-column\">\n ${this.formFields}\n </div>\n\n <div class=\"submit-wrap mt-auto pt-3 d-flex flex-column\">\n <button\n class=\"submit-button btn btn-primary rounded-pill w-100 d-inline-flex align-items-center justify-content-center gap-2\"\n ?disabled=${this.isLoading || this.submitDisabled}\n type=\"submit\"\n >\n ${\n this.submitting\n ? html`<span\n class=\"spinner-border spinner-border-sm\"\n aria-hidden=\"true\"\n ></span>`\n : nothing\n }\n ${\n this.submitting\n ? this.submittingLabel\n : this.submitLabel\n }\n </button>\n\n ${\n this.submitting\n ? html`<p\n class=\"loading-message\"\n role=\"status\"\n aria-live=\"polite\"\n >\n ${this.submittingMessage}\n </p>`\n : nothing\n }\n </div>\n </form>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { chevronDownIcon } from '../icons/index.js'\nimport { SigningProviderChangeEvent, WgWalletForm } from './wallet-form.js'\nimport type {\n KeyName,\n PartyHint,\n SigningProviderId,\n} from '@canton-network/core-wallet-user-rpc-client'\nexport { SigningProviderChangeEvent } from './wallet-form.js'\n\nexport class WalletCreateEvent extends Event {\n constructor(\n public partyHint: PartyHint,\n public signingProviderId: SigningProviderId,\n public primary: boolean,\n public keyName?: KeyName | undefined\n ) {\n super('wallet-create', { bubbles: true, composed: true })\n }\n}\n\nexport\n@customElement('wg-wallet-create-form')\nclass WgWalletCreateForm extends WgWalletForm {\n protected readonly submitLabel = 'Add'\n protected readonly submittingLabel = 'Adding...'\n protected readonly submittingMessage = 'Creating party, please wait...'\n protected get submitDisabled(): boolean {\n return this.hasNoSigningProviders\n }\n\n @property({ type: Array }) accessor keySigningProviders: string[] = []\n @property({ type: Boolean }) accessor showPrimary = true\n\n @state() accessor partyHint = ''\n @property() accessor selectedSigningProvider = ''\n @state() accessor isPrimaryValue = false\n @state() accessor publicKeyValue = ''\n\n protected onSubmit = (event: SubmitEvent) => {\n event.preventDefault()\n\n if (this.isLoading || this.hasNoSigningProviders) {\n return\n }\n\n const selectedKey = this.publicKeys.find(\n (key) => key.id === this.publicKeyValue\n )\n const keyName = selectedKey?.name\n\n this.dispatchEvent(\n new WalletCreateEvent(\n this.partyHint,\n this.selectedSigningProvider,\n this.isPrimaryValue,\n keyName\n )\n )\n }\n\n private get showPublicKeySelect(): boolean {\n return (\n !!this.selectedSigningProvider &&\n this.keySigningProviders.includes(this.selectedSigningProvider)\n )\n }\n\n private onSigningProviderChange(event: Event) {\n const signingProviderId = (event.target as HTMLSelectElement).value\n this.selectedSigningProvider = signingProviderId\n this.publicKeyValue = ''\n this.dispatchEvent(new SigningProviderChangeEvent(signingProviderId))\n }\n\n protected get isLoading(): boolean {\n return (\n this.submitting ||\n this.signingProvidersLoading ||\n (this.showPublicKeySelect && this.publicKeysLoading)\n )\n }\n\n private onPartyHintInput = (event: InputEvent) => {\n this.partyHint = (event.target as HTMLInputElement).value\n }\n\n private onPublicKeyChange = (event: Event) => {\n this.publicKeyValue = (event.target as HTMLSelectElement).value\n }\n\n private onPrimaryChange = (event: Event) => {\n this.isPrimaryValue = (event.target as HTMLInputElement).checked\n }\n\n protected get formFields() {\n return html`\n <div class=\"field-group d-flex flex-column\">\n <label for=\"party-id-hint\" class=\"form-label field-label mb-0\">\n Party ID Hint <span class=\"required\">*</span>\n </label>\n <input\n .value=${this.partyHint}\n @input=${this.onPartyHintInput}\n ?disabled=${this.submitting}\n class=\"form-control field-control\"\n id=\"party-id-hint\"\n type=\"text\"\n placeholder=\"Enter the name of your wallet?\"\n required\n />\n </div>\n\n <div class=\"field-group d-flex flex-column\">\n <label\n for=\"signing-provider-id\"\n class=\"form-label field-label mb-0\"\n >\n Signing Provider <span class=\"required\">*</span>\n </label>\n <div class=\"select-wrap\">\n <select\n .value=${this.selectedSigningProvider}\n ?disabled=${\n this.submitting ||\n this.signingProvidersLoading ||\n this.hasNoSigningProviders\n }\n class=\"form-select field-control\"\n id=\"signing-provider-id\"\n required\n @change=${this.onSigningProviderChange}\n >\n <option\n disabled\n .selected=${!this.selectedSigningProvider}\n value=\"\"\n >\n ${\n this.signingProvidersLoading\n ? this.signingProvidersLoadingLabel\n : this.hasNoSigningProviders\n ? this.noSigningProvidersLabel\n : 'Select signing provider'\n }\n </option>\n ${this.signingProviders.map(\n (providerId) =>\n html`<option\n value=${providerId}\n .selected=${\n this.selectedSigningProvider ===\n providerId\n }\n >\n ${providerId}\n </option>`\n )}\n </select>\n <span class=\"select-chevron\">${chevronDownIcon}</span>\n </div>\n </div>\n\n ${\n this.showPublicKeySelect\n ? html`\n <div class=\"field-group d-flex flex-column\">\n <label\n for=\"vault-name\"\n class=\"form-label field-label mb-0\"\n >\n Vault name\n <span class=\"required\">*</span>\n </label>\n <div class=\"select-wrap\">\n <select\n .value=${this.publicKeyValue}\n @change=${this.onPublicKeyChange}\n ?disabled=${this.isLoading}\n class=\"form-select field-control\"\n id=\"vault-name\"\n required\n >\n <option\n disabled\n .selected=${!this.publicKeyValue}\n value=\"\"\n >\n ${\n this.isLoading\n ? 'Loading vaults...'\n : 'Select vault name'\n }\n </option>\n ${this.publicKeys.map(\n (key) =>\n html`<option\n value=${key.id}\n .selected=${\n this.publicKeyValue ===\n key.id\n }\n >\n ${key.name}\n </option>`\n )}\n </select>\n <span class=\"select-chevron\"\n >${chevronDownIcon}</span\n >\n </div>\n </div>\n `\n : nothing\n }\n ${\n this.showPrimary\n ? html`\n <div class=\"primary-row mb-0\">\n <input\n id=\"primary\"\n type=\"checkbox\"\n .checked=${this.isPrimaryValue}\n @change=${this.onPrimaryChange}\n class=\"form-check-input\"\n ?disabled=${this.submitting}\n />\n <label\n for=\"primary\"\n class=\"form-check-label primary-label\"\n >Set as primary wallet</label\n >\n </div>\n `\n : nothing\n }\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { css, html, nothing } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { chevronDownIcon } from '../icons/index.js'\nimport { SigningProviderChangeEvent, WgWalletForm } from './wallet-form.js'\nimport type {\n Key,\n SigningProviderId,\n} from '@canton-network/core-wallet-user-rpc-client'\nimport type { PartyId } from '@canton-network/core-types'\n\nexport class WalletEditEvent extends Event {\n constructor(\n public partyId: PartyId,\n public signingProviderId: SigningProviderId,\n public publicKey: Key['publicKey']\n ) {\n super('wallet-edit', { bubbles: true, composed: true })\n }\n}\n\nexport\n@customElement('wg-wallet-edit-form')\nclass WgWalletEditForm extends WgWalletForm {\n protected readonly submitLabel = 'Edit'\n protected readonly submittingLabel = 'Editing...'\n protected readonly submittingMessage = 'Editing party, please wait...'\n\n @property() accessor partyId = ''\n @property() accessor selectedPublicKey = ''\n @property() accessor selectedSigningProvider = ''\n @property({ type: Array }) accessor disabledSigningProviders: string[] = []\n\n static styles = [\n WgWalletForm.styles,\n css`\n .spinner {\n left: 1em;\n transform: translateY(-50%);\n }\n `,\n ]\n\n protected onSubmit = (event: SubmitEvent) => {\n event.preventDefault()\n\n if (\n this.isLoading ||\n !this.selectedPublicKey ||\n !this.selectedSigningProvider\n ) {\n return\n }\n\n this.dispatchEvent(\n new WalletEditEvent(\n this.partyId,\n this.selectedSigningProvider,\n this.selectedPublicKey\n )\n )\n }\n\n private onSigningProviderChange(event: Event) {\n const signingProviderId = (event.target as HTMLSelectElement).value\n this.selectedSigningProvider = signingProviderId\n this.selectedPublicKey = ''\n this.dispatchEvent(new SigningProviderChangeEvent(signingProviderId))\n }\n\n private onPublicKeyChange(event: Event) {\n const publicKey = (event.target as HTMLSelectElement).value\n this.selectedPublicKey = publicKey\n }\n\n protected get isLoading(): boolean {\n return this.submitting || this.signingProvidersLoading\n }\n\n protected get submitDisabled(): boolean {\n return (\n this.hasNoSigningProviders ||\n !this.selectedSigningProvider.length ||\n this.selectedSigningProviderDisabled ||\n this.publicKeysLoading\n )\n }\n\n private get selectedSigningProviderDisabled(): boolean {\n return this.disabledSigningProviders.includes(\n this.selectedSigningProvider\n )\n }\n\n protected get formFields() {\n // A disabled signing provider shows the placeholder, not its key\n const publicKey = this.selectedSigningProviderDisabled\n ? ''\n : this.selectedPublicKey\n return html`\n <div class=\"field-group d-flex flex-column\">\n <label for=\"party-id\" class=\"form-label field-label mb-0\">\n Party ID <span class=\"required\">*</span>\n </label>\n <input\n ?disabled=${true}\n .value=${this.partyId}\n class=\"form-control field-control\"\n id=\"party-id\"\n type=\"text\"\n required\n readonly\n />\n </div>\n\n <div class=\"field-group d-flex flex-column\">\n <label\n for=\"signing-provider-id\"\n class=\"form-label field-label mb-0\"\n >\n Signing Provider <span class=\"required\">*</span>\n </label>\n <div class=\"select-wrap\">\n <select\n .value=${this.selectedSigningProvider}\n ?disabled=${\n this.submitting ||\n this.signingProvidersLoading ||\n this.hasNoSigningProviders\n }\n class=\"form-select field-control\"\n id=\"signing-provider-id\"\n required\n @change=${this.onSigningProviderChange}\n >\n <option\n disabled\n .selected=${!this.selectedSigningProvider}\n value=\"\"\n >\n ${\n this.signingProvidersLoading\n ? this.signingProvidersLoadingLabel\n : this.hasNoSigningProviders\n ? this.noSigningProvidersLabel\n : 'Select signing provider'\n }\n </option>\n ${this.signingProviders.map(\n (providerId) =>\n html`<option\n value=${providerId}\n .selected=${\n this.selectedSigningProvider ===\n providerId\n }\n ?disabled=${this.disabledSigningProviders.includes(providerId)}\n >\n ${providerId}\n </option>`\n )}\n </select>\n <span class=\"select-chevron\">${chevronDownIcon}</span>\n </div>\n </div>\n\n <div class=\"field-group d-flex flex-column\">\n <label for=\"public-key-id\" class=\"form-label field-label mb-0\">\n Public Key <span class=\"required\">*</span>\n </label>\n <div class=\"select-wrap\">\n <select\n .value=${publicKey}\n @change=${this.onPublicKeyChange}\n ?disabled=${this.submitting}\n class=\"form-select field-control\"\n id=\"public-key-id\"\n required\n >\n <option disabled .selected=${!publicKey} value=\"\">\n ${this.publicKeysLoading ? nothing : this.selectedSigningProviderDisabled ? 'Select different signing provider' : 'Select public key'}\n </option>\n ${this.publicKeys.map(\n (key) =>\n html`<option\n value=${key.publicKey}\n .selected=${publicKey === key.publicKey}\n >\n ${key.name} (${key.publicKey})\n </option>`\n )}\n </select>\n ${\n this.publicKeysLoading\n ? html`<div\n class=\"spinner d-inline position-absolute top-50\"\n >\n <span\n class=\"spinner-border spinner-border-sm\"\n aria-hidden=\"true\"\n ></span>\n </div>`\n : nothing\n }\n <span class=\"select-chevron\">${chevronDownIcon}</span>\n </div>\n </div>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { css, html, nothing, type PropertyValues } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport './back-link.js'\nimport { BaseElement } from '../internal/base-element.js'\nimport type {\n PublicNetwork,\n Idp,\n} from '@canton-network/core-wallet-user-rpc-client'\nimport { chevronDownIcon } from '../icons'\nimport cantonLogo from '../../images/logos/canton-logo.png'\n\n/** Emitted when the user clicks the Connect button */\nexport class LoginConnectEvent extends Event {\n constructor(\n public selectedNetwork: PublicNetwork,\n public selectedIdp: Idp,\n public clientId?: string,\n public clientSecret?: string,\n public username?: string\n ) {\n super('login-connect', { bubbles: true, composed: true })\n }\n}\n\n/** Emitted when the user clicks the Back link */\nexport class LoginBackEvent extends Event {\n constructor() {\n super('login-back', {\n bubbles: true,\n composed: true,\n cancelable: true,\n })\n }\n}\n\nexport\n@customElement('wg-login-form')\nclass WgLoginForm extends BaseElement {\n /** Available networks to show in the dropdown */\n @property({ type: Array }) accessor networks: PublicNetwork[] = []\n\n /** Available identity providers */\n @property({ type: Array }) accessor idps: Idp[] = []\n\n /** Locks form until idps and networks are loaded */\n @property({ type: Boolean }) accessor loading = false\n\n @property({ type: Boolean }) accessor connecting = false\n @property({ type: String }) accessor backHref = '/'\n\n @state() accessor selectedNetwork: PublicNetwork | null = null\n @state() accessor message: string | null = null\n @state() accessor messageType: 'error' | 'info' | null = null\n\n static styles = [\n BaseElement.styles,\n css`\n :host {\n display: block;\n min-height: 100dvh;\n }\n\n .screen {\n min-height: 100dvh;\n display: flex;\n flex-direction: column;\n }\n\n .top-bar {\n height: 44px;\n display: flex;\n align-items: center;\n padding: 0 14px;\n border-bottom: 1px solid var(--wg-input-border);\n }\n\n .top-logo {\n width: 24px;\n height: 24px;\n object-fit: contain;\n display: block;\n }\n\n .content {\n flex: 1;\n padding: 14px 16px 0;\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n\n .title-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n margin-bottom: 20px;\n }\n\n .select-wrap {\n position: relative;\n }\n\n .network-select,\n .login-input {\n width: 100%;\n border: 1px solid var(--wg-input-border);\n border-radius: 4px;\n background: var(--wg-input-bg);\n padding: 12px 40px 12px 14px;\n font: inherit;\n line-height: var(--bs-body-line-height);\n outline: none;\n appearance: none;\n }\n\n .network-select:focus,\n .login-input:focus {\n border-color: var(--wg-input-border-focus);\n box-shadow: 0 0 0 3px rgba(var(--wg-accent-rgb), 0.12);\n }\n\n .select-chevron {\n position: absolute;\n right: 12px;\n top: 50%;\n transform: translateY(-50%);\n color: var(--wg-text);\n pointer-events: none;\n display: inline-flex;\n }\n\n .footer {\n margin-top: auto;\n padding: 16px;\n }\n\n .connect-btn {\n padding: 12px 18px;\n }\n `,\n ]\n\n protected updated(changedProperties: PropertyValues<this>) {\n super.updated(changedProperties)\n\n if (\n changedProperties.has('networks') ||\n changedProperties.has('idps')\n ) {\n this.selectedNetwork = this.reconcileSelectedNetwork()\n }\n }\n\n get selectedIdp(): Idp | null {\n return (\n this.idps.find(\n (idp) => idp.id === this.selectedNetwork?.identityProviderId\n ) ?? null\n )\n }\n\n private isSelectable(network: PublicNetwork): boolean {\n return network.authMethod !== 'client_credentials'\n }\n\n // If no network is selected - select first available\n // If network selected, validate that it is in currently available networks\n private reconcileSelectedNetwork(): PublicNetwork | null {\n const selectedId = this.selectedNetwork?.id\n const current = this.networks.find(\n (network) => network.id === selectedId\n )\n\n if (current && this.isSelectable(current)) {\n return current\n }\n\n return this.networks.find(this.isSelectable) ?? null\n }\n\n private get selectedNetworkIndex() {\n if (!this.selectedNetwork) {\n return ''\n }\n\n const index = this.networks.findIndex(\n (network) => network.id === this.selectedNetwork?.id\n )\n\n return index >= 0 ? String(index) : ''\n }\n\n private handleChange(e: Event) {\n const raw = (e.target as HTMLSelectElement).value\n const index = Number.parseInt(raw, 10)\n\n this.selectedNetwork = Number.isNaN(index)\n ? null\n : (this.networks[index] ?? null)\n this.message = null\n }\n\n private handleConnect() {\n this.message = null\n\n if (!this.selectedNetwork) {\n this.messageType = 'error'\n this.message = 'Please select a network before connecting.'\n return\n }\n\n const idp = this.selectedIdp\n\n if (!idp) {\n this.messageType = 'error'\n this.message = 'Identity provider misconfigured for this network.'\n return\n }\n\n let clientId: string | undefined\n let clientSecret: string | undefined\n let username: string | undefined\n\n if (idp.type === 'self_signed') {\n clientId =\n (\n this.renderRoot.querySelector(\n '#client-id'\n ) as HTMLInputElement | null\n )?.value || this.selectedNetwork.clientId\n\n clientSecret =\n (\n this.renderRoot.querySelector(\n '#client-secret'\n ) as HTMLInputElement | null\n )?.value ?? ''\n }\n\n if (idp.type === 'self_issued') {\n username =\n (\n this.renderRoot.querySelector(\n '#username'\n ) as HTMLInputElement | null\n )?.value.trim() ?? ''\n }\n\n this.dispatchEvent(\n new LoginConnectEvent(\n this.selectedNetwork,\n idp,\n clientId,\n clientSecret,\n username\n )\n )\n }\n\n private handleSubmit(e: Event) {\n e.preventDefault()\n this.handleConnect()\n }\n\n /** Set a status message on the form (e.g. \"Redirecting...\") */\n setMessage(message: string, type: 'error' | 'info') {\n this.message = message\n this.messageType = type\n }\n\n /** Clear the status message */\n clearMessage() {\n this.message = null\n this.messageType = null\n }\n\n protected render() {\n const renderAuthSpecificInputs = () => {\n if (\n this.selectedIdp?.type === 'self_issued' ||\n this.selectedNetwork?.authMethod === 'self_issued'\n ) {\n return html`\n <label\n class=\"form-label fw-semibold text-body mt-3 mb-2\"\n for=\"username\"\n >Username</label\n >\n <input\n id=\"username\"\n class=\"login-input form-control\"\n type=\"text\"\n autocomplete=\"username\"\n required\n ?disabled=${this.connecting}\n />\n `\n }\n\n if (this.selectedIdp?.type === 'self_signed') {\n return html`\n <label\n class=\"form-label fw-semibold text-body mt-3 mb-2\"\n for=\"client-id\"\n >Client ID</label\n >\n <input\n id=\"client-id\"\n class=\"login-input form-control\"\n type=\"text\"\n autocomplete=\"username\"\n .value=${this.selectedNetwork?.clientId || ''}\n ?disabled=${this.connecting}\n />\n <label\n class=\"form-label fw-semibold text-body mt-3 mb-2\"\n for=\"client-secret\"\n >Client Secret</label\n >\n <input\n id=\"client-secret\"\n class=\"login-input form-control\"\n type=\"password\"\n autocomplete=\"current-password\"\n ?disabled=${this.connecting}\n />\n `\n }\n\n return nothing\n }\n\n return html`\n <form class=\"screen\" @submit=${this.handleSubmit}>\n <div class=\"top-bar\">\n <img class=\"top-logo\" src=${cantonLogo} alt=\"Canton logo\" />\n </div>\n\n <div class=\"content\">\n <div class=\"title-row\">\n <h3 class=\"h3 mb-0 fw-bold\">Wallet Gateway</h3>\n </div>\n\n <label\n class=\"form-label fw-semibold text-body mt-3 mb-2\"\n for=\"network-select\"\n >\n Select a network\n </label>\n\n <div class=\"select-wrap\">\n <select\n id=\"network-select\"\n class=\"network-select form-select\"\n .value=${this.selectedNetworkIndex}\n @change=${this.handleChange}\n ?disabled=${this.loading || this.connecting}\n >\n <option value=\"\">Select network</option>\n ${this.networks.map(\n (net, index) =>\n html`<option\n value=${index}\n ?disabled=${\n net.authMethod ===\n 'client_credentials'\n }\n >\n ${net.name}\n </option>`\n )}\n </select>\n <span class=\"select-chevron\">${chevronDownIcon}</span>\n </div>\n\n ${renderAuthSpecificInputs()}\n ${\n this.message\n ? html`<div\n class=\"alert ${\n this.messageType === 'error'\n ? 'alert-danger'\n : 'alert-info'\n } py-2 px-3 small mt-2 mb-0\"\n role=\"alert\"\n >\n ${this.message}\n </div>`\n : html`<p\n class=\"form-text text-body-secondary mt-2 mb-0\"\n >\n ${\n this.loading\n ? 'Loading networks...'\n : this.selectedNetwork\n ? `Selected: ${this.selectedNetwork.name}`\n : 'Choose a network to continue.'\n }\n </p>`\n }\n </div>\n\n <div class=\"footer\">\n <button\n type=\"submit\"\n class=\"connect-btn btn btn-primary w-100 rounded-pill\"\n ?disabled=${\n this.loading ||\n this.connecting ||\n !this.selectedNetwork\n }\n >\n ${this.connecting ? 'Connecting…' : 'Connect'}\n </button>\n </div>\n </form>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ParsedTransactionInfo } from '@canton-network/core-tx-visualizer'\n\nexport function getActivityStatusTone(\n status: string\n): 'success' | 'warning' | 'danger' | 'default' {\n const normalized = status.toLowerCase()\n\n if (normalized === 'executed' || normalized === 'signed') {\n return 'success'\n }\n if (normalized === 'pending' || normalized === 'awaiting-signature') {\n return 'warning'\n }\n if (normalized === 'failed' || normalized === 'rejected') {\n return 'danger'\n }\n\n return 'default'\n}\n\n/** The MUI colour for an activity's status badge */\nexport function getActivityStatusColor(\n status: string\n): 'success' | 'warning' | 'error' | 'default' {\n const tone = getActivityStatusTone(status)\n return tone === 'danger' ? 'error' : tone\n}\n\nexport function getActivityStatusLabel(status: string): string {\n return status ? status : 'Unknown'\n}\n\nexport function getActivityStatusBadgeClass(status: string): string {\n switch (getActivityStatusTone(status)) {\n case 'success':\n return 'wg-activity-status-success'\n case 'warning':\n return 'text-bg-warning'\n case 'danger':\n return 'text-bg-danger'\n default:\n return 'text-bg-secondary'\n }\n}\n\nexport function getActivityType(parsed: ParsedTransactionInfo | null): string {\n const choiceId = parsed?.choiceId\n return choiceId ? choiceId : 'N/A'\n}\n\nexport function getActivityAmount(\n parsed: ParsedTransactionInfo | null\n): string {\n const amount = parsed?.amount\n if (!amount) {\n return 'N/A'\n }\n\n return amount\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { css, html, nothing, type TemplateResult } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { BaseElement } from '../internal/base-element.js'\nimport { cardStyles } from '../styles/card.js'\nimport type { ParsedTransactionInfo } from '@canton-network/core-tx-visualizer'\nimport {\n getActivityAmount,\n getActivityStatusBadgeClass,\n getActivityStatusLabel,\n getActivityType,\n} from '../internal/activity-utils.js'\nimport { formatDateTime, formatUtcDateTime } from '../date-time.js'\n\n/** Emitted when the user clicks an activity card */\nexport class TransactionCardReviewEvent extends Event {\n constructor(\n public transactionId: string,\n public commandId: string\n ) {\n super('transaction-review', { bubbles: true, composed: true })\n }\n}\n\nexport\n@customElement('wg-transaction-card')\nclass WgTransactionCard extends BaseElement {\n @property() accessor transactionId = ''\n\n @property() accessor commandId = ''\n\n @property() accessor externalTxId: string | null = null\n\n @property() accessor status = ''\n\n @property({ type: Object }) accessor parsed: ParsedTransactionInfo | null =\n null\n\n @property() accessor createdAt: string | null = null\n\n @property() accessor signedAt: string | null = null\n\n @property() accessor origin: string | null = null\n\n @property() accessor loading = false\n\n static styles = [\n BaseElement.styles,\n cardStyles,\n css`\n .activity-card {\n width: 100%;\n padding: var(--wg-space-3);\n text-align: left;\n cursor: pointer;\n gap: var(--wg-space-3);\n }\n\n .activity-card:hover,\n .activity-card:focus-visible {\n outline: none;\n }\n\n .activity-card:active {\n transform: translateY(1px);\n }\n\n .field-list {\n display: flex;\n flex-direction: column;\n gap: var(--wg-space-2);\n }\n\n .field {\n display: grid;\n grid-template-columns: minmax(6.75rem, max-content) minmax(\n 0,\n 1fr\n );\n align-items: center;\n column-gap: var(--wg-space-3);\n min-height: 1.75rem;\n min-width: 0;\n }\n\n .label {\n margin: 0;\n color: var(--wg-text-secondary);\n font-size: var(--wg-font-size-xs);\n font-weight: var(--wg-font-weight-semibold);\n line-height: 1.3;\n white-space: nowrap;\n }\n\n .value {\n min-width: 0;\n color: var(--wg-text);\n font-size: var(--wg-font-size-sm);\n line-height: 1.35;\n text-align: right;\n justify-self: end;\n max-width: 100%;\n }\n\n .truncate {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .status-value {\n overflow: visible;\n white-space: normal;\n }\n `,\n ]\n\n private renderFieldRow(\n label: string,\n value: string | TemplateResult,\n options: {\n title?: string | undefined\n truncate?: boolean\n valueClass?: string\n } = {}\n ) {\n const valueClasses = [\n 'value',\n options.valueClass,\n options.truncate ? 'truncate' : '',\n ]\n .filter(Boolean)\n .join(' ')\n\n return html`\n <div class=\"field\">\n <span class=\"label\">${label}</span>\n <span class=${valueClasses} title=${ifDefined(options.title)}\n >${value}</span\n >\n </div>\n `\n }\n\n private handleReview() {\n if (this.loading) {\n return\n }\n\n this.dispatchEvent(\n new TransactionCardReviewEvent(this.transactionId, this.commandId)\n )\n }\n\n protected render() {\n const activityType = getActivityType(this.parsed)\n const amount = getActivityAmount(this.parsed)\n const createdAt = formatDateTime(this.createdAt)\n\n return html`\n <button\n type=\"button\"\n class=\"activity-card wg-card\"\n @click=${this.handleReview}\n aria-label=${`Open activity ${this.commandId}`}\n >\n <div class=\"field-list\">\n ${this.renderFieldRow('Command ID', this.commandId, {\n title: this.commandId,\n truncate: true,\n })}\n ${\n this.externalTxId\n ? this.renderFieldRow(\n 'External transaction ID',\n this.externalTxId,\n {\n title: this.externalTxId,\n truncate: true,\n }\n )\n : nothing\n }\n ${this.renderFieldRow(\n 'Status',\n html`\n <span\n class=\"badge rounded-pill status-badge ${getActivityStatusBadgeClass(\n this.status\n )}\"\n >\n ${getActivityStatusLabel(this.status)}\n </span>\n `,\n {\n valueClass: 'status-value',\n }\n )}\n ${this.renderFieldRow('Action type', activityType, {\n title: activityType,\n truncate: true,\n })}\n ${this.renderFieldRow('Created at', createdAt, {\n title: formatUtcDateTime(this.createdAt),\n truncate: true,\n })}\n ${this.renderFieldRow('Amount', amount, {\n title: amount,\n truncate: true,\n })}\n </div>\n </button>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, nothing } from 'lit'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport '../components/copy-button.js'\n\nexport function renderCopyableValue(\n label: string,\n value: string | null | undefined,\n copyLabel: string,\n /** Shown instead of the copied value, e.g. a formatted date */\n { display, title }: { display?: string; title?: string | undefined } = {}\n) {\n const resolvedValue = display ?? (value || 'N/A')\n\n return html`\n <section class=\"field\">\n <div class=\"detail-row\">\n <h2 class=\"label small fw-semibold text-body-secondary mb-0\">\n ${label}\n </h2>\n <div class=\"detail-value\">\n <p class=\"value mb-0 text-body\" title=${ifDefined(title)}>\n ${resolvedValue}\n </p>\n ${\n value\n ? html`\n <wg-copy-button\n .value=${value}\n .label=${copyLabel}\n ></wg-copy-button>\n `\n : nothing\n }\n </div>\n </div>\n </section>\n `\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, css, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport './back-link.js'\nimport './copy-button.js'\nimport { BaseElement } from '../internal/base-element.js'\nimport type { ParsedTransactionInfo } from '@canton-network/core-tx-visualizer'\nimport { chevronDownIcon } from '../icons/index.js'\nimport {\n getActivityStatusBadgeClass,\n getActivityStatusLabel,\n getActivityType,\n} from '../internal/activity-utils.js'\nimport { formatDateTime, formatUtcDateTime } from '../date-time.js'\nimport { renderCopyableValue } from '../internal/activity-render.js'\n\n/** Emitted when the user clicks the \"Approve\" button */\nexport class TransactionApproveEvent extends Event {\n constructor(public commandId: string) {\n super('transaction-approve', { bubbles: true, composed: true })\n }\n}\n\n/** Emitted when the user clicks the \"Reject\" button */\nexport class TransactionDeleteEvent extends Event {\n constructor(public commandId: string) {\n super('transaction-delete', { bubbles: true, composed: true })\n }\n}\n\nexport\n@customElement('wg-transaction-detail')\nclass WgTransactionDetail extends BaseElement {\n @property() accessor commandId = ''\n\n @property() accessor externalTxId: string | null = null\n\n @property() accessor status = ''\n\n @property() accessor txHash = ''\n\n @property() accessor tx = ''\n\n @property({ type: Object }) accessor parsed: ParsedTransactionInfo | null =\n null\n\n @property() accessor createdAt: string | null = null\n\n @property() accessor signedAt: string | null = null\n\n @property() accessor origin: string | null = null\n\n @property() accessor backHref = ''\n\n @property({ type: Boolean }) accessor isApproving = false\n\n @property({ type: Boolean }) accessor isDeleting = false\n\n @property({ type: Boolean }) accessor isSigning = false\n\n @property({ type: Boolean }) accessor submitFailed = false\n\n // Disables action buttons regardless of status\n @property({ type: Boolean }) accessor disabled = false\n\n @state() private accessor decodedExpanded = false\n\n static styles = [\n BaseElement.styles,\n css`\n :host {\n display: block;\n max-width: 900px;\n margin: 0 auto;\n }\n\n .page-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--wg-space-3);\n margin-bottom: var(--wg-space-4);\n }\n\n .page-title {\n color: var(--wg-text);\n }\n\n .detail-grid {\n display: flex;\n flex-direction: column;\n gap: var(--wg-space-4);\n }\n\n .field {\n display: flex;\n flex-direction: column;\n gap: var(--wg-space-1);\n min-width: 0;\n }\n\n .field--stacked {\n gap: var(--wg-space-2);\n }\n\n .field-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--wg-space-3);\n min-width: 0;\n }\n\n .detail-row {\n display: grid;\n grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr);\n align-items: center;\n gap: var(--wg-space-3);\n min-width: 0;\n }\n\n .label {\n margin: 0;\n color: var(--wg-text-secondary);\n font-size: var(--wg-font-size-xs);\n font-weight: var(--wg-font-weight-semibold);\n line-height: 1.4;\n }\n\n .value {\n margin: 0;\n color: var(--wg-text);\n font-size: var(--wg-font-size-sm);\n line-height: 1.5;\n min-width: 0;\n word-break: break-word;\n text-align: right;\n }\n\n .detail-value {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: var(--wg-space-2);\n min-width: 0;\n }\n\n .copyable-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--wg-space-2);\n min-width: 0;\n }\n\n .detail-value .value,\n .copyable-row wg-copy-button,\n .field-header wg-copy-button {\n flex: 0 0 auto;\n }\n\n .detail-value .value,\n .copyable-row .value {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n word-break: normal;\n }\n\n .field--stacked .value,\n .decoded-box {\n text-align: left;\n }\n\n .signatory-list {\n list-style: none;\n padding: 0;\n margin: 0;\n display: flex;\n flex-direction: column;\n gap: var(--wg-space-2);\n min-width: 0;\n }\n\n .detail-row--top {\n align-items: start;\n }\n\n .detail-row--top > .label {\n padding-top: 0.45rem;\n }\n\n .detail-value--stacked {\n flex-direction: column;\n align-items: stretch;\n justify-content: flex-start;\n }\n\n .detail-value--stacked .copyable-row {\n width: 100%;\n }\n\n .toggle-btn {\n flex: 1;\n min-width: 0;\n padding: 0;\n border: none;\n background: transparent;\n color: inherit;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--wg-space-3);\n cursor: pointer;\n text-align: left;\n }\n\n .toggle-icon {\n display: inline-flex;\n align-items: center;\n color: var(--wg-text);\n transition: transform 0.2s ease;\n }\n\n .toggle-icon.open {\n transform: rotate(180deg);\n }\n\n .decoded-box {\n margin-top: var(--wg-space-2);\n margin-bottom: 0;\n padding: var(--wg-space-4);\n border: 1px solid var(--wg-border);\n border-radius: var(--wg-radius-lg);\n background: var(--wg-input-bg);\n color: var(--wg-text);\n font-family: var(--bs-font-monospace);\n white-space: pre-wrap;\n word-break: break-word;\n max-height: 20rem;\n overflow: auto;\n }\n\n .actions {\n margin-top: var(--wg-space-6);\n display: flex;\n gap: var(--wg-space-3);\n justify-content: flex-start;\n flex-wrap: nowrap;\n }\n\n .actions .btn {\n flex: 1 1 0;\n min-width: 0;\n white-space: nowrap;\n }\n\n .actions .btn:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n `,\n ]\n\n private get isApproveDisabled() {\n return (\n this.disabled ||\n this.isApproving ||\n this.isDeleting ||\n this.isSigning\n )\n }\n\n private get isDeleteDisabled() {\n return this.disabled || this.isApproving || this.isDeleting\n }\n\n private toggleDecoded() {\n this.decodedExpanded = !this.decodedExpanded\n }\n\n private renderInlineField(label: string, value: unknown) {\n return html`\n <section class=\"field\">\n <div class=\"detail-row\">\n <h2\n class=\"label small fw-semibold text-body-secondary mb-0\"\n >\n ${label}\n </h2>\n <div class=\"detail-value\">\n <p class=\"value mb-0 text-body\">${value}</p>\n </div>\n </div>\n </section>\n `\n }\n\n private renderSignatories() {\n const signatories = this.parsed?.signatories || []\n\n return html`\n <section class=\"field\">\n <div class=\"detail-row detail-row--top\">\n <h2\n class=\"label small fw-semibold text-body-secondary mb-0\"\n >\n Signatories\n </h2>\n <div class=\"detail-value detail-value--stacked\">\n ${\n signatories.length\n ? html`\n <ul class=\"signatory-list\">\n ${signatories.map(\n (signatory) => html`\n <li class=\"copyable-row\">\n <p\n class=\"value mb-0 text-body\"\n >\n ${signatory}\n </p>\n <wg-copy-button\n .value=${signatory}\n label=\"Copy signatory\"\n ></wg-copy-button>\n </li>\n `\n )}\n </ul>\n `\n : html`<p class=\"value mb-0 text-body\">N/A</p>`\n }\n </div>\n </div>\n </section>\n `\n }\n\n private renderDecodedBox(decoded: string) {\n return html`<pre class=\"decoded-box small mb-0\">${decoded}</pre>`\n }\n\n protected render() {\n const activityType = getActivityType(this.parsed)\n const decoded = this.parsed?.jsonString || 'N/A'\n\n return html`\n <div class=\"page-header\">\n <h1 class=\"page-title h4 fw-semibold mb-0\">Activity Details</h1>\n ${\n this.backHref\n ? html`<wg-back-link\n href=${this.backHref}\n ></wg-back-link>`\n : nothing\n }\n </div>\n\n <div class=\"detail-grid\">\n ${this.renderInlineField(\n 'Status',\n html`<span\n class=\"badge rounded-pill small ${getActivityStatusBadgeClass(\n this.status\n )}\"\n >\n ${getActivityStatusLabel(this.status)}\n </span>`\n )}\n ${this.renderInlineField('Action type', activityType)}\n ${renderCopyableValue(\n 'Created at',\n this.createdAt,\n 'Copy created at timestamp',\n {\n display: formatDateTime(this.createdAt),\n title: formatUtcDateTime(this.createdAt),\n }\n )}\n ${this.renderSignatories()}\n ${renderCopyableValue(\n 'Template',\n this.parsed?.templateId || null,\n 'Copy template'\n )}\n ${renderCopyableValue(\n 'Command ID',\n this.commandId,\n 'Copy command ID'\n )}\n ${\n this.externalTxId\n ? renderCopyableValue(\n 'External transaction ID',\n this.externalTxId,\n 'Copy external transaction ID'\n )\n : nothing\n }\n ${renderCopyableValue(\n 'Transaction hash',\n this.txHash,\n 'Copy transaction hash'\n )}\n\n <section class=\"field field--stacked\">\n <div class=\"field-header\">\n <button\n type=\"button\"\n class=\"toggle-btn\"\n @click=${this.toggleDecoded}\n aria-expanded=${this.decodedExpanded}\n >\n <h2\n class=\"label small fw-semibold text-body-secondary mb-0\"\n >\n Transaction JSON Object\n </h2>\n <span\n class=\"toggle-icon ${\n this.decodedExpanded ? 'open' : ''\n }\"\n >\n ${chevronDownIcon}\n </span>\n </button>\n ${\n this.parsed?.jsonString\n ? html`\n <wg-copy-button\n .value=${this.parsed.jsonString}\n label=\"Copy transaction json object\"\n ></wg-copy-button>\n `\n : nothing\n }\n </div>\n ${\n this.decodedExpanded\n ? this.renderDecodedBox(decoded)\n : nothing\n }\n </section>\n </div>\n\n ${this.renderActionButtons()}\n `\n }\n\n private renderActionButtons() {\n if (this.status !== 'pending' && this.status !== 'signed') {\n return nothing\n }\n\n return html`\n <div class=\"actions\">\n ${\n this.status === 'pending'\n ? html`\n <button\n class=\"btn btn-outline-danger rounded-pill d-inline-flex align-items-center justify-content-center gap-2\"\n ?disabled=${this.isDeleteDisabled}\n @click=${() =>\n this.dispatchEvent(\n new TransactionDeleteEvent(\n this.commandId\n )\n )}\n >\n ${\n this.isDeleting\n ? html`<div\n class=\"spinner-border spinner-border-sm\"\n ></div>`\n : nothing\n }\n Reject\n </button>\n `\n : nothing\n }\n\n <button\n class=\"btn btn-primary rounded-pill d-inline-flex align-items-center justify-content-center gap-2\"\n ?disabled=${this.isApproveDisabled}\n @click=${() =>\n this.dispatchEvent(\n new TransactionApproveEvent(this.commandId)\n )}\n >\n ${\n this.isApproving || this.isSigning\n ? html`<div\n class=\"spinner-border spinner-border-sm\"\n ></div>`\n : nothing\n }\n ${\n this.status === 'signed' && this.submitFailed\n ? 'Retry submit'\n : 'Approve'\n }\n </button>\n </div>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, css, nothing } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport './back-link.js'\nimport './copy-button.js'\nimport { BaseElement } from '../internal/base-element.js'\nimport {\n getActivityStatusBadgeClass,\n getActivityStatusLabel,\n} from '../internal/activity-utils.js'\nimport { renderCopyableValue } from '../internal/activity-render.js'\n\n/** Emitted when the user clicks the \"Approve\" button */\nexport class MessageApproveEvent extends Event {\n constructor(public messageId: string) {\n super('message-approve', { bubbles: true, composed: true })\n }\n}\n\n/** Emitted when the user clicks the \"Reject\" button */\nexport class MessageDeleteEvent extends Event {\n constructor(public messageId: string) {\n super('message-delete', { bubbles: true, composed: true })\n }\n}\n\nexport\n@customElement('wg-message-detail')\nclass WgMessageDetail extends BaseElement {\n @property() accessor messageId = ''\n\n @property() accessor message = ''\n\n @property() accessor status = ''\n\n @property() accessor externalTxId: string | null = null\n\n @property() accessor origin: string | null = null\n\n @property() accessor backHref = ''\n\n @property({ type: Boolean }) accessor isApproving = false\n\n @property({ type: Boolean }) accessor isDeleting = false\n\n @property({ type: Boolean }) accessor isSigning = false\n\n // Disables action buttons regardless of status\n @property({ type: Boolean }) accessor disabled = false\n\n static styles = [\n BaseElement.styles,\n css`\n :host {\n display: block;\n max-width: 900px;\n margin: 0 auto;\n }\n\n .page-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--wg-space-3);\n margin-bottom: var(--wg-space-4);\n }\n\n .page-title {\n color: var(--wg-text);\n }\n\n .detail-grid {\n display: flex;\n flex-direction: column;\n gap: var(--wg-space-4);\n }\n\n .field {\n display: flex;\n flex-direction: column;\n gap: var(--wg-space-1);\n min-width: 0;\n }\n\n .field--stacked {\n gap: var(--wg-space-2);\n }\n\n .detail-row {\n display: grid;\n grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr);\n align-items: center;\n gap: var(--wg-space-3);\n min-width: 0;\n }\n\n .label {\n margin: 0;\n color: var(--wg-text-secondary);\n font-size: var(--wg-font-size-xs);\n font-weight: var(--wg-font-weight-semibold);\n line-height: 1.4;\n }\n\n .value {\n margin: 0;\n color: var(--wg-text);\n font-size: var(--wg-font-size-sm);\n line-height: 1.5;\n min-width: 0;\n word-break: break-word;\n text-align: right;\n }\n\n .detail-value {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: var(--wg-space-2);\n min-width: 0;\n }\n\n .detail-value .value,\n .detail-value wg-copy-button {\n flex: 0 0 auto;\n }\n\n .detail-value .value {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n word-break: normal;\n }\n\n .message-box {\n margin: 0;\n padding: var(--wg-space-4);\n border: 1px solid var(--wg-border);\n border-radius: var(--wg-radius-lg);\n background: var(--wg-input-bg);\n color: var(--wg-text);\n font-family: var(--bs-font-monospace);\n white-space: pre-wrap;\n word-break: break-word;\n max-height: 20rem;\n overflow: auto;\n text-align: left;\n }\n\n .actions {\n margin-top: var(--wg-space-6);\n display: flex;\n gap: var(--wg-space-3);\n justify-content: flex-start;\n flex-wrap: nowrap;\n }\n\n .actions .btn {\n flex: 1 1 0;\n min-width: 0;\n white-space: nowrap;\n }\n\n .actions .btn:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n `,\n ]\n\n private get isApproveDisabled() {\n return (\n this.disabled ||\n this.isApproving ||\n this.isDeleting ||\n this.isSigning\n )\n }\n\n private get isDeleteDisabled() {\n return this.disabled || this.isApproving || this.isDeleting\n }\n\n private renderInlineField(label: string, value: unknown) {\n return html`\n <section class=\"field\">\n <div class=\"detail-row\">\n <h2\n class=\"label small fw-semibold text-body-secondary mb-0\"\n >\n ${label}\n </h2>\n <div class=\"detail-value\">\n <p class=\"value mb-0 text-body\">${value}</p>\n </div>\n </div>\n </section>\n `\n }\n\n protected render() {\n return html`\n <div class=\"page-header\">\n <h1 class=\"page-title h4 fw-semibold mb-0\">Message Details</h1>\n ${\n this.backHref\n ? html`<wg-back-link\n href=${this.backHref}\n ></wg-back-link>`\n : nothing\n }\n </div>\n\n <div class=\"detail-grid\">\n ${this.renderInlineField(\n 'Status',\n html`<span\n class=\"badge rounded-pill small ${getActivityStatusBadgeClass(\n this.status\n )}\"\n >\n ${getActivityStatusLabel(this.status)}\n </span>`\n )}\n ${\n this.origin\n ? this.renderInlineField('Requested by', this.origin)\n : nothing\n }\n ${\n this.externalTxId\n ? renderCopyableValue(\n 'External transaction ID',\n this.externalTxId,\n 'Copy external transaction ID'\n )\n : nothing\n }\n\n <section class=\"field field--stacked\">\n <h2\n class=\"label small fw-semibold text-body-secondary mb-0\"\n >\n Message\n </h2>\n <pre class=\"message-box small\">${this.message}</pre>\n </section>\n </div>\n\n ${this.renderActionButtons()}\n `\n }\n\n private renderActionButtons() {\n if (this.status !== 'pending') {\n return nothing\n }\n\n return html`\n <div class=\"actions\">\n <button\n class=\"btn btn-outline-danger rounded-pill d-inline-flex align-items-center justify-content-center gap-2\"\n ?disabled=${this.isDeleteDisabled}\n @click=${() =>\n this.dispatchEvent(\n new MessageDeleteEvent(this.messageId)\n )}\n >\n ${\n this.isDeleting\n ? html`<div\n class=\"spinner-border spinner-border-sm\"\n ></div>`\n : nothing\n }\n Reject\n </button>\n\n <button\n class=\"btn btn-primary rounded-pill d-inline-flex align-items-center justify-content-center gap-2\"\n ?disabled=${this.isApproveDisabled}\n @click=${() =>\n this.dispatchEvent(\n new MessageApproveEvent(this.messageId)\n )}\n >\n ${\n this.isApproving || this.isSigning\n ? html`<div\n class=\"spinner-border spinner-border-sm\"\n ></div>`\n : nothing\n }\n Approve\n </button>\n </div>\n `\n }\n}\n","// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { errorCodes, JsonRpcError } from '@canton-network/core-rpc-errors'\n\nconst ERROR_TITLES: Partial<Record<number, string>> = {\n [errorCodes.provider.userRejectedRequest]: 'User Rejected Request',\n [errorCodes.provider.unauthorized]: 'Unauthorized',\n [errorCodes.provider.unsupportedMethod]: 'Unsupported Method',\n [errorCodes.provider.disconnected]: 'Disconnected',\n [errorCodes.provider.chainDisconnected]: 'Chain Disconnected',\n [errorCodes.rpc.parse]: 'Parse Error',\n [errorCodes.rpc.invalidRequest]: 'Invalid Request',\n [errorCodes.rpc.methodNotFound]: 'Method Not Found',\n [errorCodes.rpc.invalidParams]: 'Invalid Parameters',\n [errorCodes.rpc.internal]: 'Internal Error',\n [errorCodes.rpc.invalidInput]: 'Invalid Input',\n [errorCodes.rpc.resourceNotFound]: 'Resource Not Found',\n [errorCodes.rpc.resourceUnavailable]: 'Resource Unavailable',\n [errorCodes.rpc.transactionRejected]: 'Transaction Rejected',\n [errorCodes.rpc.methodNotSupported]: 'Method Not Supported',\n [errorCodes.rpc.limitExceeded]: 'Limit Exceeded',\n}\n\nexport type ErrorToastFallback = {\n message?: string\n buttonText?: string\n title?: string\n}\n\n/** Turns any thrown value into the text shown by an error toast */\nexport function getErrorToastContent(\n e: unknown,\n fallback?: ErrorToastFallback\n): { title: string; message: string; buttonText: string } {\n const message = e instanceof Error ? e.message : ''\n const title = e instanceof JsonRpcError ? ERROR_TITLES[e.code] : undefined\n\n return {\n title: title || fallback?.title || 'Unexpected Error',\n message:\n message ||\n fallback?.message ||\n 'Something went wrong. Please try again.',\n buttonText: fallback?.buttonText || 'Dismiss',\n }\n}\n"],"ignoreList":[0,21,22,23,24,25,26,27,28,29,30,31,32,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,67,68,69,70],"mappings":";;;;;;;;;;;;;;A,wgsOEcAmnD,IAAe,CAAC,AANHC,CAAG;;;;CAMI,GCCPC,IAAb,cAAiCC,EAAW;CACxC,OAAO,SAAS,CACZtnD,GACA,CAAG;cACGunD,EAAUtnD,EAAa,WAAW,UAAU,aAAa,CAAC,EAAE;cAC5DsnD,EAAUrnD,CAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAyDlC;AACJ,GCxEasnD,IAAa,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCDvBC,KAAO,MAAkB,OAAOC,CAAK,CAAC,CAAC,SAAS,GAAG,GAAG;AAQ5D,SAAgBC,EACZ,GACA,EAAE,aAAU,OAAiC,CAAC,GACxC;CACN,IAAID,KAAU,QAA+BA,MAAU,IACnD,OAAO;CAGX,IAAME,IAAO,IAAI,KAAKF,CAAK;CAK3B,OAJI,OAAO,MAAME,EAAK,QAAQ,CAAC,IACpB,OAAOF,CAAK,IAGhB,IAAI,KAAK,eAAe,KAAA,GAAW;EACtC,MAAM;EACN,OAAO;EACP,KAAK;EACL,MAAM;EACN,QAAQ;EACR,GAAIG,KAAW,EAAE,QAAQ,UAAU;EACnC,cAAc;CAClB,CAAC,CAAC,CAAC,OAAOD,CAAI;AAClB;AAGA,SAAg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