@stakekit/widget 0.0.290 → 0.0.291
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/{assets-DvEv_w-P.js → assets-H3qs-BfM.js} +1 -1
- package/dist/bundle/{cardano-connector-Cqj1z0wD.js → cardano-connector-C1YrKgp8.js} +2 -2
- package/dist/bundle/{configured-chains-Nn1qeOjm.js → configured-chains-CljV1eCV.js} +1 -1
- package/dist/bundle/{cosmos-connector-meta-BMa49Bqn.js → cosmos-connector-meta-CogU-5R3.js} +1 -1
- package/dist/bundle/index.bundle.js +17718 -17703
- package/dist/bundle/{ledger-connector-cdqjHR7O.js → ledger-connector-PwjsEMH_.js} +16 -16
- package/dist/bundle/{network-BvWfFLMi.js → network-rRxrzik9.js} +1 -1
- package/dist/bundle/{solana-connector-t7ro7CGZ.js → solana-connector-mwCnoTC6.js} +3 -3
- package/dist/bundle/{stellar-connector-CGTk18nF.js → stellar-connector-CIkU0qDy.js} +2 -2
- package/dist/bundle/{substrate-connector-Blu0Fmlx.js → substrate-connector-BtpGbum5.js} +1 -1
- package/dist/bundle/{ton-connector-D_6F9QzE.js → ton-connector-B9Rb8DpG.js} +3 -3
- package/dist/bundle/{transaction-nCW9pp-W.js → transaction-BU8gNx_-.js} +3 -3
- package/dist/bundle/{transaction-DFK_HUua.js → transaction-C5Rdik4M.js} +22 -22
- package/dist/bundle/transaction-C6SgGYH0.js +23 -0
- package/dist/bundle/{transaction-Dd1bxz-u.js → transaction-D8vYa3xG.js} +9 -9
- package/dist/bundle/{tron-connector-CNS7QrN7.js → tron-connector-feSoCE1Z.js} +13 -13
- package/dist/bundle/{utils-B2hhTK5t.js → utils-B5UkNjd3.js} +1 -1
- package/dist/bundle/{wallet-manager-xXCqWo2v.js → wallet-manager-iwdzlSwY.js} +34 -34
- package/dist/package/{assets-CCANldg9.js → assets-DLmJ26y-.js} +1 -1
- package/dist/package/{cardano-connector-DiiSoILv.js → cardano-connector-CIrXiVTi.js} +2 -2
- package/dist/package/{configured-chains-CqS9GQgO.js → configured-chains-Ddwhz0AO.js} +1 -1
- package/dist/package/{cosmos-connector-meta-D2OXd_8A.js → cosmos-connector-meta-gXG2LZJw.js} +1 -1
- package/dist/package/index.package.js +69 -34
- package/dist/package/{ledger-connector-CoflrvIY.js → ledger-connector-DA2MGFO1.js} +5 -5
- package/dist/package/{network-DzIq3Eb-.js → network-DRWqFyX1.js} +1 -1
- package/dist/package/{solana-connector-BGL_7RtS.js → solana-connector-zdXBpO69.js} +3 -3
- package/dist/package/{stellar-connector-KA4sbBsT.js → stellar-connector-Bwd8_6fg.js} +2 -2
- package/dist/package/{substrate-connector-C47hmu7O.js → substrate-connector-DWxNzj24.js} +1 -1
- package/dist/package/{ton-connector-Os8-LilP.js → ton-connector-Bwc9mQfl.js} +3 -3
- package/dist/package/{transaction-BUvzBUD1.js → transaction-C10sHjOp.js} +1 -1
- package/dist/package/{transaction-BhlMhMmN.js → transaction-CRtu-oMo.js} +1 -1
- package/dist/package/{transaction-GC-w6eas.js → transaction-CYsojERR.js} +1 -1
- package/dist/package/{transaction-9ZjMuyda.js → transaction-cowIxlQK.js} +1 -1
- package/dist/package/{tron-connector-73EkJLaC.js → tron-connector-DQ9QzTbX.js} +3 -3
- package/dist/package/{wallet-manager-fjTGOCl1.js → wallet-manager-CV7OgeRF.js} +2 -2
- package/dist/types/domain/network/contract.d.ts +1 -1
- package/dist/types/domain/network/network-name.d.ts +7 -0
- package/dist/types/domain/wallet/contract.d.ts +0 -1
- package/dist/types/domain/wallet/wallet-policy.d.ts +9 -0
- package/dist/types/generated/api/legacy-networks.d.ts +1 -0
- package/dist/types/generated/api/yield-networks.d.ts +1 -0
- package/dist/types/index.bundle.d.ts +1 -1
- package/dist/types/index.package.d.ts +1 -1
- package/dist/types/public-api/react-types.d.ts +8 -0
- package/dist/types/public-api/types.d.ts +73 -23
- package/dist/website/assets/{assets-Cv_Ib61e.js → assets-h8USQKgq.js} +1 -1
- package/dist/website/assets/{cardano-connector-BQ5eYUAn.js → cardano-connector-C0Sq11R4.js} +1 -1
- package/dist/website/assets/{configured-chains-BHW1HK8Y.js → configured-chains-CIWlanAA.js} +1 -1
- package/dist/website/assets/{cosmos-connector-meta-PXOxxoiN.js → cosmos-connector-meta-rno_UNzC.js} +1 -1
- package/dist/website/assets/index-5Aa-rcFh.js +540 -0
- package/dist/website/assets/{ledger-connector-CfdYVk_B.js → ledger-connector-Dd5qrF8_.js} +2 -2
- package/dist/website/assets/{network-CpiZy7GL.js → network-BGx8nCzY.js} +1 -1
- package/dist/website/assets/{solana-connector-Dko0nLRl.js → solana-connector-B7Md4VDG.js} +1 -1
- package/dist/website/assets/{stellar-connector-CzEQ-GiL.js → stellar-connector-BwE5re5j.js} +1 -1
- package/dist/website/assets/{substrate-connector-BySKIZSU.js → substrate-connector-Bc3A8Ngf.js} +1 -1
- package/dist/website/assets/{ton-connector-DfHih6IL.js → ton-connector-1XbtGnNe.js} +1 -1
- package/dist/website/assets/{transaction-BgxiRDr6.js → transaction-BN_PDuuD.js} +1 -1
- package/dist/website/assets/{transaction-Z0G1srG_.js → transaction-BTjp5Yv_.js} +2 -2
- package/dist/website/assets/{transaction-qQ73FnRV.js → transaction-CRGTe3Dx.js} +2 -2
- package/dist/website/assets/transaction-DhoVCNGK.js +1 -0
- package/dist/website/assets/{tron-connector-BkQWCtpI.js → tron-connector-BPQRviGm.js} +2 -2
- package/dist/website/assets/{utils-BnE0E9wY.js → utils-Bi0bPCX2.js} +1 -1
- package/dist/website/assets/{wallet-manager-Bnoaodi-.js → wallet-manager-Dysx00HR.js} +3 -3
- package/dist/website/index.html +9 -9
- package/package.json +2 -2
- package/dist/bundle/transaction-B_6wJk3a.js +0 -23
- package/dist/types/domain/network/intersection.d.ts +0 -2
- package/dist/types/domain/network/network.d.ts +0 -3
- package/dist/types/domain/wallet/network.d.ts +0 -575
- package/dist/types/generated/api/legacy-schema.d.ts +0 -1017
- package/dist/types/generated/api/yield-schema.d.ts +0 -4328
- package/dist/website/assets/index-DPaiXt13.js +0 -540
- package/dist/website/assets/transaction-XbbbllS0.js +0 -1
|
@@ -225,13 +225,22 @@ export type SKSignMessageResult = string | {
|
|
|
225
225
|
type: "error";
|
|
226
226
|
error: string;
|
|
227
227
|
};
|
|
228
|
+
/** Host wallet adapter the widget calls for signatures, chain switches and transactions. */
|
|
228
229
|
export type SKWallet = {
|
|
230
|
+
/** Signs a message payload from an action step that is a message, not a transaction. */
|
|
229
231
|
signMessage: (message: string) => Promise<SKSignMessageResult>;
|
|
232
|
+
/**
|
|
233
|
+
* Switches the host wallet to `chainId`. Resolve once the switch succeeded;
|
|
234
|
+
* the widget then uses that chain. Keep `currentChain` in sync afterwards.
|
|
235
|
+
*/
|
|
230
236
|
switchChain: (chainId: number) => Promise<void>;
|
|
231
|
-
|
|
232
|
-
transactionHash?: string;
|
|
233
|
-
}>;
|
|
237
|
+
/** Signs and broadcasts a staking transaction. Resolve once it is broadcast. */
|
|
234
238
|
sendTransaction(tx: SKTx, txMeta: SKTxMeta): Promise<SKTransactionResult>;
|
|
239
|
+
/**
|
|
240
|
+
* Signs the EIP-712 permit that reveals Zama confidential balances. Without
|
|
241
|
+
* it, Zama deposits are blocked: balances could not be revealed to withdraw.
|
|
242
|
+
*/
|
|
243
|
+
readonly signZamaPermit?: (typedData: SKEip712TypedData, meta: SKZamaPermitMeta) => Promise<SKZamaPermitResult>;
|
|
235
244
|
};
|
|
236
245
|
export type SKBorrowTxMeta = {
|
|
237
246
|
readonly actionId: string;
|
|
@@ -301,7 +310,7 @@ export type SKZamaPermitMeta = {
|
|
|
301
310
|
readonly chainId: number;
|
|
302
311
|
readonly contracts: ReadonlyArray<string>;
|
|
303
312
|
};
|
|
304
|
-
/** Outcome of `
|
|
313
|
+
/** Outcome of `SKWallet.signZamaPermit`. */
|
|
305
314
|
export type SKZamaPermitResult = {
|
|
306
315
|
readonly type: "success";
|
|
307
316
|
readonly signature: string;
|
|
@@ -311,30 +320,32 @@ export type SKZamaPermitResult = {
|
|
|
311
320
|
readonly type: "error";
|
|
312
321
|
readonly error: string;
|
|
313
322
|
};
|
|
314
|
-
/**
|
|
315
|
-
export type SKZamaWallet = SKWallet & {
|
|
316
|
-
/** Signs the EIP-712 permit that reveals Zama confidential balances. */
|
|
317
|
-
readonly signZamaPermit: (typedData: SKEip712TypedData, meta: SKZamaPermitMeta) => Promise<SKZamaPermitResult>;
|
|
318
|
-
};
|
|
323
|
+
/** Connects the widget to a host-owned wallet instead of its own wallet list. */
|
|
319
324
|
export type SKExternalProviders = {
|
|
325
|
+
/** Chain the host wallet is on. Defaults to the first supported chain. */
|
|
320
326
|
currentChain?: SupportedSKChainIds;
|
|
327
|
+
/** Connected account address. Pass `""` while disconnected; do not remove the provider. */
|
|
321
328
|
currentAddress: string;
|
|
329
|
+
/**
|
|
330
|
+
* Token to preselect when the page URL has no `token` parameter, as
|
|
331
|
+
* `${network}-${address}` (`${network}-` for a native token). Read at mount.
|
|
332
|
+
*/
|
|
322
333
|
initToken?: `${string}-${string}`;
|
|
323
|
-
/**
|
|
324
|
-
readonly supportsBorrow?: false;
|
|
334
|
+
/** Chains the host wallet supports. Omit to allow every configured chain; `[]` is invalid. */
|
|
325
335
|
supportedChainIds?: SupportedSKChainIds[];
|
|
336
|
+
/** Provider kind. Only `"generic"` is supported. */
|
|
326
337
|
type: "generic";
|
|
338
|
+
/** Wallet adapter the widget calls. Its presence is fixed at mount; its callbacks may change. */
|
|
327
339
|
provider: SKWallet;
|
|
328
340
|
};
|
|
329
|
-
/** External provider for hosts that set `borrowEnabled
|
|
330
|
-
export type SKBorrowExternalProviders = {
|
|
331
|
-
|
|
332
|
-
readonly currentAddress: string;
|
|
333
|
-
readonly initToken?: `${string}-${string}`;
|
|
341
|
+
/** External provider for hosts that set `borrowEnabled`; the wallet must support Borrow. */
|
|
342
|
+
export type SKBorrowExternalProviders = Readonly<Omit<SKExternalProviders, "provider" | "supportedChainIds">> & {
|
|
343
|
+
/** Chains the host wallet supports. Omit to allow every configured chain; `[]` is invalid. */
|
|
334
344
|
readonly supportedChainIds?: ReadonlyArray<SupportedSKChainIds>;
|
|
335
|
-
|
|
345
|
+
/** Wallet adapter the widget calls, including the Borrow callbacks. */
|
|
336
346
|
readonly provider: SKBorrowWallet;
|
|
337
347
|
};
|
|
348
|
+
/** Host integration preset: presentation, theme, wallet catalogue and tracking. */
|
|
338
349
|
export type SKHostVariant = "zerion" | "utila" | "default" | "finery" | "porto";
|
|
339
350
|
export type SKTranslationTree = Readonly<{
|
|
340
351
|
[key: string]: string | SKTranslationTree;
|
|
@@ -345,15 +356,24 @@ export type SKLanguage = "en" | "fr";
|
|
|
345
356
|
* enabled for the API key's project; `"all"` lists every supported market.
|
|
346
357
|
*/
|
|
347
358
|
export type SKBorrowMarketsScope = "all" | "enabled";
|
|
359
|
+
/** Per-language translation overrides, deep-merged over the widget's own strings. */
|
|
348
360
|
export type SKCustomTranslations = Partial<Record<SKLanguage, {
|
|
349
361
|
translation: SKTranslationTree;
|
|
350
362
|
}>>;
|
|
351
363
|
export type SKTrackPage = "Earn" | "Borrow" | "Borrow review" | "Borrow steps" | "Borrow complete" | "Positions" | "Activity" | "Position details" | "Stake review" | "Unstake review" | "Pending action review" | "Staking steps" | "Unstake steps" | "Activity steps" | "Pending action steps" | "Stake complete" | "Activity complete" | "Unstake complete" | "Pending action complete";
|
|
352
364
|
export type SKTrackEvent = "Tab clicked" | "Connect wallet clicked" | "Add ledger account clicked" | "Select token modal opened" | "Exit receive token modal opened" | "Token selected" | "Select yield modal opened" | "Yield selected" | "Select validator modal opened" | "Select validator modal closed" | "Select validator view more clicked" | "Validator selected" | "Validator removed" | "Widget disconnect clicked" | "Back clicked" | "Help modal opened" | "Terms modal opened" | "Terms modal accepted" | "Terms modal declined" | "Earn page max clicked" | "Borrow page max clicked" | "Borrow market selected" | "Borrow collateral selected" | "Borrow review clicked" | "Connected wallet" | "Import validator modal opened" | "Chain modal opened" | "Account modal opened" | "Terms clicked" | "Transaction signed" | "Transaction submitted" | "Transaction not confirmed" | "Position details page max clicked" | "Unstake clicked" | "Pending action clicked" | "Validators submitted" | "Validator imported" | "View transaction clicked" | "Action steps cancelled" | "system/initYield" | "system/initToken";
|
|
365
|
+
/** Host analytics callbacks. */
|
|
353
366
|
export type SKTrackingConfig = {
|
|
367
|
+
/** Called when a tracked widget event occurs. */
|
|
354
368
|
trackEvent?: (event: SKTrackEvent, properties?: Record<string, unknown>) => void;
|
|
369
|
+
/** Called when a tracked widget page is shown. */
|
|
355
370
|
trackPageView?: (page: SKTrackPage, properties?: Record<string, unknown>) => void;
|
|
356
371
|
};
|
|
372
|
+
/**
|
|
373
|
+
* Preferred yield per token, keyed by network and then by
|
|
374
|
+
* `${network}-${address}` (`${network}-` for a native token; case-insensitive).
|
|
375
|
+
* The value is a yield ID, or `"*"` for the widget's default choice.
|
|
376
|
+
*/
|
|
357
377
|
export type SKPreferredTokenYieldsPerNetwork = Readonly<Record<string, Readonly<Record<`${string}-${string}`, string>>>>;
|
|
358
378
|
type SettingsPropsBase = {
|
|
359
379
|
/** StakeKit API key. Read at mount; remount the widget to change it. */
|
|
@@ -366,17 +386,29 @@ type SettingsPropsBase = {
|
|
|
366
386
|
borrowMarketsScope?: SKBorrowMarketsScope;
|
|
367
387
|
/** Yields API URL. Read at mount; remount the widget to change it. */
|
|
368
388
|
yieldsApiUrl?: string;
|
|
389
|
+
/** Theme tokens, deep-merged over the light theme. */
|
|
369
390
|
theme?: SKTheme;
|
|
391
|
+
/** Analytics callbacks. */
|
|
370
392
|
tracking?: SKTrackingConfig;
|
|
393
|
+
/** Called once the initial mount animation finishes. */
|
|
371
394
|
onMountAnimationComplete?: () => void;
|
|
395
|
+
/** Hides the network badge on token icons. */
|
|
372
396
|
hideNetworkLogo?: boolean;
|
|
397
|
+
/** Skips the initial layout and reveal animation. */
|
|
373
398
|
disableInitLayoutAnimation?: boolean;
|
|
399
|
+
/** Keeps the amount input font size fixed instead of shrinking it for long values. */
|
|
374
400
|
disableResizingInputFontSize?: boolean;
|
|
401
|
+
/** Stops the widget scrolling the window to the top on navigation. */
|
|
375
402
|
disableAutoScrollToTop?: boolean;
|
|
403
|
+
/** UI language. Defaults to the browser language, falling back to English. */
|
|
376
404
|
language?: SKLanguage;
|
|
405
|
+
/** Runs inside a Safe app and connects through the Safe wallet. Read at mount. */
|
|
377
406
|
isSafe?: boolean;
|
|
407
|
+
/** Ignores injected EVM wallets announced through EIP-6963. Read at mount. */
|
|
378
408
|
disableInjectedProviderDiscovery?: boolean;
|
|
409
|
+
/** Changes how a wallet is shown in the wallet list. Read at mount. */
|
|
379
410
|
mapWalletFn?: (props: {
|
|
411
|
+
/** Wallet ID, as used by `walletPolicy`. */
|
|
380
412
|
id: string;
|
|
381
413
|
iconUrl: string | (() => Promise<string>);
|
|
382
414
|
name: string;
|
|
@@ -386,32 +418,46 @@ type SettingsPropsBase = {
|
|
|
386
418
|
name: string;
|
|
387
419
|
iconBackground: string;
|
|
388
420
|
};
|
|
421
|
+
/** Filters, orders and groups the wallet list by wallet ID. Read at mount. */
|
|
389
422
|
walletPolicy?: SKWalletPolicy;
|
|
423
|
+
/** Translation overrides per language. */
|
|
390
424
|
customTranslations?: SKCustomTranslations;
|
|
391
|
-
/**
|
|
392
|
-
* @deprecated Earn now always derives project-enabled, enterable options from
|
|
393
|
-
* the canonical Earn Catalog. This setting has no effect.
|
|
394
|
-
*/
|
|
395
|
-
tokensForEnabledYieldsOnly?: boolean;
|
|
425
|
+
/** Validator rules per network ID, or `"*"` for every network without its own entry. */
|
|
396
426
|
validatorsConfig?: Record<string, {
|
|
427
|
+
/** Shows only these validator addresses. */
|
|
397
428
|
allowed?: string[];
|
|
429
|
+
/** Hides these validator addresses, even when allowed. */
|
|
398
430
|
blocked?: string[];
|
|
431
|
+
/** Marks these validator addresses as preferred. */
|
|
399
432
|
preferred?: string[];
|
|
433
|
+
/** Also keeps the API's preferred validators. Defaults to `true`. */
|
|
400
434
|
mergePreferredWithDefault?: boolean;
|
|
435
|
+
/** Shows only preferred validators. Defaults to `false`. */
|
|
401
436
|
preferredOnly?: boolean;
|
|
402
437
|
}>;
|
|
438
|
+
/** Token icon URLs by token symbol, or a function returning the URL for a token. */
|
|
403
439
|
tokenIconMapping?: Record<string, string> | ((token: SKToken) => string);
|
|
440
|
+
/** Network icon URLs by network ID (for example `"ethereum"`), or a function returning one. */
|
|
404
441
|
chainIconMapping?: Record<string, string> | ((chain: string) => string);
|
|
405
442
|
/** Enables the dashboard route tree and category yield grouping by default. */
|
|
406
443
|
dashboardVariant?: boolean;
|
|
444
|
+
/** Order of yield categories. Omitted categories follow in the default order. */
|
|
407
445
|
dashboardYieldCategoryOrder?: DashboardYieldCategory[];
|
|
446
|
+
/** Lists yields flat or grouped by category. Defaults to `"category"` with `dashboardVariant`, else `"flat"`. */
|
|
408
447
|
yieldGrouping?: "flat" | "category";
|
|
448
|
+
/** Offers institutional wallets instead of the regular wallet list. Read at mount. */
|
|
409
449
|
institutionalWallets?: boolean;
|
|
450
|
+
/** Hides the chain selector in the header. */
|
|
410
451
|
hideChainSelector?: boolean;
|
|
452
|
+
/** Hides the account and chain selector in the dashboard header. */
|
|
411
453
|
hideAccountAndChainSelector?: boolean;
|
|
454
|
+
/** Yield to preselect for a token. */
|
|
412
455
|
preferredTokenYieldsPerNetwork?: SKPreferredTokenYieldsPerNetwork;
|
|
456
|
+
/** Element that hosts the widget's dialogs, menus and tooltips. */
|
|
413
457
|
portalContainer?: HTMLElement;
|
|
458
|
+
/** TON Connect manifest URL. Defaults to StakeKit's manifest. Read at mount. */
|
|
414
459
|
tonConnectManifestUrl?: string;
|
|
460
|
+
/** Chain to request when the user connects a wallet. */
|
|
415
461
|
initialChain?: SupportedSKChainIds;
|
|
416
462
|
};
|
|
417
463
|
type BorrowProviderSettings = {
|
|
@@ -419,12 +465,16 @@ type BorrowProviderSettings = {
|
|
|
419
465
|
borrowEnabled?: false;
|
|
420
466
|
externalProviders?: SKExternalProviders | SKBorrowExternalProviders;
|
|
421
467
|
} | {
|
|
422
|
-
/**
|
|
468
|
+
/**
|
|
469
|
+
* Enables Borrow. Read at mount; remount the widget to change it.
|
|
470
|
+
* `boolean`, not `true`: a runtime flag must still type-check.
|
|
471
|
+
*/
|
|
423
472
|
borrowEnabled?: boolean;
|
|
424
473
|
externalProviders?: SKBorrowExternalProviders;
|
|
425
474
|
};
|
|
426
475
|
export type SettingsProps = SettingsPropsBase & BorrowProviderSettings;
|
|
427
476
|
type SKBundleVariantProps = {
|
|
477
|
+
/** Host integration preset. Defaults to `"default"`; `"zerion"` needs the React package. */
|
|
428
478
|
readonly variant: Exclude<SKHostVariant, "zerion">;
|
|
429
479
|
};
|
|
430
480
|
export type BundledSKWidgetProps = SettingsProps & (SKBundleVariantProps | {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{At as e,Bt as t,Ct as n,Dt as r,Et as i,Ht as a,It as o,Kt as s,Mt as c,Nt as l,Pt as u,Rt as d,St as f,T as p,Ut as m,Vt as ee,Wt as te,_t as ne,at as h,b as re,bt as ie,cn as ae,d as oe,en as g,et as _,ft as se,gt as ce,h as le,in as ue,it as de,jt as fe,kt as pe,l as me,mt as he,nn as ge,on as _e,pt as ve,rn as ye,rt as be,sn as xe,st as Se,t as Ce,ut as v,vt as we,wt as Te,xt as Ee,yt as De}from"./Result-Bvvef0v1.js";import{Ai as Oe,Ci as ke,Dr as Ae,Fi as je,Ii as Me,Ir as Ne,Kr as Pe,Li as Fe,Mi as Ie,Ni as Le,Nt as Re,Oi as ze,Pt as Be,Qr as Ve,Si as He,U as y,Ur as Ue,Wr as We,a as Ge,br as Ke,g as qe,ji as Je,jr as Ye,ki as Xe,ni as Ze,on as Qe,qr as $e,ti as et,wi as tt,y as nt,yi as rt}from"./Clock-BENq00-7.js";import{En as it,On as at,Qr as ot,Qt as b,Tn as st,Ut as ct,Vt as lt,Yt as ut,Zn as dt,Zr as ft,Zt as pt,an as x,cn as mt,en as ht,gn as gt,in as S,ir as C,ni as _t,pr as vt,ri as yt,si as bt,sr as xt,ti as w}from"./wagmi-connect-result-B59F3NGW.js";import{c as St,h as Ct,i as wt,o as Tt,r as Et,s as Dt}from"./DateTime-Bd7upxhN.js";var Ot=je,kt=()=>({}),At=e=>Object.keys(e).length===0,jt=g(2,(e,t)=>{let n=[];for(let r of Ft(e))n.push(t(r,e[r]));return n})((e,t)=>[e,t]),Mt=g(2,(e,t)=>Object.hasOwn(e,t)),Nt=g(2,(e,t)=>{let n={...e};for(let r of Ft(e))_(n,r,t(e[r],r));return n}),Pt=g(2,(e,t)=>{let n=kt();for(let r of Ft(e))t(e[r],r)&&_(n,r,e[r]);return n}),Ft=e=>Object.keys(e),It=e=>g(2,(t,n)=>{for(let r of Ft(t))if(!Mt(n,r)||!e(t[r],n[r]))return!1;return!0}),Lt=g(3,(e,t,n)=>{if(At(e))return{...t};if(At(t))return{...e};let r=kt();for(let i of Ft(e))Mt(t,i)?_(r,i,n(e[i],t[i])):_(r,i,e[i]);for(let e of Ft(t))Mt(r,e)||_(r,e,t[e]);return r}),Rt=e=>{let t=It(e);return(e,n)=>t(e,n)&&t(n,e)},zt=`~effect/encoding/EncodingError`,Bt=class extends bt(`EncodingError`){[zt]=zt};globalThis.String;var Vt=e=>e.toUpperCase(),Ht=e=>e.toLowerCase(),Ut=e=>e.length===0?e:Vt(e[0])+e.slice(1),Wt=e=>e.trim(),Gt=(e,t)=>n=>n.startsWith(e,t),Kt=e=>Jt(typeof e==`string`?Yt.encode(e):e),qt=e=>{let t=Xt(e),n=t.length;if(n%4!=0)return Ce(new Bt({kind:`Decode`,module:`Base64`,input:t,message:`Length must be a multiple of 4, but is ${n}`}));let r=t.indexOf(`=`);if(r!==-1&&(r<n-2||r===n-2&&t[n-1]!==`=`))return Ce(new Bt({kind:`Decode`,module:`Base64`,input:t,message:`Found a '=' character, but it is not at the end`}));try{let e=t.endsWith(`==`)?2:+!!t.endsWith(`=`),r=new Uint8Array(n/4*3-e);for(let e=0,i=0;e<n;e+=4,i+=3){let n=Qt(t.charCodeAt(e))<<18|Qt(t.charCodeAt(e+1))<<12|Qt(t.charCodeAt(e+2))<<6|Qt(t.charCodeAt(e+3));r[i]=n>>16,r[i+1]=n>>8&255,r[i+2]=n&255}return oe(r)}catch(e){return Ce(new Bt({kind:`Decode`,module:`Base64`,input:t,message:e instanceof Error?e.message:`Invalid input`}))}},Jt=e=>{let t=e.length,n=``,r=2;for(;r<t;r+=3)n+=T[e[r-2]>>2],n+=T[(e[r-2]&3)<<4|e[r-1]>>4],n+=T[(e[r-1]&15)<<2|e[r]>>6],n+=T[e[r]&63];return r===t+1&&(n+=T[e[r-2]>>2],n+=T[(e[r-2]&3)<<4],n+=`==`),r===t&&(n+=T[e[r-2]>>2],n+=T[(e[r-2]&3)<<4|e[r-1]>>4],n+=T[(e[r-1]&15)<<2],n+=`=`),n},Yt=new TextEncoder,Xt=e=>e.replace(/[\n\r]/g,``),T=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Zt=new Uint8Array(123).fill(255);for(let e=0;e<64;e++)Zt[T.charCodeAt(e)]=e;Zt[61]=0;var Qt=e=>{if(e>=Zt.length||Zt[e]===255)throw TypeError(`Invalid character ${String.fromCharCode(e)}`);return Zt[e]},$t=`~effect/BigDecimal`,en={[$t]:$t,[pe](){let e=cn(this);return f(i(String(e.value)),Te(e.scale))},[ie](e){return tn(e)&&pn(this,e)===0},toString(){return`BigDecimal(${hn(this)})`},toJSON(){return{_id:`BigDecimal`,value:String(this.value),scale:this.scale}},[Se](){return this.toJSON()},pipe(){return ae(this,arguments)}},tn=t=>e(t,$t),nn=(e,t)=>{if(!Number.isSafeInteger(t))throw RangeError(`Scale must be a safe integer, got ${t}`);let n=Object.create(en);return n.value=e,n.scale=t,n},rn=(e,t)=>{let n=nn(e,t);return n.normalized=n,n},E=BigInt(0),an=BigInt(1),on=BigInt(10),sn=rn(E,0),cn=e=>{if(e.normalized===void 0){if(e.value===E)e.normalized=sn;else{let t=`${e.value}`,n=t.length;for(;t[n-1]===`0`;)n--;e.normalized=rn(BigInt(t.slice(0,n)),e.scale-(t.length-n))}}return e.normalized},ln=100,un=[an],dn=(e,t)=>e===t?0:e<t?-1:1,fn=(e,t)=>{let n=`${e.value<E?-e.value:e.value}`,r=`${t.value<E?-t.value:t.value}`,i=BigInt(n.length-r.length)-BigInt(e.scale)+BigInt(t.scale);if(i!==E)return i<E?-1:1;let a=Math.max(n.length,r.length);return Xe(n.padEnd(a,`0`),r.padEnd(a,`0`))},pn=(e,t)=>{if(e.scale===t.scale)return dn(e.value,t.value);let n=mn(e),r=mn(t);if(n!==r)return n<r?-1:1;if(n===0)return 0;let i=e.scale-t.scale,a=Math.abs(i);if(a>ln)return n===-1?fn(t,e):fn(e,t);let o=un[a]??=on**BigInt(a);return i>0?dn(e.value,t.value*o):dn(e.value*o,t.value)},mn=e=>e.value===E?0:e.value<E?-1:1,hn=e=>{let t=cn(e);if(Math.abs(t.scale)>=16)return gn(t);let n=t.value<E,r=`${n?-t.value:t.value}`,i=t.scale>0?r.padStart(t.scale+1,`0`):r.padEnd(r.length-t.scale,`0`),a=i.length-t.scale,o=t.scale>0?`${i.slice(0,a)}.${i.slice(a)}`:i;return n?`-${o}`:o},gn=e=>{if(_n(e))return`0e+0`;let t=cn(e),n=`${t.value}`,r=t.value<E?2:1,i=n.slice(0,r),a=n.slice(r),o=a.length-t.scale;return`${i}${a===``?``:`.${a}`}e${o>=0?`+`:``}${o}`},_n=e=>e.value===E,vn=`~effect/http/Cookies`,yn=`~effect/http/Cookies/Cookie`,bn={[vn]:vn,...h,toJSON(){return{_id:`effect/Cookies`,cookies:Nt(this.cookies,e=>e.toJSON())}},pipe(){return ae(this,arguments)}},xn=e=>{let t=Object.create(bn);return t.cookies=e,t},Sn=e=>{let t={};for(let n of e)_(t,n.name,n);return xn(t)},Cn=e=>{let t=typeof e==`string`?[e]:e,n=[];for(let e of t){let t=wn(e.trim());t&&n.push(t)}return Sn(n)};function wn(e){let t=e.split(`;`).map(e=>e.trim()).filter(e=>e!==``);if(t.length===0)return;let n=t[0].indexOf(`=`);if(n===-1)return;let r=t[0].slice(0,n);if(!Tn.test(r))return;let i=t[0].slice(n+1),a=Dn(i);if(t.length===1)return Object.assign(Object.create(En),{name:r,value:a,valueEncoded:i});let o={};for(let e=1;e<t.length;e++){let n=t[e],r=n.indexOf(`=`),i=r===-1?n:n.slice(0,r).trim(),a=r===-1?void 0:n.slice(r+1).trim();switch(i.toLowerCase()){case`domain`:{if(a===void 0)break;let e=a.trim().replace(/^\./,``);e&&(o.domain=e);break}case`expires`:{if(a===void 0)break;let e=new Date(a);isNaN(e.getTime())||(o.expires=e);break}case`max-age`:{if(a===void 0)break;let e=parseInt(a,10);isNaN(e)||(o.maxAge=Ke(e));break}case`path`:if(a===void 0)break;a[0]===`/`&&(o.path=a);break;case`priority`:if(a===void 0)break;switch(a.toLowerCase()){case`low`:o.priority=`low`;break;case`medium`:o.priority=`medium`;break;case`high`:o.priority=`high`}break;case`httponly`:o.httpOnly=!0;break;case`secure`:o.secure=!0;break;case`partitioned`:o.partitioned=!0;break;case`samesite`:if(a===void 0)break;switch(a.toLowerCase()){case`lax`:o.sameSite=`lax`;break;case`strict`:o.sameSite=`strict`;break;case`none`:o.sameSite=`none`}}}return Object.assign(Object.create(En),{name:r,value:a,valueEncoded:i,options:Object.keys(o).length>0?o:void 0})}var Tn=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,En={[yn]:yn,...h,toJSON(){return{_id:`effect/Cookies/Cookie`,name:this.name,value:this.value,options:this.options}}},Dn=e=>{try{return decodeURIComponent(e)}catch{return e}},On=new WeakMap,kn=e=>{if(On.has(e))return On.get(e);throw Error(`Unable to get redacted value`+(e.label?` with label: "${e.label}"`:``))},An=`~effect/Redacted`,jn=t=>e(t,An),Mn=(e,t)=>{let n=Object.create(Nn);return t?.label&&(n.label=t.label),On.set(n,e),n},Nn={[An]:{_A:e=>e},label:void 0,...re,toJSON(){return this.toString()},toString(){return`<redacted${te(this.label)?`:`+this.label:``}>`},[pe](){return n(On.get(this))},[ie](e){return jn(e)&&De(On.get(this),On.get(e))}},Pn=kn,Fn=Symbol.for(`~effect/http/Headers`),In=Object.defineProperties(Object.create(null),{[Fn]:{value:Fn},[ne]:{value(e){return Kn(this,Ze(e,Jn))}},toJSON:{value(){return ce(this)}},[ie]:{value(e){return Rn(this,e)}},[pe]:{value(){return r(this)}},toString:{value:h.toString},[Se]:{value:h[Se]}}),Ln=e=>Object.assign(Object.create(In),e),Rn=Rt(Fe()),zn=Object.create(In),Bn=e=>{if(e===void 0)return zn;if(Symbol.iterator in e){let t=Object.create(In);for(let[n,r]of e)t[n.toLowerCase()]=r;return t}let t=Object.create(In);for(let[n,r]of Object.entries(e))Array.isArray(r)?t[n.toLowerCase()]=r.join(`, `):r!==void 0&&(t[n.toLowerCase()]=r);return t},Vn=e=>Object.setPrototypeOf(e,In),Hn=g(3,(e,t,n)=>{let r=Ln(e);return r[t.toLowerCase()]=n,r}),Un=g(2,(e,t)=>Ln({...e,...Bn(t)})),Wn=g(2,(e,t)=>{let n=Ln(e);return Object.assign(n,t),n}),Gn=g(2,(e,t)=>{let n=Ln(e);return delete n[t.toLowerCase()],n}),Kn=g(2,(e,t)=>{let n={...e},r=t=>{if(typeof t==`string`){let r=t.toLowerCase();r in e&&(n[r]=Mn(e[r]))}else for(let r in e)r.search(t)!==-1&&(n[r]=Mn(e[r]))};if(Array.isArray(t))for(let e=0;e<t.length;e++)r(t[e]);else r(t);return n}),qn=(e,t)=>{let n=e.toLowerCase();for(let r=0;r<t.length;r++){let i=t[r];if(typeof i==`string`){if(i.toLowerCase()===n)return!0}else if(e.search(i)!==-1)return!0}return!1},Jn=Ve(`effect/Headers/CurrentRedactedNames`,{defaultValue:()=>[`authorization`,`cookie`,`set-cookie`,`x-api-key`]}),Yn=e=>typeof e==`string`?e:Pn(e),Xn=`~effect/http/UrlParams`,Zn=t=>e(t,Xn),Qn={...re,[Xn]:Xn,[Symbol.iterator](){return this.params[Symbol.iterator]()},[ne](e){return{_id:`UrlParams`,params:Object.fromEntries(sr(this,Ze(e,_r)))}},toJSON(){return ce(this)},[ie](e){return rr(this,e)},[pe](){return Ee(this.params.flat())}},$n=e=>{let t=Object.create(Qn);return t.params=e,t},er=e=>{if(Zn(e))return e;let t=tr(e),n=[];for(let e=0;e<t.length;e++)if(Array.isArray(t[e][0])){let[r,i]=t[e];n.push([`${r[0]}[${r.slice(1).join(`][`)}]`,i])}else n.push(t[e]);return $n(n)},tr=e=>{let t=typeof e[Symbol.iterator]==`function`?Ne(e):Object.entries(e),n=[];for(let[e,r]of t)if(Array.isArray(r))for(let t=0;t<r.length;t++)r[t]!==void 0&&n.push([e,nr(r[t])]);else if(typeof r==`object`&&r&&!jn(r)){let t=tr(r);for(let[r,i]of t)n.push([[e,...typeof r==`string`?[r]:r],i])}else r!==void 0&&n.push([e,nr(r)]);return n},nr=e=>jn(e)?e:String(e),rr=Me((e,t)=>ir(e.params,t.params)),ir=Pe(Ot([Fe(),we()])),ar=$n([]),or=g(2,(e,t)=>{let n=er(t).params.slice(),r=new Set;for(let e=0;e<n.length;e++)r.add(n[e][0]);for(let t=0;t<e.params.length;t++)r.has(e.params[t][0])||n.push(e.params[t]);return $n(n)}),sr=g(2,(e,t)=>{let n=Array.isArray(t)?t:[t];return e.params.map(([e,t])=>[e,typeof t==`string`&&cr(e,n)?Mn(t):t])}),cr=qn,lr=(e,t=gr())=>{e.includes(`@`)&&(e=pr(e));let n=e.indexOf(`?`);if(n===-1||t.length===0)return e;let r=e.indexOf(`#`);if(r!==-1&&r<n)return e;let i=r===-1?e.length:r;return e.slice(0,n+1)+mr(e.slice(n+1,i),t)+e.slice(i)},ur=/^(?:(https?|ftp|wss?):[/\\]*|[a-z][a-z\d+.-]*:\/\/|[/\\]{2,})/i,dr=/[/\\?#]/,fr=/[/?#]/,pr=e=>{let t=``,n=[];for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i===9||i===10||i===13||t===``&&i<=32||(t+=e[r],n.push(r))}let r=ur.exec(t);if(r===null)return e;let i=r[0].length,a=r[1]!==void 0||!r[0].includes(`:`),o=t.slice(i),s=o.search(a?dr:fr),c=(s===-1?o:o.slice(0,s)).lastIndexOf(`@`);return c===-1?e:e.slice(0,n[i])+`REDACTED:REDACTED`+e.slice(n[i+c])},mr=(e,t)=>e.split(`&`).map(e=>{let n=e.indexOf(`=`);return n!==-1&&cr(hr(e.slice(0,n)),t)?e.slice(0,n+1)+`REDACTED`:e}).join(`&`),hr=e=>{if(!e.includes(`%`)&&!e.includes(`+`))return e;try{return decodeURIComponent(e.replace(/\+/g,` `))}catch{return e}},gr=()=>Ze(globalThis[`~effect/Fiber/currentFiber`]?.context??et(),_r),_r=Ve(`effect/http/UrlParams/CurrentRedactedNames`,{defaultValue:()=>[`AWSAccessKeyId`,`Signature`,`sig`,`X-Goog-Signature`]});function vr(e){return e.checks?e.checks[e.checks.length-1].annotations:e.annotations}var yr=`~structural`,br=`~sentinels`,xr=`~constructor`,Sr=ye(e=>{let t=vr(e)?.identifier;return typeof t==`string`?t:e.getExpected(Sr)}),D=Symbol(),O=_t,k=O(D),A=O(D),Cr=e=>e===D?ke():tt(e),wr=e=>e._tag===`None`?k:O(e.value),Tr=`~effect/SchemaIssue/Issue`;function Er(t){return e(t,Tr)&&t[Tr]===Tr}function Dr(e){return Object.hasOwn(e,`input`)}var j=class{[Tr]=Tr;constructor(e,t){t?.reportInput===!0&&e!==D&&(this.input=e)}},Or=class extends j{_tag=`Filter`;filter;issue;constructor(e,t,n,r){super(n,r),this.filter=e,this.issue=t}},kr=class extends j{_tag=`Encoding`;ast;issue;constructor(e,t,n,r){super(n,r),this.ast=e,this.issue=t}},M=class extends j{_tag=`Pointer`;path;issue;constructor(e,t){super(),this.path=e,this.issue=t}},Ar=class extends j{_tag=`MissingKey`;annotations;constructor(e){super(),this.annotations=e}},jr=class extends j{_tag=`UnexpectedKey`;ast;constructor(e,t,n){super(t,n),this.ast=e}},N=class extends j{_tag=`Composite`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},P=class extends j{_tag=`InvalidType`;ast;constructor(e,t,n){super(t,n),this.ast=e}},F=class extends j{_tag=`InvalidValue`;annotations;constructor(e,t,n){super(t,n),this.annotations=e}};function Mr(e,t,n,r,i){return new N(e,[new M([t],n)],r,i)}var Nr=class extends j{_tag=`Forbidden`;annotations;constructor(e,t,n){super(t,n),this.annotations=e}},Pr=class extends j{_tag=`AnyOf`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},Fr=class extends j{_tag=`OneOf`;ast;successes;constructor(e,t,n,r){super(n,r),this.ast=e,this.successes=t}};function Ir(e,t,n){if(Er(e))return e;if(typeof e==`string`)return new F({message:e},t,n);let r=typeof e.issue==`string`?new F({message:e.issue},t,n):e.issue;return new M(e.path,r)}function Lr(e,t,n){if(e!==void 0)return typeof e==`boolean`?e?void 0:new F(void 0,t,n):Ir(e,t,n)}function Rr(e,t,n,r){return Array.isArray(t)?We(t)?t.length===1?Ir(t[0],n,r):new N(e,$e(t,e=>Ir(e,n,r)),n,r):void 0:Lr(t,n,r)}var zr=e=>{let t=Yr(e);if(t!==void 0)return t;switch(e._tag){case`InvalidType`:return I(Sr(e.ast),e);case`InvalidValue`:{let t=Ur(e);if(t!==void 0)return I(t,e);let n=Hr(e);return n===void 0?`Expected a valid value`:`Invalid data ${n}`}case`MissingKey`:return`Missing key`;case`UnexpectedKey`:{let t=Hr(e);return t===void 0?`Expected no excess property`:`Unexpected key with value ${t}`}case`Forbidden`:return`Forbidden operation`;case`OneOf`:{let t=Hr(e);return t===void 0?`Expected exactly one member to match`:`Expected exactly one member to match the input ${t}`}}},Br=e=>Yr(e.issue)??Yr(e);function Vr(e){return t=>({issues:Wr(t,[],e?.leafHook??zr,e?.checkHook??Br)})}function Hr(e){return Dr(e)?v(e.input):void 0}function Ur(e){let t=e.annotations?.expected;return typeof t==`string`?t:void 0}function I(e,t){let n=Hr(t);return n===void 0?`Expected ${e}`:`Expected ${e}, got ${n}`}function Wr(e,t,n,r){switch(e._tag){case`Filter`:{let i=r(e);if(i!==void 0)return[{path:t,message:i}];if(e.issue._tag!==`InvalidValue`)return Wr(e.issue,t,n,r);let a=Ur(e.issue);return[{path:t,message:a===void 0?I(Gr(e.filter),e):I(a,e.issue)}]}case`Encoding`:return Wr(e.issue,t,n,r);case`Pointer`:return Wr(e.issue,[...t,...e.path],n,r);case`Composite`:return e.issues.flatMap(e=>Wr(e,t,n,r));case`AnyOf`:return e.issues.length===0?[{path:t,message:Yr(e)??I(Sr(e.ast),e)}]:e.issues.flatMap(e=>Wr(e,t,n,r));default:return[{path:t,message:n(e)}]}}function Gr(e){let t=e.annotations?.expected;if(typeof t==`string`)return t;switch(e._tag){case`Filter`:return`<filter>`;case`FilterGroup`:return e.checks.map(e=>Gr(e)).join(` & `)}}function Kr(){return e=>Jr(e,``)}var qr=Kr();function Jr(e,t){let n;switch(e._tag){case`Filter`:{let r=Br(e);if(r!==void 0)n=r;else{if(e.issue._tag!==`InvalidValue`)return Jr(e.issue,t);let r=Ur(e.issue);n=r===void 0?I(Gr(e.filter),e):I(r,e.issue)}break}case`Encoding`:return Jr(e.issue,t);case`Pointer`:return Jr(e.issue,t+ve(e.path));case`Composite`:case`AnyOf`:if(e._tag===`Composite`||e.issues.length>0)return e.issues.map(e=>Jr(e,t)).join(`
|
|
2
|
-
`);n=Yr(e)??I(Sr(e.ast),e);break;default:n=zr(e)}return t?`${n}\n at ${t}`:n}function Yr(e){if(e._tag===`Pointer`)return;if(e._tag===`Encoding`)return Yr(e.issue);let t=(e._tag===`Filter`?e.filter.annotations:`annotations`in e?e.annotations:e.ast.annotations)?.[e._tag===`MissingKey`?`messageMissingKey`:e._tag===`UnexpectedKey`?`messageUnexpectedKey`:`message`];if(typeof t==`string`)return t}function Xr(e){let t;for(let n of e.reasons){if(!qe(n)||!Er(n.error))return;t??=n.error}return t}function Zr(e,t){let n=Xr(e);if(n===void 0)throw Error(t,{cause:e});return n}var Qr=e=>Object.assign(Object.create(xe),e);function $r(e){return oi((t,n)=>b(e(t,n)))}function ei(e){return $r((t,n)=>{let r={message:e(t)};return rt(t)?new Nr(r,t.value,n):new Nr(r)})}var ti=ei(()=>`Encoding is not supported`),ni=Qr({_tag:`Passthrough`});function ri(){return ni}function ii(){return ni}function L(e){return Qr({_tag:`Transform`,transform:e})}function R(e){return Qr({_tag:`TransformEffect`,transform:e})}function ai(e){return Qr({_tag:`TransformOptional`,transform:e})}function oi(e){return Qr({_tag:`TransformOptionalEffect`,transform:e})}function si(){return L(globalThis.String)}function ci(){return L(globalThis.Number)}function li(){return L(globalThis.BigInt)}function ui(){return L(Wt)}function di(){return L(Ht)}function fi(e){return R((t,n)=>vt({try:()=>JSON.parse(t,e?.reviver),catch:()=>new F({expected:`a valid JSON string`},t,n)}))}function pi(e){return R((t,n)=>vt({try:()=>{let n=JSON.stringify(t,e?.replacer,e?.space);if(n===void 0)throw TypeError(`Value cannot be represented as JSON`);return n},catch:()=>new F({expected:`a JSON-serializable value`},t,n)}))}function mi(){return L(Kt)}function hi(){return R((e,t)=>at(gt(qt(e)),()=>new F({expected:`a valid Base64 string`},e,t)))}function gi(){return L(encodeURIComponent)}function _i(){return R((e,t)=>{try{return C(globalThis.decodeURIComponent(e))}catch{return b(new F({expected:`a valid URI component`},e,t))}})}var vi=class extends _e{_tag=`Middleware`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new vi(this.encode,this.decode)}},yi=`~effect/SchemaTransformation/Transformation`,z=class extends _e{[yi]=yi;_tag=`Transformation`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new z(this.encode,this.decode)}};function bi(t){return e(t,yi)&&t[yi]===yi}var xi=e=>bi(e)?e:new z(e.decode,e.encode);function Si(e){return new z(R(e.decode),R(e.encode))}function Ci(e){return new z(L(e.decode),L(e.encode))}function wi(e){return new z(ai(e.decode),ai(e.encode))}function Ti(){return new z(ui(),ri())}function Ei(){return new z(di(),ri())}var Di=new z(ri(),ri());function Oi(){return Di}var ki=new z(ci(),si()),Ai=new z(li(),si()),ji=e=>ee(e)&&typeof e.message==`string`,Mi=e=>{let t=Object.hasOwn(e,`cause`)?Error(e.message,{cause:Ii(e.cause)}):Error(e.message);return typeof e.name==`string`&&e.name!==`Error`&&(t.name=e.name),typeof e.stack==`string`&&(t.stack=e.stack),t},Ni=e=>{try{let t=se(e);return t===void 0?v(e):JSON.parse(t)}catch{return v(e)}},Pi=(e,t,n)=>{let r={name:e.name,message:typeof e.message==`string`?e.message:``};return t?.includeStack&&typeof e.stack==`string`&&(r.stack=e.stack),!t?.excludeCause&&e.cause!==void 0&&(r.cause=n(e.cause)),r},Fi=e=>{let t=new WeakSet,n=r=>{if(l(r)){if(t.has(r))return`[Circular]`;t.add(r);let i=Pi(r,e,n);return t.delete(r),i}return Ni(r)};return n},Ii=e=>ji(e)?Mi(e):e,Li=e=>Ci({decode:Ii,encode:Fi(e)}),Ri=new z(hi(),mi());function zi(e){return new z(fi(e??{}),pi(e))}function B(e){return t=>t._tag===e}var Bi=B(`Declaration`),Vi=B(`Never`),Hi=B(`Literal`),Ui=B(`UniqueSymbol`),Wi=B(`Arrays`),Gi=B(`Objects`),Ki=B(`Union`),qi=B(`Suspend`),V=class{to;transformation;constructor(e,t){this.to=e,this.transformation=t}},Ji={},Yi=class{isOptional;isMutable;constructorDefault;annotations;constructor(e,t,n=void 0,r=void 0){this.isOptional=e,this.isMutable=t,this.constructorDefault=n,this.annotations=r}},Xi=`~effect/Schema`,H=class{[Xi]=Xi;annotations;checks;encoding;context;constructor(e=void 0,t=void 0,n=void 0,r=void 0){this.annotations=e,this.checks=t,this.encoding=n,this.context=r}toString(){return`<${this._tag}>`}},Zi=class extends H{_tag=`Declaration`;typeParameters;run;encodingChecks;encodingRun;constructor(e,t,n,r,i,a,o,s){super(n,r,i,a),this.typeParameters=e,this.run=t,this.encodingChecks=o,this.encodingRun=s}getParser(){let e;return(t,n)=>t===D?k:(e??=this.run(this.typeParameters))(t,this,n)}_rebuild(e,t,n,r,i){let a=To(this.typeParameters,e);return a===this.typeParameters&&t===this.checks&&n===this.encodingChecks&&r===this.run&&i===this.encodingRun?this:new Zi(a,r,this.annotations,t,void 0,this.context,n,i)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks,this.run,this.encodingRun)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks,this.encodingRun??this.run,this.run)}getExpected(){let e=this.annotations?.expected;return typeof e==`string`?e:`<Declaration>`}},Qi=new class extends H{_tag=`Null`;getParser(){return Vo(this,null)}getExpected(){return`null`}},$i=class extends H{_tag=`Undefined`;getParser(){return Vo(this,void 0)}toCodecJson(){return G(this,[ea])}getExpected(){return`undefined`}},ea=new V(Qi,new z(L(()=>void 0),L(()=>null))),ta=new $i,na=new class extends H{_tag=`Never`;getParser(){return J(this,o)}getExpected(){return`never`}},ra=new class extends H{_tag=`Unknown`;getParser(){return J(this,s)}getExpected(){return`unknown`}},ia=new class extends H{_tag=`ObjectKeyword`;getParser(){return J(this,a)}getExpected(){return`object | array | function`}};function aa(e){return typeof e==`number`?`parts[${e}]`:e}function oa(e,t,n){if(n.has(e))return!0;if(e.encoding)throw Error(`TemplateLiteral parts cannot have an encoding at ${aa(t)}`);let r;switch(e._tag){case`String`:case`Number`:case`BigInt`:r=!0;break;case`Literal`:r=!e.checks;break;case`TemplateLiteral`:{let i=aa(t);r=!e.checks&&e.parts.every((e,t)=>oa(e,`${i}.parts[${t}]`,n));break}case`Union`:{let i=aa(t);r=!e.checks&&e.types.every((e,t)=>oa(e,`${i}.types[${t}]`,n));break}default:return!1}return r&&n.add(e),r}var sa=class extends H{_tag=`TemplateLiteral`;parts;encodedParts;literals;suffixLengths;constructor(e,t,n,r,i){super(t,n,r,i);let a=[],o=[],s=new Set;for(let t=0;t<e.length;t++){let n=e[t];if(!oa(n,t,s))throw Error(`Invalid TemplateLiteral part ${n._tag}`);a.push(n),o.push(n._tag===`Literal`?globalThis.String(n.literal):void 0)}let c=Array(a.length+1);c[a.length]=0;for(let e=a.length-1;e>=0;e--)c[e]=c[e+1]+(o[e]?.length??0);this.parts=e,this.encodedParts=a,this.literals=o,this.suffixLengths=c}getParser(e){let t=e(jo(U,new ga(!1,this.parts.map(Go),[]),ca(this)));return(e,n)=>{if(e===D)return k;let r=t(e,n);return r._tag===`Success`?A:st(r,{onSuccess:()=>e,onFailure:t=>new N(this,[t],e,n)})}}getExpected(){return`string`}matchPart(e,t){return Ho(this,e,t)===void 0?void 0:e}};function ca(e){return new z(R((t,n)=>{let r=Ho(e,t,n);return r?C(r):b(new F({expected:`a string matching template literal parts`},t,n))}),L(e=>e.join(``)))}var la=class extends H{_tag=`Literal`;literal;constructor(e,t,n,r,i){if(super(t,n,r,i),typeof e==`number`&&!globalThis.Number.isFinite(e))throw Error(`A numeric literal must be finite, got ${v(e)}`);this.literal=e}getParser(){return Vo(this,this.literal)}matchPart(e,t){return e===globalThis.String(this.literal)?this.literal:void 0}toCodecJson(){return typeof this.literal==`bigint`?ua(this):this}toCodecStringTree(){return typeof this.literal==`string`?this:ua(this)}getExpected(){return typeof this.literal==`string`?JSON.stringify(this.literal):globalThis.String(this.literal)}};function ua(e){let t=globalThis.String(e.literal);return G(e,[new V(new la(t),new z(L(()=>e.literal),L(()=>t)))])}var U=new class extends H{_tag=`String`;getParser(){return J(this,te)}matchPart(e,t){let n=this.checks;return n&&!t.disableChecks&&Y(n,e,void 0,this,t)?void 0:e}getExpected(){return`string`}},da=class extends H{_tag=`Number`;getParser(){return J(this,t)}matchKey(e,t){return this._match(qo,e,t)}matchPart(e,t){return this._match(Ko,e,t)}_match(e,t,n){if(!e.test(t))return;let r=globalThis.Number(t);return n.disableChecks||!this.checks?r:Y(this.checks,r,void 0,this,n)?void 0:r}toCodecJson(){return this.checks&&(fa(this.checks,`effect/schema/isFinite`)||fa(this.checks,`effect/schema/isInt`))?this:G(this,[so])}toCodecStringTree(){return this.toCodecJson()===this?G(this,[Xo]):G(this,[Zo])}getExpected(){return`number`}};function fa(e,t){return e.some(e=>e.annotations?.representation?.id===t||e._tag===`FilterGroup`&&fa(e.checks,t))}var pa=new da,ma=new class extends H{_tag=`Boolean`;getParser(){return J(this,c)}getExpected(){return`boolean`}},ha=new class extends H{_tag=`BigInt`;getParser(){return J(this,fe)}matchPart(e,t){if(!Qo.test(e))return;let n=globalThis.BigInt(e);return t.disableChecks||!this.checks?n:Y(this.checks,n,void 0,this,t)?void 0:n}toCodecStringTree(){return G(this,[ts])}getExpected(){return`bigint`}},ga=class extends H{_tag=`Arrays`;isMutable;elements;rest;encodingChecks;constructor(e,t,n,r,i,a,o,s){super(r,i,a,o),this.isMutable=e,this.elements=t,this.rest=n,this.encodingChecks=s;let c=!1;for(let e=0;e<t.length;e++)if(Po(t[e]))c=!0;else if(c)throw Error(`A required element cannot follow an optional element. ts(1257)`);if(c&&n.length>1)throw Error(`A required element cannot follow an optional element. ts(1257)`);for(let e=1;e<n.length;e++)if(Po(n[e]))throw Error(`An optional element cannot follow a rest element. ts(1266)`)}getParser(e,t=e){let n=this,r,i,a=n.elements.length,o=Math.max(0,n.rest.length-1);function s(e,t){return t<a?r[t]:t>=e?i[t-e+1]:i[0]}let c=e=>{let{input:t,len:r,options:i}=e;if(n.rest.length===0&&r>a)for(let o=a;o<r;o++){let r=new jr(n,t[o],i),a=new M([o],r);if(i.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return b(new N(n,[a],t,i))}return e.issues?b(new N(n,e.issues,t,i)):O(e.output)},l=(e,t)=>{let r=e.length,i={ast:n,getParser:s,input:e,len:r,tailThreshold:Math.max(a,r-o),output:new globalThis.Array(r),issues:void 0,options:t},u=n.rest.length===0?a:Math.max(r,a+o),d=t.concurrency===void 0?1:Qe(t.concurrency),f=d===1?ya(i,e,0,u):ba(i,e,{concurrency:d,end:u});if(!f)return c(i);if(y(f))return x(f,()=>c(i));let p=!0;return xt(()=>p?(p=!1,S(f,()=>c(i))):l(e,t))};return(e,a)=>{if(e===D)return k;try{return Array.isArray(e)?(r||(r=n.elements.map(e=>({ast:e,parser:t(e)})),i=n.rest.map(e=>({ast:e,parser:t(e)}))),l(e,a)):b(new P(n,e,a))}catch(e){return ut(e)}}}_rebuild(e,t,n){let r=To(this.elements,e),i=To(this.rest,e);return r===this.elements&&i===this.rest&&t===this.checks&&n===this.encodingChecks?this:new ga(this.isMutable,r,i,this.annotations,t,void 0,this.context,n)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}getExpected(){return`array`}};function _a(e,t,n,r){if(n._tag===`Failure`)return xa(e,e.ast,r,n);let i=n===A?t:n[p];if(i!==D)e.output[r]=i;else{let t=e.getParser(e.tailThreshold,r);if(Po(t.ast))return;let n=new M([r],new Ar(t.ast.context?.annotations));if(e.options.errors===`all`)e.issues?e.issues.push(n):e.issues=[n];else return ft(new N(e.ast,[n],e.input,e.options))}}var va={onItem(e,t,n){let r=n<e.len?t:D;return e.getParser(e.tailThreshold,n).parser(r,e.options)},step:_a},ya=Be()(va),ba=Re()(va),xa=(e,t,n,r)=>{if(r.cause.reasons.length===0)return r;let i=Xr(r.cause);if(i===void 0)return ot(nt(r.cause,r=>new N(t,[new M([n],r)],e.input,e.options)));let a=new M([n],i);if(e.options.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return ft(new N(t,[a],e.input,e.options))},Sa=`[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?`;function Ca(e,t,n=Ji){let r,i;function a(t){switch(t._tag){case`String`:case`TemplateLiteral`:return(r??=Object.keys(e)).filter(e=>t.matchPart(e,n)!==void 0);case`Number`:return(r??=Object.keys(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Symbol`:return(i??=Object.getOwnPropertySymbols(e)).filter(r=>Object.prototype.propertyIsEnumerable.call(e,r)&&t.matchKey(r,n)!==void 0);case`Union`:return[...new Set(t.types.flatMap(a))];default:return[]}}return a(Uo(Ro(t)))}var wa=class{name;type;constructor(e,t){this.name=e,this.type=t}};function Ta(e){switch(e._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return e.types.every(Ta);default:return!1}}function Ea(e){let t=mo(e);switch(t._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return t.types.every(Ea);default:return!1}}function Da(e){return Ta(e)&&Ea(e)}var Oa=class{parameter;type;constructor(e,t){if(!Da(e))throw Error(`Invalid index signature parameter ${e._tag}`);if(this.parameter=e,this.type=t,Po(t)&&!Bo(t))throw Error("Cannot use `Schema.optionalKey` with index signatures, use `Schema.optional` instead.")}},ka=class extends H{_tag=`Objects`;propertySignatures;indexSignatures;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.propertySignatures=e,this.indexSignatures=t,this.encodingChecks=o}getParser(e,t=e){let n=this,r=n.propertySignatures.length,i=n.indexSignatures.length;if(!r&&!i)return J(n,d);let a,o,s=()=>(a||(a=n.propertySignatures.map(e=>({parser:t(e.type),name:e.name,type:e.type})),o=i?n.indexSignatures.map(n=>({is:n,parserKey:e(Uo(n.parameter)),parserValue:t(n.type)})):void 0),a),c=()=>{let e=new Set(n.propertySignatures.map(e=>typeof e.name==`number`?globalThis.String(e.name):e.name)),t=(t,i,a,o,s)=>{if(s._tag===`Failure`)return xa(t,n,i,s)??yt;let c=s===A?o:s[p];if(a!==D&&c!==D){if(r&&(e.has(i)||e.has(typeof a==`number`?globalThis.String(a):a)))return yt;_(t.out,a,c)}return yt},c=(e,r,i,a)=>{if(!a){let t=i.parserKey(r,e.options);if(!y(t))return S(pt(t),t=>c(e,r,i,t));a=t}if(a._tag===`Failure`)return xa(e,n,r,a)??yt;let o=a===A?r:a[p],s=e.input[r],l=i.parserValue(s,e.options);return y(l)?t(e,r,o,s,l):S(pt(l),n=>t(e,r,o,s,n))},l=(e,n,r)=>{let i=e.input[n],a=r.parserValue(i,e.options);return y(a)?t(e,n,n,i,a):S(pt(a),r=>t(e,n,n,i,r))},u=i?Re()({onItem:(e,[t,n])=>n.is.parameter===U?l(e,t,n):c(e,t,n),step:(e,t,n)=>n._tag===`Failure`?n:void 0}):void 0;return mt(function*(t,d){if(t===D)return D;if(typeof t!=`object`||!t||Array.isArray(t))return yield*b(new P(n,t,d));s();let f=t,p={},m={ast:n,input:f,out:p,issues:void 0,options:d},ee=d.errors===`all`,te=d.onExcessProperty===`error`,ne=d.concurrency===void 0?1:Qe(d.concurrency),h=i&&te?n.indexSignatures.map(e=>Ca(f,e.parameter,d)):void 0;if(te){let r=h?new Set(e):e;if(h)for(let e of h)for(let t of e)r.add(t);let i=Reflect.ownKeys(f);for(let e=0;e<i.length;e++){let a=i[e];if(!r.has(a)&&Object.prototype.propertyIsEnumerable.call(f,a)){let e=new jr(n,f[a],d),r=new M([a],e);if(ee){m.issues?m.issues.push(r):m.issues=[r];continue}return yield*b(new N(n,[r],t,d))}}}if(r){let e=ne===1?Ma(m,a):Na(m,a,{concurrency:ne});e&&(yield*e)}if(i&&ne===1)for(let e=0;e<i;e++){let t=o[e],n=t.is.parameter===U?l:c,r=h?.[e]??(t.is.parameter===U?Object.keys(f):Ca(f,t.is.parameter,d));for(let e=0;e<r.length;e++){let i=n(m,r[e],t);if(!y(i))yield*i;else if(i._tag===`Failure`)return yield*i}}else if(u){let e=Ye();for(let t=0;t<i;t++){let n=o[t],r=h?.[t]??(n.is.parameter===U?Object.keys(f):Ca(f,n.is.parameter,d));for(let t=0;t<r.length;t++)e.push([r[t],n])}let t=u(m,e,{concurrency:ne});t&&(yield*t)}return m.issues?yield*b(new N(n,m.issues,t,d)):p})};if(i)return c();let l,u=(e,t,n)=>{let r=a[t];return S(pt(n),n=>{let i=Aa(e,r,n);if(i)return i;let o=()=>O(e.out),s=Ma(e,a.slice(t+1));return s?x(s,o):o()})};return(e,t)=>{if(e===D)return k;if(t.errors===`all`||t.onExcessProperty!==void 0||t.concurrency!==void 0&&Qe(t.concurrency)!==1)return(l??=c())(e,t);if(typeof e!=`object`||!e||Array.isArray(e))return b(new P(n,e,t));let r=s(),i=e,a={},o={ast:n,input:i,out:a,issues:void 0,options:t};try{for(let e=0;e<r.length;e++){let n=r[e],s=n.name,c=Ga(i,s),l=c?i[s]:D,d=n.parser(l,t);if(!y(d))return u(o,e,d);if(d===A){c&&_(a,s,l);continue}let f=Aa(o,n,d);if(f)return f}}catch(e){return ut(e)}return O(a)}}_rebuild(e,t,n,r){let i=To(this.propertySignatures,t=>{let n=e(t.type);return n===t.type?t:new wa(t.name,n)}),a=To(this.indexSignatures,n=>{let r=t(n.parameter),i=e(n.type);return r===n.parameter&&i===n.type?n:new Oa(r,i)});return i===this.propertySignatures&&a===this.indexSignatures&&n===this.checks&&r===this.encodingChecks?this:new ka(i,a,this.annotations,n,void 0,this.context,r)}flip(e){return this._rebuild(e,e,this.encodingChecks,this.checks)}recur(e,t=e){return this._rebuild(e,t,this.checks,this.encodingChecks)}getExpected(){return this.propertySignatures.length===0&&this.indexSignatures.length===0?`object | array`:`object`}};function Aa(e,t,n){if(n._tag===`Failure`)return xa(e,e.ast,t.name,n);if(n===A)return;let r=n[p];if(r!==D){_(e.out,t.name,r);return}if(delete e.out[t.name],!Po(t.type)){let n=new M([t.name],new Ar(t.type.context?.annotations));if(e.options.errors===`all`){e.issues?e.issues.push(n):e.issues=[n];return}return ft(new N(e.ast,[n],e.input,e.options))}}var ja={onItem(e,t){if(!Ga(e.input,t.name))return t.parser(D,e.options);let n=e.input[t.name];return _(e.out,t.name,n),t.parser(n,e.options)},step:Aa},Ma=Be()(ja),Na=Re()(ja);function Pa(e,t){return e?t?[...e,...t]:e:t}function Fa(e,t,n){return new ka(Reflect.ownKeys(e).map(t=>new wa(t,e[t].ast)),[],n,t)}function Ia(e){return e.ast}function La(e,t,n){return new W(e.map(Ia),t,void 0,n)}function Ra(e,t){if(e.encoding||t.some(e=>e.encoding))throw Error(`StructWithRest does not support encodings`);let n=e.propertySignatures,r=e.indexSignatures,i=e.checks;for(let e of t){for(let t of e.propertySignatures)if(n.some(e=>e.name===t.name))throw Error(`Duplicate identifier: ${JSON.stringify(t.name)}. ts(2300)`);n=n.concat(e.propertySignatures),r=r.concat(e.indexSignatures),i=Pa(i,e.checks)}return new ka(n,r,void 0,i)}var za=ue(e=>{for(;;){if(qi(e))return ra;let t=e.encoding;if(!t)return e.recur?.(za,ge)??e;if(t.some(e=>e.transformation._tag===`Middleware`&&e.transformation.decode!==ge))return ra;e=t[t.length-1].to}});function Ba(e){switch(e._tag){case`Null`:return[`null`];case`Undefined`:return[`undefined`];case`String`:case`TemplateLiteral`:return[`string`];case`Number`:return[`number`];case`Boolean`:return[`boolean`];case`Symbol`:case`UniqueSymbol`:return[`symbol`];case`BigInt`:return[`bigint`];case`Arrays`:return[`array`];case`ObjectKeyword`:return[`object`,`array`,`function`];case`Objects`:return e.propertySignatures.length||e.indexSignatures.length?[`object`]:[`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`];case`Enum`:return Array.from(new Set(e.enums.map(([,e])=>typeof e)));case`Literal`:return[typeof e.literal];case`Union`:return Array.from(new Set(e.types.flatMap(Ba)));default:return[`null`,`undefined`,`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`]}}function Va(e){switch(e._tag){default:return[];case`Declaration`:{let t=e.annotations?.[br];return Array.isArray(t)?t:[]}case`Objects`:return e.propertySignatures.flatMap(e=>{let t=e.type;if(!Po(t)){if(Hi(t))return[{key:e.name,literal:t.literal}];if(Ui(t))return[{key:e.name,literal:t.symbol}]}return[]});case`Arrays`:return e.elements.flatMap((e,t)=>{if(!Po(e)){if(Hi(e))return[{key:t,literal:e.literal}];if(Ui(e))return[{key:t,literal:e.symbol}]}return[]});case`Union`:{if(e.types.length===0)return[];let t=e.types.map(e=>Va(za(e)));return t[0].filter(e=>t.every(t=>t.some(t=>t.key===e.key&&t.literal===e.literal)))}case`Suspend`:return Va(e.thunk())}}var Ha=new WeakMap,Ua=Object.freeze([]),Wa=e=>e===null?`null`:Array.isArray(e)?`array`:typeof e,Ga=(e,t)=>t===`__proto__`?Object.hasOwn(e,t):t in e;function Ka(e){let t=Ha.get(e);if(t)return t;let n,r=0,i,o,s=!0,c=[];for(let t=0;t<e.length;t++){let a=e[t],l=za(a);if(Vi(l))continue;if(Hi(l)||Ui(l)){o??=new Map;let e=Hi(l)?l.literal:l.symbol;c[t]=e;let n=o.get(e);n||o.set(e,n=[]),n.push(t)}else s=!1;let u=Va(l);if(u.length){n??=new Map,r++;for(let{key:e,literal:r}of u){let i=n.get(e);i||n.set(e,i=[new Map,new Set]),i[1].add(t);let a=i[0].get(r);a||i[0].set(r,a=new Set),a.add(t)}}else{i??={};let e=Ba(l);for(let n of e)(i[n]??=[]).push(t)}}let l={},u=e=>l[e]??=Object.freeze(i?.[e]??Ua);if(s&&o)o.forEach(Object.freeze),t=e=>o.get(e)??Ua;else if(n?.size===1&&!i){let[r,[i]]=n.entries().next().value,o=new Map;for(let[e,t]of i)o.set(e,Object.freeze(Array.from(t)));let s=Object.freeze(e.map((e,t)=>t));t=(e,t)=>{if(a(e)){let n=Ga(e,r)?e[r]:void 0;if(n!==void 0)return o.get(n)??Ua;if(t)return s}return Ua}}else if(n){let e;for(let t of n)(!e||t[1][0].size>e[1][0].size)&&t[1][1].size===r&&(e=t);t=(t,r)=>{let o=Wa(t);if(!a(t))return u(o);let s=new Set(i?.[o]),c;if(e){let[n,[i]]=e,a=Ga(t,n),l=a?t[n]:void 0;if(a&&(!r||l!==void 0)){let e=i.get(l);if(!e)return u(o);for(let t of e)s.add(t);c=n}}if(c===void 0)for(let[e,[i,a]]of n){let n=Ga(t,e),o=n?t[e]:void 0;if(n&&(!r||o!==void 0)){let e=i.get(o);if(e)for(let t of e)s.add(t)}else if(r)for(let e of a)s.add(e)}for(let[e,[i,a]]of n){if(e===c)continue;let n=Ga(t,e),o=n?t[e]:void 0;if(n&&(!r||o!==void 0)){let e=i.get(o);for(let t of s)a.has(t)&&!e?.has(t)&&s.delete(t)}}return Array.from(s).sort((e,t)=>e-t)}}else t=e=>{let t=u(Wa(e));return o?t.filter(t=>c[t]===void 0||c[t]===e):t};return Ha.set(e,t),t}var W=class extends H{_tag=`Union`;types;options;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.types=e,this.options=t,this.encodingChecks=o}getParser(e,t){let n=this,r=t!==void 0,i=[],a=t=>i[t]??=e(n.types[t]),o;return(e,t)=>{if(e===D)return k;let i=(o??=Ka(n.types))(e,r);if(i.length===0)return b(new Pr(n,[],e,t));if(i.length===1){let r=a(i[0])(e,t);return r._tag===`Success`?r:y(r)?qa(n,r.cause,e,t):Ja(n,r,e,t)}return Ya(n,a,i,e,t)}}_rebuild(e,t,n){let r=To(this.types,e);return r===this.types&&t===this.checks&&n===this.encodingChecks?this:new W(r,this.options,this.annotations,t,void 0,this.context,n)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}matchPart(e,t){for(let n of this.types){let r=n.matchPart(e,t);if(r!==void 0)return r}}getExpected(e){let t=this.annotations?.expected;if(typeof t==`string`)return t;if(this.types.length===0)return`never`;let n=this.types.map(t=>{let n=Ro(t);switch(n._tag){case`Arrays`:{let t=n.elements.filter(Hi);if(t.length>0)return`${$a(n.isMutable)}[ ${t.map(t=>e(t)+eo(t.context?.isOptional)).join(`, `)}, ... ]`;break}case`Objects`:{let t=n.propertySignatures.filter(e=>Hi(e.type));if(t.length>0)return`{ ${t.map(t=>`${$a(t.type.context?.isMutable)}${he(t.name)}${eo(t.type.context?.isOptional)}: ${e(t.type)}`).join(`, `)}, ... }`;break}}return e(n)});return Array.from(new Set(n)).join(` | `)}};function qa(e,t,n,r){let i=Xr(t);return i?ft(new Pr(e,[i],n,r)):ot(t)}function Ja(e,t,n,r){return lt(t,t=>qa(e,t,n,r))}function Ya(e,t,n,r,i){let a={ast:e,parser:t,input:r,out:void 0,successes:e.options?.mode===`oneOf`?[]:void 0,issues:void 0,options:i},o=Za(a,n);if(!o)return a.out?a.out:b(new Pr(e,a.issues??[],r,i));if(y(o))return Xa(o,a);let s=!0;return xt(()=>s?(s=!1,Xa(o,a)):Ya(e,t,n,r,i))}function Xa(e,t){return x(e,e=>t.out===A?C(t.input):t.out?t.out:b(new Pr(t.ast,t.issues??[],t.input,t.options)))}var Za=Be()({onItem(e,t){return e.parser(t)(e.input,e.options)},step(e,t,n){if(n._tag===`Failure`){let t=Xr(n.cause);if(t===void 0)return n;e.issues?e.issues.push(t):e.issues=[t]}else{if(e.out&&e.successes)return e.successes.push(e.ast.types[t]),ft(new Fr(e.ast,e.successes,e.input,e.options));if(e.out=n,e.successes)e.successes.push(e.ast.types[t]);else return yt}}}),Qa=new W([new la(`Infinity`),new la(`-Infinity`),new la(`NaN`)]);function $a(e){return e?``:`readonly `}function eo(e){return e?`?`:``}var to=class extends H{_tag=`Suspend`;thunk;constructor(e,t,n,r,i){if(n)throw Error(`Cannot add checks to Suspend`);super(t,void 0,r,i);let a;this.thunk=()=>a??=e()}getParser(e){let t;return(n,r)=>(t??=e(this.thunk()))(n,r)}recur(e){return new to(()=>e(this.thunk()),this.annotations,void 0,void 0,this.context)}getExpected(e){return e(this.thunk())}},no=class extends _e{_tag=`Filter`;run;annotations;aborted;constructor(e,t=void 0,n=!1){super(),this.run=e,this.annotations=t,this.aborted=n}annotate(e){return new no(this.run,{...this.annotations,...e},this.aborted)}abort(){return new no(this.run,this.annotations,!0)}and(e,t){return new ro([this,e],t)}},ro=class extends _e{_tag=`FilterGroup`;checks;annotations;constructor(e,t=void 0){super(),this.checks=e,this.annotations=t}annotate(e){return new ro(this.checks,{...this.annotations,...e})}and(e,t){return new ro([this,e],t)}};function io(e,t,n=!1){return new no((t,n,r)=>Rr(n,e(t,n,r),t,r),t,n)}function ao(e){return io(e=>globalThis.Number.isFinite(e),{expected:`a finite number`,representation:{id:`effect/schema/isFinite`,payload:null},toJsonSchema:()=>({type:`number`}),toCode:()=>({runtime:`Schema.isFinite()`}),arbitraryConstraint:{number:`finite`},...e})}var oo=_o(pa,[ao()]),so=new V(new W([oo,Qa]),new z(ci(),L(e=>globalThis.Number.isFinite(e)?e:globalThis.String(e))));function co(e,t){let n=new globalThis.RegExp(e),r={source:n.source,flags:n.flags};return io(e=>(n.lastIndex=0,n.test(e)),{expected:`a string matching the RegExp ${r.source}`,representation:{id:`effect/schema/isPattern`,payload:r},toJsonSchema:()=>[{},!0],arbitraryConstraint:{patterns:[r]},...t})}var lo=new WeakMap;function uo(e,t){let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,t);return Reflect.ownKeys(t).every(e=>e===`context`||e===`encoding`)&&lo.set(n,fo(e)),n}function fo(e){let t=lo.get(e);if(t!==void 0)return t;if(e.encoding===void 0)return e;let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,{encoding:void 0});return lo.set(e,n),n}function G(e,t){return e.encoding===t?e:uo(e,{encoding:t})}function po(e,t){if(e.context===t)return e;let n=fo(e);return n.context===t&&n.encoding===e.encoding?n:uo(e,{context:t})}function mo(e){return e.encoding?mo(e.encoding[e.encoding.length-1].to):e}function ho(e,t){if(e.checks){let n=e.checks[e.checks.length-1];return go(e,Ae(e.checks.slice(0,-1),n.annotate(t)))}return uo(e,{annotations:{...e.annotations,...t}})}function go(e,t){if(e._tag===`Suspend`&&t)throw Error(`Cannot add checks to Suspend`);return e.checks===t?e:uo(e,{checks:t})}function _o(e,t){return go(e,Pa(e.checks,t))}function vo(e,t){let n=t(e.to);return n===e.to?e:new V(n,e.transformation)}function yo(e,t){let n=e,r=n[n.length-1],i=vo(r,t);return i===r?e:Ae(e.slice(0,e.length-1),i)}function bo(e){return t=>t.encoding?G(t,yo(t.encoding,e)):t}function xo(e,t){return bo(e=>po(e,t))(e)}function So(e,t){function n(r){if(r.encoding){let e=r.encoding[r.encoding.length-1];return t?.stopAt?.(e)?r:G(r,yo(r.encoding,n))}return e(r)}return ue(n)}function Co(e,t){return wo(e,t,K(e))}function wo(e,t,n){let r=new V(e,t);return G(n,n.encoding?[...n.encoding,r]:[r])}function To(e,t){let n;for(let r=0;r<e.length;r++){let i=e[r],a=t(i);if(n)n[r]=a;else if(a!==i){n=Array(e.length);for(let t=0;t<r;t++)n[t]=e[t];n[r]=a}}return n??e}function Eo(e,t){return po(e,e.context?new Yi(e.context.isOptional,e.context.isMutable,e.context.constructorDefault,{...e.context.annotations,...t}):new Yi(!1,!1,void 0,t))}var Do=ue(e=>Oo(po(e,e.context?e.context.isOptional===!1?new Yi(!0,e.context.isMutable,e.context.constructorDefault,e.context.annotations):e.context:new Yi(!0,!1)))),Oo=bo(Do),ko=ye(e=>Do(new W([e,ta])));function Ao(e,t){return po(e,e.context?new Yi(e.context.isOptional,e.context.isMutable,t,e.context.annotations):new Yi(!1,!1,t))}function jo(e,t,n){return wo(e,n,t)}function Mo(e){let t=[],n=[];function r(e){switch(e._tag){case`Literal`:m(e.literal)&&!t.includes(e.literal)&&t.push(e.literal);return;case`UniqueSymbol`:t.includes(e.symbol)||t.push(e.symbol);return;case`Never`:return;case`Union`:for(let t=0;t<e.types.length;t++)r(e.types[t]);return;default:n.push(e)}}return r(e),{literals:t,parameters:n}}function No(e,t){let{literals:n,parameters:r}=Mo(e);return new ka(n.map(e=>new wa(e,t)),r.map(e=>new Oa(e,t)))}function Po(e){return e.context?.isOptional??!1}function Fo(e){return e.annotations?.[`~structural`]===!0||e._tag===`FilterGroup`&&e.checks.every(Fo)}function Io(e){function t(e){return Fo(e)?[e]:e._tag===`FilterGroup`?e.checks.flatMap(t):[]}let n=e.flatMap(t);return Ue(n)?n:void 0}function Lo(e){let t=!0;function n(e){return t=t&&!e.encoding&&!qi(e),t&&`recur`in e&&e.recur(n),e}return`recur`in e&&e.recur(n),t}var K=ue(e=>{let t=fo(e);if(t!==e){let n=K(t);return n===t&&e.encoding===void 0?e:po(n,e.context)}let n=`recur`in e?e.recur(K):e;if(`encodingChecks`in n&&n.encodingChecks){let t=Lo(e)?n.encodingChecks:Wi(n)||Gi(n)||Bi(n)&&n.typeParameters.length>0?Io(n.encodingChecks):void 0;return uo(n,{encodingChecks:void 0,checks:Pa(n.checks,t)})}return n}),Ro=ue(e=>K(q(e)));function zo(e,t){let n=t,r=n.length,i=n[r-1],a=[new V(q(G(e,void 0)),n[0].transformation.flip())];for(let e=1;e<r;e++)a.unshift(new V(q(n[e-1].to),n[e].transformation.flip()));let o=q(i.to);return o.encoding?G(o,[...o.encoding,...a]):G(o,a)}var q=ye(e=>{if(e.encoding)return zo(e,e.encoding);let t=fo(e);if(t!==e){let n=q(t);return n===t?e:po(n,e.context)}return`flip`in e?e.flip(q):`recur`in e?e.recur(q):e});function Bo(e){switch(e._tag){case`Undefined`:return!0;case`Union`:return e.types.some(Bo);default:return!1}}function Vo(e,t){let n=t===0?A:O(t);return(r,i)=>r===D?k:r===t?n:b(new P(e,r,i))}function J(e,t){return(n,r)=>n===D?k:t(n)?A:b(new P(e,n,r))}function Ho(e,t,n){let r=e.encodedParts,i=e.literals,a=t.length;for(let e=0;e<i.length;e++){let n=i[e];if(n&&!t.includes(n))return}if(e.suffixLengths[0]>a)return;let o=Array(r.length),s;function c(l,u){if(l===r.length)return u===a;if(s?.has(l*(a+1)+u))return!1;let d=r[l];if(l===r.length-1){let e=t.slice(u);if(d.matchPart(e,n)!==void 0)return o[l]=e,!0}else if(d._tag===`Literal`){let e=i[l];if(t.startsWith(e,u)&&c(l+1,u+e.length))return o[l]=e,!0}else{let r=a-e.suffixLengths[l+1],s=i[l+1],f=s===void 0?r:t.lastIndexOf(s,r);for(;f>=u;){let e=t.slice(u,f);if(d.matchPart(e,n)!==void 0&&c(l+1,f))return o[l]=e,!0;if(f===0)break;f=s===void 0?f-1:t.lastIndexOf(s,f-1)}}return s??=new Set,s.add(l*(a+1)+u),!1}return c(0,0)?o:void 0}var Uo=So(e=>{switch(e._tag){default:return e;case`Number`:return e.toCodecStringTree();case`Union`:return e.recur(Uo)}}),Wo=So(e=>{switch(e._tag){default:return e;case`Symbol`:case`UniqueSymbol`:return e.toCodecStringTree();case`Union`:return e.recur(Wo)}}),Go=So(e=>{switch(e._tag){default:return e;case`Number`:case`Literal`:case`BigInt`:return e.toCodecStringTree();case`Union`:return e.recur(Go)}}),Ko=new globalThis.RegExp(`^${Sa}$`),qo=new globalThis.RegExp(`^(?:${Sa}|Infinity|-Infinity|NaN)$`);function Jo(e){return co(Ko,{expected:`a string representing a finite number`,representation:{id:`effect/schema/isStringFinite`,payload:null},toJsonSchema:()=>({pattern:Ko.source}),...e})}var Yo=_o(U,[Jo()]),Xo=new V(Yo,ki),Zo=new V(new W([Yo,Qa]),ki),Qo=new globalThis.RegExp(`^-?\\d+$`);function $o(e){return co(Qo,{expected:`a string representing a bigint`,representation:{id:`effect/schema/isStringBigInt`,payload:null},toJsonSchema:()=>({pattern:Qo.source}),...e})}var es=_o(U,[$o({expected:`a string representing a bigint`})]),ts=new V(es,Ai);function Y(e,t,n,r,i){for(let a=0;a<e.length;a++){let o=e[a];if(o._tag===`FilterGroup`){if(n=Y(o.checks,t,n,r,i),n&&(i.errors!==`all`||n[n.length-1].filter.aborted))return n}else{let e=o.run(t,r,i);if(e){let r=new Or(o,e,t,i);if(n?n.push(r):n=[r],i.errors!==`all`||o.aborted)return n}}}return n}function ns(e){if(!Bi(e))return;let t=e.annotations?.[xr];return u(t)?t(e.typeParameters):void 0}function rs(e){return e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&globalThis.Number.isFinite(e)}function is(e){return e===void 0||typeof e==`string`}function as(e,t){let n=new WeakMap,r=[];outer:for(;;){if(typeof e!=`object`||!e){if(!t(e))return!1}else{let t=e,i=n.get(t);if(i===!1)return!1;if(i===void 0){let e=Array.isArray(t);if(!e){let e=Object.getPrototypeOf(t);if(e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null)return!1}n.set(t,!1),r.push({value:t,keys:e?t.length:Object.keys(t),index:0})}}for(;r.length>0;){let t=r[r.length-1],i=t.keys;if(typeof i==`number`){if(t.index<i){e=t.value[t.index++];continue outer}}else if(t.index<i.length){e=t.value[i[t.index++]];continue outer}n.set(t.value,!0),r.pop()}return!0}}function os(e){return as(e,rs)}var ss=new Zi([],()=>(e,t,n)=>os(e)?A:b(new P(t,e,n)),{representation:{id:`effect/schema/Json`,payload:null},expected:`JSON value`,toCodecJson:()=>void 0,toCodecStringTree:()=>ds}),cs=new V(ss,Oi()),ls=new V(new W([new ga(!1,[],[ss]),new ka([],[new Oa(U,ss)])]),Oi());function us(e){return as(e,is)}var ds=new V(new Zi([],()=>(e,t,n)=>us(e)?A:b(new P(t,e,n)),{expected:`StringTree`,toCodecStringTree:()=>void 0}),Oi()),fs=(e,t,n)=>e===A?n(t):x(e,n);function ps(e){if(e._tag===`Middleware`)return(t,n,r)=>ms(t===A?e.decode(O(Cr(n)),r):e.decode(it(t,Cr),r));let t=e.decode;switch(t._tag){case`Passthrough`:return(e,t)=>e===A?O(t):e;case`Transform`:{let e=e=>e===D?k:O(t.transform(e));return(t,n)=>fs(t,n,e)}case`TransformOptional`:{let e=e=>wr(t.transform(Cr(e)));return(t,n)=>fs(t,n,e)}case`TransformEffect`:return(e,n,r)=>fs(e,n,e=>e===D?k:t.transform(e,r));case`TransformOptionalEffect`:return(e,n,r)=>fs(e,n,e=>ms(t.transform(Cr(e),r)))}}var ms=e=>x(e,wr),hs=(e,t,n,r)=>lt(r,r=>ht(()=>nt(r,r=>new kr(e,r,t,n))));function gs(e,t){let n=ps(e.link.transformation),r;return(i,a)=>{if(i===D)return k;if(e.isConstructed(i))return A;let o=(r??=t(e.link.to))(i,a);return n(o,i,a)}}function _s(e,t){let n=e.context.constructorDefault;return(r,i)=>{if(r!==D&&r!==void 0)return t(r,i);let a=n;if(y(a)&&a._tag===`Success`){let e=t(a[p],i);return e===A?a:e}return x(hs(e,r,i,a),e=>{let n=t(e,i);return n===A?O(e):n})}}function vs(e,t){let n=t(e);return e.context?.constructorDefault===void 0?n:_s(e,n)}function ys(e,t,n,r,i){if(e._tag===`Declaration`)for(let n of e.typeParameters)t(n);let a=n?ns(e):void 0,o=a?gs(a,t):r??e.getParser(t,n),s=e.checks,c=e.encoding,l=c?.map(e=>ps(e.transformation)),u=e.encodingChecks;if(!c&&!s&&!u)return o;let d,f=(t,n)=>{let r=o(t,n);if(u&&!n.disableChecks){if(y(r)){if(r._tag===`Success`){let i=r===A?t:r[p];if(t!==D&&i!==D){let i=Y(u,t,void 0,e,n);i&&(r=b(new N(e,i,t,n)))}}}else r=S(r,r=>{if(t!==D&&r!==D){let r=Y(u,t,void 0,e,n);if(r)return b(new N(e,r,t,n))}return C(r)})}if(s&&!n.disableChecks){if(y(r)){if(r._tag===`Success`){let i=r===A?t:r[p];if(i===D)return r;let a=Y(s,i,void 0,e,n);a&&(r=b(new N(e,a,i,n)))}}else r=S(r,t=>{if(t!==D){let r=Y(s,t,void 0,e,n);if(r)return b(new N(e,r,t,n))}return C(t)})}return r},m=i===void 0?f:i(f);return c?(n,r)=>{let i=d??=c.map(e=>t(e.to)),a=n,o=i[i.length-1](n,r);for(let e=c.length-1;e>=0;e--)if(o=l[e](o,a,r),e!==0){let t=i[e-1];o._tag===`Success`?(a=o[p],o=t(a,r)):o=x(o,e=>{let n=t(e,r);return n===A?O(e):n})}if(o._tag===`Success`){let e=o[p],t=m(e,r);return t===A?o:t}return o=hs(e,n,r,o),x(o,e=>{let t=m(e,r);return t===A?O(e):t})}:m}var bs=Symbol(),xs=new WeakMap,Ss=e=>Es(e).parser,Cs=e=>Es(e).makeEffect,ws=e=>vs(e,Cs),Ts=class{ast;constructor(e){this.ast=e}get decodeEffect(){return this.cachedDecodeEffect??=ys(this.ast,Ss)}get parser(){return this.decodeEffect}get makeEffect(){return this.cachedMakeEffect??=ys(this.ast,Cs,ws)}};function Es(e){let t=xs.get(e);if(t!==void 0)return t;let n=new Ts(e);return xs.set(e,n),n}function Ds(e){let t=e.ast,n;return(e,r)=>(n??=Hs(Ys,K(t)))(e,r?.disableChecks?r?.parseOptions?{...r.parseOptions,disableChecks:!0}:{disableChecks:!0}:r?.parseOptions)}function Os(e){let t=Ds(e);return(e,n)=>{let r=dt(t(e,n));return w(r)?tt(r.value):(Zr(r.cause,`Option adapter can only return none for schema issues`),ke())}}function ks(e){return qs(K(e.ast))}function As(e){return Ms(e.ast)}function js(e){{let t=Us(Bs(e));return e=>{let n=t(e,Ji);return w(n)?!0:(Zr(n.cause,`Type guard adapter can only return false for schema issues`),!1)}}}function Ms(e){let t=K(e),n=e=>(n=js(t),n(e));return e=>n(e)}function Ns(e,t){let n=Bs(e.ast);return t===void 0?n:(e,r)=>n(e,Rs(t,r))}function Ps(e,t){return Ws(Ns(e,t))}var Fs=Ps;function Is(e,t){return Gs(Ns(e,t))}function Ls(e,t){let n=Bs(q(e.ast));return t===void 0?n:(e,r)=>n(e,Rs(t,r))}var Rs=(e,t)=>t?{...e,...t}:e,zs=e=>e===D?b(new F):C(e);function Bs(e){return Hs(Js,e)}function Vs(e,t){return e===A?C(t):y(e)?e[p]===D?zs(D):e:x(e,zs)}function Hs(e,t){let n;return(r,i)=>{let a=(n??=e(t))(r,i??Ji);return a===A?C(r):y(a)?a[p]===D?zs(D):a:x(a,zs)}}function Us(e){return(t,n)=>dt(e(t,n))}function Ws(e){let t=Us(e);return(e,n)=>{let r=t(e,n);return w(r)?tt(r.value):(Zr(r.cause,`Option adapter can only return none for schema issues`),ke())}}function Gs(e){let t=Us(e);return(e,n)=>{let r=t(e,n);return w(r)?oe(r.value):Ce(Zr(r.cause,`Result adapter can only return schema issues`))}}function Ks(e,t){let n=dt(e);if(w(n))return n.value;let r=Zr(n.cause,t);throw Error(`Schema validation failed`,{cause:r})}function qs(e){let t,n;return(r,i)=>{t??=Es(e);let a=i?.disableChecks?i.parseOptions?{...i.parseOptions,disableChecks:!0}:{disableChecks:!0}:i?.parseOptions??Ji,o=t.make;if(o!==void 0&&r!==D){let e;try{e=o(r,a)}catch(e){throw Zr(Ge(e),`Constructor adapter can only throw schema issues`),e}if(e!==bs&&e!==D)return e}return Ks(Vs((n??=t.makeEffect)(r,a),r),`Constructor adapter can only throw schema issues`)}}var Js=e=>Es(e).parser,Ys=e=>Es(e).makeEffect,Xs=`~effect/Schema/Schema`,Zs=Symbol(),Qs={[Xs]:Xs,get make(){let e=ks(this);return Object.defineProperty(this,"make",{value:e,enumerable:!0}),e},get makeEffect(){let e=Ds(this);return Object.defineProperty(this,"makeEffect",{value:e,enumerable:!0}),e},get makeOption(){let e=Os(this);return Object.defineProperty(this,"makeOption",{value:e,enumerable:!0}),e},pipe(){return ae(this,arguments)},annotate(e){return this.rebuild(ho(this.ast,e))},annotateKey(e){return this.rebuild(Eo(this.ast,e))},check(...e){return this.rebuild(_o(this.ast,e))},rebuild(e){return $s(e,this[Zs])}};function $s(e,t){function n(){}let r=Object.setPrototypeOf(n,Qs);return t&&(Object.hasOwn(t,`name`)||Object.hasOwn(t,`length`)||Object.hasOwn(t,`__proto__`))?Object.defineProperties(r,Object.getOwnPropertyDescriptors({...t})):Object.assign(r,t),r[Zs]=t,r.ast=e,r}function ec(e){return $s(tc(e.ast),{schema:e})}var tc=So(e=>{let t=oc(e,tc),n=e.context;return t===e||n===void 0?t:xo(t,nc(n))});function nc(e){return e.constructorDefault===void 0?e:new Yi(e.isOptional,e.isMutable,void 0,e.annotations)}function rc(e){if(e.propertySignatures.some(e=>typeof e.name!=`string`))throw new globalThis.Error(`Objects property names must be strings`,{cause:e})}function ic(e){return t=>{let n=[...t].sort((t,n)=>e(Ro(t))-e(Ro(n)));return n.some((e,n)=>e!==t[n])?n:t}}var ac=ic(e=>{switch(e._tag){case`BigInt`:case`Symbol`:case`UniqueSymbol`:return 0;default:return 1}});function oc(e,t){switch(e._tag){case`Declaration`:{let n=e.annotations?.toCodecJson??e.annotations?.toCodec;if(!u(n))return G(e,[cs]);let r=n(e.typeParameters.map(e=>$s(Ro(e))));return r===void 0?e:G(e,[vo(r,t)])}case`Unknown`:return G(e,[cs]);case`ObjectKeyword`:return G(e,[ls]);case`Undefined`:case`Void`:case`Literal`:case`Number`:return e.toCodecJson();case`UniqueSymbol`:case`Symbol`:case`BigInt`:return e.toCodecStringTree();case`Objects`:return rc(e),e.recur(t,Wo);case`Union`:{let n=ac(e.types);return n===e.types?e.recur(t):new W(n,e.options,e.annotations,e.checks,e.encoding,e.context,e.encodingChecks).recur(t)}case`Arrays`:case`Suspend`:return e.recur(t)}return e}var sc=g(2,(e,t)=>dc(e,(e,n)=>uc(t,e)?[e,n]:void 0)),cc=g(2,(e,t)=>dc(e,(e,n)=>uc(t,e)?void 0:[e,n])),lc=e=>e;function uc(e,t){return e.some(e=>e===t||typeof e==`number`&&String(e)===t)}function dc(e,t){let n={};for(let r of Reflect.ownKeys(e)){if(!Object.prototype.propertyIsEnumerable.call(e,r))continue;let i=t(r,e[r]);if(i){let[e,t]=i;_(n,e,t)}}return n}var fc=`~effect/Schema/SchemaError`;function pc(t){return e(t,`~effect/Schema/SchemaError`)&&t[`~effect/Schema/SchemaError`]===`~effect/Schema/SchemaError`}({...h}),{...h},{...h},{...h},{...h},{...h},{...h},{...h};var mc=Xs;function hc(){return(e,t,n)=>X(new Zi(e.map(Ia),e=>t(e.map(e=>X(e))),n))}function gc(e,t){return hc()([],()=>(t,n,r)=>e(t)?C(t):b(new P(n,t,r)),t)}var _c=class extends bt(`SchemaError`){[fc]=fc;constructor(e){let t=be();de(0);try{super({issue:e})}finally{de(t)}}get message(){return qr(this.issue)}toJSON(){return{_tag:this._tag,message:this.message}}[Se](){return this.toJSON()}toString(){return`SchemaError(${this.message})`}};function vc(e){return pc(e)}function yc(e){return y(e)?bc(e):lt(e,e=>ht(()=>nt(e,e=>new _c(e))))}function bc(e){return w(e)?e:ot(nt(e.cause,e=>new _c(e)))}function xc(e,t){let n;for(let r of e.reasons){if(!qe(r)||!vc(r.error))throw new globalThis.Error(t,{cause:e});n??=r.error}if(n===void 0)throw new globalThis.Error(t,{cause:e});return n}function Sc(e){let t=dt(e);if(w(t))return t.value;throw xc(t.cause,`Sync adapter can only throw schema errors`)}var Cc=As;function wc(e,t){let n=Ns(e,t);return(e,t)=>yc(n(e,t))}var Tc=wc,Ec=Ps,Dc=Fs;function Oc(e,t){let n=Is(e,t);return(e,t)=>me(n(e,t),e=>new _c(e))}var kc=Oc;function Ac(e,t){let n=wc(e,t);return(e,t)=>Sc(n(e,t))}var jc=Ac;function Mc(e,t){let n=Ls(e,t);return(e,t)=>yc(n(e,t))}var Nc=Mc,X=$s;function Pc(t){return e(t,mc)&&t[mc]===mc}var Fc=lc(e=>X(Do(e.ast),{schema:e})),Ic=lc(e=>{let t=al(e);return X(ko(e.ast),{schema:t})}),Lc=lc(e=>X(K(e.ast),{schema:e}));function Rc(e){let t=X(new la(e),{literal:e,transform(n){return t.pipe(Q(Rc(n),{decode:L(()=>n),encode:L(()=>e)}))}});return t}function zc(e){return e.map(e=>Pc(e)?e.ast:new la(e))}function Bc(e){return X(new sa(zc(e)),{parts:e})}var Vc=X(na),Hc=X(ra),Uc=X(Qi),Wc=X(ta),Z=X(U),Gc=X(pa),Kc=X(ma),qc=X(ha),Jc=X(ia);function Yc(e,t){return X(e,{fields:t,mapFields(e,t){let n=e(this.fields);return Yc(Fa(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function Xc(e){return Yc(Fa(e,void 0),e)}function Zc(e,t){return n=>{let r=Xc({...Nt(n.fields,Lc),...e});return n.pipe(Q(r,Ci({decode:n=>{let r={...n};for(let i in e){let e=t[i],a=e(n);rt(a)&&_(r,i,a.value)}return r},encode:t=>{let n={...t};for(let t in e)delete n[t];return n}})))}}function Qc(e,t){return X(No(e.ast,t.ast),{key:e,value:t})}function $c(e,t){return X(Ra(e.ast,t.map(Ia)),{schema:e,records:t})}var el=lc(e=>X(new ga(!1,[],[e.ast]),{value:e}));function tl(e,t){return X(e,{members:t,mapMembers(e,t){let n=e(this.members);return tl(La(n,this.ast.options,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function nl(e,t){return tl(La(e,t,void 0),e)}function rl(e){let t=e.map(Rc);return X(La(t,void 0,void 0),{literals:e,members:t,mapMembers(e){return nl(e(this.members))},pick(e){return rl(e)},transform(e){return nl(t.map((t,n)=>t.transform(e[n])))}})}var il=lc(e=>nl([e,Uc])),al=lc(e=>nl([e,Wc]));function ol(e){return X(new to(()=>e().ast))}function sl(...e){return t=>t.check(...e)}function cl(e){return t=>X(t.ast,{schema:t,identifier:e})}function ll(e){return t=>X(Co(t.ast,new vi(e,ge)),{schema:t})}function ul(e){return dl(e)}function dl(e){return t=>ll(ct(e))(t)}function Q(e,t){return n=>X(jo(n.ast,e.ast,t?xi(t):Oi()),{from:n,to:e})}function fl(){return(e,t)=>bl()(e,{decode:t,encode:ti})}function pl(e){return t=>Q(Lc(t),e)(t)}function ml(e){return t=>X(Ao(t.ast,e),{schema:t})}function hl(e){return Rc(e).pipe(ml(C(e)))}function gl(e,t){return Xc({_tag:hl(e),...t})}function _l(e){return t=>{let n={},r=[],i=new Set,a={};return o(t),Object.assign(t,{tag:e,cases:n,discriminants:r,isAnyOf:t=>n=>t.includes(n[e]),guards:a,match:s,matchOrElse:c});function o(t){let s=t.ast;if(Ki(s)&&`members`in t&&globalThis.Array.isArray(t.members)&&t.members.every(Pc))return t.members.forEach(o);let c=Va(s);if(c.length>0){let o=c.find(t=>t.key===e)?.literal;if(m(o)){let e=typeof o==`number`?globalThis.String(o):o;if(i.has(e))throw new globalThis.Error(`Duplicate discriminant: ${globalThis.String(o)}`);i.add(e),r.push(o),_(n,o,t),_(a,o,As(Lc(t)));return}}throw new globalThis.Error(`No literal or unique symbol found`)}function s(){if(arguments.length===1){let t=arguments[0];return function(n){let r=n[e];return(Object.hasOwn(t,r)?t[r]:void 0)(n)}}let t=arguments[0],n=arguments[1],r=t[e];return(Object.hasOwn(n,r)?n[r]:void 0)(t)}function c(){if(arguments.length===2){let t=arguments[0],n=arguments[1];return function(r){let i=r[e];return(Object.hasOwn(t,i)?t[i]??n:n)(r)}}let t=arguments[0],n=arguments[1],r=arguments[2],i=t[e];return(Object.hasOwn(n,i)?n[i]??r:r)(t)}}}function vl(e){let t={},n=[];for(let r of Object.keys(e)){let i=gl(r,e[r]);_(t,r,i),n.push(i)}let r=nl(n),{tag:i,guards:a,isAnyOf:o,match:s,matchOrElse:c}=_l(`_tag`)(r);return X(r.ast,{tag:i,cases:t,isAnyOf:o,guards:a,match:s,matchOrElse:c})}function yl(e,t){return gc(t=>t instanceof e,t)}function bl(){return(e,t)=>new V(e.ast,xi(t))}var $=io,xl=`^\\S[\\s\\S]*\\S$|^\\S$|^$`;function Sl(e){let t=new globalThis.RegExp(xl);return $(e=>e.trim()===e,{expected:`a string with no leading or trailing whitespace`,representation:{id:`effect/schema/isTrimmed`,payload:null},toJsonSchema:()=>({pattern:t.source}),toCode:()=>({runtime:`Schema.isTrimmed()`}),arbitraryConstraint:{patterns:[{source:xl,flags:``}]},...e})}function Cl(e,t){let n=e.source,r=e.flags,i=/^[dg]*uy?$/.test(r),a=r===``?`new RegExp(${v(n)})`:`new RegExp(${v(n)}, ${v(r)})`;return co(e,{toJsonSchema:()=>i?{pattern:r.endsWith(`y`)?`^(?:${n})`:n}:[{},!0],toCode:()=>({runtime:`Schema.isPattern(${a})`}),...t})}function wl(e){return Jo({toCode:()=>({runtime:`Schema.isStringFinite()`}),...e})}var Tl=X(oo),El=ao;function Dl(e){let t=Je(e.order),n=e.formatter??v;return(r,i)=>$(e=>t(e,r),{expected:`a value greater than or equal to ${n(r)}`,arbitraryConstraint:{order:e.order,minimum:r},...e.annotate?.(r),...i})}function Ol(e){let t=Ie(e.order),n=e.formatter??v;return(r,i)=>$(e=>t(e,r),{expected:`a value less than ${n(r)}`,arbitraryConstraint:{order:e.order,maximum:r,exclusiveMaximum:!0},...e.annotate?.(r),...i})}function kl(e){let t=Le(e.order),n=e.formatter??v;return(r,i)=>$(e=>t(e,r),{expected:`a value less than or equal to ${n(r)}`,arbitraryConstraint:{order:e.order,maximum:r},...e.annotate?.(r),...i})}function Al(e){let t=Je(e.order),n=Oe(e.order),r=Le(e.order),i=Ie(e.order),a=e.formatter??v;return(o,s)=>{let c=o.exclusiveMinimum?n:t,l=o.exclusiveMaximum?i:r;return $(e=>c(e,o.minimum)&&l(e,o.maximum),{expected:`a value between ${a(o.minimum)}${o.exclusiveMinimum?` (excluded)`:``} and ${a(o.maximum)}${o.exclusiveMaximum?` (excluded)`:``}`,arbitraryConstraint:{order:e.order,minimum:o.minimum,maximum:o.maximum,...o.exclusiveMinimum&&{exclusiveMinimum:!0},...o.exclusiveMaximum&&{exclusiveMaximum:!0}},...e.annotate?.(o),...s})}}function jl(e){if(!globalThis.Number.isFinite(e))throw new globalThis.RangeError(`Expected a finite number, got ${v(e)}`);return e}var Ml=Dl({order:ze,annotate:e=>({representation:{id:`effect/schema/isGreaterThanOrEqualTo`,payload:{minimum:jl(e)}},toJsonSchema:()=>({minimum:e}),toCode:()=>({runtime:`Schema.isGreaterThanOrEqualTo(${v(e)})`})})}),Nl=Ol({order:ze,annotate:e=>({representation:{id:`effect/schema/isLessThan`,payload:{exclusiveMaximum:jl(e)}},toJsonSchema:()=>({exclusiveMaximum:e}),toCode:()=>({runtime:`Schema.isLessThan(${v(e)})`})})}),Pl=kl({order:ze,annotate:e=>({representation:{id:`effect/schema/isLessThanOrEqualTo`,payload:{maximum:jl(e)}},toJsonSchema:()=>({maximum:e}),toCode:()=>({runtime:`Schema.isLessThanOrEqualTo(${v(e)})`})})}),Fl=Al({order:ze,annotate:e=>{let t=e.exclusiveMinimum?!0:void 0,n=e.exclusiveMaximum?!0:void 0;return{representation:{id:`effect/schema/isBetween`,payload:{minimum:jl(e.minimum),maximum:jl(e.maximum),...t&&{exclusiveMinimum:t},...n&&{exclusiveMaximum:n}}},toJsonSchema:()=>({[t?`exclusiveMinimum`:`minimum`]:e.minimum,[n?`exclusiveMaximum`:`maximum`]:e.maximum}),toCode:()=>({runtime:`Schema.isBetween({ minimum: ${v(e.minimum)}, maximum: ${v(e.maximum)}, exclusiveMinimum: ${v(t)}, exclusiveMaximum: ${v(n)} })`})}}});function Il(e){return $(e=>globalThis.Number.isSafeInteger(e),{expected:`an integer`,representation:{id:`effect/schema/isInt`,payload:null},toJsonSchema:()=>({type:`integer`,minimum:globalThis.Number.MIN_SAFE_INTEGER,maximum:globalThis.Number.MAX_SAFE_INTEGER}),toCode:()=>({runtime:`Schema.isInt()`}),arbitraryConstraint:{number:`integer`},...e})}var Ll=Gc.check(Il()),Rl=Ll.check(Ml(0));function zl(e,t){return e=Kl(e),Bl(e,Math.ceil(e/2),t)}function Bl(e,t,n){return $(t=>t.length>=e,{expected:`a value with a length of at least ${e}`,representation:{id:`effect/schema/isMinLength`,payload:{minLength:e}},toJsonSchema:({type:n})=>n===`string`?e<=1?{minLength:t}:[{minLength:t},!0]:n===`array`?{minItems:e}:n===void 0?[{minLength:t,minItems:e},!0]:[{},!0],toCode:()=>({runtime:`Schema.isMinLength(${e})`}),[yr]:!0,arbitraryConstraint:{minLength:e},...n})}function Vl(e){return Bl(1,1,e)}function Hl(e,t){return e=Kl(e),$(t=>t.length<=e,{expected:`a value with a length of at most ${e}`,representation:{id:`effect/schema/isMaxLength`,payload:{maxLength:e}},toJsonSchema:({type:t})=>t===`string`?e===0?{maxLength:e}:[{maxLength:e},!0]:t===`array`?{maxItems:e}:t===void 0?[{maxLength:e,maxItems:e},!0]:[{},!0],toCode:()=>({runtime:`Schema.isMaxLength(${e})`}),[yr]:!0,arbitraryConstraint:{maxLength:e},...t})}function Ul(e,t){return e=Kl(e),$(t=>Gl(t,e)>=e,{expected:`a string with at least ${e} code points`,representation:{id:`effect/schema/isMinCodePoints`,payload:{minCodePoints:e}},toJsonSchema:()=>({minLength:e}),toCode:()=>({runtime:`Schema.isMinCodePoints(${e})`}),arbitraryConstraint:{minCodePoints:e},...t})}function Wl(e,t){return e=Kl(e),$(t=>Gl(t,e+1)<=e,{expected:`a string with at most ${e} code points`,representation:{id:`effect/schema/isMaxCodePoints`,payload:{maxCodePoints:e}},toJsonSchema:()=>({maxLength:e}),toCode:()=>({runtime:`Schema.isMaxCodePoints(${e})`}),arbitraryConstraint:{maxCodePoints:e},...t})}function Gl(e,t){if(t===0)return 0;let n=0;for(let r of e)if(++n>=t)break;return n}function Kl(e){if(!globalThis.Number.isFinite(e))throw new globalThis.RangeError(`Expected a finite number, got ${e}`);return Math.max(0,Math.floor(e))}var ql=Z.check(Vl()),Jl=e=>+(e?.includeStack===!0)|(e?.excludeCause===!0?2:0),Yl=e=>{switch(e){case 0:return;case 1:return{includeStack:!0};case 2:return{excludeCause:!0};case 3:return{includeStack:!0,excludeCause:!0}}},Xl=[];function Zl(e){let t=Jl(e),n=Xl[t];if(n!==void 0)return n;let r=Tu.pipe(Q(Hc,Li(Yl(t))));return Xl[t]=r,r}function Ql(e){return X(hc()([e],([e])=>{let t=el(e);return(e,n,r)=>e instanceof globalThis.Set?st(Ns(t)([...e],r),{onSuccess:e=>new globalThis.Set(e),onFailure:t=>Mr(n,`values`,t,e,r)}):b(new P(n,e,r))},{representation:{id:`effect/schema/ReadonlySet`,payload:null},toCode:({typeParameters:e})=>({runtime:`Schema.ReadonlySet(${e[0].runtime})`,Type:`globalThis.ReadonlySet<${e[0].Type}>`}),expected:`ReadonlySet`,toCodec:([e])=>bl()(el(e),Ci({decode:e=>new globalThis.Set(e),encode:e=>[...e.values()]}))}).ast,{value:e})}globalThis.RegExp,globalThis.URL;var $l=Z.annotate({expected:`a string that will be decoded as JSON`,contentMediaType:`application/json`});function eu(e,t){return $l.pipe(Q(e,zi(t)))}globalThis.File,globalThis.FormData,globalThis.URLSearchParams;var tu=Z.annotate({expected:`a string that will be decoded as a finite number`}).pipe(Q(Tl,ki)),nu=X(es).pipe(Q(qc,Ai)),ru=Z.check(Sl()),iu=Z.annotate({expected:`a string that will be decoded as a trimmed string`}).pipe(Q(ru,Ti())),au=Z.annotate({expected:`a base64 encoded string that will be decoded as Uint8Array`,format:`byte`,contentEncoding:`base64`}),ou=yl(globalThis.Uint8Array,{representation:{id:`effect/schema/Uint8Array`,payload:null},toCode:()=>({runtime:`Schema.Uint8Array`,Type:`globalThis.Uint8Array`}),expected:`Uint8Array`,toCodecJson:()=>bl()(au,Ri)}),su=au.pipe(Q(ou,Ri)),cu=Si({decode:(e,t)=>He(Dt(e),{onNone:()=>b(new F({expected:`a valid UTC DateTime string`},e,t)),onSome:e=>C(Ct(e))}),encode:e=>C(Et(e))}),lu=-864e13,uu=864e13;function du(e,t,n){let r=Math.max(t,e?.minimum===void 0?t:e.minimum.epochMilliseconds+ +(e.exclusiveMinimum===!0)),i=Math.min(n,e?.maximum===void 0?n:e.maximum.epochMilliseconds-+(e.exclusiveMaximum===!0));return r<=i?[r,i]:[t,n]}function fu(e,t){return Ll.check(Fl({minimum:e,maximum:t}))}var pu=gc(e=>wt(e)&&Tt(e),{representation:{id:`effect/schema/DateTimeUtc`,payload:null},toCode:()=>({runtime:`Schema.DateTimeUtc`,Type:`DateTime.Utc`,importDeclarations:[`import * as DateTime from "effect/DateTime"`]}),expected:`DateTime.Utc`,toCodecArbitrary:({constraint:e})=>{let[t,n]=du(e,lu,uu);return fl()(fu(t,n),L(St))},toCodecJson:()=>bl()(Z,cu),toFormatter:()=>e=>e.toString()}),mu=Z.annotate({expected:`a string that will be decoded as a DateTime.Utc`}).pipe(Q(pu,cu)),hu=globalThis.Symbol.for(`immer-draftable`),gu={};function _u(e,t,n,r,i){let a=bu(n,t,r),o=yu(t),s=class extends e{constructor(...[e,t]){let r=t?.[`~payload`],i=r?.token===gu?r.value:n.make(e??{},t);super(i,{...t,disableChecks:!0,"~payload":{token:gu,value:i}})}static[mc]=mc;get[o](){return o}static[hu]=!0;static identifier=t;static fields=n.fields;static get ast(){return a(this).ast}static pipe(){return ae(this,arguments)}static rebuild(e){return a(this).rebuild(e)}static make(e,t){return ks(a(this))(e??{},t)}static makeOption(e,t){return Os(a(this))(e??{},t)}static makeEffect(e,t){return a(this).makeEffect(e??{},t)}static annotate(e){return this.rebuild(ho(this.ast,e))}static annotateKey(e){return this.rebuild(Eo(this.ast,e))}static check(...e){return this.rebuild(_o(this.ast,e))}static extend(e){return(t,r)=>{let a=xu(t)?t:Xc(t),o={...n.fields,...a.fields},s=Fa(o,n.ast.checks,{identifier:e});return _u(this,e,Yc(_o(s,a.ast.checks),o),r,i)}}static mapFields(e,t){return n.mapFields(e,t)}};return i!==void 0&&Object.assign(s.prototype,i(t)),s}function vu(e){return new z(L(t=>new e(t,{"~payload":{token:gu,value:t}})),ri())}function yu(e){return`~effect/Schema/Class/${e}`}function bu(t,n,r){let i;return a=>{if(i!==void 0)return i;let o=yu(n),s=t=>t instanceof a||e(t,o),c=vu(a);return i=Q(X(new Zi([t.ast],()=>(e,t,n)=>s(e)?C(e):b(new P(t,e,n)),{identifier:n,[xr]:([e])=>({isConstructed:s,link:new V(e,c)}),toCodec:([e])=>new V(e.ast,c),toEquivalence:([e])=>e,toFormatter:([e])=>t=>`${a.identifier}(${e(t)})`,[br]:Va(t.ast),...r})),c)(t)}}function xu(e){return Pc(e)}var Su=e=>(t,n)=>{let r=xu(t)?t:Xc(t);return _u(le,e,r,n,e=>({name:e}))},Cu=e=>(t,n,r)=>{let i=xu(n)?n.mapFields(e=>({_tag:hl(t),...e}),{unsafePreserveChecks:!0}):gl(t,n);return Su(e??t)(i,r)},wu=ec,Tu=X(ho(ss,{toCode:()=>({runtime:`Schema.Json`,Type:`Schema.Json`})})),Eu=`https://assets.stakek.it`,Du={appName:`Yield.xyz`,appIcon:`${Eu}/stakekit/sk-icon_320x320.png`,appUrl:`https://yield.xyz`,currency:`USD`,walletConnectV2:{projectId:`10a5257c04d1d3097ff768a139c95f50`},appPrefix:`sk-widget`,env:{apiUrl:`https://api.stakek.it/`,borrowApiUrl:`https://borrow.yield.xyz`,yieldsApiUrl:`https://api.yield.xyz`,isTestMode:!1,isDevMode:!1,forceAddress:void 0},assetsUrl:Eu,zerion:{tracking:`2cbed59baa70c46f7cadef7b05eb1bc3`,iconsByAddress:`https://token-icons.s3.amazonaws.com/`,iconsByNetwork:`https://chain-icons.s3.amazonaws.com/`}},Ou=e=>`${Du.assetsUrl}/networks/${e}.svg`,ku=e=>Ou(e),Au=e=>`${Du.assetsUrl}/tokens/${e}.svg`,ju={bitget:`${Du.assetsUrl}/widget/bitget.png`,ledgerLogo:`${Du.assetsUrl}/widget/ledger-logo.svg`,wcLogo:`${Du.assetsUrl}/widget/wc-logo.svg`};export{Ac as $,qt as $t,Xc as A,ei as At,cl as B,lr as Bt,il as C,sc as Ct,Qc as D,wi as Dt,Ql as E,Ci as Et,iu as F,Ar as Ft,Tc as G,Bn as Gt,sl as H,Yn as Ht,su as I,Vr as It,jc as J,Wn as Jt,Dc as K,Vn as Kt,al as L,_r as Lt,Cu as M,L as Mt,vl as N,R as Nt,_c as O,_i as Ot,Bc as P,ai as Pt,Oc as Q,Cn as Qt,nl as R,ar as Rt,Uc as S,cc as St,Jc as T,Ei as Tt,gc as U,Jn as Ut,ul as V,or as Vt,pl as W,zn as Wt,wc as X,Hn as Xt,Q as Y,Gn as Yt,Ec as Z,Un as Zt,Rc as _,Ic as _t,Du as a,Pt as an,El as at,Vc as b,wu as bt,nu as c,Nl as ct,mu as d,Hl as dt,Kt as en,Nc as et,Zl as f,Ul as ft,Tu as g,$ as gt,Ll as h,wl as ht,Ou as i,kt as in,Cc as it,$c as j,ii as jt,Z as k,gi as kt,Kc as l,Pl as lt,tu as m,Cl as mt,Au as n,Gt as nn,eu as nt,el as o,jt as on,Ml as ot,Tl as p,zl as pt,kc as q,qn as qt,ju as r,Ht as rn,yl as rt,qc as s,Lt as sn,Il as st,ku as t,Ut as tn,Zc as tt,pu as u,Wl as ut,rl as v,Fc as vt,Gc as w,Ns as wt,ql as x,Lc as xt,Rl as y,ol as yt,Hc as z,er as zt};
|
|
2
|
+
`);n=Yr(e)??I(Sr(e.ast),e);break;default:n=zr(e)}return t?`${n}\n at ${t}`:n}function Yr(e){if(e._tag===`Pointer`)return;if(e._tag===`Encoding`)return Yr(e.issue);let t=(e._tag===`Filter`?e.filter.annotations:`annotations`in e?e.annotations:e.ast.annotations)?.[e._tag===`MissingKey`?`messageMissingKey`:e._tag===`UnexpectedKey`?`messageUnexpectedKey`:`message`];if(typeof t==`string`)return t}function Xr(e){let t;for(let n of e.reasons){if(!qe(n)||!Er(n.error))return;t??=n.error}return t}function Zr(e,t){let n=Xr(e);if(n===void 0)throw Error(t,{cause:e});return n}var Qr=e=>Object.assign(Object.create(xe),e);function $r(e){return oi((t,n)=>b(e(t,n)))}function ei(e){return $r((t,n)=>{let r={message:e(t)};return rt(t)?new Nr(r,t.value,n):new Nr(r)})}var ti=ei(()=>`Encoding is not supported`),ni=Qr({_tag:`Passthrough`});function ri(){return ni}function ii(){return ni}function L(e){return Qr({_tag:`Transform`,transform:e})}function R(e){return Qr({_tag:`TransformEffect`,transform:e})}function ai(e){return Qr({_tag:`TransformOptional`,transform:e})}function oi(e){return Qr({_tag:`TransformOptionalEffect`,transform:e})}function si(){return L(globalThis.String)}function ci(){return L(globalThis.Number)}function li(){return L(globalThis.BigInt)}function ui(){return L(Wt)}function di(){return L(Ht)}function fi(e){return R((t,n)=>vt({try:()=>JSON.parse(t,e?.reviver),catch:()=>new F({expected:`a valid JSON string`},t,n)}))}function pi(e){return R((t,n)=>vt({try:()=>{let n=JSON.stringify(t,e?.replacer,e?.space);if(n===void 0)throw TypeError(`Value cannot be represented as JSON`);return n},catch:()=>new F({expected:`a JSON-serializable value`},t,n)}))}function mi(){return L(Kt)}function hi(){return R((e,t)=>at(gt(qt(e)),()=>new F({expected:`a valid Base64 string`},e,t)))}function gi(){return L(encodeURIComponent)}function _i(){return R((e,t)=>{try{return C(globalThis.decodeURIComponent(e))}catch{return b(new F({expected:`a valid URI component`},e,t))}})}var vi=class extends _e{_tag=`Middleware`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new vi(this.encode,this.decode)}},yi=`~effect/SchemaTransformation/Transformation`,z=class extends _e{[yi]=yi;_tag=`Transformation`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new z(this.encode,this.decode)}};function bi(t){return e(t,yi)&&t[yi]===yi}var xi=e=>bi(e)?e:new z(e.decode,e.encode);function Si(e){return new z(R(e.decode),R(e.encode))}function Ci(e){return new z(L(e.decode),L(e.encode))}function wi(e){return new z(ai(e.decode),ai(e.encode))}function Ti(){return new z(ui(),ri())}function Ei(){return new z(di(),ri())}var Di=new z(ri(),ri());function Oi(){return Di}var ki=new z(ci(),si()),Ai=new z(li(),si()),ji=e=>ee(e)&&typeof e.message==`string`,Mi=e=>{let t=Object.hasOwn(e,`cause`)?Error(e.message,{cause:Ii(e.cause)}):Error(e.message);return typeof e.name==`string`&&e.name!==`Error`&&(t.name=e.name),typeof e.stack==`string`&&(t.stack=e.stack),t},Ni=e=>{try{let t=se(e);return t===void 0?v(e):JSON.parse(t)}catch{return v(e)}},Pi=(e,t,n)=>{let r={name:e.name,message:typeof e.message==`string`?e.message:``};return t?.includeStack&&typeof e.stack==`string`&&(r.stack=e.stack),!t?.excludeCause&&e.cause!==void 0&&(r.cause=n(e.cause)),r},Fi=e=>{let t=new WeakSet,n=r=>{if(l(r)){if(t.has(r))return`[Circular]`;t.add(r);let i=Pi(r,e,n);return t.delete(r),i}return Ni(r)};return n},Ii=e=>ji(e)?Mi(e):e,Li=e=>Ci({decode:Ii,encode:Fi(e)}),Ri=new z(hi(),mi());function zi(e){return new z(fi(e??{}),pi(e))}function B(e){return t=>t._tag===e}var Bi=B(`Declaration`),Vi=B(`Never`),Hi=B(`Literal`),Ui=B(`UniqueSymbol`),Wi=B(`Arrays`),Gi=B(`Objects`),Ki=B(`Union`),qi=B(`Suspend`),V=class{to;transformation;constructor(e,t){this.to=e,this.transformation=t}},Ji={},Yi=class{isOptional;isMutable;constructorDefault;annotations;constructor(e,t,n=void 0,r=void 0){this.isOptional=e,this.isMutable=t,this.constructorDefault=n,this.annotations=r}},Xi=`~effect/Schema`,H=class{[Xi]=Xi;annotations;checks;encoding;context;constructor(e=void 0,t=void 0,n=void 0,r=void 0){this.annotations=e,this.checks=t,this.encoding=n,this.context=r}toString(){return`<${this._tag}>`}},Zi=class extends H{_tag=`Declaration`;typeParameters;run;encodingChecks;encodingRun;constructor(e,t,n,r,i,a,o,s){super(n,r,i,a),this.typeParameters=e,this.run=t,this.encodingChecks=o,this.encodingRun=s}getParser(){let e;return(t,n)=>t===D?k:(e??=this.run(this.typeParameters))(t,this,n)}_rebuild(e,t,n,r,i){let a=To(this.typeParameters,e);return a===this.typeParameters&&t===this.checks&&n===this.encodingChecks&&r===this.run&&i===this.encodingRun?this:new Zi(a,r,this.annotations,t,void 0,this.context,n,i)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks,this.run,this.encodingRun)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks,this.encodingRun??this.run,this.run)}getExpected(){let e=this.annotations?.expected;return typeof e==`string`?e:`<Declaration>`}},Qi=new class extends H{_tag=`Null`;getParser(){return Vo(this,null)}getExpected(){return`null`}},$i=class extends H{_tag=`Undefined`;getParser(){return Vo(this,void 0)}toCodecJson(){return G(this,[ea])}getExpected(){return`undefined`}},ea=new V(Qi,new z(L(()=>void 0),L(()=>null))),ta=new $i,na=new class extends H{_tag=`Never`;getParser(){return J(this,o)}getExpected(){return`never`}},ra=new class extends H{_tag=`Unknown`;getParser(){return J(this,s)}getExpected(){return`unknown`}},ia=new class extends H{_tag=`ObjectKeyword`;getParser(){return J(this,a)}getExpected(){return`object | array | function`}};function aa(e){return typeof e==`number`?`parts[${e}]`:e}function oa(e,t,n){if(n.has(e))return!0;if(e.encoding)throw Error(`TemplateLiteral parts cannot have an encoding at ${aa(t)}`);let r;switch(e._tag){case`String`:case`Number`:case`BigInt`:r=!0;break;case`Literal`:r=!e.checks;break;case`TemplateLiteral`:{let i=aa(t);r=!e.checks&&e.parts.every((e,t)=>oa(e,`${i}.parts[${t}]`,n));break}case`Union`:{let i=aa(t);r=!e.checks&&e.types.every((e,t)=>oa(e,`${i}.types[${t}]`,n));break}default:return!1}return r&&n.add(e),r}var sa=class extends H{_tag=`TemplateLiteral`;parts;encodedParts;literals;suffixLengths;constructor(e,t,n,r,i){super(t,n,r,i);let a=[],o=[],s=new Set;for(let t=0;t<e.length;t++){let n=e[t];if(!oa(n,t,s))throw Error(`Invalid TemplateLiteral part ${n._tag}`);a.push(n),o.push(n._tag===`Literal`?globalThis.String(n.literal):void 0)}let c=Array(a.length+1);c[a.length]=0;for(let e=a.length-1;e>=0;e--)c[e]=c[e+1]+(o[e]?.length??0);this.parts=e,this.encodedParts=a,this.literals=o,this.suffixLengths=c}getParser(e){let t=e(jo(U,new ga(!1,this.parts.map(Go),[]),ca(this)));return(e,n)=>{if(e===D)return k;let r=t(e,n);return r._tag===`Success`?A:st(r,{onSuccess:()=>e,onFailure:t=>new N(this,[t],e,n)})}}getExpected(){return`string`}matchPart(e,t){return Ho(this,e,t)===void 0?void 0:e}};function ca(e){return new z(R((t,n)=>{let r=Ho(e,t,n);return r?C(r):b(new F({expected:`a string matching template literal parts`},t,n))}),L(e=>e.join(``)))}var la=class extends H{_tag=`Literal`;literal;constructor(e,t,n,r,i){if(super(t,n,r,i),typeof e==`number`&&!globalThis.Number.isFinite(e))throw Error(`A numeric literal must be finite, got ${v(e)}`);this.literal=e}getParser(){return Vo(this,this.literal)}matchPart(e,t){return e===globalThis.String(this.literal)?this.literal:void 0}toCodecJson(){return typeof this.literal==`bigint`?ua(this):this}toCodecStringTree(){return typeof this.literal==`string`?this:ua(this)}getExpected(){return typeof this.literal==`string`?JSON.stringify(this.literal):globalThis.String(this.literal)}};function ua(e){let t=globalThis.String(e.literal);return G(e,[new V(new la(t),new z(L(()=>e.literal),L(()=>t)))])}var U=new class extends H{_tag=`String`;getParser(){return J(this,te)}matchPart(e,t){let n=this.checks;return n&&!t.disableChecks&&Y(n,e,void 0,this,t)?void 0:e}getExpected(){return`string`}},da=class extends H{_tag=`Number`;getParser(){return J(this,t)}matchKey(e,t){return this._match(qo,e,t)}matchPart(e,t){return this._match(Ko,e,t)}_match(e,t,n){if(!e.test(t))return;let r=globalThis.Number(t);return n.disableChecks||!this.checks?r:Y(this.checks,r,void 0,this,n)?void 0:r}toCodecJson(){return this.checks&&(fa(this.checks,`effect/schema/isFinite`)||fa(this.checks,`effect/schema/isInt`))?this:G(this,[so])}toCodecStringTree(){return this.toCodecJson()===this?G(this,[Xo]):G(this,[Zo])}getExpected(){return`number`}};function fa(e,t){return e.some(e=>e.annotations?.representation?.id===t||e._tag===`FilterGroup`&&fa(e.checks,t))}var pa=new da,ma=new class extends H{_tag=`Boolean`;getParser(){return J(this,c)}getExpected(){return`boolean`}},ha=new class extends H{_tag=`BigInt`;getParser(){return J(this,fe)}matchPart(e,t){if(!Qo.test(e))return;let n=globalThis.BigInt(e);return t.disableChecks||!this.checks?n:Y(this.checks,n,void 0,this,t)?void 0:n}toCodecStringTree(){return G(this,[ts])}getExpected(){return`bigint`}},ga=class extends H{_tag=`Arrays`;isMutable;elements;rest;encodingChecks;constructor(e,t,n,r,i,a,o,s){super(r,i,a,o),this.isMutable=e,this.elements=t,this.rest=n,this.encodingChecks=s;let c=!1;for(let e=0;e<t.length;e++)if(Po(t[e]))c=!0;else if(c)throw Error(`A required element cannot follow an optional element. ts(1257)`);if(c&&n.length>1)throw Error(`A required element cannot follow an optional element. ts(1257)`);for(let e=1;e<n.length;e++)if(Po(n[e]))throw Error(`An optional element cannot follow a rest element. ts(1266)`)}getParser(e,t=e){let n=this,r,i,a=n.elements.length,o=Math.max(0,n.rest.length-1);function s(e,t){return t<a?r[t]:t>=e?i[t-e+1]:i[0]}let c=e=>{let{input:t,len:r,options:i}=e;if(n.rest.length===0&&r>a)for(let o=a;o<r;o++){let r=new jr(n,t[o],i),a=new M([o],r);if(i.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return b(new N(n,[a],t,i))}return e.issues?b(new N(n,e.issues,t,i)):O(e.output)},l=(e,t)=>{let r=e.length,i={ast:n,getParser:s,input:e,len:r,tailThreshold:Math.max(a,r-o),output:new globalThis.Array(r),issues:void 0,options:t},u=n.rest.length===0?a:Math.max(r,a+o),d=t.concurrency===void 0?1:Qe(t.concurrency),f=d===1?ya(i,e,0,u):ba(i,e,{concurrency:d,end:u});if(!f)return c(i);if(y(f))return x(f,()=>c(i));let p=!0;return xt(()=>p?(p=!1,S(f,()=>c(i))):l(e,t))};return(e,a)=>{if(e===D)return k;try{return Array.isArray(e)?(r||(r=n.elements.map(e=>({ast:e,parser:t(e)})),i=n.rest.map(e=>({ast:e,parser:t(e)}))),l(e,a)):b(new P(n,e,a))}catch(e){return ut(e)}}}_rebuild(e,t,n){let r=To(this.elements,e),i=To(this.rest,e);return r===this.elements&&i===this.rest&&t===this.checks&&n===this.encodingChecks?this:new ga(this.isMutable,r,i,this.annotations,t,void 0,this.context,n)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}getExpected(){return`array`}};function _a(e,t,n,r){if(n._tag===`Failure`)return xa(e,e.ast,r,n);let i=n===A?t:n[p];if(i!==D)e.output[r]=i;else{let t=e.getParser(e.tailThreshold,r);if(Po(t.ast))return;let n=new M([r],new Ar(t.ast.context?.annotations));if(e.options.errors===`all`)e.issues?e.issues.push(n):e.issues=[n];else return ft(new N(e.ast,[n],e.input,e.options))}}var va={onItem(e,t,n){let r=n<e.len?t:D;return e.getParser(e.tailThreshold,n).parser(r,e.options)},step:_a},ya=Be()(va),ba=Re()(va),xa=(e,t,n,r)=>{if(r.cause.reasons.length===0)return r;let i=Xr(r.cause);if(i===void 0)return ot(nt(r.cause,r=>new N(t,[new M([n],r)],e.input,e.options)));let a=new M([n],i);if(e.options.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return ft(new N(t,[a],e.input,e.options))},Sa=`[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?`;function Ca(e,t,n=Ji){let r,i;function a(t){switch(t._tag){case`String`:case`TemplateLiteral`:return(r??=Object.keys(e)).filter(e=>t.matchPart(e,n)!==void 0);case`Number`:return(r??=Object.keys(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Symbol`:return(i??=Object.getOwnPropertySymbols(e)).filter(r=>Object.prototype.propertyIsEnumerable.call(e,r)&&t.matchKey(r,n)!==void 0);case`Union`:return[...new Set(t.types.flatMap(a))];default:return[]}}return a(Uo(Ro(t)))}var wa=class{name;type;constructor(e,t){this.name=e,this.type=t}};function Ta(e){switch(e._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return e.types.every(Ta);default:return!1}}function Ea(e){let t=mo(e);switch(t._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return t.types.every(Ea);default:return!1}}function Da(e){return Ta(e)&&Ea(e)}var Oa=class{parameter;type;constructor(e,t){if(!Da(e))throw Error(`Invalid index signature parameter ${e._tag}`);if(this.parameter=e,this.type=t,Po(t)&&!Bo(t))throw Error("Cannot use `Schema.optionalKey` with index signatures, use `Schema.optional` instead.")}},ka=class extends H{_tag=`Objects`;propertySignatures;indexSignatures;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.propertySignatures=e,this.indexSignatures=t,this.encodingChecks=o}getParser(e,t=e){let n=this,r=n.propertySignatures.length,i=n.indexSignatures.length;if(!r&&!i)return J(n,d);let a,o,s=()=>(a||(a=n.propertySignatures.map(e=>({parser:t(e.type),name:e.name,type:e.type})),o=i?n.indexSignatures.map(n=>({is:n,parserKey:e(Uo(n.parameter)),parserValue:t(n.type)})):void 0),a),c=()=>{let e=new Set(n.propertySignatures.map(e=>typeof e.name==`number`?globalThis.String(e.name):e.name)),t=(t,i,a,o,s)=>{if(s._tag===`Failure`)return xa(t,n,i,s)??yt;let c=s===A?o:s[p];if(a!==D&&c!==D){if(r&&(e.has(i)||e.has(typeof a==`number`?globalThis.String(a):a)))return yt;_(t.out,a,c)}return yt},c=(e,r,i,a)=>{if(!a){let t=i.parserKey(r,e.options);if(!y(t))return S(pt(t),t=>c(e,r,i,t));a=t}if(a._tag===`Failure`)return xa(e,n,r,a)??yt;let o=a===A?r:a[p],s=e.input[r],l=i.parserValue(s,e.options);return y(l)?t(e,r,o,s,l):S(pt(l),n=>t(e,r,o,s,n))},l=(e,n,r)=>{let i=e.input[n],a=r.parserValue(i,e.options);return y(a)?t(e,n,n,i,a):S(pt(a),r=>t(e,n,n,i,r))},u=i?Re()({onItem:(e,[t,n])=>n.is.parameter===U?l(e,t,n):c(e,t,n),step:(e,t,n)=>n._tag===`Failure`?n:void 0}):void 0;return mt(function*(t,d){if(t===D)return D;if(typeof t!=`object`||!t||Array.isArray(t))return yield*b(new P(n,t,d));s();let f=t,p={},m={ast:n,input:f,out:p,issues:void 0,options:d},ee=d.errors===`all`,te=d.onExcessProperty===`error`,ne=d.concurrency===void 0?1:Qe(d.concurrency),h=i&&te?n.indexSignatures.map(e=>Ca(f,e.parameter,d)):void 0;if(te){let r=h?new Set(e):e;if(h)for(let e of h)for(let t of e)r.add(t);let i=Reflect.ownKeys(f);for(let e=0;e<i.length;e++){let a=i[e];if(!r.has(a)&&Object.prototype.propertyIsEnumerable.call(f,a)){let e=new jr(n,f[a],d),r=new M([a],e);if(ee){m.issues?m.issues.push(r):m.issues=[r];continue}return yield*b(new N(n,[r],t,d))}}}if(r){let e=ne===1?Ma(m,a):Na(m,a,{concurrency:ne});e&&(yield*e)}if(i&&ne===1)for(let e=0;e<i;e++){let t=o[e],n=t.is.parameter===U?l:c,r=h?.[e]??(t.is.parameter===U?Object.keys(f):Ca(f,t.is.parameter,d));for(let e=0;e<r.length;e++){let i=n(m,r[e],t);if(!y(i))yield*i;else if(i._tag===`Failure`)return yield*i}}else if(u){let e=Ye();for(let t=0;t<i;t++){let n=o[t],r=h?.[t]??(n.is.parameter===U?Object.keys(f):Ca(f,n.is.parameter,d));for(let t=0;t<r.length;t++)e.push([r[t],n])}let t=u(m,e,{concurrency:ne});t&&(yield*t)}return m.issues?yield*b(new N(n,m.issues,t,d)):p})};if(i)return c();let l,u=(e,t,n)=>{let r=a[t];return S(pt(n),n=>{let i=Aa(e,r,n);if(i)return i;let o=()=>O(e.out),s=Ma(e,a.slice(t+1));return s?x(s,o):o()})};return(e,t)=>{if(e===D)return k;if(t.errors===`all`||t.onExcessProperty!==void 0||t.concurrency!==void 0&&Qe(t.concurrency)!==1)return(l??=c())(e,t);if(typeof e!=`object`||!e||Array.isArray(e))return b(new P(n,e,t));let r=s(),i=e,a={},o={ast:n,input:i,out:a,issues:void 0,options:t};try{for(let e=0;e<r.length;e++){let n=r[e],s=n.name,c=Ga(i,s),l=c?i[s]:D,d=n.parser(l,t);if(!y(d))return u(o,e,d);if(d===A){c&&_(a,s,l);continue}let f=Aa(o,n,d);if(f)return f}}catch(e){return ut(e)}return O(a)}}_rebuild(e,t,n,r){let i=To(this.propertySignatures,t=>{let n=e(t.type);return n===t.type?t:new wa(t.name,n)}),a=To(this.indexSignatures,n=>{let r=t(n.parameter),i=e(n.type);return r===n.parameter&&i===n.type?n:new Oa(r,i)});return i===this.propertySignatures&&a===this.indexSignatures&&n===this.checks&&r===this.encodingChecks?this:new ka(i,a,this.annotations,n,void 0,this.context,r)}flip(e){return this._rebuild(e,e,this.encodingChecks,this.checks)}recur(e,t=e){return this._rebuild(e,t,this.checks,this.encodingChecks)}getExpected(){return this.propertySignatures.length===0&&this.indexSignatures.length===0?`object | array`:`object`}};function Aa(e,t,n){if(n._tag===`Failure`)return xa(e,e.ast,t.name,n);if(n===A)return;let r=n[p];if(r!==D){_(e.out,t.name,r);return}if(delete e.out[t.name],!Po(t.type)){let n=new M([t.name],new Ar(t.type.context?.annotations));if(e.options.errors===`all`){e.issues?e.issues.push(n):e.issues=[n];return}return ft(new N(e.ast,[n],e.input,e.options))}}var ja={onItem(e,t){if(!Ga(e.input,t.name))return t.parser(D,e.options);let n=e.input[t.name];return _(e.out,t.name,n),t.parser(n,e.options)},step:Aa},Ma=Be()(ja),Na=Re()(ja);function Pa(e,t){return e?t?[...e,...t]:e:t}function Fa(e,t,n){return new ka(Reflect.ownKeys(e).map(t=>new wa(t,e[t].ast)),[],n,t)}function Ia(e){return e.ast}function La(e,t,n){return new W(e.map(Ia),t,void 0,n)}function Ra(e,t){if(e.encoding||t.some(e=>e.encoding))throw Error(`StructWithRest does not support encodings`);let n=e.propertySignatures,r=e.indexSignatures,i=e.checks;for(let e of t){for(let t of e.propertySignatures)if(n.some(e=>e.name===t.name))throw Error(`Duplicate identifier: ${JSON.stringify(t.name)}. ts(2300)`);n=n.concat(e.propertySignatures),r=r.concat(e.indexSignatures),i=Pa(i,e.checks)}return new ka(n,r,void 0,i)}var za=ue(e=>{for(;;){if(qi(e))return ra;let t=e.encoding;if(!t)return e.recur?.(za,ge)??e;if(t.some(e=>e.transformation._tag===`Middleware`&&e.transformation.decode!==ge))return ra;e=t[t.length-1].to}});function Ba(e){switch(e._tag){case`Null`:return[`null`];case`Undefined`:return[`undefined`];case`String`:case`TemplateLiteral`:return[`string`];case`Number`:return[`number`];case`Boolean`:return[`boolean`];case`Symbol`:case`UniqueSymbol`:return[`symbol`];case`BigInt`:return[`bigint`];case`Arrays`:return[`array`];case`ObjectKeyword`:return[`object`,`array`,`function`];case`Objects`:return e.propertySignatures.length||e.indexSignatures.length?[`object`]:[`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`];case`Enum`:return Array.from(new Set(e.enums.map(([,e])=>typeof e)));case`Literal`:return[typeof e.literal];case`Union`:return Array.from(new Set(e.types.flatMap(Ba)));default:return[`null`,`undefined`,`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`]}}function Va(e){switch(e._tag){default:return[];case`Declaration`:{let t=e.annotations?.[br];return Array.isArray(t)?t:[]}case`Objects`:return e.propertySignatures.flatMap(e=>{let t=e.type;if(!Po(t)){if(Hi(t))return[{key:e.name,literal:t.literal}];if(Ui(t))return[{key:e.name,literal:t.symbol}]}return[]});case`Arrays`:return e.elements.flatMap((e,t)=>{if(!Po(e)){if(Hi(e))return[{key:t,literal:e.literal}];if(Ui(e))return[{key:t,literal:e.symbol}]}return[]});case`Union`:{if(e.types.length===0)return[];let t=e.types.map(e=>Va(za(e)));return t[0].filter(e=>t.every(t=>t.some(t=>t.key===e.key&&t.literal===e.literal)))}case`Suspend`:return Va(e.thunk())}}var Ha=new WeakMap,Ua=Object.freeze([]),Wa=e=>e===null?`null`:Array.isArray(e)?`array`:typeof e,Ga=(e,t)=>t===`__proto__`?Object.hasOwn(e,t):t in e;function Ka(e){let t=Ha.get(e);if(t)return t;let n,r=0,i,o,s=!0,c=[];for(let t=0;t<e.length;t++){let a=e[t],l=za(a);if(Vi(l))continue;if(Hi(l)||Ui(l)){o??=new Map;let e=Hi(l)?l.literal:l.symbol;c[t]=e;let n=o.get(e);n||o.set(e,n=[]),n.push(t)}else s=!1;let u=Va(l);if(u.length){n??=new Map,r++;for(let{key:e,literal:r}of u){let i=n.get(e);i||n.set(e,i=[new Map,new Set]),i[1].add(t);let a=i[0].get(r);a||i[0].set(r,a=new Set),a.add(t)}}else{i??={};let e=Ba(l);for(let n of e)(i[n]??=[]).push(t)}}let l={},u=e=>l[e]??=Object.freeze(i?.[e]??Ua);if(s&&o)o.forEach(Object.freeze),t=e=>o.get(e)??Ua;else if(n?.size===1&&!i){let[r,[i]]=n.entries().next().value,o=new Map;for(let[e,t]of i)o.set(e,Object.freeze(Array.from(t)));let s=Object.freeze(e.map((e,t)=>t));t=(e,t)=>{if(a(e)){let n=Ga(e,r)?e[r]:void 0;if(n!==void 0)return o.get(n)??Ua;if(t)return s}return Ua}}else if(n){let e;for(let t of n)(!e||t[1][0].size>e[1][0].size)&&t[1][1].size===r&&(e=t);t=(t,r)=>{let o=Wa(t);if(!a(t))return u(o);let s=new Set(i?.[o]),c;if(e){let[n,[i]]=e,a=Ga(t,n),l=a?t[n]:void 0;if(a&&(!r||l!==void 0)){let e=i.get(l);if(!e)return u(o);for(let t of e)s.add(t);c=n}}if(c===void 0)for(let[e,[i,a]]of n){let n=Ga(t,e),o=n?t[e]:void 0;if(n&&(!r||o!==void 0)){let e=i.get(o);if(e)for(let t of e)s.add(t)}else if(r)for(let e of a)s.add(e)}for(let[e,[i,a]]of n){if(e===c)continue;let n=Ga(t,e),o=n?t[e]:void 0;if(n&&(!r||o!==void 0)){let e=i.get(o);for(let t of s)a.has(t)&&!e?.has(t)&&s.delete(t)}}return Array.from(s).sort((e,t)=>e-t)}}else t=e=>{let t=u(Wa(e));return o?t.filter(t=>c[t]===void 0||c[t]===e):t};return Ha.set(e,t),t}var W=class extends H{_tag=`Union`;types;options;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.types=e,this.options=t,this.encodingChecks=o}getParser(e,t){let n=this,r=t!==void 0,i=[],a=t=>i[t]??=e(n.types[t]),o;return(e,t)=>{if(e===D)return k;let i=(o??=Ka(n.types))(e,r);if(i.length===0)return b(new Pr(n,[],e,t));if(i.length===1){let r=a(i[0])(e,t);return r._tag===`Success`?r:y(r)?qa(n,r.cause,e,t):Ja(n,r,e,t)}return Ya(n,a,i,e,t)}}_rebuild(e,t,n){let r=To(this.types,e);return r===this.types&&t===this.checks&&n===this.encodingChecks?this:new W(r,this.options,this.annotations,t,void 0,this.context,n)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}matchPart(e,t){for(let n of this.types){let r=n.matchPart(e,t);if(r!==void 0)return r}}getExpected(e){let t=this.annotations?.expected;if(typeof t==`string`)return t;if(this.types.length===0)return`never`;let n=this.types.map(t=>{let n=Ro(t);switch(n._tag){case`Arrays`:{let t=n.elements.filter(Hi);if(t.length>0)return`${$a(n.isMutable)}[ ${t.map(t=>e(t)+eo(t.context?.isOptional)).join(`, `)}, ... ]`;break}case`Objects`:{let t=n.propertySignatures.filter(e=>Hi(e.type));if(t.length>0)return`{ ${t.map(t=>`${$a(t.type.context?.isMutable)}${he(t.name)}${eo(t.type.context?.isOptional)}: ${e(t.type)}`).join(`, `)}, ... }`;break}}return e(n)});return Array.from(new Set(n)).join(` | `)}};function qa(e,t,n,r){let i=Xr(t);return i?ft(new Pr(e,[i],n,r)):ot(t)}function Ja(e,t,n,r){return lt(t,t=>qa(e,t,n,r))}function Ya(e,t,n,r,i){let a={ast:e,parser:t,input:r,out:void 0,successes:e.options?.mode===`oneOf`?[]:void 0,issues:void 0,options:i},o=Za(a,n);if(!o)return a.out?a.out:b(new Pr(e,a.issues??[],r,i));if(y(o))return Xa(o,a);let s=!0;return xt(()=>s?(s=!1,Xa(o,a)):Ya(e,t,n,r,i))}function Xa(e,t){return x(e,e=>t.out===A?C(t.input):t.out?t.out:b(new Pr(t.ast,t.issues??[],t.input,t.options)))}var Za=Be()({onItem(e,t){return e.parser(t)(e.input,e.options)},step(e,t,n){if(n._tag===`Failure`){let t=Xr(n.cause);if(t===void 0)return n;e.issues?e.issues.push(t):e.issues=[t]}else{if(e.out&&e.successes)return e.successes.push(e.ast.types[t]),ft(new Fr(e.ast,e.successes,e.input,e.options));if(e.out=n,e.successes)e.successes.push(e.ast.types[t]);else return yt}}}),Qa=new W([new la(`Infinity`),new la(`-Infinity`),new la(`NaN`)]);function $a(e){return e?``:`readonly `}function eo(e){return e?`?`:``}var to=class extends H{_tag=`Suspend`;thunk;constructor(e,t,n,r,i){if(n)throw Error(`Cannot add checks to Suspend`);super(t,void 0,r,i);let a;this.thunk=()=>a??=e()}getParser(e){let t;return(n,r)=>(t??=e(this.thunk()))(n,r)}recur(e){return new to(()=>e(this.thunk()),this.annotations,void 0,void 0,this.context)}getExpected(e){return e(this.thunk())}},no=class extends _e{_tag=`Filter`;run;annotations;aborted;constructor(e,t=void 0,n=!1){super(),this.run=e,this.annotations=t,this.aborted=n}annotate(e){return new no(this.run,{...this.annotations,...e},this.aborted)}abort(){return new no(this.run,this.annotations,!0)}and(e,t){return new ro([this,e],t)}},ro=class extends _e{_tag=`FilterGroup`;checks;annotations;constructor(e,t=void 0){super(),this.checks=e,this.annotations=t}annotate(e){return new ro(this.checks,{...this.annotations,...e})}and(e,t){return new ro([this,e],t)}};function io(e,t,n=!1){return new no((t,n,r)=>Rr(n,e(t,n,r),t,r),t,n)}function ao(e){return io(e=>globalThis.Number.isFinite(e),{expected:`a finite number`,representation:{id:`effect/schema/isFinite`,payload:null},toJsonSchema:()=>({type:`number`}),toCode:()=>({runtime:`Schema.isFinite()`}),arbitraryConstraint:{number:`finite`},...e})}var oo=_o(pa,[ao()]),so=new V(new W([oo,Qa]),new z(ci(),L(e=>globalThis.Number.isFinite(e)?e:globalThis.String(e))));function co(e,t){let n=new globalThis.RegExp(e),r={source:n.source,flags:n.flags};return io(e=>(n.lastIndex=0,n.test(e)),{expected:`a string matching the RegExp ${r.source}`,representation:{id:`effect/schema/isPattern`,payload:r},toJsonSchema:()=>[{},!0],arbitraryConstraint:{patterns:[r]},...t})}var lo=new WeakMap;function uo(e,t){let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,t);return Reflect.ownKeys(t).every(e=>e===`context`||e===`encoding`)&&lo.set(n,fo(e)),n}function fo(e){let t=lo.get(e);if(t!==void 0)return t;if(e.encoding===void 0)return e;let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,{encoding:void 0});return lo.set(e,n),n}function G(e,t){return e.encoding===t?e:uo(e,{encoding:t})}function po(e,t){if(e.context===t)return e;let n=fo(e);return n.context===t&&n.encoding===e.encoding?n:uo(e,{context:t})}function mo(e){return e.encoding?mo(e.encoding[e.encoding.length-1].to):e}function ho(e,t){if(e.checks){let n=e.checks[e.checks.length-1];return go(e,Ae(e.checks.slice(0,-1),n.annotate(t)))}return uo(e,{annotations:{...e.annotations,...t}})}function go(e,t){if(e._tag===`Suspend`&&t)throw Error(`Cannot add checks to Suspend`);return e.checks===t?e:uo(e,{checks:t})}function _o(e,t){return go(e,Pa(e.checks,t))}function vo(e,t){let n=t(e.to);return n===e.to?e:new V(n,e.transformation)}function yo(e,t){let n=e,r=n[n.length-1],i=vo(r,t);return i===r?e:Ae(e.slice(0,e.length-1),i)}function bo(e){return t=>t.encoding?G(t,yo(t.encoding,e)):t}function xo(e,t){return bo(e=>po(e,t))(e)}function So(e,t){function n(r){if(r.encoding){let e=r.encoding[r.encoding.length-1];return t?.stopAt?.(e)?r:G(r,yo(r.encoding,n))}return e(r)}return ue(n)}function Co(e,t){return wo(e,t,K(e))}function wo(e,t,n){let r=new V(e,t);return G(n,n.encoding?[...n.encoding,r]:[r])}function To(e,t){let n;for(let r=0;r<e.length;r++){let i=e[r],a=t(i);if(n)n[r]=a;else if(a!==i){n=Array(e.length);for(let t=0;t<r;t++)n[t]=e[t];n[r]=a}}return n??e}function Eo(e,t){return po(e,e.context?new Yi(e.context.isOptional,e.context.isMutable,e.context.constructorDefault,{...e.context.annotations,...t}):new Yi(!1,!1,void 0,t))}var Do=ue(e=>Oo(po(e,e.context?e.context.isOptional===!1?new Yi(!0,e.context.isMutable,e.context.constructorDefault,e.context.annotations):e.context:new Yi(!0,!1)))),Oo=bo(Do),ko=ye(e=>Do(new W([e,ta])));function Ao(e,t){return po(e,e.context?new Yi(e.context.isOptional,e.context.isMutable,t,e.context.annotations):new Yi(!1,!1,t))}function jo(e,t,n){return wo(e,n,t)}function Mo(e){let t=[],n=[];function r(e){switch(e._tag){case`Literal`:m(e.literal)&&!t.includes(e.literal)&&t.push(e.literal);return;case`UniqueSymbol`:t.includes(e.symbol)||t.push(e.symbol);return;case`Never`:return;case`Union`:for(let t=0;t<e.types.length;t++)r(e.types[t]);return;default:n.push(e)}}return r(e),{literals:t,parameters:n}}function No(e,t){let{literals:n,parameters:r}=Mo(e);return new ka(n.map(e=>new wa(e,t)),r.map(e=>new Oa(e,t)))}function Po(e){return e.context?.isOptional??!1}function Fo(e){return e.annotations?.[`~structural`]===!0||e._tag===`FilterGroup`&&e.checks.every(Fo)}function Io(e){function t(e){return Fo(e)?[e]:e._tag===`FilterGroup`?e.checks.flatMap(t):[]}let n=e.flatMap(t);return Ue(n)?n:void 0}function Lo(e){let t=!0;function n(e){return t=t&&!e.encoding&&!qi(e),t&&`recur`in e&&e.recur(n),e}return`recur`in e&&e.recur(n),t}var K=ue(e=>{let t=fo(e);if(t!==e){let n=K(t);return n===t&&e.encoding===void 0?e:po(n,e.context)}let n=`recur`in e?e.recur(K):e;if(`encodingChecks`in n&&n.encodingChecks){let t=Lo(e)?n.encodingChecks:Wi(n)||Gi(n)||Bi(n)&&n.typeParameters.length>0?Io(n.encodingChecks):void 0;return uo(n,{encodingChecks:void 0,checks:Pa(n.checks,t)})}return n}),Ro=ue(e=>K(q(e)));function zo(e,t){let n=t,r=n.length,i=n[r-1],a=[new V(q(G(e,void 0)),n[0].transformation.flip())];for(let e=1;e<r;e++)a.unshift(new V(q(n[e-1].to),n[e].transformation.flip()));let o=q(i.to);return o.encoding?G(o,[...o.encoding,...a]):G(o,a)}var q=ye(e=>{if(e.encoding)return zo(e,e.encoding);let t=fo(e);if(t!==e){let n=q(t);return n===t?e:po(n,e.context)}return`flip`in e?e.flip(q):`recur`in e?e.recur(q):e});function Bo(e){switch(e._tag){case`Undefined`:return!0;case`Union`:return e.types.some(Bo);default:return!1}}function Vo(e,t){let n=t===0?A:O(t);return(r,i)=>r===D?k:r===t?n:b(new P(e,r,i))}function J(e,t){return(n,r)=>n===D?k:t(n)?A:b(new P(e,n,r))}function Ho(e,t,n){let r=e.encodedParts,i=e.literals,a=t.length;for(let e=0;e<i.length;e++){let n=i[e];if(n&&!t.includes(n))return}if(e.suffixLengths[0]>a)return;let o=Array(r.length),s;function c(l,u){if(l===r.length)return u===a;if(s?.has(l*(a+1)+u))return!1;let d=r[l];if(l===r.length-1){let e=t.slice(u);if(d.matchPart(e,n)!==void 0)return o[l]=e,!0}else if(d._tag===`Literal`){let e=i[l];if(t.startsWith(e,u)&&c(l+1,u+e.length))return o[l]=e,!0}else{let r=a-e.suffixLengths[l+1],s=i[l+1],f=s===void 0?r:t.lastIndexOf(s,r);for(;f>=u;){let e=t.slice(u,f);if(d.matchPart(e,n)!==void 0&&c(l+1,f))return o[l]=e,!0;if(f===0)break;f=s===void 0?f-1:t.lastIndexOf(s,f-1)}}return s??=new Set,s.add(l*(a+1)+u),!1}return c(0,0)?o:void 0}var Uo=So(e=>{switch(e._tag){default:return e;case`Number`:return e.toCodecStringTree();case`Union`:return e.recur(Uo)}}),Wo=So(e=>{switch(e._tag){default:return e;case`Symbol`:case`UniqueSymbol`:return e.toCodecStringTree();case`Union`:return e.recur(Wo)}}),Go=So(e=>{switch(e._tag){default:return e;case`Number`:case`Literal`:case`BigInt`:return e.toCodecStringTree();case`Union`:return e.recur(Go)}}),Ko=new globalThis.RegExp(`^${Sa}$`),qo=new globalThis.RegExp(`^(?:${Sa}|Infinity|-Infinity|NaN)$`);function Jo(e){return co(Ko,{expected:`a string representing a finite number`,representation:{id:`effect/schema/isStringFinite`,payload:null},toJsonSchema:()=>({pattern:Ko.source}),...e})}var Yo=_o(U,[Jo()]),Xo=new V(Yo,ki),Zo=new V(new W([Yo,Qa]),ki),Qo=new globalThis.RegExp(`^-?\\d+$`);function $o(e){return co(Qo,{expected:`a string representing a bigint`,representation:{id:`effect/schema/isStringBigInt`,payload:null},toJsonSchema:()=>({pattern:Qo.source}),...e})}var es=_o(U,[$o({expected:`a string representing a bigint`})]),ts=new V(es,Ai);function Y(e,t,n,r,i){for(let a=0;a<e.length;a++){let o=e[a];if(o._tag===`FilterGroup`){if(n=Y(o.checks,t,n,r,i),n&&(i.errors!==`all`||n[n.length-1].filter.aborted))return n}else{let e=o.run(t,r,i);if(e){let r=new Or(o,e,t,i);if(n?n.push(r):n=[r],i.errors!==`all`||o.aborted)return n}}}return n}function ns(e){if(!Bi(e))return;let t=e.annotations?.[xr];return u(t)?t(e.typeParameters):void 0}function rs(e){return e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&globalThis.Number.isFinite(e)}function is(e){return e===void 0||typeof e==`string`}function as(e,t){let n=new WeakMap,r=[];outer:for(;;){if(typeof e!=`object`||!e){if(!t(e))return!1}else{let t=e,i=n.get(t);if(i===!1)return!1;if(i===void 0){let e=Array.isArray(t);if(!e){let e=Object.getPrototypeOf(t);if(e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null)return!1}n.set(t,!1),r.push({value:t,keys:e?t.length:Object.keys(t),index:0})}}for(;r.length>0;){let t=r[r.length-1],i=t.keys;if(typeof i==`number`){if(t.index<i){e=t.value[t.index++];continue outer}}else if(t.index<i.length){e=t.value[i[t.index++]];continue outer}n.set(t.value,!0),r.pop()}return!0}}function os(e){return as(e,rs)}var ss=new Zi([],()=>(e,t,n)=>os(e)?A:b(new P(t,e,n)),{representation:{id:`effect/schema/Json`,payload:null},expected:`JSON value`,toCodecJson:()=>void 0,toCodecStringTree:()=>ds}),cs=new V(ss,Oi()),ls=new V(new W([new ga(!1,[],[ss]),new ka([],[new Oa(U,ss)])]),Oi());function us(e){return as(e,is)}var ds=new V(new Zi([],()=>(e,t,n)=>us(e)?A:b(new P(t,e,n)),{expected:`StringTree`,toCodecStringTree:()=>void 0}),Oi()),fs=(e,t,n)=>e===A?n(t):x(e,n);function ps(e){if(e._tag===`Middleware`)return(t,n,r)=>ms(t===A?e.decode(O(Cr(n)),r):e.decode(it(t,Cr),r));let t=e.decode;switch(t._tag){case`Passthrough`:return(e,t)=>e===A?O(t):e;case`Transform`:{let e=e=>e===D?k:O(t.transform(e));return(t,n)=>fs(t,n,e)}case`TransformOptional`:{let e=e=>wr(t.transform(Cr(e)));return(t,n)=>fs(t,n,e)}case`TransformEffect`:return(e,n,r)=>fs(e,n,e=>e===D?k:t.transform(e,r));case`TransformOptionalEffect`:return(e,n,r)=>fs(e,n,e=>ms(t.transform(Cr(e),r)))}}var ms=e=>x(e,wr),hs=(e,t,n,r)=>lt(r,r=>ht(()=>nt(r,r=>new kr(e,r,t,n))));function gs(e,t){let n=ps(e.link.transformation),r;return(i,a)=>{if(i===D)return k;if(e.isConstructed(i))return A;let o=(r??=t(e.link.to))(i,a);return n(o,i,a)}}function _s(e,t){let n=e.context.constructorDefault;return(r,i)=>{if(r!==D&&r!==void 0)return t(r,i);let a=n;if(y(a)&&a._tag===`Success`){let e=t(a[p],i);return e===A?a:e}return x(hs(e,r,i,a),e=>{let n=t(e,i);return n===A?O(e):n})}}function vs(e,t){let n=t(e);return e.context?.constructorDefault===void 0?n:_s(e,n)}function ys(e,t,n,r,i){if(e._tag===`Declaration`)for(let n of e.typeParameters)t(n);let a=n?ns(e):void 0,o=a?gs(a,t):r??e.getParser(t,n),s=e.checks,c=e.encoding,l=c?.map(e=>ps(e.transformation)),u=e.encodingChecks;if(!c&&!s&&!u)return o;let d,f=(t,n)=>{let r=o(t,n);if(u&&!n.disableChecks){if(y(r)){if(r._tag===`Success`){let i=r===A?t:r[p];if(t!==D&&i!==D){let i=Y(u,t,void 0,e,n);i&&(r=b(new N(e,i,t,n)))}}}else r=S(r,r=>{if(t!==D&&r!==D){let r=Y(u,t,void 0,e,n);if(r)return b(new N(e,r,t,n))}return C(r)})}if(s&&!n.disableChecks){if(y(r)){if(r._tag===`Success`){let i=r===A?t:r[p];if(i===D)return r;let a=Y(s,i,void 0,e,n);a&&(r=b(new N(e,a,i,n)))}}else r=S(r,t=>{if(t!==D){let r=Y(s,t,void 0,e,n);if(r)return b(new N(e,r,t,n))}return C(t)})}return r},m=i===void 0?f:i(f);return c?(n,r)=>{let i=d??=c.map(e=>t(e.to)),a=n,o=i[i.length-1](n,r);for(let e=c.length-1;e>=0;e--)if(o=l[e](o,a,r),e!==0){let t=i[e-1];o._tag===`Success`?(a=o[p],o=t(a,r)):o=x(o,e=>{let n=t(e,r);return n===A?O(e):n})}if(o._tag===`Success`){let e=o[p],t=m(e,r);return t===A?o:t}return o=hs(e,n,r,o),x(o,e=>{let t=m(e,r);return t===A?O(e):t})}:m}var bs=Symbol(),xs=new WeakMap,Ss=e=>Es(e).parser,Cs=e=>Es(e).makeEffect,ws=e=>vs(e,Cs),Ts=class{ast;constructor(e){this.ast=e}get decodeEffect(){return this.cachedDecodeEffect??=ys(this.ast,Ss)}get parser(){return this.decodeEffect}get makeEffect(){return this.cachedMakeEffect??=ys(this.ast,Cs,ws)}};function Es(e){let t=xs.get(e);if(t!==void 0)return t;let n=new Ts(e);return xs.set(e,n),n}function Ds(e){let t=e.ast,n;return(e,r)=>(n??=Hs(Ys,K(t)))(e,r?.disableChecks?r?.parseOptions?{...r.parseOptions,disableChecks:!0}:{disableChecks:!0}:r?.parseOptions)}function Os(e){let t=Ds(e);return(e,n)=>{let r=dt(t(e,n));return w(r)?tt(r.value):(Zr(r.cause,`Option adapter can only return none for schema issues`),ke())}}function ks(e){return qs(K(e.ast))}function As(e){return Ms(e.ast)}function js(e){{let t=Us(Bs(e));return e=>{let n=t(e,Ji);return w(n)?!0:(Zr(n.cause,`Type guard adapter can only return false for schema issues`),!1)}}}function Ms(e){let t=K(e),n=e=>(n=js(t),n(e));return e=>n(e)}function Ns(e,t){let n=Bs(e.ast);return t===void 0?n:(e,r)=>n(e,Rs(t,r))}function Ps(e,t){return Ws(Ns(e,t))}var Fs=Ps;function Is(e,t){return Gs(Ns(e,t))}function Ls(e,t){let n=Bs(q(e.ast));return t===void 0?n:(e,r)=>n(e,Rs(t,r))}var Rs=(e,t)=>t?{...e,...t}:e,zs=e=>e===D?b(new F):C(e);function Bs(e){return Hs(Js,e)}function Vs(e,t){return e===A?C(t):y(e)?e[p]===D?zs(D):e:x(e,zs)}function Hs(e,t){let n;return(r,i)=>{let a=(n??=e(t))(r,i??Ji);return a===A?C(r):y(a)?a[p]===D?zs(D):a:x(a,zs)}}function Us(e){return(t,n)=>dt(e(t,n))}function Ws(e){let t=Us(e);return(e,n)=>{let r=t(e,n);return w(r)?tt(r.value):(Zr(r.cause,`Option adapter can only return none for schema issues`),ke())}}function Gs(e){let t=Us(e);return(e,n)=>{let r=t(e,n);return w(r)?oe(r.value):Ce(Zr(r.cause,`Result adapter can only return schema issues`))}}function Ks(e,t){let n=dt(e);if(w(n))return n.value;let r=Zr(n.cause,t);throw Error(`Schema validation failed`,{cause:r})}function qs(e){let t,n;return(r,i)=>{t??=Es(e);let a=i?.disableChecks?i.parseOptions?{...i.parseOptions,disableChecks:!0}:{disableChecks:!0}:i?.parseOptions??Ji,o=t.make;if(o!==void 0&&r!==D){let e;try{e=o(r,a)}catch(e){throw Zr(Ge(e),`Constructor adapter can only throw schema issues`),e}if(e!==bs&&e!==D)return e}return Ks(Vs((n??=t.makeEffect)(r,a),r),`Constructor adapter can only throw schema issues`)}}var Js=e=>Es(e).parser,Ys=e=>Es(e).makeEffect,Xs=`~effect/Schema/Schema`,Zs=Symbol(),Qs={[Xs]:Xs,get make(){let e=ks(this);return Object.defineProperty(this,"make",{value:e,enumerable:!0}),e},get makeEffect(){let e=Ds(this);return Object.defineProperty(this,"makeEffect",{value:e,enumerable:!0}),e},get makeOption(){let e=Os(this);return Object.defineProperty(this,"makeOption",{value:e,enumerable:!0}),e},pipe(){return ae(this,arguments)},annotate(e){return this.rebuild(ho(this.ast,e))},annotateKey(e){return this.rebuild(Eo(this.ast,e))},check(...e){return this.rebuild(_o(this.ast,e))},rebuild(e){return $s(e,this[Zs])}};function $s(e,t){function n(){}let r=Object.setPrototypeOf(n,Qs);return t&&(Object.hasOwn(t,`name`)||Object.hasOwn(t,`length`)||Object.hasOwn(t,`__proto__`))?Object.defineProperties(r,Object.getOwnPropertyDescriptors({...t})):Object.assign(r,t),r[Zs]=t,r.ast=e,r}function ec(e){return $s(tc(e.ast),{schema:e})}var tc=So(e=>{let t=oc(e,tc),n=e.context;return t===e||n===void 0?t:xo(t,nc(n))});function nc(e){return e.constructorDefault===void 0?e:new Yi(e.isOptional,e.isMutable,void 0,e.annotations)}function rc(e){if(e.propertySignatures.some(e=>typeof e.name!=`string`))throw new globalThis.Error(`Objects property names must be strings`,{cause:e})}function ic(e){return t=>{let n=[...t].sort((t,n)=>e(Ro(t))-e(Ro(n)));return n.some((e,n)=>e!==t[n])?n:t}}var ac=ic(e=>{switch(e._tag){case`BigInt`:case`Symbol`:case`UniqueSymbol`:return 0;default:return 1}});function oc(e,t){switch(e._tag){case`Declaration`:{let n=e.annotations?.toCodecJson??e.annotations?.toCodec;if(!u(n))return G(e,[cs]);let r=n(e.typeParameters.map(e=>$s(Ro(e))));return r===void 0?e:G(e,[vo(r,t)])}case`Unknown`:return G(e,[cs]);case`ObjectKeyword`:return G(e,[ls]);case`Undefined`:case`Void`:case`Literal`:case`Number`:return e.toCodecJson();case`UniqueSymbol`:case`Symbol`:case`BigInt`:return e.toCodecStringTree();case`Objects`:return rc(e),e.recur(t,Wo);case`Union`:{let n=ac(e.types);return n===e.types?e.recur(t):new W(n,e.options,e.annotations,e.checks,e.encoding,e.context,e.encodingChecks).recur(t)}case`Arrays`:case`Suspend`:return e.recur(t)}return e}var sc=g(2,(e,t)=>dc(e,(e,n)=>uc(t,e)?[e,n]:void 0)),cc=g(2,(e,t)=>dc(e,(e,n)=>uc(t,e)?void 0:[e,n])),lc=e=>e;function uc(e,t){return e.some(e=>e===t||typeof e==`number`&&String(e)===t)}function dc(e,t){let n={};for(let r of Reflect.ownKeys(e)){if(!Object.prototype.propertyIsEnumerable.call(e,r))continue;let i=t(r,e[r]);if(i){let[e,t]=i;_(n,e,t)}}return n}var fc=`~effect/Schema/SchemaError`;function pc(t){return e(t,`~effect/Schema/SchemaError`)&&t[`~effect/Schema/SchemaError`]===`~effect/Schema/SchemaError`}({...h}),{...h},{...h},{...h},{...h},{...h},{...h},{...h};var mc=Xs;function hc(){return(e,t,n)=>X(new Zi(e.map(Ia),e=>t(e.map(e=>X(e))),n))}function gc(e,t){return hc()([],()=>(t,n,r)=>e(t)?C(t):b(new P(n,t,r)),t)}var _c=class extends bt(`SchemaError`){[fc]=fc;constructor(e){let t=be();de(0);try{super({issue:e})}finally{de(t)}}get message(){return qr(this.issue)}toJSON(){return{_tag:this._tag,message:this.message}}[Se](){return this.toJSON()}toString(){return`SchemaError(${this.message})`}};function vc(e){return pc(e)}function yc(e){return y(e)?bc(e):lt(e,e=>ht(()=>nt(e,e=>new _c(e))))}function bc(e){return w(e)?e:ot(nt(e.cause,e=>new _c(e)))}function xc(e,t){let n;for(let r of e.reasons){if(!qe(r)||!vc(r.error))throw new globalThis.Error(t,{cause:e});n??=r.error}if(n===void 0)throw new globalThis.Error(t,{cause:e});return n}function Sc(e){let t=dt(e);if(w(t))return t.value;throw xc(t.cause,`Sync adapter can only throw schema errors`)}var Cc=As;function wc(e,t){let n=Ns(e,t);return(e,t)=>yc(n(e,t))}var Tc=wc,Ec=Ps,Dc=Fs;function Oc(e,t){let n=Is(e,t);return(e,t)=>me(n(e,t),e=>new _c(e))}var kc=Oc;function Ac(e,t){let n=wc(e,t);return(e,t)=>Sc(n(e,t))}var jc=Ac;function Mc(e,t){let n=Ls(e,t);return(e,t)=>yc(n(e,t))}var Nc=Mc,X=$s;function Pc(t){return e(t,mc)&&t[mc]===mc}var Fc=lc(e=>X(Do(e.ast),{schema:e})),Ic=lc(e=>{let t=al(e);return X(ko(e.ast),{schema:t})}),Lc=lc(e=>X(K(e.ast),{schema:e}));function Rc(e){let t=X(new la(e),{literal:e,transform(n){return t.pipe(Q(Rc(n),{decode:L(()=>n),encode:L(()=>e)}))}});return t}function zc(e){return e.map(e=>Pc(e)?e.ast:new la(e))}function Bc(e){return X(new sa(zc(e)),{parts:e})}var Vc=X(na),Hc=X(ra),Uc=X(Qi),Wc=X(ta),Z=X(U),Gc=X(pa),Kc=X(ma),qc=X(ha),Jc=X(ia);function Yc(e,t){return X(e,{fields:t,mapFields(e,t){let n=e(this.fields);return Yc(Fa(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function Xc(e){return Yc(Fa(e,void 0),e)}function Zc(e,t){return n=>{let r=Xc({...Nt(n.fields,Lc),...e});return n.pipe(Q(r,Ci({decode:n=>{let r={...n};for(let i in e){let e=t[i],a=e(n);rt(a)&&_(r,i,a.value)}return r},encode:t=>{let n={...t};for(let t in e)delete n[t];return n}})))}}function Qc(e,t){return X(No(e.ast,t.ast),{key:e,value:t})}function $c(e,t){return X(Ra(e.ast,t.map(Ia)),{schema:e,records:t})}var el=lc(e=>X(new ga(!1,[],[e.ast]),{value:e}));function tl(e,t){return X(e,{members:t,mapMembers(e,t){let n=e(this.members);return tl(La(n,this.ast.options,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function nl(e,t){return tl(La(e,t,void 0),e)}function rl(e){let t=e.map(Rc);return X(La(t,void 0,void 0),{literals:e,members:t,mapMembers(e){return nl(e(this.members))},pick(e){return rl(e)},transform(e){return nl(t.map((t,n)=>t.transform(e[n])))}})}var il=lc(e=>nl([e,Uc])),al=lc(e=>nl([e,Wc]));function ol(e){return X(new to(()=>e().ast))}function sl(...e){return t=>t.check(...e)}function cl(e){return t=>X(t.ast,{schema:t,identifier:e})}function ll(e){return t=>X(Co(t.ast,new vi(e,ge)),{schema:t})}function ul(e){return dl(e)}function dl(e){return t=>ll(ct(e))(t)}function Q(e,t){return n=>X(jo(n.ast,e.ast,t?xi(t):Oi()),{from:n,to:e})}function fl(){return(e,t)=>bl()(e,{decode:t,encode:ti})}function pl(e){return t=>Q(Lc(t),e)(t)}function ml(e){return t=>X(Ao(t.ast,e),{schema:t})}function hl(e){return Rc(e).pipe(ml(C(e)))}function gl(e,t){return Xc({_tag:hl(e),...t})}function _l(e){return t=>{let n={},r=[],i=new Set,a={};return o(t),Object.assign(t,{tag:e,cases:n,discriminants:r,isAnyOf:t=>n=>t.includes(n[e]),guards:a,match:s,matchOrElse:c});function o(t){let s=t.ast;if(Ki(s)&&`members`in t&&globalThis.Array.isArray(t.members)&&t.members.every(Pc))return t.members.forEach(o);let c=Va(s);if(c.length>0){let o=c.find(t=>t.key===e)?.literal;if(m(o)){let e=typeof o==`number`?globalThis.String(o):o;if(i.has(e))throw new globalThis.Error(`Duplicate discriminant: ${globalThis.String(o)}`);i.add(e),r.push(o),_(n,o,t),_(a,o,As(Lc(t)));return}}throw new globalThis.Error(`No literal or unique symbol found`)}function s(){if(arguments.length===1){let t=arguments[0];return function(n){let r=n[e];return(Object.hasOwn(t,r)?t[r]:void 0)(n)}}let t=arguments[0],n=arguments[1],r=t[e];return(Object.hasOwn(n,r)?n[r]:void 0)(t)}function c(){if(arguments.length===2){let t=arguments[0],n=arguments[1];return function(r){let i=r[e];return(Object.hasOwn(t,i)?t[i]??n:n)(r)}}let t=arguments[0],n=arguments[1],r=arguments[2],i=t[e];return(Object.hasOwn(n,i)?n[i]??r:r)(t)}}}function vl(e){let t={},n=[];for(let r of Object.keys(e)){let i=gl(r,e[r]);_(t,r,i),n.push(i)}let r=nl(n),{tag:i,guards:a,isAnyOf:o,match:s,matchOrElse:c}=_l(`_tag`)(r);return X(r.ast,{tag:i,cases:t,isAnyOf:o,guards:a,match:s,matchOrElse:c})}function yl(e,t){return gc(t=>t instanceof e,t)}function bl(){return(e,t)=>new V(e.ast,xi(t))}var $=io,xl=`^\\S[\\s\\S]*\\S$|^\\S$|^$`;function Sl(e){let t=new globalThis.RegExp(xl);return $(e=>e.trim()===e,{expected:`a string with no leading or trailing whitespace`,representation:{id:`effect/schema/isTrimmed`,payload:null},toJsonSchema:()=>({pattern:t.source}),toCode:()=>({runtime:`Schema.isTrimmed()`}),arbitraryConstraint:{patterns:[{source:xl,flags:``}]},...e})}function Cl(e,t){let n=e.source,r=e.flags,i=/^[dg]*uy?$/.test(r),a=r===``?`new RegExp(${v(n)})`:`new RegExp(${v(n)}, ${v(r)})`;return co(e,{toJsonSchema:()=>i?{pattern:r.endsWith(`y`)?`^(?:${n})`:n}:[{},!0],toCode:()=>({runtime:`Schema.isPattern(${a})`}),...t})}function wl(e){return Jo({toCode:()=>({runtime:`Schema.isStringFinite()`}),...e})}var Tl=X(oo),El=ao;function Dl(e){let t=Je(e.order),n=e.formatter??v;return(r,i)=>$(e=>t(e,r),{expected:`a value greater than or equal to ${n(r)}`,arbitraryConstraint:{order:e.order,minimum:r},...e.annotate?.(r),...i})}function Ol(e){let t=Ie(e.order),n=e.formatter??v;return(r,i)=>$(e=>t(e,r),{expected:`a value less than ${n(r)}`,arbitraryConstraint:{order:e.order,maximum:r,exclusiveMaximum:!0},...e.annotate?.(r),...i})}function kl(e){let t=Le(e.order),n=e.formatter??v;return(r,i)=>$(e=>t(e,r),{expected:`a value less than or equal to ${n(r)}`,arbitraryConstraint:{order:e.order,maximum:r},...e.annotate?.(r),...i})}function Al(e){let t=Je(e.order),n=Oe(e.order),r=Le(e.order),i=Ie(e.order),a=e.formatter??v;return(o,s)=>{let c=o.exclusiveMinimum?n:t,l=o.exclusiveMaximum?i:r;return $(e=>c(e,o.minimum)&&l(e,o.maximum),{expected:`a value between ${a(o.minimum)}${o.exclusiveMinimum?` (excluded)`:``} and ${a(o.maximum)}${o.exclusiveMaximum?` (excluded)`:``}`,arbitraryConstraint:{order:e.order,minimum:o.minimum,maximum:o.maximum,...o.exclusiveMinimum&&{exclusiveMinimum:!0},...o.exclusiveMaximum&&{exclusiveMaximum:!0}},...e.annotate?.(o),...s})}}function jl(e){if(!globalThis.Number.isFinite(e))throw new globalThis.RangeError(`Expected a finite number, got ${v(e)}`);return e}var Ml=Dl({order:ze,annotate:e=>({representation:{id:`effect/schema/isGreaterThanOrEqualTo`,payload:{minimum:jl(e)}},toJsonSchema:()=>({minimum:e}),toCode:()=>({runtime:`Schema.isGreaterThanOrEqualTo(${v(e)})`})})}),Nl=Ol({order:ze,annotate:e=>({representation:{id:`effect/schema/isLessThan`,payload:{exclusiveMaximum:jl(e)}},toJsonSchema:()=>({exclusiveMaximum:e}),toCode:()=>({runtime:`Schema.isLessThan(${v(e)})`})})}),Pl=kl({order:ze,annotate:e=>({representation:{id:`effect/schema/isLessThanOrEqualTo`,payload:{maximum:jl(e)}},toJsonSchema:()=>({maximum:e}),toCode:()=>({runtime:`Schema.isLessThanOrEqualTo(${v(e)})`})})}),Fl=Al({order:ze,annotate:e=>{let t=e.exclusiveMinimum?!0:void 0,n=e.exclusiveMaximum?!0:void 0;return{representation:{id:`effect/schema/isBetween`,payload:{minimum:jl(e.minimum),maximum:jl(e.maximum),...t&&{exclusiveMinimum:t},...n&&{exclusiveMaximum:n}}},toJsonSchema:()=>({[t?`exclusiveMinimum`:`minimum`]:e.minimum,[n?`exclusiveMaximum`:`maximum`]:e.maximum}),toCode:()=>({runtime:`Schema.isBetween({ minimum: ${v(e.minimum)}, maximum: ${v(e.maximum)}, exclusiveMinimum: ${v(t)}, exclusiveMaximum: ${v(n)} })`})}}});function Il(e){return $(e=>globalThis.Number.isSafeInteger(e),{expected:`an integer`,representation:{id:`effect/schema/isInt`,payload:null},toJsonSchema:()=>({type:`integer`,minimum:globalThis.Number.MIN_SAFE_INTEGER,maximum:globalThis.Number.MAX_SAFE_INTEGER}),toCode:()=>({runtime:`Schema.isInt()`}),arbitraryConstraint:{number:`integer`},...e})}var Ll=Gc.check(Il()),Rl=Ll.check(Ml(0));function zl(e,t){return e=Kl(e),Bl(e,Math.ceil(e/2),t)}function Bl(e,t,n){return $(t=>t.length>=e,{expected:`a value with a length of at least ${e}`,representation:{id:`effect/schema/isMinLength`,payload:{minLength:e}},toJsonSchema:({type:n})=>n===`string`?e<=1?{minLength:t}:[{minLength:t},!0]:n===`array`?{minItems:e}:n===void 0?[{minLength:t,minItems:e},!0]:[{},!0],toCode:()=>({runtime:`Schema.isMinLength(${e})`}),[yr]:!0,arbitraryConstraint:{minLength:e},...n})}function Vl(e){return Bl(1,1,e)}function Hl(e,t){return e=Kl(e),$(t=>t.length<=e,{expected:`a value with a length of at most ${e}`,representation:{id:`effect/schema/isMaxLength`,payload:{maxLength:e}},toJsonSchema:({type:t})=>t===`string`?e===0?{maxLength:e}:[{maxLength:e},!0]:t===`array`?{maxItems:e}:t===void 0?[{maxLength:e,maxItems:e},!0]:[{},!0],toCode:()=>({runtime:`Schema.isMaxLength(${e})`}),[yr]:!0,arbitraryConstraint:{maxLength:e},...t})}function Ul(e,t){return e=Kl(e),$(t=>Gl(t,e)>=e,{expected:`a string with at least ${e} code points`,representation:{id:`effect/schema/isMinCodePoints`,payload:{minCodePoints:e}},toJsonSchema:()=>({minLength:e}),toCode:()=>({runtime:`Schema.isMinCodePoints(${e})`}),arbitraryConstraint:{minCodePoints:e},...t})}function Wl(e,t){return e=Kl(e),$(t=>Gl(t,e+1)<=e,{expected:`a string with at most ${e} code points`,representation:{id:`effect/schema/isMaxCodePoints`,payload:{maxCodePoints:e}},toJsonSchema:()=>({maxLength:e}),toCode:()=>({runtime:`Schema.isMaxCodePoints(${e})`}),arbitraryConstraint:{maxCodePoints:e},...t})}function Gl(e,t){if(t===0)return 0;let n=0;for(let r of e)if(++n>=t)break;return n}function Kl(e){if(!globalThis.Number.isFinite(e))throw new globalThis.RangeError(`Expected a finite number, got ${e}`);return Math.max(0,Math.floor(e))}var ql=Z.check(Vl()),Jl=e=>+(e?.includeStack===!0)|(e?.excludeCause===!0?2:0),Yl=e=>{switch(e){case 0:return;case 1:return{includeStack:!0};case 2:return{excludeCause:!0};case 3:return{includeStack:!0,excludeCause:!0}}},Xl=[];function Zl(e){let t=Jl(e),n=Xl[t];if(n!==void 0)return n;let r=Tu.pipe(Q(Hc,Li(Yl(t))));return Xl[t]=r,r}function Ql(e){return X(hc()([e],([e])=>{let t=el(e);return(e,n,r)=>e instanceof globalThis.Set?st(Ns(t)([...e],r),{onSuccess:e=>new globalThis.Set(e),onFailure:t=>Mr(n,`values`,t,e,r)}):b(new P(n,e,r))},{representation:{id:`effect/schema/ReadonlySet`,payload:null},toCode:({typeParameters:e})=>({runtime:`Schema.ReadonlySet(${e[0].runtime})`,Type:`globalThis.ReadonlySet<${e[0].Type}>`}),expected:`ReadonlySet`,toCodec:([e])=>bl()(el(e),Ci({decode:e=>new globalThis.Set(e),encode:e=>[...e.values()]}))}).ast,{value:e})}globalThis.RegExp,globalThis.URL;var $l=Z.annotate({expected:`a string that will be decoded as JSON`,contentMediaType:`application/json`});function eu(e,t){return $l.pipe(Q(e,zi(t)))}globalThis.File,globalThis.FormData,globalThis.URLSearchParams;var tu=Z.annotate({expected:`a string that will be decoded as a finite number`}).pipe(Q(Tl,ki)),nu=X(es).pipe(Q(qc,Ai)),ru=Z.check(Sl()),iu=Z.annotate({expected:`a string that will be decoded as a trimmed string`}).pipe(Q(ru,Ti())),au=Z.annotate({expected:`a base64 encoded string that will be decoded as Uint8Array`,format:`byte`,contentEncoding:`base64`}),ou=yl(globalThis.Uint8Array,{representation:{id:`effect/schema/Uint8Array`,payload:null},toCode:()=>({runtime:`Schema.Uint8Array`,Type:`globalThis.Uint8Array`}),expected:`Uint8Array`,toCodecJson:()=>bl()(au,Ri)}),su=au.pipe(Q(ou,Ri)),cu=Si({decode:(e,t)=>He(Dt(e),{onNone:()=>b(new F({expected:`a valid UTC DateTime string`},e,t)),onSome:e=>C(Ct(e))}),encode:e=>C(Et(e))}),lu=-864e13,uu=864e13;function du(e,t,n){let r=Math.max(t,e?.minimum===void 0?t:e.minimum.epochMilliseconds+ +(e.exclusiveMinimum===!0)),i=Math.min(n,e?.maximum===void 0?n:e.maximum.epochMilliseconds-+(e.exclusiveMaximum===!0));return r<=i?[r,i]:[t,n]}function fu(e,t){return Ll.check(Fl({minimum:e,maximum:t}))}var pu=gc(e=>wt(e)&&Tt(e),{representation:{id:`effect/schema/DateTimeUtc`,payload:null},toCode:()=>({runtime:`Schema.DateTimeUtc`,Type:`DateTime.Utc`,importDeclarations:[`import * as DateTime from "effect/DateTime"`]}),expected:`DateTime.Utc`,toCodecArbitrary:({constraint:e})=>{let[t,n]=du(e,lu,uu);return fl()(fu(t,n),L(St))},toCodecJson:()=>bl()(Z,cu),toFormatter:()=>e=>e.toString()}),mu=Z.annotate({expected:`a string that will be decoded as a DateTime.Utc`}).pipe(Q(pu,cu)),hu=globalThis.Symbol.for(`immer-draftable`),gu={};function _u(e,t,n,r,i){let a=bu(n,t,r),o=yu(t),s=class extends e{constructor(...[e,t]){let r=t?.[`~payload`],i=r?.token===gu?r.value:n.make(e??{},t);super(i,{...t,disableChecks:!0,"~payload":{token:gu,value:i}})}static[mc]=mc;get[o](){return o}static[hu]=!0;static identifier=t;static fields=n.fields;static get ast(){return a(this).ast}static pipe(){return ae(this,arguments)}static rebuild(e){return a(this).rebuild(e)}static make(e,t){return ks(a(this))(e??{},t)}static makeOption(e,t){return Os(a(this))(e??{},t)}static makeEffect(e,t){return a(this).makeEffect(e??{},t)}static annotate(e){return this.rebuild(ho(this.ast,e))}static annotateKey(e){return this.rebuild(Eo(this.ast,e))}static check(...e){return this.rebuild(_o(this.ast,e))}static extend(e){return(t,r)=>{let a=xu(t)?t:Xc(t),o={...n.fields,...a.fields},s=Fa(o,n.ast.checks,{identifier:e});return _u(this,e,Yc(_o(s,a.ast.checks),o),r,i)}}static mapFields(e,t){return n.mapFields(e,t)}};return i!==void 0&&Object.assign(s.prototype,i(t)),s}function vu(e){return new z(L(t=>new e(t,{"~payload":{token:gu,value:t}})),ri())}function yu(e){return`~effect/Schema/Class/${e}`}function bu(t,n,r){let i;return a=>{if(i!==void 0)return i;let o=yu(n),s=t=>t instanceof a||e(t,o),c=vu(a);return i=Q(X(new Zi([t.ast],()=>(e,t,n)=>s(e)?C(e):b(new P(t,e,n)),{identifier:n,[xr]:([e])=>({isConstructed:s,link:new V(e,c)}),toCodec:([e])=>new V(e.ast,c),toEquivalence:([e])=>e,toFormatter:([e])=>t=>`${a.identifier}(${e(t)})`,[br]:Va(t.ast),...r})),c)(t)}}function xu(e){return Pc(e)}var Su=e=>(t,n)=>{let r=xu(t)?t:Xc(t);return _u(le,e,r,n,e=>({name:e}))},Cu=e=>(t,n,r)=>{let i=xu(n)?n.mapFields(e=>({_tag:hl(t),...e}),{unsafePreserveChecks:!0}):gl(t,n);return Su(e??t)(i,r)},wu=ec,Tu=X(ho(ss,{toCode:()=>({runtime:`Schema.Json`,Type:`Schema.Json`})})),Eu=`https://assets.stakek.it`,Du={appName:`Yield.xyz`,appIcon:`${Eu}/stakekit/sk-icon_320x320.png`,appUrl:`https://yield.xyz`,currency:`USD`,walletConnectV2:{projectId:`10a5257c04d1d3097ff768a139c95f50`},appPrefix:`sk-widget`,env:{apiUrl:`https://api.stakek.it/`,borrowApiUrl:`https://borrow.yield.xyz`,yieldsApiUrl:`https://api.yield.xyz`,isTestMode:!1,isDevMode:!1,forceAddress:void 0},assetsUrl:Eu,zerion:{tracking:`2cbed59baa70c46f7cadef7b05eb1bc3`,iconsByAddress:`https://token-icons.s3.amazonaws.com/`,iconsByNetwork:`https://chain-icons.s3.amazonaws.com/`}},Ou=e=>`${Du.assetsUrl}/networks/${e}.svg`,ku=e=>Ou(e),Au=e=>`${Du.assetsUrl}/tokens/${e}.svg`,ju={bitget:`${Du.assetsUrl}/widget/bitget.png`,ledgerLogo:`${Du.assetsUrl}/widget/ledger-logo.svg`,wcLogo:`${Du.assetsUrl}/widget/wc-logo.svg`};export{Oc as $,Cn as $t,Xc as A,gi as At,Hc as B,er as Bt,il as C,cc as Ct,Qc as D,Ci as Dt,Ql as E,Ei as Et,Bc as F,ai as Ft,pl as G,zn as Gt,ul as H,or as Ht,iu as I,Ar as It,kc as J,qn as Jt,Tc as K,Bn as Kt,su as L,Vr as Lt,Cu as M,ii as Mt,gl as N,L as Nt,_c as O,wi as Ot,vl as P,R as Pt,Ec as Q,Un as Qt,al as R,_r as Rt,Uc as S,Lc as St,Jc as T,Ns as Tt,sl as U,Yn as Ut,cl as V,lr as Vt,gc as W,Jn as Wt,Q as X,Gn as Xt,jc as Y,Wn as Yt,wc as Z,Hn as Zt,Rc as _,$ as _t,Du as a,kt as an,Cc as at,Vc as b,ol as bt,nu as c,Lt as cn,Il as ct,mu as d,Wl as dt,qt as en,Ac as et,Zl as f,Hl as ft,Tu as g,wl as gt,Ll as h,Cl as ht,Ou as i,Ht as in,yl as it,$c as j,ei as jt,Z as k,_i as kt,Kc as l,Nl as lt,tu as m,zl as mt,Au as n,Ut as nn,Zc as nt,el as o,Pt as on,El as ot,Tl as p,Ul as pt,Dc as q,Vn as qt,ju as r,Gt as rn,eu as rt,qc as s,jt as sn,Ml as st,ku as t,Kt as tn,Nc as tt,pu as u,Pl as ut,rl as v,Ic as vt,Gc as w,sc as wt,ql as x,wu as xt,Rl as y,Fc as yt,nl as z,ar as zt};
|