@feelflow/ffid-sdk 5.18.0 → 5.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -658,6 +658,19 @@ interface FFIDSessionResponse {
658
658
  organizations: FFIDOrganization[];
659
659
  subscriptions: FFIDSubscription[];
660
660
  }
661
+ /**
662
+ * Optional metadata on successful {@link FFIDApiResponse} values (#4136).
663
+ *
664
+ * Present only on the success branch — error responses never carry `meta`.
665
+ */
666
+ interface FFIDApiResponseMeta {
667
+ /**
668
+ * Set when introspect-strategy verification could not use the configured
669
+ * cache (adapter read/write failure or `crypto.subtle` unavailable).
670
+ * Visible without a custom logger; absent when cache operated normally.
671
+ */
672
+ verificationCacheDegraded?: true;
673
+ }
661
674
  /**
662
675
  * API response wrapper (discriminated union for type safety)
663
676
  *
@@ -667,10 +680,33 @@ interface FFIDSessionResponse {
667
680
  type FFIDApiResponse<T> = {
668
681
  data: T;
669
682
  error?: undefined;
683
+ meta?: FFIDApiResponseMeta;
670
684
  } | {
671
685
  data?: undefined;
672
686
  error: FFIDError;
673
687
  };
688
+ /**
689
+ * Result of `signOut()` (#4119, extended #4136).
690
+ *
691
+ * Local credentials (tokens / local state) are always cleared when `signOut()`
692
+ * resolves without `error`. `revoked` additionally indicates whether the
693
+ * server-side revocation/sign-out actually succeeded:
694
+ *
695
+ * - `revoked: true` — no server-side session/token remains active.
696
+ * - `revoked: false` — server-side revocation failed (network error or non-2xx
697
+ * response). The access token may remain valid server-side until natural
698
+ * expiry. Non-fatal: the local sign-out still completed, but callers that
699
+ * need guaranteed revocation (e.g. shared-device flows) should surface this.
700
+ *
701
+ * Token mode (#4136): `accessTokenRevoked` / `refreshTokenRevoked` report each
702
+ * RFC 7009 revoke call. `revoked` is `true` only when every applicable token
703
+ * was revoked successfully. Cookie mode omits the per-token fields.
704
+ */
705
+ interface FFIDSignOutResult {
706
+ revoked: boolean;
707
+ accessTokenRevoked?: boolean;
708
+ refreshTokenRevoked?: boolean;
709
+ }
674
710
 
675
711
  /**
676
712
  * Response shape from `GET /api/v1/ext/analytics/config?service=<code>`.
@@ -704,23 +740,33 @@ interface FFIDAnalyticsConfig {
704
740
  * has been fired **3 times within 60 seconds**. Caller should surface a
705
741
  * manual "再度ログインする" UI rather than retry automatically (#2406 / #2411).
706
742
  *
707
- * SDK 2.18.0 only ships `'redirect_loop_detected'`. Other failure paths
708
- * (SSR environment, PKCE generation failure, empty organizationId) currently
709
- * return `error` without a `code`. New codes will be added in future minor
710
- * versions — treat this union as forward-extensible and do NOT exhaustively
711
- * `switch` over it without a `default` branch for consumer code that must
712
- * stay compatible across SDK upgrades.
743
+ * - `'state_persistence_failed'`: `redirectToAuthorize()` could not persist
744
+ * the OAuth CSRF `state` (storage unavailable / quota). Redirect is aborted
745
+ * fail-closed (#4136) callers should surface a manual retry UI.
746
+ *
747
+ * Other failure paths (SSR environment, PKCE generation failure, empty
748
+ * organizationId) currently return `error` without a `code`. Treat this union
749
+ * as forward-extensible and do NOT exhaustively `switch` over it without a
750
+ * `default` branch for consumer code that must stay compatible across SDK
751
+ * upgrades.
713
752
  */
714
- type FFIDRedirectErrorCode = 'redirect_loop_detected';
753
+ type FFIDRedirectErrorCode = 'redirect_loop_detected' | 'state_persistence_failed';
715
754
  /**
716
755
  * Result of a redirect operation (redirectToLogin / redirectToAuthorize / redirectToLogout)
717
756
  *
718
757
  * Structured return type so callers can inspect failure reasons
719
758
  * instead of receiving a bare `false`. When `code` is set, branch on it
720
759
  * for programmatic handling; otherwise log `error` for humans.
760
+ *
761
+ * `loopDetectionDisabled` (#4119): set to `true` when sessionStorage is
762
+ * unavailable (iOS WebKit private mode / eviction) so redirect-loop detection
763
+ * ran **fail-open** — the redirect fired, but repeated-redirect protection is
764
+ * disabled for this browser session. Callers that need loop protection on
765
+ * such browsers should add their own max-retry guard.
721
766
  */
722
767
  type FFIDRedirectResult = {
723
768
  success: true;
769
+ loopDetectionDisabled?: boolean;
724
770
  } | {
725
771
  success: false;
726
772
  error: string;
@@ -1476,4 +1522,4 @@ interface FFIDInquiryFormPlaceholderContext {
1476
1522
  }
1477
1523
  declare function FFIDInquiryForm({ mode, prefill, organizations, preselectedOrganizationId, categories, termsVersion, privacyVersion, termsHref, privacyHref, turnstileToken, turnstileSlot, onSubmit, onChange, legalLayout, messagePlaceholder, requireCategorySelection, unstyled, classNames, locale, className, }: FFIDInquiryFormProps): react_jsx_runtime.JSX.Element;
1478
1524
 
1479
- export { FFIDLoginButton as $, type AnnouncementListResponse as A, type AnnouncementStatus as B, type AnnouncementType as C, EFFECTIVE_SUBSCRIPTION_STATUSES as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, FFIDAnnouncementBadge as G, FFIDAnnouncementList as H, type FFIDAnnouncementsError as I, type FFIDAnnouncementsErrorCode as J, type FFIDAnnouncementsServerResponse as K, type ListAnnouncementsOptions as L, type FFIDCacheConfig as M, type FFIDContextValue as N, type FFIDInquiryCategory as O, type FFIDInquiryCategorySite2026 as P, FFIDInquiryForm as Q, type FFIDInquiryFormCategoryItem as R, type FFIDInquiryFormClassNames as S, type FFIDInquiryFormLegalLayout as T, type FFIDInquiryFormOrganization as U, type FFIDInquiryFormPlaceholderContext as V, type FFIDInquiryFormPrefill as W, type FFIDInquiryFormProps as X, type FFIDInquiryFormSubmitData as Y, type FFIDInquiryFormSubmitResult as Z, type FFIDJwtClaims as _, type FFIDPrompt as a, type FFIDOAuthTokenResponse as a0, type FFIDOAuthUserInfoMemberRole as a1, FFIDOrganizationSwitcher as a2, type FFIDRedirectErrorCode as a3, type FFIDSeatModel as a4, type FFIDServiceAccessDenialReason as a5, type FFIDServiceAccessFailPolicy as a6, FFIDSubscriptionBadge as a7, type FFIDTokenIntrospectionResponse as a8, FFIDUserMenu as a9, FFID_INQUIRY_CATEGORIES as aa, FFID_INQUIRY_CATEGORIES_SITE_2026 as ab, type UseFFIDAnnouncementsOptions as ac, type UseFFIDAnnouncementsReturn as ad, isFFIDInquiryCategorySite2026 as ae, useFFIDAnnouncements as af, type FFIDAnnouncementBadgeClassNames as ag, type FFIDAnnouncementBadgeProps as ah, type FFIDAnnouncementListClassNames as ai, type FFIDAnnouncementListProps as aj, type FFIDLoginButtonProps as ak, type FFIDOrganizationSwitcherClassNames as al, type FFIDOrganizationSwitcherProps as am, type FFIDSubscriptionBadgeClassNames as an, type FFIDSubscriptionBadgeProps as ao, type FFIDUserMenuClassNames as ap, type FFIDUserMenuProps as aq, type FFIDConfig as b, type FFIDApiResponse as c, type FFIDSessionResponse as d, type FFIDRedirectResult as e, type FFIDError as f, type FFIDSubscriptionCheckResponse as g, type FFIDCheckServiceAccessParams as h, type FFIDServiceAccessDecision as i, type FFIDAnalyticsConfig as j, type FFIDVerifyAccessTokenOptions as k, type FFIDOAuthUserInfo as l, type FFIDInquiryCreateParams as m, type FFIDInquiryCreateResponse as n, type FFIDAuthMode as o, type FFIDLogger as p, type FFIDCacheAdapter as q, type FFIDUser as r, type FFIDOrganization as s, type FFIDSubscription as t, type FFIDSubscriptionContextValue as u, type FFIDOAuthUserInfoSubscription as v, type FFIDAnnouncementsClientConfig as w, type FFIDAnnouncementsApiResponse as x, type FFIDAnnouncementsLogger as y, type Announcement as z };
1525
+ export { type FFIDInquiryFormSubmitResult as $, type AnnouncementListResponse as A, type Announcement as B, type AnnouncementStatus as C, type AnnouncementType as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, EFFECTIVE_SUBSCRIPTION_STATUSES as G, FFIDAnnouncementBadge as H, FFIDAnnouncementList as I, type FFIDAnnouncementsError as J, type FFIDAnnouncementsErrorCode as K, type ListAnnouncementsOptions as L, type FFIDAnnouncementsServerResponse as M, type FFIDApiResponseMeta as N, type FFIDCacheConfig as O, type FFIDContextValue as P, type FFIDInquiryCategory as Q, type FFIDInquiryCategorySite2026 as R, FFIDInquiryForm as S, type FFIDInquiryFormCategoryItem as T, type FFIDInquiryFormClassNames as U, type FFIDInquiryFormLegalLayout as V, type FFIDInquiryFormOrganization as W, type FFIDInquiryFormPlaceholderContext as X, type FFIDInquiryFormPrefill as Y, type FFIDInquiryFormProps as Z, type FFIDInquiryFormSubmitData as _, type FFIDPrompt as a, type FFIDJwtClaims as a0, FFIDLoginButton as a1, type FFIDOAuthTokenResponse as a2, type FFIDOAuthUserInfoMemberRole as a3, FFIDOrganizationSwitcher as a4, type FFIDRedirectErrorCode as a5, type FFIDSeatModel as a6, type FFIDServiceAccessDenialReason as a7, type FFIDServiceAccessFailPolicy as a8, FFIDSubscriptionBadge as a9, type FFIDTokenIntrospectionResponse as aa, FFIDUserMenu as ab, FFID_INQUIRY_CATEGORIES as ac, FFID_INQUIRY_CATEGORIES_SITE_2026 as ad, type UseFFIDAnnouncementsOptions as ae, type UseFFIDAnnouncementsReturn as af, isFFIDInquiryCategorySite2026 as ag, useFFIDAnnouncements as ah, type FFIDAnnouncementBadgeClassNames as ai, type FFIDAnnouncementBadgeProps as aj, type FFIDAnnouncementListClassNames as ak, type FFIDAnnouncementListProps as al, type FFIDLoginButtonProps as am, type FFIDOrganizationSwitcherClassNames as an, type FFIDOrganizationSwitcherProps as ao, type FFIDSubscriptionBadgeClassNames as ap, type FFIDSubscriptionBadgeProps as aq, type FFIDUserMenuClassNames as ar, type FFIDUserMenuProps as as, type FFIDConfig as b, type FFIDApiResponse as c, type FFIDSessionResponse as d, type FFIDSignOutResult as e, type FFIDRedirectResult as f, type FFIDError as g, type FFIDSubscriptionCheckResponse as h, type FFIDCheckServiceAccessParams as i, type FFIDServiceAccessDecision as j, type FFIDAnalyticsConfig as k, type FFIDVerifyAccessTokenOptions as l, type FFIDOAuthUserInfo as m, type FFIDInquiryCreateParams as n, type FFIDInquiryCreateResponse as o, type FFIDAuthMode as p, type FFIDLogger as q, type FFIDCacheAdapter as r, type FFIDUser as s, type FFIDOrganization as t, type FFIDSubscription as u, type FFIDSubscriptionContextValue as v, type FFIDOAuthUserInfoSubscription as w, type FFIDAnnouncementsClientConfig as x, type FFIDAnnouncementsApiResponse as y, type FFIDAnnouncementsLogger as z };
@@ -658,6 +658,19 @@ interface FFIDSessionResponse {
658
658
  organizations: FFIDOrganization[];
659
659
  subscriptions: FFIDSubscription[];
660
660
  }
661
+ /**
662
+ * Optional metadata on successful {@link FFIDApiResponse} values (#4136).
663
+ *
664
+ * Present only on the success branch — error responses never carry `meta`.
665
+ */
666
+ interface FFIDApiResponseMeta {
667
+ /**
668
+ * Set when introspect-strategy verification could not use the configured
669
+ * cache (adapter read/write failure or `crypto.subtle` unavailable).
670
+ * Visible without a custom logger; absent when cache operated normally.
671
+ */
672
+ verificationCacheDegraded?: true;
673
+ }
661
674
  /**
662
675
  * API response wrapper (discriminated union for type safety)
663
676
  *
@@ -667,10 +680,33 @@ interface FFIDSessionResponse {
667
680
  type FFIDApiResponse<T> = {
668
681
  data: T;
669
682
  error?: undefined;
683
+ meta?: FFIDApiResponseMeta;
670
684
  } | {
671
685
  data?: undefined;
672
686
  error: FFIDError;
673
687
  };
688
+ /**
689
+ * Result of `signOut()` (#4119, extended #4136).
690
+ *
691
+ * Local credentials (tokens / local state) are always cleared when `signOut()`
692
+ * resolves without `error`. `revoked` additionally indicates whether the
693
+ * server-side revocation/sign-out actually succeeded:
694
+ *
695
+ * - `revoked: true` — no server-side session/token remains active.
696
+ * - `revoked: false` — server-side revocation failed (network error or non-2xx
697
+ * response). The access token may remain valid server-side until natural
698
+ * expiry. Non-fatal: the local sign-out still completed, but callers that
699
+ * need guaranteed revocation (e.g. shared-device flows) should surface this.
700
+ *
701
+ * Token mode (#4136): `accessTokenRevoked` / `refreshTokenRevoked` report each
702
+ * RFC 7009 revoke call. `revoked` is `true` only when every applicable token
703
+ * was revoked successfully. Cookie mode omits the per-token fields.
704
+ */
705
+ interface FFIDSignOutResult {
706
+ revoked: boolean;
707
+ accessTokenRevoked?: boolean;
708
+ refreshTokenRevoked?: boolean;
709
+ }
674
710
 
675
711
  /**
676
712
  * Response shape from `GET /api/v1/ext/analytics/config?service=<code>`.
@@ -704,23 +740,33 @@ interface FFIDAnalyticsConfig {
704
740
  * has been fired **3 times within 60 seconds**. Caller should surface a
705
741
  * manual "再度ログインする" UI rather than retry automatically (#2406 / #2411).
706
742
  *
707
- * SDK 2.18.0 only ships `'redirect_loop_detected'`. Other failure paths
708
- * (SSR environment, PKCE generation failure, empty organizationId) currently
709
- * return `error` without a `code`. New codes will be added in future minor
710
- * versions — treat this union as forward-extensible and do NOT exhaustively
711
- * `switch` over it without a `default` branch for consumer code that must
712
- * stay compatible across SDK upgrades.
743
+ * - `'state_persistence_failed'`: `redirectToAuthorize()` could not persist
744
+ * the OAuth CSRF `state` (storage unavailable / quota). Redirect is aborted
745
+ * fail-closed (#4136) callers should surface a manual retry UI.
746
+ *
747
+ * Other failure paths (SSR environment, PKCE generation failure, empty
748
+ * organizationId) currently return `error` without a `code`. Treat this union
749
+ * as forward-extensible and do NOT exhaustively `switch` over it without a
750
+ * `default` branch for consumer code that must stay compatible across SDK
751
+ * upgrades.
713
752
  */
714
- type FFIDRedirectErrorCode = 'redirect_loop_detected';
753
+ type FFIDRedirectErrorCode = 'redirect_loop_detected' | 'state_persistence_failed';
715
754
  /**
716
755
  * Result of a redirect operation (redirectToLogin / redirectToAuthorize / redirectToLogout)
717
756
  *
718
757
  * Structured return type so callers can inspect failure reasons
719
758
  * instead of receiving a bare `false`. When `code` is set, branch on it
720
759
  * for programmatic handling; otherwise log `error` for humans.
760
+ *
761
+ * `loopDetectionDisabled` (#4119): set to `true` when sessionStorage is
762
+ * unavailable (iOS WebKit private mode / eviction) so redirect-loop detection
763
+ * ran **fail-open** — the redirect fired, but repeated-redirect protection is
764
+ * disabled for this browser session. Callers that need loop protection on
765
+ * such browsers should add their own max-retry guard.
721
766
  */
722
767
  type FFIDRedirectResult = {
723
768
  success: true;
769
+ loopDetectionDisabled?: boolean;
724
770
  } | {
725
771
  success: false;
726
772
  error: string;
@@ -1476,4 +1522,4 @@ interface FFIDInquiryFormPlaceholderContext {
1476
1522
  }
1477
1523
  declare function FFIDInquiryForm({ mode, prefill, organizations, preselectedOrganizationId, categories, termsVersion, privacyVersion, termsHref, privacyHref, turnstileToken, turnstileSlot, onSubmit, onChange, legalLayout, messagePlaceholder, requireCategorySelection, unstyled, classNames, locale, className, }: FFIDInquiryFormProps): react_jsx_runtime.JSX.Element;
1478
1524
 
1479
- export { FFIDLoginButton as $, type AnnouncementListResponse as A, type AnnouncementStatus as B, type AnnouncementType as C, EFFECTIVE_SUBSCRIPTION_STATUSES as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, FFIDAnnouncementBadge as G, FFIDAnnouncementList as H, type FFIDAnnouncementsError as I, type FFIDAnnouncementsErrorCode as J, type FFIDAnnouncementsServerResponse as K, type ListAnnouncementsOptions as L, type FFIDCacheConfig as M, type FFIDContextValue as N, type FFIDInquiryCategory as O, type FFIDInquiryCategorySite2026 as P, FFIDInquiryForm as Q, type FFIDInquiryFormCategoryItem as R, type FFIDInquiryFormClassNames as S, type FFIDInquiryFormLegalLayout as T, type FFIDInquiryFormOrganization as U, type FFIDInquiryFormPlaceholderContext as V, type FFIDInquiryFormPrefill as W, type FFIDInquiryFormProps as X, type FFIDInquiryFormSubmitData as Y, type FFIDInquiryFormSubmitResult as Z, type FFIDJwtClaims as _, type FFIDPrompt as a, type FFIDOAuthTokenResponse as a0, type FFIDOAuthUserInfoMemberRole as a1, FFIDOrganizationSwitcher as a2, type FFIDRedirectErrorCode as a3, type FFIDSeatModel as a4, type FFIDServiceAccessDenialReason as a5, type FFIDServiceAccessFailPolicy as a6, FFIDSubscriptionBadge as a7, type FFIDTokenIntrospectionResponse as a8, FFIDUserMenu as a9, FFID_INQUIRY_CATEGORIES as aa, FFID_INQUIRY_CATEGORIES_SITE_2026 as ab, type UseFFIDAnnouncementsOptions as ac, type UseFFIDAnnouncementsReturn as ad, isFFIDInquiryCategorySite2026 as ae, useFFIDAnnouncements as af, type FFIDAnnouncementBadgeClassNames as ag, type FFIDAnnouncementBadgeProps as ah, type FFIDAnnouncementListClassNames as ai, type FFIDAnnouncementListProps as aj, type FFIDLoginButtonProps as ak, type FFIDOrganizationSwitcherClassNames as al, type FFIDOrganizationSwitcherProps as am, type FFIDSubscriptionBadgeClassNames as an, type FFIDSubscriptionBadgeProps as ao, type FFIDUserMenuClassNames as ap, type FFIDUserMenuProps as aq, type FFIDConfig as b, type FFIDApiResponse as c, type FFIDSessionResponse as d, type FFIDRedirectResult as e, type FFIDError as f, type FFIDSubscriptionCheckResponse as g, type FFIDCheckServiceAccessParams as h, type FFIDServiceAccessDecision as i, type FFIDAnalyticsConfig as j, type FFIDVerifyAccessTokenOptions as k, type FFIDOAuthUserInfo as l, type FFIDInquiryCreateParams as m, type FFIDInquiryCreateResponse as n, type FFIDAuthMode as o, type FFIDLogger as p, type FFIDCacheAdapter as q, type FFIDUser as r, type FFIDOrganization as s, type FFIDSubscription as t, type FFIDSubscriptionContextValue as u, type FFIDOAuthUserInfoSubscription as v, type FFIDAnnouncementsClientConfig as w, type FFIDAnnouncementsApiResponse as x, type FFIDAnnouncementsLogger as y, type Announcement as z };
1525
+ export { type FFIDInquiryFormSubmitResult as $, type AnnouncementListResponse as A, type Announcement as B, type AnnouncementStatus as C, type AnnouncementType as D, type EffectiveSubscriptionStatus as E, type FFIDSubscriptionStatus as F, EFFECTIVE_SUBSCRIPTION_STATUSES as G, FFIDAnnouncementBadge as H, FFIDAnnouncementList as I, type FFIDAnnouncementsError as J, type FFIDAnnouncementsErrorCode as K, type ListAnnouncementsOptions as L, type FFIDAnnouncementsServerResponse as M, type FFIDApiResponseMeta as N, type FFIDCacheConfig as O, type FFIDContextValue as P, type FFIDInquiryCategory as Q, type FFIDInquiryCategorySite2026 as R, FFIDInquiryForm as S, type FFIDInquiryFormCategoryItem as T, type FFIDInquiryFormClassNames as U, type FFIDInquiryFormLegalLayout as V, type FFIDInquiryFormOrganization as W, type FFIDInquiryFormPlaceholderContext as X, type FFIDInquiryFormPrefill as Y, type FFIDInquiryFormProps as Z, type FFIDInquiryFormSubmitData as _, type FFIDPrompt as a, type FFIDJwtClaims as a0, FFIDLoginButton as a1, type FFIDOAuthTokenResponse as a2, type FFIDOAuthUserInfoMemberRole as a3, FFIDOrganizationSwitcher as a4, type FFIDRedirectErrorCode as a5, type FFIDSeatModel as a6, type FFIDServiceAccessDenialReason as a7, type FFIDServiceAccessFailPolicy as a8, FFIDSubscriptionBadge as a9, type FFIDTokenIntrospectionResponse as aa, FFIDUserMenu as ab, FFID_INQUIRY_CATEGORIES as ac, FFID_INQUIRY_CATEGORIES_SITE_2026 as ad, type UseFFIDAnnouncementsOptions as ae, type UseFFIDAnnouncementsReturn as af, isFFIDInquiryCategorySite2026 as ag, useFFIDAnnouncements as ah, type FFIDAnnouncementBadgeClassNames as ai, type FFIDAnnouncementBadgeProps as aj, type FFIDAnnouncementListClassNames as ak, type FFIDAnnouncementListProps as al, type FFIDLoginButtonProps as am, type FFIDOrganizationSwitcherClassNames as an, type FFIDOrganizationSwitcherProps as ao, type FFIDSubscriptionBadgeClassNames as ap, type FFIDSubscriptionBadgeProps as aq, type FFIDUserMenuClassNames as ar, type FFIDUserMenuProps as as, type FFIDConfig as b, type FFIDApiResponse as c, type FFIDSessionResponse as d, type FFIDSignOutResult as e, type FFIDRedirectResult as f, type FFIDError as g, type FFIDSubscriptionCheckResponse as h, type FFIDCheckServiceAccessParams as i, type FFIDServiceAccessDecision as j, type FFIDAnalyticsConfig as k, type FFIDVerifyAccessTokenOptions as l, type FFIDOAuthUserInfo as m, type FFIDInquiryCreateParams as n, type FFIDInquiryCreateResponse as o, type FFIDAuthMode as p, type FFIDLogger as q, type FFIDCacheAdapter as r, type FFIDUser as s, type FFIDOrganization as t, type FFIDSubscription as u, type FFIDSubscriptionContextValue as v, type FFIDOAuthUserInfoSubscription as w, type FFIDAnnouncementsClientConfig as x, type FFIDAnnouncementsApiResponse as y, type FFIDAnnouncementsLogger as z };
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk55S5VUWR_cjs = require('./chunk-55S5VUWR.cjs');
3
+ var chunkRDQ4R3XC_cjs = require('./chunk-RDQ4R3XC.cjs');
4
4
  var chunkH5O2CCAY_cjs = require('./chunk-H5O2CCAY.cjs');
5
5
  var react = require('react');
6
6
  var jsxRuntime = require('react/jsx-runtime');
@@ -54,8 +54,8 @@ function defaultRedirect(url) {
54
54
  }
55
55
  function useRequireActiveSubscription(options) {
56
56
  const { redirectTo, allowGrace = true, onRedirect } = options;
57
- const { isLoading, error } = chunk55S5VUWR_cjs.useFFIDContext();
58
- const { effectiveStatus, isBlocked, isGrace } = chunk55S5VUWR_cjs.useSubscription();
57
+ const { isLoading, error } = chunkRDQ4R3XC_cjs.useFFIDContext();
58
+ const { effectiveStatus, isBlocked, isGrace } = chunkRDQ4R3XC_cjs.useSubscription();
59
59
  const hasFetchError = error !== null && effectiveStatus === null;
60
60
  const shouldRedirect = !isLoading && !hasFetchError && (isBlocked || !allowGrace && isGrace || effectiveStatus === null);
61
61
  react.useEffect(() => {
@@ -76,7 +76,7 @@ function useRequireActiveSubscription(options) {
76
76
  }
77
77
  function withFFIDAuth(Component, options = {}) {
78
78
  const WrappedComponent = (props) => {
79
- const { isLoading, isAuthenticated, login } = chunk55S5VUWR_cjs.useFFIDContext();
79
+ const { isLoading, isAuthenticated, login } = chunkRDQ4R3XC_cjs.useFFIDContext();
80
80
  const hasRedirected = react.useRef(false);
81
81
  react.useEffect(() => {
82
82
  if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
@@ -105,155 +105,155 @@ var FFID_NEWSLETTER_DISPATCH_MAX_RECIPIENTS = 1e3;
105
105
 
106
106
  Object.defineProperty(exports, "ACCESS_GRANTING_EFFECTIVE_STATUSES", {
107
107
  enumerable: true,
108
- get: function () { return chunk55S5VUWR_cjs.ACCESS_GRANTING_EFFECTIVE_STATUSES; }
108
+ get: function () { return chunkRDQ4R3XC_cjs.ACCESS_GRANTING_EFFECTIVE_STATUSES; }
109
109
  });
110
110
  Object.defineProperty(exports, "BLOCKING_EFFECTIVE_STATUSES", {
111
111
  enumerable: true,
112
- get: function () { return chunk55S5VUWR_cjs.BLOCKING_EFFECTIVE_STATUSES; }
112
+ get: function () { return chunkRDQ4R3XC_cjs.BLOCKING_EFFECTIVE_STATUSES; }
113
113
  });
114
114
  Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
115
115
  enumerable: true,
116
- get: function () { return chunk55S5VUWR_cjs.DEFAULT_API_BASE_URL; }
116
+ get: function () { return chunkRDQ4R3XC_cjs.DEFAULT_API_BASE_URL; }
117
117
  });
118
118
  Object.defineProperty(exports, "DEFAULT_OAUTH_SCOPES", {
119
119
  enumerable: true,
120
- get: function () { return chunk55S5VUWR_cjs.DEFAULT_OAUTH_SCOPES; }
120
+ get: function () { return chunkRDQ4R3XC_cjs.DEFAULT_OAUTH_SCOPES; }
121
121
  });
122
122
  Object.defineProperty(exports, "EFFECTIVE_SUBSCRIPTION_STATUSES", {
123
123
  enumerable: true,
124
- get: function () { return chunk55S5VUWR_cjs.EFFECTIVE_SUBSCRIPTION_STATUSES; }
124
+ get: function () { return chunkRDQ4R3XC_cjs.EFFECTIVE_SUBSCRIPTION_STATUSES; }
125
125
  });
126
126
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
127
127
  enumerable: true,
128
- get: function () { return chunk55S5VUWR_cjs.FFIDAnnouncementBadge; }
128
+ get: function () { return chunkRDQ4R3XC_cjs.FFIDAnnouncementBadge; }
129
129
  });
130
130
  Object.defineProperty(exports, "FFIDAnnouncementList", {
131
131
  enumerable: true,
132
- get: function () { return chunk55S5VUWR_cjs.FFIDAnnouncementList; }
132
+ get: function () { return chunkRDQ4R3XC_cjs.FFIDAnnouncementList; }
133
133
  });
134
134
  Object.defineProperty(exports, "FFIDInquiryForm", {
135
135
  enumerable: true,
136
- get: function () { return chunk55S5VUWR_cjs.FFIDInquiryForm; }
136
+ get: function () { return chunkRDQ4R3XC_cjs.FFIDInquiryForm; }
137
137
  });
138
138
  Object.defineProperty(exports, "FFIDLoginButton", {
139
139
  enumerable: true,
140
- get: function () { return chunk55S5VUWR_cjs.FFIDLoginButton; }
140
+ get: function () { return chunkRDQ4R3XC_cjs.FFIDLoginButton; }
141
141
  });
142
142
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
143
143
  enumerable: true,
144
- get: function () { return chunk55S5VUWR_cjs.FFIDOrganizationSwitcher; }
144
+ get: function () { return chunkRDQ4R3XC_cjs.FFIDOrganizationSwitcher; }
145
145
  });
146
146
  Object.defineProperty(exports, "FFIDProvider", {
147
147
  enumerable: true,
148
- get: function () { return chunk55S5VUWR_cjs.FFIDProvider; }
148
+ get: function () { return chunkRDQ4R3XC_cjs.FFIDProvider; }
149
149
  });
150
150
  Object.defineProperty(exports, "FFIDSDKError", {
151
151
  enumerable: true,
152
- get: function () { return chunk55S5VUWR_cjs.FFIDSDKError; }
152
+ get: function () { return chunkRDQ4R3XC_cjs.FFIDSDKError; }
153
153
  });
154
154
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
155
155
  enumerable: true,
156
- get: function () { return chunk55S5VUWR_cjs.FFIDSubscriptionBadge; }
156
+ get: function () { return chunkRDQ4R3XC_cjs.FFIDSubscriptionBadge; }
157
157
  });
158
158
  Object.defineProperty(exports, "FFIDUserMenu", {
159
159
  enumerable: true,
160
- get: function () { return chunk55S5VUWR_cjs.FFIDUserMenu; }
160
+ get: function () { return chunkRDQ4R3XC_cjs.FFIDUserMenu; }
161
161
  });
162
162
  Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
163
163
  enumerable: true,
164
- get: function () { return chunk55S5VUWR_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
164
+ get: function () { return chunkRDQ4R3XC_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
165
165
  });
166
166
  Object.defineProperty(exports, "FFID_ERROR_CODES", {
167
167
  enumerable: true,
168
- get: function () { return chunk55S5VUWR_cjs.FFID_ERROR_CODES; }
168
+ get: function () { return chunkRDQ4R3XC_cjs.FFID_ERROR_CODES; }
169
169
  });
170
170
  Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES", {
171
171
  enumerable: true,
172
- get: function () { return chunk55S5VUWR_cjs.FFID_INQUIRY_CATEGORIES; }
172
+ get: function () { return chunkRDQ4R3XC_cjs.FFID_INQUIRY_CATEGORIES; }
173
173
  });
174
174
  Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES_SITE_2026", {
175
175
  enumerable: true,
176
- get: function () { return chunk55S5VUWR_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
176
+ get: function () { return chunkRDQ4R3XC_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
177
177
  });
178
178
  Object.defineProperty(exports, "clearState", {
179
179
  enumerable: true,
180
- get: function () { return chunk55S5VUWR_cjs.cleanupStateStorage; }
180
+ get: function () { return chunkRDQ4R3XC_cjs.cleanupStateStorage; }
181
181
  });
182
182
  Object.defineProperty(exports, "computeEffectiveStatusFromSession", {
183
183
  enumerable: true,
184
- get: function () { return chunk55S5VUWR_cjs.computeEffectiveStatusFromSession; }
184
+ get: function () { return chunkRDQ4R3XC_cjs.computeEffectiveStatusFromSession; }
185
185
  });
186
186
  Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
187
187
  enumerable: true,
188
- get: function () { return chunk55S5VUWR_cjs.createFFIDAnnouncementsClient; }
188
+ get: function () { return chunkRDQ4R3XC_cjs.createFFIDAnnouncementsClient; }
189
189
  });
190
190
  Object.defineProperty(exports, "createFFIDClient", {
191
191
  enumerable: true,
192
- get: function () { return chunk55S5VUWR_cjs.createFFIDClient; }
192
+ get: function () { return chunkRDQ4R3XC_cjs.createFFIDClient; }
193
193
  });
194
194
  Object.defineProperty(exports, "createTokenStore", {
195
195
  enumerable: true,
196
- get: function () { return chunk55S5VUWR_cjs.createTokenStore; }
196
+ get: function () { return chunkRDQ4R3XC_cjs.createTokenStore; }
197
197
  });
198
198
  Object.defineProperty(exports, "generateCodeChallenge", {
199
199
  enumerable: true,
200
- get: function () { return chunk55S5VUWR_cjs.generateCodeChallenge; }
200
+ get: function () { return chunkRDQ4R3XC_cjs.generateCodeChallenge; }
201
201
  });
202
202
  Object.defineProperty(exports, "generateCodeVerifier", {
203
203
  enumerable: true,
204
- get: function () { return chunk55S5VUWR_cjs.generateCodeVerifier; }
204
+ get: function () { return chunkRDQ4R3XC_cjs.generateCodeVerifier; }
205
205
  });
206
206
  Object.defineProperty(exports, "handleRedirectCallback", {
207
207
  enumerable: true,
208
- get: function () { return chunk55S5VUWR_cjs.handleRedirectCallback; }
208
+ get: function () { return chunkRDQ4R3XC_cjs.handleRedirectCallback; }
209
209
  });
210
210
  Object.defineProperty(exports, "hasAccessFromUserinfo", {
211
211
  enumerable: true,
212
- get: function () { return chunk55S5VUWR_cjs.hasAccessFromUserinfo; }
212
+ get: function () { return chunkRDQ4R3XC_cjs.hasAccessFromUserinfo; }
213
213
  });
214
214
  Object.defineProperty(exports, "isBlockedFromUserinfo", {
215
215
  enumerable: true,
216
- get: function () { return chunk55S5VUWR_cjs.isBlockedFromUserinfo; }
216
+ get: function () { return chunkRDQ4R3XC_cjs.isBlockedFromUserinfo; }
217
217
  });
218
218
  Object.defineProperty(exports, "isFFIDInquiryCategorySite2026", {
219
219
  enumerable: true,
220
- get: function () { return chunk55S5VUWR_cjs.isFFIDInquiryCategorySite2026; }
220
+ get: function () { return chunkRDQ4R3XC_cjs.isFFIDInquiryCategorySite2026; }
221
221
  });
222
222
  Object.defineProperty(exports, "normalizeRedirectUri", {
223
223
  enumerable: true,
224
- get: function () { return chunk55S5VUWR_cjs.normalizeRedirectUri; }
224
+ get: function () { return chunkRDQ4R3XC_cjs.normalizeRedirectUri; }
225
225
  });
226
226
  Object.defineProperty(exports, "retrieveCodeVerifier", {
227
227
  enumerable: true,
228
- get: function () { return chunk55S5VUWR_cjs.retrieveCodeVerifier; }
228
+ get: function () { return chunkRDQ4R3XC_cjs.retrieveCodeVerifier; }
229
229
  });
230
230
  Object.defineProperty(exports, "retrieveState", {
231
231
  enumerable: true,
232
- get: function () { return chunk55S5VUWR_cjs.retrieveState; }
232
+ get: function () { return chunkRDQ4R3XC_cjs.retrieveState; }
233
233
  });
234
234
  Object.defineProperty(exports, "storeCodeVerifier", {
235
235
  enumerable: true,
236
- get: function () { return chunk55S5VUWR_cjs.storeCodeVerifier; }
236
+ get: function () { return chunkRDQ4R3XC_cjs.storeCodeVerifier; }
237
237
  });
238
238
  Object.defineProperty(exports, "storeState", {
239
239
  enumerable: true,
240
- get: function () { return chunk55S5VUWR_cjs.storeState; }
240
+ get: function () { return chunkRDQ4R3XC_cjs.storeState; }
241
241
  });
242
242
  Object.defineProperty(exports, "useFFID", {
243
243
  enumerable: true,
244
- get: function () { return chunk55S5VUWR_cjs.useFFID; }
244
+ get: function () { return chunkRDQ4R3XC_cjs.useFFID; }
245
245
  });
246
246
  Object.defineProperty(exports, "useFFIDAnnouncements", {
247
247
  enumerable: true,
248
- get: function () { return chunk55S5VUWR_cjs.useFFIDAnnouncements; }
248
+ get: function () { return chunkRDQ4R3XC_cjs.useFFIDAnnouncements; }
249
249
  });
250
250
  Object.defineProperty(exports, "useSubscription", {
251
251
  enumerable: true,
252
- get: function () { return chunk55S5VUWR_cjs.useSubscription; }
252
+ get: function () { return chunkRDQ4R3XC_cjs.useSubscription; }
253
253
  });
254
254
  Object.defineProperty(exports, "withSubscription", {
255
255
  enumerable: true,
256
- get: function () { return chunk55S5VUWR_cjs.withSubscription; }
256
+ get: function () { return chunkRDQ4R3XC_cjs.withSubscription; }
257
257
  });
258
258
  Object.defineProperty(exports, "ALL_DENIED_EXCEPT_NECESSARY", {
259
259
  enumerable: true,