@gravity-rail/cli 0.10.0 → 0.12.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/dist/lib.js CHANGED
@@ -30,7 +30,7 @@ import {
30
30
  startAccountPhoneVerify,
31
31
  stderr,
32
32
  unwrapItems
33
- } from "./chunk-XJ2EBXJZ.js";
33
+ } from "./chunk-GRLUFHMI.js";
34
34
  import {
35
35
  AGUIClient,
36
36
  formatTimestamp,
@@ -38,7 +38,7 @@ import {
38
38
  getTextDelta,
39
39
  performOAuthFlow,
40
40
  selectFromList
41
- } from "./chunk-GVUGFPCN.js";
41
+ } from "./chunk-SIV2WU2I.js";
42
42
  import {
43
43
  AuthRequiredError,
44
44
  CLIError,
@@ -67,7 +67,9 @@ function parseArgs(defs, argv) {
67
67
  }
68
68
  const KNOWN_GLOBAL_FLAGS = /* @__PURE__ */ new Set([
69
69
  "--env",
70
- "--realm",
70
+ "--profile",
71
+ "--account",
72
+ "--api-url",
71
73
  "--output-format",
72
74
  "-o",
73
75
  "--verbose",
@@ -920,7 +922,9 @@ var CommandRegistry = class {
920
922
  const lines = [`${description}
921
923
  `, `Usage: gr ${cmdStr} [options]`];
922
924
  if (cmd.requiresWorkspace && !inSandbox) {
923
- lines.push(" Requires: -w <workspace-uuid> (or --realm <workspace>/<member> in dev)");
925
+ lines.push(
926
+ " Requires: -w <workspace-uuid> (or --profile workspace/member after gr auth import-dev)"
927
+ );
924
928
  }
925
929
  if (cmd.mutates && !inSandbox) {
926
930
  lines.push(" Requires: --allow-write");
@@ -981,7 +985,7 @@ var CommandRegistry = class {
981
985
  "Global Options:",
982
986
  ...!inSandbox ? [
983
987
  " --env <env> Environment: dev, staging, prod (default: dev)",
984
- " --realm <ws>/<member> Dev auth shortcut (dev only; sets -w automatically)",
988
+ " --profile <name> Named credential profile (alias: --account)",
985
989
  " --api-url <url> API base URL (or GRAVITY_RAIL_API_URL)",
986
990
  " -w, --workspace <uuid> Workspace UUID"
987
991
  ] : [],
@@ -1006,7 +1010,7 @@ var CommandRegistry = class {
1006
1010
  }
1007
1011
  };
1008
1012
  function sandboxHelpText(text) {
1009
- return text.replace(/\byarn gr\b/g, "gr").replace(/\s--allow-write\b/g, "").replace(/\s--realm\s+(?:"[^"]+"|'[^']+'|<[^>]+>|\S+)/g, "").replace(/\s-w\s+(?:"[^"]+"|'[^']+'|<[^>]+>|\S+)/g, "");
1013
+ return text.replace(/\byarn gr\b/g, "gr").replace(/\s--allow-write\b/g, "").replace(/\s--profile\s+(?:"[^"]+"|'[^']+'|<[^>]+>|\S+)/g, "").replace(/\s--account\s+(?:"[^"]+"|'[^']+'|<[^>]+>|\S+)/g, "").replace(/\s-w\s+(?:"[^"]+"|'[^']+'|<[^>]+>|\S+)/g, "");
1010
1014
  }
1011
1015
  function sandboxExample(example) {
1012
1016
  return sandboxHelpText(example);
@@ -1189,42 +1193,6 @@ var agentTasksDomain = {
1189
1193
 
1190
1194
  // src/domains/agents.ts
1191
1195
  var COLUMNS = [COL.id(), COL.uuid(), COL.name(), COL.status(), COL.created()];
1192
- var TOOL_COLUMNS = [
1193
- COL.name(),
1194
- { header: "DESCRIPTION", getValue: (item) => (item.description ?? "").slice(0, 60) }
1195
- ];
1196
- var ABILITY_COLUMNS = [
1197
- COL.uuid(),
1198
- { header: "ABILITY-TYPE", getValue: (item) => item.abilityType ?? "" },
1199
- COL.enabled(),
1200
- { header: "CEL-CONDITION", getValue: (item) => item.celCondition ?? "" }
1201
- ];
1202
- function requireAbilityScope(args) {
1203
- const hasWorkflow = typeof args["workflow-id"] === "string";
1204
- const hasTask = typeof args["task-id"] === "string";
1205
- if (hasWorkflow === hasTask) {
1206
- throw new CLIError(
1207
- "Specify exactly one of --workflow-id or --task-id. Abilities are scoped to a workflow or task, not to the agent row itself."
1208
- );
1209
- }
1210
- if (hasTask) {
1211
- const taskId = Number(args["task-id"]);
1212
- if (isNaN(taskId)) throw new CLIError("--task-id must be a number");
1213
- return { taskId };
1214
- }
1215
- const workflowId = Number(args["workflow-id"]);
1216
- if (isNaN(workflowId)) throw new CLIError("--workflow-id must be a number");
1217
- return { workflowId };
1218
- }
1219
- function normalizeChannel(channel) {
1220
- const aliases = {
1221
- phone: "phone-voice",
1222
- voice: "phone-voice",
1223
- sms: "phone-sms",
1224
- web: "web-chat"
1225
- };
1226
- return aliases[channel] ?? channel;
1227
- }
1228
1196
  var agentsDomain = {
1229
1197
  name: "agents",
1230
1198
  description: "Manage agents",
@@ -1241,162 +1209,12 @@ var agentsDomain = {
1241
1209
  unarchiveMethod: "unarchiveAgent",
1242
1210
  columns: COLUMNS,
1243
1211
  paginationSupport: "full",
1244
- updateHelp: "Update an agent. Body schema (JSON via --data/--file/stdin), all fields optional:\n name string display name\n description string short summary shown in listings\n systemPrompt string base instructions for the agent\n model string AI model slug (see `gr ai-models list`)\n temperature number sampling temperature (0-2)\n avatarFileId number workspace file ID for the avatar\n config object AgentConfig overrides (advanced)\nAbilities are NOT set here \u2014 they live on a workflow/task scope; use `gr agents abilities` to manage them.",
1212
+ updateHelp: "Update an agent. Body schema (JSON via --data/--file/stdin), all fields optional:\n name string display name\n description string short summary shown in listings\n systemPrompt string base instructions for the agent\n model string AI model slug (see `gr ai-models list`)\n temperature number sampling temperature (0-2)\n avatarFileId number workspace file ID for the avatar\n config object AgentConfig overrides (advanced)\nWorkflow abilities are managed with `gr abilities`.",
1245
1213
  updateExamples: [
1246
1214
  `gr agents update --id 42 --data '{"name":"Scheduler","temperature":0.4}'`,
1247
1215
  "gr agents update --id 42 --file agent.json"
1248
1216
  ]
1249
- }),
1250
- {
1251
- path: ["agents", "resolve-tools"],
1252
- description: "Show resolved runtime tools for an agent in a channel context. Channel accepts canonical values (phone-voice, web-voice, phone-sms, web-chat) or shorthand aliases: phone -> phone-voice, voice -> phone-voice, sms -> phone-sms, web -> web-chat. Unknown values are passed through unchanged. When neither --task-id nor --task-uuid is supplied the agent's workflow start task is used.",
1253
- requiresWorkspace: true,
1254
- args: [
1255
- { name: "id", description: "Agent ID", required: true },
1256
- {
1257
- name: "channel",
1258
- description: "Channel to simulate. Canonical: phone-voice, web-voice, phone-sms, web-chat. Aliases: phone|voice -> phone-voice, sms -> phone-sms, web -> web-chat.",
1259
- required: true
1260
- },
1261
- {
1262
- name: "task-id",
1263
- description: "Numeric task ID whose workflow abilities to resolve. Omit to use the workflow start task (or supply --task-uuid instead).",
1264
- required: false
1265
- },
1266
- {
1267
- name: "task-uuid",
1268
- description: "Task UUID as an alternative to --task-id. Omit to use the workflow start task.",
1269
- required: false
1270
- }
1271
- ],
1272
- handler: async ({ ctx, workspace, args }) => {
1273
- const rawTaskId = args["task-id"];
1274
- const rawTaskUuid = args["task-uuid"];
1275
- if (rawTaskId !== void 0 && rawTaskUuid !== void 0) {
1276
- throw new Error("Provide at most one of --task-id or --task-uuid, not both");
1277
- }
1278
- const options = {
1279
- channel: normalizeChannel(String(args.channel))
1280
- };
1281
- if (typeof rawTaskId === "string") {
1282
- const n = Number(rawTaskId);
1283
- if (isNaN(n)) throw new Error("Argument --task-id must be a number");
1284
- options.taskId = n;
1285
- }
1286
- if (typeof rawTaskUuid === "string") {
1287
- options.taskUuid = rawTaskUuid;
1288
- }
1289
- const result2 = await requireAuth(ctx).apiClient.resolveAgentTools(
1290
- workspace,
1291
- requireNumber(args, "id"),
1292
- options
1293
- );
1294
- const tools = result2.tools ?? result2;
1295
- outputData(Array.isArray(tools) ? tools : [tools], ctx, TOOL_COLUMNS);
1296
- }
1297
- },
1298
- {
1299
- path: ["agents", "abilities", "list"],
1300
- description: "Show the abilities effective for an agent on a task (read-only). Requires --task-id because abilities are resolved through the task's workflow, not stored on the agent row.",
1301
- requiresWorkspace: true,
1302
- columns: ABILITY_COLUMNS,
1303
- args: [
1304
- { name: "id", description: "Agent ID", required: true },
1305
- {
1306
- name: "task-id",
1307
- description: "Task ID whose workflow abilities to list",
1308
- required: true
1309
- }
1310
- ],
1311
- handler: async ({ ctx, workspace, args }) => {
1312
- const result2 = await requireAuth(ctx).apiClient.listAgentAbilities(
1313
- workspace,
1314
- requireNumber(args, "id"),
1315
- { taskId: requireNumber(args, "task-id") }
1316
- );
1317
- outputData(result2, ctx, ABILITY_COLUMNS);
1318
- }
1319
- },
1320
- {
1321
- path: ["agents", "abilities", "enable"],
1322
- description: "Enable (create) an ability on a workflow or task scope. Requires exactly one of --workflow-id or --task-id \u2014 abilities are scoped to a workflow/task, never to the agent row. Provide initial --config JSON inline or via --data/--file.",
1323
- mutates: true,
1324
- requiresWorkspace: true,
1325
- args: [
1326
- { name: "ability-type", description: "Ability type slug (e.g. 'communication:send_sms')", required: true },
1327
- { name: "workflow-id", description: "Workflow scope (mutually exclusive with --task-id)" },
1328
- { name: "task-id", description: "Task scope (mutually exclusive with --workflow-id)" }
1329
- ],
1330
- examples: [
1331
- "gr agents abilities enable --workflow-id 7 --ability-type tools:web_search",
1332
- `gr agents abilities enable --task-id 12 --ability-type integration:data_access --data '{"dataTypeUuid":"..."}'`
1333
- ],
1334
- handler: async ({ ctx, workspace, args, data }) => {
1335
- const abilityType = args["ability-type"];
1336
- if (typeof abilityType !== "string") {
1337
- throw new CLIError("--ability-type is required");
1338
- }
1339
- const scope = requireAbilityScope(args);
1340
- const config = data && typeof data === "object" ? data : {};
1341
- const body = {
1342
- abilityType,
1343
- config,
1344
- ...scope
1345
- };
1346
- const result2 = await requireAuth(ctx).apiClient.createAbility(workspace, body);
1347
- outputSingle(result2, ctx, ABILITY_COLUMNS);
1348
- }
1349
- },
1350
- {
1351
- path: ["agents", "abilities", "disable"],
1352
- description: "Disable an ability instance by UUID (sets enabled=false, keeps config). Use `gr agents abilities list` to find the UUID.",
1353
- mutates: true,
1354
- requiresWorkspace: true,
1355
- args: [{ name: "uuid", description: "Ability instance UUID", required: true }],
1356
- handler: async ({ ctx, workspace, args }) => {
1357
- const uuid = args.uuid;
1358
- if (typeof uuid !== "string") throw new CLIError("--uuid is required");
1359
- const result2 = await requireAuth(ctx).apiClient.updateAbility(workspace, uuid, {
1360
- enabled: false
1361
- });
1362
- outputSingle(result2, ctx, ABILITY_COLUMNS);
1363
- }
1364
- },
1365
- {
1366
- path: ["agents", "abilities", "configure"],
1367
- description: "Update an ability instance by UUID. Pass --data/--file JSON to merge into config, and/or --enabled true|false to toggle. config is merged with the existing config server-side.",
1368
- mutates: true,
1369
- requiresWorkspace: true,
1370
- args: [
1371
- { name: "uuid", description: "Ability instance UUID", required: true },
1372
- { name: "enabled", description: "Set enabled state (true|false)" }
1373
- ],
1374
- examples: [
1375
- `gr agents abilities configure --uuid <uuid> --data '{"canForward":true}'`,
1376
- "gr agents abilities configure --uuid <uuid> --enabled true"
1377
- ],
1378
- handler: async ({ ctx, workspace, args, data }) => {
1379
- const uuid = args.uuid;
1380
- if (typeof uuid !== "string") throw new CLIError("--uuid is required");
1381
- const body = {};
1382
- if (data && typeof data === "object") {
1383
- body.config = data;
1384
- }
1385
- if (typeof args.enabled === "string") {
1386
- if (args.enabled !== "true" && args.enabled !== "false") {
1387
- throw new CLIError("--enabled must be true or false");
1388
- }
1389
- body.enabled = args.enabled === "true";
1390
- }
1391
- if (Object.keys(body).length === 0) {
1392
- throw new CLIError(
1393
- "Nothing to update: provide --data config and/or --enabled"
1394
- );
1395
- }
1396
- const result2 = await requireAuth(ctx).apiClient.updateAbility(workspace, uuid, body);
1397
- outputSingle(result2, ctx, ABILITY_COLUMNS);
1398
- }
1399
- }
1217
+ })
1400
1218
  ]
1401
1219
  };
1402
1220
 
@@ -1404,8 +1222,12 @@ var agentsDomain = {
1404
1222
  var COLUMNS2 = [
1405
1223
  COL.id(),
1406
1224
  COL.uuid(),
1407
- { header: "TYPE", getValue: (item) => item.chatType ?? item.chat_type ?? "" },
1408
- { header: "MEMBER", getValue: (item) => item.member_name ?? String(item.member_id ?? "") },
1225
+ { header: "TYPE", getValue: (item) => item.chatType ?? "" },
1226
+ // ChatResponse has no top-level memberName; surface participant when present
1227
+ {
1228
+ header: "MEMBER",
1229
+ getValue: (item) => item.memberName ?? item.participants?.[0]?.name ?? String(item.memberId ?? item.participants?.[0]?.memberId ?? "")
1230
+ },
1409
1231
  COL.status(),
1410
1232
  { header: "CHANNEL", getValue: (item) => item.channel ?? "" },
1411
1233
  COL.created()
@@ -1431,6 +1253,24 @@ var MESSAGE_COLUMNS2 = [
1431
1253
  },
1432
1254
  COL.created()
1433
1255
  ];
1256
+ var FEEDBACK_COLUMNS = [
1257
+ COL.id(),
1258
+ { header: "SOURCE", getValue: (item) => item.source ?? "" },
1259
+ { header: "AUTHOR", getValue: (item) => item.authorKind ?? "" },
1260
+ {
1261
+ header: "RATING",
1262
+ getValue: (item) => {
1263
+ if (item.rating == null) return "";
1264
+ return Number(item.rating) >= 0.5 ? "up" : "down";
1265
+ }
1266
+ },
1267
+ {
1268
+ header: "BODY",
1269
+ getValue: (item) => String(item.body ?? "").slice(0, 48),
1270
+ maxWidth: 48
1271
+ },
1272
+ COL.created()
1273
+ ];
1434
1274
  async function respondToInterrupt(ctx, workspace, args, decisionType) {
1435
1275
  const chatId = requireIdOrUuidFrom(args, "chat-id", "id");
1436
1276
  const chat = await requireAuth(ctx).apiClient.getChat(workspace, chatId);
@@ -1491,10 +1331,70 @@ var chatsDomain = {
1491
1331
  { name: "member-id", description: "Filter by member ID" },
1492
1332
  {
1493
1333
  name: "chat-type",
1494
- description: "Filter by chat type (assignment, manager, dm, contributor). Default: assignment"
1334
+ description: "Filter by chat type (assignment, manager, dm, contributor). Omitted = all types."
1495
1335
  }
1496
1336
  ]
1497
1337
  }),
1338
+ // Feedback (durable chat_feedback rows for this chat)
1339
+ {
1340
+ path: ["chats", "feedback", "list"],
1341
+ description: "List durable feedback for a chat (thumbs, User Feedback ability, supervisors, extracted). PHI may be in body \u2014 prefer IDs when reporting.",
1342
+ requiresWorkspace: true,
1343
+ args: [
1344
+ {
1345
+ name: "chat-id",
1346
+ aliases: ["id"],
1347
+ description: "Chat ID (numeric id preferred; uuid accepted)",
1348
+ required: true
1349
+ },
1350
+ { name: "page", description: "Page number (default 1)" },
1351
+ { name: "page-size", description: "Page size (default 25, max 100)" },
1352
+ {
1353
+ name: "source",
1354
+ description: "Filter: rating | explicit_user | extracted | supervisor"
1355
+ },
1356
+ { name: "rating", description: "Filter thumbs: 'up' or 'down'" },
1357
+ {
1358
+ name: "author-kind",
1359
+ description: "Filter: end_user | staff | supervisor | system | agent | unknown"
1360
+ }
1361
+ ],
1362
+ handler: async ({ ctx, workspace, args }) => {
1363
+ const chatId = requireIdOrUuidFrom(args, "chat-id", "id");
1364
+ let numericChatId;
1365
+ if (typeof chatId === "number" || /^\d+$/.test(String(chatId))) {
1366
+ numericChatId = Number(chatId);
1367
+ } else {
1368
+ const chat = await requireAuth(ctx).apiClient.getChat(workspace, chatId);
1369
+ numericChatId = Number(chat.id);
1370
+ }
1371
+ const page = args.page != null && args.page !== "" ? Number(args.page) : void 0;
1372
+ const pageSize = args["page-size"] != null && args["page-size"] !== "" ? Number(args["page-size"]) : void 0;
1373
+ const result2 = await requireAuth(ctx).apiClient.getChatFeedback(
1374
+ workspace,
1375
+ numericChatId,
1376
+ {
1377
+ page: Number.isFinite(page) ? page : void 0,
1378
+ pageSize: Number.isFinite(pageSize) ? pageSize : void 0,
1379
+ source: args.source,
1380
+ rating: args.rating,
1381
+ authorKind: args["author-kind"]
1382
+ }
1383
+ );
1384
+ if (ctx.outputFormat === "json" || ctx.outputFormat === "jsonl") {
1385
+ outputData(result2, ctx);
1386
+ } else {
1387
+ outputData(result2.items ?? [], ctx, FEEDBACK_COLUMNS);
1388
+ const summary = result2.summary;
1389
+ if (summary) {
1390
+ process.stderr.write(
1391
+ `total=${summary.total ?? result2.total ?? 0} up=${summary.thumbsUp ?? 0} down=${summary.thumbsDown ?? 0} withComment=${summary.withComment ?? 0}
1392
+ `
1393
+ );
1394
+ }
1395
+ }
1396
+ }
1397
+ },
1498
1398
  // Messages
1499
1399
  {
1500
1400
  path: ["chats", "messages", "list"],
@@ -1830,12 +1730,10 @@ var chatsDomain = {
1830
1730
  );
1831
1731
  return;
1832
1732
  }
1833
- const [chat, messages, ws] = await Promise.all([
1733
+ const [chat, messages] = await Promise.all([
1834
1734
  authed.apiClient.getChat(workspace, chatId),
1835
- authed.apiClient.getChatMessages(workspace, chatId),
1836
- authed.apiClient.getWorkspace(workspace)
1735
+ authed.apiClient.getChatMessages(workspace, chatId)
1837
1736
  ]);
1838
- const isHipaa = ws.features?.includes("hipaa_compliance");
1839
1737
  const result2 = {
1840
1738
  chat: {
1841
1739
  id: chat.id,
@@ -1845,12 +1743,22 @@ var chatsDomain = {
1845
1743
  workflowId: chat.workflowId,
1846
1744
  assignmentId: chat.assignmentId,
1847
1745
  messageCount: chat.messageCount,
1848
- createdAt: chat.createdAt
1746
+ createdAt: chat.createdAt,
1747
+ // Debug views must show who is in the chat — omitting the
1748
+ // people fields reads as "no member" through downstream
1749
+ // field projections (#20262). Always an array so the key
1750
+ // survives JSON serialization even when the API omits it.
1751
+ participants: (chat.participants ?? []).map((p) => ({
1752
+ name: "[REDACTED]",
1753
+ role: p.role,
1754
+ memberId: p.memberId ?? null,
1755
+ memberType: p.memberType ?? null
1756
+ }))
1849
1757
  },
1850
1758
  messages: messages.map((m) => ({
1851
1759
  id: m.id,
1852
1760
  role: m.role,
1853
- content: isHipaa ? "[REDACTED \u2014 HIPAA workspace]" : truncate2(m.content)
1761
+ content: "[REDACTED]"
1854
1762
  }))
1855
1763
  };
1856
1764
  const assignmentId = chat.assignmentId;
@@ -1858,6 +1766,9 @@ var chatsDomain = {
1858
1766
  const assignment = await authed.apiClient.getAssignment(workspace, assignmentId);
1859
1767
  result2.assignment = {
1860
1768
  id: assignment.id,
1769
+ // The assignment's member is load-bearing for debugging —
1770
+ // its omission here misled a prod investigation (#20262).
1771
+ memberId: assignment.memberId ?? null,
1861
1772
  status: assignment.status,
1862
1773
  workflowId: assignment.workflowId,
1863
1774
  workflowName: assignment.workflowName,
@@ -1865,7 +1776,7 @@ var chatsDomain = {
1865
1776
  dataRecords: assignment.dataRecords?.map((dr) => ({
1866
1777
  id: dr.id,
1867
1778
  dataTypeId: dr.dataTypeId,
1868
- fieldValues: isHipaa ? "[REDACTED \u2014 HIPAA workspace]" : dr.fieldValues
1779
+ fieldValues: "[REDACTED]"
1869
1780
  }))
1870
1781
  };
1871
1782
  }
@@ -1916,7 +1827,7 @@ var FILTER_COLUMNS2 = [COL.id(), COL.uuid(), COL.name()];
1916
1827
  var FIELD_COLUMNS = [
1917
1828
  COL.id(),
1918
1829
  COL.name(),
1919
- { header: "TYPE", getValue: (item) => item.field_type ?? "" },
1830
+ { header: "TYPE", getValue: (item) => item.fieldType ?? "" },
1920
1831
  { header: "REQUIRED", getValue: (item) => String(item.required ?? false) }
1921
1832
  ];
1922
1833
  var ROLE_COLUMNS = [COL.id(), COL.uuid(), COL.name()];
@@ -1937,7 +1848,7 @@ var membersDomain = {
1937
1848
  columns: COLUMNS3,
1938
1849
  updateExamples: [
1939
1850
  `yarn gr members update -w $UUID --id 2 --data '{"phone":"+15551234567"}' --allow-write`,
1940
- "yarn gr members update --realm acme-demo/acme-admin --id 2 --file /tmp/member.json --allow-write",
1851
+ "yarn gr members update --profile acme-demo/acme-admin --id 2 --file /tmp/member.json --allow-write",
1941
1852
  "# Trust a member's phone so they can use SMS as themselves (no account):",
1942
1853
  `yarn gr members update -w $UUID --id 2 --data '{"phoneTrusted":true}' --allow-write`
1943
1854
  ]
@@ -2260,16 +2171,33 @@ Member role access (memberRoleAccess)
2260
2171
  [{"memberRoleId": 6, "accessMode": 1}]
2261
2172
  accessMode is a non-negative bitmask of workflow permissions (see API docs).
2262
2173
 
2174
+ Strict-workflow routing
2175
+ routingMode (string) "open_world" (default) or "strict"
2176
+ dataTypeSlug (string) Slug of the session DataType; required when
2177
+ routingMode is "strict". A strict workflow
2178
+ requires dataTypeSlug identifying the session
2179
+ DataType \u2014 omitting it will be rejected by the API.
2180
+
2263
2181
  Other
2264
2182
  archived (bool) Archive flag on update
2265
- dataRecords / tasks / versions Use dedicated subcommands \u2014 not inline here
2183
+ dataRecords / tasks Use dedicated subcommands \u2014 not inline here
2184
+
2185
+ Revisions (immutable graph history) are NOT edited via this --data payload.
2186
+ Use the dedicated commands:
2187
+ workflows publish Freeze the draft as a new revision
2188
+ workflows activate Point live traffic at a published revision
2189
+ workflows revisions list History with client-derived active/draft badges
2190
+ workflows revisions get One revision's full graph
2191
+ workflows revisions edit Branch a published revision back into the draft
2192
+ workflows revisions diff Compare two revisions
2193
+ workflows revisions update Edit a revision's label / publish notes
2266
2194
  `;
2267
2195
 
2268
2196
  // src/domains/workflows.ts
2269
2197
  var COLUMNS5 = [
2270
- COL.id(),
2271
- COL.uuid(),
2272
- COL.name(),
2198
+ { header: "ID", getValue: (item) => String(item.workflow?.id ?? item.id ?? "") },
2199
+ { header: "UUID", getValue: (item) => String(item.workflow?.uuid ?? item.uuid ?? "") },
2200
+ { header: "NAME", getValue: (item) => String(item.workflow?.name ?? item.name ?? "") },
2273
2201
  // taskCount is the total (active + archived). Show the active count as the
2274
2202
  // headline number — matching `tasks list` — and call out archived tasks
2275
2203
  // separately so the table never overstates how many tasks actually run.
@@ -2277,8 +2205,9 @@ var COLUMNS5 = [
2277
2205
  COL.created()
2278
2206
  ];
2279
2207
  function formatTaskCount(item) {
2280
- const total = Number(item.taskCount ?? 0);
2281
- const archived = Number(item.archivedTaskCount ?? 0);
2208
+ const counts = item.draftRevision ?? item;
2209
+ const total = Number(counts.taskCount ?? 0);
2210
+ const archived = Number(counts.archivedTaskCount ?? 0);
2282
2211
  const active = total - archived;
2283
2212
  return archived > 0 ? `${active} (+${archived} archived)` : String(active);
2284
2213
  }
@@ -2296,10 +2225,29 @@ var CONTRIBUTOR_COLUMNS = [
2296
2225
  COL.id(),
2297
2226
  {
2298
2227
  header: "ACCOUNT",
2299
- getValue: (item) => item.account_name ?? String(item.account_id ?? "")
2228
+ getValue: (item) => item.accountName ?? String(item.accountId ?? "")
2300
2229
  },
2301
2230
  { header: "ROLE", getValue: (item) => item.role ?? "" }
2302
2231
  ];
2232
+ var FEEDBACK_COLUMNS2 = [
2233
+ COL.id(),
2234
+ { header: "CHAT", getValue: (item) => String(item.chatId ?? "") },
2235
+ { header: "SOURCE", getValue: (item) => item.source ?? "" },
2236
+ { header: "AUTHOR", getValue: (item) => item.authorKind ?? "" },
2237
+ {
2238
+ header: "RATING",
2239
+ getValue: (item) => {
2240
+ if (item.rating == null) return "";
2241
+ return Number(item.rating) >= 0.5 ? "up" : "down";
2242
+ }
2243
+ },
2244
+ {
2245
+ header: "BODY",
2246
+ getValue: (item) => String(item.body ?? "").slice(0, 48),
2247
+ maxWidth: 48
2248
+ },
2249
+ COL.created()
2250
+ ];
2303
2251
  var TEMPLATE_COLUMNS = [
2304
2252
  COL.id(),
2305
2253
  COL.name(),
@@ -2309,6 +2257,31 @@ var TEMPLATE_COLUMNS = [
2309
2257
  maxWidth: 60
2310
2258
  }
2311
2259
  ];
2260
+ var REVISION_COLUMNS = [
2261
+ { header: "ID", getValue: (r) => String(r.id ?? "") },
2262
+ { header: "REV#", getValue: (r) => String(r.revisionNumber ?? "") },
2263
+ { header: "NAME", getValue: (r) => r.revisionName ?? "" },
2264
+ { header: "PUBLISHED", getValue: (r) => r.publishedAt ?? "(draft)" },
2265
+ { header: "CREATED", getValue: (r) => r.createdAt ?? "" }
2266
+ ];
2267
+ var REVISION_LIST_COLUMNS = [
2268
+ { header: "ID", getValue: (r) => String(r.id ?? "") },
2269
+ { header: "STATE", getValue: (r) => r.badges ?? "" },
2270
+ { header: "REV#", getValue: (r) => String(r.revisionNumber ?? "") },
2271
+ { header: "NAME", getValue: (r) => r.revisionName ?? "" },
2272
+ { header: "PUBLISHED", getValue: (r) => r.publishedAt ?? "(draft)" },
2273
+ { header: "CREATED", getValue: (r) => r.createdAt ?? "" }
2274
+ ];
2275
+ function deriveRevisionBadges(revisionId, activeRevisionId, draftRevisionId) {
2276
+ const badges = [];
2277
+ if (activeRevisionId != null && Number(revisionId) === Number(activeRevisionId)) {
2278
+ badges.push("active");
2279
+ }
2280
+ if (draftRevisionId != null && Number(revisionId) === Number(draftRevisionId)) {
2281
+ badges.push("draft");
2282
+ }
2283
+ return badges.join("+");
2284
+ }
2312
2285
  var workflowsDomain = {
2313
2286
  name: "workflows",
2314
2287
  description: "Manage workflows",
@@ -2365,6 +2338,61 @@ var workflowsDomain = {
2365
2338
  outputSingle(result2, ctx, COLUMNS5);
2366
2339
  }
2367
2340
  },
2341
+ // Feedback (durable chat_feedback for chats on this workflow)
2342
+ {
2343
+ path: ["workflows", "feedback", "list"],
2344
+ description: "List durable feedback for a workflow (thumbs, User Feedback ability, supervisors, extracted). PHI may be in body \u2014 prefer IDs when reporting.",
2345
+ requiresWorkspace: true,
2346
+ args: [
2347
+ { name: "id", description: "Workflow ID", required: true },
2348
+ { name: "page", description: "Page number (default 1)" },
2349
+ { name: "page-size", description: "Page size (default 25, max 100)" },
2350
+ {
2351
+ name: "source",
2352
+ description: "Filter: rating | explicit_user | extracted | supervisor"
2353
+ },
2354
+ { name: "rating", description: "Filter thumbs: 'up' or 'down'" },
2355
+ {
2356
+ name: "author-kind",
2357
+ description: "Filter: end_user | staff | supervisor | system | agent | unknown"
2358
+ },
2359
+ {
2360
+ name: "include-test",
2361
+ description: "Include test chats (default true; pass false to exclude)"
2362
+ }
2363
+ ],
2364
+ handler: async ({ ctx, workspace, args }) => {
2365
+ const workflowId = requireNumber(args, "id");
2366
+ const page = args.page != null && args.page !== "" ? Number(args.page) : void 0;
2367
+ const pageSize = args["page-size"] != null && args["page-size"] !== "" ? Number(args["page-size"]) : void 0;
2368
+ const includeTestRaw = args["include-test"];
2369
+ const includeTest = includeTestRaw === void 0 || includeTestRaw === null || includeTestRaw === "" ? void 0 : String(includeTestRaw).toLowerCase() !== "false" && includeTestRaw !== false;
2370
+ const result2 = await requireAuth(ctx).apiClient.getWorkflowFeedback(
2371
+ workspace,
2372
+ workflowId,
2373
+ {
2374
+ page: Number.isFinite(page) ? page : void 0,
2375
+ pageSize: Number.isFinite(pageSize) ? pageSize : void 0,
2376
+ source: args.source,
2377
+ rating: args.rating,
2378
+ authorKind: args["author-kind"],
2379
+ includeTest
2380
+ }
2381
+ );
2382
+ if (ctx.outputFormat === "json" || ctx.outputFormat === "jsonl") {
2383
+ outputData(result2, ctx);
2384
+ } else {
2385
+ outputData(result2.items ?? [], ctx, FEEDBACK_COLUMNS2);
2386
+ const summary = result2.summary;
2387
+ if (summary) {
2388
+ process.stderr.write(
2389
+ `total=${summary.total ?? result2.total ?? 0} up=${summary.thumbsUp ?? 0} down=${summary.thumbsDown ?? 0} withComment=${summary.withComment ?? 0}
2390
+ `
2391
+ );
2392
+ }
2393
+ }
2394
+ }
2395
+ },
2368
2396
  // Activity
2369
2397
  {
2370
2398
  path: ["workflows", "activity"],
@@ -2544,288 +2572,244 @@ var workflowsDomain = {
2544
2572
  `);
2545
2573
  }
2546
2574
  },
2575
+ // Revisions — immutable graph history under a stable workflow root.
2576
+ // `{workflow-id}` names the stable root; `{revision-id}` names a revision
2577
+ // row. They are never interchangeable (a revision id in a workflow slot
2578
+ // is a 404).
2547
2579
  {
2548
- path: ["workflows", "create"],
2549
- description: `Create a workflow
2550
-
2551
- ${WORKFLOW_FIELD_REFERENCE}`,
2552
- mutates: true,
2580
+ path: ["workflows", "revisions", "list"],
2581
+ description: "List a workflow\u2019s revisions (active/draft badges derived client-side)",
2553
2582
  requiresWorkspace: true,
2554
- handler: async ({ ctx, workspace, data }) => {
2555
- if (!data || typeof data !== "object") {
2556
- throw new CLIError("JSON data required (--data, --file, or stdin)");
2583
+ args: [{ name: "workflow-id", description: "Workflow (root) ID or UUID", required: true }],
2584
+ handler: async ({ ctx, workspace, args }) => {
2585
+ const workflowId = requireIdOrUuidFrom(args, "workflow-id");
2586
+ const result2 = await requireAuth(ctx).apiClient.getWorkflowRevisions(
2587
+ workspace,
2588
+ workflowId
2589
+ );
2590
+ const workflow = result2?.workflow ?? {};
2591
+ const revisions = result2?.revisions ?? [];
2592
+ if (ctx.outputFormat === "table") {
2593
+ stderr(
2594
+ `workflow ${workflow.id ?? "?"} "${workflow.name ?? ""}" activeRevisionId=${workflow.activeRevisionId ?? "\u2014"} draftRevisionId=${workflow.draftRevisionId ?? "\u2014"}`
2595
+ );
2596
+ const rows = revisions.map((r) => ({
2597
+ ...r,
2598
+ badges: deriveRevisionBadges(
2599
+ r.id,
2600
+ workflow.activeRevisionId,
2601
+ workflow.draftRevisionId
2602
+ )
2603
+ }));
2604
+ outputData(rows, ctx, REVISION_LIST_COLUMNS);
2605
+ } else {
2606
+ outputSingle(result2, ctx);
2557
2607
  }
2558
- const result2 = await requireAuth(ctx).apiClient.createWorkflow(workspace, data);
2559
- outputSingle(result2, ctx, COLUMNS5);
2560
2608
  }
2561
2609
  },
2562
2610
  {
2563
- path: ["workflows", "update"],
2564
- description: `Update a workflow
2565
-
2566
- ${WORKFLOW_FIELD_REFERENCE}`,
2567
- mutates: true,
2611
+ path: ["workflows", "revisions", "get"],
2612
+ description: "Get one workflow revision (full graph)",
2568
2613
  requiresWorkspace: true,
2569
- args: [{ name: "id", description: "Workflow ID", required: true }],
2570
- handler: async ({ ctx, workspace, args, data }) => {
2571
- if (!data || typeof data !== "object") {
2572
- throw new CLIError("JSON data required (--data, --file, or stdin)");
2573
- }
2574
- const result2 = await requireAuth(ctx).apiClient.updateWorkflow(
2614
+ args: [
2615
+ { name: "workflow-id", description: "Workflow (root) ID or UUID", required: true },
2616
+ { name: "revision-id", description: "Revision ID or UUID", required: true }
2617
+ ],
2618
+ handler: async ({ ctx, workspace, args }) => {
2619
+ const workflowId = requireIdOrUuidFrom(args, "workflow-id");
2620
+ const revisionId = requireIdOrUuidFrom(args, "revision-id");
2621
+ const result2 = await requireAuth(ctx).apiClient.getWorkflowRevision(
2575
2622
  workspace,
2576
- requireNumber(args, "id"),
2577
- data
2623
+ workflowId,
2624
+ revisionId
2578
2625
  );
2579
- outputSingle(result2, ctx, COLUMNS5);
2626
+ outputSingle(result2, ctx);
2580
2627
  }
2581
- }
2582
- ]
2583
- };
2584
-
2585
- // src/domains/workflow-versions.ts
2586
- var WORKFLOW_UUID_ARG = {
2587
- name: "workflow-uuid",
2588
- description: "Workflow UUID",
2589
- required: true
2590
- };
2591
- var VERSION_ARG = {
2592
- name: "version",
2593
- description: "Version number",
2594
- required: true
2595
- };
2596
- var COLUMNS6 = [
2597
- { header: "VERSION", getValue: (item) => String(item.versionNumber ?? "") },
2598
- COL.uuid(),
2599
- COL.name(),
2600
- {
2601
- header: "ACTIVE",
2602
- getValue: (item) => item.isActive ? "yes" : "no"
2603
- },
2604
- {
2605
- header: "SOURCE",
2606
- getValue: (item) => item.sourceType ?? ""
2607
- },
2608
- {
2609
- header: "PUBLISHED",
2610
- getValue: (item) => item.publishedAt ?? ""
2611
- },
2612
- {
2613
- header: "SUMMARY",
2614
- getValue: (item) => (item.changeSummary ?? "").slice(0, 50),
2615
- maxWidth: 50
2616
- }
2617
- ];
2618
- var workflowVersionsDomain = {
2619
- name: "workflow-versions",
2620
- description: "Manage workflow versions (publish, activate, inspect snapshots)",
2621
- commands: [
2622
- // List versions
2628
+ },
2623
2629
  {
2624
- path: ["workflow-versions", "list"],
2625
- description: "List all published versions of a workflow",
2630
+ path: ["workflows", "publish"],
2631
+ description: "Publish the workflow\u2019s draft as a new revision (activates it by default)",
2632
+ mutates: true,
2626
2633
  requiresWorkspace: true,
2627
- args: [WORKFLOW_UUID_ARG],
2634
+ args: [
2635
+ { name: "workflow-id", description: "Workflow (root) ID or UUID", required: true },
2636
+ { name: "revision-name", description: "Optional short label for the new revision" },
2637
+ { name: "publish-notes", description: "Optional longer summary captured at publish" },
2638
+ {
2639
+ name: "no-activate",
2640
+ description: "Publish without flipping live traffic (setActive=false)",
2641
+ isFlag: true
2642
+ }
2643
+ ],
2628
2644
  handler: async ({ ctx, workspace, args }) => {
2629
- const workflowUuid = requireString(args, "workflow-uuid");
2630
- const result2 = await requireAuth(ctx).apiClient.getWorkflowVersions(
2645
+ const workflowId = requireIdOrUuidFrom(args, "workflow-id");
2646
+ const data = {};
2647
+ if (typeof args["revision-name"] === "string")
2648
+ data.revisionName = args["revision-name"];
2649
+ if (typeof args["publish-notes"] === "string")
2650
+ data.publishNotes = args["publish-notes"];
2651
+ if (args["no-activate"] === true) data.setActive = false;
2652
+ const result2 = await requireAuth(ctx).apiClient.publishWorkflowRevision(
2631
2653
  workspace,
2632
- workflowUuid
2654
+ workflowId,
2655
+ data
2633
2656
  );
2634
- process.stderr.write(`Next version number: ${result2.nextVersionNumber}
2635
- `);
2636
- outputData(result2.versions, ctx, COLUMNS6);
2657
+ outputSingle(result2, ctx, REVISION_COLUMNS);
2637
2658
  }
2638
2659
  },
2639
- // Get specific version
2640
2660
  {
2641
- path: ["workflow-versions", "get"],
2642
- description: "Get a specific version by number (includes full snapshot)",
2661
+ path: ["workflows", "activate"],
2662
+ description: "Point the workflow\u2019s active pointer at a published revision",
2663
+ mutates: true,
2643
2664
  requiresWorkspace: true,
2644
- args: [WORKFLOW_UUID_ARG, VERSION_ARG],
2665
+ args: [
2666
+ { name: "workflow-id", description: "Workflow (root) ID or UUID", required: true },
2667
+ { name: "revision-id", description: "Revision ID or UUID to activate", required: true },
2668
+ {
2669
+ name: "allow-draft",
2670
+ description: 'Allow activating the draft revision ("make my edits live")',
2671
+ isFlag: true
2672
+ }
2673
+ ],
2645
2674
  handler: async ({ ctx, workspace, args }) => {
2646
- const workflowUuid = requireString(args, "workflow-uuid");
2647
- const versionNumber = requireNumber(args, "version");
2648
- const result2 = await requireAuth(ctx).apiClient.getWorkflowVersion(
2675
+ const workflowId = requireIdOrUuidFrom(args, "workflow-id");
2676
+ const revisionId = requireIdOrUuidFrom(args, "revision-id");
2677
+ const data = {};
2678
+ if (args["allow-draft"] === true) data.allowDraft = true;
2679
+ const result2 = await requireAuth(ctx).apiClient.activateWorkflowRevision(
2649
2680
  workspace,
2650
- workflowUuid,
2651
- versionNumber
2681
+ workflowId,
2682
+ revisionId,
2683
+ data
2652
2684
  );
2653
- outputSingle(result2, ctx, COLUMNS6);
2685
+ outputSingle(result2, ctx, REVISION_COLUMNS);
2654
2686
  }
2655
2687
  },
2656
- // Get active version
2657
2688
  {
2658
- path: ["workflow-versions", "active"],
2659
- description: "Get the currently active version of a workflow",
2689
+ path: ["workflows", "revisions", "edit"],
2690
+ description: "Branch a published revision into the workflow\u2019s draft",
2691
+ mutates: true,
2660
2692
  requiresWorkspace: true,
2661
- args: [WORKFLOW_UUID_ARG],
2693
+ args: [
2694
+ { name: "workflow-id", description: "Workflow (root) ID or UUID", required: true },
2695
+ { name: "revision-id", description: "Published revision ID or UUID", required: true },
2696
+ {
2697
+ name: "discard-draft-changes",
2698
+ description: "Replace the current draft even if it has unpublished changes",
2699
+ isFlag: true
2700
+ }
2701
+ ],
2662
2702
  handler: async ({ ctx, workspace, args }) => {
2663
- const workflowUuid = requireString(args, "workflow-uuid");
2664
- const result2 = await requireAuth(ctx).apiClient.getWorkflowVersionActive(
2703
+ const workflowId = requireIdOrUuidFrom(args, "workflow-id");
2704
+ const revisionId = requireIdOrUuidFrom(args, "revision-id");
2705
+ const data = {};
2706
+ if (args["discard-draft-changes"] === true) data.discardDraftChanges = true;
2707
+ const result2 = await requireAuth(ctx).apiClient.editWorkflowRevisionAsDraft(
2665
2708
  workspace,
2666
- workflowUuid
2709
+ workflowId,
2710
+ revisionId,
2711
+ data
2667
2712
  );
2668
- outputSingle(result2, ctx, COLUMNS6);
2713
+ outputSingle(result2, ctx, REVISION_COLUMNS);
2669
2714
  }
2670
2715
  },
2671
- // Publish
2672
2716
  {
2673
- path: ["workflow-versions", "publish"],
2674
- description: "Publish the live workflow as a new immutable version",
2675
- mutates: true,
2717
+ path: ["workflows", "revisions", "diff"],
2718
+ description: "Diff a revision against another (defaults to the workflow\u2019s draft)",
2676
2719
  requiresWorkspace: true,
2677
2720
  args: [
2678
- WORKFLOW_UUID_ARG,
2679
- {
2680
- name: "name",
2681
- description: "Human-readable version name",
2682
- required: false
2683
- },
2721
+ { name: "workflow-id", description: "Workflow (root) ID or UUID", required: true },
2722
+ { name: "revision-id", description: "Base revision ID or UUID", required: true },
2684
2723
  {
2685
- name: "summary",
2686
- description: "Change summary",
2687
- required: false
2688
- },
2689
- {
2690
- name: "no-activate",
2691
- description: "Publish without activating",
2692
- isFlag: true,
2693
- required: false
2724
+ name: "against",
2725
+ description: "Revision ID or UUID to compare against (default: the draft)"
2694
2726
  }
2695
2727
  ],
2696
- examples: [
2697
- "workflow-versions publish --workflow-uuid $UUID",
2698
- 'workflow-versions publish --workflow-uuid $UUID --name "v2 Release" --summary "Added triage step"',
2699
- "workflow-versions publish --workflow-uuid $UUID --no-activate"
2700
- ],
2701
- handler: async ({ ctx, workspace, args, data }) => {
2702
- const workflowUuid = requireString(args, "workflow-uuid");
2703
- const body = data ?? {};
2704
- if (args.name) body.name = args.name;
2705
- if (args.summary) body.changeSummary = args.summary;
2706
- if (args["no-activate"]) body.activate = false;
2707
- const result2 = await requireAuth(ctx).apiClient.publishWorkflowVersion(
2728
+ handler: async ({ ctx, workspace, args }) => {
2729
+ const workflowId = requireIdOrUuidFrom(args, "workflow-id");
2730
+ const revisionId = requireIdOrUuidFrom(args, "revision-id");
2731
+ const againstRaw = args["against"];
2732
+ const against = typeof againstRaw === "string" && againstRaw.length > 0 ? Number.isNaN(Number(againstRaw)) ? againstRaw : Number(againstRaw) : void 0;
2733
+ const result2 = await requireAuth(ctx).apiClient.diffWorkflowRevisions(
2708
2734
  workspace,
2709
- workflowUuid,
2710
- body
2735
+ workflowId,
2736
+ revisionId,
2737
+ against
2711
2738
  );
2712
- outputSingle(result2, ctx, COLUMNS6);
2739
+ outputSingle(result2, ctx);
2713
2740
  }
2714
2741
  },
2715
- // Activate
2716
2742
  {
2717
- path: ["workflow-versions", "activate"],
2718
- description: "Activate a version so it receives new assignments",
2743
+ path: ["workflows", "revisions", "update"],
2744
+ description: "Update a revision\u2019s curation metadata (label + publish notes)",
2719
2745
  mutates: true,
2720
2746
  requiresWorkspace: true,
2721
- args: [WORKFLOW_UUID_ARG, VERSION_ARG],
2747
+ args: [
2748
+ { name: "workflow-id", description: "Workflow (root) ID or UUID", required: true },
2749
+ { name: "revision-id", description: "Revision ID or UUID", required: true },
2750
+ { name: "revision-name", description: "New short label for the revision" },
2751
+ { name: "publish-notes", description: "New longer summary for the revision" }
2752
+ ],
2722
2753
  handler: async ({ ctx, workspace, args }) => {
2723
- const workflowUuid = requireString(args, "workflow-uuid");
2724
- const versionNumber = requireNumber(args, "version");
2725
- const result2 = await requireAuth(ctx).apiClient.activateWorkflowVersion(
2754
+ const workflowId = requireIdOrUuidFrom(args, "workflow-id");
2755
+ const revisionId = requireIdOrUuidFrom(args, "revision-id");
2756
+ const data = {};
2757
+ if (typeof args["revision-name"] === "string")
2758
+ data.revisionName = args["revision-name"];
2759
+ if (typeof args["publish-notes"] === "string")
2760
+ data.publishNotes = args["publish-notes"];
2761
+ if (Object.keys(data).length === 0) {
2762
+ throw new CLIError("Nothing to update: pass --revision-name and/or --publish-notes");
2763
+ }
2764
+ const result2 = await requireAuth(ctx).apiClient.updateWorkflowRevisionMetadata(
2726
2765
  workspace,
2727
- workflowUuid,
2728
- versionNumber
2766
+ workflowId,
2767
+ revisionId,
2768
+ data
2729
2769
  );
2730
- outputSingle(result2, ctx, COLUMNS6);
2770
+ outputSingle(result2, ctx, REVISION_COLUMNS);
2731
2771
  }
2732
2772
  },
2733
- // Deactivate
2734
2773
  {
2735
- path: ["workflow-versions", "deactivate"],
2736
- description: "Deactivate a version so it no longer receives new assignments",
2774
+ path: ["workflows", "create"],
2775
+ description: `Create a workflow
2776
+
2777
+ ${WORKFLOW_FIELD_REFERENCE}`,
2737
2778
  mutates: true,
2738
2779
  requiresWorkspace: true,
2739
- args: [WORKFLOW_UUID_ARG, VERSION_ARG],
2740
- handler: async ({ ctx, workspace, args }) => {
2741
- const workflowUuid = requireString(args, "workflow-uuid");
2742
- const versionNumber = requireNumber(args, "version");
2743
- const result2 = await requireAuth(ctx).apiClient.deactivateWorkflowVersion(
2744
- workspace,
2745
- workflowUuid,
2746
- versionNumber
2747
- );
2748
- outputSingle(result2, ctx, COLUMNS6);
2780
+ handler: async ({ ctx, workspace, data }) => {
2781
+ if (!data || typeof data !== "object") {
2782
+ throw new CLIError("JSON data required (--data, --file, or stdin)");
2783
+ }
2784
+ const result2 = await requireAuth(ctx).apiClient.createWorkflow(workspace, data);
2785
+ outputSingle(result2, ctx, COLUMNS5);
2749
2786
  }
2750
2787
  },
2751
- // Diff (compare two versions, 0 = draft)
2752
2788
  {
2753
- path: ["workflow-versions", "diff"],
2754
- description: "Compare two versions (use 0 for draft)",
2789
+ path: ["workflows", "update"],
2790
+ description: `Update a workflow
2791
+
2792
+ ${WORKFLOW_FIELD_REFERENCE}`,
2793
+ mutates: true,
2755
2794
  requiresWorkspace: true,
2756
- args: [
2757
- WORKFLOW_UUID_ARG,
2758
- { name: "from", description: "Base version number (0 = draft)", required: true },
2759
- { name: "to", description: "Target version number (0 = draft)", required: true }
2760
- ],
2761
- examples: [
2762
- "workflow-versions diff --workflow-uuid $UUID --from 1 --to 2",
2763
- "workflow-versions diff --workflow-uuid $UUID --from 1 --to 0 # compare v1 to draft"
2764
- ],
2765
- handler: async ({ ctx, workspace, args }) => {
2766
- const workflowUuid = requireString(args, "workflow-uuid");
2767
- const from = requireNumber(args, "from");
2768
- const to = requireNumber(args, "to");
2769
- const diff = await requireAuth(ctx).apiClient.diffWorkflowVersions(
2770
- workspace,
2771
- workflowUuid,
2772
- from,
2773
- to
2774
- );
2775
- if (ctx.outputFormat === "json") {
2776
- process.stdout.write(JSON.stringify(diff, null, 2) + "\n");
2777
- return;
2795
+ args: [{ name: "id", description: "Workflow ID", required: true }],
2796
+ handler: async ({ ctx, workspace, args, data }) => {
2797
+ if (!data || typeof data !== "object") {
2798
+ throw new CLIError("JSON data required (--data, --file, or stdin)");
2778
2799
  }
2779
- process.stdout.write(
2780
- `
2781
- Comparing ${diff.fromVersion.label} \u2192 ${diff.toVersion.label}
2782
- `
2783
- );
2784
- process.stdout.write(
2785
- `Changes: +${diff.summary.added} \u2212${diff.summary.removed} ~${diff.summary.modified}
2786
-
2787
- `
2800
+ const result2 = await requireAuth(ctx).apiClient.updateWorkflow(
2801
+ workspace,
2802
+ requireNumber(args, "id"),
2803
+ data
2788
2804
  );
2789
- if (diff.changes.length === 0) {
2790
- process.stdout.write("No differences.\n");
2791
- return;
2792
- }
2793
- let currentCategory = "";
2794
- for (const change of diff.changes) {
2795
- if (change.category !== currentCategory) {
2796
- currentCategory = change.category;
2797
- process.stdout.write(`[${currentCategory}]
2798
- `);
2799
- }
2800
- const prefix = change.changeType === "added" ? " + " : change.changeType === "removed" ? " \u2212 " : " ~ ";
2801
- const fieldSummary = change.fields && change.fields.length > 0 ? ` (${change.fields.map((f) => f.field).join(", ")})` : "";
2802
- process.stdout.write(`${prefix}${change.label}${fieldSummary}
2803
- `);
2804
- if (change.fields) {
2805
- for (const field of change.fields) {
2806
- if (field.oldValue != null || field.newValue != null) {
2807
- process.stdout.write(` ${field.field}:
2808
- `);
2809
- if (field.oldValue != null) {
2810
- process.stdout.write(` - ${field.oldValue}
2811
- `);
2812
- }
2813
- if (field.newValue != null) {
2814
- process.stdout.write(` + ${field.newValue}
2815
- `);
2816
- }
2817
- }
2818
- }
2819
- }
2820
- }
2821
- process.stdout.write("\n");
2805
+ outputSingle(result2, ctx, COLUMNS5);
2822
2806
  }
2823
2807
  }
2824
2808
  ]
2825
2809
  };
2826
2810
 
2827
2811
  // src/domains/workspaces.ts
2828
- var COLUMNS7 = [
2812
+ var COLUMNS6 = [
2829
2813
  COL.id(),
2830
2814
  COL.uuid(),
2831
2815
  COL.name(),
@@ -2897,7 +2881,7 @@ var workspacesDomain = {
2897
2881
  // getMethod omitted — custom get below accepts -w as the identifier
2898
2882
  updateMethod: "updateWorkspace",
2899
2883
  deleteMethod: "deleteWorkspace",
2900
- columns: COLUMNS7,
2884
+ columns: COLUMNS6,
2901
2885
  requiresWorkspace: false
2902
2886
  }),
2903
2887
  // Custom get that accepts either --id or -w as the workspace identifier
@@ -2910,7 +2894,7 @@ var workspacesDomain = {
2910
2894
  const id = args.id ?? args.uuid ?? workspace;
2911
2895
  if (!id) throw new CLIError("Provide workspace UUID via --id or -w");
2912
2896
  const result2 = await requireAuth(ctx).apiClient.getWorkspace(id);
2913
- outputSingle(result2, ctx, COLUMNS7);
2897
+ outputSingle(result2, ctx, COLUMNS6);
2914
2898
  }
2915
2899
  },
2916
2900
  // Provision a workspace under an organization's active subscription.
@@ -2956,7 +2940,7 @@ var workspacesDomain = {
2956
2940
  orgUuid,
2957
2941
  payload
2958
2942
  );
2959
- outputSingle(result2, ctx, COLUMNS7);
2943
+ outputSingle(result2, ctx, COLUMNS6);
2960
2944
  if ((ctx.outputFormat ?? "table") === "table") {
2961
2945
  const wsUuid = result2?.uuid ?? "<workspace-uuid>";
2962
2946
  process.stdout.write(
@@ -3109,7 +3093,6 @@ Provisioning started. Watch it come up with:
3109
3093
  "inboxes",
3110
3094
  "routines",
3111
3095
  "memberFilters",
3112
- "memberFilterRules",
3113
3096
  "milestones",
3114
3097
  "milestoneGoals",
3115
3098
  "customToolkits",
@@ -3192,7 +3175,6 @@ Provisioning started. Watch it come up with:
3192
3175
  "inboxes",
3193
3176
  "routines",
3194
3177
  "memberFilters",
3195
- "memberFilterRules",
3196
3178
  "milestones",
3197
3179
  "milestoneGoals",
3198
3180
  "customToolkits",
@@ -3455,12 +3437,18 @@ Provisioning started. Watch it come up with:
3455
3437
  };
3456
3438
 
3457
3439
  // src/domains/assignments.ts
3458
- var COLUMNS8 = [
3440
+ var COLUMNS7 = [
3459
3441
  COL.id(),
3460
3442
  COL.status(),
3461
- { header: "MEMBER", getValue: (item) => String(item.member_id ?? "") },
3462
- { header: "TASK", getValue: (item) => String(item.current_assignment_task_id ?? "") },
3463
- { header: "WF_VERSION", getValue: (item) => String(item.workflowVersionNumber ?? "") },
3443
+ { header: "MEMBER", getValue: (item) => String(item.memberId ?? "") },
3444
+ {
3445
+ header: "TASK",
3446
+ getValue: (item) => String(item.currentTask?.id ?? item.currentAssignmentTaskId ?? "")
3447
+ },
3448
+ {
3449
+ header: "WF_REVISION",
3450
+ getValue: (item) => String(item.workflowRevisionNumber ?? item.workflowVersionNumber ?? "")
3451
+ },
3464
3452
  COL.created()
3465
3453
  ];
3466
3454
  var MESSAGE_COLUMNS4 = [
@@ -3470,7 +3458,7 @@ var MESSAGE_COLUMNS4 = [
3470
3458
  COL.created()
3471
3459
  ];
3472
3460
  var TASK_COLUMNS = [COL.id(), COL.name(), COL.status()];
3473
- var TOOL_COLUMNS2 = [
3461
+ var TOOL_COLUMNS = [
3474
3462
  COL.name(),
3475
3463
  { header: "DESCRIPTION", getValue: (item) => (item.description ?? "").slice(0, 60) }
3476
3464
  ];
@@ -3486,7 +3474,7 @@ var assignmentsDomain = {
3486
3474
  createMethod: "createAssignment",
3487
3475
  updateMethod: "updateAssignment",
3488
3476
  deleteMethod: "deleteAssignment",
3489
- columns: COLUMNS8,
3477
+ columns: COLUMNS7,
3490
3478
  paginationSupport: "full"
3491
3479
  }),
3492
3480
  {
@@ -3502,7 +3490,7 @@ var assignmentsDomain = {
3502
3490
  requireNumber(args, "id"),
3503
3491
  body
3504
3492
  );
3505
- outputSingle(result2, ctx, COLUMNS8);
3493
+ outputSingle(result2, ctx, COLUMNS7);
3506
3494
  }
3507
3495
  },
3508
3496
  {
@@ -3578,14 +3566,14 @@ var assignmentsDomain = {
3578
3566
  requireNumber(args, "assignment-id")
3579
3567
  );
3580
3568
  const tools = result2.tools ?? result2;
3581
- outputData(Array.isArray(tools) ? tools : [tools], ctx, TOOL_COLUMNS2);
3569
+ outputData(Array.isArray(tools) ? tools : [tools], ctx, TOOL_COLUMNS);
3582
3570
  }
3583
3571
  }
3584
3572
  ]
3585
3573
  };
3586
3574
 
3587
3575
  // src/domains/calendars.ts
3588
- var COLUMNS9 = [
3576
+ var COLUMNS8 = [
3589
3577
  COL.id(),
3590
3578
  COL.name(),
3591
3579
  { header: "TIMEZONE", getValue: (item) => item.timezone ?? "" }
@@ -3593,7 +3581,7 @@ var COLUMNS9 = [
3593
3581
  var SCHEDULE_COLUMNS = [
3594
3582
  COL.id(),
3595
3583
  COL.name(),
3596
- { header: "CALENDAR", getValue: (item) => String(item.calendar_id ?? "") }
3584
+ { header: "CALENDAR", getValue: (item) => String(item.calendarId ?? "") }
3597
3585
  ];
3598
3586
  var EVENT_COLUMNS = [
3599
3587
  COL.id(),
@@ -3625,7 +3613,7 @@ var calendarsDomain = {
3625
3613
  createMethod: "createCalendar",
3626
3614
  updateMethod: "updateCalendar",
3627
3615
  deleteMethod: "deleteCalendar",
3628
- columns: COLUMNS9,
3616
+ columns: COLUMNS8,
3629
3617
  paginationSupport: "full"
3630
3618
  }),
3631
3619
  // Schedules sub-resource
@@ -3858,7 +3846,7 @@ var calendarsDomain = {
3858
3846
  };
3859
3847
 
3860
3848
  // src/domains/data-types.ts
3861
- var COLUMNS10 = [
3849
+ var COLUMNS9 = [
3862
3850
  COL.id(),
3863
3851
  COL.name(),
3864
3852
  { header: "SLUG", getValue: (item) => item.slug ?? "" },
@@ -3866,8 +3854,8 @@ var COLUMNS10 = [
3866
3854
  ];
3867
3855
  var RECORD_COLUMNS = [
3868
3856
  COL.id(),
3869
- { header: "DATA TYPE", getValue: (item) => String(item.data_type_id ?? "") },
3870
- { header: "MEMBER", getValue: (item) => String(item.member_id ?? "") },
3857
+ { header: "DATA TYPE", getValue: (item) => String(item.dataTypeId ?? "") },
3858
+ { header: "MEMBER", getValue: (item) => String(item.memberId ?? "") },
3871
3859
  COL.updated()
3872
3860
  ];
3873
3861
  var DATA_TYPE_FIELD_REFERENCE = `
@@ -3911,7 +3899,7 @@ var dataTypesDomain = {
3911
3899
  deleteMethod: "deleteDataType",
3912
3900
  archiveMethod: "archiveDataType",
3913
3901
  unarchiveMethod: "unarchiveDataType",
3914
- columns: COLUMNS10,
3902
+ columns: COLUMNS9,
3915
3903
  createHelp: `Create a data type
3916
3904
 
3917
3905
  ${DATA_TYPE_FIELD_REFERENCE}`,
@@ -3931,7 +3919,7 @@ ${DATA_TYPE_FIELD_REFERENCE}`
3931
3919
  requireNumber(args, "id"),
3932
3920
  data
3933
3921
  );
3934
- outputSingle(result2, ctx, COLUMNS10);
3922
+ outputSingle(result2, ctx, COLUMNS9);
3935
3923
  }
3936
3924
  },
3937
3925
  {
@@ -3944,7 +3932,7 @@ ${DATA_TYPE_FIELD_REFERENCE}`
3944
3932
  workspace,
3945
3933
  requireString(args, "slug")
3946
3934
  );
3947
- outputSingle(result2, ctx, COLUMNS10);
3935
+ outputSingle(result2, ctx, COLUMNS9);
3948
3936
  }
3949
3937
  },
3950
3938
  // Data Records sub-resource
@@ -4240,7 +4228,10 @@ var eventsDomain = {
4240
4228
  { name: "task-id", description: "Filter by task ID" },
4241
4229
  { name: "data-type-id", description: "Filter by data type ID" },
4242
4230
  { name: "routine-id", description: "Filter by routine ID" },
4243
- { name: "workflow-id", description: "Filter by workflow ID" },
4231
+ {
4232
+ name: "workflow-revision-id",
4233
+ description: "Filter by workflow revision ID"
4234
+ },
4244
4235
  { name: "journey-step-id", description: "Filter by journey step ID" },
4245
4236
  {
4246
4237
  name: "include-disabled",
@@ -4256,7 +4247,8 @@ var eventsDomain = {
4256
4247
  if (args["task-id"]) opts.taskId = requireNumber(args, "task-id");
4257
4248
  if (args["data-type-id"]) opts.dataTypeId = requireNumber(args, "data-type-id");
4258
4249
  if (args["routine-id"]) opts.routineId = requireNumber(args, "routine-id");
4259
- if (args["workflow-id"]) opts.workflowId = requireNumber(args, "workflow-id");
4250
+ if (args["workflow-revision-id"])
4251
+ opts.workflowRevisionId = requireNumber(args, "workflow-revision-id");
4260
4252
  if (args["journey-step-id"])
4261
4253
  opts.journeyStepId = requireNumber(args, "journey-step-id");
4262
4254
  if (args["include-disabled"]) opts.includeDisabled = true;
@@ -4503,12 +4495,12 @@ function parseIdList(value) {
4503
4495
  return num;
4504
4496
  });
4505
4497
  }
4506
- var COLUMNS11 = [
4498
+ var COLUMNS10 = [
4507
4499
  COL.id(),
4508
4500
  COL.name(),
4509
- { header: "TYPE", getValue: (item) => item.content_type ?? item.type ?? "" },
4501
+ { header: "TYPE", getValue: (item) => item.contentType ?? item.type ?? "" },
4510
4502
  { header: "SIZE", getValue: (item) => String(item.size ?? "") },
4511
- { header: "FOLDER", getValue: (item) => String(item.folder_id ?? "") }
4503
+ { header: "FOLDER", getValue: (item) => String(item.folderId ?? "") }
4512
4504
  ];
4513
4505
  var FOLDER_COLUMNS = [
4514
4506
  COL.id(),
@@ -4556,7 +4548,7 @@ var filesDomain = {
4556
4548
  createMethod: "createFile",
4557
4549
  updateMethod: "updateFile",
4558
4550
  deleteMethod: "deleteFile",
4559
- columns: COLUMNS11,
4551
+ columns: COLUMNS10,
4560
4552
  paginationSupport: "full",
4561
4553
  createHelp: `Create a file
4562
4554
 
@@ -5511,7 +5503,7 @@ var journeysDomain = {
5511
5503
  };
5512
5504
 
5513
5505
  // src/domains/personas.ts
5514
- var COLUMNS12 = [
5506
+ var COLUMNS11 = [
5515
5507
  COL.id(),
5516
5508
  COL.name(),
5517
5509
  { header: "AGE", getValue: (item) => item.age != null ? String(item.age) : "" },
@@ -5541,7 +5533,7 @@ var personasDomain = {
5541
5533
  createMethod: "createPersona",
5542
5534
  updateMethod: "updatePersona",
5543
5535
  deleteMethod: "deletePersona",
5544
- columns: COLUMNS12,
5536
+ columns: COLUMNS11,
5545
5537
  paginationSupport: "full"
5546
5538
  })
5547
5539
  ]
@@ -6531,7 +6523,7 @@ Relations (relationMatch): ${relations.join(", ")}`);
6531
6523
 
6532
6524
  // src/domains/sites.ts
6533
6525
  import { readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
6534
- var COLUMNS13 = [
6526
+ var COLUMNS12 = [
6535
6527
  COL.id(),
6536
6528
  COL.name(),
6537
6529
  { header: "SLUG", getValue: (item) => item.slug ?? "" },
@@ -6585,7 +6577,7 @@ var sitesDomain = {
6585
6577
  createMethod: "createSite",
6586
6578
  updateMethod: "updateSite",
6587
6579
  deleteMethod: "deleteSite",
6588
- columns: COLUMNS13
6580
+ columns: COLUMNS12
6589
6581
  }),
6590
6582
  // Pages sub-resource
6591
6583
  {
@@ -6981,6 +6973,19 @@ var ATTACHED_COLUMNS = [
6981
6973
  { header: "ENABLED", getValue: (item) => item.enabled === false ? "" : "yes" },
6982
6974
  { header: "CEL", getValue: (item) => item.celCondition ?? "" }
6983
6975
  ];
6976
+ var CONFIGURED_COLUMNS = [
6977
+ { header: "UUID", getValue: (item) => item.uuid ?? "" },
6978
+ { header: "TYPE", getValue: (item) => item.abilityType ?? "" },
6979
+ { header: "ENABLED", getValue: (item) => item.enabled === false ? "" : "yes" }
6980
+ ];
6981
+ function requireAbilityScope(args) {
6982
+ const hasWorkflow = typeof args["workflow-id"] === "string";
6983
+ const hasTask = typeof args["task-id"] === "string";
6984
+ if (hasWorkflow === hasTask) {
6985
+ throw new CLIError("Specify exactly one of --workflow-id or --task-id.");
6986
+ }
6987
+ return hasTask ? { taskId: requireNumber(args, "task-id") } : { workflowId: requireNumber(args, "workflow-id") };
6988
+ }
6984
6989
  function toAbilityData(a) {
6985
6990
  return {
6986
6991
  uuid: a.uuid,
@@ -7050,6 +7055,103 @@ var abilitiesDomain = {
7050
7055
  outputSingle(result2, hctx.ctx);
7051
7056
  }
7052
7057
  },
7058
+ {
7059
+ path: ["abilities", "configured"],
7060
+ description: "List configured abilities on a workflow or task scope.",
7061
+ requiresWorkspace: true,
7062
+ columns: CONFIGURED_COLUMNS,
7063
+ args: [
7064
+ { name: "workflow-id", description: "Workflow scope" },
7065
+ { name: "task-id", description: "Task scope" }
7066
+ ],
7067
+ handler: async ({ ctx, workspace, args }) => {
7068
+ const result2 = await requireAuth(ctx).apiClient.listAbilities(
7069
+ workspace,
7070
+ requireAbilityScope(args)
7071
+ );
7072
+ outputData(result2, ctx, CONFIGURED_COLUMNS);
7073
+ }
7074
+ },
7075
+ {
7076
+ path: ["abilities", "enable"],
7077
+ description: "Enable an ability on a workflow or task scope.",
7078
+ mutates: true,
7079
+ requiresWorkspace: true,
7080
+ args: [
7081
+ { name: "ability-type", description: "Ability type slug", required: true },
7082
+ { name: "workflow-id", description: "Workflow scope" },
7083
+ { name: "task-id", description: "Task scope" },
7084
+ {
7085
+ name: "allow-missing-connections",
7086
+ isFlag: true,
7087
+ description: "Allow creation before required app connections are configured"
7088
+ }
7089
+ ],
7090
+ handler: async ({ ctx, workspace, args, data }) => {
7091
+ const abilityType = args["ability-type"];
7092
+ if (typeof abilityType !== "string") throw new CLIError("--ability-type is required");
7093
+ const body = {
7094
+ abilityType,
7095
+ config: data && typeof data === "object" ? data : {},
7096
+ ...requireAbilityScope(args)
7097
+ };
7098
+ if (args["allow-missing-connections"] === true) {
7099
+ body.allowMissingConnections = true;
7100
+ }
7101
+ const result2 = await requireAuth(ctx).apiClient.createAbility(workspace, body);
7102
+ outputSingle(result2, ctx, CONFIGURED_COLUMNS);
7103
+ }
7104
+ },
7105
+ {
7106
+ path: ["abilities", "disable"],
7107
+ description: "Disable a configured ability by UUID while preserving its config.",
7108
+ mutates: true,
7109
+ requiresWorkspace: true,
7110
+ args: [{ name: "uuid", description: "Configured ability UUID", required: true }],
7111
+ handler: async ({ ctx, workspace, args }) => {
7112
+ const uuid = args.uuid;
7113
+ if (typeof uuid !== "string") throw new CLIError("--uuid is required");
7114
+ const result2 = await requireAuth(ctx).apiClient.updateAbility(workspace, uuid, {
7115
+ enabled: false
7116
+ });
7117
+ outputSingle(result2, ctx, CONFIGURED_COLUMNS);
7118
+ }
7119
+ },
7120
+ {
7121
+ path: ["abilities", "configure"],
7122
+ description: "Update a configured ability by UUID.",
7123
+ mutates: true,
7124
+ requiresWorkspace: true,
7125
+ args: [
7126
+ { name: "uuid", description: "Configured ability UUID", required: true },
7127
+ { name: "enabled", description: "Set enabled state (true|false)" },
7128
+ {
7129
+ name: "allow-missing-connections",
7130
+ isFlag: true,
7131
+ description: "Allow enabling before required app connections are configured"
7132
+ }
7133
+ ],
7134
+ handler: async ({ ctx, workspace, args, data }) => {
7135
+ const uuid = args.uuid;
7136
+ if (typeof uuid !== "string") throw new CLIError("--uuid is required");
7137
+ const body = {};
7138
+ if (data && typeof data === "object") body.config = data;
7139
+ if (typeof args.enabled === "string") {
7140
+ if (args.enabled !== "true" && args.enabled !== "false") {
7141
+ throw new CLIError("--enabled must be true or false");
7142
+ }
7143
+ body.enabled = args.enabled === "true";
7144
+ if (args["allow-missing-connections"] === true) {
7145
+ body.allowMissingConnections = true;
7146
+ }
7147
+ }
7148
+ if (Object.keys(body).length === 0) {
7149
+ throw new CLIError("Nothing to update: provide --data config and/or --enabled");
7150
+ }
7151
+ const result2 = await requireAuth(ctx).apiClient.updateAbility(workspace, uuid, body);
7152
+ outputSingle(result2, ctx, CONFIGURED_COLUMNS);
7153
+ }
7154
+ },
7053
7155
  {
7054
7156
  path: ["abilities", "attached"],
7055
7157
  description: "List a task's task-specific abilities (excludes workflow-inherited).",
@@ -7146,11 +7248,11 @@ var abilitiesDomain = {
7146
7248
  };
7147
7249
 
7148
7250
  // src/domains/access-grants.ts
7149
- var COLUMNS14 = [
7251
+ var COLUMNS13 = [
7150
7252
  COL.id(),
7151
7253
  COL.status(),
7152
- { header: "GRANTOR", getValue: (item) => String(item.grantor_member_id ?? "") },
7153
- { header: "GRANTEE", getValue: (item) => String(item.grantee_member_id ?? "") },
7254
+ { header: "GRANTOR", getValue: (item) => String(item.grantorMemberId ?? "") },
7255
+ { header: "GRANTEE", getValue: (item) => String(item.granteeMemberId ?? "") },
7154
7256
  COL.created()
7155
7257
  ];
7156
7258
  var accessGrantsDomain = {
@@ -7163,7 +7265,7 @@ var accessGrantsDomain = {
7163
7265
  requiresWorkspace: true,
7164
7266
  handler: async ({ ctx, workspace }) => {
7165
7267
  const result2 = await requireAuth(ctx).apiClient.getAccessGrants(workspace);
7166
- outputData(listResult(result2, false), ctx, COLUMNS14);
7268
+ outputData(listResult(result2, false), ctx, COLUMNS13);
7167
7269
  }
7168
7270
  },
7169
7271
  {
@@ -7176,7 +7278,7 @@ var accessGrantsDomain = {
7176
7278
  workspace,
7177
7279
  requireString(args, "id")
7178
7280
  );
7179
- outputSingle(result2, ctx, COLUMNS14);
7281
+ outputSingle(result2, ctx, COLUMNS13);
7180
7282
  }
7181
7283
  },
7182
7284
  {
@@ -7189,7 +7291,7 @@ var accessGrantsDomain = {
7189
7291
  workspace,
7190
7292
  data
7191
7293
  );
7192
- outputSingle(result2, ctx, COLUMNS14);
7294
+ outputSingle(result2, ctx, COLUMNS13);
7193
7295
  }
7194
7296
  },
7195
7297
  {
@@ -7200,7 +7302,7 @@ var accessGrantsDomain = {
7200
7302
  const result2 = await requireAuth(ctx).apiClient.getMyReceivedGrants(workspace, {
7201
7303
  pageSize: 200
7202
7304
  });
7203
- outputData(listResult(result2, false), ctx, COLUMNS14);
7305
+ outputData(listResult(result2, false), ctx, COLUMNS13);
7204
7306
  }
7205
7307
  },
7206
7308
  {
@@ -7211,7 +7313,7 @@ var accessGrantsDomain = {
7211
7313
  const result2 = await requireAuth(ctx).apiClient.getMyGivenGrants(workspace, {
7212
7314
  pageSize: 200
7213
7315
  });
7214
- outputData(listResult(result2, false), ctx, COLUMNS14);
7316
+ outputData(listResult(result2, false), ctx, COLUMNS13);
7215
7317
  }
7216
7318
  },
7217
7319
  {
@@ -7226,7 +7328,7 @@ var accessGrantsDomain = {
7226
7328
  requireString(args, "id"),
7227
7329
  data ?? {}
7228
7330
  );
7229
- outputSingle(result2, ctx, COLUMNS14);
7331
+ outputSingle(result2, ctx, COLUMNS13);
7230
7332
  }
7231
7333
  },
7232
7334
  {
@@ -7241,7 +7343,7 @@ var accessGrantsDomain = {
7241
7343
  requireString(args, "id"),
7242
7344
  data ?? {}
7243
7345
  );
7244
- outputSingle(result2, ctx, COLUMNS14);
7346
+ outputSingle(result2, ctx, COLUMNS13);
7245
7347
  }
7246
7348
  },
7247
7349
  {
@@ -7254,16 +7356,41 @@ var accessGrantsDomain = {
7254
7356
  workspace,
7255
7357
  requireNumber(args, "member-id")
7256
7358
  );
7257
- outputData(listResult(result2, false), ctx, COLUMNS14);
7359
+ outputData(listResult(result2, false), ctx, COLUMNS13);
7360
+ }
7361
+ },
7362
+ {
7363
+ path: ["access-grants", "grantee"],
7364
+ description: "List grants received by a member (what can this agent do without asking?)",
7365
+ requiresWorkspace: true,
7366
+ args: [
7367
+ { name: "member-id", description: "Grantee member ID", required: true },
7368
+ { name: "status", description: "Filter by status (e.g. active)" },
7369
+ {
7370
+ name: "capability-class",
7371
+ description: "Filter by capability class (e.g. tool.always_allow)"
7372
+ }
7373
+ ],
7374
+ handler: async ({ ctx, workspace, args }) => {
7375
+ const result2 = await requireAuth(ctx).apiClient.getGranteeGrants(
7376
+ workspace,
7377
+ requireNumber(args, "member-id"),
7378
+ {
7379
+ status: args["status"],
7380
+ capabilityClass: args["capability-class"],
7381
+ pageSize: 200
7382
+ }
7383
+ );
7384
+ outputData(listResult(result2, false), ctx, COLUMNS13);
7258
7385
  }
7259
7386
  }
7260
7387
  ]
7261
7388
  };
7262
7389
 
7263
7390
  // src/domains/ai-models.ts
7264
- var COLUMNS15 = [
7265
- { header: "ID", getValue: (item) => String(item.id ?? item.model_id ?? "") },
7266
- { header: "NAME", getValue: (item) => item.name ?? item.display_name ?? "" },
7391
+ var COLUMNS14 = [
7392
+ { header: "ID", getValue: (item) => String(item.id ?? item.modelId ?? "") },
7393
+ { header: "NAME", getValue: (item) => item.name ?? item.displayName ?? "" },
7267
7394
  { header: "PROVIDER", getValue: (item) => item.provider ?? "" },
7268
7395
  { header: "TYPE", getValue: (item) => item.type ?? "" }
7269
7396
  ];
@@ -7277,7 +7404,7 @@ var aiModelsDomain = {
7277
7404
  requiresWorkspace: false,
7278
7405
  handler: async ({ ctx }) => {
7279
7406
  const result2 = await requireAuth(ctx).apiClient.getAllModels();
7280
- outputData(result2, ctx, COLUMNS15);
7407
+ outputData(result2, ctx, COLUMNS14);
7281
7408
  }
7282
7409
  },
7283
7410
  {
@@ -7286,7 +7413,7 @@ var aiModelsDomain = {
7286
7413
  requiresWorkspace: false,
7287
7414
  handler: async ({ ctx }) => {
7288
7415
  const result2 = await requireAuth(ctx).apiClient.getChatModels();
7289
- outputData(result2, ctx, COLUMNS15);
7416
+ outputData(result2, ctx, COLUMNS14);
7290
7417
  }
7291
7418
  },
7292
7419
  {
@@ -7295,7 +7422,7 @@ var aiModelsDomain = {
7295
7422
  requiresWorkspace: false,
7296
7423
  handler: async ({ ctx }) => {
7297
7424
  const result2 = await requireAuth(ctx).apiClient.getRealtimeModels();
7298
- outputData(result2, ctx, COLUMNS15);
7425
+ outputData(result2, ctx, COLUMNS14);
7299
7426
  }
7300
7427
  },
7301
7428
  {
@@ -7304,14 +7431,14 @@ var aiModelsDomain = {
7304
7431
  requiresWorkspace: false,
7305
7432
  handler: async ({ ctx }) => {
7306
7433
  const result2 = await requireAuth(ctx).apiClient.getVoiceModels();
7307
- outputData(result2, ctx, COLUMNS15);
7434
+ outputData(result2, ctx, COLUMNS14);
7308
7435
  }
7309
7436
  }
7310
7437
  ]
7311
7438
  };
7312
7439
 
7313
7440
  // src/domains/api-keys.ts
7314
- var COLUMNS16 = [
7441
+ var COLUMNS15 = [
7315
7442
  COL.id(),
7316
7443
  COL.name(),
7317
7444
  { header: "PREFIX", getValue: (item) => item.prefix ?? "" },
@@ -7334,7 +7461,7 @@ var apiKeysDomain = {
7334
7461
  requiresWorkspace: true,
7335
7462
  handler: async ({ ctx, workspace }) => {
7336
7463
  const result2 = await requireAuth(ctx).apiClient.getApiKeys(workspace);
7337
- outputData(result2, ctx, COLUMNS16);
7464
+ outputData(result2, ctx, COLUMNS15);
7338
7465
  }
7339
7466
  },
7340
7467
  {
@@ -7369,7 +7496,7 @@ var apiKeysDomain = {
7369
7496
  requiresWorkspace: false,
7370
7497
  handler: async ({ ctx }) => {
7371
7498
  const result2 = await requireAuth(ctx).apiClient.getGlobalApiKeys();
7372
- outputData(result2, ctx, COLUMNS16);
7499
+ outputData(result2, ctx, COLUMNS15);
7373
7500
  }
7374
7501
  },
7375
7502
  {
@@ -7405,7 +7532,7 @@ var apiKeysDomain = {
7405
7532
  var APP_COLUMNS = [
7406
7533
  COL.id(),
7407
7534
  COL.name(),
7408
- { header: "CLIENT_ID", getValue: (item) => item.client_id ?? "" },
7535
+ { header: "CLIENT_ID", getValue: (item) => item.clientId ?? "" },
7409
7536
  COL.status()
7410
7537
  ];
7411
7538
  var BUILDER_COLUMNS = [COL.id(), COL.name(), COL.status()];
@@ -7630,17 +7757,26 @@ var authManageDomain = {
7630
7757
  handler: async ({ ctx }) => {
7631
7758
  const result2 = await requireAuth(ctx).apiClient.getConsentState();
7632
7759
  const columns = [
7633
- { header: "TYPE", getValue: (item) => item.consent_type ?? "" },
7760
+ {
7761
+ header: "TYPE",
7762
+ getValue: (item) => item.consentType ?? ""
7763
+ },
7634
7764
  { header: "GRANTED", getValue: (item) => String(item.granted) },
7635
- { header: "UPDATED", getValue: (item) => item.updated_at ?? "" },
7636
- { header: "VERSION", getValue: (item) => item.policy_version ?? "" }
7765
+ {
7766
+ header: "UPDATED",
7767
+ getValue: (item) => item.updatedAt ?? ""
7768
+ },
7769
+ {
7770
+ header: "VERSION",
7771
+ getValue: (item) => item.policyVersion ?? ""
7772
+ }
7637
7773
  ];
7638
7774
  outputData(result2.consents, ctx, columns);
7639
7775
  }
7640
7776
  },
7641
7777
  {
7642
7778
  path: ["auth", "consent-update"],
7643
- description: `Update consent (e.g. --data '{"consents":[{"consent_type":"cookie_analytics","granted":true}]}')`,
7779
+ description: `Update consent (e.g. --data '{"consents":[{"consentType":"cookie_analytics","granted":true}]}')`,
7644
7780
  mutates: true,
7645
7781
  requiresWorkspace: false,
7646
7782
  handler: async ({ ctx, data }) => {
@@ -7648,17 +7784,26 @@ var authManageDomain = {
7648
7784
  const consents = body?.consents;
7649
7785
  if (!Array.isArray(consents) || consents.length === 0) {
7650
7786
  process.stderr.write(
7651
- `Error: --data must include "consents" array, e.g. --data '{"consents":[{"consent_type":"cookie_analytics","granted":true}]}'
7787
+ `Error: --data must include "consents" array, e.g. --data '{"consents":[{"consentType":"cookie_analytics","granted":true}]}'
7652
7788
  `
7653
7789
  );
7654
7790
  process.exit(1);
7655
7791
  }
7656
7792
  const result2 = await requireAuth(ctx).apiClient.updateConsent(consents);
7657
7793
  const columns = [
7658
- { header: "TYPE", getValue: (item) => item.consent_type ?? "" },
7794
+ {
7795
+ header: "TYPE",
7796
+ getValue: (item) => item.consentType ?? ""
7797
+ },
7659
7798
  { header: "GRANTED", getValue: (item) => String(item.granted) },
7660
- { header: "UPDATED", getValue: (item) => item.updated_at ?? "" },
7661
- { header: "VERSION", getValue: (item) => item.policy_version ?? "" }
7799
+ {
7800
+ header: "UPDATED",
7801
+ getValue: (item) => item.updatedAt ?? ""
7802
+ },
7803
+ {
7804
+ header: "VERSION",
7805
+ getValue: (item) => item.policyVersion ?? ""
7806
+ }
7662
7807
  ];
7663
7808
  outputData(result2.consents, ctx, columns);
7664
7809
  }
@@ -7678,6 +7823,11 @@ function priceSummary(product) {
7678
7823
  }
7679
7824
  return parts.join(", ") || "\u2014";
7680
7825
  }
7826
+ function checkoutPeriod(args) {
7827
+ const value = typeof args.period === "string" ? args.period : "month";
7828
+ if (value === "month" || value === "quarter" || value === "year") return value;
7829
+ throw new Error("Billing period must be 'month', 'quarter', or 'year'");
7830
+ }
7681
7831
  var PRODUCT_COLUMNS2 = [
7682
7832
  { header: "ID", getValue: (p) => String(p.id ?? "") },
7683
7833
  { header: "NAME", getValue: (p) => p.name ?? "" },
@@ -7694,13 +7844,22 @@ var PRODUCT_COLUMNS2 = [
7694
7844
  var SUBSCRIPTION_COLUMNS = [
7695
7845
  COL.id(),
7696
7846
  COL.status(),
7697
- { header: "PLAN", getValue: (s) => String(s.plan_name ?? s.productName ?? s.plan ?? "") },
7698
- { header: "PERIOD", getValue: (s) => String(s.planPeriod ?? s.plan_period ?? "") },
7847
+ // SubscriptionResponse wire: productName + planPeriod (camelCase only).
7848
+ { header: "PLAN", getValue: (s) => String(s.productName ?? "") },
7849
+ { header: "PERIOD", getValue: (s) => String(s.planPeriod ?? "") },
7699
7850
  {
7700
7851
  header: "ORG",
7701
- getValue: (s) => String(s.organizationUuid ?? s.customerOrganizationUuid ?? "")
7852
+ getValue: (s) => String(s.customerOrganizationUuid ?? s.organizationUuid ?? "")
7702
7853
  }
7703
7854
  ];
7855
+ var CONTRACT_BEARING_STATUSES = /* @__PURE__ */ new Set([
7856
+ "incomplete",
7857
+ "trialing",
7858
+ "active",
7859
+ "past_due",
7860
+ "unpaid",
7861
+ "paused"
7862
+ ]);
7704
7863
  function isTable(ctx) {
7705
7864
  return (ctx.outputFormat ?? "table") === "table";
7706
7865
  }
@@ -7738,7 +7897,7 @@ var billingDomain = {
7738
7897
  } else {
7739
7898
  hint(ctx, [
7740
7899
  "Next \u2014 buy an organization plan to get started:",
7741
- " gr billing checkout --product <id> [--period month|year]"
7900
+ " gr billing checkout --product <id> [--org <id>|--new-org]"
7742
7901
  ]);
7743
7902
  }
7744
7903
  }
@@ -7750,15 +7909,40 @@ var billingDomain = {
7750
7909
  requiresWorkspace: false,
7751
7910
  args: [
7752
7911
  { name: "product", description: "Product ID of the org plan to buy", required: true },
7753
- { name: "period", description: "Billing period: 'month' or 'year'", default: "month" }
7912
+ {
7913
+ name: "period",
7914
+ description: "Billing period: 'month', 'quarter', or 'year'",
7915
+ default: "month"
7916
+ },
7917
+ {
7918
+ name: "org",
7919
+ description: "Existing organization ID to own the subscription"
7920
+ },
7921
+ {
7922
+ name: "new-org",
7923
+ description: "Create a new organization for this subscription",
7924
+ isFlag: true
7925
+ }
7926
+ ],
7927
+ examples: [
7928
+ "gr billing checkout --product 12 --period month --org 7",
7929
+ "gr billing checkout --product 12 --period month --new-org"
7754
7930
  ],
7755
- examples: ["gr billing checkout --product 12 --period month"],
7756
7931
  handler: async ({ ctx, args }) => {
7757
7932
  const productId = Number(requireString(args, "product"));
7758
- const period = args.period || "month";
7933
+ const period = checkoutPeriod(args);
7934
+ const organizationId = typeof args.org === "string" ? Number(args.org) : void 0;
7935
+ const createNewOrg = args["new-org"] === true;
7936
+ if (organizationId !== void 0 && (!Number.isInteger(organizationId) || organizationId <= 0)) {
7937
+ throw new Error("Organization ID must be a positive integer");
7938
+ }
7939
+ if (organizationId !== void 0 && createNewOrg) {
7940
+ throw new Error("Choose either --org or --new-org, not both");
7941
+ }
7759
7942
  const result2 = await requireAuth(ctx).apiClient.createCheckoutSession(
7760
7943
  productId,
7761
- period
7944
+ period,
7945
+ organizationId !== void 0 || createNewOrg ? { checkoutContext: { organizationId, createNewOrg } } : void 0
7762
7946
  );
7763
7947
  if (isTable(ctx)) {
7764
7948
  process.stdout.write(
@@ -7785,10 +7969,10 @@ Then check it landed:
7785
7969
  handler: async ({ ctx }) => {
7786
7970
  const subs = await requireAuth(ctx).apiClient.getSubscriptions();
7787
7971
  outputData(subs, ctx, SUBSCRIPTION_COLUMNS);
7788
- const active = subs.find(
7789
- (s) => ["active", "trialing"].includes(String(s.status ?? s.subscriptionStatus ?? ""))
7972
+ const contract = subs.find(
7973
+ (s) => CONTRACT_BEARING_STATUSES.has(String(s.status ?? s.subscriptionStatus ?? ""))
7790
7974
  );
7791
- if (!active) {
7975
+ if (!contract) {
7792
7976
  hint(ctx, [
7793
7977
  "No active subscription yet. To get started:",
7794
7978
  " gr billing products --type org # pick a plan",
@@ -7796,8 +7980,16 @@ Then check it landed:
7796
7980
  ]);
7797
7981
  return;
7798
7982
  }
7983
+ const contractStatus = String(contract.status ?? contract.subscriptionStatus ?? "");
7984
+ if (!["active", "trialing"].includes(contractStatus)) {
7985
+ hint(ctx, [
7986
+ `Your subscription is ${contractStatus}; it still represents a live billing contract.`,
7987
+ "Resolve its payment or cancellation status in Gravity Rail billing before starting another checkout."
7988
+ ]);
7989
+ return;
7990
+ }
7799
7991
  const orgUuid = String(
7800
- active.organizationUuid ?? active.customerOrganizationUuid ?? "<org-uuid>"
7992
+ contract.organizationUuid ?? contract.customerOrganizationUuid ?? "<org-uuid>"
7801
7993
  );
7802
7994
  hint(ctx, [
7803
7995
  "You have an active subscription. Add a workspace:",
@@ -7951,8 +8143,8 @@ var conciergeDomain = {
7951
8143
  };
7952
8144
 
7953
8145
  // src/domains/custom-toolkits.ts
7954
- var COLUMNS17 = [COL.id(), COL.name(), COL.description(), COL.enabled()];
7955
- var TOOL_COLUMNS3 = [COL.id(), COL.name(), COL.description()];
8146
+ var COLUMNS16 = [COL.id(), COL.name(), COL.description(), COL.enabled()];
8147
+ var TOOL_COLUMNS2 = [COL.id(), COL.name(), COL.description()];
7956
8148
  var customToolkitsDomain = {
7957
8149
  name: "custom-toolkits",
7958
8150
  description: "Manage custom toolkits and their tools",
@@ -7965,7 +8157,7 @@ var customToolkitsDomain = {
7965
8157
  createMethod: "createCustomToolkit",
7966
8158
  updateMethod: "updateCustomToolkit",
7967
8159
  deleteMethod: "deleteCustomToolkit",
7968
- columns: COLUMNS17
8160
+ columns: COLUMNS16
7969
8161
  }),
7970
8162
  {
7971
8163
  path: ["custom-toolkits", "enable"],
@@ -7978,7 +8170,7 @@ var customToolkitsDomain = {
7978
8170
  workspace,
7979
8171
  requireNumber(args, "id")
7980
8172
  );
7981
- outputSingle(result2, ctx, COLUMNS17);
8173
+ outputSingle(result2, ctx, COLUMNS16);
7982
8174
  }
7983
8175
  },
7984
8176
  {
@@ -7992,7 +8184,7 @@ var customToolkitsDomain = {
7992
8184
  workspace,
7993
8185
  requireNumber(args, "id")
7994
8186
  );
7995
- outputSingle(result2, ctx, COLUMNS17);
8187
+ outputSingle(result2, ctx, COLUMNS16);
7996
8188
  }
7997
8189
  },
7998
8190
  // Tools — nested resource requiring toolkitId
@@ -8010,7 +8202,7 @@ var customToolkitsDomain = {
8010
8202
  toolkitId,
8011
8203
  data
8012
8204
  );
8013
- outputSingle(result2, ctx, TOOL_COLUMNS3);
8205
+ outputSingle(result2, ctx, TOOL_COLUMNS2);
8014
8206
  }
8015
8207
  },
8016
8208
  {
@@ -8032,7 +8224,7 @@ var customToolkitsDomain = {
8032
8224
  toolId,
8033
8225
  data
8034
8226
  );
8035
- outputSingle(result2, ctx, TOOL_COLUMNS3);
8227
+ outputSingle(result2, ctx, TOOL_COLUMNS2);
8036
8228
  }
8037
8229
  },
8038
8230
  {
@@ -8104,7 +8296,7 @@ var docsDomain = {
8104
8296
  };
8105
8297
 
8106
8298
  // src/domains/features.ts
8107
- var COLUMNS18 = [
8299
+ var COLUMNS17 = [
8108
8300
  { header: "SLUG", getValue: (item) => item.slug ?? "" },
8109
8301
  COL.name(),
8110
8302
  COL.description()
@@ -8119,7 +8311,7 @@ var featuresDomain = {
8119
8311
  requiresWorkspace: false,
8120
8312
  handler: async ({ ctx }) => {
8121
8313
  const result2 = await requireAuth(ctx).apiClient.getFeatureRegistry();
8122
- outputData(result2, ctx, COLUMNS18);
8314
+ outputData(result2, ctx, COLUMNS17);
8123
8315
  }
8124
8316
  },
8125
8317
  {
@@ -8131,7 +8323,7 @@ var featuresDomain = {
8131
8323
  const result2 = await requireAuth(ctx).apiClient.getFeatureBySlug(
8132
8324
  requireString(args, "slug")
8133
8325
  );
8134
- outputSingle(result2, ctx, COLUMNS18);
8326
+ outputSingle(result2, ctx, COLUMNS17);
8135
8327
  }
8136
8328
  },
8137
8329
  {
@@ -8140,25 +8332,25 @@ var featuresDomain = {
8140
8332
  requiresWorkspace: true,
8141
8333
  handler: async ({ ctx }) => {
8142
8334
  const result2 = await requireAuth(ctx).apiClient.getAvailableWorkspaceFeatures();
8143
- outputData(result2, ctx, COLUMNS18);
8335
+ outputData(result2, ctx, COLUMNS17);
8144
8336
  }
8145
8337
  }
8146
8338
  ]
8147
8339
  };
8148
8340
 
8149
8341
  // src/domains/inboxes.ts
8150
- var COLUMNS19 = [
8342
+ var COLUMNS18 = [
8151
8343
  COL.id(),
8152
8344
  COL.name(),
8153
- { header: "EMAIL", getValue: (item) => item.email_address ?? "" },
8345
+ { header: "EMAIL", getValue: (item) => item.emailAddress ?? "" },
8154
8346
  COL.status()
8155
8347
  ];
8156
8348
  var EMAIL_COLUMNS = [
8157
8349
  COL.id(),
8158
8350
  { header: "SUBJECT", getValue: (item) => item.subject ?? "" },
8159
- { header: "FROM", getValue: (item) => item.from_address ?? "" },
8160
- { header: "DATE", getValue: (item) => item.received_at ?? "" },
8161
- { header: "READ", getValue: (item) => String(item.is_read ?? "") }
8351
+ { header: "FROM", getValue: (item) => item.fromAddress ?? "" },
8352
+ { header: "DATE", getValue: (item) => item.receivedAt ?? "" },
8353
+ { header: "READ", getValue: (item) => String(item.isRead ?? "") }
8162
8354
  ];
8163
8355
  var inboxesDomain = {
8164
8356
  name: "inboxes",
@@ -8172,7 +8364,7 @@ var inboxesDomain = {
8172
8364
  createMethod: "createInbox",
8173
8365
  updateMethod: "updateInbox",
8174
8366
  deleteMethod: "deleteInbox",
8175
- columns: COLUMNS19
8367
+ columns: COLUMNS18
8176
8368
  }),
8177
8369
  {
8178
8370
  path: ["inboxes", "emails", "list"],
@@ -8257,7 +8449,7 @@ var inboxesDomain = {
8257
8449
  };
8258
8450
 
8259
8451
  // src/domains/mcp-servers.ts
8260
- var COLUMNS20 = [
8452
+ var COLUMNS19 = [
8261
8453
  COL.id(),
8262
8454
  COL.name(),
8263
8455
  { header: "URL", getValue: (item) => item.url ?? "" },
@@ -8275,7 +8467,7 @@ var mcpServersDomain = {
8275
8467
  createMethod: "createMcpServer",
8276
8468
  updateMethod: "updateMcpServer",
8277
8469
  deleteMethod: "deleteMcpServer",
8278
- columns: COLUMNS20
8470
+ columns: COLUMNS19
8279
8471
  }),
8280
8472
  {
8281
8473
  path: ["mcp-servers", "enable"],
@@ -8288,7 +8480,7 @@ var mcpServersDomain = {
8288
8480
  workspace,
8289
8481
  requireNumber(args, "id")
8290
8482
  );
8291
- outputSingle(result2, ctx, COLUMNS20);
8483
+ outputSingle(result2, ctx, COLUMNS19);
8292
8484
  }
8293
8485
  },
8294
8486
  {
@@ -8302,7 +8494,7 @@ var mcpServersDomain = {
8302
8494
  workspace,
8303
8495
  requireNumber(args, "id")
8304
8496
  );
8305
- outputSingle(result2, ctx, COLUMNS20);
8497
+ outputSingle(result2, ctx, COLUMNS19);
8306
8498
  }
8307
8499
  },
8308
8500
  {
@@ -8322,7 +8514,7 @@ var mcpServersDomain = {
8322
8514
  };
8323
8515
 
8324
8516
  // src/domains/member-memories.ts
8325
- var COLUMNS21 = [
8517
+ var COLUMNS20 = [
8326
8518
  { header: "KEY", getValue: (item) => item.key ?? "" },
8327
8519
  { header: "TYPE", getValue: (item) => item.type ?? "basic" },
8328
8520
  { header: "DESCRIPTION", getValue: (item) => truncate(item.description ?? "", 60) },
@@ -8356,7 +8548,57 @@ var memberMemoriesDomain = {
8356
8548
  type,
8357
8549
  query
8358
8550
  });
8359
- outputData(listResult(result2, false), ctx, COLUMNS21);
8551
+ outputData(listResult(result2, false), ctx, COLUMNS20);
8552
+ }
8553
+ },
8554
+ {
8555
+ path: ["member-memories", "get"],
8556
+ description: "Get a single memory by key",
8557
+ requiresWorkspace: true,
8558
+ args: [
8559
+ { name: "member-id", description: "Member ID", required: true },
8560
+ { name: "key", description: "Memory key", required: true }
8561
+ ],
8562
+ handler: async ({ ctx, workspace, args }) => {
8563
+ const memberId = requireNumber(args, "member-id");
8564
+ const key = requireString(args, "key");
8565
+ const result2 = await requireAuth(ctx).apiClient.getMemberMemory(
8566
+ workspace,
8567
+ memberId,
8568
+ key
8569
+ );
8570
+ outputData(result2, ctx, COLUMNS20);
8571
+ }
8572
+ },
8573
+ {
8574
+ path: ["member-memories", "create"],
8575
+ description: "Create a memory for a member",
8576
+ mutates: true,
8577
+ requiresWorkspace: true,
8578
+ args: [
8579
+ { name: "member-id", description: "Member ID", required: true },
8580
+ { name: "key", description: "Memory key", required: true },
8581
+ { name: "description", description: "Memory description", required: true },
8582
+ { name: "content", description: "Memory content" },
8583
+ { name: "priority", description: "Memory priority" }
8584
+ ],
8585
+ handler: async ({ ctx, workspace, args }) => {
8586
+ const memberId = requireNumber(args, "member-id");
8587
+ const key = requireString(args, "key");
8588
+ const description = requireString(args, "description");
8589
+ const content = args.content;
8590
+ const priority = args.priority !== void 0 ? Number(args.priority) : void 0;
8591
+ const result2 = await requireAuth(ctx).apiClient.createMemberMemory(
8592
+ workspace,
8593
+ memberId,
8594
+ {
8595
+ key,
8596
+ description,
8597
+ ...content !== void 0 && { content },
8598
+ ...priority !== void 0 && { priority }
8599
+ }
8600
+ );
8601
+ outputData(result2, ctx, COLUMNS20);
8360
8602
  }
8361
8603
  },
8362
8604
  {
@@ -8390,11 +8632,11 @@ var memberMemoriesDomain = {
8390
8632
  };
8391
8633
 
8392
8634
  // src/domains/milestones.ts
8393
- var COLUMNS22 = [
8635
+ var COLUMNS21 = [
8394
8636
  COL.id(),
8395
8637
  COL.name(),
8396
8638
  COL.status(),
8397
- { header: "DUE DATE", getValue: (item) => item.due_date ?? "" }
8639
+ { header: "DUE DATE", getValue: (item) => item.dueDate ?? "" }
8398
8640
  ];
8399
8641
  var milestonesDomain = {
8400
8642
  name: "milestones",
@@ -8408,14 +8650,14 @@ var milestonesDomain = {
8408
8650
  createMethod: "createMilestone",
8409
8651
  updateMethod: "updateMilestone",
8410
8652
  deleteMethod: "deleteMilestone",
8411
- columns: COLUMNS22,
8653
+ columns: COLUMNS21,
8412
8654
  paginationSupport: "full"
8413
8655
  })
8414
8656
  ]
8415
8657
  };
8416
8658
 
8417
8659
  // src/domains/notification-rules.ts
8418
- var COLUMNS23 = [
8660
+ var COLUMNS22 = [
8419
8661
  COL.id(),
8420
8662
  COL.name(),
8421
8663
  { header: "TYPE", getValue: (item) => item.noticeType ?? "" },
@@ -8432,7 +8674,7 @@ var notificationRulesDomain = {
8432
8674
  createMethod: "createNotificationRule",
8433
8675
  updateMethod: "updateNotificationRule",
8434
8676
  deleteMethod: "deleteNotificationRule",
8435
- columns: COLUMNS23
8677
+ columns: COLUMNS22
8436
8678
  })
8437
8679
  ]
8438
8680
  };
@@ -8492,7 +8734,7 @@ var oauthDomain = {
8492
8734
  };
8493
8735
 
8494
8736
  // src/domains/operator-groups.ts
8495
- var COLUMNS24 = [COL.id(), COL.name(), COL.description()];
8737
+ var COLUMNS23 = [COL.id(), COL.name(), COL.description()];
8496
8738
  var operatorGroupsDomain = {
8497
8739
  name: "operator-groups",
8498
8740
  description: "Manage operator groups",
@@ -8505,7 +8747,7 @@ var operatorGroupsDomain = {
8505
8747
  createMethod: "createOperatorGroup",
8506
8748
  updateMethod: "updateOperatorGroup",
8507
8749
  deleteMethod: "deleteOperatorGroup",
8508
- columns: COLUMNS24
8750
+ columns: COLUMNS23
8509
8751
  }),
8510
8752
  {
8511
8753
  path: ["operator-groups", "add-member"],
@@ -9592,12 +9834,8 @@ function formatPhoneNumberBehaviorMatrix(phone, outboundUsers, warnings = collec
9592
9834
  lines.push("");
9593
9835
  if (phone.enableVoice) {
9594
9836
  lines.push("## Channel defaults (auto-injected on voice)");
9595
- lines.push(
9596
- " Voice channels auto-add the hang_up_call tool (system:voice_channel);"
9597
- );
9598
- lines.push(
9599
- " it is not listed by `gr agents abilities list`. See `gr abilities get"
9600
- );
9837
+ lines.push(" Voice channels auto-add the hang_up_call tool (system:voice_channel);");
9838
+ lines.push(" it is not listed by `gr abilities attached`. See `gr abilities get");
9601
9839
  lines.push(" --name communication:phone_call_tools` for the voice ability spec.");
9602
9840
  lines.push("");
9603
9841
  }
@@ -9646,13 +9884,13 @@ async function findOutboundPhoneUsers(client, workspace, phone) {
9646
9884
  const phoneId = phone.id;
9647
9885
  const phoneUuid = String(phone.uuid ?? "");
9648
9886
  const users = [];
9649
- const workflows = await client.getWorkflows(workspace, false);
9650
- for (const wf of workflows) {
9887
+ const workflowsPage = await client.getWorkflows(workspace, { archived: false });
9888
+ for (const { workflow: wf } of workflowsPage.items) {
9651
9889
  if (wf.defaultPhoneNumberId === phoneId) {
9652
9890
  users.push({
9653
9891
  kind: "workflow_default",
9654
9892
  id: wf.id,
9655
- name: String(wf.name ?? `workflow ${wf.id}`),
9893
+ name: wf.name,
9656
9894
  detail: "workflows.defaultPhoneNumberId (outbound origin)"
9657
9895
  });
9658
9896
  }
@@ -9663,16 +9901,16 @@ async function findOutboundPhoneUsers(client, workspace, phone) {
9663
9901
  const rulesPage = await client.getEventRules(workspace, { page, pageSize });
9664
9902
  const list = rulesPage.items;
9665
9903
  for (const rule of list) {
9666
- const params = rule.actionParams ?? rule.action_params;
9904
+ const params = rule.actionParams;
9667
9905
  if (!params) continue;
9668
- const pnUuid = params.phoneNumberUUID ?? params.phone_number_uuid;
9669
- const pnId = params.phoneNumberId ?? params.phone_number_id;
9906
+ const pnUuid = params.phoneNumberUUID;
9907
+ const pnId = params.phoneNumberId;
9670
9908
  if (pnUuid === phoneUuid || pnId === phoneId) {
9671
9909
  users.push({
9672
9910
  kind: "event_rule",
9673
9911
  id: rule.id,
9674
9912
  name: String(rule.name ?? `rule ${rule.id}`),
9675
- detail: `action=${String(rule.actionType ?? rule.action_type ?? "")}`
9913
+ detail: `action=${String(rule.actionType ?? "")}`
9676
9914
  });
9677
9915
  }
9678
9916
  }
@@ -9689,7 +9927,7 @@ async function findOutboundPhoneUsers(client, workspace, phone) {
9689
9927
  }
9690
9928
 
9691
9929
  // ../../node_modules/libphonenumber-js/metadata.min.json.js
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}"]]] } };
9930
+ 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", "(?:400|[5-9]\\d\\d)\\d{6}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]00"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[4-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-9]"]], ["(\\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-7]\\d{7}", [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, [["(?:472[2-47-9]|983[2-57-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[02469]|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}"]]] } };
9693
9931
 
9694
9932
  // ../../node_modules/libphonenumber-js/min/exports/withMetadataArgument.js
9695
9933
  function withMetadataArgument(func, _arguments) {
@@ -12049,7 +12287,6 @@ async function resolveMemberByCallerPhone(client, workspace, callerE164) {
12049
12287
  workspace,
12050
12288
  page,
12051
12289
  MEMBER_SEARCH_PAGE_SIZE,
12052
- void 0,
12053
12290
  query
12054
12291
  );
12055
12292
  const items = result2.items ?? result2;
@@ -12074,8 +12311,8 @@ async function loadInboundWorkflowMemberRoleAccess(client, workspace, defaultWor
12074
12311
  return void 0;
12075
12312
  }
12076
12313
  try {
12077
- const workflow = await client.getWorkflow(workspace, workflowId);
12078
- return parseWorkflowMemberRoleAccess(workflow);
12314
+ const detail = await client.getWorkflow(workspace, workflowId);
12315
+ return parseWorkflowMemberRoleAccess(detail.draftRevision ?? {});
12079
12316
  } catch (err) {
12080
12317
  const reason = err instanceof Error ? err.message : String(err);
12081
12318
  process.stderr.write(
@@ -12099,9 +12336,9 @@ function requireCallerRole(args, flag) {
12099
12336
  }
12100
12337
  return role;
12101
12338
  }
12102
- var COLUMNS25 = [
12339
+ var COLUMNS24 = [
12103
12340
  COL.id(),
12104
- { header: "NUMBER", getValue: (item) => item.phone_number ?? item.number ?? "" },
12341
+ { header: "NUMBER", getValue: (item) => item.phoneNumber ?? item.number ?? "" },
12105
12342
  { header: "LABEL", getValue: (item) => item.label ?? item.name ?? "" },
12106
12343
  COL.status()
12107
12344
  ];
@@ -12126,7 +12363,7 @@ var phoneNumbersDomain = {
12126
12363
  entityName: "phone number",
12127
12364
  listMethod: "getPhoneNumbers",
12128
12365
  archiveMethod: "archivePhoneNumber",
12129
- columns: COLUMNS25
12366
+ columns: COLUMNS24
12130
12367
  }),
12131
12368
  {
12132
12369
  path: ["phone-numbers", "get"],
@@ -12176,7 +12413,7 @@ ${PHONE_NUMBER_FIELD_REFERENCE}`,
12176
12413
  );
12177
12414
  const record = asPhoneRecord(result2);
12178
12415
  const warnings = collectPhoneNumberWarnings(record);
12179
- outputData([record], ctx, COLUMNS25);
12416
+ outputData([record], ctx, COLUMNS24);
12180
12417
  if (warnings.length > 0) {
12181
12418
  process.stderr.write("\nWarnings after create:\n");
12182
12419
  for (const w of warnings) {
@@ -12208,7 +12445,7 @@ ${PHONE_NUMBER_FIELD_REFERENCE}`,
12208
12445
  id,
12209
12446
  data
12210
12447
  );
12211
- outputData([result2], ctx, COLUMNS25);
12448
+ outputData([result2], ctx, COLUMNS24);
12212
12449
  } catch (err) {
12213
12450
  return enrichPhoneNumberApiError(err);
12214
12451
  }
@@ -12496,7 +12733,7 @@ ${formatRoutingSimulation(sim, phone)}
12496
12733
  requiresWorkspace: true,
12497
12734
  handler: async ({ ctx, workspace }) => {
12498
12735
  const result2 = await requireAuth(ctx).apiClient.getAvailablePhoneNumbers(workspace);
12499
- outputData(result2, ctx, COLUMNS25);
12736
+ outputData(result2, ctx, COLUMNS24);
12500
12737
  }
12501
12738
  },
12502
12739
  {
@@ -12521,7 +12758,7 @@ ${formatRoutingSimulation(sim, phone)}
12521
12758
  const id = requireNumberFrom(args, "phone-number-id", "id");
12522
12759
  const providerPhoneUuid = requireString(args, "provider-phone-uuid");
12523
12760
  const result2 = await auth.apiClient.linkPhoneNumber(workspace, id, providerPhoneUuid);
12524
- outputData([result2], auth, COLUMNS25);
12761
+ outputData([result2], auth, COLUMNS24);
12525
12762
  }
12526
12763
  },
12527
12764
  {
@@ -12534,7 +12771,7 @@ ${formatRoutingSimulation(sim, phone)}
12534
12771
  workspace,
12535
12772
  data
12536
12773
  );
12537
- outputData([result2], ctx, COLUMNS25);
12774
+ outputData([result2], ctx, COLUMNS24);
12538
12775
  }
12539
12776
  },
12540
12777
  {
@@ -12681,7 +12918,7 @@ function normalizePronunciationUpdatePayload(data) {
12681
12918
  }
12682
12919
 
12683
12920
  // src/domains/pronunciations.ts
12684
- var COLUMNS26 = [
12921
+ var COLUMNS25 = [
12685
12922
  COL.id(),
12686
12923
  { header: "TERM", getValue: (item) => item.term ?? "" },
12687
12924
  { header: "RESPELLING", getValue: (item) => item.respelling ?? "" },
@@ -12703,7 +12940,7 @@ var pronunciationsDomain = {
12703
12940
  const auth = requireAuth(ctx);
12704
12941
  const orgUuid = await resolveOrgUuidFromWorkspace(auth.apiClient, workspace);
12705
12942
  const result2 = await auth.apiClient.getPronunciationEntries(orgUuid);
12706
- outputData(result2, ctx, COLUMNS26);
12943
+ outputData(result2, ctx, COLUMNS25);
12707
12944
  }
12708
12945
  },
12709
12946
  {
@@ -12717,7 +12954,7 @@ var pronunciationsDomain = {
12717
12954
  const orgUuid = await resolveOrgUuidFromWorkspace(auth.apiClient, workspace);
12718
12955
  const payload = normalizePronunciationCreatePayload(data);
12719
12956
  const result2 = await auth.apiClient.createPronunciationEntry(orgUuid, payload);
12720
- outputSingle(result2, ctx, COLUMNS26);
12957
+ outputSingle(result2, ctx, COLUMNS25);
12721
12958
  }
12722
12959
  },
12723
12960
  {
@@ -12735,7 +12972,7 @@ var pronunciationsDomain = {
12735
12972
  requireNumber(args, "id"),
12736
12973
  payload
12737
12974
  );
12738
- outputSingle(result2, ctx, COLUMNS26);
12975
+ outputSingle(result2, ctx, COLUMNS25);
12739
12976
  }
12740
12977
  },
12741
12978
  {
@@ -12759,7 +12996,7 @@ var pronunciationsDomain = {
12759
12996
  requiresWorkspace: true,
12760
12997
  handler: async ({ ctx }) => {
12761
12998
  const result2 = await requireAuth(ctx).apiClient.getMyPronunciations();
12762
- outputData(result2, ctx, COLUMNS26);
12999
+ outputData(result2, ctx, COLUMNS25);
12763
13000
  }
12764
13001
  },
12765
13002
  {
@@ -12770,7 +13007,7 @@ var pronunciationsDomain = {
12770
13007
  handler: async ({ ctx, data }) => {
12771
13008
  const payload = normalizePronunciationCreatePayload(data);
12772
13009
  const result2 = await requireAuth(ctx).apiClient.createMyPronunciation(payload);
12773
- outputSingle(result2, ctx, COLUMNS26);
13010
+ outputSingle(result2, ctx, COLUMNS25);
12774
13011
  }
12775
13012
  },
12776
13013
  {
@@ -13068,10 +13305,10 @@ ${ROUTINE_FIELD_REFERENCE}`,
13068
13305
  };
13069
13306
 
13070
13307
  // src/domains/subscriptions.ts
13071
- var COLUMNS27 = [
13308
+ var COLUMNS26 = [
13072
13309
  COL.id(),
13073
13310
  COL.status(),
13074
- { header: "PLAN", getValue: (item) => item.plan_name ?? item.plan ?? "" },
13311
+ { header: "PLAN", getValue: (item) => item.planName ?? item.plan ?? "" },
13075
13312
  COL.created()
13076
13313
  ];
13077
13314
  var subscriptionsDomain = {
@@ -13084,7 +13321,7 @@ var subscriptionsDomain = {
13084
13321
  requiresWorkspace: false,
13085
13322
  handler: async ({ ctx }) => {
13086
13323
  const result2 = await requireAuth(ctx).apiClient.getSubscriptions();
13087
- outputData(result2, ctx, COLUMNS27);
13324
+ outputData(result2, ctx, COLUMNS26);
13088
13325
  }
13089
13326
  },
13090
13327
  {
@@ -13093,7 +13330,7 @@ var subscriptionsDomain = {
13093
13330
  requiresWorkspace: true,
13094
13331
  handler: async ({ ctx, workspace }) => {
13095
13332
  const result2 = await requireAuth(ctx).apiClient.getWorkspaceSubscriptions(workspace);
13096
- outputData(result2, ctx, COLUMNS27);
13333
+ outputData(result2, ctx, COLUMNS26);
13097
13334
  }
13098
13335
  },
13099
13336
  {
@@ -13106,7 +13343,7 @@ var subscriptionsDomain = {
13106
13343
  const result2 = await requireAuth(ctx).apiClient.cancelSubscription(
13107
13344
  requireNumber(args, "id")
13108
13345
  );
13109
- outputSingle(result2, ctx, COLUMNS27);
13346
+ outputSingle(result2, ctx, COLUMNS26);
13110
13347
  }
13111
13348
  },
13112
13349
  {
@@ -13118,7 +13355,7 @@ var subscriptionsDomain = {
13118
13355
  const result2 = await requireAuth(ctx).apiClient.reactivateSubscription(
13119
13356
  requireNumber(args, "id")
13120
13357
  );
13121
- outputSingle(result2, ctx, COLUMNS27);
13358
+ outputSingle(result2, ctx, COLUMNS26);
13122
13359
  }
13123
13360
  },
13124
13361
  {
@@ -13132,7 +13369,7 @@ var subscriptionsDomain = {
13132
13369
  requireNumber(args, "id"),
13133
13370
  data
13134
13371
  );
13135
- outputSingle(result2, ctx, COLUMNS27);
13372
+ outputSingle(result2, ctx, COLUMNS26);
13136
13373
  }
13137
13374
  }
13138
13375
  ]
@@ -13386,7 +13623,7 @@ var supportDomain = {
13386
13623
  };
13387
13624
 
13388
13625
  // src/domains/supervisors.ts
13389
- var COLUMNS28 = [
13626
+ var COLUMNS27 = [
13390
13627
  COL.id(),
13391
13628
  COL.name(),
13392
13629
  { header: "TYPE", getValue: (item) => item.type ?? "" },
@@ -13404,7 +13641,7 @@ var supervisorsDomain = {
13404
13641
  createMethod: "createSupervisor",
13405
13642
  updateMethod: "updateSupervisor",
13406
13643
  deleteMethod: "deleteSupervisor",
13407
- columns: COLUMNS28
13644
+ columns: COLUMNS27
13408
13645
  })
13409
13646
  ]
13410
13647
  };
@@ -13664,8 +13901,135 @@ var syncDomain = {
13664
13901
  ]
13665
13902
  };
13666
13903
 
13904
+ // src/domains/widget-domains.ts
13905
+ import { WIDGET_SLUGS } from "@gravity-rail/sdk";
13906
+ var ENTRY_COLUMNS = [
13907
+ { header: "DOMAIN", getValue: (e) => e.domain ?? "" },
13908
+ { header: "WIDGETS", getValue: (e) => (e.widgets ?? []).join(", ") },
13909
+ { header: "ALLOW SUBDOMAINS", getValue: (e) => String(e.allowSubdomains ?? false) },
13910
+ { header: "PORT", getValue: (e) => e.port != null ? String(e.port) : "" },
13911
+ { header: "OWNERSHIP", getValue: (e) => e.ownershipStatus ?? "" }
13912
+ ];
13913
+ var CANDIDATE_COLUMNS = [
13914
+ { header: "DOMAIN", getValue: (d) => d.domain ?? "" },
13915
+ { header: "OWNERSHIP", getValue: (d) => d.ownershipStatus ?? "" },
13916
+ { header: "ORG DOMAIN UUID", getValue: (d) => d.uuid ?? "" }
13917
+ ];
13918
+ function parseWidgets(raw) {
13919
+ const widgets = raw.split(",").map((w) => w.trim()).filter((w) => w.length > 0);
13920
+ if (widgets.length === 0) {
13921
+ throw new CLIError("--widgets must list at least one widget slug");
13922
+ }
13923
+ const valid = new Set(WIDGET_SLUGS);
13924
+ for (const w of widgets) {
13925
+ if (!valid.has(w)) {
13926
+ throw new CLIError(`Unknown widget slug "${w}". Valid slugs: ${WIDGET_SLUGS.join(", ")}`);
13927
+ }
13928
+ }
13929
+ return widgets;
13930
+ }
13931
+ function parsePort(raw) {
13932
+ if (typeof raw !== "string") return void 0;
13933
+ const port = Number(raw);
13934
+ if (!Number.isInteger(port) || port < 1 || port > 65535) {
13935
+ throw new CLIError("--port must be an integer between 1 and 65535");
13936
+ }
13937
+ return port;
13938
+ }
13939
+ var widgetDomainsDomain = {
13940
+ name: "widget-domains",
13941
+ description: "Enable embeddable widgets on verified org domains",
13942
+ commands: [
13943
+ {
13944
+ path: ["widget-domains", "list"],
13945
+ description: "List this workspace's configured widget-domain entries",
13946
+ requiresWorkspace: true,
13947
+ handler: async ({ ctx, workspace }) => {
13948
+ const result2 = await requireAuth(ctx).apiClient.listWidgetDomains(workspace);
13949
+ outputData(result2, ctx, ENTRY_COLUMNS);
13950
+ }
13951
+ },
13952
+ {
13953
+ path: ["widget-domains", "candidates"],
13954
+ description: "List verified org domains available to enable widgets on",
13955
+ requiresWorkspace: true,
13956
+ handler: async ({ ctx, workspace }) => {
13957
+ const result2 = await requireAuth(ctx).apiClient.getWorkspaceWidgetDomains(workspace);
13958
+ outputData(result2, ctx, CANDIDATE_COLUMNS);
13959
+ }
13960
+ },
13961
+ {
13962
+ path: ["widget-domains", "enable"],
13963
+ description: "Enable/replace the set of widgets on one verified org domain",
13964
+ mutates: true,
13965
+ requiresWorkspace: true,
13966
+ args: [
13967
+ {
13968
+ name: "domain",
13969
+ description: "Org domain UUID (from `widget-domains candidates`)",
13970
+ required: true
13971
+ },
13972
+ {
13973
+ name: "widgets",
13974
+ description: `Comma-separated widget slugs (${WIDGET_SLUGS.join(", ")})`,
13975
+ required: true
13976
+ },
13977
+ {
13978
+ name: "allow-subdomains",
13979
+ description: "Also match subdomains of the verified domain",
13980
+ isFlag: true
13981
+ },
13982
+ {
13983
+ name: "port",
13984
+ description: "Non-default port of the embedding origin (1\u201365535)"
13985
+ }
13986
+ ],
13987
+ examples: [
13988
+ "gr widget-domains enable -w $WID --domain <uuid> --widgets chat,operator --allow-write",
13989
+ "gr widget-domains enable -w $WID --domain <uuid> --widgets chat --allow-subdomains --port 4444 --allow-write"
13990
+ ],
13991
+ handler: async ({ ctx, workspace, args }) => {
13992
+ const orgDomainUuid = requireString(args, "domain");
13993
+ const widgets = parseWidgets(requireString(args, "widgets"));
13994
+ const port = parsePort(args["port"]);
13995
+ const body = {
13996
+ widgets,
13997
+ allowSubdomains: args["allow-subdomains"] === true,
13998
+ ...port !== void 0 ? { port } : {}
13999
+ };
14000
+ const result2 = await requireAuth(ctx).apiClient.upsertWidgetDomain(
14001
+ workspace,
14002
+ orgDomainUuid,
14003
+ body
14004
+ );
14005
+ outputSingle(result2, ctx, ENTRY_COLUMNS);
14006
+ }
14007
+ },
14008
+ {
14009
+ path: ["widget-domains", "disable"],
14010
+ description: "Remove this workspace's widget entry for a domain (disables all widgets)",
14011
+ mutates: true,
14012
+ requiresWorkspace: true,
14013
+ args: [
14014
+ {
14015
+ name: "domain",
14016
+ description: "Org domain UUID to disable widgets for",
14017
+ required: true
14018
+ }
14019
+ ],
14020
+ examples: ["gr widget-domains disable -w $WID --domain <uuid> --allow-write"],
14021
+ handler: async ({ ctx, workspace, args }) => {
14022
+ const orgDomainUuid = requireString(args, "domain");
14023
+ await requireAuth(ctx).apiClient.deleteWidgetDomain(workspace, orgDomainUuid);
14024
+ process.stdout.write(`Disabled widgets for domain ${orgDomainUuid}
14025
+ `);
14026
+ }
14027
+ }
14028
+ ]
14029
+ };
14030
+
13667
14031
  // src/domains/integrations/app-connections.ts
13668
- var COLUMNS29 = [
14032
+ var COLUMNS28 = [
13669
14033
  COL.id(),
13670
14034
  COL.name(),
13671
14035
  { header: "TYPE", getValue: (item) => item.type ?? "" },
@@ -13681,7 +14045,7 @@ var appConnectionsDomain = {
13681
14045
  requiresWorkspace: true,
13682
14046
  handler: async ({ ctx, workspace }) => {
13683
14047
  const result2 = await requireAuth(ctx).apiClient.listAvailableAppConnections(workspace);
13684
- outputData(result2, ctx, COLUMNS29);
14048
+ outputData(result2, ctx, COLUMNS28);
13685
14049
  }
13686
14050
  },
13687
14051
  {
@@ -13690,20 +14054,31 @@ var appConnectionsDomain = {
13690
14054
  requiresWorkspace: true,
13691
14055
  handler: async ({ ctx, workspace }) => {
13692
14056
  const result2 = await requireAuth(ctx).apiClient.listAppConnections(workspace);
13693
- outputData(result2, ctx, COLUMNS29);
14057
+ outputData(result2, ctx, COLUMNS28);
13694
14058
  }
13695
14059
  },
13696
14060
  {
13697
14061
  path: ["app-connections", "enable"],
13698
- description: "Enable a platform app",
14062
+ description: "Enable a platform app by slug",
13699
14063
  mutates: true,
13700
14064
  requiresWorkspace: true,
13701
- args: [{ name: "id", description: "App connection ID", required: true }],
14065
+ args: [
14066
+ {
14067
+ name: "slug",
14068
+ // --id never worked here: the old handler sent { app_slug }
14069
+ // where the API requires { slug }, so every call 422'd
14070
+ // (GRA-6204). Kept as an alias so muscle memory still lands.
14071
+ aliases: ["id"],
14072
+ description: "App slug from `app-connections available` (e.g. 'gmail'). --id is a deprecated alias for --slug.",
14073
+ required: true
14074
+ }
14075
+ ],
14076
+ examples: ["gr app-connections enable --slug gmail"],
13702
14077
  handler: async ({ ctx, workspace, args }) => {
13703
14078
  const result2 = await requireAuth(ctx).apiClient.enablePlatformApp(workspace, {
13704
- app_slug: requireString(args, "id")
14079
+ slug: requireString(args, "slug")
13705
14080
  });
13706
- outputSingle(result2, ctx, COLUMNS29);
14081
+ outputSingle(result2, ctx, COLUMNS28);
13707
14082
  }
13708
14083
  },
13709
14084
  {
@@ -13716,7 +14091,7 @@ var appConnectionsDomain = {
13716
14091
  workspace,
13717
14092
  requireString(args, "id")
13718
14093
  );
13719
- outputSingle(result2, ctx, COLUMNS29);
14094
+ outputSingle(result2, ctx, COLUMNS28);
13720
14095
  }
13721
14096
  },
13722
14097
  {
@@ -13731,7 +14106,7 @@ var appConnectionsDomain = {
13731
14106
  requireString(args, "id"),
13732
14107
  data
13733
14108
  );
13734
- outputSingle(result2, ctx, COLUMNS29);
14109
+ outputSingle(result2, ctx, COLUMNS28);
13735
14110
  }
13736
14111
  },
13737
14112
  {
@@ -13940,7 +14315,7 @@ var confluenceDomain = {
13940
14315
  };
13941
14316
 
13942
14317
  // src/domains/integrations/discord-bots.ts
13943
- var COLUMNS30 = [COL.id(), COL.name(), COL.status()];
14318
+ var COLUMNS29 = [COL.id(), COL.name(), COL.status()];
13944
14319
  var discordBotsDomain = {
13945
14320
  name: "discord-bots",
13946
14321
  description: "Manage Discord bot integrations",
@@ -13953,7 +14328,7 @@ var discordBotsDomain = {
13953
14328
  createMethod: "createDiscordBot",
13954
14329
  updateMethod: "updateDiscordBot",
13955
14330
  deleteMethod: "deleteDiscordBot",
13956
- columns: COLUMNS30,
14331
+ columns: COLUMNS29,
13957
14332
  paginationSupport: "full"
13958
14333
  }),
13959
14334
  {
@@ -14013,10 +14388,10 @@ var discordBotsDomain = {
14013
14388
  };
14014
14389
 
14015
14390
  // src/domains/integrations/fhir-connections.ts
14016
- var COLUMNS31 = [
14391
+ var COLUMNS30 = [
14017
14392
  COL.id(),
14018
14393
  COL.name(),
14019
- { header: "URL", getValue: (item) => item.base_url ?? "" },
14394
+ { header: "URL", getValue: (item) => item.baseUrl ?? "" },
14020
14395
  COL.status()
14021
14396
  ];
14022
14397
  var fhirConnectionsDomain = {
@@ -14031,7 +14406,7 @@ var fhirConnectionsDomain = {
14031
14406
  createMethod: "createFhirConnection",
14032
14407
  updateMethod: "updateFhirConnection",
14033
14408
  deleteMethod: "deleteFhirConnection",
14034
- columns: COLUMNS31,
14409
+ columns: COLUMNS30,
14035
14410
  paginationSupport: "full"
14036
14411
  }),
14037
14412
  {
@@ -14051,7 +14426,7 @@ var fhirConnectionsDomain = {
14051
14426
  };
14052
14427
 
14053
14428
  // src/domains/integrations/patientsync.ts
14054
- var COLUMNS32 = [
14429
+ var COLUMNS31 = [
14055
14430
  { header: "CONFIGURED", getValue: (i) => String(i.configured ?? false) },
14056
14431
  { header: "ENABLED", getValue: (i) => String(i.enabled ?? false) },
14057
14432
  { header: "HAS_KEY", getValue: (i) => String(i.hasApiKey ?? false) },
@@ -14080,7 +14455,7 @@ var patientSyncDomain = {
14080
14455
  workspace,
14081
14456
  data
14082
14457
  );
14083
- outputSingle(result2, ctx, COLUMNS32);
14458
+ outputSingle(result2, ctx, COLUMNS31);
14084
14459
  }
14085
14460
  },
14086
14461
  {
@@ -14089,7 +14464,7 @@ var patientSyncDomain = {
14089
14464
  requiresWorkspace: true,
14090
14465
  handler: async ({ ctx, workspace }) => {
14091
14466
  const result2 = await requireAuth(ctx).apiClient.getPatientSyncStatus(workspace);
14092
- outputSingle(result2, ctx, COLUMNS32);
14467
+ outputSingle(result2, ctx, COLUMNS31);
14093
14468
  }
14094
14469
  },
14095
14470
  {
@@ -14110,9 +14485,33 @@ var hubspotDomain = {
14110
14485
  name: "hubspot",
14111
14486
  description: "HubSpot CRM integration",
14112
14487
  commands: [
14488
+ {
14489
+ path: ["hubspot", "install"],
14490
+ description: "Install HubSpot (setup step 1): create the connection and get its OAuth callback URL",
14491
+ mutates: true,
14492
+ requiresWorkspace: true,
14493
+ examples: [
14494
+ "# HubSpot setup is a 4-step flow \u2014 this command is step 1:",
14495
+ '# 1. install -> creates the connection; the response includes the OAuth "callbackUrl"',
14496
+ "# 2. in HubSpot: create a private/developer app whose Redirect URL is that callbackUrl,",
14497
+ "# with CRM scopes (contacts/companies/deals read+write). Copy the Client ID + Secret.",
14498
+ "# 3. configure -> save that Client ID / Secret",
14499
+ '# 4. authorize -> returns an "authorizeUrl"; open it to grant access. status then',
14500
+ "# reports configured=true and connected=true.",
14501
+ "",
14502
+ "gr hubspot install -w <ws> --allow-write",
14503
+ "gr hubspot status -w <ws> # read back callbackUrl + configured/connected",
14504
+ `gr hubspot configure -w <ws> --allow-write -d '{"clientId":"...","clientSecret":"..."}'`,
14505
+ "gr hubspot authorize -w <ws> --allow-write # then open the returned authorizeUrl"
14506
+ ],
14507
+ handler: async ({ ctx, workspace }) => {
14508
+ const result2 = await requireAuth(ctx).apiClient.installHubspot(workspace);
14509
+ outputSingle(result2, ctx);
14510
+ }
14511
+ },
14113
14512
  {
14114
14513
  path: ["hubspot", "status"],
14115
- description: "Get HubSpot connection status",
14514
+ description: "Get HubSpot connection status (shows configured/connected state + the OAuth callback URL)",
14116
14515
  requiresWorkspace: true,
14117
14516
  handler: async ({ ctx, workspace }) => {
14118
14517
  const result2 = await requireAuth(ctx).apiClient.getHubspotStatus(workspace);
@@ -14121,9 +14520,12 @@ var hubspotDomain = {
14121
14520
  },
14122
14521
  {
14123
14522
  path: ["hubspot", "configure"],
14124
- description: "Configure HubSpot connection",
14523
+ description: "Configure HubSpot credentials (setup step 3): save the Client ID / Secret",
14125
14524
  mutates: true,
14126
14525
  requiresWorkspace: true,
14526
+ examples: [
14527
+ `gr hubspot configure -w <ws> --allow-write -d '{"clientId":"...","clientSecret":"..."}'`
14528
+ ],
14127
14529
  handler: async ({ ctx, workspace, data }) => {
14128
14530
  if (!data) throw new CLIError("JSON data required (--data, --file, or stdin)");
14129
14531
  const result2 = await requireAuth(ctx).apiClient.configureHubspot(
@@ -14135,7 +14537,7 @@ var hubspotDomain = {
14135
14537
  },
14136
14538
  {
14137
14539
  path: ["hubspot", "authorize"],
14138
- description: "Start HubSpot OAuth flow",
14540
+ description: "Authorize HubSpot via OAuth (setup step 4): returns an authorizeUrl to open in a browser",
14139
14541
  mutates: true,
14140
14542
  requiresWorkspace: true,
14141
14543
  handler: async ({ ctx, workspace }) => {
@@ -14327,9 +14729,34 @@ var mondayDomain = {
14327
14729
  name: "monday",
14328
14730
  description: "Monday.com integration",
14329
14731
  commands: [
14732
+ {
14733
+ path: ["monday", "install"],
14734
+ description: "Install Monday.com (setup step 1): create the connection and get its OAuth callback URL",
14735
+ mutates: true,
14736
+ requiresWorkspace: true,
14737
+ examples: [
14738
+ "# Monday.com setup is a 4-step flow \u2014 this command is step 1:",
14739
+ '# 1. install -> creates the connection; the response includes the OAuth "callbackUrl"',
14740
+ "# 2. in Monday.com: create an app whose Redirect URI is that callbackUrl, with scopes",
14741
+ "# me:read, boards:read, boards:write, webhooks:write, account:read. Copy the",
14742
+ "# Client ID + Client Secret (and Signing Secret).",
14743
+ "# 3. configure -> save the Client ID / Secret (+ signingSecret)",
14744
+ '# 4. authorize -> returns an "authorizeUrl"; open it to grant access. status then',
14745
+ "# reports configured=true and connected=true.",
14746
+ "",
14747
+ "gr monday install -w <ws> --allow-write",
14748
+ "gr monday status -w <ws> # read back callbackUrl + configured/connected",
14749
+ `gr monday configure -w <ws> --allow-write -d '{"clientId":"...","clientSecret":"...","signingSecret":"..."}'`,
14750
+ "gr monday authorize -w <ws> # then open the returned authorizeUrl"
14751
+ ],
14752
+ handler: async ({ ctx, workspace }) => {
14753
+ const result2 = await requireAuth(ctx).apiClient.installMondayConnection(workspace);
14754
+ outputSingle(result2, ctx);
14755
+ }
14756
+ },
14330
14757
  {
14331
14758
  path: ["monday", "status"],
14332
- description: "Get Monday.com connection status",
14759
+ description: "Get Monday.com connection status (shows configured/connected state + the OAuth callback URL)",
14333
14760
  requiresWorkspace: true,
14334
14761
  handler: async ({ ctx, workspace }) => {
14335
14762
  const result2 = await requireAuth(ctx).apiClient.getMondayConnectionStatus(workspace);
@@ -14338,7 +14765,7 @@ var mondayDomain = {
14338
14765
  },
14339
14766
  {
14340
14767
  path: ["monday", "authorize"],
14341
- description: "Get Monday.com OAuth authorization URL",
14768
+ description: "Authorize Monday.com via OAuth (setup step 4): returns an authorizeUrl to open in a browser",
14342
14769
  requiresWorkspace: true,
14343
14770
  handler: async ({ ctx, workspace }) => {
14344
14771
  const result2 = await requireAuth(ctx).apiClient.authorizeMondayConnection(workspace);
@@ -14347,9 +14774,13 @@ var mondayDomain = {
14347
14774
  },
14348
14775
  {
14349
14776
  path: ["monday", "configure"],
14350
- description: "Configure Monday.com connection",
14777
+ description: "Configure Monday.com credentials (setup step 3): save the Client ID / Secret (+ signingSecret)",
14351
14778
  mutates: true,
14352
14779
  requiresWorkspace: true,
14780
+ examples: [
14781
+ `gr monday configure -w <ws> --allow-write \\`,
14782
+ ` -d '{"clientId":"...","clientSecret":"...","signingSecret":"..."}'`
14783
+ ],
14353
14784
  handler: async ({ ctx, workspace, data }) => {
14354
14785
  if (!data) throw new CLIError("JSON data required (--data, --file, or stdin)");
14355
14786
  const result2 = await requireAuth(ctx).apiClient.configureMondayConnection(
@@ -14563,9 +14994,45 @@ var salesforceDomain = {
14563
14994
  name: "salesforce",
14564
14995
  description: "Salesforce CRM integration",
14565
14996
  commands: [
14997
+ {
14998
+ path: ["salesforce", "install"],
14999
+ description: "Install Salesforce (setup step 1): create the connection and get its OAuth callback URL",
15000
+ mutates: true,
15001
+ requiresWorkspace: true,
15002
+ args: [
15003
+ {
15004
+ name: "instance-url",
15005
+ description: "Salesforce login host (default https://login.salesforce.com; sandbox: https://test.salesforce.com; Developer Edition/custom domain: your org's My Domain login URL)"
15006
+ }
15007
+ ],
15008
+ examples: [
15009
+ "# Salesforce setup is a 4-step flow \u2014 this command is step 1:",
15010
+ '# 1. install -> creates the connection; the response includes the OAuth "callbackUrl"',
15011
+ "# 2. in Salesforce: create a Connected App (or External Client App) whose Callback URL",
15012
+ "# is that callbackUrl, with OAuth scopes: api, refresh_token offline_access, openid,",
15013
+ "# id profile email address phone. Copy the Consumer Key + Consumer Secret.",
15014
+ "# 3. configure -> save that Client ID / Secret (and instance URL)",
15015
+ '# 4. authorize -> returns an "authorizeUrl"; open it to grant access. status then',
15016
+ "# reports configured=true and connected=true.",
15017
+ "",
15018
+ "gr salesforce install -w <ws> --allow-write",
15019
+ "gr salesforce install -w <ws> --instance-url https://test.salesforce.com --allow-write # sandbox",
15020
+ "gr salesforce status -w <ws> # read back callbackUrl + configured/connected",
15021
+ `gr salesforce configure -w <ws> --allow-write -d '{"clientId":"...","clientSecret":"...","instanceUrl":"https://login.salesforce.com"}'`,
15022
+ "gr salesforce authorize -w <ws> --allow-write # then open the returned authorizeUrl"
15023
+ ],
15024
+ handler: async ({ ctx, workspace, args }) => {
15025
+ const instanceUrl = args["instance-url"];
15026
+ const result2 = await requireAuth(ctx).apiClient.installSalesforce(
15027
+ workspace,
15028
+ typeof instanceUrl === "string" ? { instanceUrl } : void 0
15029
+ );
15030
+ outputSingle(result2, ctx);
15031
+ }
15032
+ },
14566
15033
  {
14567
15034
  path: ["salesforce", "status"],
14568
- description: "Get Salesforce connection status",
15035
+ description: "Get Salesforce connection status (shows configured/connected state + the OAuth callback URL)",
14569
15036
  requiresWorkspace: true,
14570
15037
  handler: async ({ ctx, workspace }) => {
14571
15038
  const result2 = await requireAuth(ctx).apiClient.getSalesforceStatus(workspace);
@@ -14574,9 +15041,13 @@ var salesforceDomain = {
14574
15041
  },
14575
15042
  {
14576
15043
  path: ["salesforce", "configure"],
14577
- description: "Configure Salesforce connection",
15044
+ description: "Configure Salesforce credentials (setup step 3): save the Client ID / Secret + instance URL",
14578
15045
  mutates: true,
14579
15046
  requiresWorkspace: true,
15047
+ examples: [
15048
+ "gr salesforce configure -w <ws> --allow-write \\",
15049
+ ` -d '{"clientId":"3MVG9...","clientSecret":"1A2B...","instanceUrl":"https://login.salesforce.com"}'`
15050
+ ],
14580
15051
  handler: async ({ ctx, workspace, data }) => {
14581
15052
  if (!data) throw new CLIError("JSON data required (--data, --file, or stdin)");
14582
15053
  const result2 = await requireAuth(ctx).apiClient.configureSalesforce(
@@ -14588,7 +15059,7 @@ var salesforceDomain = {
14588
15059
  },
14589
15060
  {
14590
15061
  path: ["salesforce", "authorize"],
14591
- description: "Start Salesforce OAuth flow",
15062
+ description: "Authorize Salesforce via OAuth (setup step 4): returns an authorizeUrl to open in a browser",
14592
15063
  mutates: true,
14593
15064
  requiresWorkspace: true,
14594
15065
  handler: async ({ ctx, workspace }) => {
@@ -14777,7 +15248,7 @@ var salesforceDomain = {
14777
15248
  };
14778
15249
 
14779
15250
  // src/domains/integrations/slack-apps.ts
14780
- var COLUMNS33 = [COL.id(), COL.name(), COL.status()];
15251
+ var COLUMNS32 = [COL.id(), COL.name(), COL.status()];
14781
15252
  function addSlackUrls(data, apiUrl, workspaceUuid) {
14782
15253
  const base = `${apiUrl}/api/v2/w/${workspaceUuid}/app-connections/slack`;
14783
15254
  return {
@@ -14800,7 +15271,7 @@ var slackAppsDomain = {
14800
15271
  entityName: "Slack app",
14801
15272
  listMethod: "getSlackApps",
14802
15273
  deleteMethod: "deleteSlackApp",
14803
- columns: COLUMNS33,
15274
+ columns: COLUMNS32,
14804
15275
  paginationSupport: "full"
14805
15276
  }),
14806
15277
  {
@@ -14886,7 +15357,7 @@ var slackAppsDomain = {
14886
15357
  };
14887
15358
 
14888
15359
  // src/domains/integrations/teams-apps.ts
14889
- var COLUMNS34 = [COL.id(), COL.name(), COL.status()];
15360
+ var COLUMNS33 = [COL.id(), COL.name(), COL.status()];
14890
15361
  function addTeamsUrls(data, apiUrl, workspaceUuid) {
14891
15362
  const base = `${apiUrl}/api/v2/w/${workspaceUuid}/app-connections/teams`;
14892
15363
  return {
@@ -14907,7 +15378,7 @@ var teamsAppsDomain = {
14907
15378
  entityName: "Teams app",
14908
15379
  listMethod: "getTeamsApps",
14909
15380
  deleteMethod: "deleteTeamsApp",
14910
- columns: COLUMNS34,
15381
+ columns: COLUMNS33,
14911
15382
  paginationSupport: "full"
14912
15383
  }),
14913
15384
  {
@@ -15000,7 +15471,6 @@ function registerPublicDomains(registry) {
15000
15471
  registry.register(memberRolesDomain);
15001
15472
  registry.register(workspacesDomain);
15002
15473
  registry.register(workflowsDomain);
15003
- registry.register(workflowVersionsDomain);
15004
15474
  registry.register(agentsDomain);
15005
15475
  registry.register(agentTasksDomain);
15006
15476
  registry.register(assignmentsDomain);
@@ -15044,6 +15514,7 @@ function registerPublicDomains(registry) {
15044
15514
  registry.register(docsDomain);
15045
15515
  registry.register(memberMemoriesDomain);
15046
15516
  registry.register(syncDomain);
15517
+ registry.register(widgetDomainsDomain);
15047
15518
  registry.register(confluenceDomain);
15048
15519
  registry.register(discordBotsDomain);
15049
15520
  registry.register(slackAppsDomain);
@@ -15410,6 +15881,7 @@ var MAX_HITL_ROUNDS = 25;
15410
15881
  async function runConciergeAguiLoop(client, initialMessages, onEvent, opts) {
15411
15882
  let streamText = "";
15412
15883
  let hasToolCalls = false;
15884
+ let errorMessage;
15413
15885
  let resume;
15414
15886
  for (let round = 0; round < MAX_HITL_ROUNDS; round++) {
15415
15887
  let hitlPayload = null;
@@ -15426,8 +15898,11 @@ async function runConciergeAguiLoop(client, initialMessages, onEvent, opts) {
15426
15898
  const type = event.type?.toLowerCase() ?? "";
15427
15899
  if (type === "tool_call_start") hasToolCalls = true;
15428
15900
  const errorMsg = getErrorMessage(event);
15429
- if (errorMsg) process.stderr.write(`\x1B[31mError: ${errorMsg}\x1B[0m
15901
+ if (errorMsg) {
15902
+ errorMessage = errorMsg;
15903
+ process.stderr.write(`\x1B[31mError: ${errorMsg}\x1B[0m
15430
15904
  `);
15905
+ }
15431
15906
  const hitl = extractHumanInputRequest(event);
15432
15907
  if (hitl) hitlPayload = hitl;
15433
15908
  },
@@ -15456,13 +15931,15 @@ async function runConciergeAguiLoop(client, initialMessages, onEvent, opts) {
15456
15931
  return {
15457
15932
  streamText,
15458
15933
  hasToolCalls,
15459
- unsupportedHitl: normalizeUnsupportedHitl(hitlPayload)
15934
+ unsupportedHitl: normalizeUnsupportedHitl(hitlPayload),
15935
+ errorMessage
15460
15936
  };
15461
15937
  }
15462
15938
  resume = next;
15463
15939
  streamText = "";
15940
+ errorMessage = void 0;
15464
15941
  }
15465
- return { streamText, hasToolCalls };
15942
+ return { streamText, hasToolCalls, errorMessage };
15466
15943
  }
15467
15944
  function normalizeUnsupportedHitl(raw) {
15468
15945
  const payload = raw && typeof raw === "object" ? raw : {};
@@ -17038,6 +17515,7 @@ var AudioPlayer = class extends EventEmitter2 {
17038
17515
 
17039
17516
  // src/lib/chat-session.ts
17040
17517
  var HITL_INTERRUPT_EXIT_CODE = 3;
17518
+ var NO_FINAL_RESPONSE_EXIT_CODE = 4;
17041
17519
  async function runChatSession(session, args) {
17042
17520
  const debug = !!args.debug;
17043
17521
  const isVoice = !!args.voice;
@@ -17094,7 +17572,7 @@ async function singleTurnChatSession(session, message, debug, autoApprove = fals
17094
17572
  `);
17095
17573
  }
17096
17574
  };
17097
- const { streamText, hasToolCalls, unsupportedHitl } = await runConciergeAguiLoop(
17575
+ const { streamText, hasToolCalls, unsupportedHitl, errorMessage } = await runConciergeAguiLoop(
17098
17576
  aguiClient,
17099
17577
  [{ role: "user", content: message }],
17100
17578
  onEvent,
@@ -17148,12 +17626,30 @@ async function singleTurnChatSession(session, message, debug, autoApprove = fals
17148
17626
  } catch {
17149
17627
  }
17150
17628
  }
17151
- process.stdout.write(`\x1B[32mAssistant:\x1B[0m ${finalText || "(no text response)"}
17152
- `);
17153
- } else {
17154
- process.stdout.write(`\x1B[32mAssistant:\x1B[0m (no response)
17629
+ if (finalText) {
17630
+ process.stdout.write(`\x1B[32mAssistant:\x1B[0m ${finalText}
17155
17631
  `);
17632
+ return;
17633
+ }
17634
+ throw noFinalResponseError(
17635
+ errorMessage,
17636
+ /* hadToolCalls */
17637
+ true
17638
+ );
17156
17639
  }
17640
+ if (errorMessage) {
17641
+ throw noFinalResponseError(
17642
+ errorMessage,
17643
+ /* hadToolCalls */
17644
+ false
17645
+ );
17646
+ }
17647
+ process.stdout.write(`\x1B[32mAssistant:\x1B[0m (no response)
17648
+ `);
17649
+ }
17650
+ function noFinalResponseError(errorMessage, hadToolCalls) {
17651
+ const detail = errorMessage ? `inference error: ${errorMessage}` : hadToolCalls ? "the turn ran tool calls but returned no summary (side effects may have been applied)" : "no response from the assistant";
17652
+ return new CLIError(`No assistant reply \u2014 ${detail}`, NO_FINAL_RESPONSE_EXIT_CODE);
17157
17653
  }
17158
17654
  async function interactiveChatSession(session, debug, autoApprove, allowWrite) {
17159
17655
  const aguiClient = new AGUIClient({
@@ -17810,7 +18306,7 @@ var LLM_GUIDE = `# Gravity Rail CLI bootstrap (agent instructions)
17810
18306
  ## Preconditions
17811
18307
  - Install: \`npm install -g @gravity-rail/cli\` or \`npx @gravity-rail/cli\`
17812
18308
  - Authenticate: \`gr login --env prod\` (interactive OAuth). Verify with \`gr whoami\`.
17813
- - **Monorepo dev:** from gravity-team with Docker dev up, use \`yarn gr <cmd> --realm superadmin\` (reads \`dev-realms.json\`; no browser). Rebuild: \`yarn workspace @gravity-rail/gr-cli build\`.
18309
+ - **Monorepo dev:** after provisioning, \`yarn gr auth import-dev\` (or auto-sync from provision) loads tokens into named profiles. Then \`yarn gr <cmd> --profile superadmin\` (no browser). Rebuild: \`yarn workspace @gravity-rail/gr-cli build\`.
17814
18310
 
17815
18311
  ## Important facts
17816
18312
  - **Agents/CI:** do not leave stdin open on read-only commands; use \`GRAVITY_RAIL_API_KEY\` or redirect stdin from /dev/null. Commands only read stdin when \`--data\`/\`--file\` is passed.
@@ -17862,9 +18358,9 @@ After directory trust + \`--allow-write\`, the concierge can use \`read_local_fi
17862
18358
  \`\`\`bash
17863
18359
  yarn dev:twilio-ngrok --start-ngrok --url gravityrail.ngrok.io dev.<you> -w acme-demo
17864
18360
  yarn gr phone setup
17865
- yarn gr account verify-phone --phone +1\u2026 --allow-write --realm superadmin
17866
- yarn gr concierge chat --call --allow-write --realm superadmin
17867
- yarn gr phone outbound --realm acme-demo/acme-admin --workflow-id 1 --allow-write
18361
+ yarn gr account verify-phone --phone +1\u2026 --allow-write --profile superadmin
18362
+ yarn gr concierge chat --call --allow-write --profile superadmin
18363
+ yarn gr phone outbound --profile acme-demo/acme-admin --workflow-id 1 --allow-write
17868
18364
  \`\`\`
17869
18365
  See \`.claude/skills/phone-voice-qa/SKILL.md\` and \`./scripts/e2e-voice-phone-matrix.sh\`.
17870
18366
  `;
@@ -17884,23 +18380,208 @@ async function getStartedCommand(hctx) {
17884
18380
 
17885
18381
  // src/commands/login.ts
17886
18382
  import { GravityRailClient } from "@gravity-rail/sdk";
17887
- async function loginCommand(ctx) {
18383
+
18384
+ // src/lib/import-dev-profiles.ts
18385
+ import { existsSync as existsSync4, readFileSync as readFileSync5 } from "fs";
18386
+ import { dirname as dirname3, join as join3 } from "path";
18387
+
18388
+ // src/lib/realm.ts
18389
+ import { execSync as execSync3 } from "child_process";
18390
+ import { existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync4, statSync as statSync2, writeFileSync as writeFileSync5 } from "fs";
18391
+ import { dirname as dirname2, join as join2 } from "path";
18392
+ var DEV_CLOUD_CACHE_DIR = ".dev-cloud";
18393
+ var CACHE_MAX_AGE_MS = 60 * 60 * 1e3;
18394
+ function findRepoRoot() {
18395
+ let dir = process.cwd();
18396
+ while (dir !== dirname2(dir)) {
18397
+ if (existsSync3(join2(dir, ".git"))) {
18398
+ return dir;
18399
+ }
18400
+ dir = dirname2(dir);
18401
+ }
18402
+ return void 0;
18403
+ }
18404
+ function getDevCloudCacheDir(namespace) {
18405
+ const repoRoot = findRepoRoot();
18406
+ const base = repoRoot ?? process.cwd();
18407
+ return join2(base, DEV_CLOUD_CACHE_DIR, namespace);
18408
+ }
18409
+ function fetchDevCloudRealms(namespace) {
18410
+ const k8sNamespace = `dev-cloud-${namespace}`;
18411
+ const cmd = `kubectl exec -n ${k8sNamespace} deploy/env -c devbox -- cat /workspace/dev-realms.json`;
18412
+ try {
18413
+ return execSync3(cmd, { encoding: "utf-8", timeout: 3e4 });
18414
+ } catch (err) {
18415
+ const message = err instanceof Error ? err.message : String(err);
18416
+ throw new Error(
18417
+ `Failed to fetch dev-realms.json from dev-cloud pod "${namespace}": ${message}`
18418
+ );
18419
+ }
18420
+ }
18421
+ function loadDevCloudRealmFile(namespace) {
18422
+ const cacheDir = getDevCloudCacheDir(namespace);
18423
+ const cachePath = join2(cacheDir, "dev-realms.json");
18424
+ if (existsSync3(cachePath)) {
18425
+ const stat = statSync2(cachePath);
18426
+ const age = Date.now() - stat.mtimeMs;
18427
+ if (age < CACHE_MAX_AGE_MS) {
18428
+ return cachePath;
18429
+ }
18430
+ }
18431
+ const content = fetchDevCloudRealms(namespace);
18432
+ mkdirSync3(cacheDir, { recursive: true });
18433
+ writeFileSync5(cachePath, content, "utf-8");
18434
+ return cachePath;
18435
+ }
18436
+
18437
+ // src/lib/import-dev-profiles.ts
18438
+ function findDevRealmsFile(startDir = process.cwd()) {
18439
+ let dir = startDir;
18440
+ while (dir !== dirname3(dir)) {
18441
+ const candidate = join3(dir, "dev-realms.json");
18442
+ if (existsSync4(candidate)) return candidate;
18443
+ dir = dirname3(dir);
18444
+ }
18445
+ throw new Error(
18446
+ "Cannot find dev-realms.json in any parent directory. Run yarn dev / provision_e2e_world first, or pass --file <path>."
18447
+ );
18448
+ }
18449
+ function resolveDevRealmsPath(env, explicitPath) {
18450
+ if (explicitPath) {
18451
+ if (!existsSync4(explicitPath)) {
18452
+ throw new Error(`dev-realms file not found: ${explicitPath}`);
18453
+ }
18454
+ return explicitPath;
18455
+ }
18456
+ if (env.startsWith("dev-cloud:")) {
18457
+ const namespace = env.slice("dev-cloud:".length);
18458
+ return loadDevCloudRealmFile(namespace);
18459
+ }
18460
+ return findDevRealmsFile();
18461
+ }
18462
+ function profilesFromDevRealms(data) {
18463
+ const out = {};
18464
+ const accounts = data._accounts;
18465
+ if (accounts && typeof accounts === "object") {
18466
+ for (const [accountName, account] of Object.entries(accounts)) {
18467
+ if (account?.token) {
18468
+ out[accountName] = { accessToken: account.token };
18469
+ }
18470
+ }
18471
+ }
18472
+ for (const [key, value] of Object.entries(data)) {
18473
+ if (key === "_accounts" || key.startsWith("_")) continue;
18474
+ if (!value || typeof value !== "object") continue;
18475
+ const ws = value;
18476
+ if (!ws.members || typeof ws.members !== "object") continue;
18477
+ for (const [memberName, member] of Object.entries(ws.members)) {
18478
+ if (!member?.token) continue;
18479
+ const profileName = `${key}/${memberName}`;
18480
+ out[profileName] = {
18481
+ accessToken: member.token,
18482
+ workspaceUuid: ws.workspaceUuid
18483
+ };
18484
+ }
18485
+ }
18486
+ return out;
18487
+ }
18488
+ function importDevProfiles(credentialsManager, env, options) {
18489
+ const path4 = resolveDevRealmsPath(env, options?.file);
18490
+ let data;
18491
+ try {
18492
+ data = JSON.parse(readFileSync5(path4, "utf-8"));
18493
+ } catch {
18494
+ throw new Error(`Cannot read or parse dev-realms.json at ${path4}`);
18495
+ }
18496
+ const profiles = profilesFromDevRealms(data);
18497
+ const names = Object.keys(profiles);
18498
+ if (names.length === 0) {
18499
+ throw new Error(`No importable tokens found in ${path4}`);
18500
+ }
18501
+ const accountProfiles = names.filter((n) => !n.includes("/")).length;
18502
+ const memberProfiles = names.length - accountProfiles;
18503
+ const imported = credentialsManager.saveMany(
18504
+ env,
18505
+ profiles,
18506
+ options?.preferCurrent ?? "superadmin"
18507
+ );
18508
+ return {
18509
+ path: path4,
18510
+ imported,
18511
+ accountProfiles,
18512
+ memberProfiles,
18513
+ storePath: credentialsManager.getCredentialsFilePath(env)
18514
+ };
18515
+ }
18516
+
18517
+ // src/commands/login.ts
18518
+ function profileFromArgs(ctx, args) {
18519
+ const named = typeof args?.name === "string" ? args.name : void 0;
18520
+ return ctx.credentialsManager.resolveProfileName(named ?? ctx.profile, ctx.env);
18521
+ }
18522
+ async function loginCommand(ctx, args) {
18523
+ const profile = profileFromArgs(ctx, args);
17888
18524
  const { accessToken } = await performOAuthFlow({
17889
18525
  env: ctx.env,
17890
18526
  envConfig: ctx.envConfig,
17891
- credentialsManager: ctx.credentialsManager
18527
+ credentialsManager: ctx.credentialsManager,
18528
+ profile
17892
18529
  });
17893
18530
  const apiClient = new GravityRailClient(accessToken, ctx.envConfig.apiUrl);
17894
18531
  const account = await apiClient.getUserAccount();
17895
- stderr(`Logged in as ${account.name} (${account.email})`);
17896
- }
17897
- async function logoutCommand(ctx) {
17898
- ctx.credentialsManager.clear(ctx.env);
17899
- stderr(`Credentials cleared for ${ctx.env}`);
18532
+ stderr(`Logged in as ${account.name} (${account.email}) [profile: ${profile}, env: ${ctx.env}]`);
18533
+ }
18534
+ async function logoutCommand(ctx, args) {
18535
+ const profile = profileFromArgs(ctx, args);
18536
+ ctx.credentialsManager.clear(ctx.env, profile);
18537
+ stderr(`Credentials cleared for profile "${profile}" (${ctx.env})`);
18538
+ }
18539
+ async function authListCommand(ctx) {
18540
+ const profiles = ctx.credentialsManager.listProfiles(ctx.env);
18541
+ const storePath2 = ctx.credentialsManager.getCredentialsFilePath(ctx.env);
18542
+ if (profiles.length === 0) {
18543
+ stderr(`No stored profiles for ${ctx.env}.`);
18544
+ stderr(`Credential store: ${storePath2}`);
18545
+ stderr(`Run: gr auth login --name <profile>`);
18546
+ stderr(`Local dev: gr auth import-dev (loads tokens from dev-realms.json)`);
18547
+ return;
18548
+ }
18549
+ stderr(`Credential store: ${storePath2}`);
18550
+ stderr(`Environment: ${ctx.env}`);
18551
+ stderr("");
18552
+ for (const p of profiles) {
18553
+ const marker = p.current ? "*" : " ";
18554
+ const token = p.hasAccessToken ? "logged-in" : "client-only";
18555
+ const exp = p.expiresAt ? ` expires=${p.expiresAt}` : "";
18556
+ const ws = p.workspaceUuid ? ` ws=${p.workspaceUuid.slice(0, 8)}\u2026` : "";
18557
+ stderr(`${marker} ${p.name} (${token}${exp}${ws})`);
18558
+ }
18559
+ stderr("");
18560
+ stderr(`* = current profile (override with --profile or GRAVITY_RAIL_PROFILE)`);
18561
+ }
18562
+ async function authSwitchCommand(ctx, args) {
18563
+ const name = typeof args.name === "string" ? args.name : void 0;
18564
+ if (!name) {
18565
+ throw new Error("Missing required argument: --name <profile>");
18566
+ }
18567
+ ctx.credentialsManager.setCurrentProfile(ctx.env, name);
18568
+ stderr(`Switched current profile to "${name}" for ${ctx.env}`);
18569
+ }
18570
+ async function authImportDevCommand(ctx, args) {
18571
+ const file = typeof args?.file === "string" ? args.file : void 0;
18572
+ const result2 = importDevProfiles(ctx.credentialsManager, ctx.env, { file });
18573
+ stderr(`Imported ${result2.imported} profiles from ${result2.path}`);
18574
+ stderr(` ${result2.accountProfiles} account-level, ${result2.memberProfiles} workspace/member`);
18575
+ stderr(`Credential store: ${result2.storePath}`);
18576
+ stderr("");
18577
+ stderr("Examples:");
18578
+ stderr(" yarn gr whoami --profile superadmin");
18579
+ stderr(" yarn gr tasks list --profile acme-demo/acme-admin");
18580
+ stderr(" yarn gr auth switch --name superadmin # make superadmin the default");
17900
18581
  }
17901
18582
 
17902
18583
  // src/commands/organizations.ts
17903
- var COLUMNS35 = [
18584
+ var COLUMNS34 = [
17904
18585
  { header: "NAME", getValue: (o) => o.organizationName || "", maxWidth: 35 },
17905
18586
  { header: "SLUG", getValue: (o) => o.organizationSlug || "", maxWidth: 25 },
17906
18587
  { header: "UUID", getValue: (o) => o.organizationUuid },
@@ -17908,41 +18589,116 @@ var COLUMNS35 = [
17908
18589
  ];
17909
18590
  async function organizationsListCommand(ctx) {
17910
18591
  const organizations = await ctx.apiClient.getMyOrganizations();
17911
- outputData(organizations, ctx, COLUMNS35);
18592
+ outputData(organizations, ctx, COLUMNS34);
17912
18593
  }
17913
18594
 
17914
18595
  // src/commands/whoami.ts
17915
- var COLUMNS36 = [
17916
- { header: "NAME", getValue: (a) => a.name || "", maxWidth: 30 },
17917
- { header: "EMAIL", getValue: (a) => a.email || "", maxWidth: 40 },
17918
- { header: "UUID", getValue: (a) => a.uuid },
17919
- { header: "ENV", getValue: () => "" },
17920
- { header: "SUPERUSER", getValue: (a) => a.isSuperuser ? "yes" : "no" }
17921
- ];
18596
+ function createColumns(ctx) {
18597
+ return [
18598
+ { header: "NAME", getValue: (a) => a.name || "", maxWidth: 30 },
18599
+ { header: "EMAIL", getValue: (a) => a.email || "", maxWidth: 40 },
18600
+ { header: "UUID", getValue: (a) => a.uuid },
18601
+ { header: "ENV", getValue: () => ctx.env },
18602
+ { header: "PROFILE", getValue: () => ctx.profile },
18603
+ { header: "SUPERUSER", getValue: (a) => a.isSuperuser ? "yes" : "no" }
18604
+ ];
18605
+ }
17922
18606
  async function whoamiCommand(ctx) {
17923
18607
  const account = await ctx.apiClient.getUserAccount();
17924
- const columns = COLUMNS36.map(
17925
- (col) => col.header === "ENV" ? { ...col, getValue: () => ctx.env } : col
17926
- );
17927
- outputSingle(account, ctx, columns);
18608
+ outputSingle(account, ctx, createColumns(ctx));
17928
18609
  }
17929
18610
 
17930
18611
  // src/top-level-commands.ts
18612
+ var AUTH_PROFILE_ARGS = [
18613
+ {
18614
+ name: "name",
18615
+ description: "Named account profile (stored under ~/.gr-cli)"
18616
+ }
18617
+ ];
17931
18618
  var topLevelCommands = [
17932
18619
  {
17933
18620
  path: ["login"],
17934
- description: "Authenticate via OAuth",
18621
+ description: "Authenticate via OAuth (active profile, or --name)",
17935
18622
  requiresAuth: false,
17936
- handler: async ({ ctx }) => {
17937
- await loginCommand(ctx);
18623
+ args: [...AUTH_PROFILE_ARGS],
18624
+ examples: ["gr login", "gr login --name work", "gr login --profile personal"],
18625
+ handler: async ({ ctx, args }) => {
18626
+ await loginCommand(ctx, args);
17938
18627
  }
17939
18628
  },
17940
18629
  {
17941
18630
  path: ["logout"],
17942
- description: "Clear cached credentials",
18631
+ description: "Clear cached credentials for a profile",
18632
+ requiresAuth: false,
18633
+ args: [...AUTH_PROFILE_ARGS],
18634
+ examples: ["gr logout", "gr logout --name work"],
18635
+ handler: async ({ ctx, args }) => {
18636
+ await logoutCommand(ctx, args);
18637
+ }
18638
+ },
18639
+ {
18640
+ path: ["auth", "login"],
18641
+ description: "Authenticate via OAuth into a named profile",
18642
+ requiresAuth: false,
18643
+ args: [...AUTH_PROFILE_ARGS],
18644
+ examples: ["gr auth login", "gr auth login --name work"],
18645
+ handler: async ({ ctx, args }) => {
18646
+ await loginCommand(ctx, args);
18647
+ }
18648
+ },
18649
+ {
18650
+ path: ["auth", "list"],
18651
+ description: "List stored account profiles for the current environment",
17943
18652
  requiresAuth: false,
18653
+ examples: ["gr auth list", "gr auth list --env prod"],
17944
18654
  handler: async ({ ctx }) => {
17945
- await logoutCommand(ctx);
18655
+ await authListCommand(ctx);
18656
+ }
18657
+ },
18658
+ {
18659
+ path: ["auth", "switch"],
18660
+ description: "Set the default account profile for subsequent commands",
18661
+ requiresAuth: false,
18662
+ args: [
18663
+ {
18664
+ name: "name",
18665
+ description: "Profile name to make current",
18666
+ required: true
18667
+ }
18668
+ ],
18669
+ examples: ["gr auth switch --name work"],
18670
+ handler: async ({ ctx, args }) => {
18671
+ await authSwitchCommand(ctx, args);
18672
+ }
18673
+ },
18674
+ {
18675
+ path: ["auth", "logout"],
18676
+ description: "Clear cached credentials for a named profile",
18677
+ requiresAuth: false,
18678
+ args: [...AUTH_PROFILE_ARGS],
18679
+ examples: ["gr auth logout", "gr auth logout --name work"],
18680
+ handler: async ({ ctx, args }) => {
18681
+ await logoutCommand(ctx, args);
18682
+ }
18683
+ },
18684
+ {
18685
+ path: ["auth", "import-dev"],
18686
+ description: "Import local/dev-cloud tokens from dev-realms.json into named profiles (replaces --realm)",
18687
+ requiresAuth: false,
18688
+ args: [
18689
+ {
18690
+ name: "file",
18691
+ description: "Path to dev-realms.json (default: walk up from cwd, or fetch for dev-cloud)"
18692
+ }
18693
+ ],
18694
+ examples: [
18695
+ "gr auth import-dev",
18696
+ "gr auth import-dev --env dev",
18697
+ "gr auth import-dev --env dev-cloud:my-ns",
18698
+ "gr auth import-dev --file ./dev-realms.json"
18699
+ ],
18700
+ handler: async ({ ctx, args }) => {
18701
+ await authImportDevCommand(ctx, args);
17946
18702
  }
17947
18703
  },
17948
18704
  {
@@ -18068,7 +18824,7 @@ var topLevelCommands = [
18068
18824
  mutates: true,
18069
18825
  args: [{ name: "phone", description: "E.164 phone number (optional; prompts if omitted)" }],
18070
18826
  handler: async (hctx) => {
18071
- const { accountVerifyPhoneCommand } = await import("./account-verify-phone-XNXA7HNG.js");
18827
+ const { accountVerifyPhoneCommand } = await import("./account-verify-phone-7YQXKU3X.js");
18072
18828
  await accountVerifyPhoneCommand(hctx);
18073
18829
  }
18074
18830
  },
@@ -18158,6 +18914,9 @@ export {
18158
18914
  LIST_PAGINATION_ARGS,
18159
18915
  PAGINATION_ARGS,
18160
18916
  authBrowserCommand,
18917
+ authImportDevCommand,
18918
+ authListCommand,
18919
+ authSwitchCommand,
18161
18920
  buildCliConciergeAppContext,
18162
18921
  chatCommand,
18163
18922
  commandNeedsJsonBody,
@@ -18180,6 +18939,7 @@ export {
18180
18939
  getConciergeChatMessages,
18181
18940
  getStartedCommand,
18182
18941
  handleError,
18942
+ importDevProfiles,
18183
18943
  isCursorPaginatedResponse,
18184
18944
  isDirectoryTrusted,
18185
18945
  isLikelySeedPhoneNumber,
@@ -18198,6 +18958,7 @@ export {
18198
18958
  outputSingle,
18199
18959
  parseArgs,
18200
18960
  parsePaginationArgs,
18961
+ profilesFromDevRealms,
18201
18962
  readJsonInput,
18202
18963
  registerPublicDomains,
18203
18964
  requireAuth,