@wix/members 1.0.543 → 1.0.545

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.
@@ -113,9 +113,9 @@ interface NamedFieldBinding {
113
113
  //#endregion
114
114
  //#region src/extensions/account-settings/context-providers/account-named-fields.d.ts
115
115
  /**
116
- * The platform's own field vocabulary, named as the Members SDK names each value. A `SYSTEM` or
117
- * `CONTACT` field exists on every site, so each one is addressable by name. Site-specific fields are
118
- * excluded from Phase 0. The contact email is absent on purpose: the API refuses a write to it.
116
+ * The platform's own field vocabulary, each named as the site names it. A `SYSTEM` or `CONTACT` field
117
+ * exists on every site, so each one is addressable by name. Site-specific fields are excluded from
118
+ * Phase 0. The contact email is absent on purpose: the API refuses a write to it.
119
119
  */
120
120
  declare const NAMED_FIELD_KEYS: {
121
121
  readonly firstName: "customfields.system.firstname";
@@ -124,12 +124,15 @@ declare const NAMED_FIELD_KEYS: {
124
124
  readonly title: "customfields.system.title";
125
125
  readonly birthdate: "customfields.contact.birthdate";
126
126
  readonly company: "customfields.contact.company";
127
- readonly jobTitle: "customfields.contact.position";
127
+ readonly position: "customfields.contact.position";
128
128
  };
129
129
  type NamedFieldName = keyof typeof NAMED_FIELD_KEYS;
130
- type NamedValidationErrors = Record<NamedFieldName, MemberFieldValidationError | null>;
130
+ type NamedValidationErrors = Record<NamedFieldName, MemberFieldValidationError | null> & {
131
+ /** @internal `position`'s, under the name pages saved before it still bind. */jobTitle: MemberFieldValidationError | null;
132
+ };
131
133
  type NamedAccountFields = Record<NamedFieldName, NamedFieldBinding> & {
132
- /** Every named field's fault, grouped so the binding picker lists them under one heading. */validationErrors: NamedValidationErrors;
134
+ /** @internal `position`, under the name pages saved before it still bind. */jobTitle: NamedFieldBinding; /** Every named field's fault, grouped so the binding picker lists them under one heading. */
135
+ validationErrors: NamedValidationErrors;
133
136
  };
134
137
  //#endregion
135
138
  //#region src/extensions/account-settings/login-info/credential-restriction.d.ts
@@ -20,12 +20,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // context-authentication.ts
21
21
  var context_authentication_exports = {};
22
22
  __export(context_authentication_exports, {
23
- AuthenticationContext: () => xg,
24
- AuthenticationContextProvider: () => Dg,
25
- default: () => Dg,
26
- injectAccessTokenGetter: () => Og,
27
- useContextProvider: () => Sg,
28
- useContextProviderSafe: () => Cg
23
+ AuthenticationContext: () => Sg,
24
+ AuthenticationContextProvider: () => Og,
25
+ default: () => Og,
26
+ injectAccessTokenGetter: () => kg,
27
+ useContextProvider: () => Cg,
28
+ useContextProviderSafe: () => wg
29
29
  });
30
30
  module.exports = __toCommonJS(context_authentication_exports);
31
31
 
@@ -4000,25 +4000,26 @@ var mh = { name: `memberState`, defaults: { memberState: { loginStatus: `LOGGED_
4000
4000
  } };
4001
4001
  var hh = { "-19999": `errorResetPasswordUserNotFound`, USER_NOT_FOUND: `errorResetPasswordUserNotFound`, INVALID_EMAIL: `errorResetPasswordInvalidEmail`, "-19901": `errorTooManyEmails`, RESOURCE_EXHAUSTED_EXCEPTION: `errorTooManyRequests`, 429: `errorTooManyRequests` };
4002
4002
  var gh = (e6, t2 = Tm) => t2(e6 && hh[e6] || `errorGeneral`);
4003
- var _h = (e6, t2 = Tm) => t2(e6 === `PASSWORDS_DO_NOT_MATCH` ? `errorPasswordsDoNotMatch` : `errorGeneral`);
4004
- var vh = `SEND_RESET_PASSWORD_EMAIL_UNAVAILABLE`;
4005
- var yh = `CHANGE_PASSWORD_UNAVAILABLE`;
4006
- var bh = `MISSING_RESET_PASSWORD_TOKEN`;
4007
- var xh = `PASSWORDS_DO_NOT_MATCH`;
4008
- var Sh = () => Promise.resolve();
4009
- var Ch = () => void 0;
4010
- var wh = [`forgotPasswordToken`, `resetPasswordToken`];
4011
- var Th = () => {
4003
+ var _h = { PASSWORDS_DO_NOT_MATCH: `errorPasswordsDoNotMatch`, VALUE_TOO_SHORT: `errorPasswordTooShort`, MIN_LENGTH: `errorPasswordTooShort` };
4004
+ var vh = (e6, t2 = Tm) => t2(e6 && _h[e6] || `errorGeneral`);
4005
+ var yh = `SEND_RESET_PASSWORD_EMAIL_UNAVAILABLE`;
4006
+ var bh = `CHANGE_PASSWORD_UNAVAILABLE`;
4007
+ var xh = `MISSING_RESET_PASSWORD_TOKEN`;
4008
+ var Sh = `PASSWORDS_DO_NOT_MATCH`;
4009
+ var Ch = () => Promise.resolve();
4010
+ var wh = () => void 0;
4011
+ var Th = [`forgotPasswordToken`, `resetPasswordToken`];
4012
+ var Eh = () => {
4012
4013
  if (typeof window > `u`) return null;
4013
4014
  let e6 = new URLSearchParams(window.location.search);
4014
- return wh.map((t2) => e6.get(t2)).find(Boolean) ?? null;
4015
+ return Th.map((t2) => e6.get(t2)).find(Boolean) ?? null;
4015
4016
  };
4016
- var Eh = { name: `resetPassword`, defaults: { resetPasswordState: P, changePasswordState: P, submitResetPasswordEmail: Sh, submitChangePassword: Sh }, useValue: ({ siteMembers: e6 }, { forms: t2 }) => {
4017
- let r2 = Dm(), o2 = (0, import_react.useCallback)((e7) => gh(e7, r2), [r2]), c2 = (0, import_react.useCallback)((e7) => _h(e7, r2), [r2]), l2 = (0, import_react.useCallback)(async (t3) => {
4017
+ var Dh = { name: `resetPassword`, defaults: { resetPasswordState: P, changePasswordState: P, submitResetPasswordEmail: Ch, submitChangePassword: Ch }, useValue: ({ siteMembers: e6 }, { forms: t2 }) => {
4018
+ let r2 = Dm(), o2 = (0, import_react.useCallback)((e7) => gh(e7, r2), [r2]), c2 = (0, import_react.useCallback)((e7) => vh(e7, r2), [r2]), l2 = (0, import_react.useCallback)(async (t3) => {
4018
4019
  let n2 = K();
4019
4020
  q(G.forgotPasswordResetPasswordClick, n2);
4020
4021
  try {
4021
- if (!e6?.sendResetPasswordEmail) throw new N(vh);
4022
+ if (!e6?.sendResetPasswordEmail) throw new N(yh);
4022
4023
  await e6.sendResetPasswordEmail(t3);
4023
4024
  } catch (e7) {
4024
4025
  throw q(G.forgotPasswordFailure, { ...n2, failure_reason: qn(e7) }), e7;
@@ -4028,9 +4029,9 @@ var Eh = { name: `resetPassword`, defaults: { resetPasswordState: P, changePassw
4028
4029
  let n2 = K();
4029
4030
  q(G.newPasswordCreatePasswordClick, n2);
4030
4031
  try {
4031
- if (!e6?.changePassword) throw new N(yh);
4032
- let n3 = Th();
4033
- if (!n3) throw new N(bh);
4032
+ if (!e6?.changePassword) throw new N(bh);
4033
+ let n3 = Eh();
4034
+ if (!n3) throw new N(xh);
4034
4035
  await e6.changePassword(t3, n3);
4035
4036
  } catch (t4) {
4036
4037
  let r3 = qn(t4);
@@ -4041,15 +4042,15 @@ var Eh = { name: `resetPassword`, defaults: { resetPasswordState: P, changePassw
4041
4042
  (0, import_react.useEffect)(() => t2.addErrorClearer(() => {
4042
4043
  d2(I), h2(I);
4043
4044
  }), [t2]);
4044
- let _2 = (0, import_react.useCallback)(() => f2(t2.field(`email`).trim()).catch(Ch), [t2, f2]), v2 = (0, import_react.useCallback)(() => {
4045
+ let _2 = (0, import_react.useCallback)(() => f2(t2.field(`email`).trim()).catch(wh), [t2, f2]), v2 = (0, import_react.useCallback)(() => {
4045
4046
  let e7 = t2.field(`password`);
4046
- return t2.hasField(`confirmPassword`) && t2.field(`confirmPassword`) !== e7 ? F(h2, () => Promise.reject(new N(xh)), c2).catch(Ch) : g2(e7).catch(Ch);
4047
+ return t2.hasField(`confirmPassword`) && t2.field(`confirmPassword`) !== e7 ? F(h2, () => Promise.reject(new N(Sh)), c2).catch(wh) : g2(e7).catch(wh);
4047
4048
  }, [t2, g2, c2]);
4048
4049
  return (0, import_react.useMemo)(() => ({ resetPasswordState: u2, changePasswordState: m2, submitResetPasswordEmail: _2, submitChangePassword: v2 }), [u2, m2, _2, v2]);
4049
4050
  } };
4050
- var Dh = () => {
4051
+ var Oh = () => {
4051
4052
  };
4052
- var Oh = { name: `screens`, defaults: Object.fromEntries(Pm.map((e6) => [e6.functionName, Dh])), useValue: ({ siteMembers: e6 }) => {
4053
+ var kh = { name: `screens`, defaults: Object.fromEntries(Pm.map((e6) => [e6.functionName, Oh])), useValue: ({ siteMembers: e6 }) => {
4053
4054
  let t2 = Im(Mn()?.pages);
4054
4055
  return (0, import_react.useEffect)(() => {
4055
4056
  if (!t2) return;
@@ -4059,14 +4060,14 @@ var Oh = { name: `screens`, defaults: Object.fromEntries(Pm.map((e6) => [e6.func
4059
4060
  !t3.appPageId && t3.pageViewEvent && q(t3.pageViewEvent, K()), J(e6, t3.navigation).catch((e7) => console.error(`[ContextProvider] ${t3.functionName} failed`, e7));
4060
4061
  }])), [e6]);
4061
4062
  } };
4062
- var kh = { name: `popupForms`, defaults: { closeEmailConfirmation: () => {
4063
+ var Ah = { name: `popupForms`, defaults: { closeEmailConfirmation: () => {
4063
4064
  } }, useValue: ({ siteMembers: e6 }) => (0, import_react.useMemo)(() => ({ closeEmailConfirmation: () => {
4064
4065
  J(e6, `closePopup`).then(() => J(e6, `goToSignup`)).catch((e7) => console.error(`[ContextProvider] closeEmailConfirmation failed`, e7));
4065
4066
  } }), [e6]) };
4066
- function Ah() {
4067
+ function jh() {
4067
4068
  let e6 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
4068
4069
  if (e6) return { initWixModules(t3, n3) {
4069
- return jh(() => e6(t3, n3));
4070
+ return Mh(() => e6(t3, n3));
4070
4071
  }, fetchWithAuth() {
4071
4072
  throw Error(`fetchWithAuth is not available in this context`);
4072
4073
  }, graphql() {
@@ -4076,10 +4077,10 @@ function Ah() {
4076
4077
  if (t2 || n2) return { initWixModules(e7, r2) {
4077
4078
  if (r2) {
4078
4079
  if (!n2) throw Error(`An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules`);
4079
- return jh(() => n2.use(e7));
4080
+ return Mh(() => n2.use(e7));
4080
4081
  }
4081
4082
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
4082
- return jh(() => t2.use(e7));
4083
+ return Mh(() => t2.use(e7));
4083
4084
  }, fetchWithAuth: (e7, n3) => {
4084
4085
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
4085
4086
  return t2.fetchWithAuth(e7, n3);
@@ -4091,7 +4092,7 @@ function Ah() {
4091
4092
  return t2.graphql(e7, n3, r2);
4092
4093
  } };
4093
4094
  }
4094
- function jh(e6) {
4095
+ function Mh(e6) {
4095
4096
  let t2 = globalThis.__wix_context__, n2 = { client: p.client, elevatedClient: p.elevatedClient }, r2;
4096
4097
  globalThis.__wix_context__ = void 0, p.client = void 0, p.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
4097
4098
  try {
@@ -4100,34 +4101,34 @@ function jh(e6) {
4100
4101
  globalThis.__wix_context__ = t2, p.client = n2.client, p.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
4101
4102
  }
4102
4103
  }
4103
- function Mh(e6, t2) {
4104
+ function Nh(e6, t2) {
4104
4105
  return (...n2) => {
4105
- let r2 = Ah();
4106
+ let r2 = jh();
4106
4107
  return r2 ? r2.initWixModules(e6, t2).apply(void 0, n2) : e6.apply(void 0, n2);
4107
4108
  };
4108
4109
  }
4109
- function Nh(e6, t2 = false) {
4110
- return Mh(e6, t2);
4110
+ function Ph(e6, t2 = false) {
4111
+ return Nh(e6, t2);
4111
4112
  }
4112
4113
  RegExp(`\\.(${[`wix.com`, `editorx.com`].join(`|`)})$`), RegExp(`\\.(${[`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`].join(`|`)})$`);
4113
- var Ph = Nh((e6) => (t2, n2) => e6.fetchWithAuth(t2, n2));
4114
- Nh((e6) => async function(t2, n2, r2 = { apiVersion: `alpha` }) {
4114
+ var Fh = Ph((e6) => (t2, n2) => e6.fetchWithAuth(t2, n2));
4115
+ Ph((e6) => async function(t2, n2, r2 = { apiVersion: `alpha` }) {
4115
4116
  return (await e6.request(({ host: e7 }) => ({ method: `POST`, url: `${e7 === `www.wixapis.com` ? `/graphql` : `/_api/graphql`}/${r2.apiVersion}`, data: { query: t2, variables: n2 }, packageName: `@wix/essentials` }))).data;
4116
4117
  });
4117
- var Fh = [{ path: `memberPrivacySettings.updatedDate` }];
4118
- function Ih(e6) {
4118
+ var Ih = [{ path: `memberPrivacySettings.updatedDate` }];
4119
+ function Lh(e6) {
4119
4120
  return At(Object.assign(e6, { domainToMappings: { "editor.wixapps.net": [{ srcPath: `/_api/members/v1/privacy-settings`, destPath: `/v1/privacy-settings` }], "api._api_base_domain_": [{ srcPath: `/members/v1/privacy-settings`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/members/v1/privacy-settings`, destPath: `/v1/privacy-settings` }], "editor._base_domain_": [{ srcPath: `/_api/members/v1/privacy-settings`, destPath: `/v1/privacy-settings` }], "blocks._base_domain_": [{ srcPath: `/_api/members/v1/privacy-settings`, destPath: `/v1/privacy-settings` }], "create.editorx": [{ srcPath: `/_api/members/v1/privacy-settings`, destPath: `/v1/privacy-settings` }], "www.wixapis.com": [{ srcPath: `/members/v1/privacy-settings`, destPath: `/v1/privacy-settings` }], _: [{ srcPath: `/_api/members/v1/privacy-settings`, destPath: `/v1/privacy-settings` }], "www._base_domain_": [{ srcPath: `/_api/members/v1/privacy-settings`, destPath: `/v1/privacy-settings` }], "*.dev.wix-code.com": [{ srcPath: `/_api/members/v1/privacy-settings`, destPath: `/v1/privacy-settings` }], "bo._base_domain_": [{ srcPath: `/_api/members/v1/privacy-settings`, destPath: `/v1/privacy-settings` }], "wixbo.ai": [{ srcPath: `/_api/members/v1/privacy-settings`, destPath: `/v1/privacy-settings` }], "wix-bo.com": [{ srcPath: `/_api/members/v1/privacy-settings`, destPath: `/v1/privacy-settings` }], "apps._base_domain_": [{ srcPath: `/_api/members/v1/privacy-settings`, destPath: `/v1/privacy-settings` }] } }));
4120
4121
  }
4121
- var Lh = `@wix/auto_sdk_members_member-privacy-settings`;
4122
- function Rh(e6) {
4122
+ var Rh = `@wix/auto_sdk_members_member-privacy-settings`;
4123
+ function zh(e6) {
4123
4124
  function t2({ host: t3 }) {
4124
- return { entityFqdn: `wix.members.v1.member_privacy_settings`, method: `GET`, methodFqn: `com.wixpress.members.memberprivacysettings.MemberPrivacySettingsService.GetMemberPrivacySettings`, packageName: Lh, migrationOptions: { optInTransformResponse: true }, url: Ih({ protoPath: `/v1/privacy-settings`, data: e6, host: t3 }), params: kt(e6), transformResponse: (e7) => st(e7, [{ transformFn: Je, paths: Fh }]) };
4125
+ return { entityFqdn: `wix.members.v1.member_privacy_settings`, method: `GET`, methodFqn: `com.wixpress.members.memberprivacysettings.MemberPrivacySettingsService.GetMemberPrivacySettings`, packageName: Rh, migrationOptions: { optInTransformResponse: true }, url: Lh({ protoPath: `/v1/privacy-settings`, data: e6, host: t3 }), params: kt(e6), transformResponse: (e7) => st(e7, [{ transformFn: Je, paths: Ih }]) };
4125
4126
  }
4126
4127
  return t2;
4127
4128
  }
4128
- var zh = ((e6) => (e6.UNKNOWN = `UNKNOWN`, e6.NO_ONE = `NO_ONE`, e6.ANYONE = `ANYONE`, e6))(zh || {});
4129
- async function Bh() {
4130
- let { httpClient: e6, sideEffects: t2 } = arguments[0], n2 = Rh(Ke({}));
4129
+ var Bh = ((e6) => (e6.UNKNOWN = `UNKNOWN`, e6.NO_ONE = `NO_ONE`, e6.ANYONE = `ANYONE`, e6))(Bh || {});
4130
+ async function Vh() {
4131
+ let { httpClient: e6, sideEffects: t2 } = arguments[0], n2 = zh(Ke({}));
4131
4132
  t2?.onSiteCall?.();
4132
4133
  try {
4133
4134
  let r2 = await e6.request(n2);
@@ -4137,111 +4138,111 @@ async function Bh() {
4137
4138
  throw t2?.onError?.(e7), n3;
4138
4139
  }
4139
4140
  }
4140
- function Vh(e6) {
4141
- return () => Bh({ httpClient: e6 });
4141
+ function Hh(e6) {
4142
+ return () => Vh({ httpClient: e6 });
4142
4143
  }
4143
- var Hh = Ot(Vh);
4144
- var Uh = { availableSignInMethods: [], loginCaptchaStatus: `NOT_REQUIRED`, signupCaptchaStatus: `NOT_REQUIRED`, loginCaptchaOption: `NEVER`, signupCaptchaOption: `NEVER`, socialSignInStatus: `DISABLED`, publicMembersStatus: `NOT_ALLOWED`, signupEmailVerificationMode: `NONE`, signupCustomFields: [] };
4145
- var Wh = ({ availableSignInMethods: e6, socialSignInStatus: t2, ...n2 }) => ({ availableLoginMethods: e6, ...n2, socialLoginStatus: t2 });
4146
- var Gh = (e6) => {
4144
+ var Uh = Ot(Hh);
4145
+ var Wh = { availableSignInMethods: [], loginCaptchaStatus: `NOT_REQUIRED`, signupCaptchaStatus: `NOT_REQUIRED`, loginCaptchaOption: `NEVER`, signupCaptchaOption: `NEVER`, socialSignInStatus: `DISABLED`, publicMembersStatus: `NOT_ALLOWED`, signupEmailVerificationMode: `NONE`, signupCustomFields: [] };
4146
+ var Gh = ({ availableSignInMethods: e6, socialSignInStatus: t2, ...n2 }) => ({ availableLoginMethods: e6, ...n2, socialLoginStatus: t2 });
4147
+ var Kh = (e6) => {
4147
4148
  let t2 = e6.availableSignInMethods.some((e7) => e7.type === `SSO`);
4148
- return { loginSettings: Wh(e6), isSsoEnabled: t2, signInSettings: e6, ssoEnabled: t2 };
4149
+ return { loginSettings: Gh(e6), isSsoEnabled: t2, signInSettings: e6, ssoEnabled: t2 };
4149
4150
  };
4150
- var Kh = `/_serverless/collection-settings-facade/get-settings`;
4151
- var qh = `https://www.wixapis.com${Kh}`;
4152
- var Jh = { "31fff8fc-ea95-43ac-95c5-902497125b90": `PASSWORD`, "0e6a50f5-b523-4e29-990d-f37fa2ffdd69": `GOOGLE`, "3ecad13f-52c3-483d-911f-31dbcf2a6d23": `FACEBOOK`, "ce1be235-3691-4532-906c-5a7d2e3acdd1": `APPLE`, "4f199cbe-22ee-40c8-9129-11f2b4178a38": `SSO` };
4153
- var Yh = (e6) => (e6 ?? []).flatMap(({ id: e7, appDefId: t2, displayName: n2 }) => {
4154
- let r2 = Jh[t2];
4151
+ var qh = `/_serverless/collection-settings-facade/get-settings`;
4152
+ var Jh = `https://www.wixapis.com${qh}`;
4153
+ var Yh = { "31fff8fc-ea95-43ac-95c5-902497125b90": `PASSWORD`, "0e6a50f5-b523-4e29-990d-f37fa2ffdd69": `GOOGLE`, "3ecad13f-52c3-483d-911f-31dbcf2a6d23": `FACEBOOK`, "ce1be235-3691-4532-906c-5a7d2e3acdd1": `APPLE`, "4f199cbe-22ee-40c8-9129-11f2b4178a38": `SSO` };
4154
+ var Xh = (e6) => (e6 ?? []).flatMap(({ id: e7, appDefId: t2, displayName: n2 }) => {
4155
+ let r2 = Yh[t2];
4155
4156
  return r2 ? [{ connectionId: e7, name: n2 ?? ``, type: r2 }] : [];
4156
4157
  });
4157
- var Xh = async (e6) => {
4158
- let t2 = await Ph(e6, { headers: { accept: `application/json` } });
4158
+ var Zh = async (e6) => {
4159
+ let t2 = await Fh(e6, { headers: { accept: `application/json` } });
4159
4160
  if (!t2.ok) throw Error(`collection settings: ${t2.status}`);
4160
4161
  return await t2.json();
4161
4162
  };
4162
- var Zh = (e6) => e6 === `ALWAYS` || e6 === `SUSPECTED_BOTS_ONLY` ? e6 : `NEVER`;
4163
- var Qh = (e6) => e6 === `NEVER` ? `NOT_REQUIRED` : `REQUIRED`;
4164
- var $h = /* @__PURE__ */ new Set([`NONE`, `AFTER_SIGNUP`, `DURING_SIGNUP`]);
4165
- var eg = (e6) => {
4163
+ var Qh = (e6) => e6 === `ALWAYS` || e6 === `SUSPECTED_BOTS_ONLY` ? e6 : `NEVER`;
4164
+ var $h = (e6) => e6 === `NEVER` ? `NOT_REQUIRED` : `REQUIRED`;
4165
+ var eg = /* @__PURE__ */ new Set([`NONE`, `AFTER_SIGNUP`, `DURING_SIGNUP`]);
4166
+ var tg = (e6) => {
4166
4167
  let t2 = e6?.emailVerificationOption;
4167
- return t2 && $h.has(t2) ? t2 : e6?.requireEmailVerification ? `AFTER_SIGNUP` : `NONE`;
4168
+ return t2 && eg.has(t2) ? t2 : e6?.requireEmailVerification ? `AFTER_SIGNUP` : `NONE`;
4168
4169
  };
4169
- var tg = async () => {
4170
- let { collectionSettings: e6, enabledConnections: t2 } = await Xh(Kh).catch(() => Xh(qh)), n2 = Zh(e6?.loginRecaptchaOption), r2 = Zh(e6?.signupRecaptchaOption);
4171
- return { availableSignInMethods: Yh(t2), loginCaptchaStatus: Qh(n2), signupCaptchaStatus: Qh(r2), loginCaptchaOption: n2, signupCaptchaOption: r2, socialSignInStatus: e6?.disableSocialLogins ? `DISABLED` : `ENABLED`, signupEmailVerificationMode: eg(e6) };
4170
+ var ng = async () => {
4171
+ let { collectionSettings: e6, enabledConnections: t2 } = await Zh(qh).catch(() => Zh(Jh)), n2 = Qh(e6?.loginRecaptchaOption), r2 = Qh(e6?.signupRecaptchaOption);
4172
+ return { availableSignInMethods: Xh(t2), loginCaptchaStatus: $h(n2), signupCaptchaStatus: $h(r2), loginCaptchaOption: n2, signupCaptchaOption: r2, socialSignInStatus: e6?.disableSocialLogins ? `DISABLED` : `ENABLED`, signupEmailVerificationMode: tg(e6) };
4172
4173
  };
4173
- var ng = (e6) => tg().catch((t2) => (console.error(`[ContextProvider] collection settings load failed`, t2), e6?.(), {}));
4174
- var rg = async () => {
4175
- let { memberPrivacySettings: e6 } = await Hh();
4176
- return e6?.publicMemberCandidates === zh.ANYONE ? `ALLOWED` : `NOT_ALLOWED`;
4174
+ var rg = (e6) => ng().catch((t2) => (console.error(`[ContextProvider] collection settings load failed`, t2), e6?.(), {}));
4175
+ var ig = async () => {
4176
+ let { memberPrivacySettings: e6 } = await Uh();
4177
+ return e6?.publicMemberCandidates === Bh.ANYONE ? `ALLOWED` : `NOT_ALLOWED`;
4177
4178
  };
4178
- var ig = () => rg().catch((e6) => {
4179
+ var ag = () => ig().catch((e6) => {
4179
4180
  console.error(`[ContextProvider] member privacy settings load failed`, e6);
4180
4181
  });
4181
- var ag = async (e6) => e6.publicMembersStatus ? void 0 : ig();
4182
- var og = /* @__PURE__ */ new Set([`14dbef06-cc42-5583-32a7-3abd44da4908`, `14724f35-6794-cd1a-0244-25fd138f9242`, `148c2287-c669-d849-d153-463c7486a694`, `14bcded7-0066-7c35-14d7-466cb3f09103`, `1537b24e-29d1-6d8f-b8e1-d6860f2f70b9`, `476dc2dd-e16e-43b0-a0aa-1a486c78fbe2`, `2936472a-a1ed-4ae5-9f71-614313a9f4e7`, `13ff8629-c1fc-e289-e81f-bc8c8968e9d6`, `91c9d6a7-6667-41fb-b0b4-7d3b3ff0b02e`, `a95a5fce-e370-4402-9ce4-96956acc747d`, `140603ad-af8d-84a5-2c80-a0f60cb47351`]);
4183
- var sg = ({ pages: e6 }) => Object.values(e6?.pages ?? {}).some(({ appDefinitionId: e7 }) => e7 !== void 0 && og.has(e7));
4184
- var cg = async ({ siteMembers: e6 }) => {
4182
+ var og = async (e6) => e6.publicMembersStatus ? void 0 : ag();
4183
+ var sg = /* @__PURE__ */ new Set([`14dbef06-cc42-5583-32a7-3abd44da4908`, `14724f35-6794-cd1a-0244-25fd138f9242`, `148c2287-c669-d849-d153-463c7486a694`, `14bcded7-0066-7c35-14d7-466cb3f09103`, `1537b24e-29d1-6d8f-b8e1-d6860f2f70b9`, `476dc2dd-e16e-43b0-a0aa-1a486c78fbe2`, `2936472a-a1ed-4ae5-9f71-614313a9f4e7`, `13ff8629-c1fc-e289-e81f-bc8c8968e9d6`, `91c9d6a7-6667-41fb-b0b4-7d3b3ff0b02e`, `a95a5fce-e370-4402-9ce4-96956acc747d`, `140603ad-af8d-84a5-2c80-a0f60cb47351`]);
4184
+ var cg = ({ pages: e6 }) => Object.values(e6?.pages ?? {}).some(({ appDefinitionId: e7 }) => e7 !== void 0 && sg.has(e7));
4185
+ var lg = async ({ siteMembers: e6 }) => {
4185
4186
  if (!e6?.getSignInSettings) throw Error(`GET_SIGN_IN_SETTINGS_UNAVAILABLE`);
4186
4187
  let t2 = await e6.getSignInSettings() ?? {};
4187
4188
  return Object.fromEntries(Object.entries(t2).filter(([, e7]) => e7 != null));
4188
4189
  };
4189
- var lg = (e6, t2) => cg(e6).catch((e7) => (console.error(`[ContextProvider] signInSettings load failed, using defaults`, e7), t2?.(), {}));
4190
- var ug = /* @__PURE__ */ new Set([`loginCaptchaStatus`, `signupCaptchaStatus`, `loginCaptchaOption`, `signupCaptchaOption`]);
4191
- var dg = (e6, t2) => t2 ?? (e6 === `REQUIRED` ? `ALWAYS` : `NEVER`);
4192
- var fg = (e6) => {
4193
- let t2 = dg(e6.loginCaptchaStatus, e6.loginCaptchaOption), n2 = dg(e6.signupCaptchaStatus, e6.signupCaptchaOption);
4194
- return { loginCaptchaStatus: Qh(t2), signupCaptchaStatus: Qh(n2), loginCaptchaOption: t2, signupCaptchaOption: n2 };
4190
+ var ug = (e6, t2) => lg(e6).catch((e7) => (console.error(`[ContextProvider] signInSettings load failed, using defaults`, e7), t2?.(), {}));
4191
+ var dg = /* @__PURE__ */ new Set([`loginCaptchaStatus`, `signupCaptchaStatus`, `loginCaptchaOption`, `signupCaptchaOption`]);
4192
+ var fg = (e6, t2) => t2 ?? (e6 === `REQUIRED` ? `ALWAYS` : `NEVER`);
4193
+ var pg = (e6) => {
4194
+ let t2 = fg(e6.loginCaptchaStatus, e6.loginCaptchaOption), n2 = fg(e6.signupCaptchaStatus, e6.signupCaptchaOption);
4195
+ return { loginCaptchaStatus: $h(t2), signupCaptchaStatus: $h(n2), loginCaptchaOption: t2, signupCaptchaOption: n2 };
4195
4196
  };
4196
- var pg = (e6, { availableSignInMethods: t2, socialSignInStatus: n2, signupEmailVerificationMode: r2, ...i2 }, a2, o2) => {
4197
- let s2 = Object.fromEntries(Object.entries(e6).filter(([e7]) => !ug.has(e7))), c2 = Object.keys(i2).length > 0 ? i2 : fg(e6), l2 = Object.fromEntries(Object.entries({ availableSignInMethods: t2, socialSignInStatus: n2, signupEmailVerificationMode: r2 }).filter(([, e7]) => e7 !== void 0)), u2 = a2 ? { publicMembersStatus: a2 } : {}, d2 = { ...Uh, ...u2, ...l2, ...s2, ...c2 };
4198
- return Gh(o2 ? d2 : { ...d2, publicMembersStatus: `NOT_ALLOWED` });
4197
+ var mg = (e6, { availableSignInMethods: t2, socialSignInStatus: n2, signupEmailVerificationMode: r2, ...i2 }, a2, o2) => {
4198
+ let s2 = Object.fromEntries(Object.entries(e6).filter(([e7]) => !dg.has(e7))), c2 = Object.keys(i2).length > 0 ? i2 : pg(e6), l2 = Object.fromEntries(Object.entries({ availableSignInMethods: t2, socialSignInStatus: n2, signupEmailVerificationMode: r2 }).filter(([, e7]) => e7 !== void 0)), u2 = a2 ? { publicMembersStatus: a2 } : {}, d2 = { ...Wh, ...u2, ...l2, ...s2, ...c2 };
4199
+ return Kh(o2 ? d2 : { ...d2, publicMembersStatus: `NOT_ALLOWED` });
4199
4200
  };
4200
- var mg = [{ name: `loginSettings`, defaults: Gh(Uh), load: async (e6, t2) => {
4201
- let [n2, r2] = await Promise.all([lg(e6, t2), ng(t2)]);
4202
- return pg(n2, r2, await ag(n2), sg(e6));
4201
+ var hg = [{ name: `loginSettings`, defaults: Kh(Wh), load: async (e6, t2) => {
4202
+ let [n2, r2] = await Promise.all([ug(e6, t2), rg(t2)]);
4203
+ return mg(n2, r2, await og(n2), cg(e6));
4203
4204
  } }];
4204
- var hg = [mh, ah, Eh, Bm, Oh, kh, lh];
4205
- var gg = (e6) => Object.assign({}, ...e6);
4206
- var _g = (e6) => Object.fromEntries(Object.keys(Bn).map((t2) => [t2, Bn[t2].replaceAll(`{email}`, () => e6)]));
4207
- var vg = gg([...[...mg, ...hg].map((e6) => e6.defaults), { texts: _g(``) }]);
4208
- var yg = (e6, t2) => Promise.all(mg.map((n2) => n2.load(e6, t2))).then(gg);
4209
- var bg = (e6, t2) => {
4210
- let [n2] = (0, import_react.useState)(Xn), r2 = (0, import_react.useMemo)(() => ({ forms: n2, loginSettings: t2 }), [n2, t2]), i2 = hg.map((t3) => t3.useValue(e6, r2));
4211
- return (0, import_react.useMemo)(() => gg(i2), i2);
4205
+ var gg = [mh, ah, Dh, Bm, kh, Ah, lh];
4206
+ var _g = (e6) => Object.assign({}, ...e6);
4207
+ var vg = (e6) => Object.fromEntries(Object.keys(Bn).map((t2) => [t2, Bn[t2].replaceAll(`{email}`, () => e6)]));
4208
+ var yg = _g([...[...hg, ...gg].map((e6) => e6.defaults), { texts: vg(``) }]);
4209
+ var bg = (e6, t2) => Promise.all(hg.map((n2) => n2.load(e6, t2))).then(_g);
4210
+ var xg = (e6, t2) => {
4211
+ let [n2] = (0, import_react.useState)(Xn), r2 = (0, import_react.useMemo)(() => ({ forms: n2, loginSettings: t2 }), [n2, t2]), i2 = gg.map((t3) => t3.useValue(e6, r2));
4212
+ return (0, import_react.useMemo)(() => _g(i2), i2);
4212
4213
  };
4213
- var xg = (0, import_react.createContext)(null);
4214
- xg.displayName = `AuthenticationContext`;
4215
- function Sg() {
4216
- return (0, import_react.useContext)(xg) ?? vg;
4217
- }
4214
+ var Sg = (0, import_react.createContext)(null);
4215
+ Sg.displayName = `AuthenticationContext`;
4218
4216
  function Cg() {
4219
- return (0, import_react.useContext)(xg);
4217
+ return (0, import_react.useContext)(Sg) ?? yg;
4218
+ }
4219
+ function wg() {
4220
+ return (0, import_react.useContext)(Sg);
4220
4221
  }
4221
- var wg = ({ promise: e6, children: t2 }) => {
4222
- let n2 = Sn(e6), r2 = bg(In(), n2.loginSettings), i2 = (0, import_react.useMemo)(() => ({ ...n2, ...r2, texts: _g(r2.pendingApprovalState.pendingApprovalEmail) }), [n2, r2]);
4223
- return (0, import_jsx_runtime.jsx)(xg.Provider, { value: i2, children: t2 });
4222
+ var Tg = ({ promise: e6, children: t2 }) => {
4223
+ let n2 = Sn(e6), r2 = xg(In(), n2.loginSettings), i2 = (0, import_react.useMemo)(() => ({ ...n2, ...r2, texts: vg(r2.pendingApprovalState.pendingApprovalEmail) }), [n2, r2]);
4224
+ return (0, import_jsx_runtime.jsx)(Sg.Provider, { value: i2, children: t2 });
4224
4225
  };
4225
- var Tg = (e6, t2) => yg(e6, t2).catch((e7) => {
4226
+ var Eg = (e6, t2) => bg(e6, t2).catch((e7) => {
4226
4227
  throw console.error(`AuthenticationProvider load failed:`, e7), t2?.(), e7;
4227
4228
  });
4228
4229
  var $;
4229
- var Eg = (e6) => {
4230
- if (typeof window > `u`) return Tg(e6);
4230
+ var Dg = (e6) => {
4231
+ if (typeof window > `u`) return Eg(e6);
4231
4232
  if (!$) {
4232
4233
  let t2 = () => {
4233
4234
  }, n2 = () => {
4234
4235
  t2(), $ === r2 && ($ = void 0);
4235
- }, r2 = Tg(e6, n2);
4236
+ }, r2 = Eg(e6, n2);
4236
4237
  $ = r2, t2 = zn(n2);
4237
4238
  }
4238
4239
  return $;
4239
4240
  };
4240
- var Dg = ({ children: t2 }) => {
4241
- let n2 = In(), [r2] = (0, import_react.useState)(() => Eg(n2));
4242
- return (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: null, children: (0, import_jsx_runtime.jsx)(wg, { promise: r2, children: t2 }) });
4241
+ var Og = ({ children: t2 }) => {
4242
+ let n2 = In(), [r2] = (0, import_react.useState)(() => Dg(n2));
4243
+ return (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: null, children: (0, import_jsx_runtime.jsx)(Tg, { promise: r2, children: t2 }) });
4243
4244
  };
4244
- var Og = xn(`f106f6a2-ebf1-442f-b82b-fbcc51c790b2`);
4245
+ var kg = xn(`f106f6a2-ebf1-442f-b82b-fbcc51c790b2`);
4245
4246
  // Annotate the CommonJS export names for ESM import in node:
4246
4247
  0 && (module.exports = {
4247
4248
  AuthenticationContext,