react-country-kit-core 2.1.2 → 2.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/usePhoneInput.d.ts +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +780 -458
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -2
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
function
|
|
1
|
+
import { useCallback as k, useEffect as x, useMemo as C, useRef as w, useState as M } from "react";
|
|
2
|
+
function Pe(a) {
|
|
3
3
|
return [...a.toUpperCase()].map((o) => String.fromCodePoint(127462 + o.charCodeAt(0) - 65)).join("");
|
|
4
4
|
}
|
|
5
|
-
|
|
5
|
+
var de = [
|
|
6
6
|
{
|
|
7
7
|
name: "Afghanistan",
|
|
8
8
|
iso2: "AF",
|
|
@@ -4253,7 +4253,7 @@ const ce = [
|
|
|
4253
4253
|
date_separator: "/",
|
|
4254
4254
|
week_start: 0
|
|
4255
4255
|
}
|
|
4256
|
-
],
|
|
4256
|
+
], ue = [
|
|
4257
4257
|
{
|
|
4258
4258
|
name: "Badakhshan",
|
|
4259
4259
|
iso2: "BDS",
|
|
@@ -36103,94 +36103,442 @@ const ce = [
|
|
|
36103
36103
|
countryCode: "ZW"
|
|
36104
36104
|
}
|
|
36105
36105
|
], K = [
|
|
36106
|
-
{
|
|
36107
|
-
|
|
36108
|
-
|
|
36109
|
-
|
|
36110
|
-
|
|
36111
|
-
{
|
|
36112
|
-
|
|
36113
|
-
|
|
36114
|
-
|
|
36115
|
-
|
|
36116
|
-
{
|
|
36117
|
-
|
|
36118
|
-
|
|
36119
|
-
|
|
36120
|
-
|
|
36121
|
-
{
|
|
36122
|
-
|
|
36123
|
-
|
|
36124
|
-
|
|
36125
|
-
|
|
36126
|
-
{
|
|
36127
|
-
|
|
36128
|
-
|
|
36129
|
-
|
|
36130
|
-
|
|
36131
|
-
{
|
|
36132
|
-
|
|
36133
|
-
|
|
36134
|
-
|
|
36135
|
-
|
|
36136
|
-
{
|
|
36137
|
-
|
|
36138
|
-
|
|
36139
|
-
|
|
36140
|
-
|
|
36141
|
-
{
|
|
36142
|
-
|
|
36143
|
-
|
|
36144
|
-
|
|
36145
|
-
|
|
36146
|
-
{
|
|
36147
|
-
|
|
36148
|
-
|
|
36149
|
-
|
|
36150
|
-
|
|
36151
|
-
{
|
|
36152
|
-
|
|
36153
|
-
|
|
36154
|
-
|
|
36155
|
-
|
|
36156
|
-
{
|
|
36157
|
-
|
|
36158
|
-
|
|
36159
|
-
|
|
36160
|
-
|
|
36161
|
-
{
|
|
36162
|
-
|
|
36163
|
-
|
|
36164
|
-
|
|
36165
|
-
|
|
36166
|
-
{
|
|
36167
|
-
|
|
36168
|
-
|
|
36169
|
-
|
|
36170
|
-
|
|
36171
|
-
{
|
|
36172
|
-
|
|
36173
|
-
|
|
36174
|
-
|
|
36175
|
-
|
|
36176
|
-
{
|
|
36177
|
-
|
|
36178
|
-
|
|
36179
|
-
|
|
36180
|
-
|
|
36181
|
-
{
|
|
36182
|
-
|
|
36183
|
-
|
|
36184
|
-
|
|
36185
|
-
|
|
36186
|
-
{
|
|
36187
|
-
|
|
36188
|
-
|
|
36189
|
-
|
|
36190
|
-
|
|
36191
|
-
{
|
|
36192
|
-
|
|
36193
|
-
|
|
36106
|
+
{
|
|
36107
|
+
code: "af",
|
|
36108
|
+
english_name: "Afrikaans",
|
|
36109
|
+
native_name: "Afrikaans"
|
|
36110
|
+
},
|
|
36111
|
+
{
|
|
36112
|
+
code: "am",
|
|
36113
|
+
english_name: "Amharic",
|
|
36114
|
+
native_name: "አማርኛ"
|
|
36115
|
+
},
|
|
36116
|
+
{
|
|
36117
|
+
code: "ar",
|
|
36118
|
+
english_name: "Arabic",
|
|
36119
|
+
native_name: "العربية"
|
|
36120
|
+
},
|
|
36121
|
+
{
|
|
36122
|
+
code: "as",
|
|
36123
|
+
english_name: "Assamese",
|
|
36124
|
+
native_name: "অসমীয়া"
|
|
36125
|
+
},
|
|
36126
|
+
{
|
|
36127
|
+
code: "az",
|
|
36128
|
+
english_name: "Azerbaijani",
|
|
36129
|
+
native_name: "azərbaycanca"
|
|
36130
|
+
},
|
|
36131
|
+
{
|
|
36132
|
+
code: "be",
|
|
36133
|
+
english_name: "Belarusian",
|
|
36134
|
+
native_name: "беларуская"
|
|
36135
|
+
},
|
|
36136
|
+
{
|
|
36137
|
+
code: "bg",
|
|
36138
|
+
english_name: "Bulgarian",
|
|
36139
|
+
native_name: "български"
|
|
36140
|
+
},
|
|
36141
|
+
{
|
|
36142
|
+
code: "bn",
|
|
36143
|
+
english_name: "Bangla",
|
|
36144
|
+
native_name: "বাংলা"
|
|
36145
|
+
},
|
|
36146
|
+
{
|
|
36147
|
+
code: "bs",
|
|
36148
|
+
english_name: "Bosnian",
|
|
36149
|
+
native_name: "bosanski"
|
|
36150
|
+
},
|
|
36151
|
+
{
|
|
36152
|
+
code: "ca",
|
|
36153
|
+
english_name: "Catalan",
|
|
36154
|
+
native_name: "català"
|
|
36155
|
+
},
|
|
36156
|
+
{
|
|
36157
|
+
code: "cs",
|
|
36158
|
+
english_name: "Czech",
|
|
36159
|
+
native_name: "čeština"
|
|
36160
|
+
},
|
|
36161
|
+
{
|
|
36162
|
+
code: "da",
|
|
36163
|
+
english_name: "Danish",
|
|
36164
|
+
native_name: "dansk"
|
|
36165
|
+
},
|
|
36166
|
+
{
|
|
36167
|
+
code: "de",
|
|
36168
|
+
english_name: "German",
|
|
36169
|
+
native_name: "Deutsch"
|
|
36170
|
+
},
|
|
36171
|
+
{
|
|
36172
|
+
code: "el",
|
|
36173
|
+
english_name: "Greek",
|
|
36174
|
+
native_name: "Ελληνικά"
|
|
36175
|
+
},
|
|
36176
|
+
{
|
|
36177
|
+
code: "en",
|
|
36178
|
+
english_name: "English",
|
|
36179
|
+
native_name: "English"
|
|
36180
|
+
},
|
|
36181
|
+
{
|
|
36182
|
+
code: "en-AU",
|
|
36183
|
+
english_name: "English (Australia)",
|
|
36184
|
+
native_name: "English (Australia)"
|
|
36185
|
+
},
|
|
36186
|
+
{
|
|
36187
|
+
code: "en-CA",
|
|
36188
|
+
english_name: "English (Canada)",
|
|
36189
|
+
native_name: "English (Canada)"
|
|
36190
|
+
},
|
|
36191
|
+
{
|
|
36192
|
+
code: "en-GB",
|
|
36193
|
+
english_name: "English (United Kingdom)",
|
|
36194
|
+
native_name: "English (United Kingdom)"
|
|
36195
|
+
},
|
|
36196
|
+
{
|
|
36197
|
+
code: "en-US",
|
|
36198
|
+
english_name: "English (United States)",
|
|
36199
|
+
native_name: "English (United States)"
|
|
36200
|
+
},
|
|
36201
|
+
{
|
|
36202
|
+
code: "es",
|
|
36203
|
+
english_name: "Spanish",
|
|
36204
|
+
native_name: "español"
|
|
36205
|
+
},
|
|
36206
|
+
{
|
|
36207
|
+
code: "es-ES",
|
|
36208
|
+
english_name: "Spanish (Spain)",
|
|
36209
|
+
native_name: "español (España)"
|
|
36210
|
+
},
|
|
36211
|
+
{
|
|
36212
|
+
code: "es-MX",
|
|
36213
|
+
english_name: "Spanish (Mexico)",
|
|
36214
|
+
native_name: "español (México)"
|
|
36215
|
+
},
|
|
36216
|
+
{
|
|
36217
|
+
code: "et",
|
|
36218
|
+
english_name: "Estonian",
|
|
36219
|
+
native_name: "eesti"
|
|
36220
|
+
},
|
|
36221
|
+
{
|
|
36222
|
+
code: "eu",
|
|
36223
|
+
english_name: "Basque",
|
|
36224
|
+
native_name: "euskara"
|
|
36225
|
+
},
|
|
36226
|
+
{
|
|
36227
|
+
code: "fa",
|
|
36228
|
+
english_name: "Persian",
|
|
36229
|
+
native_name: "فارسی"
|
|
36230
|
+
},
|
|
36231
|
+
{
|
|
36232
|
+
code: "fi",
|
|
36233
|
+
english_name: "Finnish",
|
|
36234
|
+
native_name: "suomi"
|
|
36235
|
+
},
|
|
36236
|
+
{
|
|
36237
|
+
code: "fil",
|
|
36238
|
+
english_name: "Filipino",
|
|
36239
|
+
native_name: "Filipino"
|
|
36240
|
+
},
|
|
36241
|
+
{
|
|
36242
|
+
code: "fr",
|
|
36243
|
+
english_name: "French",
|
|
36244
|
+
native_name: "français"
|
|
36245
|
+
},
|
|
36246
|
+
{
|
|
36247
|
+
code: "fr-CA",
|
|
36248
|
+
english_name: "French (Canada)",
|
|
36249
|
+
native_name: "français (Canada)"
|
|
36250
|
+
},
|
|
36251
|
+
{
|
|
36252
|
+
code: "fr-FR",
|
|
36253
|
+
english_name: "French (France)",
|
|
36254
|
+
native_name: "français (France)"
|
|
36255
|
+
},
|
|
36256
|
+
{
|
|
36257
|
+
code: "gl",
|
|
36258
|
+
english_name: "Galician",
|
|
36259
|
+
native_name: "galego"
|
|
36260
|
+
},
|
|
36261
|
+
{
|
|
36262
|
+
code: "gu",
|
|
36263
|
+
english_name: "Gujarati",
|
|
36264
|
+
native_name: "ગુજરાતી"
|
|
36265
|
+
},
|
|
36266
|
+
{
|
|
36267
|
+
code: "he",
|
|
36268
|
+
english_name: "Hebrew",
|
|
36269
|
+
native_name: "עברית"
|
|
36270
|
+
},
|
|
36271
|
+
{
|
|
36272
|
+
code: "hi",
|
|
36273
|
+
english_name: "Hindi",
|
|
36274
|
+
native_name: "हिन्दी"
|
|
36275
|
+
},
|
|
36276
|
+
{
|
|
36277
|
+
code: "hr",
|
|
36278
|
+
english_name: "Croatian",
|
|
36279
|
+
native_name: "hrvatski"
|
|
36280
|
+
},
|
|
36281
|
+
{
|
|
36282
|
+
code: "hu",
|
|
36283
|
+
english_name: "Hungarian",
|
|
36284
|
+
native_name: "magyar"
|
|
36285
|
+
},
|
|
36286
|
+
{
|
|
36287
|
+
code: "hy",
|
|
36288
|
+
english_name: "Armenian",
|
|
36289
|
+
native_name: "հայերեն"
|
|
36290
|
+
},
|
|
36291
|
+
{
|
|
36292
|
+
code: "id",
|
|
36293
|
+
english_name: "Indonesian",
|
|
36294
|
+
native_name: "Bahasa Indonesia"
|
|
36295
|
+
},
|
|
36296
|
+
{
|
|
36297
|
+
code: "is",
|
|
36298
|
+
english_name: "Icelandic",
|
|
36299
|
+
native_name: "íslenska"
|
|
36300
|
+
},
|
|
36301
|
+
{
|
|
36302
|
+
code: "it",
|
|
36303
|
+
english_name: "Italian",
|
|
36304
|
+
native_name: "italiano"
|
|
36305
|
+
},
|
|
36306
|
+
{
|
|
36307
|
+
code: "ja",
|
|
36308
|
+
english_name: "Japanese",
|
|
36309
|
+
native_name: "日本語"
|
|
36310
|
+
},
|
|
36311
|
+
{
|
|
36312
|
+
code: "ka",
|
|
36313
|
+
english_name: "Georgian",
|
|
36314
|
+
native_name: "ქართული"
|
|
36315
|
+
},
|
|
36316
|
+
{
|
|
36317
|
+
code: "kk",
|
|
36318
|
+
english_name: "Kazakh",
|
|
36319
|
+
native_name: "қазақ тілі"
|
|
36320
|
+
},
|
|
36321
|
+
{
|
|
36322
|
+
code: "km",
|
|
36323
|
+
english_name: "Khmer",
|
|
36324
|
+
native_name: "ខ្មែរ"
|
|
36325
|
+
},
|
|
36326
|
+
{
|
|
36327
|
+
code: "kn",
|
|
36328
|
+
english_name: "Kannada",
|
|
36329
|
+
native_name: "ಕನ್ನಡ"
|
|
36330
|
+
},
|
|
36331
|
+
{
|
|
36332
|
+
code: "ko",
|
|
36333
|
+
english_name: "Korean",
|
|
36334
|
+
native_name: "한국어"
|
|
36335
|
+
},
|
|
36336
|
+
{
|
|
36337
|
+
code: "ky",
|
|
36338
|
+
english_name: "Kyrgyz",
|
|
36339
|
+
native_name: "кыргызча"
|
|
36340
|
+
},
|
|
36341
|
+
{
|
|
36342
|
+
code: "lo",
|
|
36343
|
+
english_name: "Lao",
|
|
36344
|
+
native_name: "ລາວ"
|
|
36345
|
+
},
|
|
36346
|
+
{
|
|
36347
|
+
code: "lt",
|
|
36348
|
+
english_name: "Lithuanian",
|
|
36349
|
+
native_name: "lietuvių"
|
|
36350
|
+
},
|
|
36351
|
+
{
|
|
36352
|
+
code: "lv",
|
|
36353
|
+
english_name: "Latvian",
|
|
36354
|
+
native_name: "latviešu"
|
|
36355
|
+
},
|
|
36356
|
+
{
|
|
36357
|
+
code: "mk",
|
|
36358
|
+
english_name: "Macedonian",
|
|
36359
|
+
native_name: "македонски"
|
|
36360
|
+
},
|
|
36361
|
+
{
|
|
36362
|
+
code: "ml",
|
|
36363
|
+
english_name: "Malayalam",
|
|
36364
|
+
native_name: "മലയാളം"
|
|
36365
|
+
},
|
|
36366
|
+
{
|
|
36367
|
+
code: "mn",
|
|
36368
|
+
english_name: "Mongolian",
|
|
36369
|
+
native_name: "монгол"
|
|
36370
|
+
},
|
|
36371
|
+
{
|
|
36372
|
+
code: "mr",
|
|
36373
|
+
english_name: "Marathi",
|
|
36374
|
+
native_name: "मराठी"
|
|
36375
|
+
},
|
|
36376
|
+
{
|
|
36377
|
+
code: "ms",
|
|
36378
|
+
english_name: "Malay",
|
|
36379
|
+
native_name: "Bahasa Melayu"
|
|
36380
|
+
},
|
|
36381
|
+
{
|
|
36382
|
+
code: "my",
|
|
36383
|
+
english_name: "Burmese",
|
|
36384
|
+
native_name: "မြန်မာ"
|
|
36385
|
+
},
|
|
36386
|
+
{
|
|
36387
|
+
code: "nb",
|
|
36388
|
+
english_name: "Norwegian Bokmål",
|
|
36389
|
+
native_name: "norsk bokmål"
|
|
36390
|
+
},
|
|
36391
|
+
{
|
|
36392
|
+
code: "ne",
|
|
36393
|
+
english_name: "Nepali",
|
|
36394
|
+
native_name: "नेपाली"
|
|
36395
|
+
},
|
|
36396
|
+
{
|
|
36397
|
+
code: "nl",
|
|
36398
|
+
english_name: "Dutch",
|
|
36399
|
+
native_name: "Nederlands"
|
|
36400
|
+
},
|
|
36401
|
+
{
|
|
36402
|
+
code: "or",
|
|
36403
|
+
english_name: "Odia",
|
|
36404
|
+
native_name: "ଓଡ଼ିଆ"
|
|
36405
|
+
},
|
|
36406
|
+
{
|
|
36407
|
+
code: "pa",
|
|
36408
|
+
english_name: "Punjabi",
|
|
36409
|
+
native_name: "ਪੰਜਾਬੀ"
|
|
36410
|
+
},
|
|
36411
|
+
{
|
|
36412
|
+
code: "pl",
|
|
36413
|
+
english_name: "Polish",
|
|
36414
|
+
native_name: "polski"
|
|
36415
|
+
},
|
|
36416
|
+
{
|
|
36417
|
+
code: "pt",
|
|
36418
|
+
english_name: "Portuguese",
|
|
36419
|
+
native_name: "português"
|
|
36420
|
+
},
|
|
36421
|
+
{
|
|
36422
|
+
code: "pt-BR",
|
|
36423
|
+
english_name: "Portuguese (Brazil)",
|
|
36424
|
+
native_name: "português (Brasil)"
|
|
36425
|
+
},
|
|
36426
|
+
{
|
|
36427
|
+
code: "pt-PT",
|
|
36428
|
+
english_name: "Portuguese (Portugal)",
|
|
36429
|
+
native_name: "português (Portugal)"
|
|
36430
|
+
},
|
|
36431
|
+
{
|
|
36432
|
+
code: "ro",
|
|
36433
|
+
english_name: "Romanian",
|
|
36434
|
+
native_name: "română"
|
|
36435
|
+
},
|
|
36436
|
+
{
|
|
36437
|
+
code: "ru",
|
|
36438
|
+
english_name: "Russian",
|
|
36439
|
+
native_name: "русский"
|
|
36440
|
+
},
|
|
36441
|
+
{
|
|
36442
|
+
code: "si",
|
|
36443
|
+
english_name: "Sinhala",
|
|
36444
|
+
native_name: "සිංහල"
|
|
36445
|
+
},
|
|
36446
|
+
{
|
|
36447
|
+
code: "sk",
|
|
36448
|
+
english_name: "Slovak",
|
|
36449
|
+
native_name: "slovenčina"
|
|
36450
|
+
},
|
|
36451
|
+
{
|
|
36452
|
+
code: "sl",
|
|
36453
|
+
english_name: "Slovenian",
|
|
36454
|
+
native_name: "slovenščina"
|
|
36455
|
+
},
|
|
36456
|
+
{
|
|
36457
|
+
code: "sq",
|
|
36458
|
+
english_name: "Albanian",
|
|
36459
|
+
native_name: "shqip"
|
|
36460
|
+
},
|
|
36461
|
+
{
|
|
36462
|
+
code: "sr",
|
|
36463
|
+
english_name: "Serbian",
|
|
36464
|
+
native_name: "српски"
|
|
36465
|
+
},
|
|
36466
|
+
{
|
|
36467
|
+
code: "sv",
|
|
36468
|
+
english_name: "Swedish",
|
|
36469
|
+
native_name: "svenska"
|
|
36470
|
+
},
|
|
36471
|
+
{
|
|
36472
|
+
code: "sw",
|
|
36473
|
+
english_name: "Swahili",
|
|
36474
|
+
native_name: "Kiswahili"
|
|
36475
|
+
},
|
|
36476
|
+
{
|
|
36477
|
+
code: "ta",
|
|
36478
|
+
english_name: "Tamil",
|
|
36479
|
+
native_name: "தமிழ்"
|
|
36480
|
+
},
|
|
36481
|
+
{
|
|
36482
|
+
code: "te",
|
|
36483
|
+
english_name: "Telugu",
|
|
36484
|
+
native_name: "తెలుగు"
|
|
36485
|
+
},
|
|
36486
|
+
{
|
|
36487
|
+
code: "th",
|
|
36488
|
+
english_name: "Thai",
|
|
36489
|
+
native_name: "ไทย"
|
|
36490
|
+
},
|
|
36491
|
+
{
|
|
36492
|
+
code: "tr",
|
|
36493
|
+
english_name: "Turkish",
|
|
36494
|
+
native_name: "Türkçe"
|
|
36495
|
+
},
|
|
36496
|
+
{
|
|
36497
|
+
code: "uk",
|
|
36498
|
+
english_name: "Ukrainian",
|
|
36499
|
+
native_name: "українська"
|
|
36500
|
+
},
|
|
36501
|
+
{
|
|
36502
|
+
code: "ur",
|
|
36503
|
+
english_name: "Urdu",
|
|
36504
|
+
native_name: "اردو"
|
|
36505
|
+
},
|
|
36506
|
+
{
|
|
36507
|
+
code: "uz",
|
|
36508
|
+
english_name: "Uzbek",
|
|
36509
|
+
native_name: "o'zbek"
|
|
36510
|
+
},
|
|
36511
|
+
{
|
|
36512
|
+
code: "vi",
|
|
36513
|
+
english_name: "Vietnamese",
|
|
36514
|
+
native_name: "Tiếng Việt"
|
|
36515
|
+
},
|
|
36516
|
+
{
|
|
36517
|
+
code: "zh-Hans",
|
|
36518
|
+
english_name: "Chinese (Simplified)",
|
|
36519
|
+
native_name: "简体中文"
|
|
36520
|
+
},
|
|
36521
|
+
{
|
|
36522
|
+
code: "zh-CN",
|
|
36523
|
+
english_name: "Chinese (Mainland China)",
|
|
36524
|
+
native_name: "简体中文 (中国)"
|
|
36525
|
+
},
|
|
36526
|
+
{
|
|
36527
|
+
code: "zh-Hant",
|
|
36528
|
+
english_name: "Chinese (Traditional)",
|
|
36529
|
+
native_name: "繁體中文"
|
|
36530
|
+
},
|
|
36531
|
+
{
|
|
36532
|
+
code: "zh-TW",
|
|
36533
|
+
english_name: "Chinese (Taiwan)",
|
|
36534
|
+
native_name: "繁體中文 (台灣)"
|
|
36535
|
+
},
|
|
36536
|
+
{
|
|
36537
|
+
code: "zu",
|
|
36538
|
+
english_name: "Zulu",
|
|
36539
|
+
native_name: "isizulu"
|
|
36540
|
+
}
|
|
36541
|
+
], ne = [
|
|
36194
36542
|
{
|
|
36195
36543
|
name: "Asia/Kabul",
|
|
36196
36544
|
offset: 16200,
|
|
@@ -39647,7 +39995,7 @@ const ce = [
|
|
|
39647
39995
|
tzName: "Central Africa Time",
|
|
39648
39996
|
countryCode: "ZW"
|
|
39649
39997
|
}
|
|
39650
|
-
],
|
|
39998
|
+
], Ce = [
|
|
39651
39999
|
{
|
|
39652
40000
|
countryCode: "AF",
|
|
39653
40001
|
iso2: "AF",
|
|
@@ -43543,7 +43891,7 @@ const ce = [
|
|
|
43543
43891
|
countryCode: "ZW",
|
|
43544
43892
|
precision: 2
|
|
43545
43893
|
}
|
|
43546
|
-
],
|
|
43894
|
+
], ie = [
|
|
43547
43895
|
{
|
|
43548
43896
|
countryCode: "AF",
|
|
43549
43897
|
format: "YYYY-MM-DD",
|
|
@@ -45044,279 +45392,266 @@ const ce = [
|
|
|
45044
45392
|
separator: "/",
|
|
45045
45393
|
weekStart: 0
|
|
45046
45394
|
}
|
|
45047
|
-
], P =
|
|
45048
|
-
function
|
|
45395
|
+
], P = de;
|
|
45396
|
+
function te() {
|
|
45049
45397
|
return P;
|
|
45050
45398
|
}
|
|
45051
45399
|
function Y(a) {
|
|
45052
45400
|
return P.find((o) => o.iso2.toLowerCase() === a.toLowerCase());
|
|
45053
45401
|
}
|
|
45054
|
-
function
|
|
45402
|
+
function Ye(a) {
|
|
45055
45403
|
return P.find((o) => o.iso3.toLowerCase() === a.toLowerCase());
|
|
45056
45404
|
}
|
|
45057
|
-
function
|
|
45058
|
-
return P.find(
|
|
45059
|
-
(o) => o.name.toLowerCase().includes(a.toLowerCase())
|
|
45060
|
-
);
|
|
45061
|
-
}
|
|
45062
|
-
const W = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ new Map(), Q = /* @__PURE__ */ new Map();
|
|
45063
|
-
function Ce(a) {
|
|
45064
|
-
if (!a.trim()) return P;
|
|
45065
|
-
const o = a.toLowerCase().trim(), e = W.get(o);
|
|
45066
|
-
if (e) return e;
|
|
45067
|
-
const i = P.filter(
|
|
45068
|
-
(n) => n.name.toLowerCase().includes(o) || n.iso2.toLowerCase().includes(o) || n.iso3.toLowerCase().includes(o) || n.phone_code.includes(o)
|
|
45069
|
-
);
|
|
45070
|
-
return W.set(o, i), i;
|
|
45405
|
+
function Be(a) {
|
|
45406
|
+
return P.find((o) => o.name.toLowerCase().includes(a.toLowerCase()));
|
|
45071
45407
|
}
|
|
45408
|
+
var J = /* @__PURE__ */ new Map(), Q = /* @__PURE__ */ new Map(), X = /* @__PURE__ */ new Map();
|
|
45072
45409
|
function le(a) {
|
|
45073
|
-
|
|
45410
|
+
if (!a.trim()) return P;
|
|
45411
|
+
const o = a.toLowerCase().trim(), e = J.get(o);
|
|
45074
45412
|
if (e) return e;
|
|
45075
|
-
const i =
|
|
45413
|
+
const i = P.filter((n) => n.name.toLowerCase().includes(o) || n.iso2.toLowerCase().includes(o) || n.iso3.toLowerCase().includes(o) || n.phone_code.includes(o));
|
|
45076
45414
|
return J.set(o, i), i;
|
|
45077
45415
|
}
|
|
45078
|
-
function
|
|
45416
|
+
function ye(a) {
|
|
45079
45417
|
const o = a.toLowerCase(), e = Q.get(o);
|
|
45080
45418
|
if (e) return e;
|
|
45081
|
-
const i =
|
|
45419
|
+
const i = ue.filter((n) => n.countryCode.toLowerCase() === o);
|
|
45082
45420
|
return Q.set(o, i), i;
|
|
45083
45421
|
}
|
|
45084
|
-
function
|
|
45422
|
+
function re(a) {
|
|
45423
|
+
const o = a.toLowerCase(), e = X.get(o);
|
|
45424
|
+
if (e) return e;
|
|
45425
|
+
const i = ne.filter((n) => n.countryCode.toLowerCase() === o);
|
|
45426
|
+
return X.set(o, i), i;
|
|
45427
|
+
}
|
|
45428
|
+
function pe(a) {
|
|
45085
45429
|
return H.find((o) => o.countryCode.toLowerCase() === a.toLowerCase());
|
|
45086
45430
|
}
|
|
45087
45431
|
function j(a) {
|
|
45088
|
-
return
|
|
45432
|
+
return Ce.find((o) => o.iso2.toLowerCase() === a.toLowerCase());
|
|
45089
45433
|
}
|
|
45090
|
-
function
|
|
45434
|
+
function me(a) {
|
|
45091
45435
|
const o = j(a);
|
|
45092
|
-
if (!o || !o.possibleLengths)
|
|
45093
|
-
|
|
45436
|
+
if (!o || !o.possibleLengths) return {
|
|
45437
|
+
min: void 0,
|
|
45438
|
+
max: void 0
|
|
45439
|
+
};
|
|
45094
45440
|
const e = o.possibleLengths, i = e.match(/\[(\d+)-(\d+)\]/);
|
|
45095
|
-
if (i)
|
|
45096
|
-
|
|
45441
|
+
if (i) return {
|
|
45442
|
+
min: parseInt(i[1], 10),
|
|
45443
|
+
max: parseInt(i[2], 10)
|
|
45444
|
+
};
|
|
45097
45445
|
if (e.includes(",")) {
|
|
45098
45446
|
const t = e.split(",").map((r) => parseInt(r.trim(), 10)).filter((r) => !isNaN(r));
|
|
45099
|
-
return {
|
|
45447
|
+
return {
|
|
45448
|
+
min: Math.min(...t),
|
|
45449
|
+
max: Math.max(...t)
|
|
45450
|
+
};
|
|
45100
45451
|
}
|
|
45101
45452
|
const n = parseInt(e, 10);
|
|
45102
|
-
return isNaN(n) ? {
|
|
45453
|
+
return isNaN(n) ? {
|
|
45454
|
+
min: void 0,
|
|
45455
|
+
max: void 0
|
|
45456
|
+
} : {
|
|
45457
|
+
min: n,
|
|
45458
|
+
max: n
|
|
45459
|
+
};
|
|
45103
45460
|
}
|
|
45104
|
-
function
|
|
45461
|
+
function ze(a) {
|
|
45105
45462
|
return Y(a)?.tax_id_label || "Tax ID";
|
|
45106
45463
|
}
|
|
45107
|
-
function
|
|
45464
|
+
function Ae(a) {
|
|
45108
45465
|
return Y(a)?.tax_id_placeholder || "Enter tax ID";
|
|
45109
45466
|
}
|
|
45110
|
-
function
|
|
45467
|
+
function fe(a) {
|
|
45111
45468
|
return Y(a)?.postal_code_label || "Postal Code";
|
|
45112
45469
|
}
|
|
45113
45470
|
function N(a, o, e, i) {
|
|
45114
|
-
const [n, t] = M(!1), [r, m] = M(""), [c,
|
|
45471
|
+
const [n, t] = M(!1), [r, m] = M(""), [c, z] = M(e ?? null);
|
|
45115
45472
|
x(() => {
|
|
45116
|
-
|
|
45473
|
+
z(e ?? null);
|
|
45117
45474
|
}, [e]);
|
|
45118
|
-
const
|
|
45119
|
-
|
|
45120
|
-
const
|
|
45121
|
-
|
|
45122
|
-
|
|
45123
|
-
|
|
45475
|
+
const l = w(i);
|
|
45476
|
+
l.current = i;
|
|
45477
|
+
const y = C(() => o(a, r), [
|
|
45478
|
+
a,
|
|
45479
|
+
r,
|
|
45480
|
+
o
|
|
45481
|
+
]), p = () => t(!0), A = () => {
|
|
45124
45482
|
t(!1), m("");
|
|
45125
45483
|
}, _ = () => t((h) => !h), f = (h) => {
|
|
45126
|
-
|
|
45484
|
+
z(h), l.current?.(h), A();
|
|
45127
45485
|
}, b = () => {
|
|
45128
|
-
|
|
45486
|
+
z(null);
|
|
45129
45487
|
};
|
|
45130
|
-
return
|
|
45131
|
-
|
|
45132
|
-
|
|
45133
|
-
|
|
45134
|
-
|
|
45135
|
-
|
|
45136
|
-
|
|
45137
|
-
|
|
45138
|
-
|
|
45139
|
-
|
|
45140
|
-
|
|
45141
|
-
|
|
45142
|
-
|
|
45143
|
-
|
|
45144
|
-
|
|
45145
|
-
|
|
45146
|
-
|
|
45147
|
-
|
|
45148
|
-
|
|
45149
|
-
|
|
45150
|
-
|
|
45151
|
-
|
|
45152
|
-
b
|
|
45153
|
-
]
|
|
45154
|
-
);
|
|
45488
|
+
return C(() => ({
|
|
45489
|
+
isOpen: n,
|
|
45490
|
+
searchQuery: r,
|
|
45491
|
+
filteredItems: y,
|
|
45492
|
+
selectedItem: c,
|
|
45493
|
+
open: p,
|
|
45494
|
+
close: A,
|
|
45495
|
+
toggle: _,
|
|
45496
|
+
setSearchQuery: m,
|
|
45497
|
+
selectItem: f,
|
|
45498
|
+
clearSelection: b
|
|
45499
|
+
}), [
|
|
45500
|
+
n,
|
|
45501
|
+
r,
|
|
45502
|
+
y,
|
|
45503
|
+
c,
|
|
45504
|
+
p,
|
|
45505
|
+
A,
|
|
45506
|
+
_,
|
|
45507
|
+
f,
|
|
45508
|
+
b
|
|
45509
|
+
]);
|
|
45155
45510
|
}
|
|
45156
|
-
function
|
|
45157
|
-
const e = k(
|
|
45158
|
-
|
|
45159
|
-
[]
|
|
45160
|
-
);
|
|
45161
|
-
return N(ie(), e, a, o);
|
|
45511
|
+
function ke(a, o) {
|
|
45512
|
+
const e = k((i, n) => le(n), []);
|
|
45513
|
+
return N(te(), e, a, o);
|
|
45162
45514
|
}
|
|
45163
|
-
function
|
|
45164
|
-
return
|
|
45515
|
+
function Ne() {
|
|
45516
|
+
return ie;
|
|
45165
45517
|
}
|
|
45166
|
-
|
|
45518
|
+
var q = {
|
|
45167
45519
|
countryCode: "DEFAULT",
|
|
45168
45520
|
format: "DD/MM/YYYY",
|
|
45169
45521
|
separator: "/",
|
|
45170
45522
|
weekStart: 1
|
|
45171
45523
|
};
|
|
45172
45524
|
function U(a) {
|
|
45173
|
-
if (!a) return
|
|
45525
|
+
if (!a) return q;
|
|
45174
45526
|
const o = a.toUpperCase();
|
|
45175
|
-
return
|
|
45176
|
-
...
|
|
45527
|
+
return ie.find((e) => e.countryCode === o) ?? {
|
|
45528
|
+
...q,
|
|
45177
45529
|
countryCode: o
|
|
45178
45530
|
};
|
|
45179
45531
|
}
|
|
45180
|
-
function
|
|
45181
|
-
if (!a || isNaN(a.getTime()) || !o)
|
|
45182
|
-
return "";
|
|
45532
|
+
function se(a, o) {
|
|
45533
|
+
if (!a || isNaN(a.getTime()) || !o) return "";
|
|
45183
45534
|
const e = String(a.getFullYear()), i = String(a.getMonth() + 1).padStart(2, "0"), n = String(a.getDate()).padStart(2, "0");
|
|
45184
45535
|
return o.replace(/YYYY/g, e).replace(/MM/g, i).replace(/DD/g, n);
|
|
45185
45536
|
}
|
|
45186
|
-
function
|
|
45187
|
-
|
|
45188
|
-
return me(a, e.format);
|
|
45537
|
+
function Le(a, o) {
|
|
45538
|
+
return se(a, U(o).format);
|
|
45189
45539
|
}
|
|
45190
|
-
function
|
|
45191
|
-
if (!a || !o || a.length !== o.length)
|
|
45192
|
-
return null;
|
|
45540
|
+
function ce(a, o) {
|
|
45541
|
+
if (!a || !o || a.length !== o.length) return null;
|
|
45193
45542
|
const e = o.indexOf("YYYY"), i = o.indexOf("MM"), n = o.indexOf("DD");
|
|
45194
|
-
if (e === -1 || i === -1 || n === -1)
|
|
45195
|
-
return null;
|
|
45543
|
+
if (e === -1 || i === -1 || n === -1) return null;
|
|
45196
45544
|
const t = parseInt(a.slice(e, e + 4), 10), r = parseInt(a.slice(i, i + 2), 10) - 1, m = parseInt(a.slice(n, n + 2), 10);
|
|
45197
|
-
if (isNaN(t) || isNaN(r) || isNaN(m) || r < 0 || r > 11 || m < 1 || m > 31)
|
|
45198
|
-
return null;
|
|
45545
|
+
if (isNaN(t) || isNaN(r) || isNaN(m) || r < 0 || r > 11 || m < 1 || m > 31) return null;
|
|
45199
45546
|
const c = new Date(t, r, m);
|
|
45200
45547
|
return c.getFullYear() !== t || c.getMonth() !== r || c.getDate() !== m ? null : c;
|
|
45201
45548
|
}
|
|
45202
|
-
function
|
|
45203
|
-
|
|
45204
|
-
return se(a, e.format);
|
|
45549
|
+
function Re(a, o) {
|
|
45550
|
+
return ce(a, U(o).format);
|
|
45205
45551
|
}
|
|
45206
|
-
|
|
45552
|
+
var $ = /* @__PURE__ */ new Map(), _e = {
|
|
45207
45553
|
country: null,
|
|
45208
45554
|
divisions: [],
|
|
45209
45555
|
timezones: [],
|
|
45210
45556
|
currency: null,
|
|
45211
45557
|
phoneFormat: null,
|
|
45212
|
-
phoneLengths: {
|
|
45558
|
+
phoneLengths: {
|
|
45559
|
+
min: void 0,
|
|
45560
|
+
max: void 0
|
|
45561
|
+
},
|
|
45213
45562
|
exampleNumber: void 0,
|
|
45214
|
-
tax: {
|
|
45563
|
+
tax: {
|
|
45564
|
+
label: "Tax ID",
|
|
45565
|
+
placeholder: "Enter tax ID"
|
|
45566
|
+
},
|
|
45215
45567
|
postalCode: { label: "Postal Code" },
|
|
45216
45568
|
dateFormat: null
|
|
45217
45569
|
};
|
|
45218
45570
|
function O(a) {
|
|
45219
|
-
const o =
|
|
45220
|
-
return
|
|
45221
|
-
if (!o) return
|
|
45222
|
-
let e =
|
|
45571
|
+
const o = C(() => a ? a === a.toUpperCase() ? a : a.toUpperCase() : null, [a]);
|
|
45572
|
+
return C(() => {
|
|
45573
|
+
if (!o) return _e;
|
|
45574
|
+
let e = $.get(o.length);
|
|
45223
45575
|
if (e) {
|
|
45224
45576
|
const f = e.get(o);
|
|
45225
45577
|
if (f) return f;
|
|
45226
45578
|
}
|
|
45227
|
-
const i = Y(o) ?? null, n =
|
|
45579
|
+
const i = Y(o) ?? null, n = ye(o), t = re(o), r = pe(o) ?? null, m = j(o) ?? null, c = me(o), z = m?.example !== void 0 ? String(m.example) : void 0, l = ze(o), y = Ae(o), p = fe(o), A = U(o), _ = {
|
|
45228
45580
|
country: i,
|
|
45229
45581
|
divisions: n,
|
|
45230
45582
|
timezones: t,
|
|
45231
45583
|
currency: r,
|
|
45232
45584
|
phoneFormat: m,
|
|
45233
45585
|
phoneLengths: c,
|
|
45234
|
-
exampleNumber:
|
|
45235
|
-
tax: {
|
|
45236
|
-
|
|
45586
|
+
exampleNumber: z,
|
|
45587
|
+
tax: {
|
|
45588
|
+
label: l,
|
|
45589
|
+
placeholder: y
|
|
45590
|
+
},
|
|
45591
|
+
postalCode: { label: p },
|
|
45237
45592
|
dateFormat: A
|
|
45238
45593
|
};
|
|
45239
|
-
return e || (e = /* @__PURE__ */ new Map(),
|
|
45594
|
+
return e || (e = /* @__PURE__ */ new Map(), $.set(o.length, e)), e.set(o, _), _;
|
|
45240
45595
|
}, [o]);
|
|
45241
45596
|
}
|
|
45242
|
-
|
|
45243
|
-
const $ = /* @__PURE__ */ new Map();
|
|
45597
|
+
var G = null, ee = /* @__PURE__ */ new Map();
|
|
45244
45598
|
function F() {
|
|
45245
45599
|
if (G) return G;
|
|
45246
45600
|
const a = /* @__PURE__ */ new Set(), o = [];
|
|
45247
|
-
for (const e of H)
|
|
45248
|
-
a.has(e.code) || (a.add(e.code), o.push(e));
|
|
45601
|
+
for (const e of H) a.has(e.code) || (a.add(e.code), o.push(e));
|
|
45249
45602
|
return G = o.sort((e, i) => e.code.localeCompare(i.code)), G;
|
|
45250
45603
|
}
|
|
45251
|
-
function
|
|
45604
|
+
function Ie(a) {
|
|
45252
45605
|
const o = a.toLowerCase();
|
|
45253
|
-
return F().find(
|
|
45254
|
-
(e) => e.code.toLowerCase() === o
|
|
45255
|
-
);
|
|
45606
|
+
return F().find((e) => e.code.toLowerCase() === o);
|
|
45256
45607
|
}
|
|
45257
|
-
function
|
|
45608
|
+
function ge(a, o) {
|
|
45258
45609
|
let e = F();
|
|
45259
45610
|
if (o && (e = H.filter((m) => m.countryCode.toLowerCase() === o.toLowerCase())), !a.trim()) return e;
|
|
45260
|
-
const i = a.toLowerCase().trim(), n = `${o || ""}:${i}`, t =
|
|
45611
|
+
const i = a.toLowerCase().trim(), n = `${o || ""}:${i}`, t = ee.get(n);
|
|
45261
45612
|
if (t) return t;
|
|
45262
|
-
const r = e.filter(
|
|
45263
|
-
|
|
45264
|
-
);
|
|
45265
|
-
return $.set(n, r), r;
|
|
45613
|
+
const r = e.filter((m) => m.code.toLowerCase().includes(i) || m.name.toLowerCase().includes(i) || m.symbol.toLowerCase().includes(i));
|
|
45614
|
+
return ee.set(n, r), r;
|
|
45266
45615
|
}
|
|
45267
|
-
function
|
|
45268
|
-
const e = k(
|
|
45269
|
-
(i, n) => _e(n),
|
|
45270
|
-
[]
|
|
45271
|
-
);
|
|
45616
|
+
function Ge(a, o) {
|
|
45617
|
+
const e = k((i, n) => ge(n), []);
|
|
45272
45618
|
return N(F(), e, a, o);
|
|
45273
45619
|
}
|
|
45274
|
-
function
|
|
45275
|
-
const
|
|
45276
|
-
|
|
45277
|
-
|
|
45278
|
-
|
|
45279
|
-
|
|
45280
|
-
|
|
45281
|
-
);
|
|
45282
|
-
},
|
|
45283
|
-
[]
|
|
45284
|
-
);
|
|
45285
|
-
return N(n, t, o, e);
|
|
45620
|
+
function ve(a, o, e) {
|
|
45621
|
+
const i = O(a).divisions;
|
|
45622
|
+
return N(i, k((n, t) => {
|
|
45623
|
+
if (!t.trim()) return n;
|
|
45624
|
+
const r = t.toLowerCase().trim();
|
|
45625
|
+
return n.filter((m) => m.name.toLowerCase().includes(r) || m.iso2.toLowerCase().includes(r));
|
|
45626
|
+
}, []), o, e);
|
|
45286
45627
|
}
|
|
45287
|
-
|
|
45288
|
-
function
|
|
45628
|
+
var oe = /* @__PURE__ */ new Map();
|
|
45629
|
+
function Ee() {
|
|
45289
45630
|
return K;
|
|
45290
45631
|
}
|
|
45291
|
-
function
|
|
45632
|
+
function Ke(a) {
|
|
45292
45633
|
const o = a.toLowerCase();
|
|
45293
45634
|
return K.find((e) => e.code.toLowerCase() === o);
|
|
45294
45635
|
}
|
|
45295
|
-
function
|
|
45636
|
+
function Me(a) {
|
|
45296
45637
|
if (!a.trim()) return K;
|
|
45297
|
-
const o = a.toLowerCase().trim(), e =
|
|
45638
|
+
const o = a.toLowerCase().trim(), e = oe.get(o);
|
|
45298
45639
|
if (e) return e;
|
|
45299
|
-
const i = K.filter(
|
|
45300
|
-
|
|
45301
|
-
);
|
|
45302
|
-
return ee.set(o, i), i;
|
|
45640
|
+
const i = K.filter((n) => n.english_name.toLowerCase().includes(o) || n.native_name.toLowerCase().includes(o) || n.code.toLowerCase().includes(o));
|
|
45641
|
+
return oe.set(o, i), i;
|
|
45303
45642
|
}
|
|
45304
|
-
function
|
|
45305
|
-
const e = k(
|
|
45306
|
-
|
|
45307
|
-
[]
|
|
45308
|
-
);
|
|
45309
|
-
return N(ge(), e, a, o);
|
|
45643
|
+
function Ue(a, o) {
|
|
45644
|
+
const e = k((i, n) => Me(n), []);
|
|
45645
|
+
return N(Ee(), e, a, o);
|
|
45310
45646
|
}
|
|
45311
|
-
|
|
45647
|
+
var v = null;
|
|
45312
45648
|
function V() {
|
|
45313
45649
|
if (v) return v;
|
|
45314
45650
|
const a = /* @__PURE__ */ new Set(), o = [];
|
|
45315
|
-
for (const e of
|
|
45316
|
-
a.has(e.name) || (a.add(e.name), o.push(e));
|
|
45651
|
+
for (const e of ne) a.has(e.name) || (a.add(e.name), o.push(e));
|
|
45317
45652
|
return v = o.sort((e, i) => e.offset - i.offset), v;
|
|
45318
45653
|
}
|
|
45319
|
-
|
|
45654
|
+
var he = {
|
|
45320
45655
|
"US/Eastern": "America/New_York",
|
|
45321
45656
|
"US/Central": "America/Chicago",
|
|
45322
45657
|
"US/Mountain": "America/Denver",
|
|
@@ -45362,49 +45697,33 @@ const Me = {
|
|
|
45362
45697
|
"Europe/Belfast": "Europe/London",
|
|
45363
45698
|
"Europe/Tiraspol": "Europe/Chisinau"
|
|
45364
45699
|
};
|
|
45365
|
-
function
|
|
45700
|
+
function xe(a) {
|
|
45366
45701
|
if (!a) return;
|
|
45367
|
-
const o = a.toLowerCase(), e = V(), i = e.find(
|
|
45368
|
-
(t) => t.name.toLowerCase() === o
|
|
45369
|
-
);
|
|
45702
|
+
const o = a.toLowerCase(), e = V(), i = e.find((t) => t.name.toLowerCase() === o);
|
|
45370
45703
|
if (i) return i;
|
|
45371
|
-
const n = Object.entries(
|
|
45372
|
-
|
|
45373
|
-
)?.[1];
|
|
45374
|
-
if (n)
|
|
45375
|
-
return e.find(
|
|
45376
|
-
(t) => t.name.toLowerCase() === n.toLowerCase()
|
|
45377
|
-
);
|
|
45704
|
+
const n = Object.entries(he).find(([t]) => t.toLowerCase() === o)?.[1];
|
|
45705
|
+
if (n) return e.find((t) => t.name.toLowerCase() === n.toLowerCase());
|
|
45378
45706
|
}
|
|
45379
|
-
|
|
45380
|
-
function
|
|
45381
|
-
const e = o ?
|
|
45707
|
+
var ae = /* @__PURE__ */ new Map();
|
|
45708
|
+
function Se(a, o) {
|
|
45709
|
+
const e = o ? re(o) : V();
|
|
45382
45710
|
if (!a.trim()) return e;
|
|
45383
|
-
const i = a.toLowerCase().trim(), n = `${o || ""}:${i}`, t =
|
|
45711
|
+
const i = a.toLowerCase().trim(), n = `${o || ""}:${i}`, t = ae.get(n);
|
|
45384
45712
|
if (t) return t;
|
|
45385
|
-
const r = e.filter(
|
|
45386
|
-
|
|
45387
|
-
);
|
|
45388
|
-
return oe.set(n, r), r;
|
|
45713
|
+
const r = e.filter((m) => m.name.toLowerCase().includes(i) || m.tzName.toLowerCase().includes(i) || m.abbreviation.toLowerCase().includes(i) || m.offset_name.toLowerCase().includes(i));
|
|
45714
|
+
return ae.set(n, r), r;
|
|
45389
45715
|
}
|
|
45390
|
-
function
|
|
45391
|
-
const i = O(e)
|
|
45392
|
-
|
|
45393
|
-
[e, i.timezones]
|
|
45394
|
-
), t = k(
|
|
45395
|
-
(r, m) => he(m, e),
|
|
45396
|
-
[e]
|
|
45397
|
-
);
|
|
45398
|
-
return N(n, t, a, o);
|
|
45716
|
+
function we(a, o, e) {
|
|
45717
|
+
const i = O(e);
|
|
45718
|
+
return N(C(() => e ? i.timezones : V(), [e, i.timezones]), k((n, t) => Se(t, e), [e]), a, o);
|
|
45399
45719
|
}
|
|
45400
45720
|
function B(a) {
|
|
45401
45721
|
const o = Y(a);
|
|
45402
|
-
if (!o)
|
|
45403
|
-
|
|
45404
|
-
const e = re(a), i = j(a);
|
|
45722
|
+
if (!o) return {};
|
|
45723
|
+
const e = me(a), i = j(a);
|
|
45405
45724
|
let n = i?.example ? String(i.example) : void 0;
|
|
45406
45725
|
n?.startsWith("+") && (n = n.slice(1 + o.phone_code.length));
|
|
45407
|
-
const t = n ?
|
|
45726
|
+
const t = n ? Te(n, a) : void 0;
|
|
45408
45727
|
return {
|
|
45409
45728
|
minLength: e.min,
|
|
45410
45729
|
maxLength: e.max,
|
|
@@ -45414,245 +45733,248 @@ function B(a) {
|
|
|
45414
45733
|
nationalPrefix: i?.nationalPrefix
|
|
45415
45734
|
};
|
|
45416
45735
|
}
|
|
45417
|
-
function
|
|
45736
|
+
function Te(a, o) {
|
|
45418
45737
|
const e = a.replace(/\D/g, "");
|
|
45419
45738
|
if (o.toUpperCase() === "US" || o.toUpperCase() === "CA") {
|
|
45420
|
-
if (e.length >= 10)
|
|
45421
|
-
return `(${e.slice(0, 3)}) ${e.slice(3, 6)}-${e.slice(6, 10)}`;
|
|
45739
|
+
if (e.length >= 10) return `(${e.slice(0, 3)}) ${e.slice(3, 6)}-${e.slice(6, 10)}`;
|
|
45422
45740
|
} else if (o.toUpperCase() === "GB") {
|
|
45423
|
-
if (e.length >= 10)
|
|
45424
|
-
return `${e.slice(0, 4)} ${e.slice(4, 8)} ${e.slice(8)}`;
|
|
45741
|
+
if (e.length >= 10) return `${e.slice(0, 4)} ${e.slice(4, 8)} ${e.slice(8)}`;
|
|
45425
45742
|
} else if (o.toUpperCase() === "DE") {
|
|
45426
|
-
if (e.length >= 10)
|
|
45427
|
-
return `${e.slice(0, 3)} ${e.slice(3)}`;
|
|
45743
|
+
if (e.length >= 10) return `${e.slice(0, 3)} ${e.slice(3)}`;
|
|
45428
45744
|
} else if (o.toUpperCase() === "FR" && e.length >= 9)
|
|
45429
45745
|
return `${e.slice(0, 1)} ${e.slice(1, 5)} ${e.slice(5)}`;
|
|
45430
45746
|
const i = e.match(/(\d{1,4})(\d{1,4})?(\d{1,4})?(\d{0,4})?/);
|
|
45431
|
-
return i ? [
|
|
45747
|
+
return i ? [
|
|
45748
|
+
i[1],
|
|
45749
|
+
i[2],
|
|
45750
|
+
i[3],
|
|
45751
|
+
i[4]
|
|
45752
|
+
].filter(Boolean).join(" ") : e;
|
|
45432
45753
|
}
|
|
45433
|
-
function
|
|
45754
|
+
function be(a, o, e) {
|
|
45434
45755
|
const i = [];
|
|
45435
45756
|
let n = o.replace(/\D/g, "");
|
|
45436
45757
|
const t = B(e);
|
|
45437
|
-
if (t.nationalPrefix && n.startsWith(t.nationalPrefix) && (n = n.slice(t.nationalPrefix.length)), t.minLength && n.length < t.minLength && i.push(`Phone number must be at least ${t.minLength} digits`), t.maxLength && n.length > t.maxLength && i.push(`Phone number must be at most ${t.maxLength} digits`), t.pattern && n.length > 0)
|
|
45438
|
-
|
|
45439
|
-
|
|
45440
|
-
|
|
45441
|
-
}
|
|
45758
|
+
if (t.nationalPrefix && n.startsWith(t.nationalPrefix) && (n = n.slice(t.nationalPrefix.length)), t.minLength && n.length < t.minLength && i.push(`Phone number must be at least ${t.minLength} digits`), t.maxLength && n.length > t.maxLength && i.push(`Phone number must be at most ${t.maxLength} digits`), t.pattern && n.length > 0) try {
|
|
45759
|
+
new RegExp(`^${t.pattern}$`).test(n) || i.push("Phone number format is invalid");
|
|
45760
|
+
} catch {
|
|
45761
|
+
}
|
|
45442
45762
|
return {
|
|
45443
45763
|
isValid: i.length === 0,
|
|
45444
45764
|
errors: i
|
|
45445
45765
|
};
|
|
45446
45766
|
}
|
|
45447
|
-
function
|
|
45767
|
+
function He(a, o) {
|
|
45448
45768
|
const e = a.replace(/\D/g, "");
|
|
45449
45769
|
if (o.toUpperCase() === "US" || o.toUpperCase() === "CA") {
|
|
45450
|
-
if (e.length >= 10)
|
|
45451
|
-
return `(${e.slice(0, 3)}) ${e.slice(3, 6)}-${e.slice(6, 10)}`;
|
|
45770
|
+
if (e.length >= 10) return `(${e.slice(0, 3)}) ${e.slice(3, 6)}-${e.slice(6, 10)}`;
|
|
45452
45771
|
} else if (o.toUpperCase() === "GB") {
|
|
45453
|
-
if (e.length >= 10)
|
|
45454
|
-
return `${e.slice(0, 4)} ${e.slice(4, 8)} ${e.slice(8)}`;
|
|
45772
|
+
if (e.length >= 10) return `${e.slice(0, 4)} ${e.slice(4, 8)} ${e.slice(8)}`;
|
|
45455
45773
|
} else if (o.toUpperCase() === "DE" && e.length >= 10)
|
|
45456
45774
|
return `${e.slice(0, 3)} ${e.slice(3)}`;
|
|
45457
45775
|
return a;
|
|
45458
45776
|
}
|
|
45459
|
-
function
|
|
45460
|
-
const i = a?.country ?? (e ? Y(e) ?? null : null), [n, t] = M(i), [r, m] = M(a?.number ?? ""), [c,
|
|
45777
|
+
function je(a, o, e) {
|
|
45778
|
+
const i = a?.country ?? (e ? Y(e) ?? null : null), [n, t] = M(i), [r, m] = M(a?.number ?? ""), [c, z] = M(!1), [l, y] = M("");
|
|
45461
45779
|
x(() => {
|
|
45462
45780
|
a ? (t(a.country), m(a.number)) : (t(i), m(""));
|
|
45463
45781
|
}, [a, i]);
|
|
45464
|
-
const
|
|
45465
|
-
|
|
45466
|
-
const A =
|
|
45467
|
-
if (!
|
|
45468
|
-
const s =
|
|
45469
|
-
return A.filter(
|
|
45470
|
-
|
|
45471
|
-
);
|
|
45472
|
-
|
|
45473
|
-
|
|
45474
|
-
|
|
45475
|
-
|
|
45476
|
-
|
|
45477
|
-
|
|
45478
|
-
|
|
45479
|
-
|
|
45782
|
+
const p = w(o);
|
|
45783
|
+
p.current = o;
|
|
45784
|
+
const A = te(), _ = C(() => {
|
|
45785
|
+
if (!l.trim()) return A;
|
|
45786
|
+
const s = l.toLowerCase().trim().replace("+", "");
|
|
45787
|
+
return A.filter((d) => d.name.toLowerCase().includes(s) || d.phone_code.includes(s) || d.iso2.toLowerCase().includes(s));
|
|
45788
|
+
}, [A, l]), f = (s, d) => {
|
|
45789
|
+
const u = B(s.iso2);
|
|
45790
|
+
let T = d, Z = u;
|
|
45791
|
+
if (u.nationalPrefix) {
|
|
45792
|
+
const W = d.startsWith(u.nationalPrefix);
|
|
45793
|
+
W && (T = d.slice(u.nationalPrefix.length)), Z = {
|
|
45794
|
+
...u,
|
|
45795
|
+
minLength: W ? u.minLength ? u.minLength + u.nationalPrefix.length : void 0 : u.minLength,
|
|
45796
|
+
maxLength: u.maxLength ? u.maxLength + u.nationalPrefix.length : u.maxLength
|
|
45797
|
+
};
|
|
45798
|
+
}
|
|
45799
|
+
return {
|
|
45480
45800
|
country: s,
|
|
45481
45801
|
dialCode: `+${s.phone_code}`,
|
|
45482
|
-
number:
|
|
45802
|
+
number: d,
|
|
45483
45803
|
full: `+${s.phone_code}${T}`,
|
|
45484
45804
|
validation: Z
|
|
45485
45805
|
};
|
|
45486
45806
|
}, b = (s) => {
|
|
45487
|
-
t(s),
|
|
45807
|
+
t(s), z(!1), y(""), p.current?.(f(s, r));
|
|
45488
45808
|
}, h = O(n?.iso2), L = (s) => {
|
|
45489
|
-
let
|
|
45490
|
-
const
|
|
45809
|
+
let d = s.replace(/\D/g, "");
|
|
45810
|
+
const u = B(n?.iso2 ?? "");
|
|
45491
45811
|
let T = h.phoneLengths.max;
|
|
45492
|
-
T &&
|
|
45493
|
-
}, R = () => n ? r ?
|
|
45494
|
-
|
|
45495
|
-
|
|
45496
|
-
|
|
45497
|
-
|
|
45498
|
-
|
|
45812
|
+
T && u.nationalPrefix && d.startsWith(u.nationalPrefix) && (T += u.nationalPrefix.length), T && d.length > T && (d = d.slice(0, T)), m(d), n && p.current?.(f(n, d));
|
|
45813
|
+
}, R = () => n ? r ? be(`+${n.phone_code}`, r, n.iso2) : {
|
|
45814
|
+
isValid: !1,
|
|
45815
|
+
errors: ["Phone number is required"]
|
|
45816
|
+
} : {
|
|
45817
|
+
isValid: !1,
|
|
45818
|
+
errors: ["Please select a country"]
|
|
45819
|
+
}, I = () => n ? B(n.iso2).placeholder || "Enter phone number" : "Phone number", g = () => z((s) => !s), E = () => {
|
|
45820
|
+
z(!1), y("");
|
|
45821
|
+
}, D = C(() => n ? f(n, r) : null, [n, r]), S = C(() => {
|
|
45499
45822
|
if (!n) return null;
|
|
45500
45823
|
const s = B(n.iso2);
|
|
45501
|
-
|
|
45502
|
-
|
|
45503
|
-
|
|
45504
|
-
|
|
45505
|
-
|
|
45824
|
+
if (s.nationalPrefix) {
|
|
45825
|
+
const d = r.startsWith(s.nationalPrefix);
|
|
45826
|
+
return {
|
|
45827
|
+
...s,
|
|
45828
|
+
minLength: d ? s.minLength ? s.minLength + s.nationalPrefix.length : void 0 : s.minLength,
|
|
45829
|
+
maxLength: s.maxLength ? s.maxLength + s.nationalPrefix.length : s.maxLength
|
|
45830
|
+
};
|
|
45831
|
+
}
|
|
45832
|
+
return s;
|
|
45506
45833
|
}, [n, r]);
|
|
45507
|
-
return
|
|
45508
|
-
|
|
45509
|
-
|
|
45510
|
-
|
|
45511
|
-
|
|
45512
|
-
|
|
45513
|
-
|
|
45514
|
-
|
|
45515
|
-
|
|
45516
|
-
|
|
45517
|
-
|
|
45518
|
-
|
|
45519
|
-
|
|
45520
|
-
|
|
45521
|
-
|
|
45522
|
-
|
|
45523
|
-
|
|
45524
|
-
|
|
45525
|
-
|
|
45526
|
-
|
|
45527
|
-
|
|
45528
|
-
|
|
45529
|
-
|
|
45530
|
-
|
|
45531
|
-
_
|
|
45532
|
-
]
|
|
45533
|
-
);
|
|
45834
|
+
return C(() => ({
|
|
45835
|
+
country: n,
|
|
45836
|
+
number: r,
|
|
45837
|
+
value: D,
|
|
45838
|
+
validation: S,
|
|
45839
|
+
isOpen: c,
|
|
45840
|
+
searchQuery: l,
|
|
45841
|
+
filteredCountries: _,
|
|
45842
|
+
setSearchQuery: y,
|
|
45843
|
+
selectCountry: b,
|
|
45844
|
+
setNumber: L,
|
|
45845
|
+
toggle: g,
|
|
45846
|
+
close: E,
|
|
45847
|
+
validate: R,
|
|
45848
|
+
getPlaceholder: I
|
|
45849
|
+
}), [
|
|
45850
|
+
n,
|
|
45851
|
+
r,
|
|
45852
|
+
D,
|
|
45853
|
+
S,
|
|
45854
|
+
c,
|
|
45855
|
+
l,
|
|
45856
|
+
_
|
|
45857
|
+
]);
|
|
45534
45858
|
}
|
|
45535
|
-
function
|
|
45536
|
-
const [r, m] = M(!1), [c,
|
|
45859
|
+
function Oe(a, o, e, i, n, t) {
|
|
45860
|
+
const [r, m] = M(!1), [c, z] = M(""), [l, y] = M(i ?? []);
|
|
45537
45861
|
x(() => {
|
|
45538
|
-
|
|
45862
|
+
y(i ?? []);
|
|
45539
45863
|
}, [i]);
|
|
45540
|
-
const
|
|
45541
|
-
|
|
45542
|
-
const A =
|
|
45543
|
-
|
|
45544
|
-
|
|
45545
|
-
|
|
45546
|
-
|
|
45547
|
-
|
|
45548
|
-
|
|
45864
|
+
const p = w(n);
|
|
45865
|
+
p.current = n;
|
|
45866
|
+
const A = C(() => o(a, c), [
|
|
45867
|
+
a,
|
|
45868
|
+
c,
|
|
45869
|
+
o
|
|
45870
|
+
]), _ = () => m(!0), f = () => {
|
|
45871
|
+
m(!1), z("");
|
|
45872
|
+
}, b = () => m((g) => !g), h = (g) => l.some((E) => e(E) === e(g)), L = (g) => {
|
|
45873
|
+
y((E) => {
|
|
45549
45874
|
const D = E.some((s) => e(s) === e(g));
|
|
45550
45875
|
let S;
|
|
45551
|
-
if (D)
|
|
45552
|
-
S = E.filter((s) => e(s) !== e(g));
|
|
45876
|
+
if (D) S = E.filter((s) => e(s) !== e(g));
|
|
45553
45877
|
else {
|
|
45554
45878
|
if (t !== void 0 && E.length >= t) return E;
|
|
45555
45879
|
S = [...E, g];
|
|
45556
45880
|
}
|
|
45557
|
-
return
|
|
45881
|
+
return p.current?.(S), S;
|
|
45558
45882
|
});
|
|
45559
45883
|
}, R = (g) => {
|
|
45560
|
-
|
|
45884
|
+
y((E) => {
|
|
45561
45885
|
const D = E.filter((S) => e(S) !== e(g));
|
|
45562
|
-
return
|
|
45886
|
+
return p.current?.(D), D;
|
|
45563
45887
|
});
|
|
45564
45888
|
}, I = () => {
|
|
45565
|
-
|
|
45889
|
+
y([]), p.current?.([]);
|
|
45566
45890
|
};
|
|
45567
|
-
return
|
|
45568
|
-
|
|
45569
|
-
|
|
45570
|
-
|
|
45571
|
-
|
|
45572
|
-
|
|
45573
|
-
|
|
45574
|
-
|
|
45575
|
-
|
|
45576
|
-
|
|
45577
|
-
|
|
45578
|
-
|
|
45579
|
-
|
|
45580
|
-
|
|
45581
|
-
|
|
45582
|
-
|
|
45583
|
-
|
|
45584
|
-
|
|
45585
|
-
|
|
45586
|
-
|
|
45587
|
-
|
|
45588
|
-
|
|
45589
|
-
|
|
45590
|
-
|
|
45591
|
-
|
|
45592
|
-
|
|
45593
|
-
I
|
|
45594
|
-
]
|
|
45595
|
-
);
|
|
45891
|
+
return C(() => ({
|
|
45892
|
+
isOpen: r,
|
|
45893
|
+
searchQuery: c,
|
|
45894
|
+
filteredItems: A,
|
|
45895
|
+
selectedItems: l,
|
|
45896
|
+
open: _,
|
|
45897
|
+
close: f,
|
|
45898
|
+
toggle: b,
|
|
45899
|
+
setSearchQuery: z,
|
|
45900
|
+
toggleItem: L,
|
|
45901
|
+
isSelected: h,
|
|
45902
|
+
removeItem: R,
|
|
45903
|
+
clearAll: I
|
|
45904
|
+
}), [
|
|
45905
|
+
r,
|
|
45906
|
+
c,
|
|
45907
|
+
A,
|
|
45908
|
+
l,
|
|
45909
|
+
_,
|
|
45910
|
+
f,
|
|
45911
|
+
b,
|
|
45912
|
+
L,
|
|
45913
|
+
h,
|
|
45914
|
+
R,
|
|
45915
|
+
I
|
|
45916
|
+
]);
|
|
45596
45917
|
}
|
|
45597
|
-
function
|
|
45598
|
-
const o =
|
|
45918
|
+
function Fe(a) {
|
|
45919
|
+
const o = C(() => a ? a === a.toUpperCase() ? a : a.toUpperCase() : null, [a]), e = C(() => o ? U(o) : null, [o]);
|
|
45599
45920
|
return {
|
|
45600
45921
|
dateFormat: e,
|
|
45601
|
-
formatDate: i,
|
|
45602
|
-
parseDate:
|
|
45603
|
-
placeholder:
|
|
45604
|
-
weekStart:
|
|
45922
|
+
formatDate: C(() => (i) => e ? se(i, e.format) : "", [e]),
|
|
45923
|
+
parseDate: C(() => (i) => e ? ce(i, e.format) : null, [e]),
|
|
45924
|
+
placeholder: e?.format ?? "",
|
|
45925
|
+
weekStart: e?.weekStart ?? 1
|
|
45605
45926
|
};
|
|
45606
45927
|
}
|
|
45607
45928
|
export {
|
|
45608
|
-
|
|
45929
|
+
de as COUNTRIES,
|
|
45609
45930
|
H as CURRENCIES,
|
|
45610
|
-
|
|
45611
|
-
|
|
45612
|
-
|
|
45613
|
-
|
|
45614
|
-
|
|
45615
|
-
|
|
45616
|
-
|
|
45617
|
-
|
|
45618
|
-
|
|
45931
|
+
ie as DATE_FORMATS,
|
|
45932
|
+
ue as DIVISIONS,
|
|
45933
|
+
Ce as PHONE_FORMATS,
|
|
45934
|
+
ne as TIMEZONES,
|
|
45935
|
+
Le as formatDateByCountry,
|
|
45936
|
+
se as formatDateWithPattern,
|
|
45937
|
+
Te as formatPhoneExample,
|
|
45938
|
+
He as formatPhoneNumber,
|
|
45939
|
+
te as getAllCountries,
|
|
45619
45940
|
F as getAllCurrencies,
|
|
45620
|
-
|
|
45621
|
-
|
|
45941
|
+
Ne as getAllDateFormats,
|
|
45942
|
+
Ee as getAllLanguages,
|
|
45622
45943
|
V as getAllTimezones,
|
|
45623
45944
|
Y as getCountryByIso2,
|
|
45624
|
-
|
|
45625
|
-
|
|
45626
|
-
|
|
45627
|
-
|
|
45945
|
+
Ye as getCountryByIso3,
|
|
45946
|
+
Be as getCountryByName,
|
|
45947
|
+
Ie as getCurrencyByCode,
|
|
45948
|
+
pe as getCurrencyByCountry,
|
|
45628
45949
|
U as getDateFormatByCountry,
|
|
45629
|
-
|
|
45630
|
-
|
|
45950
|
+
ye as getDivisionsByCountry,
|
|
45951
|
+
Ke as getLanguageByCode,
|
|
45631
45952
|
j as getPhoneFormatByCountry,
|
|
45632
|
-
|
|
45953
|
+
me as getPhoneLengths,
|
|
45633
45954
|
B as getPhoneValidation,
|
|
45634
|
-
|
|
45635
|
-
|
|
45636
|
-
|
|
45637
|
-
|
|
45638
|
-
|
|
45639
|
-
|
|
45640
|
-
|
|
45641
|
-
|
|
45642
|
-
|
|
45643
|
-
|
|
45644
|
-
|
|
45645
|
-
|
|
45955
|
+
fe as getPostalLabelByCountry,
|
|
45956
|
+
ze as getTaxLabelByCountry,
|
|
45957
|
+
Ae as getTaxPlaceholderByCountry,
|
|
45958
|
+
xe as getTimezoneByName,
|
|
45959
|
+
re as getTimezonesByCountry,
|
|
45960
|
+
Pe as iso2ToFlag,
|
|
45961
|
+
Re as parseDateByCountry,
|
|
45962
|
+
ce as parseDateWithPattern,
|
|
45963
|
+
le as searchCountries,
|
|
45964
|
+
ge as searchCurrencies,
|
|
45965
|
+
Me as searchLanguages,
|
|
45966
|
+
Se as searchTimezones,
|
|
45646
45967
|
N as useBasePicker,
|
|
45647
45968
|
O as useCountry,
|
|
45648
|
-
|
|
45649
|
-
|
|
45650
|
-
|
|
45651
|
-
|
|
45652
|
-
|
|
45653
|
-
|
|
45654
|
-
|
|
45655
|
-
|
|
45656
|
-
|
|
45969
|
+
ke as useCountryPicker,
|
|
45970
|
+
Ge as useCurrencyPicker,
|
|
45971
|
+
Fe as useDateFormat,
|
|
45972
|
+
ve as useDivisionPicker,
|
|
45973
|
+
Ue as useLanguagePicker,
|
|
45974
|
+
Oe as useMultiSelect,
|
|
45975
|
+
je as usePhoneInput,
|
|
45976
|
+
we as useTimezonePicker,
|
|
45977
|
+
be as validatePhoneNumber
|
|
45657
45978
|
};
|
|
45658
|
-
|
|
45979
|
+
|
|
45980
|
+
//# sourceMappingURL=index.mjs.map
|