@stackframe/dashboard-ui-components 2.8.77 → 2.8.78

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.
@@ -3885,6 +3885,12 @@ This is likely an error in Stack. Please make sure you are running the newest ve
3885
3885
  message ?? "Your sign up was rejected by an administrator's sign-up rule.",
3886
3886
  { message: message ?? "Your sign up was rejected by an administrator's sign-up rule." }
3887
3887
  ], (json) => [json.message]);
3888
+ var BotChallengeRequired = createKnownErrorConstructor(KnownError, "BOT_CHALLENGE_REQUIRED", () => [409, "An additional bot challenge is required before sign-up can continue."], () => []);
3889
+ var BotChallengeFailed = createKnownErrorConstructor(KnownError, "BOT_CHALLENGE_FAILED", (message) => [
3890
+ 400,
3891
+ message,
3892
+ { message }
3893
+ ], (json) => [json.message]);
3888
3894
  var PasswordAuthenticationNotEnabled = createKnownErrorConstructor(KnownError, "PASSWORD_AUTHENTICATION_NOT_ENABLED", () => [400, "Password authentication is not enabled for this project."], () => []);
3889
3895
  var DataVaultStoreDoesNotExist = createKnownErrorConstructor(KnownError, "DATA_VAULT_STORE_DOES_NOT_EXIST", (storeId) => [
3890
3896
  400,
@@ -4298,6 +4304,8 @@ This is likely an error in Stack. Please make sure you are running the newest ve
4298
4304
  BranchDoesNotExist,
4299
4305
  SignUpNotEnabled,
4300
4306
  SignUpRejected,
4307
+ BotChallengeRequired,
4308
+ BotChallengeFailed,
4301
4309
  PasswordAuthenticationNotEnabled,
4302
4310
  PasskeyAuthenticationNotEnabled,
4303
4311
  AnonymousAccountsNotEnabled,
@@ -6805,6 +6813,266 @@ attempted value: ${formattedValue}
6805
6813
  ];
6806
6814
  var allProviders = standardProviders;
6807
6815
 
6816
+ // ../stack-shared/dist/esm/utils/country-codes.js
6817
+ var ISO_3166_ALPHA_2_COUNTRY_CODES = [
6818
+ "AD",
6819
+ "AE",
6820
+ "AF",
6821
+ "AG",
6822
+ "AI",
6823
+ "AL",
6824
+ "AM",
6825
+ "AO",
6826
+ "AQ",
6827
+ "AR",
6828
+ "AS",
6829
+ "AT",
6830
+ "AU",
6831
+ "AW",
6832
+ "AX",
6833
+ "AZ",
6834
+ "BA",
6835
+ "BB",
6836
+ "BD",
6837
+ "BE",
6838
+ "BF",
6839
+ "BG",
6840
+ "BH",
6841
+ "BI",
6842
+ "BJ",
6843
+ "BL",
6844
+ "BM",
6845
+ "BN",
6846
+ "BO",
6847
+ "BQ",
6848
+ "BR",
6849
+ "BS",
6850
+ "BT",
6851
+ "BV",
6852
+ "BW",
6853
+ "BY",
6854
+ "BZ",
6855
+ "CA",
6856
+ "CC",
6857
+ "CD",
6858
+ "CF",
6859
+ "CG",
6860
+ "CH",
6861
+ "CI",
6862
+ "CK",
6863
+ "CL",
6864
+ "CM",
6865
+ "CN",
6866
+ "CO",
6867
+ "CR",
6868
+ "CU",
6869
+ "CV",
6870
+ "CW",
6871
+ "CX",
6872
+ "CY",
6873
+ "CZ",
6874
+ "DE",
6875
+ "DJ",
6876
+ "DK",
6877
+ "DM",
6878
+ "DO",
6879
+ "DZ",
6880
+ "EC",
6881
+ "EE",
6882
+ "EG",
6883
+ "EH",
6884
+ "ER",
6885
+ "ES",
6886
+ "ET",
6887
+ "FI",
6888
+ "FJ",
6889
+ "FK",
6890
+ "FM",
6891
+ "FO",
6892
+ "FR",
6893
+ "GA",
6894
+ "GB",
6895
+ "GD",
6896
+ "GE",
6897
+ "GF",
6898
+ "GG",
6899
+ "GH",
6900
+ "GI",
6901
+ "GL",
6902
+ "GM",
6903
+ "GN",
6904
+ "GP",
6905
+ "GQ",
6906
+ "GR",
6907
+ "GS",
6908
+ "GT",
6909
+ "GU",
6910
+ "GW",
6911
+ "GY",
6912
+ "HK",
6913
+ "HM",
6914
+ "HN",
6915
+ "HR",
6916
+ "HT",
6917
+ "HU",
6918
+ "ID",
6919
+ "IE",
6920
+ "IL",
6921
+ "IM",
6922
+ "IN",
6923
+ "IO",
6924
+ "IQ",
6925
+ "IR",
6926
+ "IS",
6927
+ "IT",
6928
+ "JE",
6929
+ "JM",
6930
+ "JO",
6931
+ "JP",
6932
+ "KE",
6933
+ "KG",
6934
+ "KH",
6935
+ "KI",
6936
+ "KM",
6937
+ "KN",
6938
+ "KP",
6939
+ "KR",
6940
+ "KW",
6941
+ "KY",
6942
+ "KZ",
6943
+ "LA",
6944
+ "LB",
6945
+ "LC",
6946
+ "LI",
6947
+ "LK",
6948
+ "LR",
6949
+ "LS",
6950
+ "LT",
6951
+ "LU",
6952
+ "LV",
6953
+ "LY",
6954
+ "MA",
6955
+ "MC",
6956
+ "MD",
6957
+ "ME",
6958
+ "MF",
6959
+ "MG",
6960
+ "MH",
6961
+ "MK",
6962
+ "ML",
6963
+ "MM",
6964
+ "MN",
6965
+ "MO",
6966
+ "MP",
6967
+ "MQ",
6968
+ "MR",
6969
+ "MS",
6970
+ "MT",
6971
+ "MU",
6972
+ "MV",
6973
+ "MW",
6974
+ "MX",
6975
+ "MY",
6976
+ "MZ",
6977
+ "NA",
6978
+ "NC",
6979
+ "NE",
6980
+ "NF",
6981
+ "NG",
6982
+ "NI",
6983
+ "NL",
6984
+ "NO",
6985
+ "NP",
6986
+ "NR",
6987
+ "NU",
6988
+ "NZ",
6989
+ "OM",
6990
+ "PA",
6991
+ "PE",
6992
+ "PF",
6993
+ "PG",
6994
+ "PH",
6995
+ "PK",
6996
+ "PL",
6997
+ "PM",
6998
+ "PN",
6999
+ "PR",
7000
+ "PS",
7001
+ "PT",
7002
+ "PW",
7003
+ "PY",
7004
+ "QA",
7005
+ "RE",
7006
+ "RO",
7007
+ "RS",
7008
+ "RU",
7009
+ "RW",
7010
+ "SA",
7011
+ "SB",
7012
+ "SC",
7013
+ "SD",
7014
+ "SE",
7015
+ "SG",
7016
+ "SH",
7017
+ "SI",
7018
+ "SJ",
7019
+ "SK",
7020
+ "SL",
7021
+ "SM",
7022
+ "SN",
7023
+ "SO",
7024
+ "SR",
7025
+ "SS",
7026
+ "ST",
7027
+ "SV",
7028
+ "SX",
7029
+ "SY",
7030
+ "SZ",
7031
+ "TC",
7032
+ "TD",
7033
+ "TF",
7034
+ "TG",
7035
+ "TH",
7036
+ "TJ",
7037
+ "TK",
7038
+ "TL",
7039
+ "TM",
7040
+ "TN",
7041
+ "TO",
7042
+ "TR",
7043
+ "TT",
7044
+ "TV",
7045
+ "TW",
7046
+ "TZ",
7047
+ "UA",
7048
+ "UG",
7049
+ "UM",
7050
+ "US",
7051
+ "UY",
7052
+ "UZ",
7053
+ "VA",
7054
+ "VC",
7055
+ "VE",
7056
+ "VG",
7057
+ "VI",
7058
+ "VN",
7059
+ "VU",
7060
+ "WF",
7061
+ "WS",
7062
+ "YE",
7063
+ "YT",
7064
+ "ZA",
7065
+ "ZM",
7066
+ "ZW"
7067
+ ];
7068
+ var validCountryCodeSet = new Set(ISO_3166_ALPHA_2_COUNTRY_CODES);
7069
+ function normalizeCountryCode(countryCode) {
7070
+ return countryCode.trim().toUpperCase();
7071
+ }
7072
+ function isValidCountryCode(countryCode) {
7073
+ return validCountryCodeSet.has(normalizeCountryCode(countryCode));
7074
+ }
7075
+
6808
7076
  // ../stack-shared/dist/esm/utils/uuids.js
6809
7077
  function isUuid(str) {
6810
7078
  return /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/.test(str);
@@ -7060,6 +7328,11 @@ attempted value: ${formattedValue}
7060
7328
  return isBase64(value);
7061
7329
  });
7062
7330
  var passwordSchema = yupString().max(70);
7331
+ var countryCodeSchema = yupString().transform((value) => typeof value === "string" ? normalizeCountryCode(value) : value).test({
7332
+ name: "country-code",
7333
+ message: (params) => `${params.path} must be a valid ISO 3166-1 alpha-2 country code`,
7334
+ test: (value) => value == null || isValidCountryCode(value)
7335
+ });
7063
7336
  var intervalSchema = yupTuple([yupNumber().min(0).integer().defined(), yupString().oneOf([
7064
7337
  "millisecond",
7065
7338
  "second",
@@ -7957,6 +8230,7 @@ attempted value: ${formattedValue}
7957
8230
  var skipStateCheck = Symbol();
7958
8231
  var expectNoState = Symbol();
7959
8232
  var _expectedIssuer = Symbol();
8233
+ var botChallengeKnownErrors = [KnownErrors.BotChallengeRequired, KnownErrors.BotChallengeFailed];
7960
8234
 
7961
8235
  // ../stack-shared/dist/esm/utils/maps.js
7962
8236
  var _Symbol$toStringTag3;