@gravity-rail/cli 0.8.0 → 0.10.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.
- package/README.md +13 -0
- package/dist/{account-verify-phone-TC73QIIE.js → account-verify-phone-XNXA7HNG.js} +4 -4
- package/dist/{chunk-H62EC2CF.js → chunk-GVUGFPCN.js} +25 -11
- package/dist/chunk-GVUGFPCN.js.map +1 -0
- package/dist/{chunk-7VZ4JLAJ.js → chunk-WZVMWN3S.js} +2 -1
- package/dist/{chunk-7VZ4JLAJ.js.map → chunk-WZVMWN3S.js.map} +1 -1
- package/dist/{chunk-L5YCPUAM.js → chunk-XJ2EBXJZ.js} +17 -16
- package/dist/chunk-XJ2EBXJZ.js.map +1 -0
- package/dist/{cli-client-context-9KRUt6O-.d.ts → cli-client-context-BbyBEGcg.d.ts} +1 -0
- package/dist/cli-utils.d.ts +7 -3
- package/dist/cli-utils.js +1 -1
- package/dist/{errors-VK4QO3QZ.js → errors-YHGVIDPO.js} +2 -2
- package/dist/gr.js +3647 -1146
- package/dist/gr.js.map +1 -1
- package/dist/lib.d.ts +14 -2
- package/dist/lib.js +2080 -284
- package/dist/lib.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-H62EC2CF.js.map +0 -1
- package/dist/chunk-L5YCPUAM.js.map +0 -1
- /package/dist/{account-verify-phone-TC73QIIE.js.map → account-verify-phone-XNXA7HNG.js.map} +0 -0
- /package/dist/{errors-VK4QO3QZ.js.map → errors-YHGVIDPO.js.map} +0 -0
package/dist/lib.js
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
createContext,
|
|
8
8
|
createPublicAuthenticatedContext,
|
|
9
9
|
createPublicContext,
|
|
10
|
+
createSandboxFetchFromEnv,
|
|
10
11
|
detectOutputFormat,
|
|
11
12
|
extractPaginationMeta,
|
|
12
13
|
fetchAllCursorPages,
|
|
@@ -29,7 +30,7 @@ import {
|
|
|
29
30
|
startAccountPhoneVerify,
|
|
30
31
|
stderr,
|
|
31
32
|
unwrapItems
|
|
32
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-XJ2EBXJZ.js";
|
|
33
34
|
import {
|
|
34
35
|
AGUIClient,
|
|
35
36
|
formatTimestamp,
|
|
@@ -37,12 +38,12 @@ import {
|
|
|
37
38
|
getTextDelta,
|
|
38
39
|
performOAuthFlow,
|
|
39
40
|
selectFromList
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-GVUGFPCN.js";
|
|
41
42
|
import {
|
|
42
43
|
AuthRequiredError,
|
|
43
44
|
CLIError,
|
|
44
45
|
handleError
|
|
45
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-WZVMWN3S.js";
|
|
46
47
|
|
|
47
48
|
// src/lib/args.ts
|
|
48
49
|
var PAGINATION_ARGS = [
|
|
@@ -84,7 +85,11 @@ function parseArgs(defs, argv) {
|
|
|
84
85
|
const def = findDef(allDefs, flagPart);
|
|
85
86
|
if (!def) {
|
|
86
87
|
if ((flagPart.startsWith("--") || flagPart.startsWith("-")) && !KNOWN_GLOBAL_FLAGS.has(flagPart)) {
|
|
87
|
-
|
|
88
|
+
const knownFlags = allDefs.map((d) => `--${d.name}`).join(", ");
|
|
89
|
+
const dataHint = allDefs.some((d) => d.name === "data") ? ` Entity fields are passed as JSON via --data (e.g. --data '{"name":"..."}'), not as individual flags.` : "";
|
|
90
|
+
throw new CLIError(
|
|
91
|
+
`Unknown flag "${flagPart}". Known flags: ${knownFlags || "(none)"}.${dataHint}`
|
|
92
|
+
);
|
|
88
93
|
}
|
|
89
94
|
continue;
|
|
90
95
|
}
|
|
@@ -323,7 +328,8 @@ function crudCommands(config) {
|
|
|
323
328
|
columns,
|
|
324
329
|
requiresWorkspace = true,
|
|
325
330
|
listArgs = [],
|
|
326
|
-
extra = []
|
|
331
|
+
extra = [],
|
|
332
|
+
resolveClient
|
|
327
333
|
} = config;
|
|
328
334
|
const paginationSupport = config.paginationSupport ?? false;
|
|
329
335
|
const cmds = [];
|
|
@@ -346,16 +352,33 @@ function crudCommands(config) {
|
|
|
346
352
|
const opts = buildListOptions(hctx, listArgs);
|
|
347
353
|
opts["page"] = page;
|
|
348
354
|
opts["pageSize"] = pageSize;
|
|
349
|
-
return callApiWithOptions(
|
|
355
|
+
return callApiWithOptions(
|
|
356
|
+
hctx,
|
|
357
|
+
config.listMethod,
|
|
358
|
+
requiresWorkspace,
|
|
359
|
+
opts,
|
|
360
|
+
resolveClient
|
|
361
|
+
);
|
|
350
362
|
});
|
|
351
363
|
} else {
|
|
352
|
-
const result2 = await callApi(
|
|
364
|
+
const result2 = await callApi(
|
|
365
|
+
hctx,
|
|
366
|
+
config.listMethod,
|
|
367
|
+
requiresWorkspace,
|
|
368
|
+
resolveClient
|
|
369
|
+
);
|
|
353
370
|
allItems = unwrapItems(result2);
|
|
354
371
|
}
|
|
355
372
|
outputData(allItems, hctx.ctx, columns);
|
|
356
373
|
} else if (paginationSupport === "full") {
|
|
357
374
|
const opts = buildListOptions(hctx, mergedArgs);
|
|
358
|
-
const result2 = domainHasListArgs || Object.keys(opts).length > 0 ? await callApiWithOptions(
|
|
375
|
+
const result2 = domainHasListArgs || Object.keys(opts).length > 0 ? await callApiWithOptions(
|
|
376
|
+
hctx,
|
|
377
|
+
config.listMethod,
|
|
378
|
+
requiresWorkspace,
|
|
379
|
+
opts,
|
|
380
|
+
resolveClient
|
|
381
|
+
) : await callApi(hctx, config.listMethod, requiresWorkspace, resolveClient);
|
|
359
382
|
outputData(
|
|
360
383
|
listResult(result2, true),
|
|
361
384
|
hctx.ctx,
|
|
@@ -368,15 +391,21 @@ function crudCommands(config) {
|
|
|
368
391
|
hctx,
|
|
369
392
|
config.listMethod,
|
|
370
393
|
requiresWorkspace,
|
|
371
|
-
opts
|
|
372
|
-
|
|
394
|
+
opts,
|
|
395
|
+
resolveClient
|
|
396
|
+
) : await callApi(hctx, config.listMethod, requiresWorkspace, resolveClient);
|
|
373
397
|
outputData(
|
|
374
398
|
listResult(result2, false),
|
|
375
399
|
hctx.ctx,
|
|
376
400
|
columns
|
|
377
401
|
);
|
|
378
402
|
} else {
|
|
379
|
-
const result2 = await callApi(
|
|
403
|
+
const result2 = await callApi(
|
|
404
|
+
hctx,
|
|
405
|
+
config.listMethod,
|
|
406
|
+
requiresWorkspace,
|
|
407
|
+
resolveClient
|
|
408
|
+
);
|
|
380
409
|
outputData(
|
|
381
410
|
listResult(result2, false),
|
|
382
411
|
hctx.ctx,
|
|
@@ -396,7 +425,13 @@ function crudCommands(config) {
|
|
|
396
425
|
columns,
|
|
397
426
|
handler: async (hctx) => {
|
|
398
427
|
const id = resolveId(hctx);
|
|
399
|
-
const result2 = await callApiWithId(
|
|
428
|
+
const result2 = await callApiWithId(
|
|
429
|
+
hctx,
|
|
430
|
+
config.getMethod,
|
|
431
|
+
id,
|
|
432
|
+
requiresWorkspace,
|
|
433
|
+
resolveClient
|
|
434
|
+
);
|
|
400
435
|
outputSingle(result2, hctx.ctx, columns);
|
|
401
436
|
}
|
|
402
437
|
});
|
|
@@ -410,7 +445,12 @@ function crudCommands(config) {
|
|
|
410
445
|
...config.createExamples ? { examples: config.createExamples } : {},
|
|
411
446
|
handler: async (hctx) => {
|
|
412
447
|
if (!hctx.data) throw new CLIError("JSON data required (--data, --file, or stdin)");
|
|
413
|
-
const result2 = await callApiWithData(
|
|
448
|
+
const result2 = await callApiWithData(
|
|
449
|
+
hctx,
|
|
450
|
+
config.createMethod,
|
|
451
|
+
requiresWorkspace,
|
|
452
|
+
resolveClient
|
|
453
|
+
);
|
|
414
454
|
outputSingle(result2, hctx.ctx, columns);
|
|
415
455
|
}
|
|
416
456
|
});
|
|
@@ -430,7 +470,8 @@ function crudCommands(config) {
|
|
|
430
470
|
hctx,
|
|
431
471
|
config.updateMethod,
|
|
432
472
|
id,
|
|
433
|
-
requiresWorkspace
|
|
473
|
+
requiresWorkspace,
|
|
474
|
+
resolveClient
|
|
434
475
|
);
|
|
435
476
|
outputSingle(result2, hctx.ctx, columns);
|
|
436
477
|
}
|
|
@@ -461,13 +502,20 @@ function crudCommands(config) {
|
|
|
461
502
|
const result2 = await callMethod(
|
|
462
503
|
hctx,
|
|
463
504
|
config.deleteMethod,
|
|
464
|
-
requiresWorkspace ? [hctx.workspace, id, cascade] : [id, cascade]
|
|
505
|
+
requiresWorkspace ? [hctx.workspace, id, cascade] : [id, cascade],
|
|
506
|
+
resolveClient
|
|
465
507
|
);
|
|
466
508
|
const suffix = result2 && typeof result2 === "object" && "deletedTaskCount" in result2 && result2.deletedTaskCount ? ` and ${result2.deletedTaskCount} child entities` : "";
|
|
467
509
|
process.stdout.write(`Deleted ${entityName} ${id}${suffix}
|
|
468
510
|
`);
|
|
469
511
|
} else {
|
|
470
|
-
await callApiWithId(
|
|
512
|
+
await callApiWithId(
|
|
513
|
+
hctx,
|
|
514
|
+
config.deleteMethod,
|
|
515
|
+
id,
|
|
516
|
+
requiresWorkspace,
|
|
517
|
+
resolveClient
|
|
518
|
+
);
|
|
471
519
|
process.stdout.write(`Deleted ${entityName} ${id}
|
|
472
520
|
`);
|
|
473
521
|
}
|
|
@@ -483,7 +531,13 @@ function crudCommands(config) {
|
|
|
483
531
|
requiresWorkspace,
|
|
484
532
|
handler: async (hctx) => {
|
|
485
533
|
const id = resolveId(hctx);
|
|
486
|
-
const result2 = await callApiWithId(
|
|
534
|
+
const result2 = await callApiWithId(
|
|
535
|
+
hctx,
|
|
536
|
+
config.archiveMethod,
|
|
537
|
+
id,
|
|
538
|
+
requiresWorkspace,
|
|
539
|
+
resolveClient
|
|
540
|
+
);
|
|
487
541
|
outputSingle(result2, hctx.ctx, columns);
|
|
488
542
|
}
|
|
489
543
|
});
|
|
@@ -501,7 +555,8 @@ function crudCommands(config) {
|
|
|
501
555
|
hctx,
|
|
502
556
|
config.unarchiveMethod,
|
|
503
557
|
id,
|
|
504
|
-
requiresWorkspace
|
|
558
|
+
requiresWorkspace,
|
|
559
|
+
resolveClient
|
|
505
560
|
);
|
|
506
561
|
outputSingle(result2, hctx.ctx, columns);
|
|
507
562
|
}
|
|
@@ -514,28 +569,34 @@ function resolveId(hctx) {
|
|
|
514
569
|
if (!id) throw new CLIError("--id is required");
|
|
515
570
|
return id;
|
|
516
571
|
}
|
|
517
|
-
function callMethod(hctx, method, args) {
|
|
518
|
-
const client = requireAuth(hctx.ctx).apiClient;
|
|
572
|
+
function callMethod(hctx, method, args, resolveClient) {
|
|
573
|
+
const client = resolveClient ? resolveClient(hctx.ctx) : requireAuth(hctx.ctx).apiClient;
|
|
519
574
|
const fn = client[method];
|
|
520
575
|
if (typeof fn !== "function") {
|
|
521
576
|
throw new CLIError(`API method not found: ${method}`);
|
|
522
577
|
}
|
|
523
578
|
return fn.apply(client, args);
|
|
524
579
|
}
|
|
525
|
-
async function callApi(hctx, method, requiresWorkspace) {
|
|
526
|
-
return callMethod(hctx, method, requiresWorkspace ? [hctx.workspace] : []);
|
|
580
|
+
async function callApi(hctx, method, requiresWorkspace, resolveClient) {
|
|
581
|
+
return callMethod(hctx, method, requiresWorkspace ? [hctx.workspace] : [], resolveClient);
|
|
527
582
|
}
|
|
528
|
-
async function callApiWithId(hctx, method, id, requiresWorkspace) {
|
|
529
|
-
return callMethod(hctx, method, requiresWorkspace ? [hctx.workspace, id] : [id]);
|
|
583
|
+
async function callApiWithId(hctx, method, id, requiresWorkspace, resolveClient) {
|
|
584
|
+
return callMethod(hctx, method, requiresWorkspace ? [hctx.workspace, id] : [id], resolveClient);
|
|
530
585
|
}
|
|
531
|
-
async function callApiWithData(hctx, method, requiresWorkspace) {
|
|
532
|
-
return callMethod(
|
|
586
|
+
async function callApiWithData(hctx, method, requiresWorkspace, resolveClient) {
|
|
587
|
+
return callMethod(
|
|
588
|
+
hctx,
|
|
589
|
+
method,
|
|
590
|
+
requiresWorkspace ? [hctx.workspace, hctx.data] : [hctx.data],
|
|
591
|
+
resolveClient
|
|
592
|
+
);
|
|
533
593
|
}
|
|
534
|
-
async function callApiWithIdAndData(hctx, method, id, requiresWorkspace) {
|
|
594
|
+
async function callApiWithIdAndData(hctx, method, id, requiresWorkspace, resolveClient) {
|
|
535
595
|
return callMethod(
|
|
536
596
|
hctx,
|
|
537
597
|
method,
|
|
538
|
-
requiresWorkspace ? [hctx.workspace, id, hctx.data] : [id, hctx.data]
|
|
598
|
+
requiresWorkspace ? [hctx.workspace, id, hctx.data] : [id, hctx.data],
|
|
599
|
+
resolveClient
|
|
539
600
|
);
|
|
540
601
|
}
|
|
541
602
|
function buildListOptions(hctx, listArgs) {
|
|
@@ -559,8 +620,13 @@ function buildListOptions(hctx, listArgs) {
|
|
|
559
620
|
}
|
|
560
621
|
return opts;
|
|
561
622
|
}
|
|
562
|
-
async function callApiWithOptions(hctx, method, requiresWorkspace, opts) {
|
|
563
|
-
return callMethod(
|
|
623
|
+
async function callApiWithOptions(hctx, method, requiresWorkspace, opts, resolveClient) {
|
|
624
|
+
return callMethod(
|
|
625
|
+
hctx,
|
|
626
|
+
method,
|
|
627
|
+
requiresWorkspace ? [hctx.workspace, opts] : [opts],
|
|
628
|
+
resolveClient
|
|
629
|
+
);
|
|
564
630
|
}
|
|
565
631
|
function simpleCrudCommands(config) {
|
|
566
632
|
const {
|
|
@@ -928,6 +994,14 @@ var CommandRegistry = class {
|
|
|
928
994
|
" --version Show version"
|
|
929
995
|
];
|
|
930
996
|
lines.push(...globalOptions);
|
|
997
|
+
if (!inSandbox) {
|
|
998
|
+
lines.push(
|
|
999
|
+
"",
|
|
1000
|
+
"Documentation:",
|
|
1001
|
+
" Run `gr <command> --help` for command-specific reference and examples.",
|
|
1002
|
+
" Full docs: https://docs.gravityrail.com"
|
|
1003
|
+
);
|
|
1004
|
+
}
|
|
931
1005
|
return lines.join("\n") + "\n";
|
|
932
1006
|
}
|
|
933
1007
|
};
|
|
@@ -951,15 +1025,32 @@ function requireNumber(args, key) {
|
|
|
951
1025
|
if (isNaN(num)) throw new Error(`Argument --${key} must be a number`);
|
|
952
1026
|
return num;
|
|
953
1027
|
}
|
|
1028
|
+
function requireIdOrUuidFrom(args, ...keys) {
|
|
1029
|
+
for (const key of keys) {
|
|
1030
|
+
const val = args[key];
|
|
1031
|
+
if (typeof val === "string" && val.length > 0) {
|
|
1032
|
+
const num = Number(val);
|
|
1033
|
+
return isNaN(num) ? val : num;
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
throw new Error(`Missing required argument: ${keys.map((k) => `--${k}`).join(" or ")}`);
|
|
1037
|
+
}
|
|
954
1038
|
function requireNumberFrom(args, ...keys) {
|
|
1039
|
+
let nonNumeric;
|
|
955
1040
|
for (const key of keys) {
|
|
956
1041
|
const val = args[key];
|
|
957
1042
|
if (typeof val === "string") {
|
|
958
1043
|
const num = Number(val);
|
|
959
1044
|
if (!isNaN(num)) return num;
|
|
1045
|
+
nonNumeric = `--${key} ${val}`;
|
|
960
1046
|
}
|
|
961
1047
|
}
|
|
962
1048
|
const hint2 = keys.map((k) => `--${k}`).join(" or ");
|
|
1049
|
+
if (nonNumeric) {
|
|
1050
|
+
throw new Error(
|
|
1051
|
+
`${hint2} expects the numeric id, not '${nonNumeric.split(" ")[1]}'. Use the integer "id" column from the matching list command (uuids are not accepted here).`
|
|
1052
|
+
);
|
|
1053
|
+
}
|
|
963
1054
|
throw new Error(`Missing required argument: ${hint2}`);
|
|
964
1055
|
}
|
|
965
1056
|
|
|
@@ -1340,6 +1431,38 @@ var MESSAGE_COLUMNS2 = [
|
|
|
1340
1431
|
},
|
|
1341
1432
|
COL.created()
|
|
1342
1433
|
];
|
|
1434
|
+
async function respondToInterrupt(ctx, workspace, args, decisionType) {
|
|
1435
|
+
const chatId = requireIdOrUuidFrom(args, "chat-id", "id");
|
|
1436
|
+
const chat = await requireAuth(ctx).apiClient.getChat(workspace, chatId);
|
|
1437
|
+
const interrupt = chat?.interrupt;
|
|
1438
|
+
if (!interrupt || !interrupt.interruptId) {
|
|
1439
|
+
throw new Error("No pending approval request on this chat.");
|
|
1440
|
+
}
|
|
1441
|
+
const count = Math.max(1, (interrupt.actionRequests ?? []).length);
|
|
1442
|
+
const decisions = Array.from(
|
|
1443
|
+
{ length: count },
|
|
1444
|
+
() => decisionType === "approve" ? { type: "approve" } : { type: "reject", message: args.message ?? "Rejected by user via CLI" }
|
|
1445
|
+
);
|
|
1446
|
+
const aguiClient = new AGUIClient({
|
|
1447
|
+
baseUrl: ctx.envConfig.apiUrl,
|
|
1448
|
+
workspaceUuid: workspace,
|
|
1449
|
+
chatId: chat.id,
|
|
1450
|
+
accessToken: requireAuth(ctx).accessToken
|
|
1451
|
+
});
|
|
1452
|
+
let buffered = "";
|
|
1453
|
+
let streamError = "";
|
|
1454
|
+
await aguiClient.streamRequest(
|
|
1455
|
+
{ messages: [], resume: { decisions, interruptId: interrupt.interruptId } },
|
|
1456
|
+
(event) => {
|
|
1457
|
+
const delta = getTextDelta(event);
|
|
1458
|
+
if (delta) buffered += delta;
|
|
1459
|
+
const errorMsg = getErrorMessage(event);
|
|
1460
|
+
if (errorMsg) streamError = errorMsg;
|
|
1461
|
+
}
|
|
1462
|
+
);
|
|
1463
|
+
if (streamError) throw new Error(`Inference error: ${streamError}`);
|
|
1464
|
+
outputSingle({ role: "assistant", content: buffered }, ctx, MESSAGE_COLUMNS2);
|
|
1465
|
+
}
|
|
1343
1466
|
var chatsDomain = {
|
|
1344
1467
|
name: "chats",
|
|
1345
1468
|
description: "Manage chats",
|
|
@@ -1368,7 +1491,7 @@ var chatsDomain = {
|
|
|
1368
1491
|
{ name: "member-id", description: "Filter by member ID" },
|
|
1369
1492
|
{
|
|
1370
1493
|
name: "chat-type",
|
|
1371
|
-
description: "Filter by chat type (assignment, manager,
|
|
1494
|
+
description: "Filter by chat type (assignment, manager, dm, contributor). Default: assignment"
|
|
1372
1495
|
}
|
|
1373
1496
|
]
|
|
1374
1497
|
}),
|
|
@@ -1378,7 +1501,12 @@ var chatsDomain = {
|
|
|
1378
1501
|
description: "List messages for a chat. Use --limit/--offset to page; the API caps a single request at 100. Tool-call shell rows that the API filter excludes (parent_message_id IS NOT NULL or parent_call_id IS NOT NULL) are still hidden \u2014 use `gr chats inspect --id <chat>` for the full debug view.",
|
|
1379
1502
|
requiresWorkspace: true,
|
|
1380
1503
|
args: [
|
|
1381
|
-
{
|
|
1504
|
+
{
|
|
1505
|
+
name: "chat-id",
|
|
1506
|
+
aliases: ["id"],
|
|
1507
|
+
description: "Chat ID (numeric id preferred; uuid accepted)",
|
|
1508
|
+
required: true
|
|
1509
|
+
},
|
|
1382
1510
|
{
|
|
1383
1511
|
name: "limit",
|
|
1384
1512
|
description: "Max messages to return (1-100, default 100)"
|
|
@@ -1401,20 +1529,100 @@ var chatsDomain = {
|
|
|
1401
1529
|
}
|
|
1402
1530
|
const result2 = await requireAuth(ctx).apiClient.getChatMessages(
|
|
1403
1531
|
workspace,
|
|
1404
|
-
|
|
1532
|
+
requireIdOrUuidFrom(args, "chat-id", "id"),
|
|
1405
1533
|
limit,
|
|
1406
1534
|
offset
|
|
1407
1535
|
);
|
|
1408
1536
|
outputData(result2, ctx, MESSAGE_COLUMNS2);
|
|
1409
1537
|
}
|
|
1410
1538
|
},
|
|
1539
|
+
// Interrupts (HITL approvals) — the Manager pauses on approval-gated
|
|
1540
|
+
// tools (e.g. workspace file writes). Without these commands a pending
|
|
1541
|
+
// approval renders as an empty reply on the CLI (found by adversarial-QA).
|
|
1542
|
+
{
|
|
1543
|
+
path: ["chats", "interrupt", "get"],
|
|
1544
|
+
description: "Show a chat's pending approval request (HITL interrupt), if any.",
|
|
1545
|
+
requiresWorkspace: true,
|
|
1546
|
+
args: [
|
|
1547
|
+
{
|
|
1548
|
+
name: "chat-id",
|
|
1549
|
+
aliases: ["id"],
|
|
1550
|
+
description: "Chat ID (numeric id preferred; uuid accepted)",
|
|
1551
|
+
required: true
|
|
1552
|
+
}
|
|
1553
|
+
],
|
|
1554
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
1555
|
+
const chatId = requireIdOrUuidFrom(args, "chat-id", "id");
|
|
1556
|
+
const chat = await requireAuth(ctx).apiClient.getChat(workspace, chatId);
|
|
1557
|
+
const interrupt = chat?.interrupt;
|
|
1558
|
+
if (!interrupt || !interrupt.interruptId) {
|
|
1559
|
+
outputSingle({ pending: false }, ctx, []);
|
|
1560
|
+
return;
|
|
1561
|
+
}
|
|
1562
|
+
outputSingle(
|
|
1563
|
+
{
|
|
1564
|
+
pending: true,
|
|
1565
|
+
interruptId: interrupt.interruptId,
|
|
1566
|
+
type: interrupt.type ?? null,
|
|
1567
|
+
prompt: interrupt.userPrompt ?? interrupt.description ?? null,
|
|
1568
|
+
actionRequests: (interrupt.actionRequests ?? []).map((a) => ({
|
|
1569
|
+
name: a?.name,
|
|
1570
|
+
args: JSON.stringify(a?.args ?? {}).slice(0, 400)
|
|
1571
|
+
})),
|
|
1572
|
+
howTo: 'Approve with: gr chats interrupt approve --chat-id <id> --allow-write \u2014 or deny with: gr chats interrupt deny --chat-id <id> --message "<reason>"'
|
|
1573
|
+
},
|
|
1574
|
+
ctx,
|
|
1575
|
+
[]
|
|
1576
|
+
);
|
|
1577
|
+
}
|
|
1578
|
+
},
|
|
1579
|
+
{
|
|
1580
|
+
path: ["chats", "interrupt", "approve"],
|
|
1581
|
+
description: "Approve a chat's pending approval request and stream the continued reply.",
|
|
1582
|
+
mutates: true,
|
|
1583
|
+
requiresWorkspace: true,
|
|
1584
|
+
args: [
|
|
1585
|
+
{
|
|
1586
|
+
name: "chat-id",
|
|
1587
|
+
aliases: ["id"],
|
|
1588
|
+
description: "Chat ID (numeric id preferred; uuid accepted)",
|
|
1589
|
+
required: true
|
|
1590
|
+
}
|
|
1591
|
+
],
|
|
1592
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
1593
|
+
await respondToInterrupt(ctx, workspace, args, "approve");
|
|
1594
|
+
}
|
|
1595
|
+
},
|
|
1596
|
+
{
|
|
1597
|
+
path: ["chats", "interrupt", "deny"],
|
|
1598
|
+
description: "Reject a chat's pending approval request with a reason.",
|
|
1599
|
+
mutates: true,
|
|
1600
|
+
requiresWorkspace: true,
|
|
1601
|
+
args: [
|
|
1602
|
+
{
|
|
1603
|
+
name: "chat-id",
|
|
1604
|
+
aliases: ["id"],
|
|
1605
|
+
description: "Chat ID (numeric id preferred; uuid accepted)",
|
|
1606
|
+
required: true
|
|
1607
|
+
},
|
|
1608
|
+
{ name: "message", description: "Reason shown to the assistant", required: false }
|
|
1609
|
+
],
|
|
1610
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
1611
|
+
await respondToInterrupt(ctx, workspace, args, "reject");
|
|
1612
|
+
}
|
|
1613
|
+
},
|
|
1411
1614
|
{
|
|
1412
1615
|
path: ["chats", "messages", "send"],
|
|
1413
1616
|
description: "Send a user message to a chat (triggers AI inference). Use --stream to stream the response.",
|
|
1414
1617
|
mutates: true,
|
|
1415
1618
|
requiresWorkspace: true,
|
|
1416
1619
|
args: [
|
|
1417
|
-
{
|
|
1620
|
+
{
|
|
1621
|
+
name: "chat-id",
|
|
1622
|
+
aliases: ["id"],
|
|
1623
|
+
description: "Chat ID (numeric id preferred; uuid accepted)",
|
|
1624
|
+
required: true
|
|
1625
|
+
},
|
|
1418
1626
|
{ name: "stream", description: "Stream the AI response via AG-UI", isFlag: true }
|
|
1419
1627
|
],
|
|
1420
1628
|
handler: async ({ ctx, workspace, args, data }) => {
|
|
@@ -1423,7 +1631,7 @@ var chatsDomain = {
|
|
|
1423
1631
|
throw new Error(
|
|
1424
1632
|
`Message content is required (pass --data '"your message"' or --data '{"content":"your message"}')`
|
|
1425
1633
|
);
|
|
1426
|
-
const chatId =
|
|
1634
|
+
const chatId = requireIdOrUuidFrom(args, "chat-id", "id");
|
|
1427
1635
|
if (args.stream) {
|
|
1428
1636
|
const aguiClient = new AGUIClient({
|
|
1429
1637
|
baseUrl: ctx.envConfig.apiUrl,
|
|
@@ -1432,22 +1640,67 @@ var chatsDomain = {
|
|
|
1432
1640
|
accessToken: requireAuth(ctx).accessToken
|
|
1433
1641
|
});
|
|
1434
1642
|
process.stdout.write("\x1B[32mAssistant:\x1B[0m ");
|
|
1435
|
-
await aguiClient.sendMessage(
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1643
|
+
await aguiClient.sendMessage(
|
|
1644
|
+
[{ role: "user", content }],
|
|
1645
|
+
(event) => {
|
|
1646
|
+
const delta = getTextDelta(event);
|
|
1647
|
+
if (delta) process.stdout.write(delta);
|
|
1648
|
+
const errorMsg = getErrorMessage(event);
|
|
1649
|
+
if (errorMsg) process.stderr.write(`
|
|
1440
1650
|
\x1B[31mError: ${errorMsg}\x1B[0m
|
|
1441
1651
|
`);
|
|
1442
|
-
|
|
1652
|
+
},
|
|
1653
|
+
args["auto-approve"] ? { autoApprove: true } : void 0
|
|
1654
|
+
);
|
|
1443
1655
|
process.stdout.write("\n");
|
|
1444
1656
|
} else {
|
|
1445
|
-
const
|
|
1446
|
-
|
|
1657
|
+
const aguiClient = new AGUIClient({
|
|
1658
|
+
baseUrl: ctx.envConfig.apiUrl,
|
|
1659
|
+
workspaceUuid: workspace,
|
|
1447
1660
|
chatId,
|
|
1448
|
-
|
|
1661
|
+
accessToken: requireAuth(ctx).accessToken
|
|
1662
|
+
});
|
|
1663
|
+
let buffered = "";
|
|
1664
|
+
let streamError = "";
|
|
1665
|
+
await aguiClient.sendMessage(
|
|
1666
|
+
[{ role: "user", content }],
|
|
1667
|
+
(event) => {
|
|
1668
|
+
const delta = getTextDelta(event);
|
|
1669
|
+
if (delta) buffered += delta;
|
|
1670
|
+
const errorMsg = getErrorMessage(event);
|
|
1671
|
+
if (errorMsg) streamError = errorMsg;
|
|
1672
|
+
},
|
|
1673
|
+
args["auto-approve"] ? { autoApprove: true } : void 0
|
|
1674
|
+
);
|
|
1675
|
+
if (streamError) {
|
|
1676
|
+
throw new Error(`Inference error: ${streamError}`);
|
|
1677
|
+
}
|
|
1678
|
+
if (!buffered.trim()) {
|
|
1679
|
+
const chat = await requireAuth(ctx).apiClient.getChat(
|
|
1680
|
+
workspace,
|
|
1681
|
+
chatId
|
|
1682
|
+
);
|
|
1683
|
+
const interrupt = chat?.interrupt;
|
|
1684
|
+
if (interrupt?.interruptId) {
|
|
1685
|
+
outputSingle(
|
|
1686
|
+
{
|
|
1687
|
+
role: "assistant",
|
|
1688
|
+
content: "[approval required] The assistant is waiting for your approval before continuing. Inspect with: gr chats interrupt get --chat-id " + String(chat.id) + " \u2014 approve with: gr chats interrupt approve --chat-id " + String(chat.id) + " --allow-write"
|
|
1689
|
+
},
|
|
1690
|
+
ctx,
|
|
1691
|
+
MESSAGE_COLUMNS2
|
|
1692
|
+
);
|
|
1693
|
+
return;
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
outputSingle(
|
|
1697
|
+
{
|
|
1698
|
+
role: "assistant",
|
|
1699
|
+
content: buffered
|
|
1700
|
+
},
|
|
1701
|
+
ctx,
|
|
1702
|
+
MESSAGE_COLUMNS2
|
|
1449
1703
|
);
|
|
1450
|
-
outputSingle(result2, ctx, MESSAGE_COLUMNS2);
|
|
1451
1704
|
}
|
|
1452
1705
|
}
|
|
1453
1706
|
},
|
|
@@ -1456,12 +1709,24 @@ var chatsDomain = {
|
|
|
1456
1709
|
description: "Send an assistant message to a chat (does not trigger AI inference)",
|
|
1457
1710
|
mutates: true,
|
|
1458
1711
|
requiresWorkspace: true,
|
|
1459
|
-
args: [
|
|
1712
|
+
args: [
|
|
1713
|
+
{
|
|
1714
|
+
name: "chat-id",
|
|
1715
|
+
aliases: ["id"],
|
|
1716
|
+
description: "Chat ID (numeric id preferred; uuid accepted)",
|
|
1717
|
+
required: true
|
|
1718
|
+
}
|
|
1719
|
+
],
|
|
1460
1720
|
handler: async ({ ctx, workspace, args, data }) => {
|
|
1721
|
+
const message = typeof data === "string" ? data : data?.content ?? data?.message;
|
|
1722
|
+
if (!message || typeof message !== "string")
|
|
1723
|
+
throw new Error(
|
|
1724
|
+
`Message content is required (pass --data '"your message"' or --data '{"content":"your message"}')`
|
|
1725
|
+
);
|
|
1461
1726
|
const result2 = await requireAuth(ctx).apiClient.sendAssistantMessage(
|
|
1462
1727
|
workspace,
|
|
1463
|
-
|
|
1464
|
-
|
|
1728
|
+
requireIdOrUuidFrom(args, "chat-id", "id"),
|
|
1729
|
+
message
|
|
1465
1730
|
);
|
|
1466
1731
|
outputSingle(result2, ctx, MESSAGE_COLUMNS2);
|
|
1467
1732
|
}
|
|
@@ -1672,7 +1937,9 @@ var membersDomain = {
|
|
|
1672
1937
|
columns: COLUMNS3,
|
|
1673
1938
|
updateExamples: [
|
|
1674
1939
|
`yarn gr members update -w $UUID --id 2 --data '{"phone":"+15551234567"}' --allow-write`,
|
|
1675
|
-
"yarn gr members update --realm acme-demo/acme-admin --id 2 --file /tmp/member.json --allow-write"
|
|
1940
|
+
"yarn gr members update --realm acme-demo/acme-admin --id 2 --file /tmp/member.json --allow-write",
|
|
1941
|
+
"# Trust a member's phone so they can use SMS as themselves (no account):",
|
|
1942
|
+
`yarn gr members update -w $UUID --id 2 --data '{"phoneTrusted":true}' --allow-write`
|
|
1676
1943
|
]
|
|
1677
1944
|
}),
|
|
1678
1945
|
// Current member
|
|
@@ -1685,6 +1952,40 @@ var membersDomain = {
|
|
|
1685
1952
|
outputSingle(result2, ctx, COLUMNS3);
|
|
1686
1953
|
}
|
|
1687
1954
|
},
|
|
1955
|
+
// Send a member an SMS to confirm their phone (member-attested trust).
|
|
1956
|
+
// On reply, a trusted phone auth binding is created so they can use SMS
|
|
1957
|
+
// as themselves without an account. Lower-privilege alternative to
|
|
1958
|
+
// setting phoneTrusted directly via `members update`.
|
|
1959
|
+
{
|
|
1960
|
+
path: ["members", "confirm-phone"],
|
|
1961
|
+
description: "Text a member to confirm their phone (trust on reply)",
|
|
1962
|
+
mutates: true,
|
|
1963
|
+
requiresWorkspace: true,
|
|
1964
|
+
args: [{ name: "id", description: "Member ID", required: true }],
|
|
1965
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
1966
|
+
const memberId = requireNumber(args, "id");
|
|
1967
|
+
const result2 = await requireAuth(ctx).apiClient.sendMemberPhoneConfirmation(
|
|
1968
|
+
workspace,
|
|
1969
|
+
memberId
|
|
1970
|
+
);
|
|
1971
|
+
outputSingle(result2, ctx);
|
|
1972
|
+
}
|
|
1973
|
+
},
|
|
1974
|
+
// Bulk create
|
|
1975
|
+
{
|
|
1976
|
+
path: ["members", "bulk"],
|
|
1977
|
+
description: "Bulk-create members from JSON data",
|
|
1978
|
+
mutates: true,
|
|
1979
|
+
requiresWorkspace: true,
|
|
1980
|
+
handler: async ({ ctx, workspace, data }) => {
|
|
1981
|
+
if (!data) throw new CLIError("JSON data required (--data, --file, or stdin)");
|
|
1982
|
+
const result2 = await requireAuth(ctx).apiClient.bulkCreateMembers(
|
|
1983
|
+
workspace,
|
|
1984
|
+
data
|
|
1985
|
+
);
|
|
1986
|
+
outputSingle(result2, ctx);
|
|
1987
|
+
}
|
|
1988
|
+
},
|
|
1688
1989
|
// Import/Export
|
|
1689
1990
|
{
|
|
1690
1991
|
path: ["members", "import"],
|
|
@@ -1892,7 +2193,29 @@ var tasksDomain = {
|
|
|
1892
2193
|
description: "Include archived tasks in the listing",
|
|
1893
2194
|
isFlag: true
|
|
1894
2195
|
}
|
|
1895
|
-
]
|
|
2196
|
+
],
|
|
2197
|
+
updateHelp: `Update a task.
|
|
2198
|
+
|
|
2199
|
+
To attach abilities, include an "abilities" array in the JSON body.
|
|
2200
|
+
Each entry requires:
|
|
2201
|
+
\u2022 uuid \u2014 client-generated UUID (e.g. crypto.randomUUID())
|
|
2202
|
+
\u2022 abilityType \u2014 ability type slug (NOT "slug" \u2014 use "abilityType")
|
|
2203
|
+
\u2022 config \u2014 type-specific config object (see: gr abilities get --name <slug>)
|
|
2204
|
+
|
|
2205
|
+
WARNING: the abilities array is a FULL REPLACE \u2014 abilities not in the list
|
|
2206
|
+
are deleted. Use "gr abilities attach/detach" for incremental changes.
|
|
2207
|
+
|
|
2208
|
+
Example \u2014 attach an escalation ability:
|
|
2209
|
+
gr tasks update --id 9 --allow-write -w $WID --data '{
|
|
2210
|
+
"abilities": [
|
|
2211
|
+
{
|
|
2212
|
+
"uuid": "550e8400-e29b-41d4-a716-446655440001",
|
|
2213
|
+
"abilityType": "oversight:escalation",
|
|
2214
|
+
"config": {"pauseOnEscalate": true},
|
|
2215
|
+
"enabled": true
|
|
2216
|
+
}
|
|
2217
|
+
]
|
|
2218
|
+
}'`
|
|
1896
2219
|
}),
|
|
1897
2220
|
{
|
|
1898
2221
|
path: ["tasks", "clone"],
|
|
@@ -3090,7 +3413,7 @@ Provisioning started. Watch it come up with:
|
|
|
3090
3413
|
requiresWorkspace: true,
|
|
3091
3414
|
handler: async ({ ctx, workspace }) => {
|
|
3092
3415
|
const result2 = await requireAuth(ctx).apiClient.getChats(workspace, {
|
|
3093
|
-
chatType: "
|
|
3416
|
+
chatType: "dm",
|
|
3094
3417
|
mine: true,
|
|
3095
3418
|
sortBy: "updatedAt",
|
|
3096
3419
|
sortOrder: "desc"
|
|
@@ -3275,8 +3598,13 @@ var SCHEDULE_COLUMNS = [
|
|
|
3275
3598
|
var EVENT_COLUMNS = [
|
|
3276
3599
|
COL.id(),
|
|
3277
3600
|
{ header: "TITLE", getValue: (item) => item.title ?? item.name ?? "" },
|
|
3278
|
-
|
|
3279
|
-
|
|
3601
|
+
// API returns camelCase startTime/endTime; the old snake_case keys never
|
|
3602
|
+
// matched, leaving these columns blank. (#15773)
|
|
3603
|
+
{
|
|
3604
|
+
header: "START",
|
|
3605
|
+
getValue: (item) => item.startTime ?? item.start ?? ""
|
|
3606
|
+
},
|
|
3607
|
+
{ header: "END", getValue: (item) => item.endTime ?? item.end ?? "" },
|
|
3280
3608
|
COL.status()
|
|
3281
3609
|
];
|
|
3282
3610
|
var EVENT_TYPE_COLUMNS = [
|
|
@@ -3370,14 +3698,23 @@ var calendarsDomain = {
|
|
|
3370
3698
|
// Events sub-resource
|
|
3371
3699
|
{
|
|
3372
3700
|
path: ["calendars", "events", "list"],
|
|
3373
|
-
description: "List calendar events (
|
|
3701
|
+
description: "List calendar events (filter by --calendar-id, --member-id, --start-date, --end-date, --status)",
|
|
3374
3702
|
requiresWorkspace: true,
|
|
3375
|
-
args: [
|
|
3703
|
+
args: [
|
|
3704
|
+
{ name: "calendar-id", description: "Calendar ID (optional filter)" },
|
|
3705
|
+
{ name: "member-id", description: "Member ID (optional filter)" },
|
|
3706
|
+
{ name: "start-date", description: "Start of date range, ISO 8601 (optional filter)" },
|
|
3707
|
+
{ name: "end-date", description: "End of date range, ISO 8601 (optional filter)" },
|
|
3708
|
+
{ name: "status", description: "Event status (optional filter)" }
|
|
3709
|
+
],
|
|
3376
3710
|
handler: async ({ ctx, workspace, args }) => {
|
|
3377
|
-
const
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3711
|
+
const options = {};
|
|
3712
|
+
if (args["calendar-id"]) options.calendarId = requireNumber(args, "calendar-id");
|
|
3713
|
+
if (args["member-id"]) options.memberId = requireNumber(args, "member-id");
|
|
3714
|
+
if (args["start-date"]) options.startDate = String(args["start-date"]);
|
|
3715
|
+
if (args["end-date"]) options.endDate = String(args["end-date"]);
|
|
3716
|
+
if (args.status) options.status = String(args.status);
|
|
3717
|
+
const result2 = await requireAuth(ctx).apiClient.getCalendarEvents(workspace, options);
|
|
3381
3718
|
outputData(result2, ctx, EVENT_COLUMNS);
|
|
3382
3719
|
}
|
|
3383
3720
|
},
|
|
@@ -3533,6 +3870,33 @@ var RECORD_COLUMNS = [
|
|
|
3533
3870
|
{ header: "MEMBER", getValue: (item) => String(item.member_id ?? "") },
|
|
3534
3871
|
COL.updated()
|
|
3535
3872
|
];
|
|
3873
|
+
var DATA_TYPE_FIELD_REFERENCE = `
|
|
3874
|
+
Field reference for --data JSON (create/update):
|
|
3875
|
+
|
|
3876
|
+
Top level
|
|
3877
|
+
name (string) Display name of the data type
|
|
3878
|
+
fields (array) Ordered list of schema field objects (see below)
|
|
3879
|
+
|
|
3880
|
+
Each entry in "fields" (a schema field)
|
|
3881
|
+
slug (string) Field key (snake_case); how records reference the value
|
|
3882
|
+
name (string) Display name
|
|
3883
|
+
fieldType (string) THE field type key \u2014 NOT "type". Passing "type" is
|
|
3884
|
+
silently ignored and the field becomes plain text.
|
|
3885
|
+
required (bool) Whether the field must be supplied
|
|
3886
|
+
description (string) Optional help text
|
|
3887
|
+
options (array) For fieldType "enum": [{"label":"\u2026","value":"\u2026"}, \u2026]
|
|
3888
|
+
referencedTypeId (number) For reference fields: target data type id
|
|
3889
|
+
|
|
3890
|
+
Valid fieldType values
|
|
3891
|
+
text, longtext, email, phone, number, integer, boolean, date, datetime,
|
|
3892
|
+
time_of_day, us_zip_code, enum, array, object, function
|
|
3893
|
+
|
|
3894
|
+
Example
|
|
3895
|
+
gr data-types create -w $WID --allow-write --data '{"name":"Patient","fields":[
|
|
3896
|
+
{"slug":"first_name","name":"First name","fieldType":"text","required":true},
|
|
3897
|
+
{"slug":"status","name":"Status","fieldType":"enum","required":false,
|
|
3898
|
+
"options":[{"label":"Active","value":"active"},{"label":"Inactive","value":"inactive"}]}]}'
|
|
3899
|
+
`;
|
|
3536
3900
|
var dataTypesDomain = {
|
|
3537
3901
|
name: "data-types",
|
|
3538
3902
|
description: "Manage data types and records",
|
|
@@ -3547,7 +3911,13 @@ var dataTypesDomain = {
|
|
|
3547
3911
|
deleteMethod: "deleteDataType",
|
|
3548
3912
|
archiveMethod: "archiveDataType",
|
|
3549
3913
|
unarchiveMethod: "unarchiveDataType",
|
|
3550
|
-
columns: COLUMNS10
|
|
3914
|
+
columns: COLUMNS10,
|
|
3915
|
+
createHelp: `Create a data type
|
|
3916
|
+
|
|
3917
|
+
${DATA_TYPE_FIELD_REFERENCE}`,
|
|
3918
|
+
updateHelp: `Update a data type
|
|
3919
|
+
|
|
3920
|
+
${DATA_TYPE_FIELD_REFERENCE}`
|
|
3551
3921
|
}),
|
|
3552
3922
|
{
|
|
3553
3923
|
path: ["data-types", "clone"],
|
|
@@ -3717,6 +4087,11 @@ sms:send actionParams (send an SMS, or start an SMS workflow chat)
|
|
|
3717
4087
|
|
|
3718
4088
|
member:label actionParams
|
|
3719
4089
|
{"addLabelIds":["<uuid>"],"removeLabelIds":["<uuid>"]}
|
|
4090
|
+
|
|
4091
|
+
member:notify actionParams
|
|
4092
|
+
{"messageTemplate":"Hi {{member.name}} \u2026","memberId":<member-id>} (or "sendToOwner":true)
|
|
4093
|
+
messageTemplate is required (supports {{member}} template vars). Target exactly one
|
|
4094
|
+
of memberId or sendToOwner.
|
|
3720
4095
|
`;
|
|
3721
4096
|
|
|
3722
4097
|
// src/domains/events.ts
|
|
@@ -4119,6 +4494,15 @@ var experimentsDomain = {
|
|
|
4119
4494
|
};
|
|
4120
4495
|
|
|
4121
4496
|
// src/domains/files.ts
|
|
4497
|
+
import { writeFileSync } from "fs";
|
|
4498
|
+
function parseIdList(value) {
|
|
4499
|
+
if (typeof value !== "string" || value.trim() === "") return [];
|
|
4500
|
+
return value.split(",").map((part) => part.trim()).filter((part) => part.length > 0).map((part) => {
|
|
4501
|
+
const num = Number(part);
|
|
4502
|
+
if (isNaN(num)) throw new Error(`Invalid id in list: "${part}"`);
|
|
4503
|
+
return num;
|
|
4504
|
+
});
|
|
4505
|
+
}
|
|
4122
4506
|
var COLUMNS11 = [
|
|
4123
4507
|
COL.id(),
|
|
4124
4508
|
COL.name(),
|
|
@@ -4139,6 +4523,27 @@ var LABEL_COLUMNS3 = [
|
|
|
4139
4523
|
COL.name(),
|
|
4140
4524
|
{ header: "COLOR", getValue: (item) => item.color ?? "" }
|
|
4141
4525
|
];
|
|
4526
|
+
var FILE_FIELD_REFERENCE = `
|
|
4527
|
+
Field reference for --data JSON (create):
|
|
4528
|
+
|
|
4529
|
+
Required
|
|
4530
|
+
filename (string) File name, e.g. "notes.txt"
|
|
4531
|
+
mimeType (string) MIME type, e.g. "text/plain", "application/pdf"
|
|
4532
|
+
|
|
4533
|
+
File contents \u2014 provide exactly one (there is NO "content" field)
|
|
4534
|
+
data (string) UTF-8 text contents (for text files)
|
|
4535
|
+
dataBase64 (string) Base64-encoded bytes (for binary files)
|
|
4536
|
+
|
|
4537
|
+
Common optional
|
|
4538
|
+
title (string) Display title (defaults to filename)
|
|
4539
|
+
description (string)
|
|
4540
|
+
folderId (number) Destination folder
|
|
4541
|
+
labelIds (number[]) Labels to attach
|
|
4542
|
+
|
|
4543
|
+
Example
|
|
4544
|
+
gr files create -w $WID --allow-write --data '{"filename":"notes.txt",
|
|
4545
|
+
"mimeType":"text/plain","data":"Hello, world"}'
|
|
4546
|
+
`;
|
|
4142
4547
|
var filesDomain = {
|
|
4143
4548
|
name: "files",
|
|
4144
4549
|
description: "Manage files, folders, and labels",
|
|
@@ -4152,7 +4557,10 @@ var filesDomain = {
|
|
|
4152
4557
|
updateMethod: "updateFile",
|
|
4153
4558
|
deleteMethod: "deleteFile",
|
|
4154
4559
|
columns: COLUMNS11,
|
|
4155
|
-
paginationSupport: "full"
|
|
4560
|
+
paginationSupport: "full",
|
|
4561
|
+
createHelp: `Create a file
|
|
4562
|
+
|
|
4563
|
+
${FILE_FIELD_REFERENCE}`
|
|
4156
4564
|
}),
|
|
4157
4565
|
// Folders sub-resource
|
|
4158
4566
|
...crudCommands({
|
|
@@ -4194,7 +4602,47 @@ var filesDomain = {
|
|
|
4194
4602
|
updateMethod: "updateFileLabel",
|
|
4195
4603
|
deleteMethod: "deleteFileLabel",
|
|
4196
4604
|
columns: LABEL_COLUMNS3
|
|
4197
|
-
})
|
|
4605
|
+
}),
|
|
4606
|
+
{
|
|
4607
|
+
path: ["files", "download"],
|
|
4608
|
+
description: "Download files and/or folders (folders recursively) as a single ZIP to a local file",
|
|
4609
|
+
requiresWorkspace: true,
|
|
4610
|
+
args: [
|
|
4611
|
+
{
|
|
4612
|
+
name: "file-ids",
|
|
4613
|
+
description: "Comma-separated file IDs to include (e.g. 3,5,8)"
|
|
4614
|
+
},
|
|
4615
|
+
{
|
|
4616
|
+
name: "folder-ids",
|
|
4617
|
+
description: "Comma-separated folder IDs to include recursively"
|
|
4618
|
+
},
|
|
4619
|
+
{
|
|
4620
|
+
name: "output",
|
|
4621
|
+
description: "Output file path (default: files.zip)"
|
|
4622
|
+
}
|
|
4623
|
+
],
|
|
4624
|
+
examples: [
|
|
4625
|
+
"gr files download -w $WID --folder-ids 12 --output folder.zip",
|
|
4626
|
+
"gr files download -w $WID --file-ids 3,5,8 --output selection.zip"
|
|
4627
|
+
],
|
|
4628
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
4629
|
+
const fileIds = parseIdList(args["file-ids"]);
|
|
4630
|
+
const folderIds = parseIdList(args["folder-ids"]);
|
|
4631
|
+
if (fileIds.length === 0 && folderIds.length === 0) {
|
|
4632
|
+
throw new Error("Provide at least one of --file-ids or --folder-ids");
|
|
4633
|
+
}
|
|
4634
|
+
const blob = await requireAuth(ctx).apiClient.downloadFilesZip(
|
|
4635
|
+
workspace,
|
|
4636
|
+
fileIds,
|
|
4637
|
+
folderIds
|
|
4638
|
+
);
|
|
4639
|
+
const bytes = Buffer.from(await blob.arrayBuffer());
|
|
4640
|
+
const outPath = typeof args.output === "string" ? args.output : "files.zip";
|
|
4641
|
+
writeFileSync(outPath, bytes);
|
|
4642
|
+
process.stdout.write(`Saved ${bytes.length} bytes to ${outPath}
|
|
4643
|
+
`);
|
|
4644
|
+
}
|
|
4645
|
+
}
|
|
4198
4646
|
]
|
|
4199
4647
|
};
|
|
4200
4648
|
|
|
@@ -4542,7 +4990,15 @@ var journeysDomain = {
|
|
|
4542
4990
|
"Required edge (AND-gate \u2014 child waits for this parent):",
|
|
4543
4991
|
` --data '{"parentStepUuid":"<src>","childStepUuid":"<dst>","required":true}'`,
|
|
4544
4992
|
"",
|
|
4545
|
-
"
|
|
4993
|
+
"Weekly cadence (advance 7 days after parent completes):",
|
|
4994
|
+
` --data '{"parentStepUuid":"<src>","childStepUuid":"<dst>",`,
|
|
4995
|
+
` "celCondition":"days_since(parent_step.completed_at) >= 7"}'`,
|
|
4996
|
+
"",
|
|
4997
|
+
"NOTE: timeoutSeconds is a fallback for blocked steps \u2014 if celCondition stays",
|
|
4998
|
+
"false for longer than timeoutSeconds, the child step is marked timed_out.",
|
|
4999
|
+
"timeoutSeconds alone (without celCondition) has no effect.",
|
|
5000
|
+
"",
|
|
5001
|
+
"Edge with CEL condition + timeout fallback (300s = 5 min):",
|
|
4546
5002
|
` --data '{"parentStepUuid":"<src>","childStepUuid":"<dst>",`,
|
|
4547
5003
|
` "celCondition":"member.labels.contains(\\"approved\\")","timeoutSeconds":300}'`
|
|
4548
5004
|
],
|
|
@@ -4690,7 +5146,7 @@ var journeysDomain = {
|
|
|
4690
5146
|
`gr journeys enroll -w $WID --id <id> --data '{"memberIds":[1,2,3]}'`,
|
|
4691
5147
|
`gr journeys enroll -w $WID --id <id> --data '{"memberId":42}'`,
|
|
4692
5148
|
"",
|
|
4693
|
-
"Fields: memberId (single) or memberIds (batch, max
|
|
5149
|
+
"Fields: memberId (single) or memberIds (batch, max 1000)"
|
|
4694
5150
|
],
|
|
4695
5151
|
handler: async ({ ctx, workspace, args, data }) => {
|
|
4696
5152
|
if (!data) throw new CLIError("JSON data required (--data, --file, or stdin)");
|
|
@@ -5092,48 +5548,357 @@ var personasDomain = {
|
|
|
5092
5548
|
};
|
|
5093
5549
|
|
|
5094
5550
|
// src/domains/qualifications.ts
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
{
|
|
5111
|
-
|
|
5112
|
-
getValue: (item) => item.scenarioName ?? (item.scenarioId != null ? String(item.scenarioId) : "ad-hoc")
|
|
5113
|
-
},
|
|
5114
|
-
{
|
|
5115
|
-
header: "DRIVER",
|
|
5116
|
-
getValue: (item) => item.driverMemberId == null ? "auto" : item.driverMemberName ?? `member #${item.driverMemberId}`
|
|
5117
|
-
},
|
|
5118
|
-
{ header: "STARTED", getValue: (item) => item.startedAt ?? "" },
|
|
5119
|
-
{ header: "COMPLETED", getValue: (item) => item.completedAt ?? "" },
|
|
5120
|
-
{
|
|
5121
|
-
header: "SCORE",
|
|
5122
|
-
getValue: (item) => item.overallScore != null ? String(item.overallScore) : ""
|
|
5123
|
-
},
|
|
5124
|
-
{
|
|
5125
|
-
header: "PASSED",
|
|
5126
|
-
getValue: (item) => item.passed != null ? String(item.passed) : ""
|
|
5551
|
+
import { mkdirSync } from "fs";
|
|
5552
|
+
import { dirname } from "path";
|
|
5553
|
+
import { DriverMode as DriverMode2 } from "@gravity-rail/sdk";
|
|
5554
|
+
|
|
5555
|
+
// src/lib/qualifications_model_eval_batch.ts
|
|
5556
|
+
import { randomInt } from "crypto";
|
|
5557
|
+
import { appendFileSync, existsSync, statSync } from "fs";
|
|
5558
|
+
import { basename } from "path";
|
|
5559
|
+
import { DriverMode } from "@gravity-rail/sdk";
|
|
5560
|
+
var CONFIGURATION_BLOCKER_FAILURE_PREFIX = "Configuration blocker (fix workspace setup, not a model defect):";
|
|
5561
|
+
function isConfigurationBlockerFailure(failureReason) {
|
|
5562
|
+
return typeof failureReason === "string" && failureReason.startsWith(CONFIGURATION_BLOCKER_FAILURE_PREFIX);
|
|
5563
|
+
}
|
|
5564
|
+
function parseCommaSeparatedList(raw, flagName) {
|
|
5565
|
+
const items = raw.split(",").map((s) => s.trim()).filter(Boolean);
|
|
5566
|
+
if (items.length === 0) {
|
|
5567
|
+
throw new CLIError(`${flagName} must list at least one value`);
|
|
5127
5568
|
}
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5569
|
+
return items;
|
|
5570
|
+
}
|
|
5571
|
+
function validateModelEvalOutPath(outPath) {
|
|
5572
|
+
if (outPath.endsWith("/") || outPath.endsWith("\\")) {
|
|
5573
|
+
throw new CLIError("--out must be a file path (include a filename), not a directory");
|
|
5574
|
+
}
|
|
5575
|
+
const fileName = basename(outPath);
|
|
5576
|
+
if (!fileName || fileName === "." || fileName === "/") {
|
|
5577
|
+
throw new CLIError("--out must be a file path (include a filename), not a directory");
|
|
5578
|
+
}
|
|
5579
|
+
if (existsSync(outPath) && statSync(outPath).isDirectory()) {
|
|
5580
|
+
throw new CLIError("--out must be a file path, not an existing directory");
|
|
5581
|
+
}
|
|
5582
|
+
}
|
|
5583
|
+
function formatProgressError(error, maxLen = 80) {
|
|
5584
|
+
const oneLine = error.replace(/\s+/g, " ").trim();
|
|
5585
|
+
if (oneLine.length <= maxLen) return oneLine;
|
|
5586
|
+
return `${oneLine.slice(0, maxLen - 1)}\u2026`;
|
|
5587
|
+
}
|
|
5588
|
+
function parsePositiveInt(raw, flagName, fallback) {
|
|
5589
|
+
const value = raw === void 0 || raw === null || raw === "" ? fallback : Number(raw);
|
|
5590
|
+
if (!Number.isFinite(value) || value < 0 || !Number.isInteger(value)) {
|
|
5591
|
+
throw new CLIError(`${flagName} must be a non-negative integer`);
|
|
5592
|
+
}
|
|
5593
|
+
return value;
|
|
5594
|
+
}
|
|
5595
|
+
function shuffleInPlace(items) {
|
|
5596
|
+
for (let i = items.length - 1; i > 0; i--) {
|
|
5597
|
+
const j = randomInt(i + 1);
|
|
5598
|
+
const tmp = items[i];
|
|
5599
|
+
items[i] = items[j];
|
|
5600
|
+
items[j] = tmp;
|
|
5601
|
+
}
|
|
5602
|
+
return items;
|
|
5603
|
+
}
|
|
5604
|
+
function buildModelEvalBatchJobs(scenarios, models, rounds, warmup) {
|
|
5605
|
+
if (scenarios.length === 0) {
|
|
5606
|
+
throw new CLIError("At least one scenario is required");
|
|
5607
|
+
}
|
|
5608
|
+
if (models.length === 0) {
|
|
5609
|
+
throw new CLIError("At least one model is required");
|
|
5610
|
+
}
|
|
5611
|
+
if (rounds < 1) {
|
|
5612
|
+
throw new CLIError("--rounds must be >= 1");
|
|
5613
|
+
}
|
|
5614
|
+
const jobs = [];
|
|
5615
|
+
for (let round = 0; round < rounds; round++) {
|
|
5616
|
+
const warm = round < warmup;
|
|
5617
|
+
const roundJobs = [];
|
|
5618
|
+
for (const scenario of scenarios) {
|
|
5619
|
+
for (const modelId of models) {
|
|
5620
|
+
roundJobs.push({
|
|
5621
|
+
round,
|
|
5622
|
+
warmup: warm,
|
|
5623
|
+
scenarioId: scenario.id,
|
|
5624
|
+
scenarioSlug: scenario.slug,
|
|
5625
|
+
scenarioName: scenario.name,
|
|
5626
|
+
modelId
|
|
5627
|
+
});
|
|
5628
|
+
}
|
|
5629
|
+
}
|
|
5630
|
+
shuffleInPlace(roundJobs);
|
|
5631
|
+
jobs.push(...roundJobs);
|
|
5632
|
+
}
|
|
5633
|
+
return jobs;
|
|
5634
|
+
}
|
|
5635
|
+
function summarizeCriterionResults(run) {
|
|
5636
|
+
if (!run.criterionResults?.length) return void 0;
|
|
5637
|
+
return run.criterionResults.map((c) => ({
|
|
5638
|
+
name: c.criterionName ?? `criterion-${c.criterionId}`,
|
|
5639
|
+
passed: c.passed ?? null,
|
|
5640
|
+
score: c.score ?? null
|
|
5641
|
+
}));
|
|
5642
|
+
}
|
|
5643
|
+
function runToBatchRow(job, workflowId, run, error) {
|
|
5644
|
+
return {
|
|
5645
|
+
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5646
|
+
round: job.round,
|
|
5647
|
+
warmup: job.warmup,
|
|
5648
|
+
workflow_id: workflowId,
|
|
5649
|
+
scenario_id: job.scenarioId,
|
|
5650
|
+
scenario_slug: job.scenarioSlug,
|
|
5651
|
+
scenario_name: job.scenarioName,
|
|
5652
|
+
model_id: job.modelId,
|
|
5653
|
+
run_id: run?.id,
|
|
5654
|
+
error,
|
|
5655
|
+
failure_reason: run?.failureReason ?? null,
|
|
5656
|
+
passed: run?.passed ?? null,
|
|
5657
|
+
overall_score: run?.overallScore ?? null,
|
|
5658
|
+
timing_summary: run?.timingSummary ?? null,
|
|
5659
|
+
criterion_results: run ? summarizeCriterionResults(run) : void 0,
|
|
5660
|
+
completed_at: run?.completedAt ?? null,
|
|
5661
|
+
evaluated_at: run?.evaluatedAt ?? null
|
|
5662
|
+
};
|
|
5663
|
+
}
|
|
5664
|
+
function parseConcurrency(raw, flagName, fallback) {
|
|
5665
|
+
const value = parsePositiveInt(raw, flagName, fallback);
|
|
5666
|
+
if (value < 1) {
|
|
5667
|
+
throw new CLIError(`${flagName} must be >= 1`);
|
|
5668
|
+
}
|
|
5669
|
+
return value;
|
|
5670
|
+
}
|
|
5671
|
+
async function waitForRunTerminal(api, workspace, runId, timeoutMs, pollMs, sleep2) {
|
|
5672
|
+
const deadline = Date.now() + timeoutMs;
|
|
5673
|
+
while (Date.now() < deadline) {
|
|
5674
|
+
const run = await api.getTestChatRun(workspace, runId);
|
|
5675
|
+
if (run.completedAt || run.failedAt) {
|
|
5676
|
+
return run;
|
|
5677
|
+
}
|
|
5678
|
+
await sleep2(pollMs);
|
|
5679
|
+
}
|
|
5680
|
+
throw new CLIError(`Timed out waiting for run ${runId} to complete`);
|
|
5681
|
+
}
|
|
5682
|
+
async function waitForEvaluation(api, workspace, runId, timeoutMs, pollMs, sleep2) {
|
|
5683
|
+
const deadline = Date.now() + timeoutMs;
|
|
5684
|
+
while (Date.now() < deadline) {
|
|
5685
|
+
const run = await api.getTestChatRun(workspace, runId);
|
|
5686
|
+
if (run.evaluatedAt) {
|
|
5687
|
+
return run;
|
|
5688
|
+
}
|
|
5689
|
+
if (run.failedAt) {
|
|
5690
|
+
return run;
|
|
5691
|
+
}
|
|
5692
|
+
await sleep2(pollMs);
|
|
5693
|
+
}
|
|
5694
|
+
throw new CLIError(`Timed out waiting for evaluation on run ${runId}`);
|
|
5695
|
+
}
|
|
5696
|
+
function formatBatchProgressLine(job, row) {
|
|
5697
|
+
const ttftP50 = row.timing_summary && typeof row.timing_summary === "object" && row.timing_summary.ttft_ms && typeof row.timing_summary.ttft_ms === "object" && "p50" in row.timing_summary.ttft_ms ? String(row.timing_summary.ttft_ms.p50) : "-";
|
|
5698
|
+
const cfg = isConfigurationBlockerFailure(row.failure_reason) ? " CONFIG_BLOCKER" : "";
|
|
5699
|
+
const skipped = row.batch_skipped ? " SKIPPED" : "";
|
|
5700
|
+
return `r${job.round} ${job.modelId} scenario=${job.scenarioId} run=${row.run_id ?? "ERR"} passed=${row.passed ?? "-"} score=${row.overall_score != null ? row.overall_score.toFixed(2) : "-"} ttft_p50=${ttftP50}ms${row.error ? ` [${formatProgressError(row.error)}]` : ""}${cfg}${skipped}${job.warmup ? " WARM" : ""}`;
|
|
5701
|
+
}
|
|
5702
|
+
async function executeModelEvalJob(api, options, job, waitTimeoutMs, pollMs, sleep2) {
|
|
5703
|
+
try {
|
|
5704
|
+
const started = await api.startTestChatRun(options.workspace, options.workflowId, {
|
|
5705
|
+
scenarioId: job.scenarioId,
|
|
5706
|
+
driver: DriverMode.AUTO,
|
|
5707
|
+
assistantChatModelId: job.modelId
|
|
5708
|
+
});
|
|
5709
|
+
let run = await waitForRunTerminal(
|
|
5710
|
+
api,
|
|
5711
|
+
options.workspace,
|
|
5712
|
+
started.run.id,
|
|
5713
|
+
waitTimeoutMs,
|
|
5714
|
+
pollMs,
|
|
5715
|
+
sleep2
|
|
5716
|
+
);
|
|
5717
|
+
if (options.evaluate && run.completedAt && !run.failedAt) {
|
|
5718
|
+
await api.evaluateTestChatRun(options.workspace, run.id);
|
|
5719
|
+
run = await waitForEvaluation(
|
|
5720
|
+
api,
|
|
5721
|
+
options.workspace,
|
|
5722
|
+
run.id,
|
|
5723
|
+
waitTimeoutMs,
|
|
5724
|
+
pollMs,
|
|
5725
|
+
sleep2
|
|
5726
|
+
);
|
|
5727
|
+
}
|
|
5728
|
+
return runToBatchRow(job, options.workflowId, run);
|
|
5729
|
+
} catch (e) {
|
|
5730
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
5731
|
+
return runToBatchRow(job, options.workflowId, null, message);
|
|
5732
|
+
}
|
|
5733
|
+
}
|
|
5734
|
+
function createSpacingGate(spacingSec, sleep2) {
|
|
5735
|
+
if (spacingSec <= 0) {
|
|
5736
|
+
return async () => {
|
|
5737
|
+
};
|
|
5738
|
+
}
|
|
5739
|
+
let chain = Promise.resolve();
|
|
5740
|
+
return () => {
|
|
5741
|
+
const wait = chain.then(() => sleep2(spacingSec * 1e3));
|
|
5742
|
+
chain = wait.catch(() => {
|
|
5743
|
+
});
|
|
5744
|
+
return wait;
|
|
5745
|
+
};
|
|
5746
|
+
}
|
|
5747
|
+
async function executeModelEvalBatch(api, options) {
|
|
5748
|
+
const sleep2 = options.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
|
|
5749
|
+
const concurrency = options.concurrency ?? 1;
|
|
5750
|
+
const jobs = buildModelEvalBatchJobs(
|
|
5751
|
+
options.scenarios,
|
|
5752
|
+
options.models,
|
|
5753
|
+
options.rounds,
|
|
5754
|
+
options.warmup
|
|
5755
|
+
);
|
|
5756
|
+
const waitTimeoutMs = options.waitTimeoutSec * 1e3;
|
|
5757
|
+
const pollMs = options.pollIntervalSec * 1e3;
|
|
5758
|
+
const rows = [];
|
|
5759
|
+
let stopBatch = false;
|
|
5760
|
+
const awaitSpacing = createSpacingGate(options.spacingSec, sleep2);
|
|
5761
|
+
const recordRow = (job, row) => {
|
|
5762
|
+
rows.push(row);
|
|
5763
|
+
if (options.outPath) {
|
|
5764
|
+
appendFileSync(options.outPath, `${JSON.stringify(row)}
|
|
5765
|
+
`);
|
|
5766
|
+
}
|
|
5767
|
+
const progress = formatBatchProgressLine(job, row);
|
|
5768
|
+
if (options.onProgress) {
|
|
5769
|
+
options.onProgress(progress);
|
|
5770
|
+
} else {
|
|
5771
|
+
process.stdout.write(`${progress}
|
|
5772
|
+
`);
|
|
5773
|
+
}
|
|
5774
|
+
};
|
|
5775
|
+
const runOne = async (job) => {
|
|
5776
|
+
await awaitSpacing();
|
|
5777
|
+
if (stopBatch) {
|
|
5778
|
+
return {
|
|
5779
|
+
...runToBatchRow(job, options.workflowId, null, "batch aborted before start"),
|
|
5780
|
+
batch_skipped: true
|
|
5781
|
+
};
|
|
5782
|
+
}
|
|
5783
|
+
const row = await executeModelEvalJob(api, options, job, waitTimeoutMs, pollMs, sleep2);
|
|
5784
|
+
if (isConfigurationBlockerFailure(row.failure_reason)) {
|
|
5785
|
+
stopBatch = true;
|
|
5786
|
+
}
|
|
5787
|
+
return row;
|
|
5788
|
+
};
|
|
5789
|
+
if (concurrency <= 1) {
|
|
5790
|
+
for (const job of jobs) {
|
|
5791
|
+
if (stopBatch) {
|
|
5792
|
+
break;
|
|
5793
|
+
}
|
|
5794
|
+
const row = await runOne(job);
|
|
5795
|
+
recordRow(job, row);
|
|
5796
|
+
if (stopBatch) {
|
|
5797
|
+
break;
|
|
5798
|
+
}
|
|
5799
|
+
}
|
|
5800
|
+
} else {
|
|
5801
|
+
const results = new Array(jobs.length);
|
|
5802
|
+
let nextIndex = 0;
|
|
5803
|
+
const worker = async () => {
|
|
5804
|
+
while (true) {
|
|
5805
|
+
if (stopBatch) {
|
|
5806
|
+
return;
|
|
5807
|
+
}
|
|
5808
|
+
const index = nextIndex;
|
|
5809
|
+
nextIndex += 1;
|
|
5810
|
+
if (index >= jobs.length) {
|
|
5811
|
+
return;
|
|
5812
|
+
}
|
|
5813
|
+
const job = jobs[index];
|
|
5814
|
+
const row = await runOne(job);
|
|
5815
|
+
results[index] = row;
|
|
5816
|
+
recordRow(job, row);
|
|
5817
|
+
}
|
|
5818
|
+
};
|
|
5819
|
+
const workers = Array.from({ length: Math.min(concurrency, jobs.length) }, () => worker());
|
|
5820
|
+
await Promise.all(workers);
|
|
5821
|
+
if (stopBatch) {
|
|
5822
|
+
for (let index = 0; index < jobs.length; index++) {
|
|
5823
|
+
if (results[index] !== void 0) {
|
|
5824
|
+
continue;
|
|
5825
|
+
}
|
|
5826
|
+
const job = jobs[index];
|
|
5827
|
+
const skipped = {
|
|
5828
|
+
...runToBatchRow(job, options.workflowId, null, "batch aborted before start"),
|
|
5829
|
+
batch_skipped: true
|
|
5830
|
+
};
|
|
5831
|
+
results[index] = skipped;
|
|
5832
|
+
recordRow(job, skipped);
|
|
5833
|
+
}
|
|
5834
|
+
}
|
|
5835
|
+
}
|
|
5836
|
+
const blockerRow = rows.find((r) => isConfigurationBlockerFailure(r.failure_reason));
|
|
5837
|
+
if (blockerRow) {
|
|
5838
|
+
throw new CLIError(
|
|
5839
|
+
`Batch aborted: workspace misconfiguration (configuration blocker). Fix workflow/role setup \u2014 remaining jobs were not started. Last failure: ${formatProgressError(blockerRow.failure_reason ?? "", 200)}`
|
|
5840
|
+
);
|
|
5841
|
+
}
|
|
5842
|
+
return rows;
|
|
5843
|
+
}
|
|
5844
|
+
async function resolveBatchScenarios(api, workspace, workflowId, scenarioIds) {
|
|
5845
|
+
const qualification = await api.getOrCreateQualificationForWorkflow(workspace, workflowId);
|
|
5846
|
+
const listed = await api.listScenarios(workspace, qualification.id);
|
|
5847
|
+
if (scenarioIds === null) {
|
|
5848
|
+
return listed;
|
|
5849
|
+
}
|
|
5850
|
+
const idSet = new Set(scenarioIds);
|
|
5851
|
+
const selected = listed.filter((s) => idSet.has(s.id));
|
|
5852
|
+
const missing = scenarioIds.filter((id) => !selected.some((s) => s.id === id));
|
|
5853
|
+
if (missing.length > 0) {
|
|
5854
|
+
throw new CLIError(`Unknown scenario id(s): ${missing.join(", ")}`);
|
|
5855
|
+
}
|
|
5856
|
+
return selected;
|
|
5857
|
+
}
|
|
5858
|
+
|
|
5859
|
+
// src/domains/qualifications.ts
|
|
5860
|
+
var QUALIFICATION_COLUMNS = [
|
|
5861
|
+
COL.id(),
|
|
5862
|
+
{ header: "WORKFLOW", getValue: (item) => String(item.workflowId ?? "") },
|
|
5863
|
+
{ header: "WORKFLOW_NAME", getValue: (item) => item.workflowName ?? "" },
|
|
5864
|
+
COL.created()
|
|
5865
|
+
];
|
|
5866
|
+
var SCENARIO_COLUMNS = [
|
|
5867
|
+
COL.id(),
|
|
5868
|
+
COL.name(),
|
|
5869
|
+
{ header: "PERSONA", getValue: (item) => item.personaName ?? "" },
|
|
5870
|
+
{ header: "CHANNEL", getValue: (item) => item.channel ?? "" }
|
|
5871
|
+
];
|
|
5872
|
+
var RUN_COLUMNS = [
|
|
5873
|
+
COL.id(),
|
|
5874
|
+
{ header: "WORKFLOW", getValue: (item) => String(item.workflowId ?? "") },
|
|
5875
|
+
{
|
|
5876
|
+
header: "SCENARIO",
|
|
5877
|
+
getValue: (item) => item.scenarioName ?? (item.scenarioId != null ? String(item.scenarioId) : "ad-hoc")
|
|
5878
|
+
},
|
|
5879
|
+
{
|
|
5880
|
+
header: "DRIVER",
|
|
5881
|
+
getValue: (item) => item.driverMemberId == null ? "auto" : item.driverMemberName ?? `member #${item.driverMemberId}`
|
|
5882
|
+
},
|
|
5883
|
+
{ header: "STARTED", getValue: (item) => item.startedAt ?? "" },
|
|
5884
|
+
{ header: "COMPLETED", getValue: (item) => item.completedAt ?? "" },
|
|
5885
|
+
{
|
|
5886
|
+
header: "SCORE",
|
|
5887
|
+
getValue: (item) => item.overallScore != null ? String(item.overallScore) : ""
|
|
5888
|
+
},
|
|
5889
|
+
{
|
|
5890
|
+
header: "PASSED",
|
|
5891
|
+
getValue: (item) => item.passed != null ? String(item.passed) : ""
|
|
5892
|
+
}
|
|
5893
|
+
];
|
|
5894
|
+
var qualificationsDomain = {
|
|
5895
|
+
name: "qualifications",
|
|
5896
|
+
description: "Manage qualifications, scenarios, and test chat runs",
|
|
5897
|
+
commands: [
|
|
5898
|
+
{
|
|
5899
|
+
path: ["qualifications", "list"],
|
|
5900
|
+
description: "List qualifications (one per workflow)",
|
|
5901
|
+
requiresWorkspace: true,
|
|
5137
5902
|
handler: async ({ ctx, workspace }) => {
|
|
5138
5903
|
const result2 = await requireAuth(ctx).apiClient.getQualifications(workspace);
|
|
5139
5904
|
outputData(result2.items, ctx, QUALIFICATION_COLUMNS);
|
|
@@ -5241,14 +6006,23 @@ var qualificationsDomain = {
|
|
|
5241
6006
|
requiresWorkspace: true,
|
|
5242
6007
|
args: [
|
|
5243
6008
|
{ name: "workflow-id", description: "Workflow ID", required: true },
|
|
5244
|
-
{ name: "scenario-id", description: "Filter by scenario", required: false }
|
|
6009
|
+
{ name: "scenario-id", description: "Filter by scenario", required: false },
|
|
6010
|
+
{
|
|
6011
|
+
name: "assistant-chat-model-id",
|
|
6012
|
+
description: "Filter by assistant chat model used at run start",
|
|
6013
|
+
required: false
|
|
6014
|
+
}
|
|
5245
6015
|
],
|
|
5246
6016
|
handler: async ({ ctx, workspace, args }) => {
|
|
5247
6017
|
const scenarioId = args["scenario-id"] ? requireNumber(args, "scenario-id") : void 0;
|
|
6018
|
+
const assistantChatModelId = args["assistant-chat-model-id"] ? String(args["assistant-chat-model-id"]) : void 0;
|
|
5248
6019
|
const result2 = await requireAuth(ctx).apiClient.listTestChatRuns(
|
|
5249
6020
|
workspace,
|
|
5250
6021
|
requireNumber(args, "workflow-id"),
|
|
5251
|
-
|
|
6022
|
+
{
|
|
6023
|
+
...scenarioId != null ? { scenarioId } : {},
|
|
6024
|
+
...assistantChatModelId ? { assistantChatModelId } : {}
|
|
6025
|
+
}
|
|
5252
6026
|
);
|
|
5253
6027
|
outputData(result2, ctx, RUN_COLUMNS);
|
|
5254
6028
|
}
|
|
@@ -5280,12 +6054,43 @@ var qualificationsDomain = {
|
|
|
5280
6054
|
required: false
|
|
5281
6055
|
},
|
|
5282
6056
|
{ name: "goal", description: "Goal for the user simulator", required: false },
|
|
5283
|
-
{ name: "driver", description: "Driver mode: auto | human", required: false }
|
|
6057
|
+
{ name: "driver", description: "Driver mode: auto | human", required: false },
|
|
6058
|
+
{
|
|
6059
|
+
name: "assistant-chat-model-id",
|
|
6060
|
+
description: "Override assistant chat model for this run",
|
|
6061
|
+
required: false
|
|
6062
|
+
},
|
|
6063
|
+
{
|
|
6064
|
+
name: "assistant-realtime-model-id",
|
|
6065
|
+
description: "Override assistant realtime model for this run",
|
|
6066
|
+
required: false
|
|
6067
|
+
},
|
|
6068
|
+
{
|
|
6069
|
+
name: "assistant-chat-model-config",
|
|
6070
|
+
description: "JSON object override for assistant chat model config",
|
|
6071
|
+
required: false
|
|
6072
|
+
},
|
|
6073
|
+
{
|
|
6074
|
+
name: "assistant-realtime-model-config",
|
|
6075
|
+
description: "JSON object override for assistant realtime model config",
|
|
6076
|
+
required: false
|
|
6077
|
+
}
|
|
5284
6078
|
],
|
|
5285
6079
|
handler: async ({ ctx, workspace, args }) => {
|
|
5286
|
-
const driver = args["driver"] === "human" ?
|
|
6080
|
+
const driver = args["driver"] === "human" ? DriverMode2.HUMAN : DriverMode2.AUTO;
|
|
5287
6081
|
const scenarioId = args["scenario-id"] ? requireNumber(args, "scenario-id") : void 0;
|
|
5288
6082
|
const personaId = args["persona-id"] ? requireNumber(args, "persona-id") : void 0;
|
|
6083
|
+
const parseConfig = (key) => {
|
|
6084
|
+
const raw = args[key];
|
|
6085
|
+
if (!raw) return void 0;
|
|
6086
|
+
try {
|
|
6087
|
+
return JSON.parse(String(raw));
|
|
6088
|
+
} catch {
|
|
6089
|
+
throw new CLIError(`--${key} must be a valid JSON object`);
|
|
6090
|
+
}
|
|
6091
|
+
};
|
|
6092
|
+
const assistantChatModelConfig = parseConfig("assistant-chat-model-config");
|
|
6093
|
+
const assistantRealtimeModelConfig = parseConfig("assistant-realtime-model-config");
|
|
5289
6094
|
const result2 = await requireAuth(ctx).apiClient.startTestChatRun(
|
|
5290
6095
|
workspace,
|
|
5291
6096
|
requireNumber(args, "workflow-id"),
|
|
@@ -5293,6 +6098,12 @@ var qualificationsDomain = {
|
|
|
5293
6098
|
...scenarioId != null ? { scenarioId } : {},
|
|
5294
6099
|
...personaId != null ? { personaId } : {},
|
|
5295
6100
|
...args["goal"] ? { goal: String(args["goal"]) } : {},
|
|
6101
|
+
...args["assistant-chat-model-id"] ? { assistantChatModelId: String(args["assistant-chat-model-id"]) } : {},
|
|
6102
|
+
...args["assistant-realtime-model-id"] ? {
|
|
6103
|
+
assistantRealtimeModelId: String(args["assistant-realtime-model-id"])
|
|
6104
|
+
} : {},
|
|
6105
|
+
...assistantChatModelConfig ? { assistantChatModelConfig } : {},
|
|
6106
|
+
...assistantRealtimeModelConfig ? { assistantRealtimeModelConfig } : {},
|
|
5296
6107
|
driver
|
|
5297
6108
|
}
|
|
5298
6109
|
);
|
|
@@ -5313,11 +6124,413 @@ var qualificationsDomain = {
|
|
|
5313
6124
|
process.stdout.write(`Evaluation started for test chat run ${args["id"]}
|
|
5314
6125
|
`);
|
|
5315
6126
|
}
|
|
6127
|
+
},
|
|
6128
|
+
{
|
|
6129
|
+
path: ["qualifications", "runs", "batch"],
|
|
6130
|
+
description: "Interleaved multi-model qualification runs on real workflow paths; appends JSONL",
|
|
6131
|
+
mutates: true,
|
|
6132
|
+
requiresWorkspace: true,
|
|
6133
|
+
args: [
|
|
6134
|
+
{ name: "workflow-id", description: "Workflow ID", required: true },
|
|
6135
|
+
{
|
|
6136
|
+
name: "models",
|
|
6137
|
+
description: "Comma-separated assistant chat model IDs",
|
|
6138
|
+
alias: "m",
|
|
6139
|
+
required: true
|
|
6140
|
+
},
|
|
6141
|
+
{
|
|
6142
|
+
name: "scenario-ids",
|
|
6143
|
+
description: "Comma-separated scenario IDs (omit with --all-scenarios)",
|
|
6144
|
+
required: false
|
|
6145
|
+
},
|
|
6146
|
+
{
|
|
6147
|
+
name: "all-scenarios",
|
|
6148
|
+
description: "Run every scenario on the workflow qualification",
|
|
6149
|
+
required: false
|
|
6150
|
+
},
|
|
6151
|
+
{
|
|
6152
|
+
name: "rounds",
|
|
6153
|
+
description: "Rounds (full model\xD7scenario grid per round)",
|
|
6154
|
+
required: false
|
|
6155
|
+
},
|
|
6156
|
+
{ name: "warmup", description: "Leading rounds flagged warmup (excluded in analysis)" },
|
|
6157
|
+
{ name: "spacing", description: "Seconds between job starts" },
|
|
6158
|
+
{
|
|
6159
|
+
name: "concurrency",
|
|
6160
|
+
description: "Max simultaneous test-chat runs (default 1)",
|
|
6161
|
+
required: false
|
|
6162
|
+
},
|
|
6163
|
+
{
|
|
6164
|
+
name: "evaluate",
|
|
6165
|
+
description: "Evaluate each completed run before writing the row",
|
|
6166
|
+
required: false
|
|
6167
|
+
},
|
|
6168
|
+
{
|
|
6169
|
+
name: "wait-timeout",
|
|
6170
|
+
description: "Seconds to wait per run completion / evaluation"
|
|
6171
|
+
},
|
|
6172
|
+
{
|
|
6173
|
+
name: "poll-interval",
|
|
6174
|
+
description: "Seconds between status polls while waiting for a run"
|
|
6175
|
+
},
|
|
6176
|
+
{ name: "out", description: "Append JSONL rows to this file" }
|
|
6177
|
+
],
|
|
6178
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
6179
|
+
const models = parseCommaSeparatedList(requireString(args, "models"), "--models");
|
|
6180
|
+
const allScenarios = Boolean(args["all-scenarios"]);
|
|
6181
|
+
const scenarioIdsRaw = args["scenario-ids"];
|
|
6182
|
+
if (allScenarios && scenarioIdsRaw) {
|
|
6183
|
+
throw new CLIError("Use either --all-scenarios or --scenario-ids, not both");
|
|
6184
|
+
}
|
|
6185
|
+
if (!allScenarios && !scenarioIdsRaw) {
|
|
6186
|
+
throw new CLIError("Specify --all-scenarios or --scenario-ids");
|
|
6187
|
+
}
|
|
6188
|
+
const scenarioIds = scenarioIdsRaw ? parseCommaSeparatedList(scenarioIdsRaw, "--scenario-ids").map((s) => {
|
|
6189
|
+
const id = Number(s);
|
|
6190
|
+
if (!Number.isInteger(id) || id < 1) {
|
|
6191
|
+
throw new CLIError("--scenario-ids must be positive integers");
|
|
6192
|
+
}
|
|
6193
|
+
return id;
|
|
6194
|
+
}) : null;
|
|
6195
|
+
const workflowId = requireNumber(args, "workflow-id");
|
|
6196
|
+
const rounds = parsePositiveInt(args.rounds, "--rounds", 1);
|
|
6197
|
+
if (rounds < 1) throw new CLIError("--rounds must be >= 1");
|
|
6198
|
+
const warmup = parsePositiveInt(args.warmup, "--warmup", 0);
|
|
6199
|
+
const spacingSec = parsePositiveInt(args.spacing, "--spacing", 30);
|
|
6200
|
+
const concurrency = parseConcurrency(args.concurrency, "--concurrency", 1);
|
|
6201
|
+
const waitTimeoutSec = parsePositiveInt(args["wait-timeout"], "--wait-timeout", 900);
|
|
6202
|
+
const pollIntervalSec = parsePositiveInt(args["poll-interval"], "--poll-interval", 5);
|
|
6203
|
+
const evaluate = Boolean(args.evaluate);
|
|
6204
|
+
const outPath = args.out ? String(args.out) : void 0;
|
|
6205
|
+
if (outPath) {
|
|
6206
|
+
validateModelEvalOutPath(outPath);
|
|
6207
|
+
mkdirSync(dirname(outPath), { recursive: true });
|
|
6208
|
+
}
|
|
6209
|
+
const auth = requireAuth(ctx);
|
|
6210
|
+
const scenarios = await resolveBatchScenarios(
|
|
6211
|
+
auth.apiClient,
|
|
6212
|
+
workspace,
|
|
6213
|
+
workflowId,
|
|
6214
|
+
scenarioIds
|
|
6215
|
+
);
|
|
6216
|
+
await executeModelEvalBatch(auth.apiClient, {
|
|
6217
|
+
workspace,
|
|
6218
|
+
workflowId,
|
|
6219
|
+
models,
|
|
6220
|
+
scenarios,
|
|
6221
|
+
rounds,
|
|
6222
|
+
warmup,
|
|
6223
|
+
spacingSec,
|
|
6224
|
+
concurrency,
|
|
6225
|
+
evaluate,
|
|
6226
|
+
waitTimeoutSec,
|
|
6227
|
+
pollIntervalSec,
|
|
6228
|
+
outPath
|
|
6229
|
+
});
|
|
6230
|
+
}
|
|
6231
|
+
}
|
|
6232
|
+
]
|
|
6233
|
+
};
|
|
6234
|
+
|
|
6235
|
+
// src/domains/queries.ts
|
|
6236
|
+
var FIELD_COLUMNS2 = [
|
|
6237
|
+
{ header: "PATH", getValue: (f) => f.path ?? "" },
|
|
6238
|
+
{ header: "LABEL", getValue: (f) => f.displayName ?? "" },
|
|
6239
|
+
{ header: "TYPE", getValue: (f) => f.type ?? "" },
|
|
6240
|
+
{ header: "CATEGORY", getValue: (f) => f.category ?? "" },
|
|
6241
|
+
{ header: "OPERATORS", getValue: (f) => (f.operators ?? []).join(",") }
|
|
6242
|
+
];
|
|
6243
|
+
function coerceQuery(data, args) {
|
|
6244
|
+
if (data === null || typeof data !== "object" || Array.isArray(data)) {
|
|
6245
|
+
throw new CLIError("Query JSON required (--data, --file, or stdin)");
|
|
6246
|
+
}
|
|
6247
|
+
const obj = data;
|
|
6248
|
+
const entity = typeof args["entity"] === "string" ? args["entity"] : "member";
|
|
6249
|
+
if ("kind" in obj && !("entity" in obj) && !("where" in obj)) {
|
|
6250
|
+
return { entity, where: obj, limit: 50 };
|
|
6251
|
+
}
|
|
6252
|
+
if (!("entity" in obj)) {
|
|
6253
|
+
return { entity, ...obj };
|
|
6254
|
+
}
|
|
6255
|
+
return obj;
|
|
6256
|
+
}
|
|
6257
|
+
function runMode(args) {
|
|
6258
|
+
const mode = args["mode"];
|
|
6259
|
+
if (mode === void 0) return void 0;
|
|
6260
|
+
if (mode === "rows" || mode === "count" || mode === "aggregate") return mode;
|
|
6261
|
+
throw new CLIError("--mode must be rows, count, or aggregate");
|
|
6262
|
+
}
|
|
6263
|
+
var QUERY_SYNTAX = `Unified Query Engine \u2014 query object reference
|
|
6264
|
+
=============================================
|
|
6265
|
+
|
|
6266
|
+
ENVELOPE (POST /queries/{validate,preview,run} body: {"query": <envelope>, "mode": "rows"|"count"|"aggregate"})
|
|
6267
|
+
{
|
|
6268
|
+
"entity": "member" | "chat" | "data_record",
|
|
6269
|
+
"dataType": <id|slug>, // required iff entity=data_record
|
|
6270
|
+
"where": <predicate>, // see node kinds below
|
|
6271
|
+
"select": ["member.id", ...], // projection, max 30 (rows mode)
|
|
6272
|
+
"sort": [{"field": "...", "dir": "asc"|"desc"}], // max 3
|
|
6273
|
+
"limit": 1..500, // default 50
|
|
6274
|
+
"cursor": "...", // page token from a prior run
|
|
6275
|
+
"aggregate": {...}, // GROUP BY mode; excludes select/sort
|
|
6276
|
+
"includeArchived": false
|
|
6277
|
+
}
|
|
6278
|
+
The CLI also accepts a BARE PREDICATE ({"kind": ...}) and wraps it as
|
|
6279
|
+
{"entity": "member", "where": <predicate>, "limit": 50}.
|
|
6280
|
+
|
|
6281
|
+
PREDICATE NODE KINDS
|
|
6282
|
+
{"kind": "and", "children": [<predicate>...]} every child must match
|
|
6283
|
+
{"kind": "or", "children": [<predicate>...]} at least one child
|
|
6284
|
+
{"kind": "not", "child": <predicate>} negation
|
|
6285
|
+
{"kind": "compare", "field": "<path>", "op": "<op>", "value": <value>}
|
|
6286
|
+
{"kind": "recordMatch", same-record correlation:
|
|
6287
|
+
"dataType": <id|slug>, ALL inner conditions bind
|
|
6288
|
+
"mode": "any"|"none"|"noneWithRecord", to ONE DataRecord row
|
|
6289
|
+
"where": <predicate over record.* fields>}
|
|
6290
|
+
{"kind": "relationMatch", same-row correlation over
|
|
6291
|
+
"relation": "workflowEntries"|"calendarEvents", a declared relation
|
|
6292
|
+
"mode": "any"|"none",
|
|
6293
|
+
"where": <predicate over entry.*/event.* fields>}
|
|
6294
|
+
{"kind": "aggregate", count / latest over an
|
|
6295
|
+
"source": "<aggregate source>", event stream
|
|
6296
|
+
"metric": "count"|"max",
|
|
6297
|
+
"op": "eq"|"neq"|"gt"|"gte"|"lt"|"lte",
|
|
6298
|
+
"value": <number for count; temporal/ISO for max>,
|
|
6299
|
+
"windowDays": N, "windowHours": N, optional rolling window
|
|
6300
|
+
"sourceIds": [ids], sources that accept them
|
|
6301
|
+
"emptyPolicy": "include"|"exclude"} members with no rows
|
|
6302
|
+
{"kind": "savedFilterRef", "filterIds": [N,...], "combine": "union"|"intersect"}
|
|
6303
|
+
|
|
6304
|
+
FIELD PATHS
|
|
6305
|
+
Static paths come from GET /queries/fields (per workspace \u2014 includes
|
|
6306
|
+
labels, operators, enum vocabularies, and semantic categories):
|
|
6307
|
+
member.* e.g. member.name, member.email, member.workflowId
|
|
6308
|
+
chat.* e.g. chat.title, chat.channel
|
|
6309
|
+
Dynamic namespaces:
|
|
6310
|
+
record.<slug> DataType fields (inside recordMatch / data_record
|
|
6311
|
+
root), plus record.createdAt / record.updatedAt /
|
|
6312
|
+
record.externalId system fields
|
|
6313
|
+
memberField.<key> workspace member fields (namespaced keys, e.g.
|
|
6314
|
+
memberField.fhir:patient_id) \u2014 text operators,
|
|
6315
|
+
negative/empty operators match members WITHOUT
|
|
6316
|
+
the key (null-inclusive)
|
|
6317
|
+
entry.* workflowEntries relation: entry.workflowId,
|
|
6318
|
+
entry.status, entry.enteredAt
|
|
6319
|
+
event.* calendarEvents relation: event.calendarId,
|
|
6320
|
+
event.typeId, event.startTime
|
|
6321
|
+
|
|
6322
|
+
OPERATORS (legality depends on field type \u2014 check queries fields)
|
|
6323
|
+
text: eq neq contains notContains startsWith in notIn isEmpty notEmpty
|
|
6324
|
+
number: eq neq gt gte lt lte between notBetween in notIn isEmpty notEmpty
|
|
6325
|
+
boolean: eq neq
|
|
6326
|
+
date(time): eq neq gt gte lt lte between notBetween onDay notOnDay
|
|
6327
|
+
isEmpty notEmpty
|
|
6328
|
+
enum/id: eq neq in notIn isEmpty notEmpty
|
|
6329
|
+
record fields additionally support: exists (has any value)
|
|
6330
|
+
Negative text/membership operators are null-inclusive (legacy
|
|
6331
|
+
notPartial/none semantics).
|
|
6332
|
+
|
|
6333
|
+
VALUES
|
|
6334
|
+
Scalars: "text", 42, true/false. Lists for in/notIn: ["a","b"] / [1,2].
|
|
6335
|
+
Temporal (date/datetime comparisons):
|
|
6336
|
+
{"type": "now"}
|
|
6337
|
+
{"type": "daysAgo", "days": N}
|
|
6338
|
+
{"type": "daysFromNow", "days": N} future dates
|
|
6339
|
+
{"type": "dayBoundary", "day": "today"|"tomorrow"|"yesterday"|"YYYY-MM-DD",
|
|
6340
|
+
"edge": "start"|"end"} (edge optional)
|
|
6341
|
+
or an ISO instant string "2026-06-01T00:00:00Z"
|
|
6342
|
+
Ranges (between/notBetween): {"type": "range", "min": <v>, "max": <v>}
|
|
6343
|
+
(min/max may be numbers or temporal values).
|
|
6344
|
+
|
|
6345
|
+
AGGREGATE SOURCES (member; categorized = palette-facing)
|
|
6346
|
+
messages, userMessages, chats communications activity
|
|
6347
|
+
smsDeliveryFailures terminally-failed outbound SMS
|
|
6348
|
+
forwardedCalls forwarded phone calls
|
|
6349
|
+
workflowEntries workflow entries (accepts sourceIds
|
|
6350
|
+
= workflow ids)
|
|
6351
|
+
(uncategorized sources exist for legacy-filter parity; prefer the above)
|
|
6352
|
+
|
|
6353
|
+
DERIVED BOOLEAN SHORTCUTS (vs countable streams)
|
|
6354
|
+
member.smsDeliveryFailed LATEST outbound SMS failed (not "any ever")
|
|
6355
|
+
member.callForwarded any call ever forwarded
|
|
6356
|
+
member.hasChatNeedingResponse current needs-response state
|
|
6357
|
+
member.notifySms/notifyEmail/notifyVoice eq true = preference on AND
|
|
6358
|
+
deliverable (contact info present); eq false = raw opt-out flag
|
|
6359
|
+
|
|
6360
|
+
EXAMPLES
|
|
6361
|
+
Entered workflow 3 in the last 30 days:
|
|
6362
|
+
{"kind":"relationMatch","relation":"workflowEntries","mode":"any","where":
|
|
6363
|
+
{"kind":"and","children":[
|
|
6364
|
+
{"kind":"compare","field":"entry.workflowId","op":"eq","value":3},
|
|
6365
|
+
{"kind":"compare","field":"entry.enteredAt","op":"gte",
|
|
6366
|
+
"value":{"type":"daysAgo","days":30}}]}}
|
|
6367
|
+
Never entered workflow 3:
|
|
6368
|
+
{"kind":"relationMatch","relation":"workflowEntries","mode":"none",
|
|
6369
|
+
"where":{"kind":"compare","field":"entry.workflowId","op":"eq","value":3}}
|
|
6370
|
+
More than 2 SMS delivery failures in the last week:
|
|
6371
|
+
{"kind":"aggregate","source":"smsDeliveryFailures","metric":"count",
|
|
6372
|
+
"op":"gt","value":2,"windowDays":7}
|
|
6373
|
+
Appointment date at least 14 days in the future (record field):
|
|
6374
|
+
{"kind":"recordMatch","dataType":"appointments","mode":"any","where":
|
|
6375
|
+
{"kind":"compare","field":"record.appt_date","op":"gte",
|
|
6376
|
+
"value":{"type":"daysFromNow","days":14}}}
|
|
6377
|
+
Member field equals a value:
|
|
6378
|
+
{"kind":"compare","field":"memberField.fhir:patient_id","op":"eq",
|
|
6379
|
+
"value":"12345"}
|
|
6380
|
+
|
|
6381
|
+
DEBUG LOOP
|
|
6382
|
+
1. gr queries syntax this reference
|
|
6383
|
+
2. gr queries fields -w $UUID workspace namespace + labels
|
|
6384
|
+
3. gr queries validate -w $UUID --data '\u2026' structure/operator/cost check
|
|
6385
|
+
4. gr queries preview -w $UUID --data '\u2026' bounded sample (safe)
|
|
6386
|
+
5. gr queries run -w $UUID --data '\u2026' --mode count|rows
|
|
6387
|
+
6. Persist: gr members filters create -w $UUID \\
|
|
6388
|
+
--data '{"name":"My filter","query":<predicate>}' --allow-write
|
|
6389
|
+
Saved filters apply by reference: GET /members?memberFilterId=N.
|
|
6390
|
+
`;
|
|
6391
|
+
var queriesDomain = {
|
|
6392
|
+
name: "queries",
|
|
6393
|
+
description: "Unified Query Engine: construct, validate, preview, run, and debug queries",
|
|
6394
|
+
commands: [
|
|
6395
|
+
{
|
|
6396
|
+
path: ["queries", "syntax"],
|
|
6397
|
+
description: "Print the full query object syntax/structure reference (offline)",
|
|
6398
|
+
requiresAuth: false,
|
|
6399
|
+
handler: async () => {
|
|
6400
|
+
console.log(QUERY_SYNTAX);
|
|
6401
|
+
}
|
|
6402
|
+
},
|
|
6403
|
+
{
|
|
6404
|
+
path: ["queries", "fields"],
|
|
6405
|
+
description: "List the queryable namespace: fields with labels, operators, categories; relations; aggregate sources; member fields",
|
|
6406
|
+
requiresWorkspace: true,
|
|
6407
|
+
args: [
|
|
6408
|
+
{
|
|
6409
|
+
name: "entity",
|
|
6410
|
+
description: "Entity namespace to list (member|chat; default member)",
|
|
6411
|
+
required: false
|
|
6412
|
+
}
|
|
6413
|
+
],
|
|
6414
|
+
examples: [
|
|
6415
|
+
"yarn gr queries fields -w $UUID",
|
|
6416
|
+
"yarn gr queries fields -w $UUID -o json # full response incl. relations, dataTypes"
|
|
6417
|
+
],
|
|
6418
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
6419
|
+
const result2 = await requireAuth(ctx).apiClient.getQueryFields(workspace);
|
|
6420
|
+
if (ctx.outputFormat === "json") {
|
|
6421
|
+
outputSingle(result2, ctx);
|
|
6422
|
+
return;
|
|
6423
|
+
}
|
|
6424
|
+
const entity = typeof args["entity"] === "string" ? args["entity"] : "member";
|
|
6425
|
+
const fields = result2.entities[entity] ?? [];
|
|
6426
|
+
outputData(fields, ctx, FIELD_COLUMNS2);
|
|
6427
|
+
const relations = Object.keys(result2.relations?.[entity] ?? {});
|
|
6428
|
+
if (relations.length > 0) {
|
|
6429
|
+
console.log(`
|
|
6430
|
+
Relations (relationMatch): ${relations.join(", ")}`);
|
|
6431
|
+
}
|
|
6432
|
+
const sources = result2.aggregateSources?.[entity] ?? [];
|
|
6433
|
+
const categories = result2.aggregateSourceCategories?.[entity] ?? {};
|
|
6434
|
+
if (sources.length > 0) {
|
|
6435
|
+
const labeled = sources.map(
|
|
6436
|
+
(s) => categories[s] ? `${s} [${categories[s]}]` : `${s} [internal]`
|
|
6437
|
+
);
|
|
6438
|
+
console.log(`Aggregate sources: ${labeled.join(", ")}`);
|
|
6439
|
+
}
|
|
6440
|
+
if (entity === "member" && result2.dataTypes.length > 0) {
|
|
6441
|
+
console.log(
|
|
6442
|
+
`Forms (recordMatch dataTypes): ${result2.dataTypes.map((dt) => dt.slug).join(", ")}`
|
|
6443
|
+
);
|
|
6444
|
+
}
|
|
6445
|
+
console.log("\nFull node/operator/value reference: yarn gr queries syntax");
|
|
6446
|
+
}
|
|
6447
|
+
},
|
|
6448
|
+
{
|
|
6449
|
+
path: ["queries", "validate"],
|
|
6450
|
+
description: "Validate a query or bare predicate (structure, operators, access, cost) without executing",
|
|
6451
|
+
requiresWorkspace: true,
|
|
6452
|
+
args: [
|
|
6453
|
+
{
|
|
6454
|
+
name: "entity",
|
|
6455
|
+
description: "Root entity when wrapping a bare predicate (default member)",
|
|
6456
|
+
required: false
|
|
6457
|
+
}
|
|
6458
|
+
],
|
|
6459
|
+
examples: [
|
|
6460
|
+
`yarn gr queries validate -w $UUID --data '{"kind":"compare","field":"member.name","op":"contains","value":"smith"}'`,
|
|
6461
|
+
"yarn gr queries validate -w $UUID --file query.json"
|
|
6462
|
+
],
|
|
6463
|
+
handler: async ({ ctx, workspace, args, data }) => {
|
|
6464
|
+
const query = coerceQuery(data, args);
|
|
6465
|
+
const result2 = await requireAuth(ctx).apiClient.validateQuery(workspace, query);
|
|
6466
|
+
outputSingle(result2, ctx);
|
|
6467
|
+
}
|
|
6468
|
+
},
|
|
6469
|
+
{
|
|
6470
|
+
path: ["queries", "preview"],
|
|
6471
|
+
description: "Run a bounded sample of a query (limit capped server-side; safe to iterate)",
|
|
6472
|
+
requiresWorkspace: true,
|
|
6473
|
+
args: [
|
|
6474
|
+
{
|
|
6475
|
+
name: "entity",
|
|
6476
|
+
description: "Root entity when wrapping a bare predicate (default member)",
|
|
6477
|
+
required: false
|
|
6478
|
+
},
|
|
6479
|
+
{
|
|
6480
|
+
name: "mode",
|
|
6481
|
+
description: "rows (default), count, or aggregate",
|
|
6482
|
+
required: false
|
|
6483
|
+
}
|
|
6484
|
+
],
|
|
6485
|
+
examples: [
|
|
6486
|
+
`yarn gr queries preview -w $UUID --data '{"kind":"compare","field":"member.email","op":"notEmpty"}'`,
|
|
6487
|
+
"yarn gr queries preview -w $UUID --file query.json --mode count"
|
|
6488
|
+
],
|
|
6489
|
+
handler: async ({ ctx, workspace, args, data }) => {
|
|
6490
|
+
const query = coerceQuery(data, args);
|
|
6491
|
+
const result2 = await requireAuth(ctx).apiClient.previewQuery(
|
|
6492
|
+
workspace,
|
|
6493
|
+
query,
|
|
6494
|
+
runMode(args)
|
|
6495
|
+
);
|
|
6496
|
+
outputSingle(result2, ctx);
|
|
6497
|
+
}
|
|
6498
|
+
},
|
|
6499
|
+
{
|
|
6500
|
+
path: ["queries", "run"],
|
|
6501
|
+
description: "Execute a query (rows / count / aggregate)",
|
|
6502
|
+
requiresWorkspace: true,
|
|
6503
|
+
args: [
|
|
6504
|
+
{
|
|
6505
|
+
name: "entity",
|
|
6506
|
+
description: "Root entity when wrapping a bare predicate (default member)",
|
|
6507
|
+
required: false
|
|
6508
|
+
},
|
|
6509
|
+
{
|
|
6510
|
+
name: "mode",
|
|
6511
|
+
description: "rows (default), count, or aggregate",
|
|
6512
|
+
required: false
|
|
6513
|
+
}
|
|
6514
|
+
],
|
|
6515
|
+
examples: [
|
|
6516
|
+
"yarn gr queries run -w $UUID --file query.json --mode count",
|
|
6517
|
+
`yarn gr queries run -w $UUID --data '{"entity":"member","where":{...},"select":["member.id","member.name"],"limit":100}'`
|
|
6518
|
+
],
|
|
6519
|
+
handler: async ({ ctx, workspace, args, data }) => {
|
|
6520
|
+
const query = coerceQuery(data, args);
|
|
6521
|
+
const result2 = await requireAuth(ctx).apiClient.runQuery(
|
|
6522
|
+
workspace,
|
|
6523
|
+
query,
|
|
6524
|
+
runMode(args)
|
|
6525
|
+
);
|
|
6526
|
+
outputSingle(result2, ctx);
|
|
6527
|
+
}
|
|
5316
6528
|
}
|
|
5317
6529
|
]
|
|
5318
6530
|
};
|
|
5319
6531
|
|
|
5320
6532
|
// src/domains/sites.ts
|
|
6533
|
+
import { readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
5321
6534
|
var COLUMNS13 = [
|
|
5322
6535
|
COL.id(),
|
|
5323
6536
|
COL.name(),
|
|
@@ -5336,6 +6549,30 @@ var MENU_COLUMNS = [
|
|
|
5336
6549
|
{ header: "TYPE", getValue: (item) => item.type ?? "" },
|
|
5337
6550
|
{ header: "ORDER", getValue: (item) => String(item.order ?? "") }
|
|
5338
6551
|
];
|
|
6552
|
+
var SOURCE_COLUMNS = [
|
|
6553
|
+
{ header: "SITE", getValue: (item) => String(item.siteId ?? "") },
|
|
6554
|
+
{ header: "FOLDER", getValue: (item) => String(item.sourceFolderId ?? "") },
|
|
6555
|
+
{ header: "RELEASE", getValue: (item) => String(item.sourceReleaseId ?? "") },
|
|
6556
|
+
{ header: "BUILD", getValue: (item) => item.latestBuild?.status ?? "" },
|
|
6557
|
+
{ header: "UPDATED", getValue: (item) => item.updatedAt ?? "" }
|
|
6558
|
+
];
|
|
6559
|
+
var SOURCE_BUILD_COLUMNS = [
|
|
6560
|
+
{ header: "BUILD", getValue: (item) => item.build?.status ?? "" },
|
|
6561
|
+
{ header: "RELEASE", getValue: (item) => String(item.release?.version ?? "") },
|
|
6562
|
+
{ header: "LOGS", getValue: (item) => String(item.build?.logs ?? "").slice(0, 80) }
|
|
6563
|
+
];
|
|
6564
|
+
var RELEASE_COLUMNS = [
|
|
6565
|
+
{ header: "VERSION", getValue: (item) => String(item.version ?? "") },
|
|
6566
|
+
{ header: "NAME", getValue: (item) => item.name ?? `Version ${item.version ?? ""}` },
|
|
6567
|
+
{ header: "UUID", getValue: (item) => item.uuid ?? "" },
|
|
6568
|
+
{ header: "NOTE", getValue: (item) => String(item.note ?? "").slice(0, 60) },
|
|
6569
|
+
{ header: "CREATED", getValue: (item) => item.createdAt ?? "" }
|
|
6570
|
+
];
|
|
6571
|
+
var TEMPLATE_COLUMNS2 = [
|
|
6572
|
+
{ header: "VALUE", getValue: (item) => item.value ?? "" },
|
|
6573
|
+
{ header: "LABEL", getValue: (item) => item.label ?? "" },
|
|
6574
|
+
{ header: "DESCRIPTION", getValue: (item) => String(item.description ?? "").slice(0, 70) }
|
|
6575
|
+
];
|
|
5339
6576
|
var sitesDomain = {
|
|
5340
6577
|
name: "sites",
|
|
5341
6578
|
description: "Manage sites, pages, and menus",
|
|
@@ -5458,47 +6695,279 @@ var sitesDomain = {
|
|
|
5458
6695
|
const result2 = await requireAuth(ctx).apiClient.createMenuItem(
|
|
5459
6696
|
workspace,
|
|
5460
6697
|
requireNumber(args, "site-id"),
|
|
5461
|
-
data
|
|
6698
|
+
data
|
|
6699
|
+
);
|
|
6700
|
+
outputSingle(result2, ctx, MENU_COLUMNS);
|
|
6701
|
+
}
|
|
6702
|
+
},
|
|
6703
|
+
{
|
|
6704
|
+
path: ["sites", "menu", "update"],
|
|
6705
|
+
description: "Update a menu item",
|
|
6706
|
+
mutates: true,
|
|
6707
|
+
requiresWorkspace: true,
|
|
6708
|
+
args: [
|
|
6709
|
+
{ name: "site-id", description: "Site ID", required: true },
|
|
6710
|
+
{ name: "id", description: "Menu item ID", required: true }
|
|
6711
|
+
],
|
|
6712
|
+
handler: async ({ ctx, workspace, args, data }) => {
|
|
6713
|
+
const result2 = await requireAuth(ctx).apiClient.updateMenuItem(
|
|
6714
|
+
workspace,
|
|
6715
|
+
requireNumber(args, "site-id"),
|
|
6716
|
+
requireNumber(args, "id"),
|
|
6717
|
+
data
|
|
6718
|
+
);
|
|
6719
|
+
outputSingle(result2, ctx, MENU_COLUMNS);
|
|
6720
|
+
}
|
|
6721
|
+
},
|
|
6722
|
+
{
|
|
6723
|
+
path: ["sites", "menu", "delete"],
|
|
6724
|
+
description: "Delete a menu item",
|
|
6725
|
+
mutates: true,
|
|
6726
|
+
requiresWorkspace: true,
|
|
6727
|
+
args: [
|
|
6728
|
+
{ name: "site-id", description: "Site ID", required: true },
|
|
6729
|
+
{ name: "id", description: "Menu item ID", required: true }
|
|
6730
|
+
],
|
|
6731
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
6732
|
+
await requireAuth(ctx).apiClient.deleteMenuItem(
|
|
6733
|
+
workspace,
|
|
6734
|
+
requireNumber(args, "site-id"),
|
|
6735
|
+
requireNumber(args, "id")
|
|
6736
|
+
);
|
|
6737
|
+
process.stdout.write(`Deleted menu item ${args.id}
|
|
6738
|
+
`);
|
|
6739
|
+
}
|
|
6740
|
+
},
|
|
6741
|
+
// Source-backed site (Vite/React) sub-resource
|
|
6742
|
+
{
|
|
6743
|
+
path: ["sites", "source", "get"],
|
|
6744
|
+
description: "Get the source bundle + latest build for a source-backed site",
|
|
6745
|
+
requiresWorkspace: true,
|
|
6746
|
+
args: [{ name: "site-id", description: "Site ID", required: true }],
|
|
6747
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
6748
|
+
const result2 = await requireAuth(ctx).apiClient.getSiteSource(
|
|
6749
|
+
workspace,
|
|
6750
|
+
requireNumber(args, "site-id")
|
|
6751
|
+
);
|
|
6752
|
+
outputSingle(result2, ctx, SOURCE_COLUMNS);
|
|
6753
|
+
}
|
|
6754
|
+
},
|
|
6755
|
+
{
|
|
6756
|
+
path: ["sites", "source", "build"],
|
|
6757
|
+
description: "Compile the source bundle and refresh the preview",
|
|
6758
|
+
mutates: true,
|
|
6759
|
+
requiresWorkspace: true,
|
|
6760
|
+
args: [{ name: "site-id", description: "Site ID", required: true }],
|
|
6761
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
6762
|
+
const result2 = await requireAuth(ctx).apiClient.buildSiteSource(
|
|
6763
|
+
workspace,
|
|
6764
|
+
requireNumber(args, "site-id")
|
|
6765
|
+
);
|
|
6766
|
+
outputSingle(result2, ctx, SOURCE_BUILD_COLUMNS);
|
|
6767
|
+
}
|
|
6768
|
+
},
|
|
6769
|
+
{
|
|
6770
|
+
path: ["sites", "source", "publish"],
|
|
6771
|
+
description: "Build and publish the source bundle as the live release",
|
|
6772
|
+
mutates: true,
|
|
6773
|
+
requiresWorkspace: true,
|
|
6774
|
+
args: [
|
|
6775
|
+
{ name: "site-id", description: "Site ID", required: true },
|
|
6776
|
+
{
|
|
6777
|
+
name: "name",
|
|
6778
|
+
description: 'Optional version label (shown as "Version {n}" if omitted)'
|
|
6779
|
+
},
|
|
6780
|
+
{ name: "note", description: "Optional free-text release note" }
|
|
6781
|
+
],
|
|
6782
|
+
examples: [
|
|
6783
|
+
'gr sites source publish -w $WID --site-id 7 --name "Launch" --note "first cut" --allow-write'
|
|
6784
|
+
],
|
|
6785
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
6786
|
+
const name = args["name"];
|
|
6787
|
+
const note = args["note"];
|
|
6788
|
+
const result2 = await requireAuth(ctx).apiClient.publishSiteSource(
|
|
6789
|
+
workspace,
|
|
6790
|
+
requireNumber(args, "site-id"),
|
|
6791
|
+
{
|
|
6792
|
+
...typeof name === "string" ? { name } : {},
|
|
6793
|
+
...typeof note === "string" ? { note } : {}
|
|
6794
|
+
}
|
|
6795
|
+
);
|
|
6796
|
+
outputSingle(result2, ctx, SOURCE_BUILD_COLUMNS);
|
|
6797
|
+
}
|
|
6798
|
+
},
|
|
6799
|
+
{
|
|
6800
|
+
path: ["sites", "source", "releases"],
|
|
6801
|
+
description: "List the published version history (newest first) for a source site",
|
|
6802
|
+
requiresWorkspace: true,
|
|
6803
|
+
args: [{ name: "site-id", description: "Site ID", required: true }],
|
|
6804
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
6805
|
+
const source = await requireAuth(ctx).apiClient.getSiteSource(
|
|
6806
|
+
workspace,
|
|
6807
|
+
requireNumber(args, "site-id")
|
|
6808
|
+
);
|
|
6809
|
+
const releases = [...source.releases ?? []].sort(
|
|
6810
|
+
(a, b) => (b.version ?? 0) - (a.version ?? 0)
|
|
6811
|
+
);
|
|
6812
|
+
outputData(releases, ctx, RELEASE_COLUMNS);
|
|
6813
|
+
}
|
|
6814
|
+
},
|
|
6815
|
+
{
|
|
6816
|
+
path: ["sites", "source", "rollback"],
|
|
6817
|
+
description: "Re-point the live release to a prior version (pointer move, no rebuild)",
|
|
6818
|
+
mutates: true,
|
|
6819
|
+
requiresWorkspace: true,
|
|
6820
|
+
args: [
|
|
6821
|
+
{ name: "site-id", description: "Site ID", required: true },
|
|
6822
|
+
{
|
|
6823
|
+
name: "release-uuid",
|
|
6824
|
+
description: "UUID of the release to publish (from `sites source releases`)",
|
|
6825
|
+
required: true
|
|
6826
|
+
}
|
|
6827
|
+
],
|
|
6828
|
+
examples: [
|
|
6829
|
+
"gr sites source rollback -w $WID --site-id 7 --release-uuid <uuid> --allow-write"
|
|
6830
|
+
],
|
|
6831
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
6832
|
+
const result2 = await requireAuth(ctx).apiClient.rollbackSiteSource(
|
|
6833
|
+
workspace,
|
|
6834
|
+
requireNumber(args, "site-id"),
|
|
6835
|
+
requireString(args, "release-uuid")
|
|
6836
|
+
);
|
|
6837
|
+
outputSingle(result2, ctx, SOURCE_COLUMNS);
|
|
6838
|
+
}
|
|
6839
|
+
},
|
|
6840
|
+
{
|
|
6841
|
+
path: ["sites", "source", "templates"],
|
|
6842
|
+
description: "List starter templates this caller may seed via `sites source reset`",
|
|
6843
|
+
requiresWorkspace: true,
|
|
6844
|
+
args: [{ name: "site-id", description: "Site ID", required: true }],
|
|
6845
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
6846
|
+
const result2 = await requireAuth(ctx).apiClient.getSiteSourceTemplates(
|
|
6847
|
+
workspace,
|
|
6848
|
+
requireNumber(args, "site-id")
|
|
6849
|
+
);
|
|
6850
|
+
outputData(result2.templates ?? [], ctx, TEMPLATE_COLUMNS2);
|
|
6851
|
+
}
|
|
6852
|
+
},
|
|
6853
|
+
{
|
|
6854
|
+
path: ["sites", "source", "download"],
|
|
6855
|
+
description: "Download the source tree as a ZIP archive to a local file",
|
|
6856
|
+
requiresWorkspace: true,
|
|
6857
|
+
args: [
|
|
6858
|
+
{ name: "site-id", description: "Site ID", required: true },
|
|
6859
|
+
{
|
|
6860
|
+
name: "output",
|
|
6861
|
+
description: "Output file path (default: site-<id>-source.zip)"
|
|
6862
|
+
}
|
|
6863
|
+
],
|
|
6864
|
+
examples: ["gr sites source download -w $WID --site-id 7 --output site.zip"],
|
|
6865
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
6866
|
+
const siteId = requireNumber(args, "site-id");
|
|
6867
|
+
const blob = await requireAuth(ctx).apiClient.downloadSiteSourceZip(workspace, siteId);
|
|
6868
|
+
const bytes = Buffer.from(await blob.arrayBuffer());
|
|
6869
|
+
const outPath = typeof args.output === "string" ? args.output : `site-${siteId}-source.zip`;
|
|
6870
|
+
writeFileSync2(outPath, bytes);
|
|
6871
|
+
process.stdout.write(`Saved ${bytes.length} bytes to ${outPath}
|
|
6872
|
+
`);
|
|
6873
|
+
}
|
|
6874
|
+
},
|
|
6875
|
+
{
|
|
6876
|
+
path: ["sites", "source", "import"],
|
|
6877
|
+
description: "Replace the source tree with the contents of a local ZIP (clears existing)",
|
|
6878
|
+
mutates: true,
|
|
6879
|
+
requiresWorkspace: true,
|
|
6880
|
+
args: [
|
|
6881
|
+
{ name: "site-id", description: "Site ID", required: true },
|
|
6882
|
+
{
|
|
6883
|
+
name: "input",
|
|
6884
|
+
alias: "i",
|
|
6885
|
+
description: "Path to the .zip archive to upload",
|
|
6886
|
+
required: true
|
|
6887
|
+
}
|
|
6888
|
+
],
|
|
6889
|
+
examples: ["gr sites source import -w $WID --site-id 7 --input site.zip --allow-write"],
|
|
6890
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
6891
|
+
const inputPath = requireString(args, "input");
|
|
6892
|
+
const blob = new Blob([readFileSync2(inputPath)], { type: "application/zip" });
|
|
6893
|
+
const result2 = await requireAuth(ctx).apiClient.importSiteSourceZip(
|
|
6894
|
+
workspace,
|
|
6895
|
+
requireNumber(args, "site-id"),
|
|
6896
|
+
blob
|
|
5462
6897
|
);
|
|
5463
|
-
outputSingle(result2, ctx,
|
|
6898
|
+
outputSingle(result2, ctx, SOURCE_COLUMNS);
|
|
5464
6899
|
}
|
|
5465
6900
|
},
|
|
5466
6901
|
{
|
|
5467
|
-
path: ["sites", "
|
|
5468
|
-
description: "
|
|
6902
|
+
path: ["sites", "source", "reset"],
|
|
6903
|
+
description: "Reset a source site: optionally delete existing files and/or load a starter template",
|
|
5469
6904
|
mutates: true,
|
|
5470
6905
|
requiresWorkspace: true,
|
|
5471
6906
|
args: [
|
|
5472
6907
|
{ name: "site-id", description: "Site ID", required: true },
|
|
5473
|
-
{
|
|
6908
|
+
{
|
|
6909
|
+
name: "load-defaults",
|
|
6910
|
+
description: "Load a starter template skeleton",
|
|
6911
|
+
isFlag: true
|
|
6912
|
+
},
|
|
6913
|
+
{
|
|
6914
|
+
name: "delete-existing",
|
|
6915
|
+
description: "Delete existing source files first",
|
|
6916
|
+
isFlag: true
|
|
6917
|
+
},
|
|
6918
|
+
{
|
|
6919
|
+
name: "template",
|
|
6920
|
+
description: "Template to load with --load-defaults: hello-world (default), patient-enrollment, or gravity-rail-demo (superuser only)"
|
|
6921
|
+
}
|
|
5474
6922
|
],
|
|
5475
|
-
handler: async ({ ctx, workspace, args
|
|
5476
|
-
const
|
|
6923
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
6924
|
+
const template = args["template"];
|
|
6925
|
+
const result2 = await requireAuth(ctx).apiClient.resetSiteSource(
|
|
5477
6926
|
workspace,
|
|
5478
6927
|
requireNumber(args, "site-id"),
|
|
5479
|
-
|
|
5480
|
-
|
|
6928
|
+
{
|
|
6929
|
+
loadDefaults: args["load-defaults"] === true,
|
|
6930
|
+
deleteExisting: args["delete-existing"] === true,
|
|
6931
|
+
...typeof template === "string" ? { template } : {}
|
|
6932
|
+
}
|
|
5481
6933
|
);
|
|
5482
|
-
outputSingle(result2, ctx,
|
|
6934
|
+
outputSingle(result2, ctx, SOURCE_COLUMNS);
|
|
5483
6935
|
}
|
|
5484
6936
|
},
|
|
5485
6937
|
{
|
|
5486
|
-
path: ["sites", "
|
|
5487
|
-
description: "
|
|
6938
|
+
path: ["sites", "theme-settings", "get"],
|
|
6939
|
+
description: "Show the active theme's settings schema, values, and features",
|
|
6940
|
+
requiresWorkspace: true,
|
|
6941
|
+
args: [{ name: "site-id", description: "Site ID", required: true }],
|
|
6942
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
6943
|
+
const result2 = await requireAuth(ctx).apiClient.getThemeSettings(
|
|
6944
|
+
workspace,
|
|
6945
|
+
requireNumber(args, "site-id")
|
|
6946
|
+
);
|
|
6947
|
+
outputSingle(result2, ctx);
|
|
6948
|
+
}
|
|
6949
|
+
},
|
|
6950
|
+
{
|
|
6951
|
+
path: ["sites", "theme-settings", "set"],
|
|
6952
|
+
description: "Save theme settings values (JSON object of key -> value)",
|
|
5488
6953
|
mutates: true,
|
|
5489
6954
|
requiresWorkspace: true,
|
|
5490
6955
|
args: [
|
|
5491
6956
|
{ name: "site-id", description: "Site ID", required: true },
|
|
5492
|
-
{
|
|
6957
|
+
{
|
|
6958
|
+
name: "values",
|
|
6959
|
+
description: "JSON object of setting key -> value",
|
|
6960
|
+
required: true
|
|
6961
|
+
}
|
|
5493
6962
|
],
|
|
5494
6963
|
handler: async ({ ctx, workspace, args }) => {
|
|
5495
|
-
|
|
6964
|
+
const values = JSON.parse(String(args["values"]));
|
|
6965
|
+
const result2 = await requireAuth(ctx).apiClient.updateThemeSettings(
|
|
5496
6966
|
workspace,
|
|
5497
6967
|
requireNumber(args, "site-id"),
|
|
5498
|
-
|
|
6968
|
+
values
|
|
5499
6969
|
);
|
|
5500
|
-
|
|
5501
|
-
`);
|
|
6970
|
+
outputSingle(result2, ctx);
|
|
5502
6971
|
}
|
|
5503
6972
|
}
|
|
5504
6973
|
]
|
|
@@ -6586,6 +8055,54 @@ var customToolkitsDomain = {
|
|
|
6586
8055
|
]
|
|
6587
8056
|
};
|
|
6588
8057
|
|
|
8058
|
+
// src/domains/docs.ts
|
|
8059
|
+
var RESULT_COLUMNS = [
|
|
8060
|
+
{ header: "TITLE", getValue: (h) => h.title ?? "" },
|
|
8061
|
+
{ header: "URL", getValue: (h) => h.url ?? "" }
|
|
8062
|
+
];
|
|
8063
|
+
var docsDomain = {
|
|
8064
|
+
name: "docs",
|
|
8065
|
+
description: "Search the Gravity Rail documentation",
|
|
8066
|
+
commands: [
|
|
8067
|
+
{
|
|
8068
|
+
path: ["docs", "search"],
|
|
8069
|
+
description: "Search the documentation and print ranked hits",
|
|
8070
|
+
requiresAuth: false,
|
|
8071
|
+
requiresWorkspace: false,
|
|
8072
|
+
args: [
|
|
8073
|
+
{
|
|
8074
|
+
name: "query",
|
|
8075
|
+
alias: "q",
|
|
8076
|
+
description: "Search query",
|
|
8077
|
+
required: true
|
|
8078
|
+
}
|
|
8079
|
+
],
|
|
8080
|
+
examples: ['gr docs search -q "outbound workflow"'],
|
|
8081
|
+
handler: async ({ ctx, args }) => {
|
|
8082
|
+
const query = requireString(args, "query");
|
|
8083
|
+
const apiUrl = ctx.envConfig.apiUrl;
|
|
8084
|
+
const fetchFn = createSandboxFetchFromEnv(apiUrl);
|
|
8085
|
+
const url = `${apiUrl}/api/v2/docs/search?q=${encodeURIComponent(query)}`;
|
|
8086
|
+
const resp = await fetchFn(url, { method: "GET" });
|
|
8087
|
+
if (!resp.ok) {
|
|
8088
|
+
throw new CLIError(`Docs search failed: ${resp.status} ${resp.statusText}`);
|
|
8089
|
+
}
|
|
8090
|
+
const data = await resp.json();
|
|
8091
|
+
if (ctx.outputFormat === "json") {
|
|
8092
|
+
outputData(data.results, ctx, RESULT_COLUMNS);
|
|
8093
|
+
return;
|
|
8094
|
+
}
|
|
8095
|
+
if (!data.results || data.results.length === 0) {
|
|
8096
|
+
process.stdout.write(`No documentation results for "${query}".
|
|
8097
|
+
`);
|
|
8098
|
+
return;
|
|
8099
|
+
}
|
|
8100
|
+
outputData(data.results, ctx, RESULT_COLUMNS);
|
|
8101
|
+
}
|
|
8102
|
+
}
|
|
8103
|
+
]
|
|
8104
|
+
};
|
|
8105
|
+
|
|
6589
8106
|
// src/domains/features.ts
|
|
6590
8107
|
var COLUMNS18 = [
|
|
6591
8108
|
{ header: "SLUG", getValue: (item) => item.slug ?? "" },
|
|
@@ -7003,7 +8520,7 @@ var operatorGroupsDomain = {
|
|
|
7003
8520
|
const result2 = await requireAuth(ctx).apiClient.addGroupMember(
|
|
7004
8521
|
workspace,
|
|
7005
8522
|
requireNumber(args, "id"),
|
|
7006
|
-
{
|
|
8523
|
+
{ memberId: requireNumber(args, "member-id") }
|
|
7007
8524
|
);
|
|
7008
8525
|
outputSingle(result2, ctx);
|
|
7009
8526
|
}
|
|
@@ -7444,6 +8961,11 @@ var commands2 = [
|
|
|
7444
8961
|
description: "Search for available phone numbers to purchase",
|
|
7445
8962
|
args: [
|
|
7446
8963
|
{ name: "org-uuid", aliases: ["org"], description: "Organization UUID", required: true },
|
|
8964
|
+
{
|
|
8965
|
+
name: "country",
|
|
8966
|
+
description: "ISO country code, e.g. US, AU, GB (default: US)",
|
|
8967
|
+
default: "US"
|
|
8968
|
+
},
|
|
7447
8969
|
{ name: "number-type", description: "Number type: local or toll_free", default: "local" },
|
|
7448
8970
|
{ name: "area-code", description: "Area code filter" },
|
|
7449
8971
|
{ name: "contains", description: "Phone number pattern to match" },
|
|
@@ -7454,6 +8976,7 @@ var commands2 = [
|
|
|
7454
8976
|
handler: async (hctx) => {
|
|
7455
8977
|
const orgUuid = requireOrgUuid(hctx.args);
|
|
7456
8978
|
const result2 = await getOrgApi(hctx).searchPhoneNumbers(orgUuid, {
|
|
8979
|
+
country: hctx.args.country ?? "US",
|
|
7457
8980
|
numberType: hctx.args["number-type"] ?? "local",
|
|
7458
8981
|
areaCode: hctx.args["area-code"],
|
|
7459
8982
|
contains: hctx.args.contains,
|
|
@@ -7469,7 +8992,20 @@ var commands2 = [
|
|
|
7469
8992
|
args: [
|
|
7470
8993
|
{ name: "org-uuid", aliases: ["org"], description: "Organization UUID", required: true },
|
|
7471
8994
|
{ name: "phone-number", description: "E.164 phone number to purchase", required: true },
|
|
7472
|
-
{ name: "number-type", description: "Number type: local or toll_free", default: "local" }
|
|
8995
|
+
{ name: "number-type", description: "Number type: local or toll_free", default: "local" },
|
|
8996
|
+
{
|
|
8997
|
+
name: "country",
|
|
8998
|
+
description: "ISO country code of the number, e.g. US, AU (default: US)",
|
|
8999
|
+
default: "US"
|
|
9000
|
+
},
|
|
9001
|
+
{
|
|
9002
|
+
name: "bundle-sid",
|
|
9003
|
+
description: "Twilio regulatory bundle SID (BUxxxx) \u2014 required for regulated countries like AU"
|
|
9004
|
+
},
|
|
9005
|
+
{
|
|
9006
|
+
name: "address-sid",
|
|
9007
|
+
description: "Twilio address SID (ADxxxx) \u2014 required alongside the bundle for regulated countries"
|
|
9008
|
+
}
|
|
7473
9009
|
],
|
|
7474
9010
|
requiresWorkspace: false,
|
|
7475
9011
|
columns: PROVIDER_PHONE_COLUMNS,
|
|
@@ -7478,7 +9014,16 @@ var commands2 = [
|
|
|
7478
9014
|
const phoneNumber = hctx.args["phone-number"];
|
|
7479
9015
|
if (!phoneNumber) throw new CLIError("Missing required argument: --phone-number");
|
|
7480
9016
|
const numberType = hctx.args["number-type"] ?? "local";
|
|
7481
|
-
const result2 = await getOrgApi(hctx).purchasePhoneNumber(
|
|
9017
|
+
const result2 = await getOrgApi(hctx).purchasePhoneNumber(
|
|
9018
|
+
orgUuid,
|
|
9019
|
+
phoneNumber,
|
|
9020
|
+
numberType,
|
|
9021
|
+
{
|
|
9022
|
+
country: hctx.args.country ?? "US",
|
|
9023
|
+
bundleSid: hctx.args["bundle-sid"],
|
|
9024
|
+
addressSid: hctx.args["address-sid"]
|
|
9025
|
+
}
|
|
9026
|
+
);
|
|
7482
9027
|
outputSingle(result2, hctx.ctx, PROVIDER_PHONE_COLUMNS);
|
|
7483
9028
|
}
|
|
7484
9029
|
},
|
|
@@ -8144,7 +9689,7 @@ async function findOutboundPhoneUsers(client, workspace, phone) {
|
|
|
8144
9689
|
}
|
|
8145
9690
|
|
|
8146
9691
|
// ../../node_modules/libphonenumber-js/metadata.min.json.js
|
|
8147
|
-
var metadata_min_json_default = { "version": 4, "country_calling_codes": { "1": ["US", "AG", "AI", "AS", "BB", "BM", "BS", "CA", "DM", "DO", "GD", "GU", "JM", "KN", "KY", "LC", "MP", "MS", "PR", "SX", "TC", "TT", "VC", "VG", "VI"], "7": ["RU", "KZ"], "20": ["EG"], "27": ["ZA"], "30": ["GR"], "31": ["NL"], "32": ["BE"], "33": ["FR"], "34": ["ES"], "36": ["HU"], "39": ["IT", "VA"], "40": ["RO"], "41": ["CH"], "43": ["AT"], "44": ["GB", "GG", "IM", "JE"], "45": ["DK"], "46": ["SE"], "47": ["NO", "SJ"], "48": ["PL"], "49": ["DE"], "51": ["PE"], "52": ["MX"], "53": ["CU"], "54": ["AR"], "55": ["BR"], "56": ["CL"], "57": ["CO"], "58": ["VE"], "60": ["MY"], "61": ["AU", "CC", "CX"], "62": ["ID"], "63": ["PH"], "64": ["NZ"], "65": ["SG"], "66": ["TH"], "81": ["JP"], "82": ["KR"], "84": ["VN"], "86": ["CN"], "90": ["TR"], "91": ["IN"], "92": ["PK"], "93": ["AF"], "94": ["LK"], "95": ["MM"], "98": ["IR"], "211": ["SS"], "212": ["MA", "EH"], "213": ["DZ"], "216": ["TN"], "218": ["LY"], "220": ["GM"], "221": ["SN"], "222": ["MR"], "223": ["ML"], "224": ["GN"], "225": ["CI"], "226": ["BF"], "227": ["NE"], "228": ["TG"], "229": ["BJ"], "230": ["MU"], "231": ["LR"], "232": ["SL"], "233": ["GH"], "234": ["NG"], "235": ["TD"], "236": ["CF"], "237": ["CM"], "238": ["CV"], "239": ["ST"], "240": ["GQ"], "241": ["GA"], "242": ["CG"], "243": ["CD"], "244": ["AO"], "245": ["GW"], "246": ["IO"], "247": ["AC"], "248": ["SC"], "249": ["SD"], "250": ["RW"], "251": ["ET"], "252": ["SO"], "253": ["DJ"], "254": ["KE"], "255": ["TZ"], "256": ["UG"], "257": ["BI"], "258": ["MZ"], "260": ["ZM"], "261": ["MG"], "262": ["RE", "YT"], "263": ["ZW"], "264": ["NA"], "265": ["MW"], "266": ["LS"], "267": ["BW"], "268": ["SZ"], "269": ["KM"], "290": ["SH", "TA"], "291": ["ER"], "297": ["AW"], "298": ["FO"], "299": ["GL"], "350": ["GI"], "351": ["PT"], "352": ["LU"], "353": ["IE"], "354": ["IS"], "355": ["AL"], "356": ["MT"], "357": ["CY"], "358": ["FI", "AX"], "359": ["BG"], "370": ["LT"], "371": ["LV"], "372": ["EE"], "373": ["MD"], "374": ["AM"], "375": ["BY"], "376": ["AD"], "377": ["MC"], "378": ["SM"], "380": ["UA"], "381": ["RS"], "382": ["ME"], "383": ["XK"], "385": ["HR"], "386": ["SI"], "387": ["BA"], "389": ["MK"], "420": ["CZ"], "421": ["SK"], "423": ["LI"], "500": ["FK"], "501": ["BZ"], "502": ["GT"], "503": ["SV"], "504": ["HN"], "505": ["NI"], "506": ["CR"], "507": ["PA"], "508": ["PM"], "509": ["HT"], "590": ["GP", "BL", "MF"], "591": ["BO"], "592": ["GY"], "593": ["EC"], "594": ["GF"], "595": ["PY"], "596": ["MQ"], "597": ["SR"], "598": ["UY"], "599": ["CW", "BQ"], "670": ["TL"], "672": ["NF"], "673": ["BN"], "674": ["NR"], "675": ["PG"], "676": ["TO"], "677": ["SB"], "678": ["VU"], "679": ["FJ"], "680": ["PW"], "681": ["WF"], "682": ["CK"], "683": ["NU"], "685": ["WS"], "686": ["KI"], "687": ["NC"], "688": ["TV"], "689": ["PF"], "690": ["TK"], "691": ["FM"], "692": ["MH"], "850": ["KP"], "852": ["HK"], "853": ["MO"], "855": ["KH"], "856": ["LA"], "880": ["BD"], "886": ["TW"], "960": ["MV"], "961": ["LB"], "962": ["JO"], "963": ["SY"], "964": ["IQ"], "965": ["KW"], "966": ["SA"], "967": ["YE"], "968": ["OM"], "970": ["PS"], "971": ["AE"], "972": ["IL"], "973": ["BH"], "974": ["QA"], "975": ["BT"], "976": ["MN"], "977": ["NP"], "992": ["TJ"], "993": ["TM"], "994": ["AZ"], "995": ["GE"], "996": ["KG"], "998": ["UZ"] }, "countries": { "AC": ["247", "00", "(?:[01589]\\d|[46])\\d{4}", [5, 6]], "AD": ["376", "00", "(?:1|6\\d)\\d{7}|[135-9]\\d{5}", [6, 8, 9], [["(\\d{3})(\\d{3})", "$1 $2", ["[135-9]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["1"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]]]], "AE": ["971", "00", "(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}", [5, 6, 7, 8, 9, 10, 11, 12], [["(\\d{3})(\\d{2,9})", "$1 $2", ["60|8"]], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[236]|[479][2-8]"], "0$1"], ["(\\d{3})(\\d)(\\d{5})", "$1 $2 $3", ["[479]"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["5"], "0$1"]], "0"], "AF": ["93", "00", "[2-7]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-7]"], "0$1"]], "0"], "AG": ["1", "011", "(?:268|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([457]\\d{6})$|1", "268$1", 0, "268"], "AI": ["1", "011", "(?:264|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2457]\\d{6})$|1", "264$1", 0, "264"], "AL": ["355", "00", "(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}", [6, 7, 8, 9], [["(\\d{3})(\\d{3,4})", "$1 $2", ["80|9"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["4[2-6]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2358][2-5]|4"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["[23578]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["6"], "0$1"]], "0"], "AM": ["374", "00", "(?:[1-489]\\d|55|60|77)\\d{6}", [8], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[89]0"], "0 $1"], ["(\\d{3})(\\d{5})", "$1 $2", ["2|3[12]"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["1|47"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[3-9]"], "0$1"]], "0"], "AO": ["244", "00", "[29]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[29]"]]]], "AR": ["54", "00", "(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}", [10, 11], [["(\\d{4})(\\d{2})(\\d{4})", "$1 $2-$3", ["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])", "2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)", "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"], "0$1", 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2-$3", ["1"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[68]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2-$3", ["[23]"], "0$1", 1], ["(\\d)(\\d{4})(\\d{2})(\\d{4})", "$2 15-$3-$4", ["9(?:2[2-469]|3[3-578])", "9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))", "9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)", "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"], "0$1", 0, "$1 $2 $3-$4"], ["(\\d)(\\d{2})(\\d{4})(\\d{4})", "$2 15-$3-$4", ["91"], "0$1", 0, "$1 $2 $3-$4"], ["(\\d{3})(\\d{3})(\\d{5})", "$1-$2-$3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{4})", "$2 15-$3-$4", ["9"], "0$1", 0, "$1 $2 $3-$4"]], "0", 0, "0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?", "9$1"], "AS": ["1", "011", "(?:[58]\\d\\d|684|900)\\d{7}", [10], 0, "1", 0, "([267]\\d{6})$|1", "684$1", 0, "684"], "AT": ["43", "00", "1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13], [["(\\d)(\\d{3,12})", "$1 $2", ["1(?:11|[2-9])"], "0$1"], ["(\\d{3})(\\d{2})", "$1 $2", ["517"], "0$1"], ["(\\d{2})(\\d{3,5})", "$1 $2", ["5[079]"], "0$1"], ["(\\d{3})(\\d{3,10})", "$1 $2", ["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]", "(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"], "0$1"], ["(\\d{4})(\\d{3,9})", "$1 $2", ["[2-467]|5[2-6]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4,7})", "$1 $2 $3", ["5"], "0$1"]], "0"], "AU": ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}", [5, 6, 7, 8, 9, 10, 12], [["(\\d{2})(\\d{3,4})", "$1 $2", ["16"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["16"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["14|4"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[2378]"], "(0$1)"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:30|[89])"]]], "0", 0, "(183[12])|0", 0, 0, 0, [["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}", [9]], ["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}", [9]], ["180(?:0\\d{3}|2)\\d{3}", [7, 10]], ["190[0-26]\\d{6}", [10]], 0, 0, 0, ["163\\d{2,6}", [5, 6, 7, 8, 9]], ["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", [9]], ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", [6, 8, 10, 12]]], "0011"], "AW": ["297", "00", "(?:[25-79]\\d\\d|800)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[25-9]"]]]], "AX": ["358", "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", "2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}", [5, 6, 7, 8, 9, 10, 11, 12], 0, "0", 0, 0, 0, 0, "18", 0, "00"], "AZ": ["994", "00", "365\\d{6}|(?:[124579]\\d|60|88)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["90"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[28]|2|365|46", "1[28]|2|365[45]|46", "1[28]|2|365(?:4|5[02])|46"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[13-9]"], "0$1"]], "0"], "BA": ["387", "00", "6\\d{8}|(?:[35689]\\d|49|70)\\d{6}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["6[1-3]|[7-9]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2-$3", ["[3-5]|6[56]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["6"], "0$1"]], "0"], "BB": ["1", "011", "(?:246|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "246$1", 0, "246"], "BD": ["880", "00", "[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}", [6, 7, 8, 9, 10], [["(\\d{2})(\\d{4,6})", "$1-$2", ["31[5-8]|[459]1"], "0$1"], ["(\\d{3})(\\d{3,7})", "$1-$2", ["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"], "0$1"], ["(\\d{4})(\\d{3,6})", "$1-$2", ["[13-9]|2[23]"], "0$1"], ["(\\d)(\\d{7,8})", "$1-$2", ["2"], "0$1"]], "0"], "BE": ["32", "00", "4\\d{8}|[1-9]\\d{7}", [8, 9], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:80|9)0"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[239]|4[23]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[15-8]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["4"], "0$1"]], "0"], "BF": ["226", "00", "[024-7]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[024-7]"]]]], "BG": ["359", "00", "00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}", [6, 7, 8, 9, 12], [["(\\d)(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["2"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["43[1-6]|70[1-9]"], "0$1"], ["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:70|8)0"], "0$1"], ["(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3", ["43[1-7]|7"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[48]|9[08]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"]], "0"], "BH": ["973", "00", "[136-9]\\d{7}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[13679]|8[02-4679]"]]]], "BI": ["257", "00", "(?:[267]\\d|31)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2367]"]]]], "BJ": ["229", "00", "(?:01\\d|8)\\d{7}", [8, 10], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["0"]]]], "BL": ["590", "00", "7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"], ["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"], ["80[0-5]\\d{6}"], ["8[129]\\d{7}"], 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]], "BM": ["1", "011", "(?:441|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "441$1", 0, "441"], "BN": ["673", "00", "[2-578]\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-578]"]]]], "BO": ["591", "00(?:1\\d)?", "8001\\d{5}|(?:[2-467]\\d|50)\\d{6}", [8, 9], [["(\\d)(\\d{7})", "$1 $2", ["[235]|4[46]"]], ["(\\d{8})", "$1", ["[67]"]], ["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["8"]]], "0", 0, "0(1\\d)?"], "BQ": ["599", "00", "(?:[34]1|7\\d)\\d{5}", [7], 0, 0, 0, 0, 0, 0, "[347]"], "BR": ["55", "00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)", "[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}", [8, 9, 10, 11], [["(\\d{4})(\\d{4})", "$1-$2", ["300|4(?:0[02]|37|86)", "300|4(?:0(?:0|20)|370|864)"]], ["(\\d{3})(\\d{2,3})(\\d{4})", "$1 $2 $3", ["(?:[358]|90)0"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2-$3", ["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"], "($1)"], ["(\\d{2})(\\d{5})(\\d{4})", "$1 $2-$3", ["[16][1-9]|[2-57-9]"], "($1)"]], "0", 0, "(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?", "$2"], "BS": ["1", "011", "(?:242|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([3-8]\\d{6})$|1", "242$1", 0, "242"], "BT": ["975", "00", "[178]\\d{7}|[2-8]\\d{6}", [7, 8], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-6]|7[246]|8[2-4]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[67]|[78]"]]]], "BW": ["267", "00", "(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}", [7, 8, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["90"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[24-6]|3[15-9]"]], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37]"]], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["8"]]]], "BY": ["375", "810", "(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}", [6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{3})", "$1 $2", ["800"], "8 $1"], ["(\\d{3})(\\d{2})(\\d{2,4})", "$1 $2 $3", ["800"], "8 $1"], ["(\\d{4})(\\d{2})(\\d{3})", "$1 $2-$3", ["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])", "1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"], "8 0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["1(?:[56]|7[467])|2[1-3]"], "8 0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[1-4]"], "8 0$1"], ["(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["[89]"], "8 $1"]], "8", 0, "0|80?", 0, 0, 0, 0, "8~10"], "BZ": ["501", "00", "(?:0800\\d|[2-8])\\d{6}", [7, 11], [["(\\d{3})(\\d{4})", "$1-$2", ["[2-8]"]], ["(\\d)(\\d{3})(\\d{4})(\\d{3})", "$1-$2-$3-$4", ["0"]]]], "CA": ["1", "011", "[2-9]\\d{9}|3\\d{6}", [7, 10], 0, "1", 0, 0, 0, 0, 0, [["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}", [10]], ["", [10]], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", [10]], ["900[2-9]\\d{6}", [10]], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}", [10]], 0, ["310\\d{4}", [7]], 0, ["600[2-9]\\d{6}", [10]]]], "CC": ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", [6, 7, 8, 9, 10, 12], 0, "0", 0, "([59]\\d{7})$|0", "8$1", 0, 0, [["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}", [9]], ["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}", [9]], ["180(?:0\\d{3}|2)\\d{3}", [7, 10]], ["190[0-26]\\d{6}", [10]], 0, 0, 0, 0, ["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", [9]], ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", [6, 8, 10, 12]]], "0011"], "CD": ["243", "00", "(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}", [7, 8, 9, 10], [["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["88"], "0$1"], ["(\\d{2})(\\d{5})", "$1 $2", ["[1-6]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["5"], "0$1"]], "0"], "CF": ["236", "00", "8776\\d{4}|(?:[27]\\d|61)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[26-8]"]]]], "CG": ["242", "00", "222\\d{6}|(?:0\\d|80)\\d{7}", [9], [["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[02]"]]]], "CH": ["41", "00", "8\\d{11}|[2-9]\\d{8}", [9, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8[047]|90"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-79]|81"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["8"], "0$1"]], "0"], "CI": ["225", "00", "[02]\\d{9}", [10], [["(\\d{2})(\\d{2})(\\d)(\\d{5})", "$1 $2 $3 $4", ["2"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3 $4", ["0"]]]], "CK": ["682", "00", "[2-578]\\d{4}", [5], [["(\\d{2})(\\d{3})", "$1 $2", ["[2-578]"]]]], "CL": ["56", "(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0", "12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}", [9, 10, 11], [["(\\d{5})(\\d{4})", "$1 $2", ["219", "2196"], "($1)"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["60|809"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["44"]], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2[1-36]"], "($1)"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["9(?:10|[2-9])"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"], "($1)"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["60|8"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], ["(\\d{3})(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["60"]]]], "CM": ["237", "00", "[26]\\d{8}|88\\d{6,7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["88"]], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[26]|88"]]]], "CN": ["86", "00|1(?:[12]\\d|79)\\d\\d00", "(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}", [7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{5,6})", "$1 $2", ["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]", "(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"], "0$1"], ["(\\d{3})(\\d{5,6})", "$1 $2", ["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]", "(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]", "85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])", "85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["(?:4|80)0"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["10|2(?:[02-57-9]|1[1-9])", "10|2(?:[02-57-9]|1[1-9])", "10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"], "0$1", 1], ["(\\d{3})(\\d{7,8})", "$1 $2", ["9"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["80"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["[3-578]"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["1[3-9]"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["[12]"], "0$1", 1]], "0", 0, "(1(?:[12]\\d|79)\\d\\d)|0", 0, 0, 0, 0, "00"], "CO": ["57", "00(?:4(?:[14]4|56)|[579])", "(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}", [8, 10, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["46"]], ["(\\d{3})(\\d{7})", "$1 $2", ["6|90"], "($1)"], ["(\\d{3})(\\d{7})", "$1 $2", ["3[0-357]|9[14]"]], ["(\\d)(\\d{3})(\\d{7})", "$1-$2-$3", ["1"], "0$1", 0, "$1 $2 $3"]], "0", 0, "0([3579]|4(?:[14]4|56))?"], "CR": ["506", "00", "(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}", [8, 10], [["(\\d{4})(\\d{4})", "$1 $2", ["[2-7]|8[3-9]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[89]"]]], 0, 0, "(19(?:0[0-2468]|1[09]|20|66|77|99))"], "CU": ["53", "119", "(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}", [6, 7, 8, 10], [["(\\d{2})(\\d{4,6})", "$1 $2", ["2[1-4]|[34]"], "(0$1)"], ["(\\d)(\\d{6,7})", "$1 $2", ["7"], "(0$1)"], ["(\\d)(\\d{7})", "$1 $2", ["[56]"], "0$1"], ["(\\d{3})(\\d{7})", "$1 $2", ["8"], "0$1"]], "0"], "CV": ["238", "0", "(?:[2-59]\\d\\d|800)\\d{4}", [7], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2-589]"]]]], "CW": ["599", "00", "(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["[3467]"]], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["9[4-8]"]]], 0, 0, 0, 0, 0, "[69]"], "CX": ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", [6, 7, 8, 9, 10, 12], 0, "0", 0, "([59]\\d{7})$|0", "8$1", 0, 0, [["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}", [9]], ["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}", [9]], ["180(?:0\\d{3}|2)\\d{3}", [7, 10]], ["190[0-26]\\d{6}", [10]], 0, 0, 0, 0, ["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", [9]], ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", [6, 8, 10, 12]]], "0011"], "CY": ["357", "00", "(?:[279]\\d|[58]0)\\d{6}", [8], [["(\\d{2})(\\d{6})", "$1 $2", ["[257-9]"]]]], "CZ": ["420", "00", "(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}", [9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-8]|9[015-7]"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["96"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]]]], "DE": ["49", "00", "[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], [["(\\d{2})(\\d{3,13})", "$1 $2", ["3[02]|40|[68]9"], "0$1"], ["(\\d{3})(\\d{3,12})", "$1 $2", ["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1", "2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"], "0$1"], ["(\\d{4})(\\d{2,11})", "$1 $2", ["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]", "[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["138"], "0$1"], ["(\\d{5})(\\d{2,10})", "$1 $2", ["3"], "0$1"], ["(\\d{3})(\\d{5,11})", "$1 $2", ["181"], "0$1"], ["(\\d{3})(\\d)(\\d{4,10})", "$1 $2 $3", ["1(?:3|80)|9"], "0$1"], ["(\\d{3})(\\d{7,8})", "$1 $2", ["1[67]"], "0$1"], ["(\\d{3})(\\d{7,12})", "$1 $2", ["8"], "0$1"], ["(\\d{5})(\\d{6})", "$1 $2", ["185", "1850", "18500"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{4})(\\d{7})", "$1 $2", ["18[68]"], "0$1"], ["(\\d{4})(\\d{7})", "$1 $2", ["15[1279]"], "0$1"], ["(\\d{5})(\\d{6})", "$1 $2", ["15[03568]", "15(?:[0568]|3[13])"], "0$1"], ["(\\d{3})(\\d{8})", "$1 $2", ["18"], "0$1"], ["(\\d{3})(\\d{2})(\\d{7,8})", "$1 $2 $3", ["1(?:6[023]|7)"], "0$1"], ["(\\d{4})(\\d{2})(\\d{7})", "$1 $2 $3", ["15[279]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{8})", "$1 $2 $3", ["15"], "0$1"]], "0"], "DJ": ["253", "00", "(?:2\\d|77)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[27]"]]]], "DK": ["45", "00", "[2-9]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-9]"]]]], "DM": ["1", "011", "(?:[58]\\d\\d|767|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "767$1", 0, "767"], "DO": ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "8001|8[024]9"], "DZ": ["213", "00", "(?:[1-4]|[5-79]\\d|80)\\d{7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-4]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["9"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-8]"], "0$1"]], "0"], "EC": ["593", "00", "1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}", [8, 9, 10, 11], [["(\\d)(\\d{3})(\\d{4})", "$1 $2-$3", ["[2-7]"], "(0$1)", 0, "$1-$2-$3"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["1"]]], "0"], "EE": ["372", "00", "8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}", [7, 8, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88", "[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]], ["(\\d{4})(\\d{3,4})", "$1 $2", ["[45]|8(?:00|[1-49])", "[45]|8(?:00[1-9]|[1-49])"]], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["7"]], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]]]], "EG": ["20", "00", "[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}", [8, 9, 10], [["(\\d)(\\d{7,8})", "$1 $2", ["[23]"], "0$1"], ["(\\d{2})(\\d{6,7})", "$1 $2", ["1[35]|[4-6]|8[2468]|9[235-7]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{8})", "$1 $2", ["1"], "0$1"]], "0"], "EH": ["212", "00", "[5-8]\\d{8}", [9], 0, "0", 0, 0, 0, 0, 0, [["528[89]\\d{5}"], ["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"], ["80[0-7]\\d{6}"], ["89\\d{7}"], 0, 0, 0, 0, ["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]], "ER": ["291", "00", "[178]\\d{6}", [7], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[178]"], "0$1"]], "0"], "ES": ["34", "00", "[5-9]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]00"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-9]"]]]], "ET": ["251", "00", "(?:11|[2-579]\\d)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-579]"], "0$1"]], "0"], "FI": ["358", "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", "[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}", [5, 6, 7, 8, 9, 10, 11, 12], [["(\\d{5})", "$1", ["20[2-59]"], "0$1"], ["(\\d{3})(\\d{3,7})", "$1 $2", ["(?:[1-3]0|[68])0|70[07-9]"], "0$1"], ["(\\d{2})(\\d{4,8})", "$1 $2", ["[14]|2[09]|50|7[135]"], "0$1"], ["(\\d{2})(\\d{6,10})", "$1 $2", ["7"], "0$1"], ["(\\d)(\\d{4,9})", "$1 $2", ["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"], "0$1"]], "0", 0, 0, 0, 0, "1[03-79]|[2-9]", 0, "00"], "FJ": ["679", "0(?:0|52)", "45\\d{5}|(?:0800\\d|[235-9])\\d{6}", [7, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["[235-9]|45"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "FK": ["500", "00", "[2-7]\\d{4}", [5]], "FM": ["691", "00", "(?:[39]\\d\\d|820)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[389]"]]]], "FO": ["298", "00", "[2-9]\\d{5}", [6], [["(\\d{6})", "$1", ["[2-9]"]]], 0, 0, "(10(?:01|[12]0|88))"], "FR": ["33", "00", "[1-9]\\d{8}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0 $1"], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[1-79]"], "0$1"]], "0"], "GA": ["241", "00", "(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}", [7, 8], [["(\\d)(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-7]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["0"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["11|[67]"], "0$1"]], 0, 0, "0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})", "$1"], "GB": ["44", "00", "[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}", [7, 9, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["800", "8001", "80011", "800111", "8001111"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["845", "8454", "84546", "845464"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["800"], "0$1"], ["(\\d{5})(\\d{4,5})", "$1 $2", ["1(?:38|5[23]|69|76|94)", "1(?:(?:38|69)7|5(?:24|39)|768|946)", "1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"], "0$1"], ["(\\d{4})(\\d{5,6})", "$1 $2", ["1(?:[2-69][02-9]|[78])"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["[25]|7(?:0|6[02-9])", "[25]|7(?:0|6(?:[03-9]|2[356]))"], "0$1"], ["(\\d{4})(\\d{6})", "$1 $2", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1389]"], "0$1"]], "0", 0, "0|180020", 0, 0, 0, [["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}", [9, 10]], ["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}", [10]], ["80[08]\\d{7}|800\\d{6}|8001111"], ["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d", [7, 10]], ["70\\d{8}", [10]], 0, ["(?:3[0347]|55)\\d{8}", [10]], ["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", [10]], ["56\\d{8}", [10]]], 0, " x"], "GD": ["1", "011", "(?:473|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "473$1", 0, "473"], "GE": ["995", "00", "(?:[3-57]\\d\\d|800)\\d{6}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["70"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["32"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[57]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[348]"], "0$1"]], "0"], "GF": ["594", "00", "(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-7]|80[6-9]|9[47]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[89]"], "0$1"]], "0"], "GG": ["44", "00", "(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?", [7, 9, 10], 0, "0", 0, "([25-9]\\d{5})$|0|180020", "1481$1", 0, 0, [["1481[25-9]\\d{5}", [10]], ["7(?:(?:781|839)\\d|911[17])\\d{5}", [10]], ["80[08]\\d{7}|800\\d{6}|8001111"], ["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d", [7, 10]], ["70\\d{8}", [10]], 0, ["(?:3[0347]|55)\\d{8}", [10]], ["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", [10]], ["56\\d{8}", [10]]]], "GH": ["233", "00", "[235]\\d{8}|800\\d{5,6}", [8, 9], [["(\\d{3})(\\d{5})", "$1 $2", ["8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2358]"], "0$1"]], "0"], "GI": ["350", "00", "(?:[25]\\d|60)\\d{6}", [8], [["(\\d{3})(\\d{5})", "$1 $2", ["2"]]]], "GL": ["299", "00", "(?:19|[2-689]\\d|70)\\d{4}", [6], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["19|[2-9]"]]]], "GM": ["220", "00", "[2-9]\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]]], "GN": ["224", "00", "722\\d{6}|(?:3|6\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["3"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[67]"]]]], "GP": ["590", "00", "7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-79]|80[6-9]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\d)\\d{4}"], ["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"], ["80[0-5]\\d{6}"], ["8[129]\\d{7}"], 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]], "GQ": ["240", "00", "222\\d{6}|(?:3\\d|55|[89]0)\\d{7}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235]"]], ["(\\d{3})(\\d{6})", "$1 $2", ["[89]"]]]], "GR": ["30", "00", "5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}", [10, 11, 12], [["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["21|7"]], ["(\\d{4})(\\d{6})", "$1 $2", ["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2689]"]], ["(\\d{3})(\\d{3,4})(\\d{5})", "$1 $2 $3", ["8"]]]], "GT": ["502", "00", "80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}", [8, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["[2-8]"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]]]], "GU": ["1", "011", "(?:[58]\\d\\d|671|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "671$1", 0, "671"], "GW": ["245", "00", "[49]\\d{8}|4\\d{6}", [7, 9], [["(\\d{3})(\\d{4})", "$1 $2", ["40"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[49]"]]]], "GY": ["592", "001", "(?:[2-8]\\d{3}|9008)\\d{3}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]]], "HK": ["852", "00(?:30|5[09]|[126-9]?)", "8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}", [5, 6, 7, 8, 9, 11], [["(\\d{3})(\\d{2,5})", "$1 $2", ["900", "9003"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{3})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "HN": ["504", "00", "8\\d{10}|[237-9]\\d{7}", [8, 11], [["(\\d{4})(\\d{4})", "$1-$2", ["[237-9]"]]]], "HR": ["385", "00", "[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}", [7, 8, 9], [["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["6[01]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{4})(\\d{3})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["6|7[245]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-57]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"], "0$1"]], "0"], "HT": ["509", "00", "[2-589]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["[2-589]"]]]], "HU": ["36", "00", "[235-7]\\d{8}|[1-9]\\d{7}", [8, 9], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "(06 $1)"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"], "(06 $1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-9]"], "06 $1"]], "06"], "ID": ["62", "00[89]", "00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}", [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["15"]], ["(\\d{2})(\\d{5,9})", "$1 $2", ["2[124]|[36]1"], "(0$1)"], ["(\\d{3})(\\d{5,7})", "$1 $2", ["800"], "0$1"], ["(\\d{3})(\\d{5,8})", "$1 $2", ["[2-79]"], "(0$1)"], ["(\\d{3})(\\d{3,4})(\\d{3})", "$1-$2-$3", ["8[1-35-9]"], "0$1"], ["(\\d{3})(\\d{6,8})", "$1 $2", ["1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["804"], "0$1"], ["(\\d{3})(\\d)(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["80"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1-$2-$3", ["8"], "0$1"]], "0"], "IE": ["353", "00", "(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}", [7, 8, 9, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["2[24-9]|47|58|6[237-9]|9[35-9]"], "(0$1)"], ["(\\d{3})(\\d{5})", "$1 $2", ["[45]0"], "(0$1)"], ["(\\d)(\\d{3,4})(\\d{4})", "$1 $2 $3", ["1"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2569]|4[1-69]|7[14]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["70"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["81"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[78]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["4"], "(0$1)"], ["(\\d{2})(\\d)(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], "IL": ["972", "0(?:0|1[2-9])", "1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}", [7, 8, 9, 10, 11, 12], [["(\\d{4})(\\d{3})", "$1-$2", ["125"]], ["(\\d{4})(\\d{2})(\\d{2})", "$1-$2-$3", ["121"]], ["(\\d)(\\d{3})(\\d{4})", "$1-$2-$3", ["[2-489]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["[57]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1-$2-$3", ["12"]], ["(\\d{4})(\\d{6})", "$1-$2", ["159"]], ["(\\d)(\\d{3})(\\d{3})(\\d{3})", "$1-$2-$3-$4", ["1[7-9]"]], ["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})", "$1-$2 $3-$4", ["15"]]], "0"], "IM": ["44", "00", "1624\\d{6}|(?:[3578]\\d|90)\\d{8}", [10], 0, "0", 0, "([25-8]\\d{5})$|0|180020", "1624$1", 0, "74576|(?:16|7[56])24"], "IN": ["91", "00", "(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}", [8, 9, 10, 11, 12, 13], [["(\\d{8})", "$1", ["5(?:0|2[23]|3[03]|[67]1|88)", "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)", "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"], 0, 1], ["(\\d{4})(\\d{4,5})", "$1 $2", ["180", "1800"], 0, 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["140"], 0, 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["11|2[02]|33|4[04]|79[1-7]|80[2-46]", "11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])", "11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]", "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]", "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"], "0$1", 1], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807", "1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]", "1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689])\\d|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"], "0$1", 1], ["(\\d{5})(\\d{5})", "$1 $2", ["16|[6-9]"], "0$1", 1], ["(\\d{4})(\\d{2,4})(\\d{4})", "$1 $2 $3", ["18[06]", "18[06]0"], 0, 1], ["(\\d{4})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["18"], 0, 1]], "0"], "IO": ["246", "00", "3\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["3"]]]], "IQ": ["964", "00", "(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-6]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"]], "0"], "IR": ["98", "00", "[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}", [4, 5, 6, 7, 10], [["(\\d{4,5})", "$1", ["96"], "0$1"], ["(\\d{2})(\\d{4,5})", "$1 $2", ["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["[1-8]"], "0$1"]], "0"], "IS": ["354", "00|1(?:0(?:01|[12]0)|100)", "(?:38\\d|[4-9])\\d{6}", [7, 9], [["(\\d{3})(\\d{4})", "$1 $2", ["[4-9]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["3"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "IT": ["39", "00", "0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?", [6, 7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{4,6})", "$1 $2", ["0[26]"]], ["(\\d{3})(\\d{3,6})", "$1 $2", ["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])", "0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]], ["(\\d{4})(\\d{2,6})", "$1 $2", ["0(?:[13-579][2-46-8]|8[236-8])"]], ["(\\d{4})(\\d{4})", "$1 $2", ["894"]], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[26]|5"]], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["1(?:44|[679])|[378]|43"]], ["(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[13-57-9][0159]|14"]], ["(\\d{2})(\\d{4})(\\d{5})", "$1 $2 $3", ["0[26]"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["[03]"]]], 0, 0, 0, 0, 0, 0, [["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"], ["3[2-9]\\d{7,8}|(?:31|43)\\d{8}", [9, 10]], ["80(?:0\\d{3}|3)\\d{3}", [6, 9]], ["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}", [6, 8, 9, 10]], ["1(?:78\\d|99)\\d{6}", [9, 10]], ["3[2-8]\\d{9,10}", [11, 12]], 0, 0, ["55\\d{8}", [10]], ["84(?:[08]\\d{3}|[17])\\d{3}", [6, 9]]]], "JE": ["44", "00", "1534\\d{6}|(?:[3578]\\d|90)\\d{8}", [10], 0, "0", 0, "([0-24-8]\\d{5})$|0|180020", "1534$1", 0, 0, [["1534[0-24-8]\\d{5}"], ["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"], ["80(?:07(?:35|81)|8901)\\d{4}"], ["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"], ["701511\\d{4}"], 0, ["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"], ["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"], ["56\\d{8}"]]], "JM": ["1", "011", "(?:[58]\\d\\d|658|900)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "658|876"], "JO": ["962", "00", "(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}", [8, 9], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2356]|87"], "(0$1)"], ["(\\d{3})(\\d{5,6})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["70"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[47]"], "0$1"]], "0"], "JP": ["81", "010", "00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}", [8, 9, 10, 11, 12, 13, 14, 15, 16, 17], [["(\\d{3})(\\d{3})(\\d{3})", "$1-$2-$3", ["(?:12|57|99)0"], "0$1"], ["(\\d{4})(\\d)(\\d{4})", "$1-$2-$3", ["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])", "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]", "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["60"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1-$2-$3", ["3|4(?:2[09]|7[01])|6[1-9]", "3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])", "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]", "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{4})", "$1-$2-$3", ["[14]|[289][2-9]|5[3-9]|7[2-4679]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["800"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2-$3", ["[25-9]"], "0$1"]], "0", 0, "(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0", "$1"], "KE": ["254", "000", "(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}", [7, 8, 9, 10], [["(\\d{2})(\\d{5,7})", "$1 $2", ["[24-6]"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["[17]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[89]"], "0$1"]], "0"], "KG": ["996", "00", "8\\d{9}|[235-9]\\d{8}", [9, 10], [["(\\d{4})(\\d{5})", "$1 $2", ["3(?:1[346]|[24-79])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235-79]|88"], "0$1"], ["(\\d{3})(\\d{3})(\\d)(\\d{2,3})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], "KH": ["855", "00[14-9]", "1\\d{9}|[1-9]\\d{7,8}", [8, 9, 10], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-9]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0"], "KI": ["686", "00", "(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}", [5, 8], 0, "0"], "KM": ["269", "00", "[3478]\\d{6}", [7], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[3478]"]]]], "KN": ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "869$1", 0, "869"], "KP": ["850", "00|99", "85\\d{6}|(?:19\\d|[2-7])\\d{7}", [8, 10], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-7]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"]], "0"], "KR": ["82", "00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))", "00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}", [5, 6, 8, 9, 10, 11, 12, 13, 14], [["(\\d{2})(\\d{3,4})", "$1-$2", ["(?:3[1-3]|[46][1-4]|5[1-5])1"], "0$1"], ["(\\d{4})(\\d{4})", "$1-$2", ["1"]], ["(\\d)(\\d{3,4})(\\d{4})", "$1-$2-$3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["[36]0|8"], "0$1"], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1-$2-$3", ["[1346]|5[1-5]"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2-$3", ["[57]"], "0$1"], ["(\\d{2})(\\d{5})(\\d{4})", "$1-$2-$3", ["5"], "0$1"]], "0", 0, "0(8(?:[1-46-8]|5\\d\\d))?"], "KW": ["965", "00", "18\\d{5}|(?:[2569]\\d|41)\\d{6}", [7, 8], [["(\\d{4})(\\d{3,4})", "$1 $2", ["[169]|2(?:[235]|4[1-35-9])|52"]], ["(\\d{3})(\\d{5})", "$1 $2", ["[245]"]]]], "KY": ["1", "011", "(?:345|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "345$1", 0, "345"], "KZ": ["7", "810", "8\\d{13}|[78]\\d{9}", [10, 14], 0, "8", 0, 0, 0, 0, "7", 0, "8~10"], "LA": ["856", "00", "[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}", [8, 9, 10], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["2[13]|3[14]|[4-8]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["3"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[23]"], "0$1"]], "0"], "LB": ["961", "00", "[27-9]\\d{7}|[13-9]\\d{6}", [7, 8], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[27-9]"]]], "0"], "LC": ["1", "011", "(?:[58]\\d\\d|758|900)\\d{7}", [10], 0, "1", 0, "([2-8]\\d{6})$|1", "758$1", 0, "758"], "LI": ["423", "00", "[68]\\d{8}|(?:[2378]\\d|90)\\d{5}", [7, 9], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2379]|8(?:0[09]|7)", "[2379]|8(?:0(?:02|9)|7)"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["69"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]]], "0", 0, "(1001)|0"], "LK": ["94", "00", "[1-9]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[1-689]"], "0$1"]], "0"], "LR": ["231", "00", "(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}", [7, 8, 9], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["4[67]|[56]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-578]"], "0$1"]], "0"], "LS": ["266", "00", "(?:[256]\\d\\d|800)\\d{5}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[2568]"]]]], "LT": ["370", "00", "(?:[3469]\\d|52|[78]0)\\d{6}", [8], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["52[0-7]"], "(0-$1)", 1], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[7-9]"], "0 $1", 1], ["(\\d{2})(\\d{6})", "$1 $2", ["37|4(?:[15]|6[1-8])"], "(0-$1)", 1], ["(\\d{3})(\\d{5})", "$1 $2", ["[3-6]"], "(0-$1)", 1]], "0", 0, "[08]"], "LU": ["352", "00", "35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}", [4, 5, 6, 7, 8, 9, 10, 11], [["(\\d{2})(\\d{3})", "$1 $2", ["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]], ["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["20[2-689]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", "$1 $2 $3 $4", ["20"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})", "$1 $2 $3 $4", ["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["80[01]|90[015]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["20"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", "$1 $2 $3 $4 $5", ["20"]]], 0, 0, "(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"], "LV": ["371", "00", "(?:[268]\\d|78|90)\\d{6}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2679]|8[01]"]]]], "LY": ["218", "00", "[2-9]\\d{8}", [9], [["(\\d{2})(\\d{7})", "$1-$2", ["[2-9]"], "0$1"]], "0"], "MA": ["212", "00", "[5-8]\\d{8}", [9], [["(\\d{4})(\\d{5})", "$1-$2", ["892"], "0$1"], ["(\\d{2})(\\d{7})", "$1-$2", ["8(?:0[0-7]|9)"], "0$1"], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[5-8]"], "0$1"]], "0", 0, 0, 0, 0, "[5-8]"], "MC": ["377", "00", "(?:[3489]|[67]\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["4"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[389]"]], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[67]"], "0$1"]], "0"], "MD": ["373", "00", "(?:[235-7]\\d|[89]0)\\d{6}", [8], [["(\\d{3})(\\d{5})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["22|3"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[25-7]"], "0$1"]], "0"], "ME": ["382", "00", "(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-9]"], "0$1"]], "0"], "MF": ["590", "00", "7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"], ["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"], ["80[0-5]\\d{6}"], ["8[129]\\d{7}"], 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]], "MG": ["261", "00", "[23]\\d{8}", [9], [["(\\d{2})(\\d{2})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["[23]"], "0$1"]], "0", 0, "([24-9]\\d{6})$|0", "20$1"], "MH": ["692", "011", "329\\d{4}|(?:[256]\\d|45)\\d{5}", [7], [["(\\d{3})(\\d{4})", "$1-$2", ["[2-6]"]]], "1"], "MK": ["389", "00", "[2-578]\\d{7}", [8], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["2|34[47]|4(?:[37]7|5[47]|64)"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[347]"], "0$1"], ["(\\d{3})(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[58]"], "0$1"]], "0"], "ML": ["223", "00", "[24-9]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24-9]"]]]], "MM": ["95", "00", "1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}", [6, 7, 8, 9, 10], [["(\\d)(\\d{2})(\\d{3})", "$1 $2 $3", ["16|2"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"], "0$1"], ["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[12]|452|678|86", "[12]|452|6788|86"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[4-7]|8[1-35]"], "0$1"], ["(\\d)(\\d{3})(\\d{4,6})", "$1 $2 $3", ["9(?:2[0-4]|[35-9]|4[137-9])"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["92"], "0$1"], ["(\\d)(\\d{5})(\\d{4})", "$1 $2 $3", ["9"], "0$1"]], "0"], "MN": ["976", "001", "[12]\\d{7,9}|[5-9]\\d{7}", [8, 9, 10], [["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["11|2[16]"], "0$1"], ["(\\d{4})(\\d{4})", "$1 $2", ["[5-9]"]], ["(\\d{3})(\\d{5,6})", "$1 $2", ["[12]2[1-3]"], "0$1"], ["(\\d{4})(\\d{5,6})", "$1 $2", ["[12](?:27|3[2-8]|4[2-68]|5[1-4689])", "[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"], "0$1"], ["(\\d{5})(\\d{4,5})", "$1 $2", ["[12]"], "0$1"]], "0"], "MO": ["853", "00", "0800\\d{3}|(?:28|[68]\\d)\\d{6}", [7, 8], [["(\\d{4})(\\d{3})", "$1 $2", ["0"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[268]"]]]], "MP": ["1", "011", "[58]\\d{9}|(?:67|90)0\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "670$1", 0, "670"], "MQ": ["596", "00", "7091\\d{5}|(?:[56]9|[89]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-79]|8(?:0[6-9]|[36])"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], "MR": ["222", "00", "(?:[2-4]\\d\\d|800)\\d{5}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-48]"]]]], "MS": ["1", "011", "(?:[58]\\d\\d|664|900)\\d{7}", [10], 0, "1", 0, "([34]\\d{6})$|1", "664$1", 0, "664"], "MT": ["356", "00", "3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[2357-9]"]]]], "MU": ["230", "0(?:0|[24-7]0|3[03])", "(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}", [7, 8, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-46]|8[013]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[57]"]], ["(\\d{5})(\\d{5})", "$1 $2", ["8"]]], 0, 0, 0, 0, 0, 0, 0, "020"], "MV": ["960", "0(?:0|19)", "(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}", [7, 10], [["(\\d{3})(\\d{4})", "$1-$2", ["[34679]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "MW": ["265", "00", "(?:[1289]\\d|31|77)\\d{7}|1\\d{6}", [7, 9], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["1[2-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[137-9]"], "0$1"]], "0"], "MX": ["52", "0[09]", "[2-9]\\d{9}", [10], [["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["33|5[56]|81"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "MY": ["60", "00", "1\\d{8,9}|(?:3\\d|[4-9])\\d{7}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1-$2 $3", ["[4-79]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1-$2 $3", ["1(?:[02469]|[378][1-9]|53)|8", "1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1-$2 $3", ["3"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{4})", "$1-$2-$3-$4", ["1(?:[367]|80)"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2 $3", ["15"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2 $3", ["1"], "0$1"]], "0"], "MZ": ["258", "00", "(?:2|8\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2|8[2-79]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]]]], "NA": ["264", "00", "[68]\\d{7,8}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["88"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["6"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["87"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"]], "0"], "NC": ["687", "00", "(?:050|[2-57-9]\\d\\d)\\d{3}", [6], [["(\\d{2})(\\d{2})(\\d{2})", "$1.$2.$3", ["[02-57-9]"]]]], "NE": ["227", "00", "[027-9]\\d{7}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["08"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[089]|2[013]|7[0467]"]]]], "NF": ["672", "00", "[13]\\d{5}", [6], [["(\\d{2})(\\d{4})", "$1 $2", ["1[0-3]"]], ["(\\d)(\\d{5})", "$1 $2", ["[13]"]]], 0, 0, "([0-258]\\d{4})$", "3$1"], "NG": ["234", "009", "(?:20|9\\d)\\d{8}|[78]\\d{9,13}", [10, 11, 12, 13, 14], [["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[7-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["20[129]"], "0$1"], ["(\\d{4})(\\d{2})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["[78]"], "0$1"], ["(\\d{3})(\\d{5})(\\d{5,6})", "$1 $2 $3", ["[78]"], "0$1"]], "0"], "NI": ["505", "00", "(?:1800|[25-8]\\d{3})\\d{4}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[125-8]"]]]], "NL": ["31", "00", "(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}", [5, 6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{4,7})", "$1 $2", ["[89]0"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["66"], "0$1"], ["(\\d)(\\d{8})", "$1 $2", ["6"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-578]|91"], "0$1"], ["(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3", ["9"], "0$1"]], "0"], "NO": ["47", "00", "(?:0|[2-9]\\d{3})\\d{4}", [5, 8], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-79]"]]], 0, 0, 0, 0, 0, "[02-689]|7[0-8]"], "NP": ["977", "00", "(?:1\\d|9)\\d{9}|[1-9]\\d{7}", [8, 10, 11], [["(\\d)(\\d{7})", "$1-$2", ["1[2-6]"], "0$1"], ["(\\d{2})(\\d{6})", "$1-$2", ["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"], "0$1"], ["(\\d{3})(\\d{7})", "$1-$2", ["9"]]], "0"], "NR": ["674", "00", "(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[24-9]"]]]], "NU": ["683", "00", "(?:[4-7]|888\\d)\\d{3}", [4, 7], [["(\\d{3})(\\d{4})", "$1 $2", ["8"]]]], "NZ": ["64", "0(?:0|161)", "[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}", [5, 6, 7, 8, 9, 10], [["(\\d{2})(\\d{3,8})", "$1 $2", ["8[1-79]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["50[036-8]|8|90", "50(?:[0367]|88)|8|90"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["24|[346]|7[2-57-9]|9[2-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2(?:10|74)|[589]"], "0$1"], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["1|2[028]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,5})", "$1 $2 $3", ["2(?:[169]|7[0-35-9])|7"], "0$1"]], "0", 0, 0, 0, 0, 0, 0, "00"], "OM": ["968", "00", "(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}", [7, 8, 9], [["(\\d{3})(\\d{4,6})", "$1 $2", ["[58]"]], ["(\\d{2})(\\d{6})", "$1 $2", ["2"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[179]"]]]], "PA": ["507", "00", "(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}", [7, 8, 10, 11], [["(\\d{3})(\\d{4})", "$1-$2", ["[1-57-9]"]], ["(\\d{4})(\\d{4})", "$1-$2", ["[68]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]]]], "PE": ["51", "00|19(?:1[124]|77|90)00", "(?:[14-8]|9\\d)\\d{7}", [8, 9], [["(\\d{3})(\\d{5})", "$1 $2", ["80"], "(0$1)"], ["(\\d)(\\d{7})", "$1 $2", ["1"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[4-8]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"]]], "0", 0, 0, 0, 0, 0, 0, "00", " Anexo "], "PF": ["689", "00", "4\\d{5}(?:\\d{2})?|8\\d{7,8}", [6, 8, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["44"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["4|8[7-9]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]]]], "PG": ["675", "00|140[1-3]", "(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["18|[2-69]|85"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[78]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "PH": ["63", "00", "(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}", [6, 8, 9, 10, 11, 12, 13], [["(\\d)(\\d{5})", "$1 $2", ["2"], "(0$1)"], ["(\\d{4})(\\d{4,6})", "$1 $2", ["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2", "3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"], "(0$1)"], ["(\\d{5})(\\d{4})", "$1 $2", ["346|4(?:27|9[35])|883", "3469|4(?:279|9(?:30|56))|8834"], "(0$1)"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[3-7]|8[2-8]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], ["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["1"]]], "0"], "PK": ["92", "00", "122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{2,7})", "$1 $2 $3", ["[89]0"], "0$1"], ["(\\d{4})(\\d{5})", "$1 $2", ["1"]], ["(\\d{3})(\\d{6,7})", "$1 $2", ["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])", "9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"], "(0$1)"], ["(\\d{2})(\\d{7,8})", "$1 $2", ["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"], "(0$1)"], ["(\\d{5})(\\d{5})", "$1 $2", ["58"], "(0$1)"], ["(\\d{3})(\\d{7})", "$1 $2", ["3"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[24-9]"], "(0$1)"]], "0"], "PL": ["48", "00", "(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}", [6, 7, 8, 9, 10], [["(\\d{5})", "$1", ["19"]], ["(\\d{3})(\\d{3})", "$1 $2", ["11|20|64"]], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1", "30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["64"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[2-8]|[2-7]|8[1-79]|9[145]"]], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["8"]]]], "PM": ["508", "00", "[78]\\d{8}|[2-9]\\d{5}", [6, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["7"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], "PR": ["1", "011", "(?:[589]\\d\\d|787)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "787|939"], "PS": ["970", "00", "[2489]2\\d{6}|(?:1\\d|5)\\d{8}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2489]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0"], "PT": ["351", "00", "1693\\d{5}|(?:[26-9]\\d|30)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["2[12]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["16|[236-9]"]]]], "PW": ["680", "01[12]", "(?:[24-8]\\d\\d|345|900)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]]], "PY": ["595", "00", "[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}", [6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{3,6})", "$1 $2", ["[2-9]0"], "0$1"], ["(\\d{2})(\\d{5})", "$1 $2", ["3[289]|4[246-8]|61|7[1-3]|8[1-36]"], "(0$1)"], ["(\\d{3})(\\d{4,5})", "$1 $2", ["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["87"]], ["(\\d{3})(\\d{6})", "$1 $2", ["9(?:[5-79]|8[1-7])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-8]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["9"]]], "0"], "QA": ["974", "00", "800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}", [7, 8, 9, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["2[136]|8"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[3-7]"]]]], "RE": ["262", "00", "709\\d{6}|(?:26|[689]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[26-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["2631[0-6]\\d{4}|26(?:2\\d|30|88)\\d{5}"], ["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"], ["80\\d{7}"], ["89[1-37-9]\\d{6}"], 0, 0, 0, 0, ["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"], ["8(?:1[019]|2[0156]|84|90)\\d{6}"]]], "RO": ["40", "00", "(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}", [6, 9], [["(\\d{3})(\\d{3})", "$1 $2", ["2[3-6]", "2[3-6]\\d9"], "0$1"], ["(\\d{2})(\\d{4})", "$1 $2", ["219|31"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[23]1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[236-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, 0, 0, " int "], "RS": ["381", "00", "38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}", [6, 7, 8, 9, 10, 11, 12], [["(\\d{3})(\\d{3,9})", "$1 $2", ["(?:2[389]|39)0|[7-9]"], "0$1"], ["(\\d{2})(\\d{5,10})", "$1 $2", ["[1-36]"], "0$1"]], "0"], "RU": ["7", "810", "8\\d{13}|[347-9]\\d{9}", [10, 14], [["(\\d{4})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["7(?:1[0-8]|2[1-9])", "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))", "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"], "8 ($1)", 1], ["(\\d{5})(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["7(?:1[0-68]|2[1-9])", "7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))", "7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"], "8 ($1)", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "8 ($1)", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[349]|8(?:[02-7]|1[1-8])"], "8 ($1)", 1], ["(\\d{4})(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["8"], "8 ($1)"]], "8", 0, 0, 0, 0, "[3489]", 0, "8~10"], "RW": ["250", "00", "(?:06|[27]\\d\\d|[89]00)\\d{6}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["0"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[7-9]"], "0$1"]], "0"], "SA": ["966", "00", "(?:[15]\\d|800|92)\\d{7}", [9, 10], [["(\\d{4})(\\d{5})", "$1 $2", ["9"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]]], "0"], "SB": ["677", "0[01]", "[6-9]\\d{6}|[1-6]\\d{4}", [5, 7], [["(\\d{2})(\\d{5})", "$1 $2", ["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]], "SC": ["248", "010|0[0-2]", "(?:[2489]\\d|64)\\d{5}", [7], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[246]|9[57]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "SD": ["249", "00", "[19]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[19]"], "0$1"]], "0"], "SE": ["46", "00", "(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}", [6, 7, 8, 9, 10, 12], [["(\\d{2})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["20"], "0$1", 0, "$1 $2 $3"], ["(\\d{3})(\\d{4})", "$1-$2", ["9(?:00|39|44|9)"], "0$1", 0, "$1 $2"], ["(\\d{2})(\\d{3})(\\d{2})", "$1-$2 $3", ["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"], "0$1", 0, "$1 $2 $3"], ["(\\d)(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], "0$1", 0, "$1 $2 $3"], ["(\\d{3})(\\d{2,3})(\\d{3})", "$1-$2 $3", ["9(?:00|39|44)"], "0$1", 0, "$1 $2 $3"], ["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["10|7"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{3})", "$1-$2 $3 $4", ["9"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1-$2 $3 $4 $5", ["[26]"], "0$1", 0, "$1 $2 $3 $4 $5"]], "0"], "SG": ["65", "0[0-3]\\d", "(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}", [8, 10, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["[369]|8(?:0[1-9]|[1-9])"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]], ["(\\d{4})(\\d{4})(\\d{3})", "$1 $2 $3", ["7"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]]]], "SH": ["290", "00", "(?:[256]\\d|8)\\d{3}", [4, 5], 0, 0, 0, 0, 0, 0, "[256]"], "SI": ["386", "00|10(?:22|66|88|99)", "[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}", [5, 6, 7, 8], [["(\\d{2})(\\d{3,6})", "$1 $2", ["8[09]|9"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["59|8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37][01]|4[0139]|51|6"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-57]"], "(0$1)"]], "0", 0, 0, 0, 0, 0, 0, "00"], "SJ": ["47", "00", "0\\d{4}|(?:[489]\\d|79)\\d{6}", [5, 8], 0, 0, 0, 0, 0, 0, "79"], "SK": ["421", "00", "[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}", [6, 7, 9], [["(\\d)(\\d{2})(\\d{3,4})", "$1 $2 $3", ["21"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["[3-5][1-8]1", "[3-5][1-8]1[67]"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["2"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[689]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[3-5]"], "0$1"]], "0"], "SL": ["232", "00", "(?:[237-9]\\d|66)\\d{6}", [8], [["(\\d{2})(\\d{6})", "$1 $2", ["[236-9]"], "(0$1)"]], "0"], "SM": ["378", "00", "(?:0549|[5-7]\\d)\\d{6}", [8, 10], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-7]"]], ["(\\d{4})(\\d{6})", "$1 $2", ["0"]]], 0, 0, "([89]\\d{5})$", "0549$1"], "SN": ["221", "00", "(?:[378]\\d|93)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[379]"]]]], "SO": ["252", "00", "[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}", [6, 7, 8, 9], [["(\\d{2})(\\d{4})", "$1 $2", ["8[125]"]], ["(\\d{6})", "$1", ["[134]"]], ["(\\d)(\\d{6})", "$1 $2", ["[15]|2[0-79]|3[0-46-8]|4[0-7]"]], ["(\\d)(\\d{7})", "$1 $2", ["(?:2|90)4|[67]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[348]|64|79|90"]], ["(\\d{2})(\\d{5,7})", "$1 $2", ["1|28|6[0-35-9]|7[67]|9[2-9]"]]], "0"], "SR": ["597", "00", "(?:[2-5]|[6-9]\\d)\\d{5}", [6, 7], [["(\\d{2})(\\d{2})(\\d{2})", "$1-$2-$3", ["56"]], ["(\\d{3})(\\d{3})", "$1-$2", ["[2-5]"]], ["(\\d{3})(\\d{4})", "$1-$2", ["[6-9]"]]]], "SS": ["211", "00", "[19]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[19]"], "0$1"]], "0"], "ST": ["239", "00", "(?:22|9\\d)\\d{5}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[29]"]]]], "SV": ["503", "00", "[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?", [7, 8, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["[89]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[25-7]"]], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["[89]"]]]], "SX": ["1", "011", "7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "(5\\d{6})$|1", "721$1", 0, "721"], "SY": ["963", "00", "[1-359]\\d{8}|[1-5]\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-4]|5[1-3]"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[59]"], "0$1", 1]], "0"], "SZ": ["268", "00", "0800\\d{4}|(?:[237]\\d|900)\\d{6}", [8, 9], [["(\\d{4})(\\d{4})", "$1 $2", ["[0237]"]], ["(\\d{5})(\\d{4})", "$1 $2", ["9"]]]], "TA": ["290", "00", "8\\d{3}", [4], 0, 0, 0, 0, 0, 0, "8"], "TC": ["1", "011", "(?:[58]\\d\\d|649|900)\\d{7}", [10], 0, "1", 0, "([2-479]\\d{6})$|1", "649$1", 0, "649"], "TD": ["235", "00|16", "(?:22|[3689]\\d|77)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[236-9]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "TG": ["228", "00", "[279]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[279]"]]]], "TH": ["66", "00[1-9]", "(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}", [8, 9, 10, 13], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[13-9]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0"], "TJ": ["992", "810", "(?:[0-57-9]\\d|66)\\d{7}", [9], [["(\\d{6})(\\d)(\\d{2})", "$1 $2 $3", ["331", "3317"]], ["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["44[02-479]|[34]7"]], ["(\\d{4})(\\d)(\\d{4})", "$1 $2 $3", ["3(?:[1245]|3[12])"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["\\d"]]], 0, 0, 0, 0, 0, 0, 0, "8~10"], "TK": ["690", "00", "[2-47]\\d{3,6}", [4, 5, 6, 7]], "TL": ["670", "00", "7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-489]|70"]], ["(\\d{4})(\\d{4})", "$1 $2", ["7"]]]], "TM": ["993", "810", "(?:[1-6]\\d|71)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["12"], "(8 $1)"], ["(\\d{3})(\\d)(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[1-5]"], "(8 $1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[67]"], "8 $1"]], "8", 0, 0, 0, 0, 0, 0, "8~10"], "TN": ["216", "00", "[2-57-9]\\d{7}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-57-9]"]]]], "TO": ["676", "00", "(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}", [5, 7], [["(\\d{2})(\\d{3})", "$1-$2", ["[2-4]|50|6[09]|7[0-24-69]|8[05]"]], ["(\\d{4})(\\d{3})", "$1 $2", ["0"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[5-9]"]]]], "TR": ["90", "00", "4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}", [7, 10, 12, 13], [["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["512|8[01589]|90"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["5(?:[0-579]|61)", "5(?:[0-579]|61[06])", "5(?:[0-579]|61[06]1)"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24][1-8]|3[1-9]"], "(0$1)", 1], ["(\\d{3})(\\d{3})(\\d{6,7})", "$1 $2 $3", ["80"], "0$1", 1]], "0"], "TT": ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-46-8]\\d{6})$|1", "868$1", 0, "868"], "TV": ["688", "00", "(?:2|7\\d\\d|90)\\d{4}", [5, 6, 7], [["(\\d{2})(\\d{3})", "$1 $2", ["2"]], ["(\\d{2})(\\d{4})", "$1 $2", ["90"]], ["(\\d{2})(\\d{5})", "$1 $2", ["7"]]]], "TW": ["886", "0(?:0[25-79]|19)", "[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}", [7, 8, 9, 10, 11], [["(\\d{2})(\\d)(\\d{4})", "$1 $2 $3", ["202"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["826"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["83"], "0$1"], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["82"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[25]0|37|49|8[09]"], "0$1"], ["(\\d)(\\d{3,4})(\\d{4})", "$1 $2 $3", ["[23568]|4(?:0[02-48]|[1-478])|7[1-9]", "[23568]|4(?:0[2-48]|[1-478])|(?:400|7)[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[49]"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["7"], "0$1"]], "0", 0, 0, 0, 0, 0, 0, 0, "#"], "TZ": ["255", "00[056]", "(?:[25-8]\\d|41|90)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[24]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["5"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[67]"], "0$1"]], "0"], "UA": ["380", "00", "[89]\\d{9}|[3-9]\\d{8}", [9, 10], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]", "6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"], "0$1"], ["(\\d{4})(\\d{5})", "$1 $2", ["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])", "3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[3-7]|89|9[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[89]"], "0$1"]], "0", 0, 0, 0, 0, 0, 0, "0~0"], "UG": ["256", "00[057]", "800\\d{6}|(?:[29]0|[347]\\d)\\d{7}", [9], [["(\\d{4})(\\d{5})", "$1 $2", ["202", "2024"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["[27-9]|4(?:6[45]|[7-9])"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["[34]"], "0$1"]], "0"], "US": ["1", "011", "[2-9]\\d{9}|3\\d{6}", [10], [["(\\d{3})(\\d{4})", "$1-$2", ["310"], 0, 1], ["(\\d{3})(\\d{3})(\\d{4})", "($1) $2-$3", ["[2-9]"], 0, 1, "$1-$2-$3"]], "1", 0, 0, 0, 0, 0, [["(?:274[27]|(?:472|983)[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"], [""], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]], "UY": ["598", "0(?:0|1[3-9]\\d)", "0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13], [["(\\d{4,5})", "$1", ["21"]], ["(\\d{3})(\\d{3,4})", "$1 $2", ["0"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[49]0|8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{4})(\\d{4})", "$1 $2", ["[124]"]], ["(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3 $4", ["0"]]], "0", 0, 0, 0, 0, 0, 0, "00", " int. "], "UZ": ["998", "00", "(?:20|33|[5-9]\\d)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[235-9]"]]]], "VA": ["39", "00", "0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}", [6, 7, 8, 9, 10, 11, 12], 0, 0, 0, 0, 0, 0, "06698"], "VC": ["1", "011", "(?:[58]\\d\\d|784|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "784$1", 0, "784"], "VE": ["58", "00", "[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}", [10], [["(\\d{3})(\\d{7})", "$1-$2", ["[24-689]"], "0$1"]], "0"], "VG": ["1", "011", "(?:284|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-578]\\d{6})$|1", "284$1", 0, "284"], "VI": ["1", "011", "[58]\\d{9}|(?:34|90)0\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "340$1", 0, "340"], "VN": ["84", "00", "[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}", [7, 8, 9, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["80"], "0$1", 1], ["(\\d{4})(\\d{4,6})", "$1 $2", ["1"], 0, 1], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["6"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[357-9]"], "0$1", 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["2[48]"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["2"], "0$1", 1]], "0"], "VU": ["678", "00", "[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}", [5, 7], [["(\\d{3})(\\d{4})", "$1 $2", ["[57-9]"]]]], "WF": ["681", "00", "(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}", [6, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[47-9]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]]]], "WS": ["685", "0", "(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}", [5, 6, 7, 10], [["(\\d{5})", "$1", ["[2-5]|6[1-9]"]], ["(\\d{3})(\\d{3,7})", "$1 $2", ["[68]"]], ["(\\d{2})(\\d{5})", "$1 $2", ["7"]]]], "XK": ["383", "00", "2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{5})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-4]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2|39"], "0$1"], ["(\\d{2})(\\d{7,10})", "$1 $2", ["3"], "0$1"]], "0"], "YE": ["967", "00", "(?:1|7\\d)\\d{7}|[1-7]\\d{6}", [7, 8, 9], [["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-6]|7(?:[24-6]|8[0-7])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["7"], "0$1"]], "0"], "YT": ["262", "00", "(?:639\\d|7093)\\d{5}|(?:26|80|9\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [["26(?:89\\d|9(?:0[0-467]|15|5[0-4]|6\\d|[78]0))\\d{4}"], ["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"], ["80\\d{7}"], 0, 0, 0, 0, 0, ["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]], "ZA": ["27", "00", "[1-79]\\d{8}|8\\d{4,9}", [5, 6, 7, 8, 9, 10], [["(\\d{2})(\\d{3,4})", "$1 $2", ["8[1-4]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["8[1-4]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["860"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"]], "0"], "ZM": ["260", "00", "800\\d{6}|(?:21|[579]\\d|63)\\d{7}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[28]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["[579]"], "0$1"]], "0"], "ZW": ["263", "00", "2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}", [5, 6, 7, 8, 9, 10], [["(\\d{3})(\\d{3,5})", "$1 $2", ["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"], "0$1"], ["(\\d)(\\d{3})(\\d{2,4})", "$1 $2 $3", ["[49]"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["80"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2", "2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)", "2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"], "0$1"], ["(\\d{4})(\\d{6})", "$1 $2", ["8"], "0$1"], ["(\\d{2})(\\d{3,5})", "$1 $2", ["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["29[013-9]|39|54"], "0$1"], ["(\\d{4})(\\d{3,5})", "$1 $2", ["(?:25|54)8", "258|5483"], "0$1"]], "0"] }, "nonGeographic": { "800": ["800", 0, "(?:00|[1-9]\\d)\\d{6}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["\\d"]]], 0, 0, 0, 0, 0, 0, [0, 0, ["(?:00|[1-9]\\d)\\d{6}"]]], "808": ["808", 0, "[1-9]\\d{7}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[1-9]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, 0, ["[1-9]\\d{7}"]]], "870": ["870", 0, "7\\d{11}|[235-7]\\d{8}", [9, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235-7]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"], 0, 0, 0, 0, 0, 0, ["2\\d{8}", [9]]]], "878": ["878", 0, "10\\d{10}", [12], [["(\\d{2})(\\d{5})(\\d{5})", "$1 $2 $3", ["1"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, ["10\\d{10}"]]], "881": ["881", 0, "6\\d{9}|[0-36-9]\\d{8}", [9, 10], [["(\\d)(\\d{3})(\\d{5})", "$1 $2 $3", ["[0-37-9]"]], ["(\\d)(\\d{3})(\\d{5,6})", "$1 $2 $3", ["6"]]], 0, 0, 0, 0, 0, 0, [0, ["6\\d{9}|[0-36-9]\\d{8}"]]], "882": ["882", 0, "[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?", [7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{5})", "$1 $2", ["16|342"]], ["(\\d{2})(\\d{6})", "$1 $2", ["49"]], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["1[36]|9"]], ["(\\d{2})(\\d{4})(\\d{3})", "$1 $2 $3", ["3[23]"]], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["16"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["10|23|3(?:[15]|4[57])|4|5[12]"]], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["34"]], ["(\\d{2})(\\d{4,5})(\\d{5})", "$1 $2 $3", ["[1-35]"]]], 0, 0, 0, 0, 0, 0, [0, ["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}", [7, 8, 9, 10, 12]], 0, 0, 0, ["348[57]\\d{7}", [11]], 0, 0, ["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]], "883": ["883", 0, "(?:[1-4]\\d|51)\\d{6,10}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{2,8})", "$1 $2 $3", ["[14]|2[24-689]|3[02-689]|51[24-9]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["510"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["21"]], ["(\\d{4})(\\d{4})(\\d{4})", "$1 $2 $3", ["51[13]"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[235]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, ["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]], "888": ["888", 0, "\\d{11}", [11], [["(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3"]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, ["\\d{11}"]]], "979": ["979", 0, "[1359]\\d{8}", [9], [["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[1359]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, ["[1359]\\d{8}"]]] } };
|
|
9692
|
+
var metadata_min_json_default = { "version": 4, "country_calling_codes": { "1": ["US", "AG", "AI", "AS", "BB", "BM", "BS", "CA", "DM", "DO", "GD", "GU", "JM", "KN", "KY", "LC", "MP", "MS", "PR", "SX", "TC", "TT", "VC", "VG", "VI"], "7": ["RU", "KZ"], "20": ["EG"], "27": ["ZA"], "30": ["GR"], "31": ["NL"], "32": ["BE"], "33": ["FR"], "34": ["ES"], "36": ["HU"], "39": ["IT", "VA"], "40": ["RO"], "41": ["CH"], "43": ["AT"], "44": ["GB", "GG", "IM", "JE"], "45": ["DK"], "46": ["SE"], "47": ["NO", "SJ"], "48": ["PL"], "49": ["DE"], "51": ["PE"], "52": ["MX"], "53": ["CU"], "54": ["AR"], "55": ["BR"], "56": ["CL"], "57": ["CO"], "58": ["VE"], "60": ["MY"], "61": ["AU", "CC", "CX"], "62": ["ID"], "63": ["PH"], "64": ["NZ"], "65": ["SG"], "66": ["TH"], "81": ["JP"], "82": ["KR"], "84": ["VN"], "86": ["CN"], "90": ["TR"], "91": ["IN"], "92": ["PK"], "93": ["AF"], "94": ["LK"], "95": ["MM"], "98": ["IR"], "211": ["SS"], "212": ["MA", "EH"], "213": ["DZ"], "216": ["TN"], "218": ["LY"], "220": ["GM"], "221": ["SN"], "222": ["MR"], "223": ["ML"], "224": ["GN"], "225": ["CI"], "226": ["BF"], "227": ["NE"], "228": ["TG"], "229": ["BJ"], "230": ["MU"], "231": ["LR"], "232": ["SL"], "233": ["GH"], "234": ["NG"], "235": ["TD"], "236": ["CF"], "237": ["CM"], "238": ["CV"], "239": ["ST"], "240": ["GQ"], "241": ["GA"], "242": ["CG"], "243": ["CD"], "244": ["AO"], "245": ["GW"], "246": ["IO"], "247": ["AC"], "248": ["SC"], "249": ["SD"], "250": ["RW"], "251": ["ET"], "252": ["SO"], "253": ["DJ"], "254": ["KE"], "255": ["TZ"], "256": ["UG"], "257": ["BI"], "258": ["MZ"], "260": ["ZM"], "261": ["MG"], "262": ["RE", "YT"], "263": ["ZW"], "264": ["NA"], "265": ["MW"], "266": ["LS"], "267": ["BW"], "268": ["SZ"], "269": ["KM"], "290": ["SH", "TA"], "291": ["ER"], "297": ["AW"], "298": ["FO"], "299": ["GL"], "350": ["GI"], "351": ["PT"], "352": ["LU"], "353": ["IE"], "354": ["IS"], "355": ["AL"], "356": ["MT"], "357": ["CY"], "358": ["FI", "AX"], "359": ["BG"], "370": ["LT"], "371": ["LV"], "372": ["EE"], "373": ["MD"], "374": ["AM"], "375": ["BY"], "376": ["AD"], "377": ["MC"], "378": ["SM"], "380": ["UA"], "381": ["RS"], "382": ["ME"], "383": ["XK"], "385": ["HR"], "386": ["SI"], "387": ["BA"], "389": ["MK"], "420": ["CZ"], "421": ["SK"], "423": ["LI"], "500": ["FK"], "501": ["BZ"], "502": ["GT"], "503": ["SV"], "504": ["HN"], "505": ["NI"], "506": ["CR"], "507": ["PA"], "508": ["PM"], "509": ["HT"], "590": ["GP", "BL", "MF"], "591": ["BO"], "592": ["GY"], "593": ["EC"], "594": ["GF"], "595": ["PY"], "596": ["MQ"], "597": ["SR"], "598": ["UY"], "599": ["CW", "BQ"], "670": ["TL"], "672": ["NF"], "673": ["BN"], "674": ["NR"], "675": ["PG"], "676": ["TO"], "677": ["SB"], "678": ["VU"], "679": ["FJ"], "680": ["PW"], "681": ["WF"], "682": ["CK"], "683": ["NU"], "685": ["WS"], "686": ["KI"], "687": ["NC"], "688": ["TV"], "689": ["PF"], "690": ["TK"], "691": ["FM"], "692": ["MH"], "850": ["KP"], "852": ["HK"], "853": ["MO"], "855": ["KH"], "856": ["LA"], "880": ["BD"], "886": ["TW"], "960": ["MV"], "961": ["LB"], "962": ["JO"], "963": ["SY"], "964": ["IQ"], "965": ["KW"], "966": ["SA"], "967": ["YE"], "968": ["OM"], "970": ["PS"], "971": ["AE"], "972": ["IL"], "973": ["BH"], "974": ["QA"], "975": ["BT"], "976": ["MN"], "977": ["NP"], "992": ["TJ"], "993": ["TM"], "994": ["AZ"], "995": ["GE"], "996": ["KG"], "998": ["UZ"] }, "countries": { "AC": ["247", "00", "(?:[01589]\\d|[46])\\d{4}", [5, 6]], "AD": ["376", "00", "(?:1|6\\d)\\d{7}|[135-9]\\d{5}", [6, 8, 9], [["(\\d{3})(\\d{3})", "$1 $2", ["[135-9]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["1"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]]]], "AE": ["971", "00", "(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}", [5, 6, 7, 8, 9, 10, 11, 12], [["(\\d{3})(\\d{2,9})", "$1 $2", ["60|8"]], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[236]|[479][2-8]"], "0$1"], ["(\\d{3})(\\d)(\\d{5})", "$1 $2 $3", ["[479]"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["5"], "0$1"]], "0"], "AF": ["93", "00", "[2-7]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-7]"], "0$1"]], "0"], "AG": ["1", "011", "(?:268|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([457]\\d{6})$|1", "268$1", 0, "268"], "AI": ["1", "011", "(?:264|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2457]\\d{6})$|1", "264$1", 0, "264"], "AL": ["355", "00", "(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}", [6, 7, 8, 9], [["(\\d{3})(\\d{3,4})", "$1 $2", ["80|9"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["4[2-6]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2358][2-5]|4"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["[23578]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["6"], "0$1"]], "0"], "AM": ["374", "00", "(?:[1-489]\\d|55|60|77)\\d{6}", [8], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[89]0"], "0 $1"], ["(\\d{3})(\\d{5})", "$1 $2", ["2|3[12]"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["1|47"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[3-9]"], "0$1"]], "0"], "AO": ["244", "00", "[29]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[29]"]]]], "AR": ["54", "00", "(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}", [10, 11], [["(\\d{4})(\\d{2})(\\d{4})", "$1 $2-$3", ["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])", "2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)", "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"], "0$1", 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2-$3", ["1"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[68]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2-$3", ["[23]"], "0$1", 1], ["(\\d)(\\d{4})(\\d{2})(\\d{4})", "$2 15-$3-$4", ["9(?:2[2-469]|3[3-578])", "9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))", "9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)", "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"], "0$1", 0, "$1 $2 $3-$4"], ["(\\d)(\\d{2})(\\d{4})(\\d{4})", "$2 15-$3-$4", ["91"], "0$1", 0, "$1 $2 $3-$4"], ["(\\d{3})(\\d{3})(\\d{5})", "$1-$2-$3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{4})", "$2 15-$3-$4", ["9"], "0$1", 0, "$1 $2 $3-$4"]], "0", 0, "0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?", "9$1"], "AS": ["1", "011", "(?:[58]\\d\\d|684|900)\\d{7}", [10], 0, "1", 0, "([267]\\d{6})$|1", "684$1", 0, "684"], "AT": ["43", "00", "1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13], [["(\\d)(\\d{3,12})", "$1 $2", ["1(?:11|[2-9])"], "0$1"], ["(\\d{3})(\\d{2})", "$1 $2", ["517"], "0$1"], ["(\\d{2})(\\d{3,5})", "$1 $2", ["5[079]"], "0$1"], ["(\\d{3})(\\d{3,10})", "$1 $2", ["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]", "(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"], "0$1"], ["(\\d{4})(\\d{3,9})", "$1 $2", ["[2-467]|5[2-6]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4,7})", "$1 $2 $3", ["5"], "0$1"]], "0"], "AU": ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}", [5, 6, 7, 8, 9, 10, 12], [["(\\d{2})(\\d{3,4})", "$1 $2", ["16"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["16"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["14|4"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[2378]"], "(0$1)"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:30|[89])"]]], "0", 0, "(183[12])|0", 0, 0, 0, [["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}", [9]], ["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}", [9]], ["180(?:0\\d{3}|2)\\d{3}", [7, 10]], ["190[0-26]\\d{6}", [10]], 0, 0, 0, ["163\\d{2,6}", [5, 6, 7, 8, 9]], ["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", [9]], ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", [6, 8, 10, 12]]], "0011"], "AW": ["297", "00", "(?:[25-79]\\d\\d|800)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[25-9]"]]]], "AX": ["358", "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", "2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}", [5, 6, 7, 8, 9, 10, 11, 12], 0, "0", 0, 0, 0, 0, "18", 0, "00"], "AZ": ["994", "00", "365\\d{6}|(?:[124579]\\d|60|88)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["90"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[28]|2|365|46", "1[28]|2|365[45]|46", "1[28]|2|365(?:4|5[02])|46"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[13-9]"], "0$1"]], "0"], "BA": ["387", "00", "6\\d{8}|(?:[35689]\\d|49|70)\\d{6}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["6[1-3]|[7-9]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2-$3", ["[3-5]|6[56]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["6"], "0$1"]], "0"], "BB": ["1", "011", "(?:246|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "246$1", 0, "246"], "BD": ["880", "00", "[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}", [6, 7, 8, 9, 10], [["(\\d{2})(\\d{4,6})", "$1-$2", ["31[5-8]|[459]1"], "0$1"], ["(\\d{3})(\\d{3,7})", "$1-$2", ["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"], "0$1"], ["(\\d{4})(\\d{3,6})", "$1-$2", ["[13-9]|2[23]"], "0$1"], ["(\\d)(\\d{7,8})", "$1-$2", ["2"], "0$1"]], "0"], "BE": ["32", "00", "4\\d{8}|[1-9]\\d{7}", [8, 9], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:80|9)0"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[239]|4[23]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[15-8]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["4"], "0$1"]], "0"], "BF": ["226", "00", "[024-7]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[024-7]"]]]], "BG": ["359", "00", "00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}", [6, 7, 8, 9, 12], [["(\\d)(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["2"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["43[1-6]|70[1-9]"], "0$1"], ["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:70|8)0"], "0$1"], ["(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3", ["43[1-7]|7"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[48]|9[08]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"]], "0"], "BH": ["973", "00", "[136-9]\\d{7}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[13679]|8[02-4679]"]]]], "BI": ["257", "00", "(?:[267]\\d|31)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2367]"]]]], "BJ": ["229", "00", "(?:01\\d|8)\\d{7}", [8, 10], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["0"]]]], "BL": ["590", "00", "7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"], ["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"], ["80[0-5]\\d{6}"], ["8[129]\\d{7}"], 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]], "BM": ["1", "011", "(?:441|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "441$1", 0, "441"], "BN": ["673", "00", "[2-578]\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-578]"]]]], "BO": ["591", "00(?:1\\d)?", "(?:[2-7]\\d\\d|8001)\\d{5}", [8, 9], [["(\\d)(\\d{7})", "$1 $2", ["[23]|4[46]|50"]], ["(\\d{8})", "$1", ["[5-7]"]], ["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["8"]]], "0", 0, "0(1\\d)?"], "BQ": ["599", "00", "(?:[34]1|7\\d)\\d{5}", [7], 0, 0, 0, 0, 0, 0, "[347]"], "BR": ["55", "00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)", "[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}", [8, 9, 10, 11], [["(\\d{4})(\\d{4})", "$1-$2", ["300|4(?:0[02]|37|86)", "300|4(?:0(?:0|20)|370|864)"]], ["(\\d{3})(\\d{2,3})(\\d{4})", "$1 $2 $3", ["(?:[358]|90)0"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2-$3", ["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"], "($1)"], ["(\\d{2})(\\d{5})(\\d{4})", "$1 $2-$3", ["[16][1-9]|[2-57-9]"], "($1)"]], "0", 0, "(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?", "$2"], "BS": ["1", "011", "(?:242|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([3-8]\\d{6})$|1", "242$1", 0, "242"], "BT": ["975", "00", "[178]\\d{7}|[2-8]\\d{6}", [7, 8], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-6]|7[246]|8[2-4]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[67]|[78]"]]]], "BW": ["267", "00", "(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}", [7, 8, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["90"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[24-6]|3[15-9]"]], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37]"]], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["8"]]]], "BY": ["375", "810", "(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}", [6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{3})", "$1 $2", ["800"], "8 $1"], ["(\\d{3})(\\d{2})(\\d{2,4})", "$1 $2 $3", ["800"], "8 $1"], ["(\\d{4})(\\d{2})(\\d{3})", "$1 $2-$3", ["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])", "1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"], "8 0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["1(?:[56]|7[467])|2[1-3]"], "8 0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[1-4]"], "8 0$1"], ["(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["[89]"], "8 $1"]], "8", 0, "0|80?", 0, 0, 0, 0, "8~10"], "BZ": ["501", "00", "(?:0800\\d|[2-8])\\d{6}", [7, 11], [["(\\d{3})(\\d{4})", "$1-$2", ["[2-8]"]], ["(\\d)(\\d{3})(\\d{4})(\\d{3})", "$1-$2-$3-$4", ["0"]]]], "CA": ["1", "011", "[2-9]\\d{9}|3\\d{6}", [7, 10], 0, "1", 0, 0, 0, 0, 0, [["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}", [10]], ["", [10]], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", [10]], ["900[2-9]\\d{6}", [10]], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}", [10]], 0, ["310\\d{4}", [7]], 0, ["600[2-9]\\d{6}", [10]]]], "CC": ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", [6, 7, 8, 9, 10, 12], 0, "0", 0, "([59]\\d{7})$|0", "8$1", 0, 0, [["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}", [9]], ["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}", [9]], ["180(?:0\\d{3}|2)\\d{3}", [7, 10]], ["190[0-26]\\d{6}", [10]], 0, 0, 0, 0, ["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", [9]], ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", [6, 8, 10, 12]]], "0011"], "CD": ["243", "00", "(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}", [7, 8, 9, 10], [["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["88"], "0$1"], ["(\\d{2})(\\d{5})", "$1 $2", ["[1-6]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["5"], "0$1"]], "0"], "CF": ["236", "00", "8776\\d{4}|(?:[27]\\d|61)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[26-8]"]]]], "CG": ["242", "00", "222\\d{6}|(?:0\\d|80)\\d{7}", [9], [["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[02]"]]]], "CH": ["41", "00", "8\\d{11}|[2-9]\\d{8}", [9, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8[047]|90"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-79]|81"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["8"], "0$1"]], "0"], "CI": ["225", "00", "[02]\\d{9}", [10], [["(\\d{2})(\\d{2})(\\d)(\\d{5})", "$1 $2 $3 $4", ["2"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3 $4", ["0"]]]], "CK": ["682", "00", "[2-578]\\d{4}", [5], [["(\\d{2})(\\d{3})", "$1 $2", ["[2-578]"]]]], "CL": ["56", "(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0", "12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}", [9, 10, 11], [["(\\d{5})(\\d{4})", "$1 $2", ["219", "2196"], "($1)"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["60|809"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["44"]], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2[1-36]"], "($1)"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["9(?:10|[2-9])"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"], "($1)"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["60|8"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], ["(\\d{3})(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["60"]]]], "CM": ["237", "00", "[26]\\d{8}|88\\d{6,7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["88"]], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[26]|88"]]]], "CN": ["86", "00|1(?:[12]\\d|79)\\d\\d00", "(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}", [7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{5,6})", "$1 $2", ["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]", "(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123", "10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"], "0$1"], ["(\\d{3})(\\d{5,6})", "$1 $2", ["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]", "(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]", "85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])", "85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["(?:4|80)0"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["10|2(?:[02-57-9]|1[1-9])", "10|2(?:[02-57-9]|1[1-9])", "10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"], "0$1", 1], ["(\\d{3})(\\d{7,8})", "$1 $2", ["9"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["80"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["[3-578]"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["1[3-9]"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["[12]"], "0$1", 1]], "0", 0, "(1(?:[12]\\d|79)\\d\\d)|0", 0, 0, 0, 0, "00"], "CO": ["57", "00(?:4(?:[14]4|56)|[579])", "(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}", [8, 10, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["46"]], ["(\\d{3})(\\d{7})", "$1 $2", ["6|90"], "($1)"], ["(\\d{3})(\\d{7})", "$1 $2", ["3[0-357]|9[14]"]], ["(\\d)(\\d{3})(\\d{7})", "$1-$2-$3", ["1"], "0$1", 0, "$1 $2 $3"]], "0", 0, "0([3579]|4(?:[14]4|56))?"], "CR": ["506", "00", "(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}", [8, 10], [["(\\d{4})(\\d{4})", "$1 $2", ["[2-7]|8[3-9]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[89]"]]], 0, 0, "(19(?:0[0-2468]|1[09]|20|66|77|99))"], "CU": ["53", "119", "(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}", [6, 7, 8, 10], [["(\\d{2})(\\d{4,6})", "$1 $2", ["2[1-4]|[34]"], "(0$1)"], ["(\\d)(\\d{6,7})", "$1 $2", ["7"], "(0$1)"], ["(\\d)(\\d{7})", "$1 $2", ["[56]"], "0$1"], ["(\\d{3})(\\d{7})", "$1 $2", ["8"], "0$1"]], "0"], "CV": ["238", "0", "(?:[2-59]\\d\\d|800)\\d{4}", [7], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2-589]"]]]], "CW": ["599", "00", "(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["[3467]"]], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["9[4-8]"]]], 0, 0, 0, 0, 0, "[69]"], "CX": ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", [6, 7, 8, 9, 10, 12], 0, "0", 0, "([59]\\d{7})$|0", "8$1", 0, 0, [["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}", [9]], ["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}", [9]], ["180(?:0\\d{3}|2)\\d{3}", [7, 10]], ["190[0-26]\\d{6}", [10]], 0, 0, 0, 0, ["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", [9]], ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", [6, 8, 10, 12]]], "0011"], "CY": ["357", "00", "(?:[279]\\d|[58]0)\\d{6}", [8], [["(\\d{2})(\\d{6})", "$1 $2", ["[257-9]"]]]], "CZ": ["420", "00", "(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}", [9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-8]|9[015-7]"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["96"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]]]], "DE": ["49", "00", "[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], [["(\\d{2})(\\d{3,13})", "$1 $2", ["3[02]|40|[68]9"], "0$1"], ["(\\d{3})(\\d{3,12})", "$1 $2", ["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1", "2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"], "0$1"], ["(\\d{4})(\\d{2,11})", "$1 $2", ["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]", "[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["138"], "0$1"], ["(\\d{5})(\\d{2,10})", "$1 $2", ["3"], "0$1"], ["(\\d{3})(\\d{5,11})", "$1 $2", ["181"], "0$1"], ["(\\d{3})(\\d)(\\d{4,10})", "$1 $2 $3", ["1(?:3|80)|9"], "0$1"], ["(\\d{3})(\\d{7,8})", "$1 $2", ["1[67]"], "0$1"], ["(\\d{3})(\\d{7,12})", "$1 $2", ["8"], "0$1"], ["(\\d{5})(\\d{6})", "$1 $2", ["185", "1850", "18500"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{4})(\\d{7})", "$1 $2", ["18[68]"], "0$1"], ["(\\d{4})(\\d{7})", "$1 $2", ["15[1279]"], "0$1"], ["(\\d{5})(\\d{6})", "$1 $2", ["15[03568]", "15(?:[0568]|3[13])"], "0$1"], ["(\\d{3})(\\d{8})", "$1 $2", ["18"], "0$1"], ["(\\d{3})(\\d{2})(\\d{7,8})", "$1 $2 $3", ["1(?:6[023]|7)"], "0$1"], ["(\\d{4})(\\d{2})(\\d{7})", "$1 $2 $3", ["15[279]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{8})", "$1 $2 $3", ["15"], "0$1"]], "0"], "DJ": ["253", "00", "(?:2\\d|77)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[27]"]]]], "DK": ["45", "00", "[2-9]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-9]"]]]], "DM": ["1", "011", "(?:[58]\\d\\d|767|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "767$1", 0, "767"], "DO": ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "8001|8[024]9"], "DZ": ["213", "00", "(?:[1-4]|[5-79]\\d|80)\\d{7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-4]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["9"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-8]"], "0$1"]], "0"], "EC": ["593", "00", "1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}", [8, 9, 10, 11], [["(\\d)(\\d{3})(\\d{4})", "$1 $2-$3", ["[2-7]"], "(0$1)", 0, "$1-$2-$3"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["1"]]], "0"], "EE": ["372", "00", "8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}", [7, 8, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88", "[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]], ["(\\d{4})(\\d{3,4})", "$1 $2", ["[45]|8(?:00|[1-49])", "[45]|8(?:00[1-9]|[1-49])"]], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["7"]], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]]]], "EG": ["20", "00", "[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}", [8, 9, 10], [["(\\d)(\\d{7,8})", "$1 $2", ["[23]"], "0$1"], ["(\\d{2})(\\d{6,7})", "$1 $2", ["1[35]|[4-6]|8[2468]|9[235-7]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{8})", "$1 $2", ["1"], "0$1"]], "0"], "EH": ["212", "00", "[5-8]\\d{8}", [9], 0, "0", 0, 0, 0, 0, 0, [["528[89]\\d{5}"], ["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"], ["80[0-7]\\d{6}"], ["89\\d{7}"], 0, 0, 0, 0, ["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]], "ER": ["291", "00", "[178]\\d{6}", [7], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[178]"], "0$1"]], "0"], "ES": ["34", "00", "[5-9]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]00"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-9]"]]]], "ET": ["251", "00", "(?:11|[2-57-9]\\d)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-57-9]"], "0$1"]], "0"], "FI": ["358", "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", "[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}", [5, 6, 7, 8, 9, 10, 11, 12], [["(\\d{5})", "$1", ["20[2-59]"], "0$1"], ["(\\d{3})(\\d{3,7})", "$1 $2", ["(?:[1-3]0|[68])0|70[07-9]"], "0$1"], ["(\\d{2})(\\d{4,8})", "$1 $2", ["[14]|2[09]|50|7[135]"], "0$1"], ["(\\d{2})(\\d{6,10})", "$1 $2", ["7"], "0$1"], ["(\\d)(\\d{4,9})", "$1 $2", ["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"], "0$1"]], "0", 0, 0, 0, 0, "1[03-79]|[2-9]", 0, "00"], "FJ": ["679", "0(?:0|52)", "45\\d{5}|(?:0800\\d|[235-9])\\d{6}", [7, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["[235-9]|45"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "FK": ["500", "00", "[2-7]\\d{4}", [5]], "FM": ["691", "00", "(?:[39]\\d\\d|820)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[389]"]]]], "FO": ["298", "00", "[2-9]\\d{5}", [6], [["(\\d{6})", "$1", ["[2-9]"]]], 0, 0, "(10(?:01|[12]0|88))"], "FR": ["33", "00", "[1-9]\\d{8}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0 $1"], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[1-79]"], "0$1"]], "0"], "GA": ["241", "00", "(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}", [7, 8], [["(\\d)(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-7]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["0"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["11|[67]"], "0$1"]], 0, 0, "0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})", "$1"], "GB": ["44", "00", "[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}", [7, 9, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["800", "8001", "80011", "800111", "8001111"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["845", "8454", "84546", "845464"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["800"], "0$1"], ["(\\d{5})(\\d{4,5})", "$1 $2", ["1(?:38|5[23]|69|76|94)", "1(?:(?:38|69)7|5(?:24|39)|768|946)", "1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"], "0$1"], ["(\\d{4})(\\d{5,6})", "$1 $2", ["1(?:[2-69][02-9]|[78])"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["[25]|7(?:0|6[02-9])", "[25]|7(?:0|6(?:[03-9]|2[356]))"], "0$1"], ["(\\d{4})(\\d{6})", "$1 $2", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1389]"], "0$1"]], "0", 0, "0|180020", 0, 0, 0, [["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}", [9, 10]], ["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}", [10]], ["80[08]\\d{7}|800\\d{6}|8001111"], ["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d", [7, 10]], ["70\\d{8}", [10]], 0, ["(?:3[0347]|55)\\d{8}", [10]], ["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", [10]], ["56\\d{8}", [10]]], 0, " x"], "GD": ["1", "011", "(?:473|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "473$1", 0, "473"], "GE": ["995", "00", "(?:[3-57]\\d\\d|800)\\d{6}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["70"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["32"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[57]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[348]"], "0$1"]], "0"], "GF": ["594", "00", "(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-7]|80[6-9]|9[47]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[89]"], "0$1"]], "0"], "GG": ["44", "00", "(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?", [7, 9, 10], 0, "0", 0, "([25-9]\\d{5})$|0|180020", "1481$1", 0, 0, [["1481[25-9]\\d{5}", [10]], ["7(?:(?:781|839)\\d|911[17])\\d{5}", [10]], ["80[08]\\d{7}|800\\d{6}|8001111"], ["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d", [7, 10]], ["70\\d{8}", [10]], 0, ["(?:3[0347]|55)\\d{8}", [10]], ["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", [10]], ["56\\d{8}", [10]]]], "GH": ["233", "00", "[235]\\d{8}|800\\d{5,6}", [8, 9], [["(\\d{3})(\\d{5})", "$1 $2", ["8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2358]"], "0$1"]], "0"], "GI": ["350", "00", "(?:[25]\\d|60)\\d{6}", [8], [["(\\d{3})(\\d{5})", "$1 $2", ["2"]]]], "GL": ["299", "00", "(?:19|[2-689]\\d|70)\\d{4}", [6], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["19|[2-9]"]]]], "GM": ["220", "00", "[2-9]\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]]], "GN": ["224", "00", "722\\d{6}|(?:3|6\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["3"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[67]"]]]], "GP": ["590", "00", "7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-79]|80[6-9]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\d)\\d{4}"], ["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"], ["80[0-5]\\d{6}"], ["8[129]\\d{7}"], 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]], "GQ": ["240", "00", "222\\d{6}|(?:3\\d|55|[89]0)\\d{7}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235]"]], ["(\\d{3})(\\d{6})", "$1 $2", ["[89]"]]]], "GR": ["30", "00", "5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}", [10, 11, 12], [["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["21|7"]], ["(\\d{4})(\\d{6})", "$1 $2", ["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2689]"]], ["(\\d{3})(\\d{3,4})(\\d{5})", "$1 $2 $3", ["8"]]]], "GT": ["502", "00", "80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}", [8, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["[2-8]"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]]]], "GU": ["1", "011", "(?:[58]\\d\\d|671|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "671$1", 0, "671"], "GW": ["245", "00", "[49]\\d{8}|4\\d{6}", [7, 9], [["(\\d{3})(\\d{4})", "$1 $2", ["40"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[49]"]]]], "GY": ["592", "001", "(?:[2-8]\\d{3}|9008)\\d{3}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]]], "HK": ["852", "00(?:30|5[09]|[126-9]?)", "8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}", [5, 6, 7, 8, 9, 11], [["(\\d{3})(\\d{2,5})", "$1 $2", ["900", "9003"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{3})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "HN": ["504", "00", "8\\d{10}|[237-9]\\d{7}", [8, 11], [["(\\d{4})(\\d{4})", "$1-$2", ["[237-9]"]]]], "HR": ["385", "00", "[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}", [7, 8, 9], [["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["6[01]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{4})(\\d{3})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["6|7[245]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-57]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"], "0$1"]], "0"], "HT": ["509", "00", "[2-589]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["[2-589]"]]]], "HU": ["36", "00", "[235-7]\\d{8}|[1-9]\\d{7}", [8, 9], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "(06 $1)"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"], "(06 $1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-9]"], "06 $1"]], "06"], "ID": ["62", "00[89]", "00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}", [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["15"]], ["(\\d{2})(\\d{5,9})", "$1 $2", ["2[124]|[36]1"], "(0$1)"], ["(\\d{3})(\\d{5,7})", "$1 $2", ["800"], "0$1"], ["(\\d{3})(\\d{5,8})", "$1 $2", ["[2-79]"], "(0$1)"], ["(\\d{3})(\\d{3,4})(\\d{3})", "$1-$2-$3", ["8[1-35-9]"], "0$1"], ["(\\d{3})(\\d{6,8})", "$1 $2", ["1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["804"], "0$1"], ["(\\d{3})(\\d)(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["80"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1-$2-$3", ["8"], "0$1"]], "0"], "IE": ["353", "00", "(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}", [7, 8, 9, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["2[24-9]|47|58|6[237-9]|9[35-9]"], "(0$1)"], ["(\\d{3})(\\d{5})", "$1 $2", ["[45]0"], "(0$1)"], ["(\\d)(\\d{3,4})(\\d{4})", "$1 $2 $3", ["1"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2569]|4[1-69]|7[14]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["70"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["81"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[78]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["4"], "(0$1)"], ["(\\d{2})(\\d)(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], "IL": ["972", "0(?:0|1[2-9])", "1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}", [7, 8, 9, 10, 11, 12], [["(\\d{4})(\\d{3})", "$1-$2", ["125"]], ["(\\d{4})(\\d{2})(\\d{2})", "$1-$2-$3", ["121"]], ["(\\d)(\\d{3})(\\d{4})", "$1-$2-$3", ["[2-489]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["[57]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1-$2-$3", ["12"]], ["(\\d{4})(\\d{6})", "$1-$2", ["159"]], ["(\\d)(\\d{3})(\\d{3})(\\d{3})", "$1-$2-$3-$4", ["1[7-9]"]], ["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})", "$1-$2 $3-$4", ["15"]]], "0"], "IM": ["44", "00", "1624\\d{6}|(?:[3578]\\d|90)\\d{8}", [10], 0, "0", 0, "([25-8]\\d{5})$|0|180020", "1624$1", 0, "74576|(?:16|7[56])24"], "IN": ["91", "00", "(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}", [8, 9, 10, 11, 12, 13], [["(\\d{8})", "$1", ["5(?:0|2[23]|3[03]|[67]1|88)", "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)", "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"], 0, 1], ["(\\d{4})(\\d{4,5})", "$1 $2", ["180", "1800"], 0, 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["140"], 0, 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["11|2[02]|33|4[04]|79[1-7]|80[2-46]", "11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])", "11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67)[14]", "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31)|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]", "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:3171|5[15][2-6]|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|8(?:16|2[014]|3[126]|6[136]|7[78]|83)(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"], "0$1", 1], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|3[129]|5[29]|6[02-5]|70)|807", "1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7(?:[23569]|8[0-57-9])|8[1-6])|7(?:1(?:[013-8]|9[6-9])|3(?:17|2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]", "1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\d|7(?:[23569]\\d|8[0-57-9])|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|3(?:2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"], "0$1", 1], ["(\\d{5})(\\d{5})", "$1 $2", ["16|[6-9]"], "0$1", 1], ["(\\d{4})(\\d{2,4})(\\d{4})", "$1 $2 $3", ["18[06]", "18[06]0"], 0, 1], ["(\\d{4})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["18"], 0, 1]], "0"], "IO": ["246", "00", "3\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["3"]]]], "IQ": ["964", "00", "(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-6]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"]], "0"], "IR": ["98", "00", "[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}", [4, 5, 6, 7, 10], [["(\\d{4,5})", "$1", ["96"], "0$1"], ["(\\d{2})(\\d{4,5})", "$1 $2", ["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["[1-8]"], "0$1"]], "0"], "IS": ["354", "00|1(?:0(?:01|[12]0)|100)", "(?:38\\d|[4-9])\\d{6}", [7, 9], [["(\\d{3})(\\d{4})", "$1 $2", ["[4-9]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["3"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "IT": ["39", "00", "0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?", [6, 7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{4,6})", "$1 $2", ["0[26]"]], ["(\\d{3})(\\d{3,6})", "$1 $2", ["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])", "0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]], ["(\\d{4})(\\d{2,6})", "$1 $2", ["0(?:[13-579][2-46-8]|8[236-8])"]], ["(\\d{4})(\\d{4})", "$1 $2", ["894"]], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[26]|5"]], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["1(?:44|[679])|[378]|43"]], ["(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[13-57-9][0159]|14"]], ["(\\d{2})(\\d{4})(\\d{5})", "$1 $2 $3", ["0[26]"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["[03]"]]], 0, 0, 0, 0, 0, 0, [["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"], ["3[2-9]\\d{7,8}|(?:31|43)\\d{8}", [9, 10]], ["80(?:0\\d{3}|3)\\d{3}", [6, 9]], ["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}", [6, 8, 9, 10]], ["1(?:78\\d|99)\\d{6}", [9, 10]], ["3[2-8]\\d{9,10}", [11, 12]], 0, 0, ["55\\d{8}", [10]], ["84(?:[08]\\d{3}|[17])\\d{3}", [6, 9]]]], "JE": ["44", "00", "1534\\d{6}|(?:[3578]\\d|90)\\d{8}", [10], 0, "0", 0, "([0-24-8]\\d{5})$|0|180020", "1534$1", 0, 0, [["1534[0-24-8]\\d{5}"], ["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"], ["80(?:07(?:35|81)|8901)\\d{4}"], ["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"], ["701511\\d{4}"], 0, ["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"], ["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"], ["56\\d{8}"]]], "JM": ["1", "011", "(?:[58]\\d\\d|658|900)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "658|876"], "JO": ["962", "00", "(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}", [8, 9], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2356]|87"], "(0$1)"], ["(\\d{3})(\\d{5,6})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["70"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[47]"], "0$1"]], "0"], "JP": ["81", "010", "00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}", [8, 9, 10, 11, 12, 13, 14, 15, 16, 17], [["(\\d{3})(\\d{3})(\\d{3})", "$1-$2-$3", ["(?:12|57|99)0"], "0$1"], ["(\\d{4})(\\d)(\\d{4})", "$1-$2-$3", ["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])", "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]", "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["60"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1-$2-$3", ["3|4(?:2[09]|7[01])|6[1-9]", "3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])", "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]", "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{4})", "$1-$2-$3", ["[14]|[289][2-9]|5[3-9]|7[2-4679]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["800"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2-$3", ["[25-9]"], "0$1"]], "0", 0, "(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0", "$1"], "KE": ["254", "000", "(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}", [7, 8, 9, 10], [["(\\d{2})(\\d{5,7})", "$1 $2", ["[24-6]"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["[17]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[89]"], "0$1"]], "0"], "KG": ["996", "00", "8\\d{9}|[235-9]\\d{8}", [9, 10], [["(\\d{4})(\\d{5})", "$1 $2", ["3(?:1[346]|[24-79])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235-79]|88"], "0$1"], ["(\\d{3})(\\d{3})(\\d)(\\d{2,3})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], "KH": ["855", "00[14-9]", "1\\d{9}|[1-9]\\d{7,8}", [8, 9, 10], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-9]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0"], "KI": ["686", "00", "(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}", [5, 8], 0, "0"], "KM": ["269", "00", "[3478]\\d{6}", [7], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[3478]"]]]], "KN": ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "869$1", 0, "869"], "KP": ["850", "00|99", "85\\d{6}|(?:19\\d|[2-7])\\d{7}", [8, 10], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-7]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"]], "0"], "KR": ["82", "00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))", "00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}", [5, 6, 8, 9, 10, 11, 12, 13, 14], [["(\\d{2})(\\d{3,4})", "$1-$2", ["(?:3[1-3]|[46][1-4]|5[1-5])1"], "0$1"], ["(\\d{4})(\\d{4})", "$1-$2", ["1"]], ["(\\d)(\\d{3,4})(\\d{4})", "$1-$2-$3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["[36]0|8"], "0$1"], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1-$2-$3", ["[1346]|5[1-5]"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2-$3", ["[57]"], "0$1"], ["(\\d{2})(\\d{5})(\\d{4})", "$1-$2-$3", ["5"], "0$1"]], "0", 0, "0(8(?:[1-46-8]|5\\d\\d))?"], "KW": ["965", "00", "18\\d{5}|(?:[2569]\\d|41)\\d{6}", [7, 8], [["(\\d{4})(\\d{3,4})", "$1 $2", ["[169]|2(?:[235]|4[1-35-9])|52"]], ["(\\d{3})(\\d{5})", "$1 $2", ["[245]"]]]], "KY": ["1", "011", "(?:345|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "345$1", 0, "345"], "KZ": ["7", "810", "8\\d{13}|[78]\\d{9}", [10, 14], 0, "8", 0, 0, 0, 0, "7", 0, "8~10"], "LA": ["856", "00", "[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}", [8, 9, 10], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["2[13]|3[14]|[4-8]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["3"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[23]"], "0$1"]], "0"], "LB": ["961", "00", "[27-9]\\d{7}|[13-9]\\d{6}", [7, 8], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[27-9]"]]], "0"], "LC": ["1", "011", "(?:[58]\\d\\d|758|900)\\d{7}", [10], 0, "1", 0, "([2-8]\\d{6})$|1", "758$1", 0, "758"], "LI": ["423", "00", "[68]\\d{8}|(?:[2378]\\d|90)\\d{5}", [7, 9], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2379]|8(?:0[09]|7)", "[2379]|8(?:0(?:02|9)|7)"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["69"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]]], "0", 0, "(1001)|0"], "LK": ["94", "00", "[1-9]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[1-689]"], "0$1"]], "0"], "LR": ["231", "00", "(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}", [7, 8, 9], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["4[67]|[56]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-578]"], "0$1"]], "0"], "LS": ["266", "00", "(?:[256]\\d\\d|800)\\d{5}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[2568]"]]]], "LT": ["370", "00", "(?:[3469]\\d|52|[78]0)\\d{6}", [8], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["52[0-7]"], "(0-$1)", 1], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[7-9]"], "0 $1", 1], ["(\\d{2})(\\d{6})", "$1 $2", ["37|4(?:[15]|6[1-8])"], "(0-$1)", 1], ["(\\d{3})(\\d{5})", "$1 $2", ["[3-6]"], "(0-$1)", 1]], "0", 0, "[08]"], "LU": ["352", "00", "35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}", [4, 5, 6, 7, 8, 9, 10, 11], [["(\\d{2})(\\d{3})", "$1 $2", ["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]], ["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["20[2-689]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", "$1 $2 $3 $4", ["20"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})", "$1 $2 $3 $4", ["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["80[01]|90[015]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["20"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", "$1 $2 $3 $4 $5", ["20"]]], 0, 0, "(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"], "LV": ["371", "00", "(?:[268]\\d|78|90)\\d{6}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2679]|8[01]"]]]], "LY": ["218", "00", "[2-9]\\d{8}", [9], [["(\\d{2})(\\d{7})", "$1-$2", ["[2-9]"], "0$1"]], "0"], "MA": ["212", "00", "[5-8]\\d{8}", [9], [["(\\d{4})(\\d{5})", "$1-$2", ["892"], "0$1"], ["(\\d{2})(\\d{7})", "$1-$2", ["8(?:0[0-7]|9)"], "0$1"], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[5-8]"], "0$1"]], "0", 0, 0, 0, 0, "[5-8]"], "MC": ["377", "00", "(?:[3489]|[67]\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["4"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[389]"]], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[67]"], "0$1"]], "0"], "MD": ["373", "00", "(?:[235-7]\\d|[89]0)\\d{6}", [8], [["(\\d{3})(\\d{5})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["22|3"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[25-7]"], "0$1"]], "0"], "ME": ["382", "00", "(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-9]"], "0$1"]], "0"], "MF": ["590", "00", "7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"], ["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"], ["80[0-5]\\d{6}"], ["8[129]\\d{7}"], 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]], "MG": ["261", "00", "[23]\\d{8}", [9], [["(\\d{2})(\\d{2})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["[23]"], "0$1"]], "0", 0, "([24-9]\\d{6})$|0", "20$1"], "MH": ["692", "011", "329\\d{4}|(?:[256]\\d|45)\\d{5}", [7], [["(\\d{3})(\\d{4})", "$1-$2", ["[2-6]"]]], "1"], "MK": ["389", "00", "[2-578]\\d{7}", [8], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["2|34[47]|4(?:[37]7|5[47]|64)"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[347]"], "0$1"], ["(\\d{3})(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[58]"], "0$1"]], "0"], "ML": ["223", "00", "[24-9]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24-9]"]]]], "MM": ["95", "00", "1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}", [6, 7, 8, 9, 10], [["(\\d)(\\d{2})(\\d{3})", "$1 $2 $3", ["16|2"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"], "0$1"], ["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[12]|452|678|86", "[12]|452|6788|86"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[4-7]|8[1-35]"], "0$1"], ["(\\d)(\\d{3})(\\d{4,6})", "$1 $2 $3", ["9(?:2[0-4]|[35-9]|4[137-9])"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["92"], "0$1"], ["(\\d)(\\d{5})(\\d{4})", "$1 $2 $3", ["9"], "0$1"]], "0"], "MN": ["976", "001", "[12]\\d{7,9}|[5-9]\\d{7}", [8, 9, 10], [["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["11|2[16]"], "0$1"], ["(\\d{4})(\\d{4})", "$1 $2", ["[5-9]"]], ["(\\d{3})(\\d{5,6})", "$1 $2", ["[12]2[1-3]"], "0$1"], ["(\\d{4})(\\d{5,6})", "$1 $2", ["[12](?:27|3[2-8]|4[2-68]|5[1-4689])", "[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"], "0$1"], ["(\\d{5})(\\d{4,5})", "$1 $2", ["[12]"], "0$1"]], "0"], "MO": ["853", "00", "0800\\d{3}|(?:28|[68]\\d)\\d{6}", [7, 8], [["(\\d{4})(\\d{3})", "$1 $2", ["0"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[268]"]]]], "MP": ["1", "011", "[58]\\d{9}|(?:67|90)0\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "670$1", 0, "670"], "MQ": ["596", "00", "7091\\d{5}|(?:[56]9|[89]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-79]|8(?:0[6-9]|[36])"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], "MR": ["222", "00", "(?:[2-4]\\d\\d|800)\\d{5}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-48]"]]]], "MS": ["1", "011", "(?:[58]\\d\\d|664|900)\\d{7}", [10], 0, "1", 0, "([34]\\d{6})$|1", "664$1", 0, "664"], "MT": ["356", "00", "3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[2357-9]"]]]], "MU": ["230", "0(?:0|[24-7]0|3[03])", "(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}", [7, 8, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-46]|8[013]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[57]"]], ["(\\d{5})(\\d{5})", "$1 $2", ["8"]]], 0, 0, 0, 0, 0, 0, 0, "020"], "MV": ["960", "0(?:0|19)", "(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}", [7, 10], [["(\\d{3})(\\d{4})", "$1-$2", ["[34679]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "MW": ["265", "00", "(?:[1289]\\d|31|77)\\d{7}|1\\d{6}", [7, 9], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["1[2-9]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-37-9]"], "0$1"]], "0"], "MX": ["52", "0[09]", "[2-9]\\d{9}", [10], [["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["33|5[56]|81"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "MY": ["60", "00", "1\\d{8,9}|(?:3\\d|[4-9])\\d{7}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1-$2 $3", ["[4-79]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1-$2 $3", ["1(?:[02469]|[378][1-9]|53)|8", "1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1-$2 $3", ["3"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{4})", "$1-$2-$3-$4", ["1(?:[367]|80)"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2 $3", ["15"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2 $3", ["1"], "0$1"]], "0"], "MZ": ["258", "00", "(?:2|8\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2|8[2-79]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]]]], "NA": ["264", "00", "[68]\\d{7,8}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["88"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["6"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["87"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"]], "0"], "NC": ["687", "00", "(?:050|[2-57-9]\\d\\d)\\d{3}", [6], [["(\\d{2})(\\d{2})(\\d{2})", "$1.$2.$3", ["[02-57-9]"]]]], "NE": ["227", "00", "[027-9]\\d{7}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["08"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[089]|2[013]|7[0467]"]]]], "NF": ["672", "00", "[13]\\d{5}", [6], [["(\\d{2})(\\d{4})", "$1 $2", ["1[0-3]"]], ["(\\d)(\\d{5})", "$1 $2", ["[13]"]]], 0, 0, "([0-258]\\d{4})$", "3$1"], "NG": ["234", "009", "(?:20|9\\d)\\d{8}|[78]\\d{9,13}", [10, 11, 12, 13, 14], [["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[7-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["20[129]"], "0$1"], ["(\\d{4})(\\d{2})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["[78]"], "0$1"], ["(\\d{3})(\\d{5})(\\d{5,6})", "$1 $2 $3", ["[78]"], "0$1"]], "0"], "NI": ["505", "00", "(?:1800|[25-8]\\d{3})\\d{4}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[125-8]"]]]], "NL": ["31", "00", "(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}", [5, 6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{4,7})", "$1 $2", ["[89]0"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["66"], "0$1"], ["(\\d)(\\d{8})", "$1 $2", ["6"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-578]|91"], "0$1"], ["(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3", ["9"], "0$1"]], "0"], "NO": ["47", "00", "(?:0|[2-9]\\d{3})\\d{4}", [5, 8], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-79]"]]], 0, 0, 0, 0, 0, "[02-689]|7[0-8]"], "NP": ["977", "00", "(?:1\\d|9)\\d{9}|[1-9]\\d{7}", [8, 10, 11], [["(\\d)(\\d{7})", "$1-$2", ["1[2-6]"], "0$1"], ["(\\d{2})(\\d{6})", "$1-$2", ["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"], "0$1"], ["(\\d{3})(\\d{7})", "$1-$2", ["9"]]], "0"], "NR": ["674", "00", "(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[24-9]"]]]], "NU": ["683", "00", "(?:[4-7]|888\\d)\\d{3}", [4, 7], [["(\\d{3})(\\d{4})", "$1 $2", ["8"]]]], "NZ": ["64", "0(?:0|161)", "[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}", [5, 6, 7, 8, 9, 10], [["(\\d{2})(\\d{3,8})", "$1 $2", ["8[1-79]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["50[036-8]|8|90", "50(?:[0367]|88)|8|90"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["24|[346]|7[2-57-9]|9[2-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2(?:10|74)|[589]"], "0$1"], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["1|2[028]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,5})", "$1 $2 $3", ["2(?:[169]|7[0-35-9])|7"], "0$1"]], "0", 0, 0, 0, 0, 0, 0, "00"], "OM": ["968", "00", "(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}", [7, 8, 9], [["(\\d{3})(\\d{4,6})", "$1 $2", ["[58]"]], ["(\\d{2})(\\d{6})", "$1 $2", ["2"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[179]"]]]], "PA": ["507", "00", "(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}", [7, 8, 10, 11], [["(\\d{3})(\\d{4})", "$1-$2", ["[1-57-9]"]], ["(\\d{4})(\\d{4})", "$1-$2", ["[68]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]]]], "PE": ["51", "00|19(?:1[124]|77|90)00", "(?:[14-8]|9\\d)\\d{7}", [8, 9], [["(\\d{3})(\\d{5})", "$1 $2", ["80"], "(0$1)"], ["(\\d)(\\d{7})", "$1 $2", ["1"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[4-8]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"]]], "0", 0, 0, 0, 0, 0, 0, "00", " Anexo "], "PF": ["689", "00", "4\\d{5}(?:\\d{2})?|8\\d{7,8}", [6, 8, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["44"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["4|8[7-9]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]]]], "PG": ["675", "00|140[1-3]", "(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["18|[2-69]|85"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[78]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "PH": ["63", "00", "(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}", [6, 8, 9, 10, 11, 12, 13], [["(\\d)(\\d{5})", "$1 $2", ["2"], "(0$1)"], ["(\\d{4})(\\d{4,6})", "$1 $2", ["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2", "3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"], "(0$1)"], ["(\\d{5})(\\d{4})", "$1 $2", ["346|4(?:27|9[35])|883", "3469|4(?:279|9(?:30|56))|8834"], "(0$1)"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[3-7]|8[2-8]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], ["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["1"]]], "0"], "PK": ["92", "00", "122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{2,7})", "$1 $2 $3", ["[89]0"], "0$1"], ["(\\d{4})(\\d{5})", "$1 $2", ["1"]], ["(\\d{3})(\\d{6,7})", "$1 $2", ["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])", "9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"], "(0$1)"], ["(\\d{2})(\\d{7,8})", "$1 $2", ["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"], "(0$1)"], ["(\\d{5})(\\d{5})", "$1 $2", ["58"], "(0$1)"], ["(\\d{3})(\\d{7})", "$1 $2", ["3"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[24-9]"], "(0$1)"]], "0"], "PL": ["48", "00", "(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}", [6, 7, 8, 9, 10], [["(\\d{5})", "$1", ["19"]], ["(\\d{3})(\\d{3})", "$1 $2", ["11|20|64"]], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1", "30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["64"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[2-8]|[2-7]|8[1-79]|9[145]"]], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["8"]]]], "PM": ["508", "00", "[78]\\d{8}|[2-9]\\d{5}", [6, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["7"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], "PR": ["1", "011", "(?:[589]\\d\\d|787)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "787|939"], "PS": ["970", "00", "[2489]2\\d{6}|(?:1\\d|5)\\d{8}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2489]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0"], "PT": ["351", "00", "1693\\d{5}|(?:[26-9]\\d|30)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["2[12]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["16|[236-9]"]]]], "PW": ["680", "01[12]", "(?:[24-8]\\d\\d|345|900)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]]], "PY": ["595", "00", "[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}", [6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{3,6})", "$1 $2", ["[2-9]0"], "0$1"], ["(\\d{2})(\\d{5})", "$1 $2", ["3[289]|4[246-8]|61|7[1-3]|8[1-36]"], "(0$1)"], ["(\\d{3})(\\d{4,5})", "$1 $2", ["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["87"]], ["(\\d{3})(\\d{6})", "$1 $2", ["9(?:[5-79]|8[1-7])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-8]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["9"]]], "0"], "QA": ["974", "00", "800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}", [7, 8, 9, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["2[136]|8"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[3-7]"]]]], "RE": ["262", "00", "709\\d{6}|(?:26|[689]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[26-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["2631[0-6]\\d{4}|26(?:2\\d|30|88)\\d{5}"], ["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"], ["80\\d{7}"], ["89[1-37-9]\\d{6}"], 0, 0, 0, 0, ["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"], ["8(?:1[019]|2[0156]|84|90)\\d{6}"]]], "RO": ["40", "00", "(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}", [6, 9], [["(\\d{3})(\\d{3})", "$1 $2", ["2[3-6]", "2[3-6]\\d9"], "0$1"], ["(\\d{2})(\\d{4})", "$1 $2", ["219|31"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[23]1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[236-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, 0, 0, " int "], "RS": ["381", "00", "38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}", [6, 7, 8, 9, 10, 11, 12], [["(\\d{3})(\\d{3,9})", "$1 $2", ["(?:2[389]|39)0|[7-9]"], "0$1"], ["(\\d{2})(\\d{5,10})", "$1 $2", ["[1-36]"], "0$1"]], "0"], "RU": ["7", "810", "8\\d{13}|[347-9]\\d{9}", [10, 14], [["(\\d{4})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["7(?:1[0-8]|2[1-9])", "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))", "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"], "8 ($1)", 1], ["(\\d{5})(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["7(?:1[0-68]|2[1-9])", "7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))", "7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"], "8 ($1)", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "8 ($1)", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[349]|8(?:[02-7]|1[1-8])"], "8 ($1)", 1], ["(\\d{4})(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["8"], "8 ($1)"]], "8", 0, 0, 0, 0, "[3489]", 0, "8~10"], "RW": ["250", "00", "(?:06|[27]\\d\\d|[89]00)\\d{6}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["0"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[7-9]"], "0$1"]], "0"], "SA": ["966", "00", "(?:[15]\\d|800|92)\\d{7}", [9, 10], [["(\\d{4})(\\d{5})", "$1 $2", ["9"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]]], "0"], "SB": ["677", "0[01]", "[6-9]\\d{6}|[1-6]\\d{4}", [5, 7], [["(\\d{2})(\\d{5})", "$1 $2", ["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]], "SC": ["248", "010|0[0-2]", "(?:[2489]\\d|64)\\d{5}", [7], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[246]|9[57]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "SD": ["249", "00", "[19]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[19]"], "0$1"]], "0"], "SE": ["46", "00", "(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}", [6, 7, 8, 9, 10, 12], [["(\\d{2})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["20"], "0$1", 0, "$1 $2 $3"], ["(\\d{3})(\\d{4})", "$1-$2", ["9(?:00|39|44|9)"], "0$1", 0, "$1 $2"], ["(\\d{2})(\\d{3})(\\d{2})", "$1-$2 $3", ["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"], "0$1", 0, "$1 $2 $3"], ["(\\d)(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], "0$1", 0, "$1 $2 $3"], ["(\\d{3})(\\d{2,3})(\\d{3})", "$1-$2 $3", ["9(?:00|39|44)"], "0$1", 0, "$1 $2 $3"], ["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["10|7"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{3})", "$1-$2 $3 $4", ["9"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1-$2 $3 $4 $5", ["[26]"], "0$1", 0, "$1 $2 $3 $4 $5"]], "0"], "SG": ["65", "0[0-3]\\d", "(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}", [8, 10, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["[369]|8(?:0[1-9]|[1-9])"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]], ["(\\d{4})(\\d{4})(\\d{3})", "$1 $2 $3", ["7"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]]]], "SH": ["290", "00", "(?:[256]\\d|8)\\d{3}", [4, 5], 0, 0, 0, 0, 0, 0, "[256]"], "SI": ["386", "00|10(?:22|66|88|99)", "[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}", [5, 6, 7, 8], [["(\\d{2})(\\d{3,6})", "$1 $2", ["8[09]|9"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["59|8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37][01]|4[013]|51|6"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-57]"], "(0$1)"]], "0", 0, 0, 0, 0, 0, 0, "00"], "SJ": ["47", "00", "0\\d{4}|(?:[489]\\d|79)\\d{6}", [5, 8], 0, 0, 0, 0, 0, 0, "79"], "SK": ["421", "00", "[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}", [6, 7, 9], [["(\\d)(\\d{2})(\\d{3,4})", "$1 $2 $3", ["21"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["[3-5][1-8]1", "[3-5][1-8]1[67]"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["2"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[689]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[3-5]"], "0$1"]], "0"], "SL": ["232", "00", "(?:[237-9]\\d|66)\\d{6}", [8], [["(\\d{2})(\\d{6})", "$1 $2", ["[236-9]"], "(0$1)"]], "0"], "SM": ["378", "00", "(?:0549|[5-7]\\d)\\d{6}", [8, 10], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-7]"]], ["(\\d{4})(\\d{6})", "$1 $2", ["0"]]], 0, 0, "([89]\\d{5})$", "0549$1"], "SN": ["221", "00", "(?:[378]\\d|93)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[379]"]]]], "SO": ["252", "00", "[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}", [6, 7, 8, 9], [["(\\d{2})(\\d{4})", "$1 $2", ["8[125]"]], ["(\\d{6})", "$1", ["[134]"]], ["(\\d)(\\d{6})", "$1 $2", ["[15]|2[0-79]|3[0-46-8]|4[0-7]"]], ["(\\d{2})(\\d{5,7})", "$1 $2", ["1|28|9[2-9]"]], ["(\\d)(\\d{7})", "$1 $2", ["[267]|904"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[346-9]"]]], "0"], "SR": ["597", "00", "(?:[2-5]|[6-9]\\d)\\d{5}", [6, 7], [["(\\d{2})(\\d{2})(\\d{2})", "$1-$2-$3", ["56"]], ["(\\d{3})(\\d{3})", "$1-$2", ["[2-5]"]], ["(\\d{3})(\\d{4})", "$1-$2", ["[6-9]"]]]], "SS": ["211", "00", "[19]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[19]"], "0$1"]], "0"], "ST": ["239", "00", "(?:22|9\\d)\\d{5}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[29]"]]]], "SV": ["503", "00", "[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?", [7, 8, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["[89]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[25-7]"]], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["[89]"]]]], "SX": ["1", "011", "7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "(5\\d{6})$|1", "721$1", 0, "721"], "SY": ["963", "00", "[1-359]\\d{8}|[1-5]\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-4]|5[1-3]"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[59]"], "0$1", 1]], "0"], "SZ": ["268", "00", "0800\\d{4}|(?:[237]\\d|900)\\d{6}", [8, 9], [["(\\d{4})(\\d{4})", "$1 $2", ["[0237]"]], ["(\\d{5})(\\d{4})", "$1 $2", ["9"]]]], "TA": ["290", "00", "8\\d{3}", [4], 0, 0, 0, 0, 0, 0, "8"], "TC": ["1", "011", "(?:[58]\\d\\d|649|900)\\d{7}", [10], 0, "1", 0, "([2-479]\\d{6})$|1", "649$1", 0, "649"], "TD": ["235", "00|16", "(?:22|[3689]\\d|77)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[236-9]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "TG": ["228", "00", "[279]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[279]"]]]], "TH": ["66", "00[1-9]", "(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}", [8, 9, 10, 13], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[13-9]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0"], "TJ": ["992", "810", "(?:[0-57-9]\\d|66)\\d{7}", [9], [["(\\d{6})(\\d)(\\d{2})", "$1 $2 $3", ["331", "3317"]], ["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["44[02-479]|[34]7"]], ["(\\d{4})(\\d)(\\d{4})", "$1 $2 $3", ["3(?:[1245]|3[12])"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["\\d"]]], 0, 0, 0, 0, 0, 0, 0, "8~10"], "TK": ["690", "00", "[2-47]\\d{3,6}", [4, 5, 6, 7]], "TL": ["670", "00", "7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-489]|70"]], ["(\\d{4})(\\d{4})", "$1 $2", ["7"]]]], "TM": ["993", "810", "(?:[1-6]\\d|71)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["12"], "(8 $1)"], ["(\\d{3})(\\d)(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[1-5]"], "(8 $1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[67]"], "8 $1"]], "8", 0, 0, 0, 0, 0, 0, "8~10"], "TN": ["216", "00", "[2-57-9]\\d{7}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-57-9]"]]]], "TO": ["676", "00", "(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}", [5, 7], [["(\\d{2})(\\d{3})", "$1-$2", ["[2-4]|50|6[09]|7[0-24-69]|8[05]"]], ["(\\d{4})(\\d{3})", "$1 $2", ["0"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[5-9]"]]]], "TR": ["90", "00", "4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}", [7, 10, 12, 13], [["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["512|8[01589]|90"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["5[0-79]"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24][1-8]|3[1-9]"], "(0$1)", 1], ["(\\d{3})(\\d{3})(\\d{6,7})", "$1 $2 $3", ["80"], "0$1", 1]], "0"], "TT": ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-46-8]\\d{6})$|1", "868$1", 0, "868"], "TV": ["688", "00", "(?:2|7\\d\\d|90)\\d{4}", [5, 6, 7], [["(\\d{2})(\\d{3})", "$1 $2", ["2"]], ["(\\d{2})(\\d{4})", "$1 $2", ["90"]], ["(\\d{2})(\\d{5})", "$1 $2", ["7"]]]], "TW": ["886", "0(?:0[25-79]|19)", "[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}", [7, 8, 9, 10, 11], [["(\\d{2})(\\d)(\\d{4})", "$1 $2 $3", ["202"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["826"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["83"], "0$1"], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["82"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[25]0|37|49|8[09]"], "0$1"], ["(\\d)(\\d{3,4})(\\d{4})", "$1 $2 $3", ["[23568]|4(?:0[02-48]|[1-478])|7[1-9]", "[23568]|4(?:0[2-48]|[1-478])|(?:400|7)[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[49]"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["7"], "0$1"]], "0", 0, 0, 0, 0, 0, 0, 0, "#"], "TZ": ["255", "00[056]", "(?:[25-8]\\d|41|90)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[24]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["5"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[67]"], "0$1"]], "0"], "UA": ["380", "00", "[89]\\d{9}|[3-9]\\d{8}", [9, 10], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]", "6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"], "0$1"], ["(\\d{4})(\\d{5})", "$1 $2", ["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])", "3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[3-7]|89|9[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[89]"], "0$1"]], "0", 0, 0, 0, 0, 0, 0, "0~0"], "UG": ["256", "00[057]", "800\\d{6}|(?:[29]0|[347]\\d)\\d{7}", [9], [["(\\d{4})(\\d{5})", "$1 $2", ["202", "2024"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["[27-9]|4(?:6[45]|[7-9])"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["[34]"], "0$1"]], "0"], "US": ["1", "011", "[2-9]\\d{9}|3\\d{6}", [10], [["(\\d{3})(\\d{4})", "$1-$2", ["310"], 0, 1], ["(\\d{3})(\\d{3})(\\d{4})", "($1) $2-$3", ["[2-9]"], 0, 1, "$1-$2-$3"]], "1", 0, 0, 0, 0, 0, [["(?:274[27]|(?:472|983)[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"], [""], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]], "UY": ["598", "0(?:0|1[3-9]\\d)", "0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13], [["(\\d{4,5})", "$1", ["21"]], ["(\\d{3})(\\d{3,4})", "$1 $2", ["0"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[49]0|8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{4})(\\d{4})", "$1 $2", ["[124]"]], ["(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3 $4", ["0"]]], "0", 0, 0, 0, 0, 0, 0, "00", " int. "], "UZ": ["998", "00", "(?:20|33|[5-9]\\d)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[235-9]"]]]], "VA": ["39", "00", "0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}", [6, 7, 8, 9, 10, 11, 12], 0, 0, 0, 0, 0, 0, "06698"], "VC": ["1", "011", "(?:[58]\\d\\d|784|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "784$1", 0, "784"], "VE": ["58", "00", "[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}", [10], [["(\\d{3})(\\d{7})", "$1-$2", ["[24-689]"], "0$1"]], "0"], "VG": ["1", "011", "(?:284|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-578]\\d{6})$|1", "284$1", 0, "284"], "VI": ["1", "011", "[58]\\d{9}|(?:34|90)0\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "340$1", 0, "340"], "VN": ["84", "00", "[12]\\d{9}|[135-9]\\d{8}|[16]\\d{6,7}|7\\d{6}", [7, 8, 9, 10], [["(\\d{4})(\\d{4,6})", "$1 $2", ["1(?:2[02]|[89])"], 0, 1], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[26]|6"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[357-9]"], "0$1", 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["2[48]"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["2"], "0$1", 1]], "0"], "VU": ["678", "00", "[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}", [5, 7], [["(\\d{3})(\\d{4})", "$1 $2", ["[57-9]"]]]], "WF": ["681", "00", "(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}", [6, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[47-9]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]]]], "WS": ["685", "0", "(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}", [5, 6, 7, 10], [["(\\d{5})", "$1", ["[2-5]|6[1-9]"]], ["(\\d{3})(\\d{3,7})", "$1 $2", ["[68]"]], ["(\\d{2})(\\d{5})", "$1 $2", ["7"]]]], "XK": ["383", "00", "2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{5})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-4]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2|39"], "0$1"], ["(\\d{2})(\\d{7,10})", "$1 $2", ["3"], "0$1"]], "0"], "YE": ["967", "00", "(?:1|7\\d)\\d{7}|[1-7]\\d{6}", [7, 8, 9], [["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-6]|7(?:[24-6]|8[0-7])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["7"], "0$1"]], "0"], "YT": ["262", "00", "(?:639\\d|7093)\\d{5}|(?:26|80|9\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [["26(?:89\\d|9(?:0[0-467]|15|5[0-4]|6\\d|[78]0))\\d{4}"], ["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"], ["80\\d{7}"], 0, 0, 0, 0, 0, ["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]], "ZA": ["27", "00", "[1-79]\\d{8}|8\\d{4,9}", [5, 6, 7, 8, 9, 10], [["(\\d{2})(\\d{3,4})", "$1 $2", ["8[1-4]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["8[1-4]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["860"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"]], "0"], "ZM": ["260", "00", "800\\d{6}|(?:21|[579]\\d|63)\\d{7}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[28]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["[579]"], "0$1"]], "0"], "ZW": ["263", "00", "2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}", [5, 6, 7, 8, 9, 10], [["(\\d{3})(\\d{3,5})", "$1 $2", ["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"], "0$1"], ["(\\d)(\\d{3})(\\d{2,4})", "$1 $2 $3", ["[49]"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["80"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2", "2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)", "2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"], "0$1"], ["(\\d{4})(\\d{6})", "$1 $2", ["8"], "0$1"], ["(\\d{2})(\\d{3,5})", "$1 $2", ["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["29[013-9]|39|54"], "0$1"], ["(\\d{4})(\\d{3,5})", "$1 $2", ["(?:25|54)8", "258|5483"], "0$1"]], "0"] }, "nonGeographic": { "800": ["800", 0, "(?:00|[1-9]\\d)\\d{6}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["\\d"]]], 0, 0, 0, 0, 0, 0, [0, 0, ["(?:00|[1-9]\\d)\\d{6}"]]], "808": ["808", 0, "[1-9]\\d{7}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[1-9]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, 0, ["[1-9]\\d{7}"]]], "870": ["870", 0, "7\\d{11}|[235-7]\\d{8}", [9, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235-7]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"], 0, 0, 0, 0, 0, 0, ["2\\d{8}", [9]]]], "878": ["878", 0, "10\\d{10}", [12], [["(\\d{2})(\\d{5})(\\d{5})", "$1 $2 $3", ["1"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, ["10\\d{10}"]]], "881": ["881", 0, "6\\d{9}|[0-36-9]\\d{8}", [9, 10], [["(\\d)(\\d{3})(\\d{5})", "$1 $2 $3", ["[0-37-9]"]], ["(\\d)(\\d{3})(\\d{5,6})", "$1 $2 $3", ["6"]]], 0, 0, 0, 0, 0, 0, [0, ["6\\d{9}|[0-36-9]\\d{8}"]]], "882": ["882", 0, "[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?", [7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{5})", "$1 $2", ["16|342"]], ["(\\d{2})(\\d{6})", "$1 $2", ["49"]], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["1[36]|9"]], ["(\\d{2})(\\d{4})(\\d{3})", "$1 $2 $3", ["3[23]"]], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["16"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["10|23|3(?:[15]|4[57])|4|5[12]"]], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["34"]], ["(\\d{2})(\\d{4,5})(\\d{5})", "$1 $2 $3", ["[1-35]"]]], 0, 0, 0, 0, 0, 0, [0, ["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}", [7, 8, 9, 10, 12]], 0, 0, 0, ["348[57]\\d{7}", [11]], 0, 0, ["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]], "883": ["883", 0, "(?:[1-4]\\d|51)\\d{6,10}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{2,8})", "$1 $2 $3", ["[14]|2[24-689]|3[02-689]|51[24-9]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["510"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["21"]], ["(\\d{4})(\\d{4})(\\d{4})", "$1 $2 $3", ["51[13]"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[235]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, ["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]], "888": ["888", 0, "\\d{11}", [11], [["(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3"]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, ["\\d{11}"]]], "979": ["979", 0, "[1359]\\d{8}", [9], [["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[1359]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, ["[1359]\\d{8}"]]] } };
|
|
8148
9693
|
|
|
8149
9694
|
// ../../node_modules/libphonenumber-js/min/exports/withMetadataArgument.js
|
|
8150
9695
|
function withMetadataArgument(func, _arguments) {
|
|
@@ -8179,6 +9724,12 @@ function isObject(object) {
|
|
|
8179
9724
|
return object !== void 0 && object !== null && object.constructor === objectConstructor;
|
|
8180
9725
|
}
|
|
8181
9726
|
|
|
9727
|
+
// ../../node_modules/libphonenumber-js/es6/helpers/isCallingCode.js
|
|
9728
|
+
var CALLING_CODE_REG_EXP = /^\d+$/;
|
|
9729
|
+
function isCallingCode(string) {
|
|
9730
|
+
return CALLING_CODE_REG_EXP.test(string);
|
|
9731
|
+
}
|
|
9732
|
+
|
|
8182
9733
|
// ../../node_modules/libphonenumber-js/es6/metadata.js
|
|
8183
9734
|
function _typeof(o) {
|
|
8184
9735
|
"@babel/helpers - typeof";
|
|
@@ -8217,7 +9768,6 @@ function _toPrimitive(t, r) {
|
|
|
8217
9768
|
var V3 = "1.2.0";
|
|
8218
9769
|
var V4 = "1.7.35";
|
|
8219
9770
|
var DEFAULT_EXT_PREFIX = " ext. ";
|
|
8220
|
-
var CALLING_CODE_REG_EXP = /^\d+$/;
|
|
8221
9771
|
var Metadata = /* @__PURE__ */ (function() {
|
|
8222
9772
|
function Metadata2(metadata) {
|
|
8223
9773
|
_classCallCheck(this, Metadata2);
|
|
@@ -8280,18 +9830,32 @@ var Metadata = /* @__PURE__ */ (function() {
|
|
|
8280
9830
|
value: function country(countryCode) {
|
|
8281
9831
|
return this.selectNumberingPlan(countryCode);
|
|
8282
9832
|
}
|
|
9833
|
+
/**
|
|
9834
|
+
* Selects a telephone numbering plan based on either a country code or a calling code.
|
|
9835
|
+
* @param {string} argument — Country code or calling code.
|
|
9836
|
+
* @param {string} legacyArgumentCallingCode — Legacy argument: calling code, if the first argument is not passed.
|
|
9837
|
+
*/
|
|
8283
9838
|
}, {
|
|
8284
9839
|
key: "selectNumberingPlan",
|
|
8285
|
-
value: function selectNumberingPlan(
|
|
8286
|
-
|
|
8287
|
-
|
|
8288
|
-
|
|
9840
|
+
value: function selectNumberingPlan(argument, legacyArgumentCallingCode) {
|
|
9841
|
+
var countryCode;
|
|
9842
|
+
var callingCode;
|
|
9843
|
+
if (argument) {
|
|
9844
|
+
if (isCallingCode(argument)) {
|
|
9845
|
+
callingCode = argument;
|
|
9846
|
+
} else {
|
|
9847
|
+
countryCode = argument;
|
|
9848
|
+
}
|
|
9849
|
+
}
|
|
9850
|
+
if (legacyArgumentCallingCode) {
|
|
9851
|
+
callingCode = legacyArgumentCallingCode;
|
|
8289
9852
|
}
|
|
8290
9853
|
if (countryCode && countryCode !== "001") {
|
|
8291
|
-
|
|
9854
|
+
var countryMetadata = this.getCountryMetadata(countryCode);
|
|
9855
|
+
if (!countryMetadata) {
|
|
8292
9856
|
throw new Error("Unknown country: ".concat(countryCode));
|
|
8293
9857
|
}
|
|
8294
|
-
this.numberingPlan = new NumberingPlan(
|
|
9858
|
+
this.numberingPlan = new NumberingPlan(countryMetadata, this);
|
|
8295
9859
|
} else if (callingCode) {
|
|
8296
9860
|
if (!this.hasCallingCode(callingCode)) {
|
|
8297
9861
|
throw new Error("Unknown calling code: ".concat(callingCode));
|
|
@@ -8443,16 +10007,28 @@ var NumberingPlan = /* @__PURE__ */ (function() {
|
|
|
8443
10007
|
value: function callingCode() {
|
|
8444
10008
|
return this.metadata[0];
|
|
8445
10009
|
}
|
|
8446
|
-
//
|
|
8447
|
-
//
|
|
8448
|
-
//
|
|
8449
|
-
//
|
|
8450
|
-
//
|
|
8451
|
-
//
|
|
10010
|
+
// When multiple countries share the same calling code,
|
|
10011
|
+
// all phone number formatting rules are included in the metadata
|
|
10012
|
+
// of the "default" country for that calling code.
|
|
10013
|
+
// Any other countries' metdata doesn't include any formatting rules.
|
|
10014
|
+
// Google developers said that such storage architecture was chosen for performance reasons.
|
|
10015
|
+
//
|
|
10016
|
+
// For example, for NANPA region ("North American Numbering Plan Administration",
|
|
10017
|
+
// which includes USA, Canada, Cayman Islands, Bahamas, etc) all formatting rules
|
|
10018
|
+
// are contained in the metadata of `US` country.
|
|
10019
|
+
//
|
|
10020
|
+
// This is not public API.
|
|
10021
|
+
//
|
|
10022
|
+
}, {
|
|
10023
|
+
key: "_getDefaultCountryMetadataForThisCallingCode",
|
|
10024
|
+
value: function _getDefaultCountryMetadataForThisCallingCode() {
|
|
10025
|
+
return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode());
|
|
10026
|
+
}
|
|
10027
|
+
// Deprecated.
|
|
8452
10028
|
}, {
|
|
8453
10029
|
key: "getDefaultCountryMetadataForRegion",
|
|
8454
10030
|
value: function getDefaultCountryMetadataForRegion() {
|
|
8455
|
-
return this.
|
|
10031
|
+
return this._getDefaultCountryMetadataForThisCallingCode();
|
|
8456
10032
|
}
|
|
8457
10033
|
// Is always present.
|
|
8458
10034
|
}, {
|
|
@@ -8493,7 +10069,7 @@ var NumberingPlan = /* @__PURE__ */ (function() {
|
|
|
8493
10069
|
key: "formats",
|
|
8494
10070
|
value: function formats() {
|
|
8495
10071
|
var _this = this;
|
|
8496
|
-
var formats2 = this._getFormats(this.metadata) || this._getFormats(this.
|
|
10072
|
+
var formats2 = this._getFormats(this.metadata) || this._getFormats(this._getDefaultCountryMetadataForThisCallingCode()) || [];
|
|
8497
10073
|
return formats2.map(function(_) {
|
|
8498
10074
|
return new Format(_, _this);
|
|
8499
10075
|
});
|
|
@@ -8514,7 +10090,7 @@ var NumberingPlan = /* @__PURE__ */ (function() {
|
|
|
8514
10090
|
}, {
|
|
8515
10091
|
key: "nationalPrefixFormattingRule",
|
|
8516
10092
|
value: function nationalPrefixFormattingRule() {
|
|
8517
|
-
return this._getNationalPrefixFormattingRule(this.metadata) || this._getNationalPrefixFormattingRule(this.
|
|
10093
|
+
return this._getNationalPrefixFormattingRule(this.metadata) || this._getNationalPrefixFormattingRule(this._getDefaultCountryMetadataForThisCallingCode());
|
|
8518
10094
|
}
|
|
8519
10095
|
}, {
|
|
8520
10096
|
key: "_nationalPrefixForParsing",
|
|
@@ -8543,7 +10119,7 @@ var NumberingPlan = /* @__PURE__ */ (function() {
|
|
|
8543
10119
|
}, {
|
|
8544
10120
|
key: "nationalPrefixIsOptionalWhenFormattingInNationalFormat",
|
|
8545
10121
|
value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() {
|
|
8546
|
-
return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata) || this._getNationalPrefixIsOptionalWhenFormatting(this.
|
|
10122
|
+
return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata) || this._getNationalPrefixIsOptionalWhenFormatting(this._getDefaultCountryMetadataForThisCallingCode());
|
|
8547
10123
|
}
|
|
8548
10124
|
}, {
|
|
8549
10125
|
key: "leadingDigits",
|
|
@@ -8684,15 +10260,15 @@ function validateMetadata(metadata) {
|
|
|
8684
10260
|
var typeOf = function typeOf2(_) {
|
|
8685
10261
|
return _typeof(_);
|
|
8686
10262
|
};
|
|
8687
|
-
function getCountryCallingCode(country,
|
|
8688
|
-
metadata = new Metadata(
|
|
10263
|
+
function getCountryCallingCode(country, metadataJson) {
|
|
10264
|
+
var metadata = new Metadata(metadataJson);
|
|
8689
10265
|
if (metadata.hasCountry(country)) {
|
|
8690
10266
|
return metadata.selectNumberingPlan(country).countryCallingCode();
|
|
8691
10267
|
}
|
|
8692
10268
|
throw new Error("Unknown country: ".concat(country));
|
|
8693
10269
|
}
|
|
8694
|
-
function isSupportedCountry(country,
|
|
8695
|
-
return
|
|
10270
|
+
function isSupportedCountry(country, metadataJson) {
|
|
10271
|
+
return metadataJson.countries.hasOwnProperty(country);
|
|
8696
10272
|
}
|
|
8697
10273
|
function setVersion(metadata) {
|
|
8698
10274
|
var version = metadata.version;
|
|
@@ -8754,9 +10330,9 @@ function mergeArrays(a, b) {
|
|
|
8754
10330
|
|
|
8755
10331
|
// ../../node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js
|
|
8756
10332
|
function checkNumberLength(nationalNumber, country, metadata) {
|
|
8757
|
-
return checkNumberLengthForType(nationalNumber,
|
|
10333
|
+
return checkNumberLengthForType(nationalNumber, void 0, country, metadata);
|
|
8758
10334
|
}
|
|
8759
|
-
function checkNumberLengthForType(nationalNumber,
|
|
10335
|
+
function checkNumberLengthForType(nationalNumber, type, country, metadata) {
|
|
8760
10336
|
if (country) {
|
|
8761
10337
|
metadata = new Metadata(metadata.metadata);
|
|
8762
10338
|
metadata.selectNumberingPlan(country);
|
|
@@ -8768,7 +10344,7 @@ function checkNumberLengthForType(nationalNumber, country, type, metadata) {
|
|
|
8768
10344
|
}
|
|
8769
10345
|
if (type === "FIXED_LINE_OR_MOBILE") {
|
|
8770
10346
|
if (!metadata.type("FIXED_LINE")) {
|
|
8771
|
-
return checkNumberLengthForType(nationalNumber,
|
|
10347
|
+
return checkNumberLengthForType(nationalNumber, "MOBILE", country, metadata);
|
|
8772
10348
|
}
|
|
8773
10349
|
var mobile_type = metadata.type("MOBILE");
|
|
8774
10350
|
if (mobile_type) {
|
|
@@ -8792,16 +10368,16 @@ function checkNumberLengthForType(nationalNumber, country, type, metadata) {
|
|
|
8792
10368
|
}
|
|
8793
10369
|
|
|
8794
10370
|
// ../../node_modules/libphonenumber-js/es6/isPossible.js
|
|
8795
|
-
function isPossiblePhoneNumber(input, options,
|
|
10371
|
+
function isPossiblePhoneNumber(input, options, metadataJson) {
|
|
8796
10372
|
if (options === void 0) {
|
|
8797
10373
|
options = {};
|
|
8798
10374
|
}
|
|
8799
|
-
metadata = new Metadata(
|
|
10375
|
+
var metadata = new Metadata(metadataJson);
|
|
8800
10376
|
if (options.v2) {
|
|
8801
10377
|
if (!input.countryCallingCode) {
|
|
8802
10378
|
throw new Error("Invalid phone number object passed");
|
|
8803
10379
|
}
|
|
8804
|
-
metadata.selectNumberingPlan(input.countryCallingCode);
|
|
10380
|
+
metadata.selectNumberingPlan(input.country || input.countryCallingCode);
|
|
8805
10381
|
} else {
|
|
8806
10382
|
if (!input.phone) {
|
|
8807
10383
|
return false;
|
|
@@ -8819,17 +10395,15 @@ function isPossiblePhoneNumber(input, options, metadata) {
|
|
|
8819
10395
|
}
|
|
8820
10396
|
}
|
|
8821
10397
|
if (metadata.possibleLengths()) {
|
|
8822
|
-
return isPossibleNumber(input.phone || input.nationalNumber,
|
|
8823
|
-
}
|
|
8824
|
-
|
|
8825
|
-
|
|
8826
|
-
} else {
|
|
8827
|
-
throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.');
|
|
8828
|
-
}
|
|
10398
|
+
return isPossibleNumber(input.phone || input.nationalNumber, metadata);
|
|
10399
|
+
}
|
|
10400
|
+
if (input.countryCallingCode && metadata.isNonGeographicCallingCode(input.countryCallingCode)) {
|
|
10401
|
+
return true;
|
|
8829
10402
|
}
|
|
10403
|
+
throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.');
|
|
8830
10404
|
}
|
|
8831
|
-
function isPossibleNumber(nationalNumber,
|
|
8832
|
-
switch (checkNumberLength(nationalNumber,
|
|
10405
|
+
function isPossibleNumber(nationalNumber, metadata) {
|
|
10406
|
+
switch (checkNumberLength(nationalNumber, void 0, metadata)) {
|
|
8833
10407
|
case "IS_POSSIBLE":
|
|
8834
10408
|
return true;
|
|
8835
10409
|
// This library ignores "local-only" phone numbers (for simplicity).
|
|
@@ -8873,13 +10447,13 @@ function _arrayLikeToArray2(r, a) {
|
|
|
8873
10447
|
return n;
|
|
8874
10448
|
}
|
|
8875
10449
|
var NON_FIXED_LINE_PHONE_TYPES = ["MOBILE", "PREMIUM_RATE", "TOLL_FREE", "SHARED_COST", "VOIP", "PERSONAL_NUMBER", "PAGER", "UAN", "VOICEMAIL"];
|
|
8876
|
-
function getNumberType(input, options,
|
|
10450
|
+
function getNumberType(input, options, metadataJson) {
|
|
8877
10451
|
options = options || {};
|
|
8878
10452
|
if (!input.country && !input.countryCallingCode) {
|
|
8879
10453
|
return;
|
|
8880
10454
|
}
|
|
8881
|
-
metadata = new Metadata(
|
|
8882
|
-
metadata.selectNumberingPlan(input.country
|
|
10455
|
+
var metadata = new Metadata(metadataJson);
|
|
10456
|
+
metadata.selectNumberingPlan(input.country || input.countryCallingCode);
|
|
8883
10457
|
var nationalNumber = options.v2 ? input.nationalNumber : input.phone;
|
|
8884
10458
|
if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern())) {
|
|
8885
10459
|
return;
|
|
@@ -8915,10 +10489,10 @@ function isNumberTypeEqualTo(nationalNumber, type, metadata) {
|
|
|
8915
10489
|
}
|
|
8916
10490
|
|
|
8917
10491
|
// ../../node_modules/libphonenumber-js/es6/isValid.js
|
|
8918
|
-
function isValidNumber(input, options,
|
|
10492
|
+
function isValidNumber(input, options, metadataJson) {
|
|
8919
10493
|
options = options || {};
|
|
8920
|
-
metadata = new Metadata(
|
|
8921
|
-
metadata.selectNumberingPlan(input.country
|
|
10494
|
+
var metadata = new Metadata(metadataJson);
|
|
10495
|
+
metadata.selectNumberingPlan(input.country || input.countryCallingCode);
|
|
8922
10496
|
if (metadata.hasTypes()) {
|
|
8923
10497
|
return getNumberType(input, options, metadata.metadata) !== void 0;
|
|
8924
10498
|
}
|
|
@@ -8926,6 +10500,36 @@ function isValidNumber(input, options, metadata) {
|
|
|
8926
10500
|
return matchesEntirely(nationalNumber, metadata.nationalNumberPattern());
|
|
8927
10501
|
}
|
|
8928
10502
|
|
|
10503
|
+
// ../../node_modules/libphonenumber-js/es6/helpers/isCountryCode.js
|
|
10504
|
+
var COUNTRY_CODE_REG_EXP = /^[A-Z]{2}$/;
|
|
10505
|
+
function isCountryCode(string) {
|
|
10506
|
+
return COUNTRY_CODE_REG_EXP.test(string);
|
|
10507
|
+
}
|
|
10508
|
+
|
|
10509
|
+
// ../../node_modules/libphonenumber-js/es6/helpers/getCountryAndCallingCodeFromOneOfThem.js
|
|
10510
|
+
var USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;
|
|
10511
|
+
function getCountryAndCallingCodeFromOneOfThem(countryOrCallingCode, metadataJson) {
|
|
10512
|
+
var country;
|
|
10513
|
+
var callingCode;
|
|
10514
|
+
var metadata = new Metadata(metadataJson);
|
|
10515
|
+
if (isCountryCode(countryOrCallingCode)) {
|
|
10516
|
+
country = countryOrCallingCode;
|
|
10517
|
+
metadata.selectNumberingPlan(country);
|
|
10518
|
+
callingCode = metadata.countryCallingCode();
|
|
10519
|
+
} else {
|
|
10520
|
+
callingCode = countryOrCallingCode;
|
|
10521
|
+
if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {
|
|
10522
|
+
if (metadata.isNonGeographicCallingCode(callingCode)) {
|
|
10523
|
+
country = "001";
|
|
10524
|
+
}
|
|
10525
|
+
}
|
|
10526
|
+
}
|
|
10527
|
+
return {
|
|
10528
|
+
country,
|
|
10529
|
+
callingCode
|
|
10530
|
+
};
|
|
10531
|
+
}
|
|
10532
|
+
|
|
8929
10533
|
// ../../node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js
|
|
8930
10534
|
function getPossibleCountriesForNumber(callingCode, nationalNumber, metadata) {
|
|
8931
10535
|
var _metadata = new Metadata(metadata);
|
|
@@ -8937,13 +10541,10 @@ function getPossibleCountriesForNumber(callingCode, nationalNumber, metadata) {
|
|
|
8937
10541
|
return couldNationalNumberBelongToCountry(nationalNumber, country, metadata);
|
|
8938
10542
|
});
|
|
8939
10543
|
}
|
|
8940
|
-
function couldNationalNumberBelongToCountry(nationalNumber, country,
|
|
8941
|
-
var
|
|
8942
|
-
|
|
8943
|
-
|
|
8944
|
-
return true;
|
|
8945
|
-
}
|
|
8946
|
-
return false;
|
|
10544
|
+
function couldNationalNumberBelongToCountry(nationalNumber, country, metadataJson) {
|
|
10545
|
+
var metadata = new Metadata(metadataJson);
|
|
10546
|
+
metadata.selectNumberingPlan(country);
|
|
10547
|
+
return metadata.numberingPlan.possibleLengths().indexOf(nationalNumber.length) >= 0;
|
|
8947
10548
|
}
|
|
8948
10549
|
|
|
8949
10550
|
// ../../node_modules/libphonenumber-js/es6/constants.js
|
|
@@ -8962,13 +10563,13 @@ var PLUS_CHARS = "+\uFF0B";
|
|
|
8962
10563
|
|
|
8963
10564
|
// ../../node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js
|
|
8964
10565
|
var CAPTURING_DIGIT_PATTERN = new RegExp("([" + VALID_DIGITS + "])");
|
|
8965
|
-
function stripIddPrefix(number, country, callingCode,
|
|
10566
|
+
function stripIddPrefix(number, country, callingCode, metadataJson) {
|
|
8966
10567
|
if (!country) {
|
|
8967
10568
|
return;
|
|
8968
10569
|
}
|
|
8969
|
-
var
|
|
8970
|
-
|
|
8971
|
-
var IDDPrefixPattern = new RegExp(
|
|
10570
|
+
var metadata = new Metadata(metadataJson);
|
|
10571
|
+
metadata.selectNumberingPlan(country || callingCode);
|
|
10572
|
+
var IDDPrefixPattern = new RegExp(metadata.IDDPrefix());
|
|
8972
10573
|
if (number.search(IDDPrefixPattern) !== 0) {
|
|
8973
10574
|
return;
|
|
8974
10575
|
}
|
|
@@ -9051,18 +10652,17 @@ function _arrayLikeToArray3(r, a) {
|
|
|
9051
10652
|
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
9052
10653
|
return n;
|
|
9053
10654
|
}
|
|
9054
|
-
function getCountryByNationalNumber(
|
|
9055
|
-
var
|
|
9056
|
-
metadata = new Metadata(metadata);
|
|
10655
|
+
function getCountryByNationalNumber(nationalNumber, countries, metadataJson) {
|
|
10656
|
+
var metadata = new Metadata(metadataJson);
|
|
9057
10657
|
for (var _iterator = _createForOfIteratorHelperLoose3(countries), _step; !(_step = _iterator()).done; ) {
|
|
9058
10658
|
var country = _step.value;
|
|
9059
10659
|
metadata.selectNumberingPlan(country);
|
|
9060
10660
|
if (metadata.leadingDigits()) {
|
|
9061
|
-
if (
|
|
10661
|
+
if (nationalNumber && nationalNumber.search(metadata.leadingDigits()) === 0) {
|
|
9062
10662
|
return country;
|
|
9063
10663
|
}
|
|
9064
10664
|
} else if (getNumberType({
|
|
9065
|
-
phone:
|
|
10665
|
+
phone: nationalNumber,
|
|
9066
10666
|
country
|
|
9067
10667
|
}, void 0, metadata.metadata)) {
|
|
9068
10668
|
return country;
|
|
@@ -9071,10 +10671,10 @@ function getCountryByNationalNumber(nationalPhoneNumber, _ref) {
|
|
|
9071
10671
|
}
|
|
9072
10672
|
|
|
9073
10673
|
// ../../node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js
|
|
9074
|
-
var
|
|
10674
|
+
var USE_NON_GEOGRAPHIC_COUNTRY_CODE2 = false;
|
|
9075
10675
|
function getCountryByCallingCode(callingCode, _ref) {
|
|
9076
|
-
var
|
|
9077
|
-
if (
|
|
10676
|
+
var nationalNumber = _ref.nationalNumber, metadata = _ref.metadata;
|
|
10677
|
+
if (USE_NON_GEOGRAPHIC_COUNTRY_CODE2) {
|
|
9078
10678
|
if (metadata.isNonGeographicCallingCode(callingCode)) {
|
|
9079
10679
|
return "001";
|
|
9080
10680
|
}
|
|
@@ -9086,10 +10686,7 @@ function getCountryByCallingCode(callingCode, _ref) {
|
|
|
9086
10686
|
if (possibleCountries.length === 1) {
|
|
9087
10687
|
return possibleCountries[0];
|
|
9088
10688
|
}
|
|
9089
|
-
return getCountryByNationalNumber(
|
|
9090
|
-
countries: possibleCountries,
|
|
9091
|
-
metadata: metadata.metadata
|
|
9092
|
-
});
|
|
10689
|
+
return getCountryByNationalNumber(nationalNumber, possibleCountries, metadata.metadata);
|
|
9093
10690
|
}
|
|
9094
10691
|
|
|
9095
10692
|
// ../../node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js
|
|
@@ -9137,15 +10734,20 @@ function isPossibleIncompleteNationalNumber(nationalNumber, country, metadata) {
|
|
|
9137
10734
|
}
|
|
9138
10735
|
|
|
9139
10736
|
// ../../node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js
|
|
9140
|
-
function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, defaultCountry, defaultCallingCode,
|
|
9141
|
-
|
|
10737
|
+
function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, defaultCountry, defaultCallingCode, metadataJson) {
|
|
10738
|
+
if (!(country || defaultCountry || defaultCallingCode)) {
|
|
10739
|
+
return {
|
|
10740
|
+
number
|
|
10741
|
+
};
|
|
10742
|
+
}
|
|
10743
|
+
var countryCallingCode = country || defaultCountry ? getCountryCallingCode(country || defaultCountry, metadataJson) : defaultCallingCode;
|
|
9142
10744
|
if (number.indexOf(countryCallingCode) === 0) {
|
|
9143
|
-
metadata = new Metadata(
|
|
9144
|
-
metadata.selectNumberingPlan(country || defaultCountry
|
|
10745
|
+
var metadata = new Metadata(metadataJson);
|
|
10746
|
+
metadata.selectNumberingPlan(country || defaultCountry || defaultCallingCode);
|
|
9145
10747
|
var possibleShorterNumber = number.slice(countryCallingCode.length);
|
|
9146
|
-
var _extractNationalNumbe = extractNationalNumber(possibleShorterNumber,
|
|
9147
|
-
var _extractNationalNumbe2 = extractNationalNumber(number,
|
|
9148
|
-
if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) && matchesEntirely(possibleShorterNationalNumber, metadata.nationalNumberPattern()) || checkNumberLength(nationalNumber,
|
|
10748
|
+
var _extractNationalNumbe = extractNationalNumber(possibleShorterNumber, void 0, metadata), possibleShorterNationalNumber = _extractNationalNumbe.nationalNumber;
|
|
10749
|
+
var _extractNationalNumbe2 = extractNationalNumber(number, void 0, metadata), nationalNumber = _extractNationalNumbe2.nationalNumber;
|
|
10750
|
+
if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) && matchesEntirely(possibleShorterNationalNumber, metadata.nationalNumberPattern()) || checkNumberLength(nationalNumber, void 0, metadata) === "TOO_LONG") {
|
|
9149
10751
|
return {
|
|
9150
10752
|
countryCallingCode,
|
|
9151
10753
|
number: possibleShorterNumber
|
|
@@ -9158,19 +10760,19 @@ function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number,
|
|
|
9158
10760
|
}
|
|
9159
10761
|
|
|
9160
10762
|
// ../../node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js
|
|
9161
|
-
function extractCountryCallingCode(number, country, defaultCountry, defaultCallingCode,
|
|
10763
|
+
function extractCountryCallingCode(number, country, defaultCountry, defaultCallingCode, metadataJson) {
|
|
9162
10764
|
if (!number) {
|
|
9163
10765
|
return {};
|
|
9164
10766
|
}
|
|
9165
10767
|
var isNumberWithIddPrefix;
|
|
9166
10768
|
if (number[0] !== "+") {
|
|
9167
|
-
var numberWithoutIDD = stripIddPrefix(number, country || defaultCountry, defaultCallingCode,
|
|
10769
|
+
var numberWithoutIDD = stripIddPrefix(number, country || defaultCountry, defaultCallingCode, metadataJson);
|
|
9168
10770
|
if (numberWithoutIDD && numberWithoutIDD !== number) {
|
|
9169
10771
|
isNumberWithIddPrefix = true;
|
|
9170
10772
|
number = "+" + numberWithoutIDD;
|
|
9171
10773
|
} else {
|
|
9172
10774
|
if (country || defaultCountry || defaultCallingCode) {
|
|
9173
|
-
var _extractCountryCallin = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, defaultCountry, defaultCallingCode,
|
|
10775
|
+
var _extractCountryCallin = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, defaultCountry, defaultCallingCode, metadataJson), countryCallingCode = _extractCountryCallin.countryCallingCode, shorterNumber = _extractCountryCallin.number;
|
|
9174
10776
|
if (countryCallingCode) {
|
|
9175
10777
|
return {
|
|
9176
10778
|
countryCallingCodeSource: "FROM_NUMBER_WITHOUT_PLUS_SIGN",
|
|
@@ -9189,7 +10791,7 @@ function extractCountryCallingCode(number, country, defaultCountry, defaultCalli
|
|
|
9189
10791
|
if (number[1] === "0") {
|
|
9190
10792
|
return {};
|
|
9191
10793
|
}
|
|
9192
|
-
metadata = new Metadata(
|
|
10794
|
+
var metadata = new Metadata(metadataJson);
|
|
9193
10795
|
var i = 2;
|
|
9194
10796
|
while (i - 1 <= MAX_LENGTH_COUNTRY_CODE && i <= number.length) {
|
|
9195
10797
|
var _countryCallingCode = number.slice(1, i);
|
|
@@ -9241,7 +10843,7 @@ function formatNationalNumberUsingFormat(number, format, _ref) {
|
|
|
9241
10843
|
var SINGLE_IDD_PREFIX_REG_EXP = /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;
|
|
9242
10844
|
function getIddPrefix(country, callingCode, metadata) {
|
|
9243
10845
|
var countryMetadata = new Metadata(metadata);
|
|
9244
|
-
countryMetadata.selectNumberingPlan(country
|
|
10846
|
+
countryMetadata.selectNumberingPlan(country || callingCode);
|
|
9245
10847
|
if (countryMetadata.defaultIDDPrefix()) {
|
|
9246
10848
|
return countryMetadata.defaultIDDPrefix();
|
|
9247
10849
|
}
|
|
@@ -9313,13 +10915,13 @@ var DEFAULT_OPTIONS = {
|
|
|
9313
10915
|
return "".concat(formattedNumber).concat(metadata.ext()).concat(extension);
|
|
9314
10916
|
}
|
|
9315
10917
|
};
|
|
9316
|
-
function formatNumber(input, format, options,
|
|
10918
|
+
function formatNumber(input, format, options, metadataJson) {
|
|
9317
10919
|
if (options) {
|
|
9318
10920
|
options = merge({}, DEFAULT_OPTIONS, options);
|
|
9319
10921
|
} else {
|
|
9320
10922
|
options = DEFAULT_OPTIONS;
|
|
9321
10923
|
}
|
|
9322
|
-
metadata = new Metadata(
|
|
10924
|
+
var metadata = new Metadata(metadataJson);
|
|
9323
10925
|
if (input.country && input.country !== "001") {
|
|
9324
10926
|
if (!metadata.hasCountry(input.country)) {
|
|
9325
10927
|
throw new Error("Unknown country: ".concat(input.country));
|
|
@@ -9493,7 +11095,6 @@ function _toPrimitive2(t, r) {
|
|
|
9493
11095
|
}
|
|
9494
11096
|
return ("string" === r ? String : Number)(t);
|
|
9495
11097
|
}
|
|
9496
|
-
var USE_NON_GEOGRAPHIC_COUNTRY_CODE2 = false;
|
|
9497
11098
|
var PhoneNumber = /* @__PURE__ */ (function() {
|
|
9498
11099
|
function PhoneNumber2(countryOrCountryCallingCode, nationalNumber, metadata) {
|
|
9499
11100
|
_classCallCheck2(this, PhoneNumber2);
|
|
@@ -9526,7 +11127,7 @@ var PhoneNumber = /* @__PURE__ */ (function() {
|
|
|
9526
11127
|
throw new TypeError("`nationalNumber` argument must be a string");
|
|
9527
11128
|
}
|
|
9528
11129
|
validateMetadata(metadata);
|
|
9529
|
-
var
|
|
11130
|
+
var _getCountryAndCalling = getCountryAndCallingCodeFromOneOfThem(countryOrCountryCallingCode, metadata), country = _getCountryAndCalling.country, countryCallingCode = _getCountryAndCalling.callingCode;
|
|
9530
11131
|
this.country = country;
|
|
9531
11132
|
this.countryCallingCode = countryCallingCode;
|
|
9532
11133
|
this.nationalNumber = nationalNumber;
|
|
@@ -9573,16 +11174,29 @@ var PhoneNumber = /* @__PURE__ */ (function() {
|
|
|
9573
11174
|
value: function isEqual(phoneNumber) {
|
|
9574
11175
|
return this.number === phoneNumber.number && this.ext === phoneNumber.ext;
|
|
9575
11176
|
}
|
|
9576
|
-
//
|
|
9577
|
-
//
|
|
9578
|
-
//
|
|
9579
|
-
//
|
|
9580
|
-
//
|
|
9581
|
-
//
|
|
11177
|
+
// `validateLength()` method was originally meant to be an equivalent for `validatePhoneNumberLength()`.
|
|
11178
|
+
//
|
|
11179
|
+
// Later, it became apparent that it's not really a true equivalent.
|
|
11180
|
+
// The reason is that a `PhoneNumber` instance is not created
|
|
11181
|
+
// when the phone number string is too short for it to be considered a valid phone number:
|
|
11182
|
+
// * When there must be at least 2 national (significant) number digits: `"1"`.
|
|
11183
|
+
// * When the country calling code part of an international number is incomplete: `"+12"`.
|
|
11184
|
+
//
|
|
11185
|
+
// So leaving this `validateLength()` method here would suggest a hidden anti-pattern
|
|
11186
|
+
// of using it instead of `validatePhoneNumberLength()` while ignoring
|
|
11187
|
+
// the "too short to be even possible" case from phone number length validation.
|
|
11188
|
+
// And ignoring that case wouldn't make any sense in a real-world application
|
|
11189
|
+
// because it would still be a valid case that should be handled.
|
|
11190
|
+
//
|
|
11191
|
+
// Because of that, this method was eventually commented out in order to not introduce
|
|
11192
|
+
// that kind of an anti-pattern.
|
|
11193
|
+
//
|
|
9582
11194
|
// validateLength() {
|
|
9583
|
-
// const
|
|
9584
|
-
//
|
|
9585
|
-
//
|
|
11195
|
+
// const result = checkNumberLength(
|
|
11196
|
+
// this.nationalNumber,
|
|
11197
|
+
// undefined,
|
|
11198
|
+
// this.getMetadata()
|
|
11199
|
+
// )
|
|
9586
11200
|
// if (result !== 'IS_POSSIBLE') {
|
|
9587
11201
|
// return result
|
|
9588
11202
|
// }
|
|
@@ -9620,30 +11234,6 @@ var PhoneNumber = /* @__PURE__ */ (function() {
|
|
|
9620
11234
|
}
|
|
9621
11235
|
}]);
|
|
9622
11236
|
})();
|
|
9623
|
-
var isCountryCode = function isCountryCode2(value) {
|
|
9624
|
-
return /^[A-Z]{2}$/.test(value);
|
|
9625
|
-
};
|
|
9626
|
-
function getCountryAndCountryCallingCode(countryOrCountryCallingCode, metadataJson) {
|
|
9627
|
-
var country;
|
|
9628
|
-
var countryCallingCode;
|
|
9629
|
-
var metadata = new Metadata(metadataJson);
|
|
9630
|
-
if (isCountryCode(countryOrCountryCallingCode)) {
|
|
9631
|
-
country = countryOrCountryCallingCode;
|
|
9632
|
-
metadata.selectNumberingPlan(country);
|
|
9633
|
-
countryCallingCode = metadata.countryCallingCode();
|
|
9634
|
-
} else {
|
|
9635
|
-
countryCallingCode = countryOrCountryCallingCode;
|
|
9636
|
-
if (USE_NON_GEOGRAPHIC_COUNTRY_CODE2) {
|
|
9637
|
-
if (metadata.isNonGeographicCallingCode(countryCallingCode)) {
|
|
9638
|
-
country = "001";
|
|
9639
|
-
}
|
|
9640
|
-
}
|
|
9641
|
-
}
|
|
9642
|
-
return {
|
|
9643
|
-
country,
|
|
9644
|
-
countryCallingCode
|
|
9645
|
-
};
|
|
9646
|
-
}
|
|
9647
11237
|
var E164_NUMBER_REGEXP = /^\+\d+$/;
|
|
9648
11238
|
|
|
9649
11239
|
// ../../node_modules/libphonenumber-js/es6/ParseError.js
|
|
@@ -9983,9 +11573,9 @@ var MAX_INPUT_STRING_LENGTH = 250;
|
|
|
9983
11573
|
var PHONE_NUMBER_START_PATTERN = new RegExp("[" + PLUS_CHARS + VALID_DIGITS + "]");
|
|
9984
11574
|
var AFTER_PHONE_NUMBER_END_PATTERN = new RegExp("[^" + VALID_DIGITS + "#]+$");
|
|
9985
11575
|
var USE_NON_GEOGRAPHIC_COUNTRY_CODE3 = false;
|
|
9986
|
-
function parse(text, options,
|
|
11576
|
+
function parse(text, options, metadataJson) {
|
|
9987
11577
|
options = options || {};
|
|
9988
|
-
metadata = new Metadata(
|
|
11578
|
+
var metadata = new Metadata(metadataJson);
|
|
9989
11579
|
if (options.defaultCountry && !metadata.hasCountry(options.defaultCountry)) {
|
|
9990
11580
|
if (options.v2) {
|
|
9991
11581
|
throw new ParseError("INVALID_COUNTRY");
|
|
@@ -10002,7 +11592,15 @@ function parse(text, options, metadata) {
|
|
|
10002
11592
|
}
|
|
10003
11593
|
return {};
|
|
10004
11594
|
}
|
|
10005
|
-
var _parsePhoneNumber = parsePhoneNumber(
|
|
11595
|
+
var _parsePhoneNumber = parsePhoneNumber(
|
|
11596
|
+
formattedPhoneNumber,
|
|
11597
|
+
options.defaultCountry,
|
|
11598
|
+
options.defaultCallingCode,
|
|
11599
|
+
// If `country` is returned, its numbering plan will also be selected in `metadata`.
|
|
11600
|
+
// Otherwise, if `countryCallingCode` is returned, its numbering plan will also be selected in `metadata`.
|
|
11601
|
+
// Otherwise, if neither `country` nor `countryCallingCode` are returned, no numbering plan will be selected in `metadata`.
|
|
11602
|
+
metadata
|
|
11603
|
+
), country = _parsePhoneNumber.country, nationalNumber = _parsePhoneNumber.nationalNumber, countryCallingCode = _parsePhoneNumber.countryCallingCode, countryCallingCodeSource = _parsePhoneNumber.countryCallingCodeSource, carrierCode = _parsePhoneNumber.carrierCode;
|
|
10006
11604
|
if (!metadata.hasSelectedNumberingPlan()) {
|
|
10007
11605
|
if (options.v2) {
|
|
10008
11606
|
throw new ParseError("INVALID_COUNTRY");
|
|
@@ -10044,7 +11642,7 @@ function parse(text, options, metadata) {
|
|
|
10044
11642
|
countryCallingCode,
|
|
10045
11643
|
carrierCode,
|
|
10046
11644
|
valid,
|
|
10047
|
-
possible: valid ? true : options.extended === true && metadata.possibleLengths() && isPossibleNumber(nationalNumber,
|
|
11645
|
+
possible: valid ? true : options.extended === true && metadata.possibleLengths() && isPossibleNumber(nationalNumber, metadata) ? true : false,
|
|
10048
11646
|
phone: nationalNumber,
|
|
10049
11647
|
ext
|
|
10050
11648
|
};
|
|
@@ -10104,22 +11702,33 @@ function result(country, nationalNumber, ext) {
|
|
|
10104
11702
|
return result2;
|
|
10105
11703
|
}
|
|
10106
11704
|
function parsePhoneNumber(formattedPhoneNumber, defaultCountry, defaultCallingCode, metadata) {
|
|
10107
|
-
var _extractCountryCallin = extractCountryCallingCode(
|
|
11705
|
+
var _extractCountryCallin = extractCountryCallingCode(
|
|
11706
|
+
parseIncompletePhoneNumber(formattedPhoneNumber),
|
|
11707
|
+
void 0,
|
|
11708
|
+
// `defaultCountry` and `defaultCallingCode` are only used to detect
|
|
11709
|
+
// if it's an "international" phone number or not. They won't be used
|
|
11710
|
+
// to derive the resulting `countryCallingCode` from them, or anything like that.
|
|
11711
|
+
defaultCountry,
|
|
11712
|
+
defaultCallingCode,
|
|
11713
|
+
metadata.metadata
|
|
11714
|
+
), countryCallingCodeSource = _extractCountryCallin.countryCallingCodeSource, countryCallingCode = _extractCountryCallin.countryCallingCode, number = _extractCountryCallin.number;
|
|
10108
11715
|
var country;
|
|
10109
11716
|
if (countryCallingCode) {
|
|
10110
11717
|
metadata.selectNumberingPlan(countryCallingCode);
|
|
10111
11718
|
} else if (number && (defaultCountry || defaultCallingCode)) {
|
|
10112
|
-
metadata.selectNumberingPlan(defaultCountry, defaultCallingCode);
|
|
10113
11719
|
if (defaultCountry) {
|
|
10114
11720
|
country = defaultCountry;
|
|
11721
|
+
metadata.selectNumberingPlan(defaultCountry);
|
|
11722
|
+
countryCallingCode = metadata.numberingPlan.callingCode();
|
|
10115
11723
|
} else {
|
|
11724
|
+
metadata.selectNumberingPlan(defaultCallingCode);
|
|
11725
|
+
countryCallingCode = defaultCallingCode;
|
|
10116
11726
|
if (USE_NON_GEOGRAPHIC_COUNTRY_CODE3) {
|
|
10117
|
-
if (metadata.isNonGeographicCallingCode(
|
|
11727
|
+
if (metadata.isNonGeographicCallingCode(countryCallingCode)) {
|
|
10118
11728
|
country = "001";
|
|
10119
11729
|
}
|
|
10120
11730
|
}
|
|
10121
11731
|
}
|
|
10122
|
-
countryCallingCode = defaultCallingCode || getCountryCallingCode(defaultCountry, metadata.metadata);
|
|
10123
11732
|
} else return {};
|
|
10124
11733
|
if (!number) {
|
|
10125
11734
|
return {
|
|
@@ -10127,7 +11736,7 @@ function parsePhoneNumber(formattedPhoneNumber, defaultCountry, defaultCallingCo
|
|
|
10127
11736
|
countryCallingCode
|
|
10128
11737
|
};
|
|
10129
11738
|
}
|
|
10130
|
-
var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number),
|
|
11739
|
+
var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number), void 0, metadata), nationalNumber = _extractNationalNumbe.nationalNumber, carrierCode = _extractNationalNumbe.carrierCode;
|
|
10131
11740
|
var exactCountry = getCountryByCallingCode(countryCallingCode, {
|
|
10132
11741
|
nationalNumber,
|
|
10133
11742
|
metadata
|
|
@@ -11194,6 +12803,104 @@ var pronunciationsDomain = {
|
|
|
11194
12803
|
]
|
|
11195
12804
|
};
|
|
11196
12805
|
|
|
12806
|
+
// src/domains/recordings.ts
|
|
12807
|
+
import { writeFileSync as writeFileSync3 } from "fs";
|
|
12808
|
+
var CHUNK_COLUMNS = [
|
|
12809
|
+
{ header: "IDX", getValue: (item) => String(item.chunkIndex ?? "") },
|
|
12810
|
+
{ header: "ROLE", getValue: (item) => item.role ?? "" },
|
|
12811
|
+
{ header: "START", getValue: (item) => item.startTime ?? "" },
|
|
12812
|
+
{ header: "FORMAT", getValue: (item) => item.audioFormat ?? "" },
|
|
12813
|
+
{ header: "MIME", getValue: (item) => item.mimeType ?? "" }
|
|
12814
|
+
];
|
|
12815
|
+
var URL_COLUMNS = [
|
|
12816
|
+
{ header: "DOWNLOAD URL", getValue: (item) => item.downloadUrl ?? "" },
|
|
12817
|
+
{ header: "EXPIRES IN", getValue: (item) => String(item.expiresIn ?? "") },
|
|
12818
|
+
{ header: "MIME", getValue: (item) => item.mimeType ?? "" }
|
|
12819
|
+
];
|
|
12820
|
+
function resolveExpiresIn(args) {
|
|
12821
|
+
const raw = args["expires-in"];
|
|
12822
|
+
if (raw === void 0) return void 0;
|
|
12823
|
+
const n = Number(raw);
|
|
12824
|
+
if (!Number.isFinite(n)) throw new Error("--expires-in must be a number of seconds");
|
|
12825
|
+
return n;
|
|
12826
|
+
}
|
|
12827
|
+
var recordingsDomain = {
|
|
12828
|
+
name: "recordings",
|
|
12829
|
+
description: "Download recorded voice-call audio (per chat)",
|
|
12830
|
+
commands: [
|
|
12831
|
+
{
|
|
12832
|
+
path: ["recordings", "list"],
|
|
12833
|
+
description: "List recorded audio chunks for a chat (metadata only)",
|
|
12834
|
+
requiresWorkspace: true,
|
|
12835
|
+
args: [
|
|
12836
|
+
{ name: "chat-id", aliases: ["id"], description: "Chat ID", required: true },
|
|
12837
|
+
{ name: "role", description: "Filter by role: 'assistant' or 'member'" }
|
|
12838
|
+
],
|
|
12839
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
12840
|
+
const role = typeof args.role === "string" ? args.role : void 0;
|
|
12841
|
+
const result2 = await requireAuth(ctx).apiClient.listChatRecordings(
|
|
12842
|
+
workspace,
|
|
12843
|
+
requireNumber(args, "chat-id"),
|
|
12844
|
+
role ? { role } : {}
|
|
12845
|
+
);
|
|
12846
|
+
outputData(result2.items, ctx, CHUNK_COLUMNS);
|
|
12847
|
+
}
|
|
12848
|
+
},
|
|
12849
|
+
{
|
|
12850
|
+
path: ["recordings", "download-url"],
|
|
12851
|
+
description: "Get a single short-lived presigned URL for the whole-call recording WAV",
|
|
12852
|
+
requiresWorkspace: true,
|
|
12853
|
+
args: [
|
|
12854
|
+
{ name: "chat-id", aliases: ["id"], description: "Chat ID", required: true },
|
|
12855
|
+
{
|
|
12856
|
+
name: "expires-in",
|
|
12857
|
+
description: "Requested URL lifetime in seconds (server caps this)"
|
|
12858
|
+
}
|
|
12859
|
+
],
|
|
12860
|
+
examples: ["gr recordings download-url -w $WID --chat-id 42"],
|
|
12861
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
12862
|
+
const expiresIn = resolveExpiresIn(args);
|
|
12863
|
+
const result2 = await requireAuth(ctx).apiClient.getCallRecordingDownloadUrl(
|
|
12864
|
+
workspace,
|
|
12865
|
+
requireNumber(args, "chat-id"),
|
|
12866
|
+
expiresIn !== void 0 ? { expiresIn } : {}
|
|
12867
|
+
);
|
|
12868
|
+
outputSingle(result2, ctx, URL_COLUMNS);
|
|
12869
|
+
}
|
|
12870
|
+
},
|
|
12871
|
+
{
|
|
12872
|
+
path: ["recordings", "download"],
|
|
12873
|
+
description: "Download the complete call recording WAV to a local file",
|
|
12874
|
+
requiresWorkspace: true,
|
|
12875
|
+
args: [
|
|
12876
|
+
{ name: "chat-id", aliases: ["id"], description: "Chat ID", required: true },
|
|
12877
|
+
{
|
|
12878
|
+
name: "output",
|
|
12879
|
+
aliases: ["o"],
|
|
12880
|
+
description: "Output file path (default: call-<chatId>.wav)"
|
|
12881
|
+
}
|
|
12882
|
+
],
|
|
12883
|
+
examples: ["gr recordings download -w $WID --chat-id 42 -o call.wav"],
|
|
12884
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
12885
|
+
const chatId = requireNumber(args, "chat-id");
|
|
12886
|
+
const { downloadUrl } = await requireAuth(ctx).apiClient.getCallRecordingDownloadUrl(
|
|
12887
|
+
workspace,
|
|
12888
|
+
chatId
|
|
12889
|
+
);
|
|
12890
|
+
const res = await fetch(downloadUrl);
|
|
12891
|
+
if (!res.ok) {
|
|
12892
|
+
throw new Error(`Failed to download recording: HTTP ${res.status}`);
|
|
12893
|
+
}
|
|
12894
|
+
const bytes = Buffer.from(await res.arrayBuffer());
|
|
12895
|
+
const outPath = typeof args.output === "string" ? args.output : `call-${chatId}.wav`;
|
|
12896
|
+
writeFileSync3(outPath, bytes);
|
|
12897
|
+
process.stdout.write(`Saved ${bytes.length} bytes to ${outPath}
|
|
12898
|
+
`);
|
|
12899
|
+
}
|
|
12900
|
+
}
|
|
12901
|
+
]
|
|
12902
|
+
};
|
|
12903
|
+
|
|
11197
12904
|
// src/domains/reports.ts
|
|
11198
12905
|
var reportsDomain = {
|
|
11199
12906
|
name: "reports",
|
|
@@ -11617,6 +13324,30 @@ var supportDomain = {
|
|
|
11617
13324
|
outputSingle(result2, ctx, SUPPORT_COLUMNS);
|
|
11618
13325
|
}
|
|
11619
13326
|
},
|
|
13327
|
+
{
|
|
13328
|
+
path: ["support", "reopen"],
|
|
13329
|
+
description: "Reopen a resolved support request (workspace-scoped)",
|
|
13330
|
+
mutates: true,
|
|
13331
|
+
args: [
|
|
13332
|
+
{ name: "workspace", aliases: ["w"], description: "Workspace UUID", required: true },
|
|
13333
|
+
{ name: "id", aliases: ["uuid"], description: "Support request UUID", required: true },
|
|
13334
|
+
{ name: "reason", description: "Optional reason for reopening" }
|
|
13335
|
+
],
|
|
13336
|
+
handler: async ({ ctx, args, workspace, data }) => {
|
|
13337
|
+
const client = requireAuth(ctx).apiClient;
|
|
13338
|
+
const id = requireString(args, "id");
|
|
13339
|
+
const wid = args.workspace ?? workspace;
|
|
13340
|
+
if (!wid) throw new Error("--workspace is required to reopen a support request");
|
|
13341
|
+
const input = data ?? {};
|
|
13342
|
+
const reason = input.reason ?? args.reason;
|
|
13343
|
+
const result2 = await client.reopenWorkspaceSupportRequest(
|
|
13344
|
+
wid,
|
|
13345
|
+
id,
|
|
13346
|
+
reason ? { reason } : {}
|
|
13347
|
+
);
|
|
13348
|
+
outputSingle(result2, ctx, SUPPORT_COLUMNS);
|
|
13349
|
+
}
|
|
13350
|
+
},
|
|
11620
13351
|
{
|
|
11621
13352
|
path: ["support", "resource-click"],
|
|
11622
13353
|
description: "Record a click on a pushed resource (consume + track usefulness)",
|
|
@@ -12319,6 +14050,61 @@ var fhirConnectionsDomain = {
|
|
|
12319
14050
|
]
|
|
12320
14051
|
};
|
|
12321
14052
|
|
|
14053
|
+
// src/domains/integrations/patientsync.ts
|
|
14054
|
+
var COLUMNS32 = [
|
|
14055
|
+
{ header: "CONFIGURED", getValue: (i) => String(i.configured ?? false) },
|
|
14056
|
+
{ header: "ENABLED", getValue: (i) => String(i.enabled ?? false) },
|
|
14057
|
+
{ header: "HAS_KEY", getValue: (i) => String(i.hasApiKey ?? false) },
|
|
14058
|
+
{ header: "BASE_URL", getValue: (i) => i.apiBaseUrl ?? "" },
|
|
14059
|
+
{ header: "REQUESTOR", getValue: (i) => i.requestor ?? "" },
|
|
14060
|
+
{ header: "FORM_SLUG", getValue: (i) => i.formSlug ?? "" },
|
|
14061
|
+
{ header: "FALLBACK_DID", getValue: (i) => i.fallbackDid ?? "" }
|
|
14062
|
+
];
|
|
14063
|
+
var patientSyncDomain = {
|
|
14064
|
+
name: "patientsync",
|
|
14065
|
+
description: "Manage a workspace PatientSync transfer connection",
|
|
14066
|
+
commands: [
|
|
14067
|
+
{
|
|
14068
|
+
path: ["patientsync", "configure"],
|
|
14069
|
+
description: "Create or update the PatientSync connection (singleton). First configure requires apiBaseUrl + apiKey; later configures apply only the fields sent (rotate the key, change the form, etc.).",
|
|
14070
|
+
mutates: true,
|
|
14071
|
+
requiresWorkspace: true,
|
|
14072
|
+
examples: [
|
|
14073
|
+
`gr patientsync configure -w $UUID --allow-write --data '{"apiBaseUrl":"https://api.patientsync.app","apiKey":"<ssws-token>","requestor":"Gravity Rail","formSlug":"api_transfer"}'`
|
|
14074
|
+
],
|
|
14075
|
+
handler: async ({ ctx, workspace, data }) => {
|
|
14076
|
+
if (!data) {
|
|
14077
|
+
throw new CLIError("JSON data required (--data, --file, or stdin)");
|
|
14078
|
+
}
|
|
14079
|
+
const result2 = await requireAuth(ctx).apiClient.configurePatientSync(
|
|
14080
|
+
workspace,
|
|
14081
|
+
data
|
|
14082
|
+
);
|
|
14083
|
+
outputSingle(result2, ctx, COLUMNS32);
|
|
14084
|
+
}
|
|
14085
|
+
},
|
|
14086
|
+
{
|
|
14087
|
+
path: ["patientsync", "status"],
|
|
14088
|
+
description: "Show the PatientSync connection status (never prints the API key)",
|
|
14089
|
+
requiresWorkspace: true,
|
|
14090
|
+
handler: async ({ ctx, workspace }) => {
|
|
14091
|
+
const result2 = await requireAuth(ctx).apiClient.getPatientSyncStatus(workspace);
|
|
14092
|
+
outputSingle(result2, ctx, COLUMNS32);
|
|
14093
|
+
}
|
|
14094
|
+
},
|
|
14095
|
+
{
|
|
14096
|
+
path: ["patientsync", "delete"],
|
|
14097
|
+
description: "Delete the PatientSync connection",
|
|
14098
|
+
mutates: true,
|
|
14099
|
+
requiresWorkspace: true,
|
|
14100
|
+
handler: async ({ ctx, workspace }) => {
|
|
14101
|
+
await requireAuth(ctx).apiClient.deletePatientSyncConnection(workspace);
|
|
14102
|
+
process.stdout.write("Deleted PatientSync connection\n");
|
|
14103
|
+
}
|
|
14104
|
+
}
|
|
14105
|
+
]
|
|
14106
|
+
};
|
|
14107
|
+
|
|
12322
14108
|
// src/domains/integrations/hubspot.ts
|
|
12323
14109
|
var hubspotDomain = {
|
|
12324
14110
|
name: "hubspot",
|
|
@@ -12991,13 +14777,13 @@ var salesforceDomain = {
|
|
|
12991
14777
|
};
|
|
12992
14778
|
|
|
12993
14779
|
// src/domains/integrations/slack-apps.ts
|
|
12994
|
-
var
|
|
14780
|
+
var COLUMNS33 = [COL.id(), COL.name(), COL.status()];
|
|
12995
14781
|
function addSlackUrls(data, apiUrl, workspaceUuid) {
|
|
12996
14782
|
const base = `${apiUrl}/api/v2/w/${workspaceUuid}/app-connections/slack`;
|
|
12997
14783
|
return {
|
|
12998
14784
|
...data,
|
|
12999
14785
|
_urls: {
|
|
13000
|
-
eventsEndpoint: `${base}/
|
|
14786
|
+
eventsEndpoint: `${base}/events`,
|
|
13001
14787
|
oauthBotCallback: `${base}/oauth/callback`,
|
|
13002
14788
|
oauthUserCallback: `${base}/oauth/user/callback`,
|
|
13003
14789
|
oauthInstall: `${base}/oauth/install?app_uuid=${data.uuid ?? ""}`
|
|
@@ -13014,7 +14800,7 @@ var slackAppsDomain = {
|
|
|
13014
14800
|
entityName: "Slack app",
|
|
13015
14801
|
listMethod: "getSlackApps",
|
|
13016
14802
|
deleteMethod: "deleteSlackApp",
|
|
13017
|
-
columns:
|
|
14803
|
+
columns: COLUMNS33,
|
|
13018
14804
|
paginationSupport: "full"
|
|
13019
14805
|
}),
|
|
13020
14806
|
{
|
|
@@ -13100,7 +14886,7 @@ var slackAppsDomain = {
|
|
|
13100
14886
|
};
|
|
13101
14887
|
|
|
13102
14888
|
// src/domains/integrations/teams-apps.ts
|
|
13103
|
-
var
|
|
14889
|
+
var COLUMNS34 = [COL.id(), COL.name(), COL.status()];
|
|
13104
14890
|
function addTeamsUrls(data, apiUrl, workspaceUuid) {
|
|
13105
14891
|
const base = `${apiUrl}/api/v2/w/${workspaceUuid}/app-connections/teams`;
|
|
13106
14892
|
return {
|
|
@@ -13121,7 +14907,7 @@ var teamsAppsDomain = {
|
|
|
13121
14907
|
entityName: "Teams app",
|
|
13122
14908
|
listMethod: "getTeamsApps",
|
|
13123
14909
|
deleteMethod: "deleteTeamsApp",
|
|
13124
|
-
columns:
|
|
14910
|
+
columns: COLUMNS34,
|
|
13125
14911
|
paginationSupport: "full"
|
|
13126
14912
|
}),
|
|
13127
14913
|
{
|
|
@@ -13226,10 +15012,12 @@ function registerPublicDomains(registry) {
|
|
|
13226
15012
|
registry.register(experimentsDomain);
|
|
13227
15013
|
registry.register(calendarsDomain);
|
|
13228
15014
|
registry.register(qualificationsDomain);
|
|
15015
|
+
registry.register(queriesDomain);
|
|
13229
15016
|
registry.register(personasDomain);
|
|
13230
15017
|
registry.register(journeysDomain);
|
|
13231
15018
|
registry.register(abilitiesDomain);
|
|
13232
15019
|
registry.register(phoneNumbersDomain);
|
|
15020
|
+
registry.register(recordingsDomain);
|
|
13233
15021
|
registry.register(inboxesDomain);
|
|
13234
15022
|
registry.register(operatorGroupsDomain);
|
|
13235
15023
|
registry.register(accessGrantsDomain);
|
|
@@ -13253,6 +15041,7 @@ function registerPublicDomains(registry) {
|
|
|
13253
15041
|
registry.register(appsDomain);
|
|
13254
15042
|
registry.register(oauthDomain);
|
|
13255
15043
|
registry.register(conciergeDomain);
|
|
15044
|
+
registry.register(docsDomain);
|
|
13256
15045
|
registry.register(memberMemoriesDomain);
|
|
13257
15046
|
registry.register(syncDomain);
|
|
13258
15047
|
registry.register(confluenceDomain);
|
|
@@ -13260,6 +15049,7 @@ function registerPublicDomains(registry) {
|
|
|
13260
15049
|
registry.register(slackAppsDomain);
|
|
13261
15050
|
registry.register(teamsAppsDomain);
|
|
13262
15051
|
registry.register(fhirConnectionsDomain);
|
|
15052
|
+
registry.register(patientSyncDomain);
|
|
13263
15053
|
registry.register(appConnectionsDomain);
|
|
13264
15054
|
registry.register(hubspotDomain);
|
|
13265
15055
|
registry.register(mondayDomain);
|
|
@@ -13517,7 +15307,7 @@ async function resolveDirectoryTrust(opts) {
|
|
|
13517
15307
|
return "trusted";
|
|
13518
15308
|
}
|
|
13519
15309
|
async function requireDirectoryTrust(opts) {
|
|
13520
|
-
const { CLIError: CLIError2 } = await import("./errors-
|
|
15310
|
+
const { CLIError: CLIError2 } = await import("./errors-YHGVIDPO.js");
|
|
13521
15311
|
const dir = path3.resolve(opts.trustDir ?? opts.cwd ?? process.cwd());
|
|
13522
15312
|
const status = await resolveDirectoryTrust(opts);
|
|
13523
15313
|
if (status === "trusted") return;
|
|
@@ -13529,6 +15319,12 @@ Re-run with --trust-cwd (or --trust-dir <path>) after reviewing files in that di
|
|
|
13529
15319
|
}
|
|
13530
15320
|
|
|
13531
15321
|
// src/lib/cli-hitl.ts
|
|
15322
|
+
var UI_CHOICE_INTERRUPT_TYPES = /* @__PURE__ */ new Set([
|
|
15323
|
+
"render_ui",
|
|
15324
|
+
"present_choice_list",
|
|
15325
|
+
/** @deprecated Pre-rename interrupt type */
|
|
15326
|
+
"present_choice"
|
|
15327
|
+
]);
|
|
13532
15328
|
function extractHumanInputRequest(event) {
|
|
13533
15329
|
const type = String(event.type ?? "").toUpperCase();
|
|
13534
15330
|
if (type === "CUSTOM" && event.name === "human_input_request") {
|
|
@@ -13544,13 +15340,13 @@ async function handleCliHitlInterrupt(value, opts) {
|
|
|
13544
15340
|
const payload = value;
|
|
13545
15341
|
if (isCliLocalFileInterrupt(payload)) {
|
|
13546
15342
|
const interrupt = payload;
|
|
13547
|
-
if (typeof payload.
|
|
13548
|
-
interrupt.
|
|
15343
|
+
if (typeof payload.interruptId === "string") {
|
|
15344
|
+
interrupt.interruptId = payload.interruptId;
|
|
13549
15345
|
}
|
|
13550
15346
|
return handleCliLocalFile(interrupt, opts);
|
|
13551
15347
|
}
|
|
13552
|
-
if (payload.type === "
|
|
13553
|
-
return
|
|
15348
|
+
if (typeof payload.type === "string" && UI_CHOICE_INTERRUPT_TYPES.has(payload.type)) {
|
|
15349
|
+
return handleUIChoiceTerminal(payload);
|
|
13554
15350
|
}
|
|
13555
15351
|
return null;
|
|
13556
15352
|
}
|
|
@@ -13568,7 +15364,7 @@ async function handleCliLocalFile(interrupt, opts) {
|
|
|
13568
15364
|
ok: false,
|
|
13569
15365
|
error: "Directory not trusted for local file access. Re-run with --trust-cwd or --trust-dir <path>, or approve trust interactively when prompted."
|
|
13570
15366
|
}),
|
|
13571
|
-
resumeInterruptId: interrupt.
|
|
15367
|
+
resumeInterruptId: interrupt.interruptId
|
|
13572
15368
|
};
|
|
13573
15369
|
}
|
|
13574
15370
|
process.stderr.write(`
|
|
@@ -13579,12 +15375,12 @@ async function handleCliLocalFile(interrupt, opts) {
|
|
|
13579
15375
|
});
|
|
13580
15376
|
return {
|
|
13581
15377
|
resumeValue: JSON.stringify(result2),
|
|
13582
|
-
resumeInterruptId: interrupt.
|
|
15378
|
+
resumeInterruptId: interrupt.interruptId
|
|
13583
15379
|
};
|
|
13584
15380
|
}
|
|
13585
|
-
async function
|
|
13586
|
-
const prompt = typeof payload.
|
|
13587
|
-
const markup = typeof payload.
|
|
15381
|
+
async function handleUIChoiceTerminal(payload) {
|
|
15382
|
+
const prompt = typeof payload.userPrompt === "string" && payload.userPrompt || typeof payload.description === "string" && payload.description || "Choose an option";
|
|
15383
|
+
const markup = typeof payload.openuiMarkup === "string" ? payload.openuiMarkup : "";
|
|
13588
15384
|
process.stderr.write(`
|
|
13589
15385
|
${prompt}
|
|
13590
15386
|
`);
|
|
@@ -13595,7 +15391,7 @@ ${prompt}
|
|
|
13595
15391
|
if (!process.stdin.isTTY) {
|
|
13596
15392
|
return {
|
|
13597
15393
|
resumeValue: "",
|
|
13598
|
-
resumeInterruptId: typeof payload.
|
|
15394
|
+
resumeInterruptId: typeof payload.interruptId === "string" ? payload.interruptId : void 0
|
|
13599
15395
|
};
|
|
13600
15396
|
}
|
|
13601
15397
|
const rl = readline2.createInterface({ input: process.stdin, output: process.stderr });
|
|
@@ -13605,7 +15401,7 @@ ${prompt}
|
|
|
13605
15401
|
rl.close();
|
|
13606
15402
|
return {
|
|
13607
15403
|
resumeValue: answer.trim(),
|
|
13608
|
-
resumeInterruptId: typeof payload.
|
|
15404
|
+
resumeInterruptId: typeof payload.interruptId === "string" ? payload.interruptId : void 0
|
|
13609
15405
|
};
|
|
13610
15406
|
}
|
|
13611
15407
|
|
|
@@ -13672,7 +15468,7 @@ function normalizeUnsupportedHitl(raw) {
|
|
|
13672
15468
|
const payload = raw && typeof raw === "object" ? raw : {};
|
|
13673
15469
|
return {
|
|
13674
15470
|
type: typeof payload.type === "string" ? payload.type : void 0,
|
|
13675
|
-
interruptId: typeof payload.
|
|
15471
|
+
interruptId: typeof payload.interruptId === "string" ? payload.interruptId : void 0,
|
|
13676
15472
|
payload
|
|
13677
15473
|
};
|
|
13678
15474
|
}
|
|
@@ -15275,7 +17071,7 @@ function sanitizeInterruptForStdout(result2) {
|
|
|
15275
17071
|
const url = typeof result2.payload.url === "string" ? result2.payload.url : void 0;
|
|
15276
17072
|
return {
|
|
15277
17073
|
type: result2.type,
|
|
15278
|
-
|
|
17074
|
+
interruptId: result2.interruptId,
|
|
15279
17075
|
url
|
|
15280
17076
|
};
|
|
15281
17077
|
}
|
|
@@ -15819,7 +17615,7 @@ async function createMemberChat(apiClient, workspace, memberId) {
|
|
|
15819
17615
|
const id = Number(memberId);
|
|
15820
17616
|
if (isNaN(id)) throw new CLIError("--member must be a number");
|
|
15821
17617
|
const data = {
|
|
15822
|
-
chatType: "
|
|
17618
|
+
chatType: "dm",
|
|
15823
17619
|
channel: "web-chat",
|
|
15824
17620
|
memberId: id
|
|
15825
17621
|
};
|
|
@@ -15930,7 +17726,7 @@ async function getOrCreateConciergeChat(ctx, chatIdArg, skipSelection) {
|
|
|
15930
17726
|
}
|
|
15931
17727
|
|
|
15932
17728
|
// src/commands/dev.ts
|
|
15933
|
-
import { existsSync, mkdirSync, writeFileSync, readFileSync as
|
|
17729
|
+
import { existsSync as existsSync2, mkdirSync as mkdirSync2, writeFileSync as writeFileSync4, readFileSync as readFileSync3 } from "fs";
|
|
15934
17730
|
import { execSync as execSync2 } from "child_process";
|
|
15935
17731
|
import { join } from "path";
|
|
15936
17732
|
async function devImportLocalCommand(ctx, workspace) {
|
|
@@ -15943,12 +17739,12 @@ async function devImportLocalCommand(ctx, workspace) {
|
|
|
15943
17739
|
stderr(` Sites: ${(exportData.sites || []).length}`);
|
|
15944
17740
|
const slug = workspace.slice(0, 8);
|
|
15945
17741
|
const importCacheDir = join(ctx.credentialsManager.getCacheDir(), "imports");
|
|
15946
|
-
if (!
|
|
15947
|
-
|
|
17742
|
+
if (!existsSync2(importCacheDir)) {
|
|
17743
|
+
mkdirSync2(importCacheDir, { recursive: true });
|
|
15948
17744
|
}
|
|
15949
17745
|
const filename = `ws-${slug}-${workspace}.json`;
|
|
15950
17746
|
const filepath = join(importCacheDir, filename);
|
|
15951
|
-
|
|
17747
|
+
writeFileSync4(filepath, JSON.stringify(exportData, null, 2));
|
|
15952
17748
|
stderr(`Saved to: ${filepath}`);
|
|
15953
17749
|
stderr("Running dev:restore...");
|
|
15954
17750
|
const rootDir = findProjectRoot();
|
|
@@ -15975,9 +17771,9 @@ function findProjectRoot() {
|
|
|
15975
17771
|
let dir = process.cwd();
|
|
15976
17772
|
while (dir !== "/") {
|
|
15977
17773
|
const pkgPath = join(dir, "package.json");
|
|
15978
|
-
if (
|
|
17774
|
+
if (existsSync2(pkgPath)) {
|
|
15979
17775
|
try {
|
|
15980
|
-
const pkg = JSON.parse(
|
|
17776
|
+
const pkg = JSON.parse(readFileSync3(pkgPath, "utf-8"));
|
|
15981
17777
|
if (pkg.workspaces) return dir;
|
|
15982
17778
|
} catch {
|
|
15983
17779
|
}
|
|
@@ -16104,7 +17900,7 @@ async function logoutCommand(ctx) {
|
|
|
16104
17900
|
}
|
|
16105
17901
|
|
|
16106
17902
|
// src/commands/organizations.ts
|
|
16107
|
-
var
|
|
17903
|
+
var COLUMNS35 = [
|
|
16108
17904
|
{ header: "NAME", getValue: (o) => o.organizationName || "", maxWidth: 35 },
|
|
16109
17905
|
{ header: "SLUG", getValue: (o) => o.organizationSlug || "", maxWidth: 25 },
|
|
16110
17906
|
{ header: "UUID", getValue: (o) => o.organizationUuid },
|
|
@@ -16112,11 +17908,11 @@ var COLUMNS34 = [
|
|
|
16112
17908
|
];
|
|
16113
17909
|
async function organizationsListCommand(ctx) {
|
|
16114
17910
|
const organizations = await ctx.apiClient.getMyOrganizations();
|
|
16115
|
-
outputData(organizations, ctx,
|
|
17911
|
+
outputData(organizations, ctx, COLUMNS35);
|
|
16116
17912
|
}
|
|
16117
17913
|
|
|
16118
17914
|
// src/commands/whoami.ts
|
|
16119
|
-
var
|
|
17915
|
+
var COLUMNS36 = [
|
|
16120
17916
|
{ header: "NAME", getValue: (a) => a.name || "", maxWidth: 30 },
|
|
16121
17917
|
{ header: "EMAIL", getValue: (a) => a.email || "", maxWidth: 40 },
|
|
16122
17918
|
{ header: "UUID", getValue: (a) => a.uuid },
|
|
@@ -16125,7 +17921,7 @@ var COLUMNS35 = [
|
|
|
16125
17921
|
];
|
|
16126
17922
|
async function whoamiCommand(ctx) {
|
|
16127
17923
|
const account = await ctx.apiClient.getUserAccount();
|
|
16128
|
-
const columns =
|
|
17924
|
+
const columns = COLUMNS36.map(
|
|
16129
17925
|
(col) => col.header === "ENV" ? { ...col, getValue: () => ctx.env } : col
|
|
16130
17926
|
);
|
|
16131
17927
|
outputSingle(account, ctx, columns);
|
|
@@ -16272,7 +18068,7 @@ var topLevelCommands = [
|
|
|
16272
18068
|
mutates: true,
|
|
16273
18069
|
args: [{ name: "phone", description: "E.164 phone number (optional; prompts if omitted)" }],
|
|
16274
18070
|
handler: async (hctx) => {
|
|
16275
|
-
const { accountVerifyPhoneCommand } = await import("./account-verify-phone-
|
|
18071
|
+
const { accountVerifyPhoneCommand } = await import("./account-verify-phone-XNXA7HNG.js");
|
|
16276
18072
|
await accountVerifyPhoneCommand(hctx);
|
|
16277
18073
|
}
|
|
16278
18074
|
},
|