@hexclave/tanstack-start 1.0.22 → 1.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/clickmap/clickmap-core.js +1 -1
  2. package/dist/clickmap/index.js +2 -2
  3. package/dist/components/api-key-dialogs.js +2 -2
  4. package/dist/components/credential-sign-in.js +1 -1
  5. package/dist/components/credential-sign-up.js +1 -1
  6. package/dist/components/elements/sidebar-layout.js +1 -1
  7. package/dist/components/magic-link-sign-in.js +1 -1
  8. package/dist/components/team-switcher.js +1 -1
  9. package/dist/components-page/account-settings/active-sessions/active-sessions-page.js +1 -1
  10. package/dist/components-page/account-settings/email-and-auth/emails-section.js +1 -1
  11. package/dist/components-page/account-settings/email-and-auth/mfa-section.js +1 -1
  12. package/dist/components-page/account-settings/email-and-auth/password-section.js +1 -1
  13. package/dist/components-page/account-settings/profile-page/profile-page.js +1 -1
  14. package/dist/components-page/account-settings/teams/team-creation-page.js +1 -1
  15. package/dist/components-page/account-settings/teams/team-member-invitation-section.js +1 -1
  16. package/dist/components-page/auth-page.js +1 -1
  17. package/dist/components-page/cli-auth-confirm.js +1 -1
  18. package/dist/components-page/cli-auth-confirm.test.js +1 -1
  19. package/dist/components-page/forgot-password.js +1 -1
  20. package/dist/components-page/oauth-callback.js +1 -1
  21. package/dist/components-page/onboarding.js +1 -1
  22. package/dist/components-page/password-reset.js +1 -1
  23. package/dist/components-page/team-creation.js +1 -1
  24. package/dist/dev-tool/dev-tool-core.js +1 -1
  25. package/dist/dev-tool/index.d.ts +6 -5
  26. package/dist/dev-tool/index.d.ts.map +1 -1
  27. package/dist/dev-tool/index.js +17 -7
  28. package/dist/dev-tool/index.js.map +1 -1
  29. package/dist/esm/clickmap/clickmap-core.js +1 -1
  30. package/dist/esm/clickmap/index.js +2 -2
  31. package/dist/esm/components/api-key-dialogs.js +2 -2
  32. package/dist/esm/components/credential-sign-in.js +1 -1
  33. package/dist/esm/components/credential-sign-up.js +1 -1
  34. package/dist/esm/components/elements/sidebar-layout.js +1 -1
  35. package/dist/esm/components/magic-link-sign-in.js +1 -1
  36. package/dist/esm/components/team-switcher.js +1 -1
  37. package/dist/esm/components-page/account-settings/active-sessions/active-sessions-page.js +1 -1
  38. package/dist/esm/components-page/account-settings/email-and-auth/emails-section.js +1 -1
  39. package/dist/esm/components-page/account-settings/email-and-auth/mfa-section.js +1 -1
  40. package/dist/esm/components-page/account-settings/email-and-auth/password-section.js +1 -1
  41. package/dist/esm/components-page/account-settings/profile-page/profile-page.js +1 -1
  42. package/dist/esm/components-page/account-settings/teams/team-creation-page.js +1 -1
  43. package/dist/esm/components-page/account-settings/teams/team-member-invitation-section.js +1 -1
  44. package/dist/esm/components-page/auth-page.js +1 -1
  45. package/dist/esm/components-page/cli-auth-confirm.js +1 -1
  46. package/dist/esm/components-page/cli-auth-confirm.test.js +1 -1
  47. package/dist/esm/components-page/forgot-password.js +1 -1
  48. package/dist/esm/components-page/oauth-callback.js +1 -1
  49. package/dist/esm/components-page/onboarding.js +1 -1
  50. package/dist/esm/components-page/password-reset.js +1 -1
  51. package/dist/esm/components-page/team-creation.js +1 -1
  52. package/dist/esm/dev-tool/dev-tool-core.js +1 -1
  53. package/dist/esm/dev-tool/index.d.ts +6 -5
  54. package/dist/esm/dev-tool/index.d.ts.map +1 -1
  55. package/dist/esm/dev-tool/index.js +17 -7
  56. package/dist/esm/dev-tool/index.js.map +1 -1
  57. package/dist/esm/generated/env.js +20 -20
  58. package/dist/esm/generated/env.js.map +1 -1
  59. package/dist/esm/generated/quetzal-translations.d.ts +2 -2
  60. package/dist/esm/lib/auth.js +3 -3
  61. package/dist/esm/lib/auth.js.map +1 -1
  62. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +3 -3
  63. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
  64. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +1 -1
  65. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js +3 -3
  66. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
  67. package/dist/esm/lib/hexclave-app/apps/implementations/common.js +2 -2
  68. package/dist/esm/lib/hexclave-app/apps/implementations/event-tracker.js +1 -1
  69. package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.js +1 -1
  70. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.js +1 -1
  71. package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts +5 -3
  72. package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +1 -1
  73. package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
  74. package/dist/esm/lib/hexclave-app/url-targets.test.js +7 -7
  75. package/dist/esm/lib/hexclave-app/url-targets.test.js.map +1 -1
  76. package/dist/esm/providers/theme-provider.js +1 -1
  77. package/dist/generated/env.js +20 -20
  78. package/dist/generated/env.js.map +1 -1
  79. package/dist/generated/quetzal-translations.d.ts +2 -2
  80. package/dist/lib/auth.js +3 -3
  81. package/dist/lib/auth.js.map +1 -1
  82. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +2 -2
  83. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
  84. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +1 -1
  85. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js +3 -3
  86. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
  87. package/dist/lib/hexclave-app/apps/implementations/common.js +2 -2
  88. package/dist/lib/hexclave-app/apps/implementations/event-tracker.js +1 -1
  89. package/dist/lib/hexclave-app/apps/implementations/server-app-impl.js +1 -1
  90. package/dist/lib/hexclave-app/apps/implementations/session-replay.js +1 -1
  91. package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts +5 -3
  92. package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +1 -1
  93. package/dist/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
  94. package/dist/lib/hexclave-app/url-targets.test.js +7 -7
  95. package/dist/lib/hexclave-app/url-targets.test.js.map +1 -1
  96. package/dist/providers/theme-provider.js +1 -1
  97. package/package.json +3 -3
  98. package/src/dev-tool/index.ts +27 -6
  99. package/src/lib/auth.ts +2 -2
  100. package/src/lib/hexclave-app/apps/implementations/client-app-impl.ts +1 -1
  101. package/src/lib/hexclave-app/apps/interfaces/client-app.ts +5 -3
  102. package/src/lib/hexclave-app/url-targets.test.ts +7 -7
@@ -1,5 +1,5 @@
1
- import { HexclaveAssertionError, captureError, concatStacktraces, throwErr } from "@hexclave/shared/dist/utils/errors";
2
1
  import { runAsynchronously } from "@hexclave/shared/dist/utils/promises";
2
+ import { HexclaveAssertionError, captureError, concatStacktraces, throwErr } from "@hexclave/shared/dist/utils/errors";
3
3
  import React, { useCallback } from "react";
4
4
  import { use } from "@hexclave/shared/dist/utils/react";
5
5
  import { filterUndefined, omit } from "@hexclave/shared/dist/utils/objects";
@@ -14,7 +14,7 @@ import { envVars } from "../../../../generated/env.js";
14
14
  import { resolveHandlerUrls } from "../../url-targets.js";
15
15
 
16
16
  //#region src/lib/hexclave-app/apps/implementations/common.ts
17
- const clientVersion = "js @hexclave/tanstack-start@1.0.22";
17
+ const clientVersion = "js @hexclave/tanstack-start@1.0.24";
18
18
  if (clientVersion.startsWith("STACK_COMPILE_TIME")) throw new HexclaveAssertionError("Client version was not replaced. Something went wrong during build!");
19
19
  const replaceHexclavePortPrefix = (input) => {
20
20
  if (!input) return input;
@@ -1,7 +1,7 @@
1
- import { runAsynchronously } from "@hexclave/shared/dist/utils/promises";
2
1
  import { CLICKMAP_ROOT_ID, DEV_TOOL_ROOT_ID } from "@hexclave/shared/dist/utils/dev-tool";
3
2
  import { cssEscapeIdent } from "@hexclave/shared/dist/utils/dom";
4
3
  import { ELEMENTS_CHAIN_MAX_DEPTH, buildElementsChain } from "@hexclave/shared/dist/utils/elements-chain";
4
+ import { runAsynchronously } from "@hexclave/shared/dist/utils/promises";
5
5
  import { isBrowserLike } from "@hexclave/shared/dist/utils/env";
6
6
  import { generateUuid, isAnalyticsNotEnabledError } from "./session-replay.js";
7
7
 
@@ -1,5 +1,5 @@
1
- import { HexclaveAssertionError, captureError, throwErr } from "@hexclave/shared/dist/utils/errors";
2
1
  import { runAsynchronously } from "@hexclave/shared/dist/utils/promises";
2
+ import { HexclaveAssertionError, captureError, throwErr } from "@hexclave/shared/dist/utils/errors";
3
3
  import { useMemo } from "react";
4
4
  import { HexclaveServerInterface, KnownErrors } from "@hexclave/shared";
5
5
  import { suspend } from "@hexclave/shared/dist/utils/react";
@@ -1,5 +1,5 @@
1
- import { captureWarning } from "@hexclave/shared/dist/utils/errors";
2
1
  import { runAsynchronously } from "@hexclave/shared/dist/utils/promises";
2
+ import { captureWarning } from "@hexclave/shared/dist/utils/errors";
3
3
  import { Result } from "@hexclave/shared/dist/utils/results";
4
4
  import { isBrowserLike } from "@hexclave/shared/dist/utils/env";
5
5
  import { KnownErrors } from "@hexclave/shared/dist/known-errors";
@@ -24,11 +24,13 @@ type StackClientAppConstructorOptions<HasTokenStore extends boolean, ProjectId e
24
24
  redirectMethod?: RedirectMethod;
25
25
  inheritsFrom?: StackClientApp<any, any>;
26
26
  /**
27
- * Whether to show the Hexclave dev tool indicator in browser-like development environments.
27
+ * Whether to show the Hexclave dev tool indicator in browser-like environments.
28
28
  *
29
- * Defaults to true.
29
+ * - `true`: always show
30
+ * - `false`: never show
31
+ * - `"auto"` (default): show based on NODE_ENV or origin heuristics
30
32
  */
31
- devTool?: boolean;
33
+ devTool?: boolean | "auto";
32
34
  /**
33
35
  * By default, the Stack app will automatically prefetch some data from Stack's server when this app is first
34
36
  * constructed. This improves the performance of your app, but will create network requests that are unnecessary if
@@ -1 +1 @@
1
- {"version":3,"file":"client-app.d.ts","names":[],"sources":["../../../../../../src/lib/hexclave-app/apps/interfaces/client-app.ts"],"mappings":";;;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AgB,gBAAA;AAAA,IAC7F,IAAA,WAGA,kBAAA,cAEC,OAAA,EAAS,8BAAA,GACV,oBAAA,UAGA,kBAAA,cAEC,OAAA,EAAS,8BAAA,GACV,oBAAA,+BAGqB,UAAA,OAAiB,IAAA,CAAK,WAAA,qCAAgD,OAAA,GAAU,iBAAA,KAAsB,OAAA,WAC3H,QAAA,CAAS,aAAA;EAAgC,UAAA,EAAY,cAAA;AAAA;EAAqB,UAAA,GAAa,cAAA;AAAA;;KAG/E,yBAAA;EAAA,2DAGe,cAAA,yDAEvB,OAAA,EAAS,gCAAA,CAAiC,aAAA,EAAe,SAAA,IAAa,cAAA,CAAe,aAAA,EAAe,SAAA;EAAA,KAClG,OAAA,EAAS,gCAAA,oBAAoD,cAAA;EAAA,CAEhE,0BAAA;IACC,cAAA,0DACE,IAAA,EAAM,kBAAA,CAAmB,aAAA,EAAe,SAAA,IACvC,cAAA,CAAe,aAAA,EAAe,SAAA;EAAA;AAAA;AAAA,KAGzB,mCAAA,4DAA+F,gCAAA,CAAiC,aAAA,EAAe,SAAA;AAAA,KAC/I,qBAAA,4DAAiF,kBAAA,CAAmB,aAAA,EAAe,SAAA;AAAA,KACnH,iBAAA,+EAAgG,cAAA,CAAe,aAAA,EAAe,SAAA;AAAA,KAC9H,4BAAA,GAA+B,yBAAA;AAAA,cAC9B,iBAAA,EAAmB,4BAAA;;cAEnB,cAAA,EAAgB,yBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"client-app.js","names":[],"sources":["../../../../../../src/lib/hexclave-app/apps/interfaces/client-app.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { KnownErrors } from \"@hexclave/shared\";\nimport { CurrentUserCrud } from \"@hexclave/shared/dist/interface/crud/current-user\";\nimport { Result } from \"@hexclave/shared/dist/utils/results\";\nimport { AsyncStoreProperty, AuthLike, GetCurrentPartialUserOptions, GetCurrentUserOptions, HandlerUrlOptions, HandlerUrls, OAuthScopesOnSignIn, RedirectMethod, RedirectToOptions, ResolvedHandlerUrls, hexclaveAppInternalsSymbol, TokenStoreInit } from \"../../common\";\nimport type { RequestListener } from \"@hexclave/shared/dist/interface/client-interface\";\nimport { CustomerInvoicesList, CustomerInvoicesRequestOptions, CustomerProductsList, CustomerProductsRequestOptions, Item } from \"../../customers\";\nimport { Project } from \"../../projects\";\nimport { ProjectCurrentUser, SyncedPartialUser, TokenPartialUser } from \"../../users\";\nimport { _HexclaveClientAppImpl } from \"../implementations\";\nimport { AnalyticsOptions } from \"../implementations/session-replay\";\n\n/** @deprecated Use `HexclaveClientAppConstructorOptions` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackClientAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = {\n baseUrl?: string | { browser: string, server: string },\n extraRequestHeaders?: Record<string, string>,\n projectId?: ProjectId,\n publishableClientKey?: string,\n urls?: HandlerUrlOptions,\n oauthScopesOnSignIn?: Partial<OAuthScopesOnSignIn>,\n tokenStore?: TokenStoreInit<HasTokenStore>,\n redirectMethod?: RedirectMethod,\n inheritsFrom?: StackClientApp<any, any>,\n\n /**\n * Whether to show the Hexclave dev tool indicator in browser-like development environments.\n *\n * Defaults to true.\n */\n devTool?: boolean,\n\n /**\n * By default, the Stack app will automatically prefetch some data from Stack's server when this app is first\n * constructed. This improves the performance of your app, but will create network requests that are unnecessary if\n * the app is never used or disposed of immediately. To disable this behavior, set this option to true.\n */\n noAutomaticPrefetch?: boolean,\n\n /**\n * Options for analytics and session recording. Replays are enabled by default;\n * set `{ replays: { enabled: false } }` to opt out.\n */\n analytics?: AnalyticsOptions,\n} & (\n { tokenStore: TokenStoreInit<HasTokenStore> } | { tokenStore?: undefined, inheritsFrom: StackClientApp<HasTokenStore, any> }\n) & (\n string extends ProjectId ? unknown : ({ projectId: ProjectId } | { inheritsFrom: StackClientApp<any, ProjectId> })\n);\n\n\n/** @deprecated Use `HexclaveClientAppJson` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackClientAppJson<HasTokenStore extends boolean, ProjectId extends string> = StackClientAppConstructorOptions<HasTokenStore, ProjectId> & { inheritsFrom?: undefined } & {\n uniqueIdentifier: string,\n // note: if you add more fields here, make sure to ensure the checkString in the constructor has/doesn't have them\n};\n\n/** @deprecated Use `HexclaveClientApp` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackClientApp<HasTokenStore extends boolean = boolean, ProjectId extends string = string> = (\n & {\n readonly projectId: ProjectId,\n\n /**\n * The version of the Hexclave SDK.\n */\n readonly version: string,\n\n /**\n * @deprecated Do not use `app.urls` for navigation. It is static and does not include runtime redirect-back,\n * cross-domain auth, or sign-out state. Use the matching `redirectToXyz()` method instead, for example\n * `redirectToSignIn()`, `redirectToSignUp()`, `redirectToSignOut()`, or `redirectToAccountSettings()`.\n */\n readonly urls: Readonly<ResolvedHandlerUrls>,\n\n signInWithOAuth(provider: string, options?: { returnTo?: string }): Promise<void>,\n signInWithCredential(options: { email: string, password: string, noRedirect?: boolean }): Promise<Result<undefined, KnownErrors[\"EmailPasswordMismatch\"] | KnownErrors[\"InvalidTotpCode\"]>>,\n signUpWithCredential(options: {\n email: string,\n password: string,\n noRedirect?: boolean,\n } & ({ noVerificationCallback: true } | { noVerificationCallback?: false, verificationCallbackUrl?: string })): Promise<Result<undefined, KnownErrors[\"UserWithEmailAlreadyExists\"] | KnownErrors[\"PasswordRequirementsNotMet\"] | KnownErrors[\"BotChallengeFailed\"]>>,\n signInWithPasskey(): Promise<Result<undefined, KnownErrors[\"PasskeyAuthenticationFailed\"] | KnownErrors[\"InvalidTotpCode\"] | KnownErrors[\"PasskeyWebAuthnError\"]>>,\n callOAuthCallback(): Promise<boolean>,\n promptCliLogin(options: { appUrl: string, expiresInMillis?: number, anonRefreshToken?: string, promptLink?: (url: string, loginCode: string) => void }): Promise<Result<string, KnownErrors[\"CliAuthError\"] | KnownErrors[\"CliAuthExpiredError\"] | KnownErrors[\"CliAuthUsedError\"]>>,\n sendForgotPasswordEmail(email: string, options?: { callbackUrl?: string }): Promise<Result<undefined, KnownErrors[\"UserNotFound\"]>>,\n sendMagicLinkEmail(email: string, options?: { callbackUrl?: string }): Promise<Result<{ nonce: string }, KnownErrors[\"RedirectUrlNotWhitelisted\"] | KnownErrors[\"BotChallengeFailed\"]>>,\n resetPassword(options: { code: string, password: string }): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"]>>,\n verifyPasswordResetCode(code: string): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"]>>,\n verifyTeamInvitationCode(code: string): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"] | KnownErrors[\"TeamInvitationEmailMismatch\"]>>,\n acceptTeamInvitation(code: string): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"] | KnownErrors[\"TeamInvitationEmailMismatch\"]>>,\n getTeamInvitationDetails(code: string): Promise<Result<{ teamDisplayName: string }, KnownErrors[\"VerificationCodeError\"] | KnownErrors[\"TeamInvitationEmailMismatch\"]>>,\n verifyEmail(code: string): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"]>>,\n signInWithMagicLink(code: string, options?: { noRedirect?: boolean }): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"] | KnownErrors[\"InvalidTotpCode\"]>>,\n signInWithMfa(otp: string, code: string, options?: { noRedirect?: boolean }): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"] | KnownErrors[\"InvalidTotpCode\"]>>,\n\n redirectToOAuthCallback(): Promise<void>,\n\n getConvexClientAuth(options: HasTokenStore extends false ? { tokenStore: TokenStoreInit } : { tokenStore?: TokenStoreInit }): (args: { forceRefreshToken: boolean }) => Promise<string | null>,\n getConvexHttpClientAuth(options: { tokenStore: TokenStoreInit }): Promise<string>,\n\n useUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'redirect' }): ProjectCurrentUser<ProjectId>,\n useUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'throw' }): ProjectCurrentUser<ProjectId>,\n useUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'anonymous' }): ProjectCurrentUser<ProjectId>,\n useUser(options?: GetCurrentUserOptions<HasTokenStore>): ProjectCurrentUser<ProjectId> | null,\n\n getUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'redirect' }): Promise<ProjectCurrentUser<ProjectId>>,\n getUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'throw' }): Promise<ProjectCurrentUser<ProjectId>>,\n getUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'anonymous' }): Promise<ProjectCurrentUser<ProjectId>>,\n getUser(options?: GetCurrentUserOptions<HasTokenStore>): Promise<ProjectCurrentUser<ProjectId> | null>,\n\n cancelSubscription(options: { productId: string, subscriptionId?: string } | { productId: string, subscriptionId?: string, teamId: string }): Promise<void>,\n\n // note: we don't special-case 'anonymous' here to return non-null, see GetPartialUserOptions for more details\n getPartialUser(options: GetCurrentPartialUserOptions<HasTokenStore> & { from: 'token' }): Promise<TokenPartialUser | null>,\n getPartialUser(options: GetCurrentPartialUserOptions<HasTokenStore> & { from: 'convex' }): Promise<TokenPartialUser | null>,\n getPartialUser(options: GetCurrentPartialUserOptions<HasTokenStore>): Promise<SyncedPartialUser | TokenPartialUser | null>,\n usePartialUser(options: GetCurrentPartialUserOptions<HasTokenStore> & { from: 'token' }): TokenPartialUser | null,\n usePartialUser(options: GetCurrentPartialUserOptions<HasTokenStore> & { from: 'convex' }): TokenPartialUser | null,\n usePartialUser(options: GetCurrentPartialUserOptions<HasTokenStore>): SyncedPartialUser | TokenPartialUser | null,\n useNavigate(): (to: string) => void, // THIS_LINE_PLATFORM react-like\n\n [hexclaveAppInternalsSymbol]: {\n toClientJson(): StackClientAppJson<HasTokenStore, ProjectId>,\n setCurrentUser(userJsonPromise: Promise<CurrentUserCrud['Client']['Read'] | null>): void,\n getConstructorOptions(): StackClientAppConstructorOptions<HasTokenStore, ProjectId> & { inheritsFrom?: undefined },\n sendSessionReplayBatch(body: string, options: { keepalive: boolean }): Promise<Result<Response, Error>>,\n sendAnalyticsEventBatch(body: string, options: { keepalive: boolean }): Promise<Result<Response, Error>>,\n addRequestListener(listener: RequestListener): () => void,\n sendRequest(path: string, requestOptions: RequestInit, requestType?: \"client\" | \"server\" | \"admin\"): Promise<Response>,\n getRedirectMethod(): RedirectMethod,\n redirectToUrl(url: string | URL, options?: { replace?: boolean }): Promise<void>,\n redirectToHandler(handlerName: keyof HandlerUrls, options?: RedirectToOptions): Promise<void>,\n signInWithTokens(tokens: { accessToken: string, refreshToken: string }): Promise<void>,\n },\n }\n & AsyncStoreProperty<\"project\", [], Project, false>\n & AsyncStoreProperty<\n \"item\",\n [{ itemId: string, userId: string } | { itemId: string, teamId: string } | { itemId: string, customCustomerId: string }],\n Item,\n false\n >\n & AsyncStoreProperty<\n \"products\",\n [options: CustomerProductsRequestOptions],\n CustomerProductsList,\n true\n >\n & AsyncStoreProperty<\n \"invoices\",\n [options: CustomerInvoicesRequestOptions],\n CustomerInvoicesList,\n true\n >\n & { [K in `redirectTo${Capitalize<keyof Omit<HandlerUrls, 'handler' | 'oauthCallback'>>}`]: (options?: RedirectToOptions) => Promise<void> }\n & AuthLike<HasTokenStore extends false ? { tokenStore: TokenStoreInit } : { tokenStore?: TokenStoreInit }>\n);\n/** @deprecated Use `HexclaveClientAppConstructor` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackClientAppConstructor = {\n new <\n TokenStoreType extends string,\n HasTokenStore extends (TokenStoreType extends {} ? true : boolean),\n ProjectId extends string\n >(options: StackClientAppConstructorOptions<HasTokenStore, ProjectId>): StackClientApp<HasTokenStore, ProjectId>,\n new(options: StackClientAppConstructorOptions<boolean, string>): StackClientApp<boolean, string>,\n\n [hexclaveAppInternalsSymbol]: {\n fromClientJson<HasTokenStore extends boolean, ProjectId extends string>(\n json: StackClientAppJson<HasTokenStore, ProjectId>\n ): StackClientApp<HasTokenStore, ProjectId>,\n },\n};\nexport type HexclaveClientAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = StackClientAppConstructorOptions<HasTokenStore, ProjectId>;\nexport type HexclaveClientAppJson<HasTokenStore extends boolean, ProjectId extends string> = StackClientAppJson<HasTokenStore, ProjectId>;\nexport type HexclaveClientApp<HasTokenStore extends boolean = boolean, ProjectId extends string = string> = StackClientApp<HasTokenStore, ProjectId>;\nexport type HexclaveClientAppConstructor = StackClientAppConstructor;\nexport const HexclaveClientApp: HexclaveClientAppConstructor = _HexclaveClientAppImpl;\n/** @deprecated Use `HexclaveClientApp` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport const StackClientApp: StackClientAppConstructor = HexclaveClientApp;\n"],"mappings":";;;AAkLA,MAAa,oBAAkD;;AAE/D,MAAa,iBAA4C"}
1
+ {"version":3,"file":"client-app.js","names":[],"sources":["../../../../../../src/lib/hexclave-app/apps/interfaces/client-app.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { KnownErrors } from \"@hexclave/shared\";\nimport { CurrentUserCrud } from \"@hexclave/shared/dist/interface/crud/current-user\";\nimport { Result } from \"@hexclave/shared/dist/utils/results\";\nimport { AsyncStoreProperty, AuthLike, GetCurrentPartialUserOptions, GetCurrentUserOptions, HandlerUrlOptions, HandlerUrls, OAuthScopesOnSignIn, RedirectMethod, RedirectToOptions, ResolvedHandlerUrls, hexclaveAppInternalsSymbol, TokenStoreInit } from \"../../common\";\nimport type { RequestListener } from \"@hexclave/shared/dist/interface/client-interface\";\nimport { CustomerInvoicesList, CustomerInvoicesRequestOptions, CustomerProductsList, CustomerProductsRequestOptions, Item } from \"../../customers\";\nimport { Project } from \"../../projects\";\nimport { ProjectCurrentUser, SyncedPartialUser, TokenPartialUser } from \"../../users\";\nimport { _HexclaveClientAppImpl } from \"../implementations\";\nimport { AnalyticsOptions } from \"../implementations/session-replay\";\n\n/** @deprecated Use `HexclaveClientAppConstructorOptions` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackClientAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = {\n baseUrl?: string | { browser: string, server: string },\n extraRequestHeaders?: Record<string, string>,\n projectId?: ProjectId,\n publishableClientKey?: string,\n urls?: HandlerUrlOptions,\n oauthScopesOnSignIn?: Partial<OAuthScopesOnSignIn>,\n tokenStore?: TokenStoreInit<HasTokenStore>,\n redirectMethod?: RedirectMethod,\n inheritsFrom?: StackClientApp<any, any>,\n\n /**\n * Whether to show the Hexclave dev tool indicator in browser-like environments.\n *\n * - `true`: always show\n * - `false`: never show\n * - `\"auto\"` (default): show based on NODE_ENV or origin heuristics\n */\n devTool?: boolean | \"auto\",\n\n /**\n * By default, the Stack app will automatically prefetch some data from Stack's server when this app is first\n * constructed. This improves the performance of your app, but will create network requests that are unnecessary if\n * the app is never used or disposed of immediately. To disable this behavior, set this option to true.\n */\n noAutomaticPrefetch?: boolean,\n\n /**\n * Options for analytics and session recording. Replays are enabled by default;\n * set `{ replays: { enabled: false } }` to opt out.\n */\n analytics?: AnalyticsOptions,\n} & (\n { tokenStore: TokenStoreInit<HasTokenStore> } | { tokenStore?: undefined, inheritsFrom: StackClientApp<HasTokenStore, any> }\n) & (\n string extends ProjectId ? unknown : ({ projectId: ProjectId } | { inheritsFrom: StackClientApp<any, ProjectId> })\n);\n\n\n/** @deprecated Use `HexclaveClientAppJson` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackClientAppJson<HasTokenStore extends boolean, ProjectId extends string> = StackClientAppConstructorOptions<HasTokenStore, ProjectId> & { inheritsFrom?: undefined } & {\n uniqueIdentifier: string,\n // note: if you add more fields here, make sure to ensure the checkString in the constructor has/doesn't have them\n};\n\n/** @deprecated Use `HexclaveClientApp` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackClientApp<HasTokenStore extends boolean = boolean, ProjectId extends string = string> = (\n & {\n readonly projectId: ProjectId,\n\n /**\n * The version of the Hexclave SDK.\n */\n readonly version: string,\n\n /**\n * @deprecated Do not use `app.urls` for navigation. It is static and does not include runtime redirect-back,\n * cross-domain auth, or sign-out state. Use the matching `redirectToXyz()` method instead, for example\n * `redirectToSignIn()`, `redirectToSignUp()`, `redirectToSignOut()`, or `redirectToAccountSettings()`.\n */\n readonly urls: Readonly<ResolvedHandlerUrls>,\n\n signInWithOAuth(provider: string, options?: { returnTo?: string }): Promise<void>,\n signInWithCredential(options: { email: string, password: string, noRedirect?: boolean }): Promise<Result<undefined, KnownErrors[\"EmailPasswordMismatch\"] | KnownErrors[\"InvalidTotpCode\"]>>,\n signUpWithCredential(options: {\n email: string,\n password: string,\n noRedirect?: boolean,\n } & ({ noVerificationCallback: true } | { noVerificationCallback?: false, verificationCallbackUrl?: string })): Promise<Result<undefined, KnownErrors[\"UserWithEmailAlreadyExists\"] | KnownErrors[\"PasswordRequirementsNotMet\"] | KnownErrors[\"BotChallengeFailed\"]>>,\n signInWithPasskey(): Promise<Result<undefined, KnownErrors[\"PasskeyAuthenticationFailed\"] | KnownErrors[\"InvalidTotpCode\"] | KnownErrors[\"PasskeyWebAuthnError\"]>>,\n callOAuthCallback(): Promise<boolean>,\n promptCliLogin(options: { appUrl: string, expiresInMillis?: number, anonRefreshToken?: string, promptLink?: (url: string, loginCode: string) => void }): Promise<Result<string, KnownErrors[\"CliAuthError\"] | KnownErrors[\"CliAuthExpiredError\"] | KnownErrors[\"CliAuthUsedError\"]>>,\n sendForgotPasswordEmail(email: string, options?: { callbackUrl?: string }): Promise<Result<undefined, KnownErrors[\"UserNotFound\"]>>,\n sendMagicLinkEmail(email: string, options?: { callbackUrl?: string }): Promise<Result<{ nonce: string }, KnownErrors[\"RedirectUrlNotWhitelisted\"] | KnownErrors[\"BotChallengeFailed\"]>>,\n resetPassword(options: { code: string, password: string }): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"]>>,\n verifyPasswordResetCode(code: string): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"]>>,\n verifyTeamInvitationCode(code: string): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"] | KnownErrors[\"TeamInvitationEmailMismatch\"]>>,\n acceptTeamInvitation(code: string): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"] | KnownErrors[\"TeamInvitationEmailMismatch\"]>>,\n getTeamInvitationDetails(code: string): Promise<Result<{ teamDisplayName: string }, KnownErrors[\"VerificationCodeError\"] | KnownErrors[\"TeamInvitationEmailMismatch\"]>>,\n verifyEmail(code: string): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"]>>,\n signInWithMagicLink(code: string, options?: { noRedirect?: boolean }): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"] | KnownErrors[\"InvalidTotpCode\"]>>,\n signInWithMfa(otp: string, code: string, options?: { noRedirect?: boolean }): Promise<Result<undefined, KnownErrors[\"VerificationCodeError\"] | KnownErrors[\"InvalidTotpCode\"]>>,\n\n redirectToOAuthCallback(): Promise<void>,\n\n getConvexClientAuth(options: HasTokenStore extends false ? { tokenStore: TokenStoreInit } : { tokenStore?: TokenStoreInit }): (args: { forceRefreshToken: boolean }) => Promise<string | null>,\n getConvexHttpClientAuth(options: { tokenStore: TokenStoreInit }): Promise<string>,\n\n useUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'redirect' }): ProjectCurrentUser<ProjectId>,\n useUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'throw' }): ProjectCurrentUser<ProjectId>,\n useUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'anonymous' }): ProjectCurrentUser<ProjectId>,\n useUser(options?: GetCurrentUserOptions<HasTokenStore>): ProjectCurrentUser<ProjectId> | null,\n\n getUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'redirect' }): Promise<ProjectCurrentUser<ProjectId>>,\n getUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'throw' }): Promise<ProjectCurrentUser<ProjectId>>,\n getUser(options: GetCurrentUserOptions<HasTokenStore> & { or: 'anonymous' }): Promise<ProjectCurrentUser<ProjectId>>,\n getUser(options?: GetCurrentUserOptions<HasTokenStore>): Promise<ProjectCurrentUser<ProjectId> | null>,\n\n cancelSubscription(options: { productId: string, subscriptionId?: string } | { productId: string, subscriptionId?: string, teamId: string }): Promise<void>,\n\n // note: we don't special-case 'anonymous' here to return non-null, see GetPartialUserOptions for more details\n getPartialUser(options: GetCurrentPartialUserOptions<HasTokenStore> & { from: 'token' }): Promise<TokenPartialUser | null>,\n getPartialUser(options: GetCurrentPartialUserOptions<HasTokenStore> & { from: 'convex' }): Promise<TokenPartialUser | null>,\n getPartialUser(options: GetCurrentPartialUserOptions<HasTokenStore>): Promise<SyncedPartialUser | TokenPartialUser | null>,\n usePartialUser(options: GetCurrentPartialUserOptions<HasTokenStore> & { from: 'token' }): TokenPartialUser | null,\n usePartialUser(options: GetCurrentPartialUserOptions<HasTokenStore> & { from: 'convex' }): TokenPartialUser | null,\n usePartialUser(options: GetCurrentPartialUserOptions<HasTokenStore>): SyncedPartialUser | TokenPartialUser | null,\n useNavigate(): (to: string) => void, // THIS_LINE_PLATFORM react-like\n\n [hexclaveAppInternalsSymbol]: {\n toClientJson(): StackClientAppJson<HasTokenStore, ProjectId>,\n setCurrentUser(userJsonPromise: Promise<CurrentUserCrud['Client']['Read'] | null>): void,\n getConstructorOptions(): StackClientAppConstructorOptions<HasTokenStore, ProjectId> & { inheritsFrom?: undefined },\n sendSessionReplayBatch(body: string, options: { keepalive: boolean }): Promise<Result<Response, Error>>,\n sendAnalyticsEventBatch(body: string, options: { keepalive: boolean }): Promise<Result<Response, Error>>,\n addRequestListener(listener: RequestListener): () => void,\n sendRequest(path: string, requestOptions: RequestInit, requestType?: \"client\" | \"server\" | \"admin\"): Promise<Response>,\n getRedirectMethod(): RedirectMethod,\n redirectToUrl(url: string | URL, options?: { replace?: boolean }): Promise<void>,\n redirectToHandler(handlerName: keyof HandlerUrls, options?: RedirectToOptions): Promise<void>,\n signInWithTokens(tokens: { accessToken: string, refreshToken: string }): Promise<void>,\n },\n }\n & AsyncStoreProperty<\"project\", [], Project, false>\n & AsyncStoreProperty<\n \"item\",\n [{ itemId: string, userId: string } | { itemId: string, teamId: string } | { itemId: string, customCustomerId: string }],\n Item,\n false\n >\n & AsyncStoreProperty<\n \"products\",\n [options: CustomerProductsRequestOptions],\n CustomerProductsList,\n true\n >\n & AsyncStoreProperty<\n \"invoices\",\n [options: CustomerInvoicesRequestOptions],\n CustomerInvoicesList,\n true\n >\n & { [K in `redirectTo${Capitalize<keyof Omit<HandlerUrls, 'handler' | 'oauthCallback'>>}`]: (options?: RedirectToOptions) => Promise<void> }\n & AuthLike<HasTokenStore extends false ? { tokenStore: TokenStoreInit } : { tokenStore?: TokenStoreInit }>\n);\n/** @deprecated Use `HexclaveClientAppConstructor` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport type StackClientAppConstructor = {\n new <\n TokenStoreType extends string,\n HasTokenStore extends (TokenStoreType extends {} ? true : boolean),\n ProjectId extends string\n >(options: StackClientAppConstructorOptions<HasTokenStore, ProjectId>): StackClientApp<HasTokenStore, ProjectId>,\n new(options: StackClientAppConstructorOptions<boolean, string>): StackClientApp<boolean, string>,\n\n [hexclaveAppInternalsSymbol]: {\n fromClientJson<HasTokenStore extends boolean, ProjectId extends string>(\n json: StackClientAppJson<HasTokenStore, ProjectId>\n ): StackClientApp<HasTokenStore, ProjectId>,\n },\n};\nexport type HexclaveClientAppConstructorOptions<HasTokenStore extends boolean, ProjectId extends string> = StackClientAppConstructorOptions<HasTokenStore, ProjectId>;\nexport type HexclaveClientAppJson<HasTokenStore extends boolean, ProjectId extends string> = StackClientAppJson<HasTokenStore, ProjectId>;\nexport type HexclaveClientApp<HasTokenStore extends boolean = boolean, ProjectId extends string = string> = StackClientApp<HasTokenStore, ProjectId>;\nexport type HexclaveClientAppConstructor = StackClientAppConstructor;\nexport const HexclaveClientApp: HexclaveClientAppConstructor = _HexclaveClientAppImpl;\n/** @deprecated Use `HexclaveClientApp` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */\nexport const StackClientApp: StackClientAppConstructor = HexclaveClientApp;\n"],"mappings":";;;AAoLA,MAAa,oBAAkD;;AAE/D,MAAa,iBAA4C"}
@@ -76,7 +76,7 @@ describe("handler URL targets", () => {
76
76
  })).toThrowError(/cannot be a custom page/);
77
77
  });
78
78
  it("uses hosted defaults for unspecified URLs", () => {
79
- vi.stubEnv("NEXT_PUBLIC_STACK_HOSTED_HANDLER_DOMAIN_SUFFIX", ".example-stack-hosted.test");
79
+ vi.stubEnv("NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX", ".example-stack-hosted.test");
80
80
  const urls = resolveHandlerUrls({
81
81
  projectId: "project-id",
82
82
  urls: {
@@ -89,7 +89,7 @@ describe("handler URL targets", () => {
89
89
  expect(urls.cliAuthConfirm).toBe("https://project-id.example-stack-hosted.test/handler/cli-auth-confirm");
90
90
  });
91
91
  it("keeps redirect-only post-auth targets local even when the default target is hosted", () => {
92
- vi.stubEnv("NEXT_PUBLIC_STACK_HOSTED_HANDLER_DOMAIN_SUFFIX", ".example-stack-hosted.test");
92
+ vi.stubEnv("NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX", ".example-stack-hosted.test");
93
93
  const urls = resolveHandlerUrls({
94
94
  projectId: "project-id",
95
95
  urls: { default: { type: "hosted" } }
@@ -126,7 +126,7 @@ describe("handler URL targets", () => {
126
126
  `);
127
127
  });
128
128
  it("inherits a hosted default target for the OAuth callback", () => {
129
- vi.stubEnv("NEXT_PUBLIC_STACK_HOSTED_HANDLER_DOMAIN_SUFFIX", ".example-stack-hosted.test");
129
+ vi.stubEnv("NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX", ".example-stack-hosted.test");
130
130
  const urls = resolveHandlerUrls({
131
131
  projectId: "project-id",
132
132
  urls: { default: { type: "hosted" } }
@@ -154,7 +154,7 @@ describe("handler URL targets", () => {
154
154
  })).toBe("https://app.example.test/cli/authorize?login_code=login-code");
155
155
  });
156
156
  it("uses default target for unknown /handler/* pages", () => {
157
- vi.stubEnv("NEXT_PUBLIC_STACK_HOSTED_HANDLER_DOMAIN_SUFFIX", ".example-stack-hosted.test");
157
+ vi.stubEnv("NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX", ".example-stack-hosted.test");
158
158
  expect(resolveUnknownHandlerPathFallbackUrl({
159
159
  defaultTarget: { type: "hosted" },
160
160
  projectId: "project-id",
@@ -162,7 +162,7 @@ describe("handler URL targets", () => {
162
162
  })).toBe("https://project-id.example-stack-hosted.test/handler/custom-page");
163
163
  });
164
164
  it("uses the full hosted handler URL template when configured", () => {
165
- vi.stubEnv("NEXT_PUBLIC_STACK_HOSTED_HANDLER_URL_TEMPLATE", "http://{projectId}.localhost:${NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX:-81}09/{hostedPath}");
165
+ vi.stubEnv("NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_URL_TEMPLATE", "http://{projectId}.localhost:${NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX:-81}09/{hostedPath}");
166
166
  vi.stubEnv("NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX", "93");
167
167
  const urls = resolveHandlerUrls({
168
168
  projectId: "project-id",
@@ -172,14 +172,14 @@ describe("handler URL targets", () => {
172
172
  expect(urls.accountSettings).toBe("http://project-id.localhost:9309/handler/account-settings");
173
173
  });
174
174
  it("validates the hosted handler URL template placeholders", () => {
175
- vi.stubEnv("NEXT_PUBLIC_STACK_HOSTED_HANDLER_URL_TEMPLATE", "http://localhost:9309/{projectId}/handler");
175
+ vi.stubEnv("NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_URL_TEMPLATE", "http://localhost:9309/{projectId}/handler");
176
176
  expect(() => resolveHandlerUrls({
177
177
  projectId: "project-id",
178
178
  urls: { default: { type: "hosted" } }
179
179
  })).toThrowError(/\{projectId\} and \{hostedPath\}/);
180
180
  });
181
181
  it("rejects hosted handler URL templates that put the project ID in the path", () => {
182
- vi.stubEnv("NEXT_PUBLIC_STACK_HOSTED_HANDLER_URL_TEMPLATE", "http://localhost:9309/{projectId}/{hostedPath}");
182
+ vi.stubEnv("NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_URL_TEMPLATE", "http://localhost:9309/{projectId}/{hostedPath}");
183
183
  expect(() => resolveHandlerUrls({
184
184
  projectId: "project-id",
185
185
  urls: { default: { type: "hosted" } }
@@ -1 +1 @@
1
- {"version":3,"file":"url-targets.test.js","names":[],"sources":["../../../../src/lib/hexclave-app/url-targets.test.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { afterEach, describe, expect, it, vi } from \"vitest\";\nimport { buildCliAuthConfirmUrl, getPagePrompt, isLocalHandlerUrlTarget, resolveHandlerUrls, resolveUnknownHandlerPathFallbackUrl } from \"./url-targets\";\n\ndescribe(\"handler URL targets\", () => {\n afterEach(() => {\n vi.unstubAllEnvs();\n });\n\n it(\"treats handler-component targets the same as omitted values\", () => {\n const urls = resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n handler: \"/custom-handler\",\n signIn: { type: \"handler-component\" },\n },\n });\n\n expect(urls.signIn).toBe(\"/custom-handler/sign-in\");\n });\n\n it(\"treats custom v0 page targets like legacy string targets\", () => {\n const urls = resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n handler: \"/custom-handler\",\n signIn: { type: \"handler-component\" },\n signUp: { type: \"custom\", url: \"/sign-up-explicit\", version: 0 },\n },\n });\n\n expect(urls.signIn).toBe(\"/custom-handler/sign-in\");\n expect(urls.signUp).toBe(\"/sign-up-explicit\");\n });\n\n it(\"throws on v0 custom target for handler page\", () => {\n expect(() => resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n handler: { type: \"custom\", url: \"/custom-handler\", version: 0 },\n },\n })).toThrowError(/cannot be a custom page/);\n });\n\n it(\"supports the latest documented custom target version\", () => {\n const signInPrompt = getPagePrompt(\"signIn\");\n if (signInPrompt == null) {\n throw new Error(\"Expected signIn prompt metadata to exist\");\n }\n\n const urls = resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n signIn: { type: \"custom\", url: \"/custom-sign-in\", version: signInPrompt.latestVersion },\n },\n });\n\n expect(urls.signIn).toBe(\"/custom-sign-in\");\n });\n\n it(\"throws on custom target versions newer than the latest supported version\", () => {\n const signInPrompt = getPagePrompt(\"signIn\");\n if (signInPrompt == null) {\n throw new Error(\"Expected signIn prompt metadata to exist\");\n }\n\n expect(() => resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n signIn: { type: \"custom\", url: \"/custom-sign-in\", version: signInPrompt.latestVersion + 1 },\n },\n })).toThrowError(/Unsupported custom page version/);\n });\n\n it(\"throws on non-zero custom version for handler page\", () => {\n expect(() => resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n handler: { type: \"custom\", url: \"/custom-handler\", version: 1 },\n },\n })).toThrowError(/cannot be a custom page/);\n });\n\n it(\"uses hosted defaults for unspecified URLs\", () => {\n vi.stubEnv(\"NEXT_PUBLIC_STACK_HOSTED_HANDLER_DOMAIN_SUFFIX\", \".example-stack-hosted.test\");\n\n const urls = resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n signUp: \"/sign-up\",\n default: { type: \"hosted\" },\n },\n });\n\n expect(urls.signUp).toBe(\"/sign-up\");\n expect(urls.signIn).toBe(\"https://project-id.example-stack-hosted.test/handler/sign-in\");\n expect(urls.cliAuthConfirm).toBe(\"https://project-id.example-stack-hosted.test/handler/cli-auth-confirm\");\n });\n\n it(\"keeps redirect-only post-auth targets local even when the default target is hosted\", () => {\n vi.stubEnv(\"NEXT_PUBLIC_STACK_HOSTED_HANDLER_DOMAIN_SUFFIX\", \".example-stack-hosted.test\");\n\n const urls = resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n default: { type: \"hosted\" },\n },\n });\n\n expect(urls.signIn).toBe(\"https://project-id.example-stack-hosted.test/handler/sign-in\");\n expect(urls.signOut).toBe(\"https://project-id.example-stack-hosted.test/handler/sign-out\");\n expect(urls.home).toBe(\"/\");\n expect(urls.afterSignIn).toBe(\"/\");\n expect(urls.afterSignUp).toBe(\"/\");\n expect(urls.afterSignOut).toBe(\"/\");\n });\n\n it(\"rejects absolute OAuth callback string targets\", () => {\n expect(() => resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n oauthCallback: \"https://app.example.test/oauth-callback\",\n },\n })).toThrowErrorMatchingInlineSnapshot(`\n [HexclaveAssertionError: OAuth callback URLs must be relative.\n\n This is likely an error in Hexclave. Please make sure you are running the newest version and report it.]\n `);\n });\n\n it(\"rejects absolute OAuth callback custom targets\", () => {\n expect(() => resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n oauthCallback: { type: \"custom\", url: \"https://app.example.test/oauth-callback\", version: 0 },\n },\n })).toThrowErrorMatchingInlineSnapshot(`\n [HexclaveAssertionError: OAuth callback URLs must be relative.\n\n This is likely an error in Hexclave. Please make sure you are running the newest version and report it.]\n `);\n });\n\n it(\"inherits a hosted default target for the OAuth callback\", () => {\n vi.stubEnv(\"NEXT_PUBLIC_STACK_HOSTED_HANDLER_DOMAIN_SUFFIX\", \".example-stack-hosted.test\");\n\n const urls = resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n default: { type: \"hosted\" },\n },\n });\n\n expect(urls.signIn).toBe(\"https://project-id.example-stack-hosted.test/handler/sign-in\");\n expect(urls.oauthCallback).toBe(\"https://project-id.example-stack-hosted.test/handler/oauth-callback\");\n });\n\n it(\"supports custom CLI auth confirmation targets\", () => {\n const cliAuthConfirmPrompt = getPagePrompt(\"cliAuthConfirm\");\n if (cliAuthConfirmPrompt == null) {\n throw new Error(\"Expected cliAuthConfirm prompt metadata to exist\");\n }\n\n const urls = resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n cliAuthConfirm: { type: \"custom\", url: \"/cli/authorize\", version: cliAuthConfirmPrompt.latestVersion },\n },\n });\n\n expect(urls.cliAuthConfirm).toBe(\"/cli/authorize\");\n });\n\n it(\"builds CLI auth login URLs from the resolved confirmation target\", () => {\n expect(buildCliAuthConfirmUrl({\n cliAuthConfirmUrl: \"/cli/authorize\",\n appUrl: \"https://app.example.test/base\",\n loginCode: \"login-code\",\n })).toBe(\"https://app.example.test/cli/authorize?login_code=login-code\");\n });\n\n it(\"uses default target for unknown /handler/* pages\", () => {\n vi.stubEnv(\"NEXT_PUBLIC_STACK_HOSTED_HANDLER_DOMAIN_SUFFIX\", \".example-stack-hosted.test\");\n\n const url = resolveUnknownHandlerPathFallbackUrl({\n defaultTarget: { type: \"hosted\" },\n projectId: \"project-id\",\n unknownPath: \"custom-page\",\n });\n\n expect(url).toBe(\"https://project-id.example-stack-hosted.test/handler/custom-page\");\n });\n\n it(\"uses the full hosted handler URL template when configured\", () => {\n vi.stubEnv(\"NEXT_PUBLIC_STACK_HOSTED_HANDLER_URL_TEMPLATE\", \"http://{projectId}.localhost:${NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX:-81}09/{hostedPath}\");\n vi.stubEnv(\"NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX\", \"93\");\n\n const urls = resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n default: { type: \"hosted\" },\n },\n });\n\n expect(urls.signIn).toBe(\"http://project-id.localhost:9309/handler/sign-in\");\n expect(urls.accountSettings).toBe(\"http://project-id.localhost:9309/handler/account-settings\");\n });\n\n it(\"validates the hosted handler URL template placeholders\", () => {\n vi.stubEnv(\"NEXT_PUBLIC_STACK_HOSTED_HANDLER_URL_TEMPLATE\", \"http://localhost:9309/{projectId}/handler\");\n\n expect(() => resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n default: { type: \"hosted\" },\n },\n })).toThrowError(/\\{projectId\\} and \\{hostedPath\\}/);\n });\n\n it(\"rejects hosted handler URL templates that put the project ID in the path\", () => {\n vi.stubEnv(\"NEXT_PUBLIC_STACK_HOSTED_HANDLER_URL_TEMPLATE\", \"http://localhost:9309/{projectId}/{hostedPath}\");\n\n expect(() => resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n default: { type: \"hosted\" },\n },\n })).toThrowErrorMatchingInlineSnapshot(`\n [HexclaveAssertionError: The hosted handler URL template must put {projectId} in the hostname.\n\n This is likely an error in Hexclave. Please make sure you are running the newest version and report it.]\n `);\n });\n});\n\ndescribe(\"isLocalHandlerUrlTarget\", () => {\n it(\"treats relative handler URLs as local targets\", () => {\n expect(isLocalHandlerUrlTarget({\n targetUrl: \"/handler/sign-in\",\n handlerPath: \"/handler\",\n currentOrigin: \"http://p91.localhost:9101\",\n })).toBe(true);\n });\n\n it(\"treats same-origin absolute handler URLs as local targets\", () => {\n expect(isLocalHandlerUrlTarget({\n targetUrl: \"http://p91.localhost:9101/handler/sign-in\",\n handlerPath: \"/handler\",\n currentOrigin: \"http://p91.localhost:9101\",\n })).toBe(true);\n });\n\n it(\"treats cross-origin absolute handler URLs as non-local targets\", () => {\n expect(isLocalHandlerUrlTarget({\n targetUrl: \"https://project-id.built-with-hexclave.com/handler/sign-in\",\n handlerPath: \"/handler\",\n currentOrigin: \"http://p91.localhost:9101\",\n })).toBe(false);\n });\n\n it(\"treats non-handler paths as non-local targets\", () => {\n expect(isLocalHandlerUrlTarget({\n targetUrl: \"/projects\",\n handlerPath: \"/handler\",\n currentOrigin: \"http://p91.localhost:9101\",\n })).toBe(false);\n });\n});\n"],"mapp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GACF,CAAC,CAAC,CAAC,aAAa,mCAAmC;GACpD;AAEF,IAAG,kFAAkF;AACnF,KAAG,QAAQ,iDAAiD,iDAAiD;AAE7G,eAAa,mBAAmB;GAC9B,WAAW;GACX,MAAM,EACJ,SAAS,EAAE,MAAM,UAAU,EAC5B;GACF,CAAC,CAAC,CAAC,mCAAmC;;;;MAIrC;GACF;EACF;AAEF,SAAS,iCAAiC;AACxC,IAAG,uDAAuD;AACxD,SAAO,wBAAwB;GAC7B,WAAW;GACX,aAAa;GACb,eAAe;GAChB,CAAC,CAAC,CAAC,KAAK,KAAK;GACd;AAEF,IAAG,mEAAmE;AACpE,SAAO,wBAAwB;GAC7B,WAAW;GACX,aAAa;GACb,eAAe;GAChB,CAAC,CAAC,CAAC,KAAK,KAAK;GACd;AAEF,IAAG,wEAAwE;AACzE,SAAO,wBAAwB;GAC7B,WAAW;GACX,aAAa;GACb,eAAe;GAChB,CAAC,CAAC,CAAC,KAAK,MAAM;GACf;AAEF,IAAG,uDAAuD;AACxD,SAAO,wBAAwB;GAC7B,WAAW;GACX,aAAa;GACb,eAAe;GAChB,CAAC,CAAC,CAAC,KAAK,MAAM;GACf;EACF"}
1
+ {"version":3,"file":"url-targets.test.js","names":[],"sources":["../../../../src/lib/hexclave-app/url-targets.test.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { afterEach, describe, expect, it, vi } from \"vitest\";\nimport { buildCliAuthConfirmUrl, getPagePrompt, isLocalHandlerUrlTarget, resolveHandlerUrls, resolveUnknownHandlerPathFallbackUrl } from \"./url-targets\";\n\ndescribe(\"handler URL targets\", () => {\n afterEach(() => {\n vi.unstubAllEnvs();\n });\n\n it(\"treats handler-component targets the same as omitted values\", () => {\n const urls = resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n handler: \"/custom-handler\",\n signIn: { type: \"handler-component\" },\n },\n });\n\n expect(urls.signIn).toBe(\"/custom-handler/sign-in\");\n });\n\n it(\"treats custom v0 page targets like legacy string targets\", () => {\n const urls = resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n handler: \"/custom-handler\",\n signIn: { type: \"handler-component\" },\n signUp: { type: \"custom\", url: \"/sign-up-explicit\", version: 0 },\n },\n });\n\n expect(urls.signIn).toBe(\"/custom-handler/sign-in\");\n expect(urls.signUp).toBe(\"/sign-up-explicit\");\n });\n\n it(\"throws on v0 custom target for handler page\", () => {\n expect(() => resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n handler: { type: \"custom\", url: \"/custom-handler\", version: 0 },\n },\n })).toThrowError(/cannot be a custom page/);\n });\n\n it(\"supports the latest documented custom target version\", () => {\n const signInPrompt = getPagePrompt(\"signIn\");\n if (signInPrompt == null) {\n throw new Error(\"Expected signIn prompt metadata to exist\");\n }\n\n const urls = resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n signIn: { type: \"custom\", url: \"/custom-sign-in\", version: signInPrompt.latestVersion },\n },\n });\n\n expect(urls.signIn).toBe(\"/custom-sign-in\");\n });\n\n it(\"throws on custom target versions newer than the latest supported version\", () => {\n const signInPrompt = getPagePrompt(\"signIn\");\n if (signInPrompt == null) {\n throw new Error(\"Expected signIn prompt metadata to exist\");\n }\n\n expect(() => resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n signIn: { type: \"custom\", url: \"/custom-sign-in\", version: signInPrompt.latestVersion + 1 },\n },\n })).toThrowError(/Unsupported custom page version/);\n });\n\n it(\"throws on non-zero custom version for handler page\", () => {\n expect(() => resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n handler: { type: \"custom\", url: \"/custom-handler\", version: 1 },\n },\n })).toThrowError(/cannot be a custom page/);\n });\n\n it(\"uses hosted defaults for unspecified URLs\", () => {\n vi.stubEnv(\"NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX\", \".example-stack-hosted.test\");\n\n const urls = resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n signUp: \"/sign-up\",\n default: { type: \"hosted\" },\n },\n });\n\n expect(urls.signUp).toBe(\"/sign-up\");\n expect(urls.signIn).toBe(\"https://project-id.example-stack-hosted.test/handler/sign-in\");\n expect(urls.cliAuthConfirm).toBe(\"https://project-id.example-stack-hosted.test/handler/cli-auth-confirm\");\n });\n\n it(\"keeps redirect-only post-auth targets local even when the default target is hosted\", () => {\n vi.stubEnv(\"NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX\", \".example-stack-hosted.test\");\n\n const urls = resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n default: { type: \"hosted\" },\n },\n });\n\n expect(urls.signIn).toBe(\"https://project-id.example-stack-hosted.test/handler/sign-in\");\n expect(urls.signOut).toBe(\"https://project-id.example-stack-hosted.test/handler/sign-out\");\n expect(urls.home).toBe(\"/\");\n expect(urls.afterSignIn).toBe(\"/\");\n expect(urls.afterSignUp).toBe(\"/\");\n expect(urls.afterSignOut).toBe(\"/\");\n });\n\n it(\"rejects absolute OAuth callback string targets\", () => {\n expect(() => resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n oauthCallback: \"https://app.example.test/oauth-callback\",\n },\n })).toThrowErrorMatchingInlineSnapshot(`\n [HexclaveAssertionError: OAuth callback URLs must be relative.\n\n This is likely an error in Hexclave. Please make sure you are running the newest version and report it.]\n `);\n });\n\n it(\"rejects absolute OAuth callback custom targets\", () => {\n expect(() => resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n oauthCallback: { type: \"custom\", url: \"https://app.example.test/oauth-callback\", version: 0 },\n },\n })).toThrowErrorMatchingInlineSnapshot(`\n [HexclaveAssertionError: OAuth callback URLs must be relative.\n\n This is likely an error in Hexclave. Please make sure you are running the newest version and report it.]\n `);\n });\n\n it(\"inherits a hosted default target for the OAuth callback\", () => {\n vi.stubEnv(\"NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX\", \".example-stack-hosted.test\");\n\n const urls = resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n default: { type: \"hosted\" },\n },\n });\n\n expect(urls.signIn).toBe(\"https://project-id.example-stack-hosted.test/handler/sign-in\");\n expect(urls.oauthCallback).toBe(\"https://project-id.example-stack-hosted.test/handler/oauth-callback\");\n });\n\n it(\"supports custom CLI auth confirmation targets\", () => {\n const cliAuthConfirmPrompt = getPagePrompt(\"cliAuthConfirm\");\n if (cliAuthConfirmPrompt == null) {\n throw new Error(\"Expected cliAuthConfirm prompt metadata to exist\");\n }\n\n const urls = resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n cliAuthConfirm: { type: \"custom\", url: \"/cli/authorize\", version: cliAuthConfirmPrompt.latestVersion },\n },\n });\n\n expect(urls.cliAuthConfirm).toBe(\"/cli/authorize\");\n });\n\n it(\"builds CLI auth login URLs from the resolved confirmation target\", () => {\n expect(buildCliAuthConfirmUrl({\n cliAuthConfirmUrl: \"/cli/authorize\",\n appUrl: \"https://app.example.test/base\",\n loginCode: \"login-code\",\n })).toBe(\"https://app.example.test/cli/authorize?login_code=login-code\");\n });\n\n it(\"uses default target for unknown /handler/* pages\", () => {\n vi.stubEnv(\"NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX\", \".example-stack-hosted.test\");\n\n const url = resolveUnknownHandlerPathFallbackUrl({\n defaultTarget: { type: \"hosted\" },\n projectId: \"project-id\",\n unknownPath: \"custom-page\",\n });\n\n expect(url).toBe(\"https://project-id.example-stack-hosted.test/handler/custom-page\");\n });\n\n it(\"uses the full hosted handler URL template when configured\", () => {\n vi.stubEnv(\"NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_URL_TEMPLATE\", \"http://{projectId}.localhost:${NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX:-81}09/{hostedPath}\");\n vi.stubEnv(\"NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX\", \"93\");\n\n const urls = resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n default: { type: \"hosted\" },\n },\n });\n\n expect(urls.signIn).toBe(\"http://project-id.localhost:9309/handler/sign-in\");\n expect(urls.accountSettings).toBe(\"http://project-id.localhost:9309/handler/account-settings\");\n });\n\n it(\"validates the hosted handler URL template placeholders\", () => {\n vi.stubEnv(\"NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_URL_TEMPLATE\", \"http://localhost:9309/{projectId}/handler\");\n\n expect(() => resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n default: { type: \"hosted\" },\n },\n })).toThrowError(/\\{projectId\\} and \\{hostedPath\\}/);\n });\n\n it(\"rejects hosted handler URL templates that put the project ID in the path\", () => {\n vi.stubEnv(\"NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_URL_TEMPLATE\", \"http://localhost:9309/{projectId}/{hostedPath}\");\n\n expect(() => resolveHandlerUrls({\n projectId: \"project-id\",\n urls: {\n default: { type: \"hosted\" },\n },\n })).toThrowErrorMatchingInlineSnapshot(`\n [HexclaveAssertionError: The hosted handler URL template must put {projectId} in the hostname.\n\n This is likely an error in Hexclave. Please make sure you are running the newest version and report it.]\n `);\n });\n});\n\ndescribe(\"isLocalHandlerUrlTarget\", () => {\n it(\"treats relative handler URLs as local targets\", () => {\n expect(isLocalHandlerUrlTarget({\n targetUrl: \"/handler/sign-in\",\n handlerPath: \"/handler\",\n currentOrigin: \"http://p91.localhost:9101\",\n })).toBe(true);\n });\n\n it(\"treats same-origin absolute handler URLs as local targets\", () => {\n expect(isLocalHandlerUrlTarget({\n targetUrl: \"http://p91.localhost:9101/handler/sign-in\",\n handlerPath: \"/handler\",\n currentOrigin: \"http://p91.localhost:9101\",\n })).toBe(true);\n });\n\n it(\"treats cross-origin absolute handler URLs as non-local targets\", () => {\n expect(isLocalHandlerUrlTarget({\n targetUrl: \"https://project-id.built-with-hexclave.com/handler/sign-in\",\n handlerPath: \"/handler\",\n currentOrigin: \"http://p91.localhost:9101\",\n })).toBe(false);\n });\n\n it(\"treats non-handler paths as non-local targets\", () => {\n expect(isLocalHandlerUrlTarget({\n targetUrl: \"/projects\",\n handlerPath: \"/handler\",\n currentOrigin: \"http://p91.localhost:9101\",\n })).toBe(false);\n });\n});\n"],"mappings":";;;;AAOA,SAAS,6BAA6B;AACpC,iBAAgB;AACd,KAAG,eAAe;GAClB;AAEF,IAAG,qEAAqE;AAStE,SARa,mBAAmB;GAC9B,WAAW;GACX,MAAM;IACJ,SAAS;IACT,QAAQ,EAAE,MAAM,qBAAqB;IACtC;GACF,CAAC,CAEU,OAAO,CAAC,KAAK,0BAA0B;GACnD;AAEF,IAAG,kEAAkE;EACnE,MAAM,OAAO,mBAAmB;GAC9B,WAAW;GACX,MAAM;IACJ,SAAS;IACT,QAAQ,EAAE,MAAM,qBAAqB;IACrC,QAAQ;KAAE,MAAM;KAAU,KAAK;KAAqB,SAAS;KAAG;IACjE;GACF,CAAC;AAEF,SAAO,KAAK,OAAO,CAAC,KAAK,0BAA0B;AACnD,SAAO,KAAK,OAAO,CAAC,KAAK,oBAAoB;GAC7C;AAEF,IAAG,qDAAqD;AACtD,eAAa,mBAAmB;GAC9B,WAAW;GACX,MAAM,EACJ,SAAS;IAAE,MAAM;IAAU,KAAK;IAAmB,SAAS;IAAG,EAChE;GACF,CAAC,CAAC,CAAC,aAAa,0BAA0B;GAC3C;AAEF,IAAG,8DAA8D;EAC/D,MAAM,eAAe,cAAc,SAAS;AAC5C,MAAI,gBAAgB,KAClB,OAAM,IAAI,MAAM,2CAA2C;AAU7D,SAPa,mBAAmB;GAC9B,WAAW;GACX,MAAM,EACJ,QAAQ;IAAE,MAAM;IAAU,KAAK;IAAmB,SAAS,aAAa;IAAe,EACxF;GACF,CAAC,CAEU,OAAO,CAAC,KAAK,kBAAkB;GAC3C;AAEF,IAAG,kFAAkF;EACnF,MAAM,eAAe,cAAc,SAAS;AAC5C,MAAI,gBAAgB,KAClB,OA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D;AAC5E,SAAO,KAAK,gBAAgB,CAAC,KAAK,4DAA4D;GAC9F;AAEF,IAAG,gEAAgE;AACjE,KAAG,QAAQ,oDAAoD,4CAA4C;AAE3G,eAAa,mBAAmB;GAC9B,WAAW;GACX,MAAM,EACJ,SAAS,EAAE,MAAM,UAAU,EAC5B;GACF,CAAC,CAAC,CAAC,aAAa,mCAAmC;GACpD;AAEF,IAAG,kFAAkF;AACnF,KAAG,QAAQ,oDAAoD,iDAAiD;AAEhH,eAAa,mBAAmB;GAC9B,WAAW;GACX,MAAM,EACJ,SAAS,EAAE,MAAM,UAAU,EAC5B;GACF,CAAC,CAAC,CAAC,mCAAmC;;;;MAIrC;GACF;EACF;AAEF,SAAS,iCAAiC;AACxC,IAAG,uDAAuD;AACxD,SAAO,wBAAwB;GAC7B,WAAW;GACX,aAAa;GACb,eAAe;GAChB,CAAC,CAAC,CAAC,KAAK,KAAK;GACd;AAEF,IAAG,mEAAmE;AACpE,SAAO,wBAAwB;GAC7B,WAAW;GACX,aAAa;GACb,eAAe;GAChB,CAAC,CAAC,CAAC,KAAK,KAAK;GACd;AAEF,IAAG,wEAAwE;AACzE,SAAO,wBAAwB;GAC7B,WAAW;GACX,aAAa;GACb,eAAe;GAChB,CAAC,CAAC,CAAC,KAAK,MAAM;GACf;AAEF,IAAG,uDAAuD;AACxD,SAAO,wBAAwB;GAC7B,WAAW;GACX,aAAa;GACb,eAAe;GAChB,CAAC,CAAC,CAAC,KAAK,MAAM;GACf;EACF"}
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
 
3
+ import { deindent } from "@hexclave/shared/dist/utils/strings";
3
4
  import { TooltipProvider } from "@hexclave/ui";
4
5
  import React from "react";
5
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
7
  import Color from "color";
7
- import { deindent } from "@hexclave/shared/dist/utils/strings";
8
8
  import { globalCSS } from "../generated/global-css.js";
9
9
  import { BrowserScript } from "../utils/browser-script.js";
10
10
  import { DEFAULT_THEME } from "../utils/constants.js";
@@ -3,64 +3,64 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
3
  //#region src/generated/env.ts
4
4
  const envVars = {
5
5
  get HEXCLAVE_PORT_PREFIX() {
6
- return (typeof process !== "undefined" ? process.env.HEXCLAVE_PORT_PREFIX : void 0) ?? {}.env?.HEXCLAVE_PORT_PREFIX ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX : void 0) ?? {}.env?.NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX ?? (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_PORT_PREFIX : void 0) ?? {}.env?.VITE_HEXCLAVE_PORT_PREFIX ?? (typeof process !== "undefined" ? process.env.STACK_PORT_PREFIX : void 0) ?? {}.env?.STACK_PORT_PREFIX ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_PORT_PREFIX : void 0) ?? {}.env?.NEXT_PUBLIC_STACK_PORT_PREFIX ?? (typeof process !== "undefined" ? process.env.VITE_STACK_PORT_PREFIX : void 0) ?? {}.env?.VITE_STACK_PORT_PREFIX ?? void 0;
6
+ return (typeof process !== "undefined" ? process.env.HEXCLAVE_PORT_PREFIX : void 0) || {}.env?.HEXCLAVE_PORT_PREFIX || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX : void 0) || {}.env?.NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX || (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_PORT_PREFIX : void 0) || {}.env?.VITE_HEXCLAVE_PORT_PREFIX || (typeof process !== "undefined" ? process.env.STACK_PORT_PREFIX : void 0) || {}.env?.STACK_PORT_PREFIX || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_PORT_PREFIX : void 0) || {}.env?.NEXT_PUBLIC_STACK_PORT_PREFIX || (typeof process !== "undefined" ? process.env.VITE_STACK_PORT_PREFIX : void 0) || {}.env?.VITE_STACK_PORT_PREFIX || void 0;
7
7
  },
8
8
  get HEXCLAVE_PROJECT_ID() {
9
- return (typeof process !== "undefined" ? process.env.HEXCLAVE_PROJECT_ID : void 0) ?? {}.env?.HEXCLAVE_PROJECT_ID ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_PROJECT_ID : void 0) ?? {}.env?.NEXT_PUBLIC_HEXCLAVE_PROJECT_ID ?? (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_PROJECT_ID : void 0) ?? {}.env?.VITE_HEXCLAVE_PROJECT_ID ?? (typeof process !== "undefined" ? process.env.STACK_PROJECT_ID : void 0) ?? {}.env?.STACK_PROJECT_ID ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_PROJECT_ID : void 0) ?? {}.env?.NEXT_PUBLIC_STACK_PROJECT_ID ?? (typeof process !== "undefined" ? process.env.VITE_STACK_PROJECT_ID : void 0) ?? {}.env?.VITE_STACK_PROJECT_ID ?? void 0;
9
+ return (typeof process !== "undefined" ? process.env.HEXCLAVE_PROJECT_ID : void 0) || {}.env?.HEXCLAVE_PROJECT_ID || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_PROJECT_ID : void 0) || {}.env?.NEXT_PUBLIC_HEXCLAVE_PROJECT_ID || (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_PROJECT_ID : void 0) || {}.env?.VITE_HEXCLAVE_PROJECT_ID || (typeof process !== "undefined" ? process.env.STACK_PROJECT_ID : void 0) || {}.env?.STACK_PROJECT_ID || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_PROJECT_ID : void 0) || {}.env?.NEXT_PUBLIC_STACK_PROJECT_ID || (typeof process !== "undefined" ? process.env.VITE_STACK_PROJECT_ID : void 0) || {}.env?.VITE_STACK_PROJECT_ID || void 0;
10
10
  },
11
11
  get HEXCLAVE_PUBLISHABLE_CLIENT_KEY() {
12
- return (typeof process !== "undefined" ? process.env.HEXCLAVE_PUBLISHABLE_CLIENT_KEY : void 0) ?? {}.env?.HEXCLAVE_PUBLISHABLE_CLIENT_KEY ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_PUBLISHABLE_CLIENT_KEY : void 0) ?? {}.env?.NEXT_PUBLIC_HEXCLAVE_PUBLISHABLE_CLIENT_KEY ?? (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_PUBLISHABLE_CLIENT_KEY : void 0) ?? {}.env?.VITE_HEXCLAVE_PUBLISHABLE_CLIENT_KEY ?? (typeof process !== "undefined" ? process.env.STACK_PUBLISHABLE_CLIENT_KEY : void 0) ?? {}.env?.STACK_PUBLISHABLE_CLIENT_KEY ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY : void 0) ?? {}.env?.NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY ?? (typeof process !== "undefined" ? process.env.VITE_STACK_PUBLISHABLE_CLIENT_KEY : void 0) ?? {}.env?.VITE_STACK_PUBLISHABLE_CLIENT_KEY ?? void 0;
12
+ return (typeof process !== "undefined" ? process.env.HEXCLAVE_PUBLISHABLE_CLIENT_KEY : void 0) || {}.env?.HEXCLAVE_PUBLISHABLE_CLIENT_KEY || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_PUBLISHABLE_CLIENT_KEY : void 0) || {}.env?.NEXT_PUBLIC_HEXCLAVE_PUBLISHABLE_CLIENT_KEY || (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_PUBLISHABLE_CLIENT_KEY : void 0) || {}.env?.VITE_HEXCLAVE_PUBLISHABLE_CLIENT_KEY || (typeof process !== "undefined" ? process.env.STACK_PUBLISHABLE_CLIENT_KEY : void 0) || {}.env?.STACK_PUBLISHABLE_CLIENT_KEY || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY : void 0) || {}.env?.NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY || (typeof process !== "undefined" ? process.env.VITE_STACK_PUBLISHABLE_CLIENT_KEY : void 0) || {}.env?.VITE_STACK_PUBLISHABLE_CLIENT_KEY || void 0;
13
13
  },
14
14
  get HEXCLAVE_SECRET_SERVER_KEY() {
15
- return (typeof process !== "undefined" ? process.env.HEXCLAVE_SECRET_SERVER_KEY : void 0) ?? {}.env?.HEXCLAVE_SECRET_SERVER_KEY ?? (typeof process !== "undefined" ? process.env.STACK_SECRET_SERVER_KEY : void 0) ?? {}.env?.STACK_SECRET_SERVER_KEY ?? void 0;
15
+ return (typeof process !== "undefined" ? process.env.HEXCLAVE_SECRET_SERVER_KEY : void 0) || {}.env?.HEXCLAVE_SECRET_SERVER_KEY || (typeof process !== "undefined" ? process.env.STACK_SECRET_SERVER_KEY : void 0) || {}.env?.STACK_SECRET_SERVER_KEY || void 0;
16
16
  },
17
17
  get HEXCLAVE_SUPER_SECRET_ADMIN_KEY() {
18
- return (typeof process !== "undefined" ? process.env.HEXCLAVE_SUPER_SECRET_ADMIN_KEY : void 0) ?? {}.env?.HEXCLAVE_SUPER_SECRET_ADMIN_KEY ?? (typeof process !== "undefined" ? process.env.STACK_SUPER_SECRET_ADMIN_KEY : void 0) ?? {}.env?.STACK_SUPER_SECRET_ADMIN_KEY ?? void 0;
18
+ return (typeof process !== "undefined" ? process.env.HEXCLAVE_SUPER_SECRET_ADMIN_KEY : void 0) || {}.env?.HEXCLAVE_SUPER_SECRET_ADMIN_KEY || (typeof process !== "undefined" ? process.env.STACK_SUPER_SECRET_ADMIN_KEY : void 0) || {}.env?.STACK_SUPER_SECRET_ADMIN_KEY || void 0;
19
19
  },
20
20
  get HEXCLAVE_EXTRA_REQUEST_HEADERS() {
21
- return (typeof process !== "undefined" ? process.env.HEXCLAVE_EXTRA_REQUEST_HEADERS : void 0) ?? {}.env?.HEXCLAVE_EXTRA_REQUEST_HEADERS ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_EXTRA_REQUEST_HEADERS : void 0) ?? {}.env?.NEXT_PUBLIC_HEXCLAVE_EXTRA_REQUEST_HEADERS ?? (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_EXTRA_REQUEST_HEADERS : void 0) ?? {}.env?.VITE_HEXCLAVE_EXTRA_REQUEST_HEADERS ?? (typeof process !== "undefined" ? process.env.STACK_EXTRA_REQUEST_HEADERS : void 0) ?? {}.env?.STACK_EXTRA_REQUEST_HEADERS ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_EXTRA_REQUEST_HEADERS : void 0) ?? {}.env?.NEXT_PUBLIC_STACK_EXTRA_REQUEST_HEADERS ?? (typeof process !== "undefined" ? process.env.VITE_STACK_EXTRA_REQUEST_HEADERS : void 0) ?? {}.env?.VITE_STACK_EXTRA_REQUEST_HEADERS ?? void 0;
21
+ return (typeof process !== "undefined" ? process.env.HEXCLAVE_EXTRA_REQUEST_HEADERS : void 0) || {}.env?.HEXCLAVE_EXTRA_REQUEST_HEADERS || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_EXTRA_REQUEST_HEADERS : void 0) || {}.env?.NEXT_PUBLIC_HEXCLAVE_EXTRA_REQUEST_HEADERS || (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_EXTRA_REQUEST_HEADERS : void 0) || {}.env?.VITE_HEXCLAVE_EXTRA_REQUEST_HEADERS || (typeof process !== "undefined" ? process.env.STACK_EXTRA_REQUEST_HEADERS : void 0) || {}.env?.STACK_EXTRA_REQUEST_HEADERS || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_EXTRA_REQUEST_HEADERS : void 0) || {}.env?.NEXT_PUBLIC_STACK_EXTRA_REQUEST_HEADERS || (typeof process !== "undefined" ? process.env.VITE_STACK_EXTRA_REQUEST_HEADERS : void 0) || {}.env?.VITE_STACK_EXTRA_REQUEST_HEADERS || void 0;
22
22
  },
23
23
  get HEXCLAVE_API_URL_BROWSER() {
24
- return (typeof process !== "undefined" ? process.env.HEXCLAVE_API_URL_BROWSER : void 0) ?? {}.env?.HEXCLAVE_API_URL_BROWSER ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_API_URL_BROWSER : void 0) ?? {}.env?.NEXT_PUBLIC_HEXCLAVE_API_URL_BROWSER ?? (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_API_URL_BROWSER : void 0) ?? {}.env?.VITE_HEXCLAVE_API_URL_BROWSER ?? (typeof process !== "undefined" ? process.env.STACK_API_URL_BROWSER : void 0) ?? {}.env?.STACK_API_URL_BROWSER ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_API_URL_BROWSER : void 0) ?? {}.env?.NEXT_PUBLIC_STACK_API_URL_BROWSER ?? (typeof process !== "undefined" ? process.env.VITE_STACK_API_URL_BROWSER : void 0) ?? {}.env?.VITE_STACK_API_URL_BROWSER ?? (typeof process !== "undefined" ? process.env.BROWSER_STACK_API_URL : void 0) ?? {}.env?.BROWSER_STACK_API_URL ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_BROWSER_STACK_API_URL : void 0) ?? {}.env?.NEXT_PUBLIC_BROWSER_STACK_API_URL ?? (typeof process !== "undefined" ? process.env.VITE_BROWSER_STACK_API_URL : void 0) ?? {}.env?.VITE_BROWSER_STACK_API_URL ?? (typeof process !== "undefined" ? process.env.BROWSER_HEXCLAVE_API_URL : void 0) ?? {}.env?.BROWSER_HEXCLAVE_API_URL ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_BROWSER_HEXCLAVE_API_URL : void 0) ?? {}.env?.NEXT_PUBLIC_BROWSER_HEXCLAVE_API_URL ?? (typeof process !== "undefined" ? process.env.VITE_BROWSER_HEXCLAVE_API_URL : void 0) ?? {}.env?.VITE_BROWSER_HEXCLAVE_API_URL ?? void 0;
24
+ return (typeof process !== "undefined" ? process.env.HEXCLAVE_API_URL_BROWSER : void 0) || {}.env?.HEXCLAVE_API_URL_BROWSER || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_API_URL_BROWSER : void 0) || {}.env?.NEXT_PUBLIC_HEXCLAVE_API_URL_BROWSER || (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_API_URL_BROWSER : void 0) || {}.env?.VITE_HEXCLAVE_API_URL_BROWSER || (typeof process !== "undefined" ? process.env.STACK_API_URL_BROWSER : void 0) || {}.env?.STACK_API_URL_BROWSER || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_API_URL_BROWSER : void 0) || {}.env?.NEXT_PUBLIC_STACK_API_URL_BROWSER || (typeof process !== "undefined" ? process.env.VITE_STACK_API_URL_BROWSER : void 0) || {}.env?.VITE_STACK_API_URL_BROWSER || (typeof process !== "undefined" ? process.env.BROWSER_STACK_API_URL : void 0) || {}.env?.BROWSER_STACK_API_URL || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_BROWSER_STACK_API_URL : void 0) || {}.env?.NEXT_PUBLIC_BROWSER_STACK_API_URL || (typeof process !== "undefined" ? process.env.VITE_BROWSER_STACK_API_URL : void 0) || {}.env?.VITE_BROWSER_STACK_API_URL || (typeof process !== "undefined" ? process.env.BROWSER_HEXCLAVE_API_URL : void 0) || {}.env?.BROWSER_HEXCLAVE_API_URL || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_BROWSER_HEXCLAVE_API_URL : void 0) || {}.env?.NEXT_PUBLIC_BROWSER_HEXCLAVE_API_URL || (typeof process !== "undefined" ? process.env.VITE_BROWSER_HEXCLAVE_API_URL : void 0) || {}.env?.VITE_BROWSER_HEXCLAVE_API_URL || void 0;
25
25
  },
26
26
  get HEXCLAVE_API_URL_SERVER() {
27
- return (typeof process !== "undefined" ? process.env.HEXCLAVE_API_URL_SERVER : void 0) ?? {}.env?.HEXCLAVE_API_URL_SERVER ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_API_URL_SERVER : void 0) ?? {}.env?.NEXT_PUBLIC_HEXCLAVE_API_URL_SERVER ?? (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_API_URL_SERVER : void 0) ?? {}.env?.VITE_HEXCLAVE_API_URL_SERVER ?? (typeof process !== "undefined" ? process.env.STACK_API_URL_SERVER : void 0) ?? {}.env?.STACK_API_URL_SERVER ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_API_URL_SERVER : void 0) ?? {}.env?.NEXT_PUBLIC_STACK_API_URL_SERVER ?? (typeof process !== "undefined" ? process.env.VITE_STACK_API_URL_SERVER : void 0) ?? {}.env?.VITE_STACK_API_URL_SERVER ?? (typeof process !== "undefined" ? process.env.SERVER_STACK_API_URL : void 0) ?? {}.env?.SERVER_STACK_API_URL ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_SERVER_STACK_API_URL : void 0) ?? {}.env?.NEXT_PUBLIC_SERVER_STACK_API_URL ?? (typeof process !== "undefined" ? process.env.VITE_SERVER_STACK_API_URL : void 0) ?? {}.env?.VITE_SERVER_STACK_API_URL ?? (typeof process !== "undefined" ? process.env.SERVER_HEXCLAVE_API_URL : void 0) ?? {}.env?.SERVER_HEXCLAVE_API_URL ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_SERVER_HEXCLAVE_API_URL : void 0) ?? {}.env?.NEXT_PUBLIC_SERVER_HEXCLAVE_API_URL ?? (typeof process !== "undefined" ? process.env.VITE_SERVER_HEXCLAVE_API_URL : void 0) ?? {}.env?.VITE_SERVER_HEXCLAVE_API_URL ?? void 0;
27
+ return (typeof process !== "undefined" ? process.env.HEXCLAVE_API_URL_SERVER : void 0) || {}.env?.HEXCLAVE_API_URL_SERVER || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_API_URL_SERVER : void 0) || {}.env?.NEXT_PUBLIC_HEXCLAVE_API_URL_SERVER || (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_API_URL_SERVER : void 0) || {}.env?.VITE_HEXCLAVE_API_URL_SERVER || (typeof process !== "undefined" ? process.env.STACK_API_URL_SERVER : void 0) || {}.env?.STACK_API_URL_SERVER || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_API_URL_SERVER : void 0) || {}.env?.NEXT_PUBLIC_STACK_API_URL_SERVER || (typeof process !== "undefined" ? process.env.VITE_STACK_API_URL_SERVER : void 0) || {}.env?.VITE_STACK_API_URL_SERVER || (typeof process !== "undefined" ? process.env.SERVER_STACK_API_URL : void 0) || {}.env?.SERVER_STACK_API_URL || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_SERVER_STACK_API_URL : void 0) || {}.env?.NEXT_PUBLIC_SERVER_STACK_API_URL || (typeof process !== "undefined" ? process.env.VITE_SERVER_STACK_API_URL : void 0) || {}.env?.VITE_SERVER_STACK_API_URL || (typeof process !== "undefined" ? process.env.SERVER_HEXCLAVE_API_URL : void 0) || {}.env?.SERVER_HEXCLAVE_API_URL || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_SERVER_HEXCLAVE_API_URL : void 0) || {}.env?.NEXT_PUBLIC_SERVER_HEXCLAVE_API_URL || (typeof process !== "undefined" ? process.env.VITE_SERVER_HEXCLAVE_API_URL : void 0) || {}.env?.VITE_SERVER_HEXCLAVE_API_URL || void 0;
28
28
  },
29
29
  get HEXCLAVE_API_URL() {
30
- return (typeof process !== "undefined" ? process.env.HEXCLAVE_API_URL : void 0) ?? {}.env?.HEXCLAVE_API_URL ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_API_URL : void 0) ?? {}.env?.NEXT_PUBLIC_HEXCLAVE_API_URL ?? (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_API_URL : void 0) ?? {}.env?.VITE_HEXCLAVE_API_URL ?? (typeof process !== "undefined" ? process.env.STACK_API_URL : void 0) ?? {}.env?.STACK_API_URL ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_API_URL : void 0) ?? {}.env?.NEXT_PUBLIC_STACK_API_URL ?? (typeof process !== "undefined" ? process.env.VITE_STACK_API_URL : void 0) ?? {}.env?.VITE_STACK_API_URL ?? (typeof process !== "undefined" ? process.env.HEXCLAVE_URL : void 0) ?? {}.env?.HEXCLAVE_URL ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_URL : void 0) ?? {}.env?.NEXT_PUBLIC_HEXCLAVE_URL ?? (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_URL : void 0) ?? {}.env?.VITE_HEXCLAVE_URL ?? (typeof process !== "undefined" ? process.env.STACK_URL : void 0) ?? {}.env?.STACK_URL ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_URL : void 0) ?? {}.env?.NEXT_PUBLIC_STACK_URL ?? (typeof process !== "undefined" ? process.env.VITE_STACK_URL : void 0) ?? {}.env?.VITE_STACK_URL ?? (typeof process !== "undefined" ? process.env.STACK_URL : void 0) ?? {}.env?.STACK_URL ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_URL : void 0) ?? {}.env?.NEXT_PUBLIC_STACK_URL ?? (typeof process !== "undefined" ? process.env.VITE_STACK_URL : void 0) ?? {}.env?.VITE_STACK_URL ?? void 0;
30
+ return (typeof process !== "undefined" ? process.env.HEXCLAVE_API_URL : void 0) || {}.env?.HEXCLAVE_API_URL || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_API_URL : void 0) || {}.env?.NEXT_PUBLIC_HEXCLAVE_API_URL || (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_API_URL : void 0) || {}.env?.VITE_HEXCLAVE_API_URL || (typeof process !== "undefined" ? process.env.STACK_API_URL : void 0) || {}.env?.STACK_API_URL || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_API_URL : void 0) || {}.env?.NEXT_PUBLIC_STACK_API_URL || (typeof process !== "undefined" ? process.env.VITE_STACK_API_URL : void 0) || {}.env?.VITE_STACK_API_URL || (typeof process !== "undefined" ? process.env.HEXCLAVE_URL : void 0) || {}.env?.HEXCLAVE_URL || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_URL : void 0) || {}.env?.NEXT_PUBLIC_HEXCLAVE_URL || (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_URL : void 0) || {}.env?.VITE_HEXCLAVE_URL || (typeof process !== "undefined" ? process.env.STACK_URL : void 0) || {}.env?.STACK_URL || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_URL : void 0) || {}.env?.NEXT_PUBLIC_STACK_URL || (typeof process !== "undefined" ? process.env.VITE_STACK_URL : void 0) || {}.env?.VITE_STACK_URL || void 0;
31
31
  },
32
32
  get HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX() {
33
- return (typeof process !== "undefined" ? process.env.HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX : void 0) ?? {}.env?.HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX : void 0) ?? {}.env?.NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX ?? (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX : void 0) ?? {}.env?.VITE_HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX ?? (typeof process !== "undefined" ? process.env.STACK_HOSTED_HANDLER_DOMAIN_SUFFIX : void 0) ?? {}.env?.STACK_HOSTED_HANDLER_DOMAIN_SUFFIX ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_HOSTED_HANDLER_DOMAIN_SUFFIX : void 0) ?? {}.env?.NEXT_PUBLIC_STACK_HOSTED_HANDLER_DOMAIN_SUFFIX ?? (typeof process !== "undefined" ? process.env.VITE_STACK_HOSTED_HANDLER_DOMAIN_SUFFIX : void 0) ?? {}.env?.VITE_STACK_HOSTED_HANDLER_DOMAIN_SUFFIX ?? void 0;
33
+ return (typeof process !== "undefined" ? process.env.HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX : void 0) || {}.env?.HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX : void 0) || {}.env?.NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX || (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX : void 0) || {}.env?.VITE_HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX || (typeof process !== "undefined" ? process.env.STACK_HOSTED_HANDLER_DOMAIN_SUFFIX : void 0) || {}.env?.STACK_HOSTED_HANDLER_DOMAIN_SUFFIX || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_HOSTED_HANDLER_DOMAIN_SUFFIX : void 0) || {}.env?.NEXT_PUBLIC_STACK_HOSTED_HANDLER_DOMAIN_SUFFIX || (typeof process !== "undefined" ? process.env.VITE_STACK_HOSTED_HANDLER_DOMAIN_SUFFIX : void 0) || {}.env?.VITE_STACK_HOSTED_HANDLER_DOMAIN_SUFFIX || void 0;
34
34
  },
35
35
  get HEXCLAVE_HOSTED_HANDLER_URL_TEMPLATE() {
36
- return (typeof process !== "undefined" ? process.env.HEXCLAVE_HOSTED_HANDLER_URL_TEMPLATE : void 0) ?? {}.env?.HEXCLAVE_HOSTED_HANDLER_URL_TEMPLATE ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_URL_TEMPLATE : void 0) ?? {}.env?.NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_URL_TEMPLATE ?? (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_HOSTED_HANDLER_URL_TEMPLATE : void 0) ?? {}.env?.VITE_HEXCLAVE_HOSTED_HANDLER_URL_TEMPLATE ?? (typeof process !== "undefined" ? process.env.STACK_HOSTED_HANDLER_URL_TEMPLATE : void 0) ?? {}.env?.STACK_HOSTED_HANDLER_URL_TEMPLATE ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_HOSTED_HANDLER_URL_TEMPLATE : void 0) ?? {}.env?.NEXT_PUBLIC_STACK_HOSTED_HANDLER_URL_TEMPLATE ?? (typeof process !== "undefined" ? process.env.VITE_STACK_HOSTED_HANDLER_URL_TEMPLATE : void 0) ?? {}.env?.VITE_STACK_HOSTED_HANDLER_URL_TEMPLATE ?? void 0;
36
+ return (typeof process !== "undefined" ? process.env.HEXCLAVE_HOSTED_HANDLER_URL_TEMPLATE : void 0) || {}.env?.HEXCLAVE_HOSTED_HANDLER_URL_TEMPLATE || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_URL_TEMPLATE : void 0) || {}.env?.NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_URL_TEMPLATE || (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_HOSTED_HANDLER_URL_TEMPLATE : void 0) || {}.env?.VITE_HEXCLAVE_HOSTED_HANDLER_URL_TEMPLATE || (typeof process !== "undefined" ? process.env.STACK_HOSTED_HANDLER_URL_TEMPLATE : void 0) || {}.env?.STACK_HOSTED_HANDLER_URL_TEMPLATE || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_HOSTED_HANDLER_URL_TEMPLATE : void 0) || {}.env?.NEXT_PUBLIC_STACK_HOSTED_HANDLER_URL_TEMPLATE || (typeof process !== "undefined" ? process.env.VITE_STACK_HOSTED_HANDLER_URL_TEMPLATE : void 0) || {}.env?.VITE_STACK_HOSTED_HANDLER_URL_TEMPLATE || void 0;
37
37
  },
38
38
  get HEXCLAVE_STRIPE_PUBLISHABLE_KEY() {
39
- return (typeof process !== "undefined" ? process.env.HEXCLAVE_STRIPE_PUBLISHABLE_KEY : void 0) ?? {}.env?.HEXCLAVE_STRIPE_PUBLISHABLE_KEY ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_STRIPE_PUBLISHABLE_KEY : void 0) ?? {}.env?.NEXT_PUBLIC_HEXCLAVE_STRIPE_PUBLISHABLE_KEY ?? (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_STRIPE_PUBLISHABLE_KEY : void 0) ?? {}.env?.VITE_HEXCLAVE_STRIPE_PUBLISHABLE_KEY ?? (typeof process !== "undefined" ? process.env.STACK_STRIPE_PUBLISHABLE_KEY : void 0) ?? {}.env?.STACK_STRIPE_PUBLISHABLE_KEY ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_STRIPE_PUBLISHABLE_KEY : void 0) ?? {}.env?.NEXT_PUBLIC_STACK_STRIPE_PUBLISHABLE_KEY ?? (typeof process !== "undefined" ? process.env.VITE_STACK_STRIPE_PUBLISHABLE_KEY : void 0) ?? {}.env?.VITE_STACK_STRIPE_PUBLISHABLE_KEY ?? void 0;
39
+ return (typeof process !== "undefined" ? process.env.HEXCLAVE_STRIPE_PUBLISHABLE_KEY : void 0) || {}.env?.HEXCLAVE_STRIPE_PUBLISHABLE_KEY || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_STRIPE_PUBLISHABLE_KEY : void 0) || {}.env?.NEXT_PUBLIC_HEXCLAVE_STRIPE_PUBLISHABLE_KEY || (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_STRIPE_PUBLISHABLE_KEY : void 0) || {}.env?.VITE_HEXCLAVE_STRIPE_PUBLISHABLE_KEY || (typeof process !== "undefined" ? process.env.STACK_STRIPE_PUBLISHABLE_KEY : void 0) || {}.env?.STACK_STRIPE_PUBLISHABLE_KEY || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_STRIPE_PUBLISHABLE_KEY : void 0) || {}.env?.NEXT_PUBLIC_STACK_STRIPE_PUBLISHABLE_KEY || (typeof process !== "undefined" ? process.env.VITE_STACK_STRIPE_PUBLISHABLE_KEY : void 0) || {}.env?.VITE_STACK_STRIPE_PUBLISHABLE_KEY || void 0;
40
40
  },
41
41
  get HEXCLAVE_BOT_CHALLENGE_SITE_KEY() {
42
- return (typeof process !== "undefined" ? process.env.HEXCLAVE_BOT_CHALLENGE_SITE_KEY : void 0) ?? {}.env?.HEXCLAVE_BOT_CHALLENGE_SITE_KEY ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_BOT_CHALLENGE_SITE_KEY : void 0) ?? {}.env?.NEXT_PUBLIC_HEXCLAVE_BOT_CHALLENGE_SITE_KEY ?? (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_BOT_CHALLENGE_SITE_KEY : void 0) ?? {}.env?.VITE_HEXCLAVE_BOT_CHALLENGE_SITE_KEY ?? (typeof process !== "undefined" ? process.env.STACK_BOT_CHALLENGE_SITE_KEY : void 0) ?? {}.env?.STACK_BOT_CHALLENGE_SITE_KEY ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_BOT_CHALLENGE_SITE_KEY : void 0) ?? {}.env?.NEXT_PUBLIC_STACK_BOT_CHALLENGE_SITE_KEY ?? (typeof process !== "undefined" ? process.env.VITE_STACK_BOT_CHALLENGE_SITE_KEY : void 0) ?? {}.env?.VITE_STACK_BOT_CHALLENGE_SITE_KEY ?? void 0;
42
+ return (typeof process !== "undefined" ? process.env.HEXCLAVE_BOT_CHALLENGE_SITE_KEY : void 0) || {}.env?.HEXCLAVE_BOT_CHALLENGE_SITE_KEY || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_BOT_CHALLENGE_SITE_KEY : void 0) || {}.env?.NEXT_PUBLIC_HEXCLAVE_BOT_CHALLENGE_SITE_KEY || (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_BOT_CHALLENGE_SITE_KEY : void 0) || {}.env?.VITE_HEXCLAVE_BOT_CHALLENGE_SITE_KEY || (typeof process !== "undefined" ? process.env.STACK_BOT_CHALLENGE_SITE_KEY : void 0) || {}.env?.STACK_BOT_CHALLENGE_SITE_KEY || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_BOT_CHALLENGE_SITE_KEY : void 0) || {}.env?.NEXT_PUBLIC_STACK_BOT_CHALLENGE_SITE_KEY || (typeof process !== "undefined" ? process.env.VITE_STACK_BOT_CHALLENGE_SITE_KEY : void 0) || {}.env?.VITE_STACK_BOT_CHALLENGE_SITE_KEY || void 0;
43
43
  },
44
44
  get HEXCLAVE_BOT_CHALLENGE_INVISIBLE_SITE_KEY() {
45
- return (typeof process !== "undefined" ? process.env.HEXCLAVE_BOT_CHALLENGE_INVISIBLE_SITE_KEY : void 0) ?? {}.env?.HEXCLAVE_BOT_CHALLENGE_INVISIBLE_SITE_KEY ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_BOT_CHALLENGE_INVISIBLE_SITE_KEY : void 0) ?? {}.env?.NEXT_PUBLIC_HEXCLAVE_BOT_CHALLENGE_INVISIBLE_SITE_KEY ?? (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_BOT_CHALLENGE_INVISIBLE_SITE_KEY : void 0) ?? {}.env?.VITE_HEXCLAVE_BOT_CHALLENGE_INVISIBLE_SITE_KEY ?? (typeof process !== "undefined" ? process.env.STACK_BOT_CHALLENGE_INVISIBLE_SITE_KEY : void 0) ?? {}.env?.STACK_BOT_CHALLENGE_INVISIBLE_SITE_KEY ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_BOT_CHALLENGE_INVISIBLE_SITE_KEY : void 0) ?? {}.env?.NEXT_PUBLIC_STACK_BOT_CHALLENGE_INVISIBLE_SITE_KEY ?? (typeof process !== "undefined" ? process.env.VITE_STACK_BOT_CHALLENGE_INVISIBLE_SITE_KEY : void 0) ?? {}.env?.VITE_STACK_BOT_CHALLENGE_INVISIBLE_SITE_KEY ?? void 0;
45
+ return (typeof process !== "undefined" ? process.env.HEXCLAVE_BOT_CHALLENGE_INVISIBLE_SITE_KEY : void 0) || {}.env?.HEXCLAVE_BOT_CHALLENGE_INVISIBLE_SITE_KEY || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_BOT_CHALLENGE_INVISIBLE_SITE_KEY : void 0) || {}.env?.NEXT_PUBLIC_HEXCLAVE_BOT_CHALLENGE_INVISIBLE_SITE_KEY || (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_BOT_CHALLENGE_INVISIBLE_SITE_KEY : void 0) || {}.env?.VITE_HEXCLAVE_BOT_CHALLENGE_INVISIBLE_SITE_KEY || (typeof process !== "undefined" ? process.env.STACK_BOT_CHALLENGE_INVISIBLE_SITE_KEY : void 0) || {}.env?.STACK_BOT_CHALLENGE_INVISIBLE_SITE_KEY || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_BOT_CHALLENGE_INVISIBLE_SITE_KEY : void 0) || {}.env?.NEXT_PUBLIC_STACK_BOT_CHALLENGE_INVISIBLE_SITE_KEY || (typeof process !== "undefined" ? process.env.VITE_STACK_BOT_CHALLENGE_INVISIBLE_SITE_KEY : void 0) || {}.env?.VITE_STACK_BOT_CHALLENGE_INVISIBLE_SITE_KEY || void 0;
46
46
  },
47
47
  get HEXCLAVE_IS_LOCAL_EMULATOR() {
48
- return (typeof process !== "undefined" ? process.env.HEXCLAVE_IS_LOCAL_EMULATOR : void 0) ?? {}.env?.HEXCLAVE_IS_LOCAL_EMULATOR ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_IS_LOCAL_EMULATOR : void 0) ?? {}.env?.NEXT_PUBLIC_HEXCLAVE_IS_LOCAL_EMULATOR ?? (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_IS_LOCAL_EMULATOR : void 0) ?? {}.env?.VITE_HEXCLAVE_IS_LOCAL_EMULATOR ?? (typeof process !== "undefined" ? process.env.STACK_IS_LOCAL_EMULATOR : void 0) ?? {}.env?.STACK_IS_LOCAL_EMULATOR ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_IS_LOCAL_EMULATOR : void 0) ?? {}.env?.NEXT_PUBLIC_STACK_IS_LOCAL_EMULATOR ?? (typeof process !== "undefined" ? process.env.VITE_STACK_IS_LOCAL_EMULATOR : void 0) ?? {}.env?.VITE_STACK_IS_LOCAL_EMULATOR ?? void 0;
48
+ return (typeof process !== "undefined" ? process.env.HEXCLAVE_IS_LOCAL_EMULATOR : void 0) || {}.env?.HEXCLAVE_IS_LOCAL_EMULATOR || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_IS_LOCAL_EMULATOR : void 0) || {}.env?.NEXT_PUBLIC_HEXCLAVE_IS_LOCAL_EMULATOR || (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_IS_LOCAL_EMULATOR : void 0) || {}.env?.VITE_HEXCLAVE_IS_LOCAL_EMULATOR || (typeof process !== "undefined" ? process.env.STACK_IS_LOCAL_EMULATOR : void 0) || {}.env?.STACK_IS_LOCAL_EMULATOR || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_IS_LOCAL_EMULATOR : void 0) || {}.env?.NEXT_PUBLIC_STACK_IS_LOCAL_EMULATOR || (typeof process !== "undefined" ? process.env.VITE_STACK_IS_LOCAL_EMULATOR : void 0) || {}.env?.VITE_STACK_IS_LOCAL_EMULATOR || void 0;
49
49
  },
50
50
  get HEXCLAVE_POSTHOG_KEY() {
51
- return (typeof process !== "undefined" ? process.env.HEXCLAVE_POSTHOG_KEY : void 0) ?? {}.env?.HEXCLAVE_POSTHOG_KEY ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_POSTHOG_KEY : void 0) ?? {}.env?.NEXT_PUBLIC_HEXCLAVE_POSTHOG_KEY ?? (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_POSTHOG_KEY : void 0) ?? {}.env?.VITE_HEXCLAVE_POSTHOG_KEY ?? (typeof process !== "undefined" ? process.env.STACK_POSTHOG_KEY : void 0) ?? {}.env?.STACK_POSTHOG_KEY ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_POSTHOG_KEY : void 0) ?? {}.env?.NEXT_PUBLIC_STACK_POSTHOG_KEY ?? (typeof process !== "undefined" ? process.env.VITE_STACK_POSTHOG_KEY : void 0) ?? {}.env?.VITE_STACK_POSTHOG_KEY ?? void 0;
51
+ return (typeof process !== "undefined" ? process.env.HEXCLAVE_POSTHOG_KEY : void 0) || {}.env?.HEXCLAVE_POSTHOG_KEY || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_POSTHOG_KEY : void 0) || {}.env?.NEXT_PUBLIC_HEXCLAVE_POSTHOG_KEY || (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_POSTHOG_KEY : void 0) || {}.env?.VITE_HEXCLAVE_POSTHOG_KEY || (typeof process !== "undefined" ? process.env.STACK_POSTHOG_KEY : void 0) || {}.env?.STACK_POSTHOG_KEY || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_POSTHOG_KEY : void 0) || {}.env?.NEXT_PUBLIC_STACK_POSTHOG_KEY || (typeof process !== "undefined" ? process.env.VITE_STACK_POSTHOG_KEY : void 0) || {}.env?.VITE_STACK_POSTHOG_KEY || void 0;
52
52
  },
53
53
  get HEXCLAVE_SVIX_SERVER_URL() {
54
- return (typeof process !== "undefined" ? process.env.HEXCLAVE_SVIX_SERVER_URL : void 0) ?? {}.env?.HEXCLAVE_SVIX_SERVER_URL ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_SVIX_SERVER_URL : void 0) ?? {}.env?.NEXT_PUBLIC_HEXCLAVE_SVIX_SERVER_URL ?? (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_SVIX_SERVER_URL : void 0) ?? {}.env?.VITE_HEXCLAVE_SVIX_SERVER_URL ?? (typeof process !== "undefined" ? process.env.STACK_SVIX_SERVER_URL : void 0) ?? {}.env?.STACK_SVIX_SERVER_URL ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_SVIX_SERVER_URL : void 0) ?? {}.env?.NEXT_PUBLIC_STACK_SVIX_SERVER_URL ?? (typeof process !== "undefined" ? process.env.VITE_STACK_SVIX_SERVER_URL : void 0) ?? {}.env?.VITE_STACK_SVIX_SERVER_URL ?? void 0;
54
+ return (typeof process !== "undefined" ? process.env.HEXCLAVE_SVIX_SERVER_URL : void 0) || {}.env?.HEXCLAVE_SVIX_SERVER_URL || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_SVIX_SERVER_URL : void 0) || {}.env?.NEXT_PUBLIC_HEXCLAVE_SVIX_SERVER_URL || (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_SVIX_SERVER_URL : void 0) || {}.env?.VITE_HEXCLAVE_SVIX_SERVER_URL || (typeof process !== "undefined" ? process.env.STACK_SVIX_SERVER_URL : void 0) || {}.env?.STACK_SVIX_SERVER_URL || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_SVIX_SERVER_URL : void 0) || {}.env?.NEXT_PUBLIC_STACK_SVIX_SERVER_URL || (typeof process !== "undefined" ? process.env.VITE_STACK_SVIX_SERVER_URL : void 0) || {}.env?.VITE_STACK_SVIX_SERVER_URL || void 0;
55
55
  },
56
56
  get HEXCLAVE_SENTRY_DSN() {
57
- return (typeof process !== "undefined" ? process.env.HEXCLAVE_SENTRY_DSN : void 0) ?? {}.env?.HEXCLAVE_SENTRY_DSN ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_SENTRY_DSN : void 0) ?? {}.env?.NEXT_PUBLIC_HEXCLAVE_SENTRY_DSN ?? (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_SENTRY_DSN : void 0) ?? {}.env?.VITE_HEXCLAVE_SENTRY_DSN ?? (typeof process !== "undefined" ? process.env.STACK_SENTRY_DSN : void 0) ?? {}.env?.STACK_SENTRY_DSN ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_SENTRY_DSN : void 0) ?? {}.env?.NEXT_PUBLIC_STACK_SENTRY_DSN ?? (typeof process !== "undefined" ? process.env.VITE_STACK_SENTRY_DSN : void 0) ?? {}.env?.VITE_STACK_SENTRY_DSN ?? void 0;
57
+ return (typeof process !== "undefined" ? process.env.HEXCLAVE_SENTRY_DSN : void 0) || {}.env?.HEXCLAVE_SENTRY_DSN || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_SENTRY_DSN : void 0) || {}.env?.NEXT_PUBLIC_HEXCLAVE_SENTRY_DSN || (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_SENTRY_DSN : void 0) || {}.env?.VITE_HEXCLAVE_SENTRY_DSN || (typeof process !== "undefined" ? process.env.STACK_SENTRY_DSN : void 0) || {}.env?.STACK_SENTRY_DSN || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_SENTRY_DSN : void 0) || {}.env?.NEXT_PUBLIC_STACK_SENTRY_DSN || (typeof process !== "undefined" ? process.env.VITE_STACK_SENTRY_DSN : void 0) || {}.env?.VITE_STACK_SENTRY_DSN || void 0;
58
58
  },
59
59
  get HEXCLAVE_VERSION_ALERTER_SEVERE_ONLY() {
60
- return (typeof process !== "undefined" ? process.env.HEXCLAVE_VERSION_ALERTER_SEVERE_ONLY : void 0) ?? {}.env?.HEXCLAVE_VERSION_ALERTER_SEVERE_ONLY ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_VERSION_ALERTER_SEVERE_ONLY : void 0) ?? {}.env?.NEXT_PUBLIC_HEXCLAVE_VERSION_ALERTER_SEVERE_ONLY ?? (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_VERSION_ALERTER_SEVERE_ONLY : void 0) ?? {}.env?.VITE_HEXCLAVE_VERSION_ALERTER_SEVERE_ONLY ?? (typeof process !== "undefined" ? process.env.STACK_VERSION_ALERTER_SEVERE_ONLY : void 0) ?? {}.env?.STACK_VERSION_ALERTER_SEVERE_ONLY ?? (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_VERSION_ALERTER_SEVERE_ONLY : void 0) ?? {}.env?.NEXT_PUBLIC_STACK_VERSION_ALERTER_SEVERE_ONLY ?? (typeof process !== "undefined" ? process.env.VITE_STACK_VERSION_ALERTER_SEVERE_ONLY : void 0) ?? {}.env?.VITE_STACK_VERSION_ALERTER_SEVERE_ONLY ?? void 0;
60
+ return (typeof process !== "undefined" ? process.env.HEXCLAVE_VERSION_ALERTER_SEVERE_ONLY : void 0) || {}.env?.HEXCLAVE_VERSION_ALERTER_SEVERE_ONLY || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_HEXCLAVE_VERSION_ALERTER_SEVERE_ONLY : void 0) || {}.env?.NEXT_PUBLIC_HEXCLAVE_VERSION_ALERTER_SEVERE_ONLY || (typeof process !== "undefined" ? process.env.VITE_HEXCLAVE_VERSION_ALERTER_SEVERE_ONLY : void 0) || {}.env?.VITE_HEXCLAVE_VERSION_ALERTER_SEVERE_ONLY || (typeof process !== "undefined" ? process.env.STACK_VERSION_ALERTER_SEVERE_ONLY : void 0) || {}.env?.STACK_VERSION_ALERTER_SEVERE_ONLY || (typeof process !== "undefined" ? process.env.NEXT_PUBLIC_STACK_VERSION_ALERTER_SEVERE_ONLY : void 0) || {}.env?.NEXT_PUBLIC_STACK_VERSION_ALERTER_SEVERE_ONLY || (typeof process !== "undefined" ? process.env.VITE_STACK_VERSION_ALERTER_SEVERE_ONLY : void 0) || {}.env?.VITE_STACK_VERSION_ALERTER_SEVERE_ONLY || void 0;
61
61
  },
62
62
  get NODE_ENV() {
63
- return (typeof process !== "undefined" ? process.env.NODE_ENV : void 0) ?? {}.env?.NODE_ENV ?? void 0;
63
+ return (typeof process !== "undefined" ? process.env.NODE_ENV : void 0) || {}.env?.NODE_ENV || void 0;
64
64
  }
65
65
  };
66
66