@bagelink/vue 0.0.939 → 0.0.943
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/components/Accordion.d.ts +12 -0
- package/dist/components/Accordion.d.ts.map +1 -0
- package/dist/components/AccordionItem.d.ts +34 -0
- package/dist/components/AccordionItem.d.ts.map +1 -0
- package/dist/components/Alert.d.ts +34 -0
- package/dist/components/Alert.d.ts.map +1 -0
- package/dist/components/Avatar.d.ts +36 -0
- package/dist/components/Avatar.d.ts.map +1 -0
- package/dist/components/Badge.d.ts +22 -0
- package/dist/components/Badge.d.ts.map +1 -0
- package/dist/components/BglVideo.d.ts +20 -0
- package/dist/components/BglVideo.d.ts.map +1 -0
- package/dist/components/Btn.d.ts +99 -0
- package/dist/components/Btn.d.ts.map +1 -0
- package/dist/components/Card.d.ts +39 -0
- package/dist/components/Card.d.ts.map +1 -0
- package/dist/components/Carousel.d.ts +74 -0
- package/dist/components/Carousel.d.ts.map +1 -0
- package/dist/components/ComboBox.vue.d.ts +3 -3
- package/dist/components/Comments.vue.d.ts +2 -2
- package/dist/components/ContactSubmissions.vue.d.ts +2 -2
- package/dist/components/DataPreview.d.ts +42 -0
- package/dist/components/DataPreview.d.ts.map +1 -0
- package/dist/components/Drop.vue.d.ts +34 -0
- package/dist/components/Drop.vue.d.ts.map +1 -0
- package/dist/components/DropDown.vue.d.ts +17 -186
- package/dist/components/DropDown.vue.d.ts.map +1 -1
- package/dist/components/FileUploader.vue.d.ts +60 -0
- package/dist/components/FileUploader.vue.d.ts.map +1 -0
- package/dist/components/Flag.d.ts +20 -0
- package/dist/components/Flag.d.ts.map +1 -0
- package/dist/components/FormSchema.vue.d.ts +5 -4
- package/dist/components/LangText.vue.d.ts +2 -2
- package/dist/components/ListItem.d.ts +34 -0
- package/dist/components/ListItem.d.ts.map +1 -0
- package/dist/components/ListView.d.ts +13 -0
- package/dist/components/ListView.d.ts.map +1 -0
- package/dist/components/MapEmbed.d.ts +3 -0
- package/dist/components/MapEmbed.d.ts.map +1 -0
- package/dist/components/MaterialIcon.d.ts +26 -0
- package/dist/components/MaterialIcon.d.ts.map +1 -0
- package/dist/components/Modal.d.ts +46 -0
- package/dist/components/Modal.d.ts.map +1 -0
- package/dist/components/ModalBglForm.vue.d.ts +21 -20
- package/dist/components/ModalConfirm.d.ts +24 -0
- package/dist/components/ModalConfirm.d.ts.map +1 -0
- package/dist/components/ModalForm.d.ts +78 -0
- package/dist/components/ModalForm.d.ts.map +1 -0
- package/dist/components/NavBar.d.ts +64 -0
- package/dist/components/NavBar.d.ts.map +1 -0
- package/dist/components/PageTitle.d.ts +24 -0
- package/dist/components/PageTitle.d.ts.map +1 -0
- package/dist/components/PersonPreview.vue.d.ts +5 -4
- package/dist/components/PersonPreviewFormkit.vue.d.ts +4 -3
- package/dist/components/RTXEditor.vue.d.ts +3 -3
- package/dist/components/RouterWrapper.d.ts +3 -0
- package/dist/components/RouterWrapper.d.ts.map +1 -0
- package/dist/components/TabbedLayout.vue.d.ts +5 -4
- package/dist/components/TableSchema.d.ts +35 -0
- package/dist/components/TableSchema.d.ts.map +1 -0
- package/dist/components/TableSchema.vue.d.ts +2 -11
- package/dist/components/TableSchema.vue.d.ts.map +1 -1
- package/dist/components/Title.d.ts +42 -0
- package/dist/components/Title.d.ts.map +1 -0
- package/dist/components/TopBar.d.ts +12 -0
- package/dist/components/TopBar.d.ts.map +1 -0
- package/dist/components/charts/BarChart.vue.d.ts +2 -2
- package/dist/components/dashboard/Lineart.d.ts +20 -0
- package/dist/components/dashboard/Lineart.d.ts.map +1 -0
- package/dist/components/form/BglField.d.ts +25 -0
- package/dist/components/form/BglField.d.ts.map +1 -0
- package/dist/components/form/BglField.vue.d.ts +2 -6
- package/dist/components/form/BglField.vue.d.ts.map +1 -1
- package/dist/components/form/BglForm.d.ts +75 -0
- package/dist/components/form/BglForm.d.ts.map +1 -0
- package/dist/components/form/BglMultiStepForm.vue.d.ts +3 -21
- package/dist/components/form/BglMultiStepForm.vue.d.ts.map +1 -1
- package/dist/components/form/ItemRef.vue.d.ts +5 -3
- package/dist/components/form/ItemRef.vue.d.ts.map +1 -1
- package/dist/components/form/MaterialIcon.vue.d.ts +4 -3
- package/dist/components/form/PlainInputField.vue.d.ts +3 -3
- package/dist/components/form/inputs/CheckInput.d.ts +56 -0
- package/dist/components/form/inputs/CheckInput.d.ts.map +1 -0
- package/dist/components/form/inputs/Checkbox.d.ts +16 -0
- package/dist/components/form/inputs/Checkbox.d.ts.map +1 -0
- package/dist/components/form/inputs/ColorPicker.d.ts +48 -0
- package/dist/components/form/inputs/ColorPicker.d.ts.map +1 -0
- package/dist/components/form/inputs/CurrencyInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/DateInput.d.ts +64 -0
- package/dist/components/form/inputs/DateInput.d.ts.map +1 -0
- package/dist/components/form/inputs/DatePicker.d.ts +33 -0
- package/dist/components/form/inputs/DatePicker.d.ts.map +1 -0
- package/dist/components/form/inputs/DatetimeInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/DurationInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/DynamicLinkField.vue.d.ts +3 -3
- package/dist/components/form/inputs/EmailInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/FileUpload.d.ts +108 -0
- package/dist/components/form/inputs/FileUpload.d.ts.map +1 -0
- package/dist/components/form/inputs/FileUpload.vue.d.ts +2 -0
- package/dist/components/form/inputs/FileUpload.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/FloatInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/IntInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/JSONInput.d.ts +53 -0
- package/dist/components/form/inputs/JSONInput.d.ts.map +1 -0
- package/dist/components/form/inputs/LinkField.vue.d.ts +3 -3
- package/dist/components/form/inputs/Password.vue.d.ts +3 -3
- package/dist/components/form/inputs/PlainText.vue.d.ts +3 -3
- package/dist/components/form/inputs/RadioGroup.d.ts +42 -0
- package/dist/components/form/inputs/RadioGroup.d.ts.map +1 -0
- package/dist/components/form/inputs/RadioGroup.vue.d.ts +2 -6
- package/dist/components/form/inputs/RadioGroup.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RadioPillsInput.d.ts +48 -0
- package/dist/components/form/inputs/RadioPillsInput.d.ts.map +1 -0
- package/dist/components/form/inputs/ReadOnlyInput.vue.d.ts +2 -2
- package/dist/components/form/inputs/RichText.d.ts +20 -0
- package/dist/components/form/inputs/RichText.d.ts.map +1 -0
- package/dist/components/form/inputs/RichText2/Toolbar.d.ts +22 -0
- package/dist/components/form/inputs/RichText2/Toolbar.d.ts.map +1 -0
- package/dist/components/form/inputs/RichText2/index.d.ts +24 -0
- package/dist/components/form/inputs/RichText2/index.d.ts.map +1 -0
- package/dist/components/form/inputs/RichTextEditor.vue.d.ts +3 -3
- package/dist/components/form/inputs/SelectField.vue.d.ts +6 -8
- package/dist/components/form/inputs/SelectField.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectInput.d.ts +55 -0
- package/dist/components/form/inputs/SelectInput.d.ts.map +1 -0
- package/dist/components/form/inputs/SelectInput.vue.d.ts +2 -50
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SignaturePad.d.ts +72 -0
- package/dist/components/form/inputs/SignaturePad.d.ts.map +1 -0
- package/dist/components/form/inputs/TableField.d.ts +45 -0
- package/dist/components/form/inputs/TableField.d.ts.map +1 -0
- package/dist/components/form/inputs/TelInput.d.ts +241 -0
- package/dist/components/form/inputs/TelInput.d.ts.map +1 -0
- package/dist/components/form/inputs/TextArea.vue.d.ts +3 -3
- package/dist/components/form/inputs/TextInput.d.ts +90 -0
- package/dist/components/form/inputs/TextInput.d.ts.map +1 -0
- package/dist/components/form/inputs/ToggleInput.d.ts +58 -0
- package/dist/components/form/inputs/ToggleInput.d.ts.map +1 -0
- package/dist/components/formkit/AddressArray.vue.d.ts +2 -2
- package/dist/components/formkit/BankDetailsArray.vue.d.ts +2 -2
- package/dist/components/formkit/ContactArrayFormKit.vue.d.ts +2 -2
- package/dist/components/formkit/FileUploader.vue.d.ts +2 -2
- package/dist/components/formkit/MiscFields.vue.d.ts +2 -2
- package/dist/components/formkit/Toggle.vue.d.ts +2 -2
- package/dist/components/layout/BottomMenu.d.ts +27 -0
- package/dist/components/layout/BottomMenu.d.ts.map +1 -0
- package/dist/components/layout/Layout.d.ts +58 -0
- package/dist/components/layout/Layout.d.ts.map +1 -0
- package/dist/components/layout/SidebarMenu.d.ts +38 -0
- package/dist/components/layout/SidebarMenu.d.ts.map +1 -0
- package/dist/components/layout/TabbedLayout.d.ts +42 -0
- package/dist/components/layout/TabbedLayout.d.ts.map +1 -0
- package/dist/components/layout/Tabs.d.ts +31 -0
- package/dist/components/layout/Tabs.d.ts.map +1 -0
- package/dist/components/layout/TabsBody.d.ts +23 -0
- package/dist/components/layout/TabsBody.d.ts.map +1 -0
- package/dist/components/layout/TabsNav.d.ts +35 -0
- package/dist/components/layout/TabsNav.d.ts.map +1 -0
- package/dist/components/whatsapp/form/MsgTemplate.vue.d.ts +4 -3
- package/dist/components/whatsapp/form/TextVariableExamples.vue.d.ts +2 -2
- package/dist/index.cjs +1672 -1571
- package/dist/index.mjs +1672 -1571
- package/dist/style.css +80 -80
- package/dist/utils/BagelFormUtils.d.ts +2 -30
- package/dist/utils/BagelFormUtils.d.ts.map +1 -1
- package/dist/utils/objects.d.ts +1 -0
- package/dist/vue.css +13814 -0
- package/package.json +5 -5
- package/src/components/TableSchema.vue +9 -2
- package/src/components/form/inputs/FileUpload.vue +1 -1
- package/dist/components/AddressSaerch.vue.d.ts +0 -7
- package/dist/components/AddressSaerch.vue.d.ts.map +0 -1
- package/dist/components/Popover.vue.d.ts +0 -10
- package/dist/components/Popover.vue.d.ts.map +0 -1
- package/dist/components/sortable/Animation.d.ts +0 -43
- package/dist/components/sortable/Animation.d.ts.map +0 -1
- package/dist/components/sortable/BrowserInfo.d.ts +0 -7
- package/dist/components/sortable/BrowserInfo.d.ts.map +0 -1
- package/dist/components/sortable/EventDispatcher.d.ts +0 -13
- package/dist/components/sortable/EventDispatcher.d.ts.map +0 -1
- package/dist/components/sortable/PluginManager.d.ts +0 -27
- package/dist/components/sortable/PluginManager.d.ts.map +0 -1
- package/dist/components/sortable/Sortable.d.ts +0 -81
- package/dist/components/sortable/Sortable.d.ts.map +0 -1
- package/dist/components/sortable/index.d.ts +0 -5
- package/dist/components/sortable/index.d.ts.map +0 -1
- package/dist/components/sortable/utils.d.ts +0 -49
- package/dist/components/sortable/utils.d.ts.map +0 -1
- package/dist/composables/drag-n-drop/useDraggable.d.ts +0 -2
- package/dist/composables/drag-n-drop/useDraggable.d.ts.map +0 -1
- package/dist/plugins/drag-n-drop/draggable.d.ts +0 -4
- package/dist/plugins/drag-n-drop/draggable.d.ts.map +0 -1
- package/dist/plugins/drag-n-drop/droppable.d.ts +0 -4
- package/dist/plugins/drag-n-drop/droppable.d.ts.map +0 -1
- package/dist/plugins/drag-n-drop/index.d.ts +0 -5
- package/dist/plugins/drag-n-drop/index.d.ts.map +0 -1
- package/dist/plugins/drag-n-drop/useDraggable.d.ts +0 -8
- package/dist/plugins/drag-n-drop/useDraggable.d.ts.map +0 -1
- package/dist/plugins/drag-n-drop/useDroppable.d.ts +0 -7
- package/dist/plugins/drag-n-drop/useDroppable.d.ts.map +0 -1
- package/dist/types/materialIcon.d.ts +0 -2
- package/dist/types/materialIcon.d.ts.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -7553,10 +7553,9 @@ async function convertValueToCoords(state2, options) {
|
|
|
7553
7553
|
crossAxis: 0,
|
|
7554
7554
|
alignmentAxis: null
|
|
7555
7555
|
} : {
|
|
7556
|
-
mainAxis: 0,
|
|
7557
|
-
crossAxis: 0,
|
|
7558
|
-
alignmentAxis:
|
|
7559
|
-
...rawValue
|
|
7556
|
+
mainAxis: rawValue.mainAxis || 0,
|
|
7557
|
+
crossAxis: rawValue.crossAxis || 0,
|
|
7558
|
+
alignmentAxis: rawValue.alignmentAxis
|
|
7560
7559
|
};
|
|
7561
7560
|
if (alignment && typeof alignmentAxis === "number") {
|
|
7562
7561
|
crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
|
|
@@ -7661,7 +7660,11 @@ const shift$1 = function(options) {
|
|
|
7661
7660
|
...limitedCoords,
|
|
7662
7661
|
data: {
|
|
7663
7662
|
x: limitedCoords.x - x2,
|
|
7664
|
-
y: limitedCoords.y - y2
|
|
7663
|
+
y: limitedCoords.y - y2,
|
|
7664
|
+
enabled: {
|
|
7665
|
+
[mainAxis]: checkMainAxis,
|
|
7666
|
+
[crossAxis]: checkCrossAxis
|
|
7667
|
+
}
|
|
7665
7668
|
}
|
|
7666
7669
|
};
|
|
7667
7670
|
}
|
|
@@ -7675,6 +7678,7 @@ const size = function(options) {
|
|
|
7675
7678
|
name: "size",
|
|
7676
7679
|
options,
|
|
7677
7680
|
async fn(state2) {
|
|
7681
|
+
var _state$middlewareData, _state$middlewareData2;
|
|
7678
7682
|
const {
|
|
7679
7683
|
placement,
|
|
7680
7684
|
rects,
|
|
@@ -7710,10 +7714,11 @@ const size = function(options) {
|
|
|
7710
7714
|
const noShift = !state2.middlewareData.shift;
|
|
7711
7715
|
let availableHeight = overflowAvailableHeight;
|
|
7712
7716
|
let availableWidth = overflowAvailableWidth;
|
|
7713
|
-
if (
|
|
7714
|
-
availableWidth =
|
|
7715
|
-
}
|
|
7716
|
-
|
|
7717
|
+
if ((_state$middlewareData = state2.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
|
|
7718
|
+
availableWidth = maximumClippingWidth;
|
|
7719
|
+
}
|
|
7720
|
+
if ((_state$middlewareData2 = state2.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
|
|
7721
|
+
availableHeight = maximumClippingHeight;
|
|
7717
7722
|
}
|
|
7718
7723
|
if (noShift && !alignment) {
|
|
7719
7724
|
const xMin = max$1(overflow.left, 0);
|
|
@@ -18843,7 +18848,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
18843
18848
|
const _directive_lightbox = resolveDirective("lightbox");
|
|
18844
18849
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
18845
18850
|
return openBlock(), createElementBlock("div", _hoisted_1$v, [
|
|
18846
|
-
createElementVNode("label", null, toDisplayString(_ctx.label)
|
|
18851
|
+
createElementVNode("label", null, toDisplayString(_ctx.label), 1),
|
|
18847
18852
|
unref(theme) === "basic" ? (openBlock(), createBlock(unref(_sfc_main$R), {
|
|
18848
18853
|
key: 0,
|
|
18849
18854
|
outline: "",
|
|
@@ -19054,7 +19059,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
19054
19059
|
};
|
|
19055
19060
|
}
|
|
19056
19061
|
});
|
|
19057
|
-
const $el = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-
|
|
19062
|
+
const $el = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-6ce2a678"]]);
|
|
19058
19063
|
const _hoisted_1$u = ["title"];
|
|
19059
19064
|
const _hoisted_2$k = { key: 0 };
|
|
19060
19065
|
const _hoisted_3$g = ["value", "placeholder"];
|
|
@@ -20635,6 +20640,12 @@ let Node$2 = class Node2 {
|
|
|
20635
20640
|
this.content = content || Fragment.empty;
|
|
20636
20641
|
}
|
|
20637
20642
|
/**
|
|
20643
|
+
The array of this node's child nodes.
|
|
20644
|
+
*/
|
|
20645
|
+
get children() {
|
|
20646
|
+
return this.content.content;
|
|
20647
|
+
}
|
|
20648
|
+
/**
|
|
20638
20649
|
The size of this node, as defined by the integer-based [indexing
|
|
20639
20650
|
scheme](/docs/guide/#doc.indexing). For text nodes, this is the
|
|
20640
20651
|
amount of characters. For other leaf nodes, it is one. For
|
|
@@ -21321,7 +21332,7 @@ function resolveName(stream, name) {
|
|
|
21321
21332
|
let result2 = [];
|
|
21322
21333
|
for (let typeName in types) {
|
|
21323
21334
|
let type4 = types[typeName];
|
|
21324
|
-
if (type4.
|
|
21335
|
+
if (type4.isInGroup(name))
|
|
21325
21336
|
result2.push(type4);
|
|
21326
21337
|
}
|
|
21327
21338
|
if (result2.length == 0)
|
|
@@ -21559,6 +21570,13 @@ let NodeType$1 = class NodeType2 {
|
|
|
21559
21570
|
return this.isLeaf || !!this.spec.atom;
|
|
21560
21571
|
}
|
|
21561
21572
|
/**
|
|
21573
|
+
Return true when this node type is part of the given
|
|
21574
|
+
[group](https://prosemirror.net/docs/ref/#model.NodeSpec.group).
|
|
21575
|
+
*/
|
|
21576
|
+
isInGroup(group) {
|
|
21577
|
+
return this.groups.indexOf(group) > -1;
|
|
21578
|
+
}
|
|
21579
|
+
/**
|
|
21562
21580
|
The node type's [whitespace](https://prosemirror.net/docs/ref/#model.NodeSpec.whitespace) option.
|
|
21563
21581
|
*/
|
|
21564
21582
|
get whitespace() {
|
|
@@ -22314,6 +22332,7 @@ class ParseContext {
|
|
|
22314
22332
|
contentDOM = rule.contentElement;
|
|
22315
22333
|
this.findAround(dom, contentDOM, true);
|
|
22316
22334
|
this.addAll(contentDOM, marks);
|
|
22335
|
+
this.findAround(dom, contentDOM, false);
|
|
22317
22336
|
}
|
|
22318
22337
|
if (sync && this.sync(startIn))
|
|
22319
22338
|
this.open--;
|
|
@@ -22489,7 +22508,7 @@ class ParseContext {
|
|
|
22489
22508
|
return false;
|
|
22490
22509
|
} else {
|
|
22491
22510
|
let next = depth > 0 || depth == 0 && useRoot ? this.nodes[depth].type : option2 && depth >= minDepth ? option2.node(depth - minDepth).type : null;
|
|
22492
|
-
if (!next || next.name != part && next.
|
|
22511
|
+
if (!next || next.name != part && !next.isInGroup(part))
|
|
22493
22512
|
return false;
|
|
22494
22513
|
depth--;
|
|
22495
22514
|
}
|
|
@@ -23749,8 +23768,24 @@ function canJoin(doc2, pos) {
|
|
|
23749
23768
|
let $pos = doc2.resolve(pos), index2 = $pos.index();
|
|
23750
23769
|
return joinable($pos.nodeBefore, $pos.nodeAfter) && $pos.parent.canReplace(index2, index2 + 1);
|
|
23751
23770
|
}
|
|
23771
|
+
function canAppendWithSubstitutedLinebreaks(a2, b2) {
|
|
23772
|
+
if (!b2.content.size)
|
|
23773
|
+
a2.type.compatibleContent(b2.type);
|
|
23774
|
+
let match2 = a2.contentMatchAt(a2.childCount);
|
|
23775
|
+
let { linebreakReplacement } = a2.type.schema;
|
|
23776
|
+
for (let i2 = 0; i2 < b2.childCount; i2++) {
|
|
23777
|
+
let child = b2.child(i2);
|
|
23778
|
+
let type3 = child.type == linebreakReplacement ? a2.type.schema.nodes.text : child.type;
|
|
23779
|
+
match2 = match2.matchType(type3);
|
|
23780
|
+
if (!match2)
|
|
23781
|
+
return false;
|
|
23782
|
+
if (!a2.type.allowsMarks(child.marks))
|
|
23783
|
+
return false;
|
|
23784
|
+
}
|
|
23785
|
+
return match2.validEnd;
|
|
23786
|
+
}
|
|
23752
23787
|
function joinable(a2, b2) {
|
|
23753
|
-
return !!(a2 && b2 && !a2.isLeaf && a2
|
|
23788
|
+
return !!(a2 && b2 && !a2.isLeaf && canAppendWithSubstitutedLinebreaks(a2, b2));
|
|
23754
23789
|
}
|
|
23755
23790
|
function joinPoint(doc2, pos, dir = -1) {
|
|
23756
23791
|
let $pos = doc2.resolve(pos);
|
|
@@ -23775,8 +23810,31 @@ function joinPoint(doc2, pos, dir = -1) {
|
|
|
23775
23810
|
}
|
|
23776
23811
|
}
|
|
23777
23812
|
function join(tr2, pos, depth) {
|
|
23778
|
-
let
|
|
23779
|
-
tr2.
|
|
23813
|
+
let convertNewlines = null;
|
|
23814
|
+
let { linebreakReplacement } = tr2.doc.type.schema;
|
|
23815
|
+
let $before = tr2.doc.resolve(pos - depth), beforeType = $before.node().type;
|
|
23816
|
+
if (linebreakReplacement && beforeType.inlineContent) {
|
|
23817
|
+
let pre = beforeType.whitespace == "pre";
|
|
23818
|
+
let supportLinebreak = !!beforeType.contentMatch.matchType(linebreakReplacement);
|
|
23819
|
+
if (pre && !supportLinebreak)
|
|
23820
|
+
convertNewlines = false;
|
|
23821
|
+
else if (!pre && supportLinebreak)
|
|
23822
|
+
convertNewlines = true;
|
|
23823
|
+
}
|
|
23824
|
+
let mapFrom = tr2.steps.length;
|
|
23825
|
+
if (convertNewlines === false) {
|
|
23826
|
+
let $after = tr2.doc.resolve(pos + depth);
|
|
23827
|
+
replaceLinebreaks(tr2, $after.node(), $after.before(), mapFrom);
|
|
23828
|
+
}
|
|
23829
|
+
if (beforeType.inlineContent)
|
|
23830
|
+
clearIncompatible(tr2, pos + depth - 1, beforeType, $before.node().contentMatchAt($before.index()), convertNewlines == null);
|
|
23831
|
+
let mapping = tr2.mapping.slice(mapFrom), start2 = mapping.map(pos - depth);
|
|
23832
|
+
tr2.step(new ReplaceStep(start2, mapping.map(pos + depth, -1), Slice.empty, true));
|
|
23833
|
+
if (convertNewlines === true) {
|
|
23834
|
+
let $full = tr2.doc.resolve(start2);
|
|
23835
|
+
replaceNewlines(tr2, $full.node(), $full.before(), tr2.steps.length);
|
|
23836
|
+
}
|
|
23837
|
+
return tr2;
|
|
23780
23838
|
}
|
|
23781
23839
|
function insertPoint(doc2, pos, nodeType) {
|
|
23782
23840
|
let $pos = doc2.resolve(pos);
|
|
@@ -24172,7 +24230,7 @@ function deleteRange$1(tr2, from2, to2) {
|
|
|
24172
24230
|
return tr2.delete($from.before(depth), $to.after(depth));
|
|
24173
24231
|
}
|
|
24174
24232
|
for (let d2 = 1; d2 <= $from.depth && d2 <= $to.depth; d2++) {
|
|
24175
|
-
if (from2 - $from.start(d2) == $from.depth - d2 && to2 > $from.end(d2) && $to.end(d2) - to2 != $to.depth - d2)
|
|
24233
|
+
if (from2 - $from.start(d2) == $from.depth - d2 && to2 > $from.end(d2) && $to.end(d2) - to2 != $to.depth - d2 && $from.start(d2 - 1) == $to.start(d2 - 1) && $from.node(d2 - 1).canReplace($from.index(d2 - 1), $to.index(d2 - 1)))
|
|
24176
24234
|
return tr2.delete($from.before(d2), to2);
|
|
24177
24235
|
}
|
|
24178
24236
|
tr2.delete(from2, to2);
|
|
@@ -26326,17 +26384,18 @@ class ViewDesc {
|
|
|
26326
26384
|
// custom things with the selection. Note that this falls apart when
|
|
26327
26385
|
// a selection starts in such a node and ends in another, in which
|
|
26328
26386
|
// case we just use whatever domFromPos produces as a best effort.
|
|
26329
|
-
setSelection(anchor, head,
|
|
26387
|
+
setSelection(anchor, head, view, force = false) {
|
|
26330
26388
|
let from2 = Math.min(anchor, head), to2 = Math.max(anchor, head);
|
|
26331
26389
|
for (let i2 = 0, offset2 = 0; i2 < this.children.length; i2++) {
|
|
26332
26390
|
let child = this.children[i2], end2 = offset2 + child.size;
|
|
26333
26391
|
if (from2 > offset2 && to2 < end2)
|
|
26334
|
-
return child.setSelection(anchor - offset2 - child.border, head - offset2 - child.border,
|
|
26392
|
+
return child.setSelection(anchor - offset2 - child.border, head - offset2 - child.border, view, force);
|
|
26335
26393
|
offset2 = end2;
|
|
26336
26394
|
}
|
|
26337
26395
|
let anchorDOM = this.domFromPos(anchor, anchor ? -1 : 1);
|
|
26338
26396
|
let headDOM = head == anchor ? anchorDOM : this.domFromPos(head, head ? -1 : 1);
|
|
26339
|
-
let domSel =
|
|
26397
|
+
let domSel = view.root.getSelection();
|
|
26398
|
+
let selRange = view.domSelectionRange();
|
|
26340
26399
|
let brKludge = false;
|
|
26341
26400
|
if ((gecko || safari) && anchor == head) {
|
|
26342
26401
|
let { node, offset: offset2 } = anchorDOM;
|
|
@@ -26359,12 +26418,12 @@ class ViewDesc {
|
|
|
26359
26418
|
brKludge = prev && (prev.nodeName == "BR" || prev.contentEditable == "false");
|
|
26360
26419
|
}
|
|
26361
26420
|
}
|
|
26362
|
-
if (gecko &&
|
|
26363
|
-
let after =
|
|
26421
|
+
if (gecko && selRange.focusNode && selRange.focusNode != headDOM.node && selRange.focusNode.nodeType == 1) {
|
|
26422
|
+
let after = selRange.focusNode.childNodes[selRange.focusOffset];
|
|
26364
26423
|
if (after && after.contentEditable == "false")
|
|
26365
26424
|
force = true;
|
|
26366
26425
|
}
|
|
26367
|
-
if (!(force || brKludge && safari) && isEquivalentPosition(anchorDOM.node, anchorDOM.offset,
|
|
26426
|
+
if (!(force || brKludge && safari) && isEquivalentPosition(anchorDOM.node, anchorDOM.offset, selRange.anchorNode, selRange.anchorOffset) && isEquivalentPosition(headDOM.node, headDOM.offset, selRange.focusNode, selRange.focusOffset))
|
|
26368
26427
|
return;
|
|
26369
26428
|
let domSelExtended = false;
|
|
26370
26429
|
if ((domSel.extend || anchor == head) && !brKludge) {
|
|
@@ -26505,16 +26564,17 @@ class CompositionViewDesc extends ViewDesc {
|
|
|
26505
26564
|
}
|
|
26506
26565
|
}
|
|
26507
26566
|
class MarkViewDesc extends ViewDesc {
|
|
26508
|
-
constructor(parent, mark, dom, contentDOM) {
|
|
26567
|
+
constructor(parent, mark, dom, contentDOM, spec) {
|
|
26509
26568
|
super(parent, [], dom, contentDOM);
|
|
26510
26569
|
this.mark = mark;
|
|
26570
|
+
this.spec = spec;
|
|
26511
26571
|
}
|
|
26512
26572
|
static create(parent, mark, inline, view) {
|
|
26513
26573
|
let custom2 = view.nodeViews[mark.type.name];
|
|
26514
26574
|
let spec = custom2 && custom2(mark, view, inline);
|
|
26515
26575
|
if (!spec || !spec.dom)
|
|
26516
26576
|
spec = DOMSerializer.renderSpec(document, mark.type.spec.toDOM(mark, inline), null, mark.attrs);
|
|
26517
|
-
return new MarkViewDesc(parent, mark, spec.dom, spec.contentDOM || spec.dom);
|
|
26577
|
+
return new MarkViewDesc(parent, mark, spec.dom, spec.contentDOM || spec.dom, spec);
|
|
26518
26578
|
}
|
|
26519
26579
|
parseRule() {
|
|
26520
26580
|
if (this.dirty & NODE_DIRTY || this.mark.type.spec.reparseInView)
|
|
@@ -26547,6 +26607,14 @@ class MarkViewDesc extends ViewDesc {
|
|
|
26547
26607
|
copy2.children = nodes;
|
|
26548
26608
|
return copy2;
|
|
26549
26609
|
}
|
|
26610
|
+
ignoreMutation(mutation) {
|
|
26611
|
+
return this.spec.ignoreMutation ? this.spec.ignoreMutation(mutation) : super.ignoreMutation(mutation);
|
|
26612
|
+
}
|
|
26613
|
+
destroy() {
|
|
26614
|
+
if (this.spec.destroy)
|
|
26615
|
+
this.spec.destroy();
|
|
26616
|
+
super.destroy();
|
|
26617
|
+
}
|
|
26550
26618
|
}
|
|
26551
26619
|
class NodeViewDesc extends ViewDesc {
|
|
26552
26620
|
constructor(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos) {
|
|
@@ -26838,7 +26906,7 @@ class CustomNodeViewDesc extends NodeViewDesc {
|
|
|
26838
26906
|
update(node, outerDeco, innerDeco, view) {
|
|
26839
26907
|
if (this.dirty == NODE_DIRTY)
|
|
26840
26908
|
return false;
|
|
26841
|
-
if (this.spec.update) {
|
|
26909
|
+
if (this.spec.update && (this.node.type == node.type || this.spec.multiType)) {
|
|
26842
26910
|
let result2 = this.spec.update(node, outerDeco, innerDeco);
|
|
26843
26911
|
if (result2)
|
|
26844
26912
|
this.updateInner(node, outerDeco, innerDeco, view);
|
|
@@ -26855,8 +26923,8 @@ class CustomNodeViewDesc extends NodeViewDesc {
|
|
|
26855
26923
|
deselectNode() {
|
|
26856
26924
|
this.spec.deselectNode ? this.spec.deselectNode() : super.deselectNode();
|
|
26857
26925
|
}
|
|
26858
|
-
setSelection(anchor, head,
|
|
26859
|
-
this.spec.setSelection ? this.spec.setSelection(anchor, head,
|
|
26926
|
+
setSelection(anchor, head, view, force) {
|
|
26927
|
+
this.spec.setSelection ? this.spec.setSelection(anchor, head, view.root) : super.setSelection(anchor, head, view, force);
|
|
26860
26928
|
}
|
|
26861
26929
|
destroy() {
|
|
26862
26930
|
if (this.spec.destroy)
|
|
@@ -27443,7 +27511,7 @@ function selectionToDOM(view, force = false) {
|
|
|
27443
27511
|
if (!sel.empty && !sel.$from.parent.inlineContent)
|
|
27444
27512
|
resetEditableTo = temporarilyEditableNear(view, sel.to);
|
|
27445
27513
|
}
|
|
27446
|
-
view.docView.setSelection(anchor, head, view
|
|
27514
|
+
view.docView.setSelection(anchor, head, view, force);
|
|
27447
27515
|
if (brokenSelectBetweenUneditable) {
|
|
27448
27516
|
if (resetEditableFrom)
|
|
27449
27517
|
resetEditable(resetEditableFrom);
|
|
@@ -28079,11 +28147,14 @@ let _detachedDoc = null;
|
|
|
28079
28147
|
function detachedDoc() {
|
|
28080
28148
|
return _detachedDoc || (_detachedDoc = document.implementation.createHTMLDocument("title"));
|
|
28081
28149
|
}
|
|
28150
|
+
let _policy = null;
|
|
28082
28151
|
function maybeWrapTrusted(html) {
|
|
28083
28152
|
let trustedTypes = window.trustedTypes;
|
|
28084
28153
|
if (!trustedTypes)
|
|
28085
28154
|
return html;
|
|
28086
|
-
|
|
28155
|
+
if (!_policy)
|
|
28156
|
+
_policy = trustedTypes.createPolicy("ProseMirrorClipboard", { createHTML: (s2) => s2 });
|
|
28157
|
+
return _policy.createHTML(html);
|
|
28087
28158
|
}
|
|
28088
28159
|
function readHTML(html) {
|
|
28089
28160
|
let metas = /^(\s*<meta [^>]*>)*/.exec(html);
|
|
@@ -28215,9 +28286,7 @@ editHandlers.keydown = (view, _event) => {
|
|
|
28215
28286
|
view.input.lastKeyCodeTime = Date.now();
|
|
28216
28287
|
if (android && chrome && event.keyCode == 13)
|
|
28217
28288
|
return;
|
|
28218
|
-
if (
|
|
28219
|
-
view.domObserver.flush();
|
|
28220
|
-
else if (event.keyCode != 229)
|
|
28289
|
+
if (event.keyCode != 229)
|
|
28221
28290
|
view.domObserver.forceFlush();
|
|
28222
28291
|
if (ios && event.keyCode == 13 && !event.ctrlKey && !event.altKey && !event.metaKey) {
|
|
28223
28292
|
let now = Date.now();
|
|
@@ -29595,9 +29664,6 @@ class DOMObserver {
|
|
|
29595
29664
|
this.queue.push(mut);
|
|
29596
29665
|
return this.queue;
|
|
29597
29666
|
}
|
|
29598
|
-
selectionChanged(sel) {
|
|
29599
|
-
return !this.suppressingSelectionUpdates && !this.currentSelection.eq(sel) && hasFocusAndSelection(this.view) && !this.ignoreSelectionChange(sel);
|
|
29600
|
-
}
|
|
29601
29667
|
flush() {
|
|
29602
29668
|
let { view } = this;
|
|
29603
29669
|
if (!view.docView || this.flushingSoon > -1)
|
|
@@ -29605,7 +29671,8 @@ class DOMObserver {
|
|
|
29605
29671
|
let mutations = this.pendingRecords();
|
|
29606
29672
|
if (mutations.length)
|
|
29607
29673
|
this.queue = [];
|
|
29608
|
-
let sel = view.domSelectionRange()
|
|
29674
|
+
let sel = view.domSelectionRange();
|
|
29675
|
+
let newSel = !this.suppressingSelectionUpdates && !this.currentSelection.eq(sel) && hasFocusAndSelection(view) && !this.ignoreSelectionChange(sel);
|
|
29609
29676
|
let from2 = -1, to2 = -1, typeOver = false, added = [];
|
|
29610
29677
|
if (view.editable) {
|
|
29611
29678
|
for (let i2 = 0; i2 < mutations.length; i2++) {
|
|
@@ -31045,7 +31112,7 @@ function joinMaybeClear(state2, $pos, dispatch) {
|
|
|
31045
31112
|
if (!$pos.parent.canReplace(index2, index2 + 1) || !(after.isTextblock || canJoin(state2.doc, $pos.pos)))
|
|
31046
31113
|
return false;
|
|
31047
31114
|
if (dispatch)
|
|
31048
|
-
dispatch(state2.tr.
|
|
31115
|
+
dispatch(state2.tr.join($pos.pos).scrollIntoView());
|
|
31049
31116
|
return true;
|
|
31050
31117
|
}
|
|
31051
31118
|
function deleteBarrier(state2, $cut, dispatch, dir) {
|
|
@@ -31061,9 +31128,9 @@ function deleteBarrier(state2, $cut, dispatch, dir) {
|
|
|
31061
31128
|
wrap2 = Fragment.from(conn[i2].create(null, wrap2));
|
|
31062
31129
|
wrap2 = Fragment.from(before.copy(wrap2));
|
|
31063
31130
|
let tr2 = state2.tr.step(new ReplaceAroundStep($cut.pos - 1, end2, $cut.pos, end2, new Slice(wrap2, 1, 0), conn.length, true));
|
|
31064
|
-
let joinAt = end2 + 2 * conn.length;
|
|
31065
|
-
if (canJoin(tr2.doc, joinAt))
|
|
31066
|
-
tr2.join(joinAt);
|
|
31131
|
+
let $joinAt = tr2.doc.resolve(end2 + 2 * conn.length);
|
|
31132
|
+
if ($joinAt.nodeAfter && $joinAt.nodeAfter.type == before.type && canJoin(tr2.doc, $joinAt.pos))
|
|
31133
|
+
tr2.join($joinAt.pos);
|
|
31067
31134
|
dispatch(tr2.scrollIntoView());
|
|
31068
31135
|
}
|
|
31069
31136
|
return true;
|
|
@@ -31428,6 +31495,13 @@ class EventEmitter {
|
|
|
31428
31495
|
}
|
|
31429
31496
|
return this;
|
|
31430
31497
|
}
|
|
31498
|
+
once(event, fn3) {
|
|
31499
|
+
const onceFn = (...args) => {
|
|
31500
|
+
this.off(event, onceFn);
|
|
31501
|
+
fn3.apply(this, args);
|
|
31502
|
+
};
|
|
31503
|
+
return this.on(event, onceFn);
|
|
31504
|
+
}
|
|
31431
31505
|
removeAllListeners() {
|
|
31432
31506
|
this.callbacks = {};
|
|
31433
31507
|
}
|
|
@@ -31675,6 +31749,7 @@ function getSchemaByResolvedExtensions(extensions, editor) {
|
|
|
31675
31749
|
draggable: callOrReturn(getExtensionField(extension, "draggable", context)),
|
|
31676
31750
|
code: callOrReturn(getExtensionField(extension, "code", context)),
|
|
31677
31751
|
whitespace: callOrReturn(getExtensionField(extension, "whitespace", context)),
|
|
31752
|
+
linebreakReplacement: callOrReturn(getExtensionField(extension, "linebreakReplacement", context)),
|
|
31678
31753
|
defining: callOrReturn(getExtensionField(extension, "defining", context)),
|
|
31679
31754
|
isolating: callOrReturn(getExtensionField(extension, "isolating", context)),
|
|
31680
31755
|
attrs: Object.fromEntries(extensionAttributes.map((extensionAttribute) => {
|
|
@@ -31757,6 +31832,13 @@ function isExtensionRulesEnabled(extension, enabled) {
|
|
|
31757
31832
|
}
|
|
31758
31833
|
return enabled;
|
|
31759
31834
|
}
|
|
31835
|
+
function getHTMLFromFragment(fragment, schema) {
|
|
31836
|
+
const documentFragment = DOMSerializer.fromSchema(schema).serializeFragment(fragment);
|
|
31837
|
+
const temporaryDocument = document.implementation.createHTMLDocument();
|
|
31838
|
+
const container = temporaryDocument.createElement("div");
|
|
31839
|
+
container.appendChild(documentFragment);
|
|
31840
|
+
return container.innerHTML;
|
|
31841
|
+
}
|
|
31760
31842
|
const getTextContentFromNodes = ($from, maxMatch = 500) => {
|
|
31761
31843
|
let textBefore = "";
|
|
31762
31844
|
const sliceEndPos = $from.parentOffset;
|
|
@@ -31867,7 +31949,7 @@ function inputRulesPlugin(props2) {
|
|
|
31867
31949
|
init() {
|
|
31868
31950
|
return null;
|
|
31869
31951
|
},
|
|
31870
|
-
apply(tr2, prev) {
|
|
31952
|
+
apply(tr2, prev, state2) {
|
|
31871
31953
|
const stored = tr2.getMeta(plugin);
|
|
31872
31954
|
if (stored) {
|
|
31873
31955
|
return stored;
|
|
@@ -31876,7 +31958,13 @@ function inputRulesPlugin(props2) {
|
|
|
31876
31958
|
const isSimulatedInput = !!simulatedInputMeta;
|
|
31877
31959
|
if (isSimulatedInput) {
|
|
31878
31960
|
setTimeout(() => {
|
|
31879
|
-
|
|
31961
|
+
let { text } = simulatedInputMeta;
|
|
31962
|
+
if (typeof text === "string") {
|
|
31963
|
+
text = text;
|
|
31964
|
+
} else {
|
|
31965
|
+
text = getHTMLFromFragment(Fragment.from(text), state2.schema);
|
|
31966
|
+
}
|
|
31967
|
+
const { from: from2 } = simulatedInputMeta;
|
|
31880
31968
|
const to2 = from2 + text.length;
|
|
31881
31969
|
run$1({
|
|
31882
31970
|
editor,
|
|
@@ -31945,6 +32033,109 @@ function inputRulesPlugin(props2) {
|
|
|
31945
32033
|
});
|
|
31946
32034
|
return plugin;
|
|
31947
32035
|
}
|
|
32036
|
+
function getType$1(value) {
|
|
32037
|
+
return Object.prototype.toString.call(value).slice(8, -1);
|
|
32038
|
+
}
|
|
32039
|
+
function isPlainObject$1(value) {
|
|
32040
|
+
if (getType$1(value) !== "Object") {
|
|
32041
|
+
return false;
|
|
32042
|
+
}
|
|
32043
|
+
return value.constructor === Object && Object.getPrototypeOf(value) === Object.prototype;
|
|
32044
|
+
}
|
|
32045
|
+
function mergeDeep(target, source) {
|
|
32046
|
+
const output = { ...target };
|
|
32047
|
+
if (isPlainObject$1(target) && isPlainObject$1(source)) {
|
|
32048
|
+
Object.keys(source).forEach((key) => {
|
|
32049
|
+
if (isPlainObject$1(source[key]) && isPlainObject$1(target[key])) {
|
|
32050
|
+
output[key] = mergeDeep(target[key], source[key]);
|
|
32051
|
+
} else {
|
|
32052
|
+
output[key] = source[key];
|
|
32053
|
+
}
|
|
32054
|
+
});
|
|
32055
|
+
}
|
|
32056
|
+
return output;
|
|
32057
|
+
}
|
|
32058
|
+
class Mark {
|
|
32059
|
+
constructor(config = {}) {
|
|
32060
|
+
this.type = "mark";
|
|
32061
|
+
this.name = "mark";
|
|
32062
|
+
this.parent = null;
|
|
32063
|
+
this.child = null;
|
|
32064
|
+
this.config = {
|
|
32065
|
+
name: this.name,
|
|
32066
|
+
defaultOptions: {}
|
|
32067
|
+
};
|
|
32068
|
+
this.config = {
|
|
32069
|
+
...this.config,
|
|
32070
|
+
...config
|
|
32071
|
+
};
|
|
32072
|
+
this.name = this.config.name;
|
|
32073
|
+
if (config.defaultOptions && Object.keys(config.defaultOptions).length > 0) {
|
|
32074
|
+
console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`);
|
|
32075
|
+
}
|
|
32076
|
+
this.options = this.config.defaultOptions;
|
|
32077
|
+
if (this.config.addOptions) {
|
|
32078
|
+
this.options = callOrReturn(getExtensionField(this, "addOptions", {
|
|
32079
|
+
name: this.name
|
|
32080
|
+
}));
|
|
32081
|
+
}
|
|
32082
|
+
this.storage = callOrReturn(getExtensionField(this, "addStorage", {
|
|
32083
|
+
name: this.name,
|
|
32084
|
+
options: this.options
|
|
32085
|
+
})) || {};
|
|
32086
|
+
}
|
|
32087
|
+
static create(config = {}) {
|
|
32088
|
+
return new Mark(config);
|
|
32089
|
+
}
|
|
32090
|
+
configure(options = {}) {
|
|
32091
|
+
const extension = this.extend({
|
|
32092
|
+
...this.config,
|
|
32093
|
+
addOptions: () => {
|
|
32094
|
+
return mergeDeep(this.options, options);
|
|
32095
|
+
}
|
|
32096
|
+
});
|
|
32097
|
+
extension.name = this.name;
|
|
32098
|
+
extension.parent = this.parent;
|
|
32099
|
+
return extension;
|
|
32100
|
+
}
|
|
32101
|
+
extend(extendedConfig = {}) {
|
|
32102
|
+
const extension = new Mark(extendedConfig);
|
|
32103
|
+
extension.parent = this;
|
|
32104
|
+
this.child = extension;
|
|
32105
|
+
extension.name = extendedConfig.name ? extendedConfig.name : extension.parent.name;
|
|
32106
|
+
if (extendedConfig.defaultOptions && Object.keys(extendedConfig.defaultOptions).length > 0) {
|
|
32107
|
+
console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${extension.name}".`);
|
|
32108
|
+
}
|
|
32109
|
+
extension.options = callOrReturn(getExtensionField(extension, "addOptions", {
|
|
32110
|
+
name: extension.name
|
|
32111
|
+
}));
|
|
32112
|
+
extension.storage = callOrReturn(getExtensionField(extension, "addStorage", {
|
|
32113
|
+
name: extension.name,
|
|
32114
|
+
options: extension.options
|
|
32115
|
+
}));
|
|
32116
|
+
return extension;
|
|
32117
|
+
}
|
|
32118
|
+
static handleExit({ editor, mark }) {
|
|
32119
|
+
const { tr: tr2 } = editor.state;
|
|
32120
|
+
const currentPos = editor.state.selection.$from;
|
|
32121
|
+
const isAtEnd = currentPos.pos === currentPos.end();
|
|
32122
|
+
if (isAtEnd) {
|
|
32123
|
+
const currentMarks = currentPos.marks();
|
|
32124
|
+
const isInMark = !!currentMarks.find((m2) => (m2 === null || m2 === void 0 ? void 0 : m2.type.name) === mark.name);
|
|
32125
|
+
if (!isInMark) {
|
|
32126
|
+
return false;
|
|
32127
|
+
}
|
|
32128
|
+
const removeMark2 = currentMarks.find((m2) => (m2 === null || m2 === void 0 ? void 0 : m2.type.name) === mark.name);
|
|
32129
|
+
if (removeMark2) {
|
|
32130
|
+
tr2.removeStoredMark(removeMark2);
|
|
32131
|
+
}
|
|
32132
|
+
tr2.insertText(" ", currentPos.pos);
|
|
32133
|
+
editor.view.dispatch(tr2);
|
|
32134
|
+
return true;
|
|
32135
|
+
}
|
|
32136
|
+
return false;
|
|
32137
|
+
}
|
|
32138
|
+
}
|
|
31948
32139
|
function isNumber$1(value) {
|
|
31949
32140
|
return typeof value === "number";
|
|
31950
32141
|
}
|
|
@@ -32031,7 +32222,12 @@ function pasteRulesPlugin(props2) {
|
|
|
32031
32222
|
let isPastedFromProseMirror = false;
|
|
32032
32223
|
let isDroppedFromProseMirror = false;
|
|
32033
32224
|
let pasteEvent = typeof ClipboardEvent !== "undefined" ? new ClipboardEvent("paste") : null;
|
|
32034
|
-
let dropEvent
|
|
32225
|
+
let dropEvent;
|
|
32226
|
+
try {
|
|
32227
|
+
dropEvent = typeof DragEvent !== "undefined" ? new DragEvent("drop") : null;
|
|
32228
|
+
} catch (e) {
|
|
32229
|
+
dropEvent = null;
|
|
32230
|
+
}
|
|
32035
32231
|
const processEvent = ({ state: state2, from: from2, to: to2, rule, pasteEvt }) => {
|
|
32036
32232
|
const tr2 = state2.tr;
|
|
32037
32233
|
const chainableState = createChainableState({
|
|
@@ -32050,7 +32246,11 @@ function pasteRulesPlugin(props2) {
|
|
|
32050
32246
|
if (!handler || !tr2.steps.length) {
|
|
32051
32247
|
return;
|
|
32052
32248
|
}
|
|
32053
|
-
|
|
32249
|
+
try {
|
|
32250
|
+
dropEvent = typeof DragEvent !== "undefined" ? new DragEvent("drop") : null;
|
|
32251
|
+
} catch (e) {
|
|
32252
|
+
dropEvent = null;
|
|
32253
|
+
}
|
|
32054
32254
|
pasteEvent = typeof ClipboardEvent !== "undefined" ? new ClipboardEvent("paste") : null;
|
|
32055
32255
|
return tr2;
|
|
32056
32256
|
};
|
|
@@ -32095,7 +32295,13 @@ function pasteRulesPlugin(props2) {
|
|
|
32095
32295
|
return;
|
|
32096
32296
|
}
|
|
32097
32297
|
if (isSimulatedPaste) {
|
|
32098
|
-
|
|
32298
|
+
let { text } = simulatedPasteMeta;
|
|
32299
|
+
if (typeof text === "string") {
|
|
32300
|
+
text = text;
|
|
32301
|
+
} else {
|
|
32302
|
+
text = getHTMLFromFragment(Fragment.from(text), state2.schema);
|
|
32303
|
+
}
|
|
32304
|
+
const { from: from3 } = simulatedPasteMeta;
|
|
32099
32305
|
const to3 = from3 + text.length;
|
|
32100
32306
|
const pasteEvt = createClipboardPasteEvent(text);
|
|
32101
32307
|
return processEvent({
|
|
@@ -32369,28 +32575,6 @@ class ExtensionManager {
|
|
|
32369
32575
|
});
|
|
32370
32576
|
}
|
|
32371
32577
|
}
|
|
32372
|
-
function getType$1(value) {
|
|
32373
|
-
return Object.prototype.toString.call(value).slice(8, -1);
|
|
32374
|
-
}
|
|
32375
|
-
function isPlainObject$1(value) {
|
|
32376
|
-
if (getType$1(value) !== "Object") {
|
|
32377
|
-
return false;
|
|
32378
|
-
}
|
|
32379
|
-
return value.constructor === Object && Object.getPrototypeOf(value) === Object.prototype;
|
|
32380
|
-
}
|
|
32381
|
-
function mergeDeep(target, source) {
|
|
32382
|
-
const output = { ...target };
|
|
32383
|
-
if (isPlainObject$1(target) && isPlainObject$1(source)) {
|
|
32384
|
-
Object.keys(source).forEach((key) => {
|
|
32385
|
-
if (isPlainObject$1(source[key]) && isPlainObject$1(target[key])) {
|
|
32386
|
-
output[key] = mergeDeep(target[key], source[key]);
|
|
32387
|
-
} else {
|
|
32388
|
-
output[key] = source[key];
|
|
32389
|
-
}
|
|
32390
|
-
});
|
|
32391
|
-
}
|
|
32392
|
-
return output;
|
|
32393
|
-
}
|
|
32394
32578
|
class Extension {
|
|
32395
32579
|
constructor(config = {}) {
|
|
32396
32580
|
this.type = "extension";
|
|
@@ -32641,23 +32825,29 @@ function objectIncludes(object1, object2, options = { strict: true }) {
|
|
|
32641
32825
|
}
|
|
32642
32826
|
function findMarkInSet(marks, type3, attributes = {}) {
|
|
32643
32827
|
return marks.find((item) => {
|
|
32644
|
-
return item.type === type3 && objectIncludes(
|
|
32828
|
+
return item.type === type3 && objectIncludes(
|
|
32829
|
+
// Only check equality for the attributes that are provided
|
|
32830
|
+
Object.fromEntries(Object.keys(attributes).map((k2) => [k2, item.attrs[k2]])),
|
|
32831
|
+
attributes
|
|
32832
|
+
);
|
|
32645
32833
|
});
|
|
32646
32834
|
}
|
|
32647
32835
|
function isMarkInSet(marks, type3, attributes = {}) {
|
|
32648
32836
|
return !!findMarkInSet(marks, type3, attributes);
|
|
32649
32837
|
}
|
|
32650
|
-
function getMarkRange($pos, type3, attributes
|
|
32838
|
+
function getMarkRange($pos, type3, attributes) {
|
|
32839
|
+
var _a2;
|
|
32651
32840
|
if (!$pos || !type3) {
|
|
32652
32841
|
return;
|
|
32653
32842
|
}
|
|
32654
32843
|
let start2 = $pos.parent.childAfter($pos.parentOffset);
|
|
32655
|
-
if (
|
|
32844
|
+
if (!start2.node || !start2.node.marks.some((mark2) => mark2.type === type3)) {
|
|
32656
32845
|
start2 = $pos.parent.childBefore($pos.parentOffset);
|
|
32657
32846
|
}
|
|
32658
|
-
if (!start2.node) {
|
|
32847
|
+
if (!start2.node || !start2.node.marks.some((mark2) => mark2.type === type3)) {
|
|
32659
32848
|
return;
|
|
32660
32849
|
}
|
|
32850
|
+
attributes = attributes || ((_a2 = start2.node.marks[0]) === null || _a2 === void 0 ? void 0 : _a2.attrs);
|
|
32661
32851
|
const mark = findMarkInSet([...start2.node.marks], type3, attributes);
|
|
32662
32852
|
if (!mark) {
|
|
32663
32853
|
return;
|
|
@@ -32666,8 +32856,7 @@ function getMarkRange($pos, type3, attributes = {}) {
|
|
|
32666
32856
|
let startPos = $pos.start() + start2.offset;
|
|
32667
32857
|
let endIndex = startIndex + 1;
|
|
32668
32858
|
let endPos = startPos + start2.node.nodeSize;
|
|
32669
|
-
|
|
32670
|
-
while (startIndex > 0 && mark.isInSet($pos.parent.child(startIndex - 1).marks)) {
|
|
32859
|
+
while (startIndex > 0 && isMarkInSet([...$pos.parent.child(startIndex - 1).marks], type3, attributes)) {
|
|
32671
32860
|
startIndex -= 1;
|
|
32672
32861
|
startPos -= $pos.parent.child(startIndex).nodeSize;
|
|
32673
32862
|
}
|
|
@@ -32808,6 +32997,9 @@ function elementFromString(value) {
|
|
|
32808
32997
|
return removeWhitespaces(html);
|
|
32809
32998
|
}
|
|
32810
32999
|
function createNodeFromContent(content, schema, options) {
|
|
33000
|
+
if (content instanceof Node$2 || content instanceof Fragment) {
|
|
33001
|
+
return content;
|
|
33002
|
+
}
|
|
32811
33003
|
options = {
|
|
32812
33004
|
slice: true,
|
|
32813
33005
|
parseOptions: {},
|
|
@@ -32902,7 +33094,7 @@ const insertContentAt = (position, value, options) => ({ tr: tr2, dispatch, edit
|
|
|
32902
33094
|
var _a2;
|
|
32903
33095
|
if (dispatch) {
|
|
32904
33096
|
options = {
|
|
32905
|
-
parseOptions:
|
|
33097
|
+
parseOptions: editor.options.parseOptions,
|
|
32906
33098
|
updateSelection: true,
|
|
32907
33099
|
applyInputRules: false,
|
|
32908
33100
|
applyPasteRules: false,
|
|
@@ -32922,7 +33114,9 @@ const insertContentAt = (position, value, options) => ({ tr: tr2, dispatch, edit
|
|
|
32922
33114
|
editor,
|
|
32923
33115
|
error: e,
|
|
32924
33116
|
disableCollaboration: () => {
|
|
32925
|
-
|
|
33117
|
+
if (editor.storage.collaboration) {
|
|
33118
|
+
editor.storage.collaboration.isDisabled = true;
|
|
33119
|
+
}
|
|
32926
33120
|
}
|
|
32927
33121
|
});
|
|
32928
33122
|
return false;
|
|
@@ -32948,6 +33142,14 @@ const insertContentAt = (position, value, options) => ({ tr: tr2, dispatch, edit
|
|
|
32948
33142
|
if (isOnlyTextContent) {
|
|
32949
33143
|
if (Array.isArray(value)) {
|
|
32950
33144
|
newContent = value.map((v2) => v2.text || "").join("");
|
|
33145
|
+
} else if (value instanceof Fragment) {
|
|
33146
|
+
let text = "";
|
|
33147
|
+
value.forEach((node) => {
|
|
33148
|
+
if (node.text) {
|
|
33149
|
+
text += node.text;
|
|
33150
|
+
}
|
|
33151
|
+
});
|
|
33152
|
+
newContent = text;
|
|
32951
33153
|
} else if (typeof value === "object" && !!value && !!value.text) {
|
|
32952
33154
|
newContent = value.text;
|
|
32953
33155
|
} else {
|
|
@@ -33283,13 +33485,6 @@ function findParentNodeClosestToPos($pos, predicate) {
|
|
|
33283
33485
|
function findParentNode(predicate) {
|
|
33284
33486
|
return (selection) => findParentNodeClosestToPos(selection.$from, predicate);
|
|
33285
33487
|
}
|
|
33286
|
-
function getHTMLFromFragment(fragment, schema) {
|
|
33287
|
-
const documentFragment = DOMSerializer.fromSchema(schema).serializeFragment(fragment);
|
|
33288
|
-
const temporaryDocument = document.implementation.createHTMLDocument();
|
|
33289
|
-
const container = temporaryDocument.createElement("div");
|
|
33290
|
-
container.appendChild(documentFragment);
|
|
33291
|
-
return container.innerHTML;
|
|
33292
|
-
}
|
|
33293
33488
|
function getText(node, options) {
|
|
33294
33489
|
const range2 = {
|
|
33295
33490
|
from: 0,
|
|
@@ -33575,18 +33770,22 @@ const setMeta = (key, value) => ({ tr: tr2 }) => {
|
|
|
33575
33770
|
};
|
|
33576
33771
|
const setNode = (typeOrName, attributes = {}) => ({ state: state2, dispatch, chain }) => {
|
|
33577
33772
|
const type3 = getNodeType(typeOrName, state2.schema);
|
|
33773
|
+
let attributesToCopy;
|
|
33774
|
+
if (state2.selection.$anchor.sameParent(state2.selection.$head)) {
|
|
33775
|
+
attributesToCopy = state2.selection.$anchor.parent.attrs;
|
|
33776
|
+
}
|
|
33578
33777
|
if (!type3.isTextblock) {
|
|
33579
33778
|
console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.');
|
|
33580
33779
|
return false;
|
|
33581
33780
|
}
|
|
33582
33781
|
return chain().command(({ commands: commands2 }) => {
|
|
33583
|
-
const canSetBlock = setBlockType(type3, attributes)(state2);
|
|
33782
|
+
const canSetBlock = setBlockType(type3, { ...attributesToCopy, ...attributes })(state2);
|
|
33584
33783
|
if (canSetBlock) {
|
|
33585
33784
|
return true;
|
|
33586
33785
|
}
|
|
33587
33786
|
return commands2.clearNodes();
|
|
33588
33787
|
}).command(({ state: updatedState }) => {
|
|
33589
|
-
return setBlockType(type3, attributes)(updatedState, dispatch);
|
|
33788
|
+
return setBlockType(type3, { ...attributesToCopy, ...attributes })(updatedState, dispatch);
|
|
33590
33789
|
}).run();
|
|
33591
33790
|
};
|
|
33592
33791
|
const setNodeSelection = (position) => ({ tr: tr2, dispatch }) => {
|
|
@@ -33945,18 +34144,59 @@ const updateAttributes = (typeOrName, attributes = {}) => ({ tr: tr2, state: sta
|
|
|
33945
34144
|
tr2.selection.ranges.forEach((range2) => {
|
|
33946
34145
|
const from2 = range2.$from.pos;
|
|
33947
34146
|
const to2 = range2.$to.pos;
|
|
33948
|
-
|
|
33949
|
-
|
|
33950
|
-
|
|
33951
|
-
|
|
34147
|
+
let lastPos;
|
|
34148
|
+
let lastNode;
|
|
34149
|
+
let trimmedFrom;
|
|
34150
|
+
let trimmedTo;
|
|
34151
|
+
if (tr2.selection.empty) {
|
|
34152
|
+
state2.doc.nodesBetween(from2, to2, (node, pos) => {
|
|
34153
|
+
if (nodeType && nodeType === node.type) {
|
|
34154
|
+
trimmedFrom = Math.max(pos, from2);
|
|
34155
|
+
trimmedTo = Math.min(pos + node.nodeSize, to2);
|
|
34156
|
+
lastPos = pos;
|
|
34157
|
+
lastNode = node;
|
|
34158
|
+
}
|
|
34159
|
+
});
|
|
34160
|
+
} else {
|
|
34161
|
+
state2.doc.nodesBetween(from2, to2, (node, pos) => {
|
|
34162
|
+
if (pos < from2 && nodeType && nodeType === node.type) {
|
|
34163
|
+
trimmedFrom = Math.max(pos, from2);
|
|
34164
|
+
trimmedTo = Math.min(pos + node.nodeSize, to2);
|
|
34165
|
+
lastPos = pos;
|
|
34166
|
+
lastNode = node;
|
|
34167
|
+
}
|
|
34168
|
+
if (pos >= from2 && pos <= to2) {
|
|
34169
|
+
if (nodeType && nodeType === node.type) {
|
|
34170
|
+
tr2.setNodeMarkup(pos, void 0, {
|
|
34171
|
+
...node.attrs,
|
|
34172
|
+
...attributes
|
|
34173
|
+
});
|
|
34174
|
+
}
|
|
34175
|
+
if (markType && node.marks.length) {
|
|
34176
|
+
node.marks.forEach((mark) => {
|
|
34177
|
+
if (markType === mark.type) {
|
|
34178
|
+
const trimmedFrom2 = Math.max(pos, from2);
|
|
34179
|
+
const trimmedTo2 = Math.min(pos + node.nodeSize, to2);
|
|
34180
|
+
tr2.addMark(trimmedFrom2, trimmedTo2, markType.create({
|
|
34181
|
+
...mark.attrs,
|
|
34182
|
+
...attributes
|
|
34183
|
+
}));
|
|
34184
|
+
}
|
|
34185
|
+
});
|
|
34186
|
+
}
|
|
34187
|
+
}
|
|
34188
|
+
});
|
|
34189
|
+
}
|
|
34190
|
+
if (lastNode) {
|
|
34191
|
+
if (lastPos !== void 0) {
|
|
34192
|
+
tr2.setNodeMarkup(lastPos, void 0, {
|
|
34193
|
+
...lastNode.attrs,
|
|
33952
34194
|
...attributes
|
|
33953
34195
|
});
|
|
33954
34196
|
}
|
|
33955
|
-
if (markType &&
|
|
33956
|
-
|
|
34197
|
+
if (markType && lastNode.marks.length) {
|
|
34198
|
+
lastNode.marks.forEach((mark) => {
|
|
33957
34199
|
if (markType === mark.type) {
|
|
33958
|
-
const trimmedFrom = Math.max(pos, from2);
|
|
33959
|
-
const trimmedTo = Math.min(pos + node.nodeSize, to2);
|
|
33960
34200
|
tr2.addMark(trimmedFrom, trimmedTo, markType.create({
|
|
33961
34201
|
...mark.attrs,
|
|
33962
34202
|
...attributes
|
|
@@ -33964,7 +34204,7 @@ const updateAttributes = (typeOrName, attributes = {}) => ({ tr: tr2, state: sta
|
|
|
33964
34204
|
}
|
|
33965
34205
|
});
|
|
33966
34206
|
}
|
|
33967
|
-
}
|
|
34207
|
+
}
|
|
33968
34208
|
});
|
|
33969
34209
|
}
|
|
33970
34210
|
return true;
|
|
@@ -34046,6 +34286,26 @@ const Commands = Extension.create({
|
|
|
34046
34286
|
};
|
|
34047
34287
|
}
|
|
34048
34288
|
});
|
|
34289
|
+
const Drop = Extension.create({
|
|
34290
|
+
name: "drop",
|
|
34291
|
+
addProseMirrorPlugins() {
|
|
34292
|
+
return [
|
|
34293
|
+
new Plugin({
|
|
34294
|
+
key: new PluginKey("tiptapDrop"),
|
|
34295
|
+
props: {
|
|
34296
|
+
handleDrop: (_2, e, slice4, moved2) => {
|
|
34297
|
+
this.editor.emit("drop", {
|
|
34298
|
+
editor: this.editor,
|
|
34299
|
+
event: e,
|
|
34300
|
+
slice: slice4,
|
|
34301
|
+
moved: moved2
|
|
34302
|
+
});
|
|
34303
|
+
}
|
|
34304
|
+
}
|
|
34305
|
+
})
|
|
34306
|
+
];
|
|
34307
|
+
}
|
|
34308
|
+
});
|
|
34049
34309
|
const Editable = Extension.create({
|
|
34050
34310
|
name: "editable",
|
|
34051
34311
|
addProseMirrorPlugins() {
|
|
@@ -34195,6 +34455,25 @@ const Keymap = Extension.create({
|
|
|
34195
34455
|
];
|
|
34196
34456
|
}
|
|
34197
34457
|
});
|
|
34458
|
+
const Paste = Extension.create({
|
|
34459
|
+
name: "paste",
|
|
34460
|
+
addProseMirrorPlugins() {
|
|
34461
|
+
return [
|
|
34462
|
+
new Plugin({
|
|
34463
|
+
key: new PluginKey("tiptapPaste"),
|
|
34464
|
+
props: {
|
|
34465
|
+
handlePaste: (_view, e, slice4) => {
|
|
34466
|
+
this.editor.emit("paste", {
|
|
34467
|
+
editor: this.editor,
|
|
34468
|
+
event: e,
|
|
34469
|
+
slice: slice4
|
|
34470
|
+
});
|
|
34471
|
+
}
|
|
34472
|
+
}
|
|
34473
|
+
})
|
|
34474
|
+
];
|
|
34475
|
+
}
|
|
34476
|
+
});
|
|
34198
34477
|
const Tabindex = Extension.create({
|
|
34199
34478
|
name: "tabindex",
|
|
34200
34479
|
addProseMirrorPlugins() {
|
|
@@ -34302,7 +34581,8 @@ class NodePos {
|
|
|
34302
34581
|
const children2 = [];
|
|
34303
34582
|
this.node.content.forEach((node, offset2) => {
|
|
34304
34583
|
const isBlock = node.isBlock && !node.isTextblock;
|
|
34305
|
-
const
|
|
34584
|
+
const isNonTextAtom = node.isAtom && !node.isText;
|
|
34585
|
+
const targetPos = this.pos + offset2 + (isNonTextAtom ? 0 : 1);
|
|
34306
34586
|
const $pos = this.resolvedPos.doc.resolve(targetPos);
|
|
34307
34587
|
if (!isBlock && $pos.depth <= this.depth) {
|
|
34308
34588
|
return;
|
|
@@ -34371,30 +34651,14 @@ class NodePos {
|
|
|
34371
34651
|
return nodes;
|
|
34372
34652
|
}
|
|
34373
34653
|
setAttribute(attributes) {
|
|
34374
|
-
const
|
|
34375
|
-
|
|
34654
|
+
const { tr: tr2 } = this.editor.state;
|
|
34655
|
+
tr2.setNodeMarkup(this.from, void 0, {
|
|
34656
|
+
...this.node.attrs,
|
|
34657
|
+
...attributes
|
|
34658
|
+
});
|
|
34659
|
+
this.editor.view.dispatch(tr2);
|
|
34376
34660
|
}
|
|
34377
34661
|
}
|
|
34378
|
-
const DropPlugin = (onDrop) => {
|
|
34379
|
-
return new Plugin({
|
|
34380
|
-
key: new PluginKey("tiptapDrop"),
|
|
34381
|
-
props: {
|
|
34382
|
-
handleDrop: (_2, e, slice4, moved2) => {
|
|
34383
|
-
onDrop(e, slice4, moved2);
|
|
34384
|
-
}
|
|
34385
|
-
}
|
|
34386
|
-
});
|
|
34387
|
-
};
|
|
34388
|
-
const PastePlugin = (onPaste) => {
|
|
34389
|
-
return new Plugin({
|
|
34390
|
-
key: new PluginKey("tiptapPaste"),
|
|
34391
|
-
props: {
|
|
34392
|
-
handlePaste: (_view, e, slice4) => {
|
|
34393
|
-
onPaste(e, slice4);
|
|
34394
|
-
}
|
|
34395
|
-
}
|
|
34396
|
-
});
|
|
34397
|
-
};
|
|
34398
34662
|
const style = `.ProseMirror {
|
|
34399
34663
|
position: relative;
|
|
34400
34664
|
}
|
|
@@ -34537,12 +34801,8 @@ let Editor$1 = class Editor2 extends EventEmitter {
|
|
|
34537
34801
|
this.on("focus", this.options.onFocus);
|
|
34538
34802
|
this.on("blur", this.options.onBlur);
|
|
34539
34803
|
this.on("destroy", this.options.onDestroy);
|
|
34540
|
-
|
|
34541
|
-
|
|
34542
|
-
}
|
|
34543
|
-
if (this.options.onDrop) {
|
|
34544
|
-
this.registerPlugin(DropPlugin(this.options.onDrop));
|
|
34545
|
-
}
|
|
34804
|
+
this.on("drop", ({ event, slice: slice4, moved: moved2 }) => this.options.onDrop(event, slice4, moved2));
|
|
34805
|
+
this.on("paste", ({ event, slice: slice4 }) => this.options.onPaste(event, slice4));
|
|
34546
34806
|
window.setTimeout(() => {
|
|
34547
34807
|
if (this.isDestroyed) {
|
|
34548
34808
|
return;
|
|
@@ -34639,17 +34899,24 @@ let Editor$1 = class Editor2 extends EventEmitter {
|
|
|
34639
34899
|
/**
|
|
34640
34900
|
* Unregister a ProseMirror plugin.
|
|
34641
34901
|
*
|
|
34642
|
-
* @param
|
|
34902
|
+
* @param nameOrPluginKeyToRemove The plugins name
|
|
34643
34903
|
* @returns The new editor state or undefined if the editor is destroyed
|
|
34644
34904
|
*/
|
|
34645
|
-
unregisterPlugin(
|
|
34905
|
+
unregisterPlugin(nameOrPluginKeyToRemove) {
|
|
34646
34906
|
if (this.isDestroyed) {
|
|
34647
34907
|
return void 0;
|
|
34648
34908
|
}
|
|
34649
|
-
const
|
|
34909
|
+
const prevPlugins = this.state.plugins;
|
|
34910
|
+
let plugins2 = prevPlugins;
|
|
34911
|
+
[].concat(nameOrPluginKeyToRemove).forEach((nameOrPluginKey) => {
|
|
34912
|
+
const name = typeof nameOrPluginKey === "string" ? `${nameOrPluginKey}$` : nameOrPluginKey.key;
|
|
34913
|
+
plugins2 = prevPlugins.filter((plugin) => !plugin.key.startsWith(name));
|
|
34914
|
+
});
|
|
34915
|
+
if (prevPlugins.length === plugins2.length) {
|
|
34916
|
+
return void 0;
|
|
34917
|
+
}
|
|
34650
34918
|
const state2 = this.state.reconfigure({
|
|
34651
|
-
|
|
34652
|
-
plugins: this.state.plugins.filter((plugin) => !plugin.key.startsWith(name))
|
|
34919
|
+
plugins: plugins2
|
|
34653
34920
|
});
|
|
34654
34921
|
this.view.updateState(state2);
|
|
34655
34922
|
return state2;
|
|
@@ -34667,7 +34934,9 @@ let Editor$1 = class Editor2 extends EventEmitter {
|
|
|
34667
34934
|
Commands,
|
|
34668
34935
|
FocusEvents,
|
|
34669
34936
|
Keymap,
|
|
34670
|
-
Tabindex
|
|
34937
|
+
Tabindex,
|
|
34938
|
+
Drop,
|
|
34939
|
+
Paste
|
|
34671
34940
|
].filter((ext) => {
|
|
34672
34941
|
if (typeof this.options.enableCoreExtensions === "object") {
|
|
34673
34942
|
return this.options.enableCoreExtensions[ext.name] !== false;
|
|
@@ -34697,6 +34966,7 @@ let Editor$1 = class Editor2 extends EventEmitter {
|
|
|
34697
34966
|
* Creates a ProseMirror view.
|
|
34698
34967
|
*/
|
|
34699
34968
|
createView() {
|
|
34969
|
+
var _a2;
|
|
34700
34970
|
let doc2;
|
|
34701
34971
|
try {
|
|
34702
34972
|
doc2 = createDocument(this.options.content, this.schema, this.options.parseOptions, { errorOnInvalidContent: this.options.enableContentCheck });
|
|
@@ -34708,6 +34978,9 @@ let Editor$1 = class Editor2 extends EventEmitter {
|
|
|
34708
34978
|
editor: this,
|
|
34709
34979
|
error: e,
|
|
34710
34980
|
disableCollaboration: () => {
|
|
34981
|
+
if (this.storage.collaboration) {
|
|
34982
|
+
this.storage.collaboration.isDisabled = true;
|
|
34983
|
+
}
|
|
34711
34984
|
this.options.extensions = this.options.extensions.filter((extension) => extension.name !== "collaboration");
|
|
34712
34985
|
this.createExtensionManager();
|
|
34713
34986
|
}
|
|
@@ -34717,6 +34990,11 @@ let Editor$1 = class Editor2 extends EventEmitter {
|
|
|
34717
34990
|
const selection = resolveFocusPosition(doc2, this.options.autofocus);
|
|
34718
34991
|
this.view = new EditorView(this.options.element, {
|
|
34719
34992
|
...this.options.editorProps,
|
|
34993
|
+
attributes: {
|
|
34994
|
+
// add `role="textbox"` to the editor element
|
|
34995
|
+
role: "textbox",
|
|
34996
|
+
...(_a2 = this.options.editorProps) === null || _a2 === void 0 ? void 0 : _a2.attributes
|
|
34997
|
+
},
|
|
34720
34998
|
dispatchTransaction: this.dispatchTransaction.bind(this),
|
|
34721
34999
|
state: EditorState.create({
|
|
34722
35000
|
doc: doc2,
|
|
@@ -35016,87 +35294,6 @@ function wrappingInputRule(config) {
|
|
|
35016
35294
|
}
|
|
35017
35295
|
});
|
|
35018
35296
|
}
|
|
35019
|
-
class Mark {
|
|
35020
|
-
constructor(config = {}) {
|
|
35021
|
-
this.type = "mark";
|
|
35022
|
-
this.name = "mark";
|
|
35023
|
-
this.parent = null;
|
|
35024
|
-
this.child = null;
|
|
35025
|
-
this.config = {
|
|
35026
|
-
name: this.name,
|
|
35027
|
-
defaultOptions: {}
|
|
35028
|
-
};
|
|
35029
|
-
this.config = {
|
|
35030
|
-
...this.config,
|
|
35031
|
-
...config
|
|
35032
|
-
};
|
|
35033
|
-
this.name = this.config.name;
|
|
35034
|
-
if (config.defaultOptions && Object.keys(config.defaultOptions).length > 0) {
|
|
35035
|
-
console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`);
|
|
35036
|
-
}
|
|
35037
|
-
this.options = this.config.defaultOptions;
|
|
35038
|
-
if (this.config.addOptions) {
|
|
35039
|
-
this.options = callOrReturn(getExtensionField(this, "addOptions", {
|
|
35040
|
-
name: this.name
|
|
35041
|
-
}));
|
|
35042
|
-
}
|
|
35043
|
-
this.storage = callOrReturn(getExtensionField(this, "addStorage", {
|
|
35044
|
-
name: this.name,
|
|
35045
|
-
options: this.options
|
|
35046
|
-
})) || {};
|
|
35047
|
-
}
|
|
35048
|
-
static create(config = {}) {
|
|
35049
|
-
return new Mark(config);
|
|
35050
|
-
}
|
|
35051
|
-
configure(options = {}) {
|
|
35052
|
-
const extension = this.extend({
|
|
35053
|
-
...this.config,
|
|
35054
|
-
addOptions: () => {
|
|
35055
|
-
return mergeDeep(this.options, options);
|
|
35056
|
-
}
|
|
35057
|
-
});
|
|
35058
|
-
extension.name = this.name;
|
|
35059
|
-
extension.parent = this.parent;
|
|
35060
|
-
return extension;
|
|
35061
|
-
}
|
|
35062
|
-
extend(extendedConfig = {}) {
|
|
35063
|
-
const extension = new Mark(extendedConfig);
|
|
35064
|
-
extension.parent = this;
|
|
35065
|
-
this.child = extension;
|
|
35066
|
-
extension.name = extendedConfig.name ? extendedConfig.name : extension.parent.name;
|
|
35067
|
-
if (extendedConfig.defaultOptions && Object.keys(extendedConfig.defaultOptions).length > 0) {
|
|
35068
|
-
console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${extension.name}".`);
|
|
35069
|
-
}
|
|
35070
|
-
extension.options = callOrReturn(getExtensionField(extension, "addOptions", {
|
|
35071
|
-
name: extension.name
|
|
35072
|
-
}));
|
|
35073
|
-
extension.storage = callOrReturn(getExtensionField(extension, "addStorage", {
|
|
35074
|
-
name: extension.name,
|
|
35075
|
-
options: extension.options
|
|
35076
|
-
}));
|
|
35077
|
-
return extension;
|
|
35078
|
-
}
|
|
35079
|
-
static handleExit({ editor, mark }) {
|
|
35080
|
-
const { tr: tr2 } = editor.state;
|
|
35081
|
-
const currentPos = editor.state.selection.$from;
|
|
35082
|
-
const isAtEnd = currentPos.pos === currentPos.end();
|
|
35083
|
-
if (isAtEnd) {
|
|
35084
|
-
const currentMarks = currentPos.marks();
|
|
35085
|
-
const isInMark = !!currentMarks.find((m2) => (m2 === null || m2 === void 0 ? void 0 : m2.type.name) === mark.name);
|
|
35086
|
-
if (!isInMark) {
|
|
35087
|
-
return false;
|
|
35088
|
-
}
|
|
35089
|
-
const removeMark2 = currentMarks.find((m2) => (m2 === null || m2 === void 0 ? void 0 : m2.type.name) === mark.name);
|
|
35090
|
-
if (removeMark2) {
|
|
35091
|
-
tr2.removeStoredMark(removeMark2);
|
|
35092
|
-
}
|
|
35093
|
-
tr2.insertText(" ", currentPos.pos);
|
|
35094
|
-
editor.view.dispatch(tr2);
|
|
35095
|
-
return true;
|
|
35096
|
-
}
|
|
35097
|
-
return false;
|
|
35098
|
-
}
|
|
35099
|
-
}
|
|
35100
35297
|
let Node$1 = class Node3 {
|
|
35101
35298
|
constructor(config = {}) {
|
|
35102
35299
|
this.type = "node";
|
|
@@ -35926,7 +36123,7 @@ function drawCellSelection(state2) {
|
|
|
35926
36123
|
return DecorationSet.create(state2.doc, cells);
|
|
35927
36124
|
}
|
|
35928
36125
|
function isCellBoundarySelection({ $from, $to }) {
|
|
35929
|
-
if ($from.pos == $to.pos || $from.pos < $
|
|
36126
|
+
if ($from.pos == $to.pos || $from.pos < $to.pos - 6)
|
|
35930
36127
|
return false;
|
|
35931
36128
|
let afterFrom = $from.pos;
|
|
35932
36129
|
let beforeTo = $to.pos;
|
|
@@ -36089,343 +36286,553 @@ function fixTable(state2, table, tablePos, tr2) {
|
|
|
36089
36286
|
}
|
|
36090
36287
|
return tr2.setMeta(fixTablesKey, { fixTables: true });
|
|
36091
36288
|
}
|
|
36092
|
-
function
|
|
36093
|
-
|
|
36094
|
-
|
|
36095
|
-
|
|
36096
|
-
|
|
36097
|
-
|
|
36098
|
-
|
|
36099
|
-
|
|
36289
|
+
function selectedRect(state2) {
|
|
36290
|
+
const sel = state2.selection;
|
|
36291
|
+
const $pos = selectionCell(state2);
|
|
36292
|
+
const table = $pos.node(-1);
|
|
36293
|
+
const tableStart = $pos.start(-1);
|
|
36294
|
+
const map4 = TableMap.get(table);
|
|
36295
|
+
const rect = sel instanceof CellSelection ? map4.rectBetween(
|
|
36296
|
+
sel.$anchorCell.pos - tableStart,
|
|
36297
|
+
sel.$headCell.pos - tableStart
|
|
36298
|
+
) : map4.findCell($pos.pos - tableStart);
|
|
36299
|
+
return { ...rect, tableStart, map: map4, table };
|
|
36300
|
+
}
|
|
36301
|
+
function addColumn(tr2, { map: map4, tableStart, table }, col) {
|
|
36302
|
+
let refColumn = col > 0 ? -1 : 0;
|
|
36303
|
+
if (columnIsHeader(map4, table, col + refColumn)) {
|
|
36304
|
+
refColumn = col == 0 || col == map4.width ? null : 0;
|
|
36100
36305
|
}
|
|
36101
|
-
|
|
36102
|
-
|
|
36103
|
-
|
|
36104
|
-
|
|
36105
|
-
|
|
36106
|
-
|
|
36107
|
-
|
|
36108
|
-
|
|
36109
|
-
|
|
36110
|
-
|
|
36111
|
-
|
|
36112
|
-
|
|
36113
|
-
|
|
36114
|
-
|
|
36306
|
+
for (let row = 0; row < map4.height; row++) {
|
|
36307
|
+
const index2 = row * map4.width + col;
|
|
36308
|
+
if (col > 0 && col < map4.width && map4.map[index2 - 1] == map4.map[index2]) {
|
|
36309
|
+
const pos = map4.map[index2];
|
|
36310
|
+
const cell = table.nodeAt(pos);
|
|
36311
|
+
tr2.setNodeMarkup(
|
|
36312
|
+
tr2.mapping.map(tableStart + pos),
|
|
36313
|
+
null,
|
|
36314
|
+
addColSpan(cell.attrs, col - map4.colCount(pos))
|
|
36315
|
+
);
|
|
36316
|
+
row += cell.attrs.rowspan - 1;
|
|
36317
|
+
} else {
|
|
36318
|
+
const type3 = refColumn == null ? tableNodeTypes(table.type.schema).cell : table.nodeAt(map4.map[index2 + refColumn]).type;
|
|
36319
|
+
const pos = map4.positionAt(row, col, table);
|
|
36320
|
+
tr2.insert(tr2.mapping.map(tableStart + pos), type3.createAndFill());
|
|
36115
36321
|
}
|
|
36116
|
-
} else if (role == "cell" || role == "header_cell") {
|
|
36117
|
-
rows.push(
|
|
36118
|
-
openStart || openEnd ? fitSlice(
|
|
36119
|
-
tableNodeTypes(schema).row,
|
|
36120
|
-
new Slice(content, openStart, openEnd)
|
|
36121
|
-
).content : content
|
|
36122
|
-
);
|
|
36123
|
-
} else {
|
|
36124
|
-
return null;
|
|
36125
36322
|
}
|
|
36126
|
-
return
|
|
36323
|
+
return tr2;
|
|
36127
36324
|
}
|
|
36128
|
-
function
|
|
36129
|
-
|
|
36130
|
-
|
|
36131
|
-
|
|
36132
|
-
|
|
36133
|
-
|
|
36134
|
-
for (let r2 = i2; r2 < i2 + rowspan; r2++)
|
|
36135
|
-
widths[r2] = (widths[r2] || 0) + colspan;
|
|
36136
|
-
}
|
|
36137
|
-
}
|
|
36138
|
-
let width = 0;
|
|
36139
|
-
for (let r2 = 0; r2 < widths.length; r2++)
|
|
36140
|
-
width = Math.max(width, widths[r2]);
|
|
36141
|
-
for (let r2 = 0; r2 < widths.length; r2++) {
|
|
36142
|
-
if (r2 >= rows.length)
|
|
36143
|
-
rows.push(Fragment.empty);
|
|
36144
|
-
if (widths[r2] < width) {
|
|
36145
|
-
const empty2 = tableNodeTypes(schema).cell.createAndFill();
|
|
36146
|
-
const cells = [];
|
|
36147
|
-
for (let i2 = widths[r2]; i2 < width; i2++) {
|
|
36148
|
-
cells.push(empty2);
|
|
36149
|
-
}
|
|
36150
|
-
rows[r2] = rows[r2].append(Fragment.from(cells));
|
|
36151
|
-
}
|
|
36325
|
+
function addColumnBefore(state2, dispatch) {
|
|
36326
|
+
if (!isInTable(state2))
|
|
36327
|
+
return false;
|
|
36328
|
+
if (dispatch) {
|
|
36329
|
+
const rect = selectedRect(state2);
|
|
36330
|
+
dispatch(addColumn(state2.tr, rect, rect.left));
|
|
36152
36331
|
}
|
|
36153
|
-
return
|
|
36332
|
+
return true;
|
|
36154
36333
|
}
|
|
36155
|
-
function
|
|
36156
|
-
|
|
36157
|
-
|
|
36158
|
-
|
|
36334
|
+
function addColumnAfter(state2, dispatch) {
|
|
36335
|
+
if (!isInTable(state2))
|
|
36336
|
+
return false;
|
|
36337
|
+
if (dispatch) {
|
|
36338
|
+
const rect = selectedRect(state2);
|
|
36339
|
+
dispatch(addColumn(state2.tr, rect, rect.right));
|
|
36340
|
+
}
|
|
36341
|
+
return true;
|
|
36159
36342
|
}
|
|
36160
|
-
function
|
|
36161
|
-
|
|
36162
|
-
|
|
36163
|
-
const
|
|
36164
|
-
|
|
36165
|
-
|
|
36166
|
-
|
|
36167
|
-
|
|
36168
|
-
|
|
36169
|
-
|
|
36170
|
-
|
|
36171
|
-
|
|
36172
|
-
|
|
36173
|
-
|
|
36174
|
-
|
|
36175
|
-
|
|
36176
|
-
);
|
|
36177
|
-
cells.push(cell);
|
|
36178
|
-
col += cell.attrs.colspan;
|
|
36179
|
-
for (let j2 = 1; j2 < cell.attrs.rowspan; j2++)
|
|
36180
|
-
added[row + j2] = (added[row + j2] || 0) + cell.attrs.colspan;
|
|
36181
|
-
}
|
|
36182
|
-
newRows.push(Fragment.from(cells));
|
|
36343
|
+
function removeColumn(tr2, { map: map4, table, tableStart }, col) {
|
|
36344
|
+
const mapStart = tr2.mapping.maps.length;
|
|
36345
|
+
for (let row = 0; row < map4.height; ) {
|
|
36346
|
+
const index2 = row * map4.width + col;
|
|
36347
|
+
const pos = map4.map[index2];
|
|
36348
|
+
const cell = table.nodeAt(pos);
|
|
36349
|
+
const attrs = cell.attrs;
|
|
36350
|
+
if (col > 0 && map4.map[index2 - 1] == pos || col < map4.width - 1 && map4.map[index2 + 1] == pos) {
|
|
36351
|
+
tr2.setNodeMarkup(
|
|
36352
|
+
tr2.mapping.slice(mapStart).map(tableStart + pos),
|
|
36353
|
+
null,
|
|
36354
|
+
removeColSpan(attrs, col - map4.colCount(pos))
|
|
36355
|
+
);
|
|
36356
|
+
} else {
|
|
36357
|
+
const start2 = tr2.mapping.slice(mapStart).map(tableStart + pos);
|
|
36358
|
+
tr2.delete(start2, start2 + cell.nodeSize);
|
|
36183
36359
|
}
|
|
36184
|
-
|
|
36185
|
-
width = newWidth;
|
|
36360
|
+
row += attrs.rowspan;
|
|
36186
36361
|
}
|
|
36187
|
-
|
|
36188
|
-
|
|
36189
|
-
|
|
36190
|
-
|
|
36191
|
-
|
|
36192
|
-
|
|
36193
|
-
|
|
36194
|
-
|
|
36195
|
-
|
|
36196
|
-
|
|
36197
|
-
|
|
36198
|
-
|
|
36199
|
-
|
|
36200
|
-
|
|
36201
|
-
|
|
36362
|
+
}
|
|
36363
|
+
function deleteColumn(state2, dispatch) {
|
|
36364
|
+
if (!isInTable(state2))
|
|
36365
|
+
return false;
|
|
36366
|
+
if (dispatch) {
|
|
36367
|
+
const rect = selectedRect(state2);
|
|
36368
|
+
const tr2 = state2.tr;
|
|
36369
|
+
if (rect.left == 0 && rect.right == rect.map.width)
|
|
36370
|
+
return false;
|
|
36371
|
+
for (let i2 = rect.right - 1; ; i2--) {
|
|
36372
|
+
removeColumn(tr2, rect, i2);
|
|
36373
|
+
if (i2 == rect.left)
|
|
36374
|
+
break;
|
|
36375
|
+
const table = rect.tableStart ? tr2.doc.nodeAt(rect.tableStart - 1) : tr2.doc;
|
|
36376
|
+
if (!table) {
|
|
36377
|
+
throw RangeError("No table found");
|
|
36202
36378
|
}
|
|
36203
|
-
|
|
36379
|
+
rect.table = table;
|
|
36380
|
+
rect.map = TableMap.get(table);
|
|
36204
36381
|
}
|
|
36205
|
-
|
|
36206
|
-
height = newHeight;
|
|
36382
|
+
dispatch(tr2);
|
|
36207
36383
|
}
|
|
36208
|
-
return
|
|
36384
|
+
return true;
|
|
36209
36385
|
}
|
|
36210
|
-
function
|
|
36211
|
-
|
|
36212
|
-
const
|
|
36213
|
-
let
|
|
36214
|
-
|
|
36215
|
-
|
|
36216
|
-
|
|
36217
|
-
|
|
36218
|
-
|
|
36219
|
-
|
|
36220
|
-
|
|
36221
|
-
|
|
36222
|
-
|
|
36223
|
-
|
|
36224
|
-
|
|
36225
|
-
|
|
36226
|
-
|
|
36227
|
-
|
|
36386
|
+
function rowIsHeader(map4, table, row) {
|
|
36387
|
+
var _a2;
|
|
36388
|
+
const headerCell = tableNodeTypes(table.type.schema).header_cell;
|
|
36389
|
+
for (let col = 0; col < map4.width; col++)
|
|
36390
|
+
if (((_a2 = table.nodeAt(map4.map[col + row * map4.width])) == null ? void 0 : _a2.type) != headerCell)
|
|
36391
|
+
return false;
|
|
36392
|
+
return true;
|
|
36393
|
+
}
|
|
36394
|
+
function addRow(tr2, { map: map4, tableStart, table }, row) {
|
|
36395
|
+
var _a2;
|
|
36396
|
+
let rowPos = tableStart;
|
|
36397
|
+
for (let i2 = 0; i2 < row; i2++)
|
|
36398
|
+
rowPos += table.child(i2).nodeSize;
|
|
36399
|
+
const cells = [];
|
|
36400
|
+
let refRow = row > 0 ? -1 : 0;
|
|
36401
|
+
if (rowIsHeader(map4, table, row + refRow))
|
|
36402
|
+
refRow = row == 0 || row == map4.height ? null : 0;
|
|
36403
|
+
for (let col = 0, index2 = map4.width * row; col < map4.width; col++, index2++) {
|
|
36404
|
+
if (row > 0 && row < map4.height && map4.map[index2] == map4.map[index2 - map4.width]) {
|
|
36405
|
+
const pos = map4.map[index2];
|
|
36406
|
+
const attrs = table.nodeAt(pos).attrs;
|
|
36407
|
+
tr2.setNodeMarkup(tableStart + pos, null, {
|
|
36408
|
+
...attrs,
|
|
36409
|
+
rowspan: attrs.rowspan + 1
|
|
36410
|
+
});
|
|
36411
|
+
col += attrs.colspan - 1;
|
|
36412
|
+
} else {
|
|
36413
|
+
const type3 = refRow == null ? tableNodeTypes(table.type.schema).cell : (_a2 = table.nodeAt(map4.map[index2 + refRow * map4.width])) == null ? void 0 : _a2.type;
|
|
36414
|
+
const node = type3 == null ? void 0 : type3.createAndFill();
|
|
36415
|
+
if (node)
|
|
36416
|
+
cells.push(node);
|
|
36228
36417
|
}
|
|
36229
36418
|
}
|
|
36230
|
-
|
|
36231
|
-
|
|
36232
|
-
|
|
36233
|
-
|
|
36234
|
-
|
|
36235
|
-
|
|
36236
|
-
|
|
36237
|
-
|
|
36238
|
-
|
|
36239
|
-
for (let i2 = map4.height; i2 < height; i2++)
|
|
36240
|
-
rows.push(emptyRow);
|
|
36241
|
-
tr2.insert(tr2.mapping.slice(mapFrom).map(start2 + table.nodeSize - 2), rows);
|
|
36419
|
+
tr2.insert(rowPos, tableNodeTypes(table.type.schema).row.create(null, cells));
|
|
36420
|
+
return tr2;
|
|
36421
|
+
}
|
|
36422
|
+
function addRowBefore(state2, dispatch) {
|
|
36423
|
+
if (!isInTable(state2))
|
|
36424
|
+
return false;
|
|
36425
|
+
if (dispatch) {
|
|
36426
|
+
const rect = selectedRect(state2);
|
|
36427
|
+
dispatch(addRow(state2.tr, rect, rect.top));
|
|
36242
36428
|
}
|
|
36243
|
-
return
|
|
36429
|
+
return true;
|
|
36244
36430
|
}
|
|
36245
|
-
function
|
|
36246
|
-
if (
|
|
36431
|
+
function addRowAfter(state2, dispatch) {
|
|
36432
|
+
if (!isInTable(state2))
|
|
36247
36433
|
return false;
|
|
36248
|
-
|
|
36249
|
-
|
|
36250
|
-
|
|
36251
|
-
|
|
36252
|
-
|
|
36253
|
-
|
|
36254
|
-
|
|
36255
|
-
|
|
36256
|
-
|
|
36257
|
-
|
|
36434
|
+
if (dispatch) {
|
|
36435
|
+
const rect = selectedRect(state2);
|
|
36436
|
+
dispatch(addRow(state2.tr, rect, rect.bottom));
|
|
36437
|
+
}
|
|
36438
|
+
return true;
|
|
36439
|
+
}
|
|
36440
|
+
function removeRow(tr2, { map: map4, table, tableStart }, row) {
|
|
36441
|
+
let rowPos = 0;
|
|
36442
|
+
for (let i2 = 0; i2 < row; i2++)
|
|
36443
|
+
rowPos += table.child(i2).nodeSize;
|
|
36444
|
+
const nextRow = rowPos + table.child(row).nodeSize;
|
|
36445
|
+
const mapFrom = tr2.mapping.maps.length;
|
|
36446
|
+
tr2.delete(rowPos + tableStart, nextRow + tableStart);
|
|
36447
|
+
const seen = /* @__PURE__ */ new Set();
|
|
36448
|
+
for (let col = 0, index2 = row * map4.width; col < map4.width; col++, index2++) {
|
|
36449
|
+
const pos = map4.map[index2];
|
|
36450
|
+
if (seen.has(pos))
|
|
36451
|
+
continue;
|
|
36452
|
+
seen.add(pos);
|
|
36453
|
+
if (row > 0 && pos == map4.map[index2 - map4.width]) {
|
|
36454
|
+
const attrs = table.nodeAt(pos).attrs;
|
|
36455
|
+
tr2.setNodeMarkup(tr2.mapping.slice(mapFrom).map(pos + tableStart), null, {
|
|
36456
|
+
...attrs,
|
|
36457
|
+
rowspan: attrs.rowspan - 1
|
|
36258
36458
|
});
|
|
36259
|
-
|
|
36260
|
-
|
|
36261
|
-
|
|
36262
|
-
|
|
36263
|
-
|
|
36264
|
-
}
|
|
36459
|
+
col += attrs.colspan - 1;
|
|
36460
|
+
} else if (row < map4.height && pos == map4.map[index2 + map4.width]) {
|
|
36461
|
+
const cell = table.nodeAt(pos);
|
|
36462
|
+
const attrs = cell.attrs;
|
|
36463
|
+
const copy2 = cell.type.create(
|
|
36464
|
+
{ ...attrs, rowspan: cell.attrs.rowspan - 1 },
|
|
36465
|
+
cell.content
|
|
36265
36466
|
);
|
|
36266
|
-
|
|
36467
|
+
const newPos = map4.positionAt(row + 1, col, table);
|
|
36468
|
+
tr2.insert(tr2.mapping.slice(mapFrom).map(tableStart + newPos), copy2);
|
|
36469
|
+
col += attrs.colspan - 1;
|
|
36267
36470
|
}
|
|
36268
36471
|
}
|
|
36269
|
-
return found2;
|
|
36270
36472
|
}
|
|
36271
|
-
function
|
|
36272
|
-
if (
|
|
36473
|
+
function deleteRow(state2, dispatch) {
|
|
36474
|
+
if (!isInTable(state2))
|
|
36273
36475
|
return false;
|
|
36274
|
-
|
|
36275
|
-
|
|
36276
|
-
|
|
36277
|
-
|
|
36278
|
-
|
|
36279
|
-
|
|
36280
|
-
|
|
36281
|
-
|
|
36282
|
-
tr2.
|
|
36283
|
-
|
|
36284
|
-
|
|
36285
|
-
|
|
36286
|
-
|
|
36287
|
-
|
|
36288
|
-
cell.attrs.colspan - (left2 - cellLeft)
|
|
36289
|
-
)
|
|
36290
|
-
);
|
|
36291
|
-
tr2.insert(
|
|
36292
|
-
updatePos + cell.nodeSize,
|
|
36293
|
-
cell.type.createAndFill(
|
|
36294
|
-
removeColSpan(cell.attrs, 0, left2 - cellLeft)
|
|
36295
|
-
)
|
|
36296
|
-
);
|
|
36297
|
-
row += cell.attrs.rowspan - 1;
|
|
36476
|
+
if (dispatch) {
|
|
36477
|
+
const rect = selectedRect(state2), tr2 = state2.tr;
|
|
36478
|
+
if (rect.top == 0 && rect.bottom == rect.map.height)
|
|
36479
|
+
return false;
|
|
36480
|
+
for (let i2 = rect.bottom - 1; ; i2--) {
|
|
36481
|
+
removeRow(tr2, rect, i2);
|
|
36482
|
+
if (i2 == rect.top)
|
|
36483
|
+
break;
|
|
36484
|
+
const table = rect.tableStart ? tr2.doc.nodeAt(rect.tableStart - 1) : tr2.doc;
|
|
36485
|
+
if (!table) {
|
|
36486
|
+
throw RangeError("No table found");
|
|
36487
|
+
}
|
|
36488
|
+
rect.table = table;
|
|
36489
|
+
rect.map = TableMap.get(rect.table);
|
|
36298
36490
|
}
|
|
36491
|
+
dispatch(tr2);
|
|
36299
36492
|
}
|
|
36300
|
-
return
|
|
36493
|
+
return true;
|
|
36301
36494
|
}
|
|
36302
|
-
function
|
|
36303
|
-
|
|
36304
|
-
|
|
36305
|
-
|
|
36306
|
-
|
|
36307
|
-
let
|
|
36308
|
-
|
|
36309
|
-
|
|
36310
|
-
|
|
36311
|
-
|
|
36312
|
-
|
|
36313
|
-
|
|
36314
|
-
if (!table) {
|
|
36315
|
-
throw new Error("No table found");
|
|
36316
|
-
}
|
|
36317
|
-
map4 = TableMap.get(table);
|
|
36318
|
-
mapFrom = tr2.mapping.maps.length;
|
|
36495
|
+
function isEmpty(cell) {
|
|
36496
|
+
const c2 = cell.content;
|
|
36497
|
+
return c2.childCount == 1 && c2.child(0).isTextblock && c2.child(0).childCount == 0;
|
|
36498
|
+
}
|
|
36499
|
+
function cellsOverlapRectangle({ width, height, map: map4 }, rect) {
|
|
36500
|
+
let indexTop = rect.top * width + rect.left, indexLeft = indexTop;
|
|
36501
|
+
let indexBottom = (rect.bottom - 1) * width + rect.left, indexRight = indexTop + (rect.right - rect.left - 1);
|
|
36502
|
+
for (let i2 = rect.top; i2 < rect.bottom; i2++) {
|
|
36503
|
+
if (rect.left > 0 && map4[indexLeft] == map4[indexLeft - 1] || rect.right < width && map4[indexRight] == map4[indexRight + 1])
|
|
36504
|
+
return true;
|
|
36505
|
+
indexLeft += width;
|
|
36506
|
+
indexRight += width;
|
|
36319
36507
|
}
|
|
36320
|
-
|
|
36321
|
-
|
|
36322
|
-
|
|
36323
|
-
|
|
36324
|
-
|
|
36325
|
-
recomp();
|
|
36326
|
-
if (isolateVertical(tr2, map4, table, tableStart, top2, bottom2, left2, mapFrom))
|
|
36327
|
-
recomp();
|
|
36328
|
-
if (isolateVertical(tr2, map4, table, tableStart, top2, bottom2, right2, mapFrom))
|
|
36329
|
-
recomp();
|
|
36330
|
-
for (let row = top2; row < bottom2; row++) {
|
|
36331
|
-
const from2 = map4.positionAt(row, left2, table), to2 = map4.positionAt(row, right2, table);
|
|
36332
|
-
tr2.replace(
|
|
36333
|
-
tr2.mapping.slice(mapFrom).map(from2 + tableStart),
|
|
36334
|
-
tr2.mapping.slice(mapFrom).map(to2 + tableStart),
|
|
36335
|
-
new Slice(cells.rows[row - top2], 0, 0)
|
|
36336
|
-
);
|
|
36508
|
+
for (let i2 = rect.left; i2 < rect.right; i2++) {
|
|
36509
|
+
if (rect.top > 0 && map4[indexTop] == map4[indexTop - width] || rect.bottom < height && map4[indexBottom] == map4[indexBottom + width])
|
|
36510
|
+
return true;
|
|
36511
|
+
indexTop++;
|
|
36512
|
+
indexBottom++;
|
|
36337
36513
|
}
|
|
36338
|
-
|
|
36339
|
-
tr2.setSelection(
|
|
36340
|
-
new CellSelection(
|
|
36341
|
-
tr2.doc.resolve(tableStart + map4.positionAt(top2, left2, table)),
|
|
36342
|
-
tr2.doc.resolve(tableStart + map4.positionAt(bottom2 - 1, right2 - 1, table))
|
|
36343
|
-
)
|
|
36344
|
-
);
|
|
36345
|
-
dispatch(tr2);
|
|
36514
|
+
return false;
|
|
36346
36515
|
}
|
|
36347
|
-
|
|
36348
|
-
|
|
36349
|
-
|
|
36350
|
-
ArrowUp: arrow$3("vert", -1),
|
|
36351
|
-
ArrowDown: arrow$3("vert", 1),
|
|
36352
|
-
"Shift-ArrowLeft": shiftArrow("horiz", -1),
|
|
36353
|
-
"Shift-ArrowRight": shiftArrow("horiz", 1),
|
|
36354
|
-
"Shift-ArrowUp": shiftArrow("vert", -1),
|
|
36355
|
-
"Shift-ArrowDown": shiftArrow("vert", 1),
|
|
36356
|
-
Backspace: deleteCellSelection,
|
|
36357
|
-
"Mod-Backspace": deleteCellSelection,
|
|
36358
|
-
Delete: deleteCellSelection,
|
|
36359
|
-
"Mod-Delete": deleteCellSelection
|
|
36360
|
-
});
|
|
36361
|
-
function maybeSetSelection(state2, dispatch, selection) {
|
|
36362
|
-
if (selection.eq(state2.selection))
|
|
36516
|
+
function mergeCells(state2, dispatch) {
|
|
36517
|
+
const sel = state2.selection;
|
|
36518
|
+
if (!(sel instanceof CellSelection) || sel.$anchorCell.pos == sel.$headCell.pos)
|
|
36363
36519
|
return false;
|
|
36364
|
-
|
|
36365
|
-
|
|
36520
|
+
const rect = selectedRect(state2), { map: map4 } = rect;
|
|
36521
|
+
if (cellsOverlapRectangle(map4, rect))
|
|
36522
|
+
return false;
|
|
36523
|
+
if (dispatch) {
|
|
36524
|
+
const tr2 = state2.tr;
|
|
36525
|
+
const seen = {};
|
|
36526
|
+
let content = Fragment.empty;
|
|
36527
|
+
let mergedPos;
|
|
36528
|
+
let mergedCell;
|
|
36529
|
+
for (let row = rect.top; row < rect.bottom; row++) {
|
|
36530
|
+
for (let col = rect.left; col < rect.right; col++) {
|
|
36531
|
+
const cellPos = map4.map[row * map4.width + col];
|
|
36532
|
+
const cell = rect.table.nodeAt(cellPos);
|
|
36533
|
+
if (seen[cellPos] || !cell)
|
|
36534
|
+
continue;
|
|
36535
|
+
seen[cellPos] = true;
|
|
36536
|
+
if (mergedPos == null) {
|
|
36537
|
+
mergedPos = cellPos;
|
|
36538
|
+
mergedCell = cell;
|
|
36539
|
+
} else {
|
|
36540
|
+
if (!isEmpty(cell))
|
|
36541
|
+
content = content.append(cell.content);
|
|
36542
|
+
const mapped = tr2.mapping.map(cellPos + rect.tableStart);
|
|
36543
|
+
tr2.delete(mapped, mapped + cell.nodeSize);
|
|
36544
|
+
}
|
|
36545
|
+
}
|
|
36546
|
+
}
|
|
36547
|
+
if (mergedPos == null || mergedCell == null) {
|
|
36548
|
+
return true;
|
|
36549
|
+
}
|
|
36550
|
+
tr2.setNodeMarkup(mergedPos + rect.tableStart, null, {
|
|
36551
|
+
...addColSpan(
|
|
36552
|
+
mergedCell.attrs,
|
|
36553
|
+
mergedCell.attrs.colspan,
|
|
36554
|
+
rect.right - rect.left - mergedCell.attrs.colspan
|
|
36555
|
+
),
|
|
36556
|
+
rowspan: rect.bottom - rect.top
|
|
36557
|
+
});
|
|
36558
|
+
if (content.size) {
|
|
36559
|
+
const end2 = mergedPos + 1 + mergedCell.content.size;
|
|
36560
|
+
const start2 = isEmpty(mergedCell) ? mergedPos + 1 : end2;
|
|
36561
|
+
tr2.replaceWith(start2 + rect.tableStart, end2 + rect.tableStart, content);
|
|
36562
|
+
}
|
|
36563
|
+
tr2.setSelection(
|
|
36564
|
+
new CellSelection(tr2.doc.resolve(mergedPos + rect.tableStart))
|
|
36565
|
+
);
|
|
36566
|
+
dispatch(tr2);
|
|
36567
|
+
}
|
|
36366
36568
|
return true;
|
|
36367
36569
|
}
|
|
36368
|
-
function
|
|
36369
|
-
|
|
36370
|
-
|
|
36371
|
-
|
|
36570
|
+
function splitCell(state2, dispatch) {
|
|
36571
|
+
const nodeTypes = tableNodeTypes(state2.schema);
|
|
36572
|
+
return splitCellWithType(({ node }) => {
|
|
36573
|
+
return nodeTypes[node.type.spec.tableRole];
|
|
36574
|
+
})(state2, dispatch);
|
|
36575
|
+
}
|
|
36576
|
+
function splitCellWithType(getCellType) {
|
|
36577
|
+
return (state2, dispatch) => {
|
|
36578
|
+
var _a2;
|
|
36372
36579
|
const sel = state2.selection;
|
|
36373
|
-
|
|
36374
|
-
|
|
36375
|
-
|
|
36376
|
-
|
|
36377
|
-
|
|
36378
|
-
|
|
36580
|
+
let cellNode;
|
|
36581
|
+
let cellPos;
|
|
36582
|
+
if (!(sel instanceof CellSelection)) {
|
|
36583
|
+
cellNode = cellWrapping(sel.$from);
|
|
36584
|
+
if (!cellNode)
|
|
36585
|
+
return false;
|
|
36586
|
+
cellPos = (_a2 = cellAround(sel.$from)) == null ? void 0 : _a2.pos;
|
|
36587
|
+
} else {
|
|
36588
|
+
if (sel.$anchorCell.pos != sel.$headCell.pos)
|
|
36589
|
+
return false;
|
|
36590
|
+
cellNode = sel.$anchorCell.nodeAfter;
|
|
36591
|
+
cellPos = sel.$anchorCell.pos;
|
|
36379
36592
|
}
|
|
36380
|
-
if (
|
|
36593
|
+
if (cellNode == null || cellPos == null) {
|
|
36381
36594
|
return false;
|
|
36382
|
-
|
|
36383
|
-
if (
|
|
36595
|
+
}
|
|
36596
|
+
if (cellNode.attrs.colspan == 1 && cellNode.attrs.rowspan == 1) {
|
|
36384
36597
|
return false;
|
|
36385
|
-
|
|
36386
|
-
|
|
36387
|
-
|
|
36388
|
-
|
|
36389
|
-
|
|
36598
|
+
}
|
|
36599
|
+
if (dispatch) {
|
|
36600
|
+
let baseAttrs = cellNode.attrs;
|
|
36601
|
+
const attrs = [];
|
|
36602
|
+
const colwidth = baseAttrs.colwidth;
|
|
36603
|
+
if (baseAttrs.rowspan > 1)
|
|
36604
|
+
baseAttrs = { ...baseAttrs, rowspan: 1 };
|
|
36605
|
+
if (baseAttrs.colspan > 1)
|
|
36606
|
+
baseAttrs = { ...baseAttrs, colspan: 1 };
|
|
36607
|
+
const rect = selectedRect(state2), tr2 = state2.tr;
|
|
36608
|
+
for (let i2 = 0; i2 < rect.right - rect.left; i2++)
|
|
36609
|
+
attrs.push(
|
|
36610
|
+
colwidth ? {
|
|
36611
|
+
...baseAttrs,
|
|
36612
|
+
colwidth: colwidth && colwidth[i2] ? [colwidth[i2]] : null
|
|
36613
|
+
} : baseAttrs
|
|
36614
|
+
);
|
|
36615
|
+
let lastCell;
|
|
36616
|
+
for (let row = rect.top; row < rect.bottom; row++) {
|
|
36617
|
+
let pos = rect.map.positionAt(row, rect.left, rect.table);
|
|
36618
|
+
if (row == rect.top)
|
|
36619
|
+
pos += cellNode.nodeSize;
|
|
36620
|
+
for (let col = rect.left, i2 = 0; col < rect.right; col++, i2++) {
|
|
36621
|
+
if (col == rect.left && row == rect.top)
|
|
36622
|
+
continue;
|
|
36623
|
+
tr2.insert(
|
|
36624
|
+
lastCell = tr2.mapping.map(pos + rect.tableStart, 1),
|
|
36625
|
+
getCellType({ node: cellNode, row, col }).createAndFill(attrs[i2])
|
|
36626
|
+
);
|
|
36627
|
+
}
|
|
36628
|
+
}
|
|
36629
|
+
tr2.setNodeMarkup(
|
|
36630
|
+
cellPos,
|
|
36631
|
+
getCellType({ node: cellNode, row: rect.top, col: rect.left }),
|
|
36632
|
+
attrs[0]
|
|
36390
36633
|
);
|
|
36391
|
-
|
|
36392
|
-
|
|
36393
|
-
|
|
36394
|
-
|
|
36395
|
-
|
|
36396
|
-
|
|
36397
|
-
|
|
36398
|
-
|
|
36634
|
+
if (sel instanceof CellSelection)
|
|
36635
|
+
tr2.setSelection(
|
|
36636
|
+
new CellSelection(
|
|
36637
|
+
tr2.doc.resolve(sel.$anchorCell.pos),
|
|
36638
|
+
lastCell ? tr2.doc.resolve(lastCell) : void 0
|
|
36639
|
+
)
|
|
36640
|
+
);
|
|
36641
|
+
dispatch(tr2);
|
|
36642
|
+
}
|
|
36643
|
+
return true;
|
|
36644
|
+
};
|
|
36645
|
+
}
|
|
36646
|
+
function setCellAttr(name, value) {
|
|
36647
|
+
return function(state2, dispatch) {
|
|
36648
|
+
if (!isInTable(state2))
|
|
36649
|
+
return false;
|
|
36650
|
+
const $cell = selectionCell(state2);
|
|
36651
|
+
if ($cell.nodeAfter.attrs[name] === value)
|
|
36652
|
+
return false;
|
|
36653
|
+
if (dispatch) {
|
|
36654
|
+
const tr2 = state2.tr;
|
|
36655
|
+
if (state2.selection instanceof CellSelection)
|
|
36656
|
+
state2.selection.forEachCell((node, pos) => {
|
|
36657
|
+
if (node.attrs[name] !== value)
|
|
36658
|
+
tr2.setNodeMarkup(pos, null, {
|
|
36659
|
+
...node.attrs,
|
|
36660
|
+
[name]: value
|
|
36661
|
+
});
|
|
36662
|
+
});
|
|
36399
36663
|
else
|
|
36400
|
-
|
|
36401
|
-
|
|
36664
|
+
tr2.setNodeMarkup($cell.pos, null, {
|
|
36665
|
+
...$cell.nodeAfter.attrs,
|
|
36666
|
+
[name]: value
|
|
36667
|
+
});
|
|
36668
|
+
dispatch(tr2);
|
|
36402
36669
|
}
|
|
36670
|
+
return true;
|
|
36403
36671
|
};
|
|
36404
36672
|
}
|
|
36405
|
-
function
|
|
36406
|
-
return (state2, dispatch
|
|
36407
|
-
if (!
|
|
36673
|
+
function deprecated_toggleHeader(type3) {
|
|
36674
|
+
return function(state2, dispatch) {
|
|
36675
|
+
if (!isInTable(state2))
|
|
36408
36676
|
return false;
|
|
36409
|
-
|
|
36410
|
-
|
|
36411
|
-
|
|
36412
|
-
|
|
36413
|
-
|
|
36414
|
-
|
|
36415
|
-
|
|
36416
|
-
|
|
36417
|
-
|
|
36677
|
+
if (dispatch) {
|
|
36678
|
+
const types = tableNodeTypes(state2.schema);
|
|
36679
|
+
const rect = selectedRect(state2), tr2 = state2.tr;
|
|
36680
|
+
const cells = rect.map.cellsInRect(
|
|
36681
|
+
type3 == "column" ? {
|
|
36682
|
+
left: rect.left,
|
|
36683
|
+
top: 0,
|
|
36684
|
+
right: rect.right,
|
|
36685
|
+
bottom: rect.map.height
|
|
36686
|
+
} : type3 == "row" ? {
|
|
36687
|
+
left: 0,
|
|
36688
|
+
top: rect.top,
|
|
36689
|
+
right: rect.map.width,
|
|
36690
|
+
bottom: rect.bottom
|
|
36691
|
+
} : rect
|
|
36692
|
+
);
|
|
36693
|
+
const nodes = cells.map((pos) => rect.table.nodeAt(pos));
|
|
36694
|
+
for (let i2 = 0; i2 < cells.length; i2++)
|
|
36695
|
+
if (nodes[i2].type == types.header_cell)
|
|
36696
|
+
tr2.setNodeMarkup(
|
|
36697
|
+
rect.tableStart + cells[i2],
|
|
36698
|
+
types.cell,
|
|
36699
|
+
nodes[i2].attrs
|
|
36700
|
+
);
|
|
36701
|
+
if (tr2.steps.length == 0)
|
|
36702
|
+
for (let i2 = 0; i2 < cells.length; i2++)
|
|
36703
|
+
tr2.setNodeMarkup(
|
|
36704
|
+
rect.tableStart + cells[i2],
|
|
36705
|
+
types.header_cell,
|
|
36706
|
+
nodes[i2].attrs
|
|
36707
|
+
);
|
|
36708
|
+
dispatch(tr2);
|
|
36418
36709
|
}
|
|
36419
|
-
|
|
36420
|
-
|
|
36710
|
+
return true;
|
|
36711
|
+
};
|
|
36712
|
+
}
|
|
36713
|
+
function isHeaderEnabledByType(type3, rect, types) {
|
|
36714
|
+
const cellPositions = rect.map.cellsInRect({
|
|
36715
|
+
left: 0,
|
|
36716
|
+
top: 0,
|
|
36717
|
+
right: type3 == "row" ? rect.map.width : 1,
|
|
36718
|
+
bottom: type3 == "column" ? rect.map.height : 1
|
|
36719
|
+
});
|
|
36720
|
+
for (let i2 = 0; i2 < cellPositions.length; i2++) {
|
|
36721
|
+
const cell = rect.table.nodeAt(cellPositions[i2]);
|
|
36722
|
+
if (cell && cell.type !== types.header_cell) {
|
|
36421
36723
|
return false;
|
|
36422
|
-
|
|
36423
|
-
|
|
36424
|
-
|
|
36425
|
-
|
|
36426
|
-
|
|
36724
|
+
}
|
|
36725
|
+
}
|
|
36726
|
+
return true;
|
|
36727
|
+
}
|
|
36728
|
+
function toggleHeader(type3, options) {
|
|
36729
|
+
options = options || { useDeprecatedLogic: false };
|
|
36730
|
+
if (options.useDeprecatedLogic)
|
|
36731
|
+
return deprecated_toggleHeader(type3);
|
|
36732
|
+
return function(state2, dispatch) {
|
|
36733
|
+
if (!isInTable(state2))
|
|
36734
|
+
return false;
|
|
36735
|
+
if (dispatch) {
|
|
36736
|
+
const types = tableNodeTypes(state2.schema);
|
|
36737
|
+
const rect = selectedRect(state2), tr2 = state2.tr;
|
|
36738
|
+
const isHeaderRowEnabled = isHeaderEnabledByType("row", rect, types);
|
|
36739
|
+
const isHeaderColumnEnabled = isHeaderEnabledByType(
|
|
36740
|
+
"column",
|
|
36741
|
+
rect,
|
|
36742
|
+
types
|
|
36743
|
+
);
|
|
36744
|
+
const isHeaderEnabled = type3 === "column" ? isHeaderRowEnabled : type3 === "row" ? isHeaderColumnEnabled : false;
|
|
36745
|
+
const selectionStartsAt = isHeaderEnabled ? 1 : 0;
|
|
36746
|
+
const cellsRect = type3 == "column" ? {
|
|
36747
|
+
left: 0,
|
|
36748
|
+
top: selectionStartsAt,
|
|
36749
|
+
right: 1,
|
|
36750
|
+
bottom: rect.map.height
|
|
36751
|
+
} : type3 == "row" ? {
|
|
36752
|
+
left: selectionStartsAt,
|
|
36753
|
+
top: 0,
|
|
36754
|
+
right: rect.map.width,
|
|
36755
|
+
bottom: 1
|
|
36756
|
+
} : rect;
|
|
36757
|
+
const newType = type3 == "column" ? isHeaderColumnEnabled ? types.cell : types.header_cell : type3 == "row" ? isHeaderRowEnabled ? types.cell : types.header_cell : types.cell;
|
|
36758
|
+
rect.map.cellsInRect(cellsRect).forEach((relativeCellPos) => {
|
|
36759
|
+
const cellPos = relativeCellPos + rect.tableStart;
|
|
36760
|
+
const cell = tr2.doc.nodeAt(cellPos);
|
|
36761
|
+
if (cell) {
|
|
36762
|
+
tr2.setNodeMarkup(cellPos, newType, cell.attrs);
|
|
36763
|
+
}
|
|
36764
|
+
});
|
|
36765
|
+
dispatch(tr2);
|
|
36766
|
+
}
|
|
36767
|
+
return true;
|
|
36768
|
+
};
|
|
36769
|
+
}
|
|
36770
|
+
toggleHeader("row", {
|
|
36771
|
+
useDeprecatedLogic: true
|
|
36772
|
+
});
|
|
36773
|
+
toggleHeader("column", {
|
|
36774
|
+
useDeprecatedLogic: true
|
|
36775
|
+
});
|
|
36776
|
+
var toggleHeaderCell = toggleHeader("cell", {
|
|
36777
|
+
useDeprecatedLogic: true
|
|
36778
|
+
});
|
|
36779
|
+
function findNextCell($cell, dir) {
|
|
36780
|
+
if (dir < 0) {
|
|
36781
|
+
const before = $cell.nodeBefore;
|
|
36782
|
+
if (before)
|
|
36783
|
+
return $cell.pos - before.nodeSize;
|
|
36784
|
+
for (let row = $cell.index(-1) - 1, rowEnd = $cell.before(); row >= 0; row--) {
|
|
36785
|
+
const rowNode = $cell.node(-1).child(row);
|
|
36786
|
+
const lastChild2 = rowNode.lastChild;
|
|
36787
|
+
if (lastChild2) {
|
|
36788
|
+
return rowEnd - 1 - lastChild2.nodeSize;
|
|
36789
|
+
}
|
|
36790
|
+
rowEnd -= rowNode.nodeSize;
|
|
36791
|
+
}
|
|
36792
|
+
} else {
|
|
36793
|
+
if ($cell.index() < $cell.parent.childCount - 1) {
|
|
36794
|
+
return $cell.pos + $cell.nodeAfter.nodeSize;
|
|
36795
|
+
}
|
|
36796
|
+
const table = $cell.node(-1);
|
|
36797
|
+
for (let row = $cell.indexAfter(-1), rowStart = $cell.after(); row < table.childCount; row++) {
|
|
36798
|
+
const rowNode = table.child(row);
|
|
36799
|
+
if (rowNode.childCount)
|
|
36800
|
+
return rowStart + 1;
|
|
36801
|
+
rowStart += rowNode.nodeSize;
|
|
36802
|
+
}
|
|
36803
|
+
}
|
|
36804
|
+
return null;
|
|
36805
|
+
}
|
|
36806
|
+
function goToNextCell(direction) {
|
|
36807
|
+
return function(state2, dispatch) {
|
|
36808
|
+
if (!isInTable(state2))
|
|
36809
|
+
return false;
|
|
36810
|
+
const cell = findNextCell(selectionCell(state2), direction);
|
|
36811
|
+
if (cell == null)
|
|
36812
|
+
return false;
|
|
36813
|
+
if (dispatch) {
|
|
36814
|
+
const $cell = state2.doc.resolve(cell);
|
|
36815
|
+
dispatch(
|
|
36816
|
+
state2.tr.setSelection(TextSelection.between($cell, moveCellForward($cell))).scrollIntoView()
|
|
36817
|
+
);
|
|
36818
|
+
}
|
|
36819
|
+
return true;
|
|
36427
36820
|
};
|
|
36428
36821
|
}
|
|
36822
|
+
function deleteTable(state2, dispatch) {
|
|
36823
|
+
const $pos = state2.selection.$anchor;
|
|
36824
|
+
for (let d2 = $pos.depth; d2 > 0; d2--) {
|
|
36825
|
+
const node = $pos.node(d2);
|
|
36826
|
+
if (node.type.spec.tableRole == "table") {
|
|
36827
|
+
if (dispatch)
|
|
36828
|
+
dispatch(
|
|
36829
|
+
state2.tr.delete($pos.before(d2), $pos.after(d2)).scrollIntoView()
|
|
36830
|
+
);
|
|
36831
|
+
return true;
|
|
36832
|
+
}
|
|
36833
|
+
}
|
|
36834
|
+
return false;
|
|
36835
|
+
}
|
|
36429
36836
|
function deleteCellSelection(state2, dispatch) {
|
|
36430
36837
|
const sel = state2.selection;
|
|
36431
36838
|
if (!(sel instanceof CellSelection))
|
|
@@ -36446,111 +36853,448 @@ function deleteCellSelection(state2, dispatch) {
|
|
|
36446
36853
|
}
|
|
36447
36854
|
return true;
|
|
36448
36855
|
}
|
|
36449
|
-
function
|
|
36450
|
-
|
|
36451
|
-
|
|
36452
|
-
|
|
36453
|
-
|
|
36454
|
-
|
|
36455
|
-
|
|
36456
|
-
|
|
36457
|
-
|
|
36458
|
-
|
|
36459
|
-
|
|
36460
|
-
const
|
|
36461
|
-
if (
|
|
36462
|
-
|
|
36463
|
-
cells =
|
|
36464
|
-
|
|
36465
|
-
|
|
36466
|
-
|
|
36467
|
-
|
|
36468
|
-
|
|
36469
|
-
)
|
|
36470
|
-
|
|
36471
|
-
|
|
36472
|
-
|
|
36473
|
-
|
|
36474
|
-
|
|
36475
|
-
|
|
36476
|
-
|
|
36477
|
-
|
|
36478
|
-
|
|
36479
|
-
insertCells(view.state, view.dispatch, start2, rect, cells);
|
|
36480
|
-
return true;
|
|
36481
|
-
} else if (cells) {
|
|
36482
|
-
const $cell = selectionCell(view.state);
|
|
36483
|
-
const start2 = $cell.start(-1);
|
|
36484
|
-
insertCells(
|
|
36485
|
-
view.state,
|
|
36486
|
-
view.dispatch,
|
|
36487
|
-
start2,
|
|
36488
|
-
TableMap.get($cell.node(-1)).findCell($cell.pos - start2),
|
|
36489
|
-
cells
|
|
36856
|
+
function pastedCells(slice4) {
|
|
36857
|
+
if (!slice4.size)
|
|
36858
|
+
return null;
|
|
36859
|
+
let { content, openStart, openEnd } = slice4;
|
|
36860
|
+
while (content.childCount == 1 && (openStart > 0 && openEnd > 0 || content.child(0).type.spec.tableRole == "table")) {
|
|
36861
|
+
openStart--;
|
|
36862
|
+
openEnd--;
|
|
36863
|
+
content = content.child(0).content;
|
|
36864
|
+
}
|
|
36865
|
+
const first2 = content.child(0);
|
|
36866
|
+
const role = first2.type.spec.tableRole;
|
|
36867
|
+
const schema = first2.type.schema, rows = [];
|
|
36868
|
+
if (role == "row") {
|
|
36869
|
+
for (let i2 = 0; i2 < content.childCount; i2++) {
|
|
36870
|
+
let cells = content.child(i2).content;
|
|
36871
|
+
const left2 = i2 ? 0 : Math.max(0, openStart - 1);
|
|
36872
|
+
const right2 = i2 < content.childCount - 1 ? 0 : Math.max(0, openEnd - 1);
|
|
36873
|
+
if (left2 || right2)
|
|
36874
|
+
cells = fitSlice(
|
|
36875
|
+
tableNodeTypes(schema).row,
|
|
36876
|
+
new Slice(cells, left2, right2)
|
|
36877
|
+
).content;
|
|
36878
|
+
rows.push(cells);
|
|
36879
|
+
}
|
|
36880
|
+
} else if (role == "cell" || role == "header_cell") {
|
|
36881
|
+
rows.push(
|
|
36882
|
+
openStart || openEnd ? fitSlice(
|
|
36883
|
+
tableNodeTypes(schema).row,
|
|
36884
|
+
new Slice(content, openStart, openEnd)
|
|
36885
|
+
).content : content
|
|
36490
36886
|
);
|
|
36491
|
-
return true;
|
|
36492
36887
|
} else {
|
|
36493
|
-
return
|
|
36888
|
+
return null;
|
|
36494
36889
|
}
|
|
36890
|
+
return ensureRectangular(schema, rows);
|
|
36495
36891
|
}
|
|
36496
|
-
function
|
|
36497
|
-
|
|
36498
|
-
|
|
36499
|
-
|
|
36500
|
-
|
|
36501
|
-
|
|
36502
|
-
|
|
36503
|
-
|
|
36504
|
-
startEvent.preventDefault();
|
|
36505
|
-
} else if (startEvent.shiftKey && startDOMCell && ($anchor = cellAround(view.state.selection.$anchor)) != null && ((_a2 = cellUnderMouse(view, startEvent)) == null ? void 0 : _a2.pos) != $anchor.pos) {
|
|
36506
|
-
setCellSelection($anchor, startEvent);
|
|
36507
|
-
startEvent.preventDefault();
|
|
36508
|
-
} else if (!startDOMCell) {
|
|
36509
|
-
return;
|
|
36510
|
-
}
|
|
36511
|
-
function setCellSelection($anchor2, event) {
|
|
36512
|
-
let $head = cellUnderMouse(view, event);
|
|
36513
|
-
const starting = tableEditingKey.getState(view.state) == null;
|
|
36514
|
-
if (!$head || !inSameTable($anchor2, $head)) {
|
|
36515
|
-
if (starting)
|
|
36516
|
-
$head = $anchor2;
|
|
36517
|
-
else
|
|
36518
|
-
return;
|
|
36519
|
-
}
|
|
36520
|
-
const selection = new CellSelection($anchor2, $head);
|
|
36521
|
-
if (starting || !view.state.selection.eq(selection)) {
|
|
36522
|
-
const tr2 = view.state.tr.setSelection(selection);
|
|
36523
|
-
if (starting)
|
|
36524
|
-
tr2.setMeta(tableEditingKey, $anchor2.pos);
|
|
36525
|
-
view.dispatch(tr2);
|
|
36892
|
+
function ensureRectangular(schema, rows) {
|
|
36893
|
+
const widths = [];
|
|
36894
|
+
for (let i2 = 0; i2 < rows.length; i2++) {
|
|
36895
|
+
const row = rows[i2];
|
|
36896
|
+
for (let j2 = row.childCount - 1; j2 >= 0; j2--) {
|
|
36897
|
+
const { rowspan, colspan } = row.child(j2).attrs;
|
|
36898
|
+
for (let r2 = i2; r2 < i2 + rowspan; r2++)
|
|
36899
|
+
widths[r2] = (widths[r2] || 0) + colspan;
|
|
36526
36900
|
}
|
|
36527
36901
|
}
|
|
36528
|
-
|
|
36529
|
-
|
|
36530
|
-
|
|
36531
|
-
|
|
36532
|
-
if (
|
|
36533
|
-
|
|
36534
|
-
|
|
36535
|
-
|
|
36536
|
-
|
|
36537
|
-
|
|
36538
|
-
|
|
36539
|
-
|
|
36540
|
-
|
|
36541
|
-
} else if (domInCell(view, event.target) != startDOMCell) {
|
|
36542
|
-
$anchor2 = cellUnderMouse(view, startEvent);
|
|
36543
|
-
if (!$anchor2)
|
|
36544
|
-
return stop();
|
|
36902
|
+
let width = 0;
|
|
36903
|
+
for (let r2 = 0; r2 < widths.length; r2++)
|
|
36904
|
+
width = Math.max(width, widths[r2]);
|
|
36905
|
+
for (let r2 = 0; r2 < widths.length; r2++) {
|
|
36906
|
+
if (r2 >= rows.length)
|
|
36907
|
+
rows.push(Fragment.empty);
|
|
36908
|
+
if (widths[r2] < width) {
|
|
36909
|
+
const empty2 = tableNodeTypes(schema).cell.createAndFill();
|
|
36910
|
+
const cells = [];
|
|
36911
|
+
for (let i2 = widths[r2]; i2 < width; i2++) {
|
|
36912
|
+
cells.push(empty2);
|
|
36913
|
+
}
|
|
36914
|
+
rows[r2] = rows[r2].append(Fragment.from(cells));
|
|
36545
36915
|
}
|
|
36546
|
-
if ($anchor2)
|
|
36547
|
-
setCellSelection($anchor2, event);
|
|
36548
36916
|
}
|
|
36549
|
-
|
|
36550
|
-
view.root.addEventListener("dragstart", stop);
|
|
36551
|
-
view.root.addEventListener("mousemove", move);
|
|
36917
|
+
return { height: rows.length, width, rows };
|
|
36552
36918
|
}
|
|
36553
|
-
function
|
|
36919
|
+
function fitSlice(nodeType, slice4) {
|
|
36920
|
+
const node = nodeType.createAndFill();
|
|
36921
|
+
const tr2 = new Transform(node).replace(0, node.content.size, slice4);
|
|
36922
|
+
return tr2.doc;
|
|
36923
|
+
}
|
|
36924
|
+
function clipCells({ width, height, rows }, newWidth, newHeight) {
|
|
36925
|
+
if (width != newWidth) {
|
|
36926
|
+
const added = [];
|
|
36927
|
+
const newRows = [];
|
|
36928
|
+
for (let row = 0; row < rows.length; row++) {
|
|
36929
|
+
const frag = rows[row], cells = [];
|
|
36930
|
+
for (let col = added[row] || 0, i2 = 0; col < newWidth; i2++) {
|
|
36931
|
+
let cell = frag.child(i2 % frag.childCount);
|
|
36932
|
+
if (col + cell.attrs.colspan > newWidth)
|
|
36933
|
+
cell = cell.type.createChecked(
|
|
36934
|
+
removeColSpan(
|
|
36935
|
+
cell.attrs,
|
|
36936
|
+
cell.attrs.colspan,
|
|
36937
|
+
col + cell.attrs.colspan - newWidth
|
|
36938
|
+
),
|
|
36939
|
+
cell.content
|
|
36940
|
+
);
|
|
36941
|
+
cells.push(cell);
|
|
36942
|
+
col += cell.attrs.colspan;
|
|
36943
|
+
for (let j2 = 1; j2 < cell.attrs.rowspan; j2++)
|
|
36944
|
+
added[row + j2] = (added[row + j2] || 0) + cell.attrs.colspan;
|
|
36945
|
+
}
|
|
36946
|
+
newRows.push(Fragment.from(cells));
|
|
36947
|
+
}
|
|
36948
|
+
rows = newRows;
|
|
36949
|
+
width = newWidth;
|
|
36950
|
+
}
|
|
36951
|
+
if (height != newHeight) {
|
|
36952
|
+
const newRows = [];
|
|
36953
|
+
for (let row = 0, i2 = 0; row < newHeight; row++, i2++) {
|
|
36954
|
+
const cells = [], source = rows[i2 % height];
|
|
36955
|
+
for (let j2 = 0; j2 < source.childCount; j2++) {
|
|
36956
|
+
let cell = source.child(j2);
|
|
36957
|
+
if (row + cell.attrs.rowspan > newHeight)
|
|
36958
|
+
cell = cell.type.create(
|
|
36959
|
+
{
|
|
36960
|
+
...cell.attrs,
|
|
36961
|
+
rowspan: Math.max(1, newHeight - cell.attrs.rowspan)
|
|
36962
|
+
},
|
|
36963
|
+
cell.content
|
|
36964
|
+
);
|
|
36965
|
+
cells.push(cell);
|
|
36966
|
+
}
|
|
36967
|
+
newRows.push(Fragment.from(cells));
|
|
36968
|
+
}
|
|
36969
|
+
rows = newRows;
|
|
36970
|
+
height = newHeight;
|
|
36971
|
+
}
|
|
36972
|
+
return { width, height, rows };
|
|
36973
|
+
}
|
|
36974
|
+
function growTable(tr2, map4, table, start2, width, height, mapFrom) {
|
|
36975
|
+
const schema = tr2.doc.type.schema;
|
|
36976
|
+
const types = tableNodeTypes(schema);
|
|
36977
|
+
let empty2;
|
|
36978
|
+
let emptyHead;
|
|
36979
|
+
if (width > map4.width) {
|
|
36980
|
+
for (let row = 0, rowEnd = 0; row < map4.height; row++) {
|
|
36981
|
+
const rowNode = table.child(row);
|
|
36982
|
+
rowEnd += rowNode.nodeSize;
|
|
36983
|
+
const cells = [];
|
|
36984
|
+
let add2;
|
|
36985
|
+
if (rowNode.lastChild == null || rowNode.lastChild.type == types.cell)
|
|
36986
|
+
add2 = empty2 || (empty2 = types.cell.createAndFill());
|
|
36987
|
+
else
|
|
36988
|
+
add2 = emptyHead || (emptyHead = types.header_cell.createAndFill());
|
|
36989
|
+
for (let i2 = map4.width; i2 < width; i2++)
|
|
36990
|
+
cells.push(add2);
|
|
36991
|
+
tr2.insert(tr2.mapping.slice(mapFrom).map(rowEnd - 1 + start2), cells);
|
|
36992
|
+
}
|
|
36993
|
+
}
|
|
36994
|
+
if (height > map4.height) {
|
|
36995
|
+
const cells = [];
|
|
36996
|
+
for (let i2 = 0, start22 = (map4.height - 1) * map4.width; i2 < Math.max(map4.width, width); i2++) {
|
|
36997
|
+
const header = i2 >= map4.width ? false : table.nodeAt(map4.map[start22 + i2]).type == types.header_cell;
|
|
36998
|
+
cells.push(
|
|
36999
|
+
header ? emptyHead || (emptyHead = types.header_cell.createAndFill()) : empty2 || (empty2 = types.cell.createAndFill())
|
|
37000
|
+
);
|
|
37001
|
+
}
|
|
37002
|
+
const emptyRow = types.row.create(null, Fragment.from(cells)), rows = [];
|
|
37003
|
+
for (let i2 = map4.height; i2 < height; i2++)
|
|
37004
|
+
rows.push(emptyRow);
|
|
37005
|
+
tr2.insert(tr2.mapping.slice(mapFrom).map(start2 + table.nodeSize - 2), rows);
|
|
37006
|
+
}
|
|
37007
|
+
return !!(empty2 || emptyHead);
|
|
37008
|
+
}
|
|
37009
|
+
function isolateHorizontal(tr2, map4, table, start2, left2, right2, top2, mapFrom) {
|
|
37010
|
+
if (top2 == 0 || top2 == map4.height)
|
|
37011
|
+
return false;
|
|
37012
|
+
let found2 = false;
|
|
37013
|
+
for (let col = left2; col < right2; col++) {
|
|
37014
|
+
const index2 = top2 * map4.width + col, pos = map4.map[index2];
|
|
37015
|
+
if (map4.map[index2 - map4.width] == pos) {
|
|
37016
|
+
found2 = true;
|
|
37017
|
+
const cell = table.nodeAt(pos);
|
|
37018
|
+
const { top: cellTop, left: cellLeft } = map4.findCell(pos);
|
|
37019
|
+
tr2.setNodeMarkup(tr2.mapping.slice(mapFrom).map(pos + start2), null, {
|
|
37020
|
+
...cell.attrs,
|
|
37021
|
+
rowspan: top2 - cellTop
|
|
37022
|
+
});
|
|
37023
|
+
tr2.insert(
|
|
37024
|
+
tr2.mapping.slice(mapFrom).map(map4.positionAt(top2, cellLeft, table)),
|
|
37025
|
+
cell.type.createAndFill({
|
|
37026
|
+
...cell.attrs,
|
|
37027
|
+
rowspan: cellTop + cell.attrs.rowspan - top2
|
|
37028
|
+
})
|
|
37029
|
+
);
|
|
37030
|
+
col += cell.attrs.colspan - 1;
|
|
37031
|
+
}
|
|
37032
|
+
}
|
|
37033
|
+
return found2;
|
|
37034
|
+
}
|
|
37035
|
+
function isolateVertical(tr2, map4, table, start2, top2, bottom2, left2, mapFrom) {
|
|
37036
|
+
if (left2 == 0 || left2 == map4.width)
|
|
37037
|
+
return false;
|
|
37038
|
+
let found2 = false;
|
|
37039
|
+
for (let row = top2; row < bottom2; row++) {
|
|
37040
|
+
const index2 = row * map4.width + left2, pos = map4.map[index2];
|
|
37041
|
+
if (map4.map[index2 - 1] == pos) {
|
|
37042
|
+
found2 = true;
|
|
37043
|
+
const cell = table.nodeAt(pos);
|
|
37044
|
+
const cellLeft = map4.colCount(pos);
|
|
37045
|
+
const updatePos = tr2.mapping.slice(mapFrom).map(pos + start2);
|
|
37046
|
+
tr2.setNodeMarkup(
|
|
37047
|
+
updatePos,
|
|
37048
|
+
null,
|
|
37049
|
+
removeColSpan(
|
|
37050
|
+
cell.attrs,
|
|
37051
|
+
left2 - cellLeft,
|
|
37052
|
+
cell.attrs.colspan - (left2 - cellLeft)
|
|
37053
|
+
)
|
|
37054
|
+
);
|
|
37055
|
+
tr2.insert(
|
|
37056
|
+
updatePos + cell.nodeSize,
|
|
37057
|
+
cell.type.createAndFill(
|
|
37058
|
+
removeColSpan(cell.attrs, 0, left2 - cellLeft)
|
|
37059
|
+
)
|
|
37060
|
+
);
|
|
37061
|
+
row += cell.attrs.rowspan - 1;
|
|
37062
|
+
}
|
|
37063
|
+
}
|
|
37064
|
+
return found2;
|
|
37065
|
+
}
|
|
37066
|
+
function insertCells(state2, dispatch, tableStart, rect, cells) {
|
|
37067
|
+
let table = tableStart ? state2.doc.nodeAt(tableStart - 1) : state2.doc;
|
|
37068
|
+
if (!table) {
|
|
37069
|
+
throw new Error("No table found");
|
|
37070
|
+
}
|
|
37071
|
+
let map4 = TableMap.get(table);
|
|
37072
|
+
const { top: top2, left: left2 } = rect;
|
|
37073
|
+
const right2 = left2 + cells.width, bottom2 = top2 + cells.height;
|
|
37074
|
+
const tr2 = state2.tr;
|
|
37075
|
+
let mapFrom = 0;
|
|
37076
|
+
function recomp() {
|
|
37077
|
+
table = tableStart ? tr2.doc.nodeAt(tableStart - 1) : tr2.doc;
|
|
37078
|
+
if (!table) {
|
|
37079
|
+
throw new Error("No table found");
|
|
37080
|
+
}
|
|
37081
|
+
map4 = TableMap.get(table);
|
|
37082
|
+
mapFrom = tr2.mapping.maps.length;
|
|
37083
|
+
}
|
|
37084
|
+
if (growTable(tr2, map4, table, tableStart, right2, bottom2, mapFrom))
|
|
37085
|
+
recomp();
|
|
37086
|
+
if (isolateHorizontal(tr2, map4, table, tableStart, left2, right2, top2, mapFrom))
|
|
37087
|
+
recomp();
|
|
37088
|
+
if (isolateHorizontal(tr2, map4, table, tableStart, left2, right2, bottom2, mapFrom))
|
|
37089
|
+
recomp();
|
|
37090
|
+
if (isolateVertical(tr2, map4, table, tableStart, top2, bottom2, left2, mapFrom))
|
|
37091
|
+
recomp();
|
|
37092
|
+
if (isolateVertical(tr2, map4, table, tableStart, top2, bottom2, right2, mapFrom))
|
|
37093
|
+
recomp();
|
|
37094
|
+
for (let row = top2; row < bottom2; row++) {
|
|
37095
|
+
const from2 = map4.positionAt(row, left2, table), to2 = map4.positionAt(row, right2, table);
|
|
37096
|
+
tr2.replace(
|
|
37097
|
+
tr2.mapping.slice(mapFrom).map(from2 + tableStart),
|
|
37098
|
+
tr2.mapping.slice(mapFrom).map(to2 + tableStart),
|
|
37099
|
+
new Slice(cells.rows[row - top2], 0, 0)
|
|
37100
|
+
);
|
|
37101
|
+
}
|
|
37102
|
+
recomp();
|
|
37103
|
+
tr2.setSelection(
|
|
37104
|
+
new CellSelection(
|
|
37105
|
+
tr2.doc.resolve(tableStart + map4.positionAt(top2, left2, table)),
|
|
37106
|
+
tr2.doc.resolve(tableStart + map4.positionAt(bottom2 - 1, right2 - 1, table))
|
|
37107
|
+
)
|
|
37108
|
+
);
|
|
37109
|
+
dispatch(tr2);
|
|
37110
|
+
}
|
|
37111
|
+
var handleKeyDown$1 = keydownHandler({
|
|
37112
|
+
ArrowLeft: arrow$3("horiz", -1),
|
|
37113
|
+
ArrowRight: arrow$3("horiz", 1),
|
|
37114
|
+
ArrowUp: arrow$3("vert", -1),
|
|
37115
|
+
ArrowDown: arrow$3("vert", 1),
|
|
37116
|
+
"Shift-ArrowLeft": shiftArrow("horiz", -1),
|
|
37117
|
+
"Shift-ArrowRight": shiftArrow("horiz", 1),
|
|
37118
|
+
"Shift-ArrowUp": shiftArrow("vert", -1),
|
|
37119
|
+
"Shift-ArrowDown": shiftArrow("vert", 1),
|
|
37120
|
+
Backspace: deleteCellSelection,
|
|
37121
|
+
"Mod-Backspace": deleteCellSelection,
|
|
37122
|
+
Delete: deleteCellSelection,
|
|
37123
|
+
"Mod-Delete": deleteCellSelection
|
|
37124
|
+
});
|
|
37125
|
+
function maybeSetSelection(state2, dispatch, selection) {
|
|
37126
|
+
if (selection.eq(state2.selection))
|
|
37127
|
+
return false;
|
|
37128
|
+
if (dispatch)
|
|
37129
|
+
dispatch(state2.tr.setSelection(selection).scrollIntoView());
|
|
37130
|
+
return true;
|
|
37131
|
+
}
|
|
37132
|
+
function arrow$3(axis2, dir) {
|
|
37133
|
+
return (state2, dispatch, view) => {
|
|
37134
|
+
if (!view)
|
|
37135
|
+
return false;
|
|
37136
|
+
const sel = state2.selection;
|
|
37137
|
+
if (sel instanceof CellSelection) {
|
|
37138
|
+
return maybeSetSelection(
|
|
37139
|
+
state2,
|
|
37140
|
+
dispatch,
|
|
37141
|
+
Selection.near(sel.$headCell, dir)
|
|
37142
|
+
);
|
|
37143
|
+
}
|
|
37144
|
+
if (axis2 != "horiz" && !sel.empty)
|
|
37145
|
+
return false;
|
|
37146
|
+
const end2 = atEndOfCell(view, axis2, dir);
|
|
37147
|
+
if (end2 == null)
|
|
37148
|
+
return false;
|
|
37149
|
+
if (axis2 == "horiz") {
|
|
37150
|
+
return maybeSetSelection(
|
|
37151
|
+
state2,
|
|
37152
|
+
dispatch,
|
|
37153
|
+
Selection.near(state2.doc.resolve(sel.head + dir), dir)
|
|
37154
|
+
);
|
|
37155
|
+
} else {
|
|
37156
|
+
const $cell = state2.doc.resolve(end2);
|
|
37157
|
+
const $next = nextCell($cell, axis2, dir);
|
|
37158
|
+
let newSel;
|
|
37159
|
+
if ($next)
|
|
37160
|
+
newSel = Selection.near($next, 1);
|
|
37161
|
+
else if (dir < 0)
|
|
37162
|
+
newSel = Selection.near(state2.doc.resolve($cell.before(-1)), -1);
|
|
37163
|
+
else
|
|
37164
|
+
newSel = Selection.near(state2.doc.resolve($cell.after(-1)), 1);
|
|
37165
|
+
return maybeSetSelection(state2, dispatch, newSel);
|
|
37166
|
+
}
|
|
37167
|
+
};
|
|
37168
|
+
}
|
|
37169
|
+
function shiftArrow(axis2, dir) {
|
|
37170
|
+
return (state2, dispatch, view) => {
|
|
37171
|
+
if (!view)
|
|
37172
|
+
return false;
|
|
37173
|
+
const sel = state2.selection;
|
|
37174
|
+
let cellSel;
|
|
37175
|
+
if (sel instanceof CellSelection) {
|
|
37176
|
+
cellSel = sel;
|
|
37177
|
+
} else {
|
|
37178
|
+
const end2 = atEndOfCell(view, axis2, dir);
|
|
37179
|
+
if (end2 == null)
|
|
37180
|
+
return false;
|
|
37181
|
+
cellSel = new CellSelection(state2.doc.resolve(end2));
|
|
37182
|
+
}
|
|
37183
|
+
const $head = nextCell(cellSel.$headCell, axis2, dir);
|
|
37184
|
+
if (!$head)
|
|
37185
|
+
return false;
|
|
37186
|
+
return maybeSetSelection(
|
|
37187
|
+
state2,
|
|
37188
|
+
dispatch,
|
|
37189
|
+
new CellSelection(cellSel.$anchorCell, $head)
|
|
37190
|
+
);
|
|
37191
|
+
};
|
|
37192
|
+
}
|
|
37193
|
+
function handleTripleClick(view, pos) {
|
|
37194
|
+
const doc2 = view.state.doc, $cell = cellAround(doc2.resolve(pos));
|
|
37195
|
+
if (!$cell)
|
|
37196
|
+
return false;
|
|
37197
|
+
view.dispatch(view.state.tr.setSelection(new CellSelection($cell)));
|
|
37198
|
+
return true;
|
|
37199
|
+
}
|
|
37200
|
+
function handlePaste(view, _2, slice4) {
|
|
37201
|
+
if (!isInTable(view.state))
|
|
37202
|
+
return false;
|
|
37203
|
+
let cells = pastedCells(slice4);
|
|
37204
|
+
const sel = view.state.selection;
|
|
37205
|
+
if (sel instanceof CellSelection) {
|
|
37206
|
+
if (!cells)
|
|
37207
|
+
cells = {
|
|
37208
|
+
width: 1,
|
|
37209
|
+
height: 1,
|
|
37210
|
+
rows: [
|
|
37211
|
+
Fragment.from(
|
|
37212
|
+
fitSlice(tableNodeTypes(view.state.schema).cell, slice4)
|
|
37213
|
+
)
|
|
37214
|
+
]
|
|
37215
|
+
};
|
|
37216
|
+
const table = sel.$anchorCell.node(-1);
|
|
37217
|
+
const start2 = sel.$anchorCell.start(-1);
|
|
37218
|
+
const rect = TableMap.get(table).rectBetween(
|
|
37219
|
+
sel.$anchorCell.pos - start2,
|
|
37220
|
+
sel.$headCell.pos - start2
|
|
37221
|
+
);
|
|
37222
|
+
cells = clipCells(cells, rect.right - rect.left, rect.bottom - rect.top);
|
|
37223
|
+
insertCells(view.state, view.dispatch, start2, rect, cells);
|
|
37224
|
+
return true;
|
|
37225
|
+
} else if (cells) {
|
|
37226
|
+
const $cell = selectionCell(view.state);
|
|
37227
|
+
const start2 = $cell.start(-1);
|
|
37228
|
+
insertCells(
|
|
37229
|
+
view.state,
|
|
37230
|
+
view.dispatch,
|
|
37231
|
+
start2,
|
|
37232
|
+
TableMap.get($cell.node(-1)).findCell($cell.pos - start2),
|
|
37233
|
+
cells
|
|
37234
|
+
);
|
|
37235
|
+
return true;
|
|
37236
|
+
} else {
|
|
37237
|
+
return false;
|
|
37238
|
+
}
|
|
37239
|
+
}
|
|
37240
|
+
function handleMouseDown(view, startEvent) {
|
|
37241
|
+
var _a2;
|
|
37242
|
+
if (startEvent.ctrlKey || startEvent.metaKey)
|
|
37243
|
+
return;
|
|
37244
|
+
const startDOMCell = domInCell(view, startEvent.target);
|
|
37245
|
+
let $anchor;
|
|
37246
|
+
if (startEvent.shiftKey && view.state.selection instanceof CellSelection) {
|
|
37247
|
+
setCellSelection(view.state.selection.$anchorCell, startEvent);
|
|
37248
|
+
startEvent.preventDefault();
|
|
37249
|
+
} else if (startEvent.shiftKey && startDOMCell && ($anchor = cellAround(view.state.selection.$anchor)) != null && ((_a2 = cellUnderMouse(view, startEvent)) == null ? void 0 : _a2.pos) != $anchor.pos) {
|
|
37250
|
+
setCellSelection($anchor, startEvent);
|
|
37251
|
+
startEvent.preventDefault();
|
|
37252
|
+
} else if (!startDOMCell) {
|
|
37253
|
+
return;
|
|
37254
|
+
}
|
|
37255
|
+
function setCellSelection($anchor2, event) {
|
|
37256
|
+
let $head = cellUnderMouse(view, event);
|
|
37257
|
+
const starting = tableEditingKey.getState(view.state) == null;
|
|
37258
|
+
if (!$head || !inSameTable($anchor2, $head)) {
|
|
37259
|
+
if (starting)
|
|
37260
|
+
$head = $anchor2;
|
|
37261
|
+
else
|
|
37262
|
+
return;
|
|
37263
|
+
}
|
|
37264
|
+
const selection = new CellSelection($anchor2, $head);
|
|
37265
|
+
if (starting || !view.state.selection.eq(selection)) {
|
|
37266
|
+
const tr2 = view.state.tr.setSelection(selection);
|
|
37267
|
+
if (starting)
|
|
37268
|
+
tr2.setMeta(tableEditingKey, $anchor2.pos);
|
|
37269
|
+
view.dispatch(tr2);
|
|
37270
|
+
}
|
|
37271
|
+
}
|
|
37272
|
+
function stop() {
|
|
37273
|
+
view.root.removeEventListener("mouseup", stop);
|
|
37274
|
+
view.root.removeEventListener("dragstart", stop);
|
|
37275
|
+
view.root.removeEventListener("mousemove", move);
|
|
37276
|
+
if (tableEditingKey.getState(view.state) != null)
|
|
37277
|
+
view.dispatch(view.state.tr.setMeta(tableEditingKey, -1));
|
|
37278
|
+
}
|
|
37279
|
+
function move(_event) {
|
|
37280
|
+
const event = _event;
|
|
37281
|
+
const anchor = tableEditingKey.getState(view.state);
|
|
37282
|
+
let $anchor2;
|
|
37283
|
+
if (anchor != null) {
|
|
37284
|
+
$anchor2 = view.state.doc.resolve(anchor);
|
|
37285
|
+
} else if (domInCell(view, event.target) != startDOMCell) {
|
|
37286
|
+
$anchor2 = cellUnderMouse(view, startEvent);
|
|
37287
|
+
if (!$anchor2)
|
|
37288
|
+
return stop();
|
|
37289
|
+
}
|
|
37290
|
+
if ($anchor2)
|
|
37291
|
+
setCellSelection($anchor2, event);
|
|
37292
|
+
}
|
|
37293
|
+
view.root.addEventListener("mouseup", stop);
|
|
37294
|
+
view.root.addEventListener("dragstart", stop);
|
|
37295
|
+
view.root.addEventListener("mousemove", move);
|
|
37296
|
+
}
|
|
37297
|
+
function atEndOfCell(view, axis2, dir) {
|
|
36554
37298
|
if (!(view.state.selection instanceof TextSelection))
|
|
36555
37299
|
return null;
|
|
36556
37300
|
const { $head } = view.state.selection;
|
|
@@ -36584,28 +37328,37 @@ function cellUnderMouse(view, event) {
|
|
|
36584
37328
|
return mousePos ? cellAround(view.state.doc.resolve(mousePos.pos)) : null;
|
|
36585
37329
|
}
|
|
36586
37330
|
var TableView$1 = class TableView2 {
|
|
36587
|
-
constructor(node,
|
|
37331
|
+
constructor(node, defaultCellMinWidth) {
|
|
36588
37332
|
this.node = node;
|
|
36589
|
-
this.
|
|
37333
|
+
this.defaultCellMinWidth = defaultCellMinWidth;
|
|
36590
37334
|
this.dom = document.createElement("div");
|
|
36591
37335
|
this.dom.className = "tableWrapper";
|
|
36592
37336
|
this.table = this.dom.appendChild(document.createElement("table"));
|
|
37337
|
+
this.table.style.setProperty(
|
|
37338
|
+
"--default-cell-min-width",
|
|
37339
|
+
`${defaultCellMinWidth}px`
|
|
37340
|
+
);
|
|
36593
37341
|
this.colgroup = this.table.appendChild(document.createElement("colgroup"));
|
|
36594
|
-
updateColumnsOnResize(node, this.colgroup, this.table,
|
|
37342
|
+
updateColumnsOnResize(node, this.colgroup, this.table, defaultCellMinWidth);
|
|
36595
37343
|
this.contentDOM = this.table.appendChild(document.createElement("tbody"));
|
|
36596
37344
|
}
|
|
36597
37345
|
update(node) {
|
|
36598
37346
|
if (node.type != this.node.type)
|
|
36599
37347
|
return false;
|
|
36600
37348
|
this.node = node;
|
|
36601
|
-
updateColumnsOnResize(
|
|
37349
|
+
updateColumnsOnResize(
|
|
37350
|
+
node,
|
|
37351
|
+
this.colgroup,
|
|
37352
|
+
this.table,
|
|
37353
|
+
this.defaultCellMinWidth
|
|
37354
|
+
);
|
|
36602
37355
|
return true;
|
|
36603
37356
|
}
|
|
36604
37357
|
ignoreMutation(record) {
|
|
36605
37358
|
return record.type == "attributes" && (record.target == this.table || this.colgroup.contains(record.target));
|
|
36606
37359
|
}
|
|
36607
37360
|
};
|
|
36608
|
-
function updateColumnsOnResize(node, colgroup, table,
|
|
37361
|
+
function updateColumnsOnResize(node, colgroup, table, defaultCellMinWidth, overrideCol, overrideValue) {
|
|
36609
37362
|
var _a2;
|
|
36610
37363
|
let totalWidth = 0;
|
|
36611
37364
|
let fixedWidth = true;
|
|
@@ -36618,14 +37371,17 @@ function updateColumnsOnResize(node, colgroup, table, cellMinWidth, overrideCol,
|
|
|
36618
37371
|
for (let j2 = 0; j2 < colspan; j2++, col++) {
|
|
36619
37372
|
const hasWidth = overrideCol == col ? overrideValue : colwidth && colwidth[j2];
|
|
36620
37373
|
const cssWidth = hasWidth ? hasWidth + "px" : "";
|
|
36621
|
-
totalWidth += hasWidth ||
|
|
37374
|
+
totalWidth += hasWidth || defaultCellMinWidth;
|
|
36622
37375
|
if (!hasWidth)
|
|
36623
37376
|
fixedWidth = false;
|
|
36624
37377
|
if (!nextDOM) {
|
|
36625
|
-
|
|
37378
|
+
const col2 = document.createElement("col");
|
|
37379
|
+
col2.style.width = cssWidth;
|
|
37380
|
+
colgroup.appendChild(col2);
|
|
36626
37381
|
} else {
|
|
36627
|
-
if (nextDOM.style.width != cssWidth)
|
|
37382
|
+
if (nextDOM.style.width != cssWidth) {
|
|
36628
37383
|
nextDOM.style.width = cssWidth;
|
|
37384
|
+
}
|
|
36629
37385
|
nextDOM = nextDOM.nextSibling;
|
|
36630
37386
|
}
|
|
36631
37387
|
}
|
|
@@ -36649,6 +37405,7 @@ var columnResizingPluginKey = new PluginKey(
|
|
|
36649
37405
|
function columnResizing({
|
|
36650
37406
|
handleWidth = 5,
|
|
36651
37407
|
cellMinWidth = 25,
|
|
37408
|
+
defaultCellMinWidth = 100,
|
|
36652
37409
|
View = TableView$1,
|
|
36653
37410
|
lastColumnResizable = true
|
|
36654
37411
|
} = {}) {
|
|
@@ -36661,7 +37418,7 @@ function columnResizing({
|
|
|
36661
37418
|
const tableName = tableNodeTypes(state2.schema).table.name;
|
|
36662
37419
|
if (View && nodeViews) {
|
|
36663
37420
|
nodeViews[tableName] = (node, view) => {
|
|
36664
|
-
return new View(node,
|
|
37421
|
+
return new View(node, defaultCellMinWidth, view);
|
|
36665
37422
|
};
|
|
36666
37423
|
}
|
|
36667
37424
|
return new ResizeState(-1, false);
|
|
@@ -36677,19 +37434,13 @@ function columnResizing({
|
|
|
36677
37434
|
},
|
|
36678
37435
|
handleDOMEvents: {
|
|
36679
37436
|
mousemove: (view, event) => {
|
|
36680
|
-
handleMouseMove(
|
|
36681
|
-
view,
|
|
36682
|
-
event,
|
|
36683
|
-
handleWidth,
|
|
36684
|
-
cellMinWidth,
|
|
36685
|
-
lastColumnResizable
|
|
36686
|
-
);
|
|
37437
|
+
handleMouseMove(view, event, handleWidth, lastColumnResizable);
|
|
36687
37438
|
},
|
|
36688
37439
|
mouseleave: (view) => {
|
|
36689
37440
|
handleMouseLeave(view);
|
|
36690
37441
|
},
|
|
36691
37442
|
mousedown: (view, event) => {
|
|
36692
|
-
handleMouseDown2(view, event, cellMinWidth);
|
|
37443
|
+
handleMouseDown2(view, event, cellMinWidth, defaultCellMinWidth);
|
|
36693
37444
|
}
|
|
36694
37445
|
},
|
|
36695
37446
|
decorations: (state2) => {
|
|
@@ -36725,7 +37476,7 @@ var ResizeState = class _ResizeState {
|
|
|
36725
37476
|
return state2;
|
|
36726
37477
|
}
|
|
36727
37478
|
};
|
|
36728
|
-
function handleMouseMove(view, event, handleWidth,
|
|
37479
|
+
function handleMouseMove(view, event, handleWidth, lastColumnResizable) {
|
|
36729
37480
|
const pluginState = columnResizingPluginKey.getState(view.state);
|
|
36730
37481
|
if (!pluginState)
|
|
36731
37482
|
return;
|
|
@@ -36739,729 +37490,205 @@ function handleMouseMove(view, event, handleWidth, cellMinWidth, lastColumnResiz
|
|
|
36739
37490
|
else if (right2 - event.clientX <= handleWidth)
|
|
36740
37491
|
cell = edgeCell(view, event, "right", handleWidth);
|
|
36741
37492
|
}
|
|
36742
|
-
if (cell != pluginState.activeHandle) {
|
|
36743
|
-
if (!lastColumnResizable && cell !== -1) {
|
|
36744
|
-
const $cell = view.state.doc.resolve(cell);
|
|
36745
|
-
const table = $cell.node(-1);
|
|
36746
|
-
const map4 = TableMap.get(table);
|
|
36747
|
-
const tableStart = $cell.start(-1);
|
|
36748
|
-
const col = map4.colCount($cell.pos - tableStart) + $cell.nodeAfter.attrs.colspan - 1;
|
|
36749
|
-
if (col == map4.width - 1) {
|
|
36750
|
-
return;
|
|
36751
|
-
}
|
|
36752
|
-
}
|
|
36753
|
-
updateHandle(view, cell);
|
|
36754
|
-
}
|
|
36755
|
-
}
|
|
36756
|
-
}
|
|
36757
|
-
function handleMouseLeave(view) {
|
|
36758
|
-
const pluginState = columnResizingPluginKey.getState(view.state);
|
|
36759
|
-
if (pluginState && pluginState.activeHandle > -1 && !pluginState.dragging)
|
|
36760
|
-
updateHandle(view, -1);
|
|
36761
|
-
}
|
|
36762
|
-
function handleMouseDown2(view, event, cellMinWidth) {
|
|
36763
|
-
var _a2;
|
|
36764
|
-
const win = (_a2 = view.dom.ownerDocument.defaultView) != null ? _a2 : window;
|
|
36765
|
-
const pluginState = columnResizingPluginKey.getState(view.state);
|
|
36766
|
-
if (!pluginState || pluginState.activeHandle == -1 || pluginState.dragging)
|
|
36767
|
-
return false;
|
|
36768
|
-
const cell = view.state.doc.nodeAt(pluginState.activeHandle);
|
|
36769
|
-
const width = currentColWidth(view, pluginState.activeHandle, cell.attrs);
|
|
36770
|
-
view.dispatch(
|
|
36771
|
-
view.state.tr.setMeta(columnResizingPluginKey, {
|
|
36772
|
-
setDragging: { startX: event.clientX, startWidth: width }
|
|
36773
|
-
})
|
|
36774
|
-
);
|
|
36775
|
-
function finish(event2) {
|
|
36776
|
-
win.removeEventListener("mouseup", finish);
|
|
36777
|
-
win.removeEventListener("mousemove", move);
|
|
36778
|
-
const pluginState2 = columnResizingPluginKey.getState(view.state);
|
|
36779
|
-
if (pluginState2 == null ? void 0 : pluginState2.dragging) {
|
|
36780
|
-
updateColumnWidth(
|
|
36781
|
-
view,
|
|
36782
|
-
pluginState2.activeHandle,
|
|
36783
|
-
draggedWidth(pluginState2.dragging, event2, cellMinWidth)
|
|
36784
|
-
);
|
|
36785
|
-
view.dispatch(
|
|
36786
|
-
view.state.tr.setMeta(columnResizingPluginKey, { setDragging: null })
|
|
36787
|
-
);
|
|
36788
|
-
}
|
|
36789
|
-
}
|
|
36790
|
-
function move(event2) {
|
|
36791
|
-
if (!event2.which)
|
|
36792
|
-
return finish(event2);
|
|
36793
|
-
const pluginState2 = columnResizingPluginKey.getState(view.state);
|
|
36794
|
-
if (!pluginState2)
|
|
36795
|
-
return;
|
|
36796
|
-
if (pluginState2.dragging) {
|
|
36797
|
-
const dragged = draggedWidth(pluginState2.dragging, event2, cellMinWidth);
|
|
36798
|
-
displayColumnWidth(view, pluginState2.activeHandle, dragged, cellMinWidth);
|
|
36799
|
-
}
|
|
36800
|
-
}
|
|
36801
|
-
win.addEventListener("mouseup", finish);
|
|
36802
|
-
win.addEventListener("mousemove", move);
|
|
36803
|
-
event.preventDefault();
|
|
36804
|
-
return true;
|
|
36805
|
-
}
|
|
36806
|
-
function currentColWidth(view, cellPos, { colspan, colwidth }) {
|
|
36807
|
-
const width = colwidth && colwidth[colwidth.length - 1];
|
|
36808
|
-
if (width)
|
|
36809
|
-
return width;
|
|
36810
|
-
const dom = view.domAtPos(cellPos);
|
|
36811
|
-
const node = dom.node.childNodes[dom.offset];
|
|
36812
|
-
let domWidth = node.offsetWidth, parts = colspan;
|
|
36813
|
-
if (colwidth) {
|
|
36814
|
-
for (let i2 = 0; i2 < colspan; i2++)
|
|
36815
|
-
if (colwidth[i2]) {
|
|
36816
|
-
domWidth -= colwidth[i2];
|
|
36817
|
-
parts--;
|
|
36818
|
-
}
|
|
36819
|
-
}
|
|
36820
|
-
return domWidth / parts;
|
|
36821
|
-
}
|
|
36822
|
-
function domCellAround(target) {
|
|
36823
|
-
while (target && target.nodeName != "TD" && target.nodeName != "TH")
|
|
36824
|
-
target = target.classList && target.classList.contains("ProseMirror") ? null : target.parentNode;
|
|
36825
|
-
return target;
|
|
36826
|
-
}
|
|
36827
|
-
function edgeCell(view, event, side, handleWidth) {
|
|
36828
|
-
const offset2 = side == "right" ? -handleWidth : handleWidth;
|
|
36829
|
-
const found2 = view.posAtCoords({
|
|
36830
|
-
left: event.clientX + offset2,
|
|
36831
|
-
top: event.clientY
|
|
36832
|
-
});
|
|
36833
|
-
if (!found2)
|
|
36834
|
-
return -1;
|
|
36835
|
-
const { pos } = found2;
|
|
36836
|
-
const $cell = cellAround(view.state.doc.resolve(pos));
|
|
36837
|
-
if (!$cell)
|
|
36838
|
-
return -1;
|
|
36839
|
-
if (side == "right")
|
|
36840
|
-
return $cell.pos;
|
|
36841
|
-
const map4 = TableMap.get($cell.node(-1)), start2 = $cell.start(-1);
|
|
36842
|
-
const index2 = map4.map.indexOf($cell.pos - start2);
|
|
36843
|
-
return index2 % map4.width == 0 ? -1 : start2 + map4.map[index2 - 1];
|
|
36844
|
-
}
|
|
36845
|
-
function draggedWidth(dragging, event, cellMinWidth) {
|
|
36846
|
-
const offset2 = event.clientX - dragging.startX;
|
|
36847
|
-
return Math.max(cellMinWidth, dragging.startWidth + offset2);
|
|
36848
|
-
}
|
|
36849
|
-
function updateHandle(view, value) {
|
|
36850
|
-
view.dispatch(
|
|
36851
|
-
view.state.tr.setMeta(columnResizingPluginKey, { setHandle: value })
|
|
36852
|
-
);
|
|
36853
|
-
}
|
|
36854
|
-
function updateColumnWidth(view, cell, width) {
|
|
36855
|
-
const $cell = view.state.doc.resolve(cell);
|
|
36856
|
-
const table = $cell.node(-1), map4 = TableMap.get(table), start2 = $cell.start(-1);
|
|
36857
|
-
const col = map4.colCount($cell.pos - start2) + $cell.nodeAfter.attrs.colspan - 1;
|
|
36858
|
-
const tr2 = view.state.tr;
|
|
36859
|
-
for (let row = 0; row < map4.height; row++) {
|
|
36860
|
-
const mapIndex = row * map4.width + col;
|
|
36861
|
-
if (row && map4.map[mapIndex] == map4.map[mapIndex - map4.width])
|
|
36862
|
-
continue;
|
|
36863
|
-
const pos = map4.map[mapIndex];
|
|
36864
|
-
const attrs = table.nodeAt(pos).attrs;
|
|
36865
|
-
const index2 = attrs.colspan == 1 ? 0 : col - map4.colCount(pos);
|
|
36866
|
-
if (attrs.colwidth && attrs.colwidth[index2] == width)
|
|
36867
|
-
continue;
|
|
36868
|
-
const colwidth = attrs.colwidth ? attrs.colwidth.slice() : zeroes(attrs.colspan);
|
|
36869
|
-
colwidth[index2] = width;
|
|
36870
|
-
tr2.setNodeMarkup(start2 + pos, null, { ...attrs, colwidth });
|
|
36871
|
-
}
|
|
36872
|
-
if (tr2.docChanged)
|
|
36873
|
-
view.dispatch(tr2);
|
|
36874
|
-
}
|
|
36875
|
-
function displayColumnWidth(view, cell, width, cellMinWidth) {
|
|
36876
|
-
const $cell = view.state.doc.resolve(cell);
|
|
36877
|
-
const table = $cell.node(-1), start2 = $cell.start(-1);
|
|
36878
|
-
const col = TableMap.get(table).colCount($cell.pos - start2) + $cell.nodeAfter.attrs.colspan - 1;
|
|
36879
|
-
let dom = view.domAtPos($cell.start(-1)).node;
|
|
36880
|
-
while (dom && dom.nodeName != "TABLE") {
|
|
36881
|
-
dom = dom.parentNode;
|
|
36882
|
-
}
|
|
36883
|
-
if (!dom)
|
|
36884
|
-
return;
|
|
36885
|
-
updateColumnsOnResize(
|
|
36886
|
-
table,
|
|
36887
|
-
dom.firstChild,
|
|
36888
|
-
dom,
|
|
36889
|
-
cellMinWidth,
|
|
36890
|
-
col,
|
|
36891
|
-
width
|
|
36892
|
-
);
|
|
36893
|
-
}
|
|
36894
|
-
function zeroes(n2) {
|
|
36895
|
-
return Array(n2).fill(0);
|
|
36896
|
-
}
|
|
36897
|
-
function handleDecorations(state2, cell) {
|
|
36898
|
-
const decorations = [];
|
|
36899
|
-
const $cell = state2.doc.resolve(cell);
|
|
36900
|
-
const table = $cell.node(-1);
|
|
36901
|
-
if (!table) {
|
|
36902
|
-
return DecorationSet.empty;
|
|
36903
|
-
}
|
|
36904
|
-
const map4 = TableMap.get(table);
|
|
36905
|
-
const start2 = $cell.start(-1);
|
|
36906
|
-
const col = map4.colCount($cell.pos - start2) + $cell.nodeAfter.attrs.colspan - 1;
|
|
36907
|
-
for (let row = 0; row < map4.height; row++) {
|
|
36908
|
-
const index2 = col + row * map4.width;
|
|
36909
|
-
if ((col == map4.width - 1 || map4.map[index2] != map4.map[index2 + 1]) && (row == 0 || map4.map[index2] != map4.map[index2 - map4.width])) {
|
|
36910
|
-
const cellPos = map4.map[index2];
|
|
36911
|
-
const pos = start2 + cellPos + table.nodeAt(cellPos).nodeSize - 1;
|
|
36912
|
-
const dom = document.createElement("div");
|
|
36913
|
-
dom.className = "column-resize-handle";
|
|
36914
|
-
decorations.push(Decoration.widget(pos, dom));
|
|
36915
|
-
}
|
|
36916
|
-
}
|
|
36917
|
-
return DecorationSet.create(state2.doc, decorations);
|
|
36918
|
-
}
|
|
36919
|
-
function selectedRect(state2) {
|
|
36920
|
-
const sel = state2.selection;
|
|
36921
|
-
const $pos = selectionCell(state2);
|
|
36922
|
-
const table = $pos.node(-1);
|
|
36923
|
-
const tableStart = $pos.start(-1);
|
|
36924
|
-
const map4 = TableMap.get(table);
|
|
36925
|
-
const rect = sel instanceof CellSelection ? map4.rectBetween(
|
|
36926
|
-
sel.$anchorCell.pos - tableStart,
|
|
36927
|
-
sel.$headCell.pos - tableStart
|
|
36928
|
-
) : map4.findCell($pos.pos - tableStart);
|
|
36929
|
-
return { ...rect, tableStart, map: map4, table };
|
|
36930
|
-
}
|
|
36931
|
-
function addColumn(tr2, { map: map4, tableStart, table }, col) {
|
|
36932
|
-
let refColumn = col > 0 ? -1 : 0;
|
|
36933
|
-
if (columnIsHeader(map4, table, col + refColumn)) {
|
|
36934
|
-
refColumn = col == 0 || col == map4.width ? null : 0;
|
|
36935
|
-
}
|
|
36936
|
-
for (let row = 0; row < map4.height; row++) {
|
|
36937
|
-
const index2 = row * map4.width + col;
|
|
36938
|
-
if (col > 0 && col < map4.width && map4.map[index2 - 1] == map4.map[index2]) {
|
|
36939
|
-
const pos = map4.map[index2];
|
|
36940
|
-
const cell = table.nodeAt(pos);
|
|
36941
|
-
tr2.setNodeMarkup(
|
|
36942
|
-
tr2.mapping.map(tableStart + pos),
|
|
36943
|
-
null,
|
|
36944
|
-
addColSpan(cell.attrs, col - map4.colCount(pos))
|
|
36945
|
-
);
|
|
36946
|
-
row += cell.attrs.rowspan - 1;
|
|
36947
|
-
} else {
|
|
36948
|
-
const type3 = refColumn == null ? tableNodeTypes(table.type.schema).cell : table.nodeAt(map4.map[index2 + refColumn]).type;
|
|
36949
|
-
const pos = map4.positionAt(row, col, table);
|
|
36950
|
-
tr2.insert(tr2.mapping.map(tableStart + pos), type3.createAndFill());
|
|
36951
|
-
}
|
|
36952
|
-
}
|
|
36953
|
-
return tr2;
|
|
36954
|
-
}
|
|
36955
|
-
function addColumnBefore(state2, dispatch) {
|
|
36956
|
-
if (!isInTable(state2))
|
|
36957
|
-
return false;
|
|
36958
|
-
if (dispatch) {
|
|
36959
|
-
const rect = selectedRect(state2);
|
|
36960
|
-
dispatch(addColumn(state2.tr, rect, rect.left));
|
|
36961
|
-
}
|
|
36962
|
-
return true;
|
|
36963
|
-
}
|
|
36964
|
-
function addColumnAfter(state2, dispatch) {
|
|
36965
|
-
if (!isInTable(state2))
|
|
36966
|
-
return false;
|
|
36967
|
-
if (dispatch) {
|
|
36968
|
-
const rect = selectedRect(state2);
|
|
36969
|
-
dispatch(addColumn(state2.tr, rect, rect.right));
|
|
36970
|
-
}
|
|
36971
|
-
return true;
|
|
36972
|
-
}
|
|
36973
|
-
function removeColumn(tr2, { map: map4, table, tableStart }, col) {
|
|
36974
|
-
const mapStart = tr2.mapping.maps.length;
|
|
36975
|
-
for (let row = 0; row < map4.height; ) {
|
|
36976
|
-
const index2 = row * map4.width + col;
|
|
36977
|
-
const pos = map4.map[index2];
|
|
36978
|
-
const cell = table.nodeAt(pos);
|
|
36979
|
-
const attrs = cell.attrs;
|
|
36980
|
-
if (col > 0 && map4.map[index2 - 1] == pos || col < map4.width - 1 && map4.map[index2 + 1] == pos) {
|
|
36981
|
-
tr2.setNodeMarkup(
|
|
36982
|
-
tr2.mapping.slice(mapStart).map(tableStart + pos),
|
|
36983
|
-
null,
|
|
36984
|
-
removeColSpan(attrs, col - map4.colCount(pos))
|
|
36985
|
-
);
|
|
36986
|
-
} else {
|
|
36987
|
-
const start2 = tr2.mapping.slice(mapStart).map(tableStart + pos);
|
|
36988
|
-
tr2.delete(start2, start2 + cell.nodeSize);
|
|
36989
|
-
}
|
|
36990
|
-
row += attrs.rowspan;
|
|
36991
|
-
}
|
|
36992
|
-
}
|
|
36993
|
-
function deleteColumn(state2, dispatch) {
|
|
36994
|
-
if (!isInTable(state2))
|
|
36995
|
-
return false;
|
|
36996
|
-
if (dispatch) {
|
|
36997
|
-
const rect = selectedRect(state2);
|
|
36998
|
-
const tr2 = state2.tr;
|
|
36999
|
-
if (rect.left == 0 && rect.right == rect.map.width)
|
|
37000
|
-
return false;
|
|
37001
|
-
for (let i2 = rect.right - 1; ; i2--) {
|
|
37002
|
-
removeColumn(tr2, rect, i2);
|
|
37003
|
-
if (i2 == rect.left)
|
|
37004
|
-
break;
|
|
37005
|
-
const table = rect.tableStart ? tr2.doc.nodeAt(rect.tableStart - 1) : tr2.doc;
|
|
37006
|
-
if (!table) {
|
|
37007
|
-
throw RangeError("No table found");
|
|
37008
|
-
}
|
|
37009
|
-
rect.table = table;
|
|
37010
|
-
rect.map = TableMap.get(table);
|
|
37011
|
-
}
|
|
37012
|
-
dispatch(tr2);
|
|
37013
|
-
}
|
|
37014
|
-
return true;
|
|
37015
|
-
}
|
|
37016
|
-
function rowIsHeader(map4, table, row) {
|
|
37017
|
-
var _a2;
|
|
37018
|
-
const headerCell = tableNodeTypes(table.type.schema).header_cell;
|
|
37019
|
-
for (let col = 0; col < map4.width; col++)
|
|
37020
|
-
if (((_a2 = table.nodeAt(map4.map[col + row * map4.width])) == null ? void 0 : _a2.type) != headerCell)
|
|
37021
|
-
return false;
|
|
37022
|
-
return true;
|
|
37023
|
-
}
|
|
37024
|
-
function addRow(tr2, { map: map4, tableStart, table }, row) {
|
|
37025
|
-
var _a2;
|
|
37026
|
-
let rowPos = tableStart;
|
|
37027
|
-
for (let i2 = 0; i2 < row; i2++)
|
|
37028
|
-
rowPos += table.child(i2).nodeSize;
|
|
37029
|
-
const cells = [];
|
|
37030
|
-
let refRow = row > 0 ? -1 : 0;
|
|
37031
|
-
if (rowIsHeader(map4, table, row + refRow))
|
|
37032
|
-
refRow = row == 0 || row == map4.height ? null : 0;
|
|
37033
|
-
for (let col = 0, index2 = map4.width * row; col < map4.width; col++, index2++) {
|
|
37034
|
-
if (row > 0 && row < map4.height && map4.map[index2] == map4.map[index2 - map4.width]) {
|
|
37035
|
-
const pos = map4.map[index2];
|
|
37036
|
-
const attrs = table.nodeAt(pos).attrs;
|
|
37037
|
-
tr2.setNodeMarkup(tableStart + pos, null, {
|
|
37038
|
-
...attrs,
|
|
37039
|
-
rowspan: attrs.rowspan + 1
|
|
37040
|
-
});
|
|
37041
|
-
col += attrs.colspan - 1;
|
|
37042
|
-
} else {
|
|
37043
|
-
const type3 = refRow == null ? tableNodeTypes(table.type.schema).cell : (_a2 = table.nodeAt(map4.map[index2 + refRow * map4.width])) == null ? void 0 : _a2.type;
|
|
37044
|
-
const node = type3 == null ? void 0 : type3.createAndFill();
|
|
37045
|
-
if (node)
|
|
37046
|
-
cells.push(node);
|
|
37047
|
-
}
|
|
37048
|
-
}
|
|
37049
|
-
tr2.insert(rowPos, tableNodeTypes(table.type.schema).row.create(null, cells));
|
|
37050
|
-
return tr2;
|
|
37051
|
-
}
|
|
37052
|
-
function addRowBefore(state2, dispatch) {
|
|
37053
|
-
if (!isInTable(state2))
|
|
37054
|
-
return false;
|
|
37055
|
-
if (dispatch) {
|
|
37056
|
-
const rect = selectedRect(state2);
|
|
37057
|
-
dispatch(addRow(state2.tr, rect, rect.top));
|
|
37058
|
-
}
|
|
37059
|
-
return true;
|
|
37060
|
-
}
|
|
37061
|
-
function addRowAfter(state2, dispatch) {
|
|
37062
|
-
if (!isInTable(state2))
|
|
37063
|
-
return false;
|
|
37064
|
-
if (dispatch) {
|
|
37065
|
-
const rect = selectedRect(state2);
|
|
37066
|
-
dispatch(addRow(state2.tr, rect, rect.bottom));
|
|
37067
|
-
}
|
|
37068
|
-
return true;
|
|
37069
|
-
}
|
|
37070
|
-
function removeRow(tr2, { map: map4, table, tableStart }, row) {
|
|
37071
|
-
let rowPos = 0;
|
|
37072
|
-
for (let i2 = 0; i2 < row; i2++)
|
|
37073
|
-
rowPos += table.child(i2).nodeSize;
|
|
37074
|
-
const nextRow = rowPos + table.child(row).nodeSize;
|
|
37075
|
-
const mapFrom = tr2.mapping.maps.length;
|
|
37076
|
-
tr2.delete(rowPos + tableStart, nextRow + tableStart);
|
|
37077
|
-
const seen = /* @__PURE__ */ new Set();
|
|
37078
|
-
for (let col = 0, index2 = row * map4.width; col < map4.width; col++, index2++) {
|
|
37079
|
-
const pos = map4.map[index2];
|
|
37080
|
-
if (seen.has(pos))
|
|
37081
|
-
continue;
|
|
37082
|
-
seen.add(pos);
|
|
37083
|
-
if (row > 0 && pos == map4.map[index2 - map4.width]) {
|
|
37084
|
-
const attrs = table.nodeAt(pos).attrs;
|
|
37085
|
-
tr2.setNodeMarkup(tr2.mapping.slice(mapFrom).map(pos + tableStart), null, {
|
|
37086
|
-
...attrs,
|
|
37087
|
-
rowspan: attrs.rowspan - 1
|
|
37088
|
-
});
|
|
37089
|
-
col += attrs.colspan - 1;
|
|
37090
|
-
} else if (row < map4.height && pos == map4.map[index2 + map4.width]) {
|
|
37091
|
-
const cell = table.nodeAt(pos);
|
|
37092
|
-
const attrs = cell.attrs;
|
|
37093
|
-
const copy2 = cell.type.create(
|
|
37094
|
-
{ ...attrs, rowspan: cell.attrs.rowspan - 1 },
|
|
37095
|
-
cell.content
|
|
37096
|
-
);
|
|
37097
|
-
const newPos = map4.positionAt(row + 1, col, table);
|
|
37098
|
-
tr2.insert(tr2.mapping.slice(mapFrom).map(tableStart + newPos), copy2);
|
|
37099
|
-
col += attrs.colspan - 1;
|
|
37100
|
-
}
|
|
37101
|
-
}
|
|
37102
|
-
}
|
|
37103
|
-
function deleteRow(state2, dispatch) {
|
|
37104
|
-
if (!isInTable(state2))
|
|
37105
|
-
return false;
|
|
37106
|
-
if (dispatch) {
|
|
37107
|
-
const rect = selectedRect(state2), tr2 = state2.tr;
|
|
37108
|
-
if (rect.top == 0 && rect.bottom == rect.map.height)
|
|
37109
|
-
return false;
|
|
37110
|
-
for (let i2 = rect.bottom - 1; ; i2--) {
|
|
37111
|
-
removeRow(tr2, rect, i2);
|
|
37112
|
-
if (i2 == rect.top)
|
|
37113
|
-
break;
|
|
37114
|
-
const table = rect.tableStart ? tr2.doc.nodeAt(rect.tableStart - 1) : tr2.doc;
|
|
37115
|
-
if (!table) {
|
|
37116
|
-
throw RangeError("No table found");
|
|
37117
|
-
}
|
|
37118
|
-
rect.table = table;
|
|
37119
|
-
rect.map = TableMap.get(rect.table);
|
|
37120
|
-
}
|
|
37121
|
-
dispatch(tr2);
|
|
37122
|
-
}
|
|
37123
|
-
return true;
|
|
37124
|
-
}
|
|
37125
|
-
function isEmpty(cell) {
|
|
37126
|
-
const c2 = cell.content;
|
|
37127
|
-
return c2.childCount == 1 && c2.child(0).isTextblock && c2.child(0).childCount == 0;
|
|
37128
|
-
}
|
|
37129
|
-
function cellsOverlapRectangle({ width, height, map: map4 }, rect) {
|
|
37130
|
-
let indexTop = rect.top * width + rect.left, indexLeft = indexTop;
|
|
37131
|
-
let indexBottom = (rect.bottom - 1) * width + rect.left, indexRight = indexTop + (rect.right - rect.left - 1);
|
|
37132
|
-
for (let i2 = rect.top; i2 < rect.bottom; i2++) {
|
|
37133
|
-
if (rect.left > 0 && map4[indexLeft] == map4[indexLeft - 1] || rect.right < width && map4[indexRight] == map4[indexRight + 1])
|
|
37134
|
-
return true;
|
|
37135
|
-
indexLeft += width;
|
|
37136
|
-
indexRight += width;
|
|
37137
|
-
}
|
|
37138
|
-
for (let i2 = rect.left; i2 < rect.right; i2++) {
|
|
37139
|
-
if (rect.top > 0 && map4[indexTop] == map4[indexTop - width] || rect.bottom < height && map4[indexBottom] == map4[indexBottom + width])
|
|
37140
|
-
return true;
|
|
37141
|
-
indexTop++;
|
|
37142
|
-
indexBottom++;
|
|
37143
|
-
}
|
|
37144
|
-
return false;
|
|
37145
|
-
}
|
|
37146
|
-
function mergeCells(state2, dispatch) {
|
|
37147
|
-
const sel = state2.selection;
|
|
37148
|
-
if (!(sel instanceof CellSelection) || sel.$anchorCell.pos == sel.$headCell.pos)
|
|
37149
|
-
return false;
|
|
37150
|
-
const rect = selectedRect(state2), { map: map4 } = rect;
|
|
37151
|
-
if (cellsOverlapRectangle(map4, rect))
|
|
37152
|
-
return false;
|
|
37153
|
-
if (dispatch) {
|
|
37154
|
-
const tr2 = state2.tr;
|
|
37155
|
-
const seen = {};
|
|
37156
|
-
let content = Fragment.empty;
|
|
37157
|
-
let mergedPos;
|
|
37158
|
-
let mergedCell;
|
|
37159
|
-
for (let row = rect.top; row < rect.bottom; row++) {
|
|
37160
|
-
for (let col = rect.left; col < rect.right; col++) {
|
|
37161
|
-
const cellPos = map4.map[row * map4.width + col];
|
|
37162
|
-
const cell = rect.table.nodeAt(cellPos);
|
|
37163
|
-
if (seen[cellPos] || !cell)
|
|
37164
|
-
continue;
|
|
37165
|
-
seen[cellPos] = true;
|
|
37166
|
-
if (mergedPos == null) {
|
|
37167
|
-
mergedPos = cellPos;
|
|
37168
|
-
mergedCell = cell;
|
|
37169
|
-
} else {
|
|
37170
|
-
if (!isEmpty(cell))
|
|
37171
|
-
content = content.append(cell.content);
|
|
37172
|
-
const mapped = tr2.mapping.map(cellPos + rect.tableStart);
|
|
37173
|
-
tr2.delete(mapped, mapped + cell.nodeSize);
|
|
37174
|
-
}
|
|
37175
|
-
}
|
|
37176
|
-
}
|
|
37177
|
-
if (mergedPos == null || mergedCell == null) {
|
|
37178
|
-
return true;
|
|
37179
|
-
}
|
|
37180
|
-
tr2.setNodeMarkup(mergedPos + rect.tableStart, null, {
|
|
37181
|
-
...addColSpan(
|
|
37182
|
-
mergedCell.attrs,
|
|
37183
|
-
mergedCell.attrs.colspan,
|
|
37184
|
-
rect.right - rect.left - mergedCell.attrs.colspan
|
|
37185
|
-
),
|
|
37186
|
-
rowspan: rect.bottom - rect.top
|
|
37187
|
-
});
|
|
37188
|
-
if (content.size) {
|
|
37189
|
-
const end2 = mergedPos + 1 + mergedCell.content.size;
|
|
37190
|
-
const start2 = isEmpty(mergedCell) ? mergedPos + 1 : end2;
|
|
37191
|
-
tr2.replaceWith(start2 + rect.tableStart, end2 + rect.tableStart, content);
|
|
37192
|
-
}
|
|
37193
|
-
tr2.setSelection(
|
|
37194
|
-
new CellSelection(tr2.doc.resolve(mergedPos + rect.tableStart))
|
|
37195
|
-
);
|
|
37196
|
-
dispatch(tr2);
|
|
37197
|
-
}
|
|
37198
|
-
return true;
|
|
37199
|
-
}
|
|
37200
|
-
function splitCell(state2, dispatch) {
|
|
37201
|
-
const nodeTypes = tableNodeTypes(state2.schema);
|
|
37202
|
-
return splitCellWithType(({ node }) => {
|
|
37203
|
-
return nodeTypes[node.type.spec.tableRole];
|
|
37204
|
-
})(state2, dispatch);
|
|
37205
|
-
}
|
|
37206
|
-
function splitCellWithType(getCellType) {
|
|
37207
|
-
return (state2, dispatch) => {
|
|
37208
|
-
var _a2;
|
|
37209
|
-
const sel = state2.selection;
|
|
37210
|
-
let cellNode;
|
|
37211
|
-
let cellPos;
|
|
37212
|
-
if (!(sel instanceof CellSelection)) {
|
|
37213
|
-
cellNode = cellWrapping(sel.$from);
|
|
37214
|
-
if (!cellNode)
|
|
37215
|
-
return false;
|
|
37216
|
-
cellPos = (_a2 = cellAround(sel.$from)) == null ? void 0 : _a2.pos;
|
|
37217
|
-
} else {
|
|
37218
|
-
if (sel.$anchorCell.pos != sel.$headCell.pos)
|
|
37219
|
-
return false;
|
|
37220
|
-
cellNode = sel.$anchorCell.nodeAfter;
|
|
37221
|
-
cellPos = sel.$anchorCell.pos;
|
|
37222
|
-
}
|
|
37223
|
-
if (cellNode == null || cellPos == null) {
|
|
37224
|
-
return false;
|
|
37225
|
-
}
|
|
37226
|
-
if (cellNode.attrs.colspan == 1 && cellNode.attrs.rowspan == 1) {
|
|
37227
|
-
return false;
|
|
37228
|
-
}
|
|
37229
|
-
if (dispatch) {
|
|
37230
|
-
let baseAttrs = cellNode.attrs;
|
|
37231
|
-
const attrs = [];
|
|
37232
|
-
const colwidth = baseAttrs.colwidth;
|
|
37233
|
-
if (baseAttrs.rowspan > 1)
|
|
37234
|
-
baseAttrs = { ...baseAttrs, rowspan: 1 };
|
|
37235
|
-
if (baseAttrs.colspan > 1)
|
|
37236
|
-
baseAttrs = { ...baseAttrs, colspan: 1 };
|
|
37237
|
-
const rect = selectedRect(state2), tr2 = state2.tr;
|
|
37238
|
-
for (let i2 = 0; i2 < rect.right - rect.left; i2++)
|
|
37239
|
-
attrs.push(
|
|
37240
|
-
colwidth ? {
|
|
37241
|
-
...baseAttrs,
|
|
37242
|
-
colwidth: colwidth && colwidth[i2] ? [colwidth[i2]] : null
|
|
37243
|
-
} : baseAttrs
|
|
37244
|
-
);
|
|
37245
|
-
let lastCell;
|
|
37246
|
-
for (let row = rect.top; row < rect.bottom; row++) {
|
|
37247
|
-
let pos = rect.map.positionAt(row, rect.left, rect.table);
|
|
37248
|
-
if (row == rect.top)
|
|
37249
|
-
pos += cellNode.nodeSize;
|
|
37250
|
-
for (let col = rect.left, i2 = 0; col < rect.right; col++, i2++) {
|
|
37251
|
-
if (col == rect.left && row == rect.top)
|
|
37252
|
-
continue;
|
|
37253
|
-
tr2.insert(
|
|
37254
|
-
lastCell = tr2.mapping.map(pos + rect.tableStart, 1),
|
|
37255
|
-
getCellType({ node: cellNode, row, col }).createAndFill(attrs[i2])
|
|
37256
|
-
);
|
|
37257
|
-
}
|
|
37258
|
-
}
|
|
37259
|
-
tr2.setNodeMarkup(
|
|
37260
|
-
cellPos,
|
|
37261
|
-
getCellType({ node: cellNode, row: rect.top, col: rect.left }),
|
|
37262
|
-
attrs[0]
|
|
37263
|
-
);
|
|
37264
|
-
if (sel instanceof CellSelection)
|
|
37265
|
-
tr2.setSelection(
|
|
37266
|
-
new CellSelection(
|
|
37267
|
-
tr2.doc.resolve(sel.$anchorCell.pos),
|
|
37268
|
-
lastCell ? tr2.doc.resolve(lastCell) : void 0
|
|
37269
|
-
)
|
|
37270
|
-
);
|
|
37271
|
-
dispatch(tr2);
|
|
37493
|
+
if (cell != pluginState.activeHandle) {
|
|
37494
|
+
if (!lastColumnResizable && cell !== -1) {
|
|
37495
|
+
const $cell = view.state.doc.resolve(cell);
|
|
37496
|
+
const table = $cell.node(-1);
|
|
37497
|
+
const map4 = TableMap.get(table);
|
|
37498
|
+
const tableStart = $cell.start(-1);
|
|
37499
|
+
const col = map4.colCount($cell.pos - tableStart) + $cell.nodeAfter.attrs.colspan - 1;
|
|
37500
|
+
if (col == map4.width - 1) {
|
|
37501
|
+
return;
|
|
37502
|
+
}
|
|
37503
|
+
}
|
|
37504
|
+
updateHandle(view, cell);
|
|
37272
37505
|
}
|
|
37273
|
-
|
|
37274
|
-
};
|
|
37506
|
+
}
|
|
37275
37507
|
}
|
|
37276
|
-
function
|
|
37277
|
-
|
|
37278
|
-
|
|
37279
|
-
|
|
37280
|
-
const $cell = selectionCell(state2);
|
|
37281
|
-
if ($cell.nodeAfter.attrs[name] === value)
|
|
37282
|
-
return false;
|
|
37283
|
-
if (dispatch) {
|
|
37284
|
-
const tr2 = state2.tr;
|
|
37285
|
-
if (state2.selection instanceof CellSelection)
|
|
37286
|
-
state2.selection.forEachCell((node, pos) => {
|
|
37287
|
-
if (node.attrs[name] !== value)
|
|
37288
|
-
tr2.setNodeMarkup(pos, null, {
|
|
37289
|
-
...node.attrs,
|
|
37290
|
-
[name]: value
|
|
37291
|
-
});
|
|
37292
|
-
});
|
|
37293
|
-
else
|
|
37294
|
-
tr2.setNodeMarkup($cell.pos, null, {
|
|
37295
|
-
...$cell.nodeAfter.attrs,
|
|
37296
|
-
[name]: value
|
|
37297
|
-
});
|
|
37298
|
-
dispatch(tr2);
|
|
37299
|
-
}
|
|
37300
|
-
return true;
|
|
37301
|
-
};
|
|
37508
|
+
function handleMouseLeave(view) {
|
|
37509
|
+
const pluginState = columnResizingPluginKey.getState(view.state);
|
|
37510
|
+
if (pluginState && pluginState.activeHandle > -1 && !pluginState.dragging)
|
|
37511
|
+
updateHandle(view, -1);
|
|
37302
37512
|
}
|
|
37303
|
-
function
|
|
37304
|
-
|
|
37305
|
-
|
|
37306
|
-
|
|
37307
|
-
|
|
37308
|
-
|
|
37309
|
-
|
|
37310
|
-
|
|
37311
|
-
|
|
37312
|
-
|
|
37313
|
-
|
|
37314
|
-
|
|
37315
|
-
|
|
37316
|
-
|
|
37317
|
-
|
|
37318
|
-
|
|
37319
|
-
|
|
37320
|
-
|
|
37321
|
-
|
|
37513
|
+
function handleMouseDown2(view, event, cellMinWidth, defaultCellMinWidth) {
|
|
37514
|
+
var _a2;
|
|
37515
|
+
const win = (_a2 = view.dom.ownerDocument.defaultView) != null ? _a2 : window;
|
|
37516
|
+
const pluginState = columnResizingPluginKey.getState(view.state);
|
|
37517
|
+
if (!pluginState || pluginState.activeHandle == -1 || pluginState.dragging)
|
|
37518
|
+
return false;
|
|
37519
|
+
const cell = view.state.doc.nodeAt(pluginState.activeHandle);
|
|
37520
|
+
const width = currentColWidth(view, pluginState.activeHandle, cell.attrs);
|
|
37521
|
+
view.dispatch(
|
|
37522
|
+
view.state.tr.setMeta(columnResizingPluginKey, {
|
|
37523
|
+
setDragging: { startX: event.clientX, startWidth: width }
|
|
37524
|
+
})
|
|
37525
|
+
);
|
|
37526
|
+
function finish(event2) {
|
|
37527
|
+
win.removeEventListener("mouseup", finish);
|
|
37528
|
+
win.removeEventListener("mousemove", move);
|
|
37529
|
+
const pluginState2 = columnResizingPluginKey.getState(view.state);
|
|
37530
|
+
if (pluginState2 == null ? void 0 : pluginState2.dragging) {
|
|
37531
|
+
updateColumnWidth(
|
|
37532
|
+
view,
|
|
37533
|
+
pluginState2.activeHandle,
|
|
37534
|
+
draggedWidth(pluginState2.dragging, event2, cellMinWidth)
|
|
37535
|
+
);
|
|
37536
|
+
view.dispatch(
|
|
37537
|
+
view.state.tr.setMeta(columnResizingPluginKey, { setDragging: null })
|
|
37322
37538
|
);
|
|
37323
|
-
const nodes = cells.map((pos) => rect.table.nodeAt(pos));
|
|
37324
|
-
for (let i2 = 0; i2 < cells.length; i2++)
|
|
37325
|
-
if (nodes[i2].type == types.header_cell)
|
|
37326
|
-
tr2.setNodeMarkup(
|
|
37327
|
-
rect.tableStart + cells[i2],
|
|
37328
|
-
types.cell,
|
|
37329
|
-
nodes[i2].attrs
|
|
37330
|
-
);
|
|
37331
|
-
if (tr2.steps.length == 0)
|
|
37332
|
-
for (let i2 = 0; i2 < cells.length; i2++)
|
|
37333
|
-
tr2.setNodeMarkup(
|
|
37334
|
-
rect.tableStart + cells[i2],
|
|
37335
|
-
types.header_cell,
|
|
37336
|
-
nodes[i2].attrs
|
|
37337
|
-
);
|
|
37338
|
-
dispatch(tr2);
|
|
37339
|
-
}
|
|
37340
|
-
return true;
|
|
37341
|
-
};
|
|
37342
|
-
}
|
|
37343
|
-
function isHeaderEnabledByType(type3, rect, types) {
|
|
37344
|
-
const cellPositions = rect.map.cellsInRect({
|
|
37345
|
-
left: 0,
|
|
37346
|
-
top: 0,
|
|
37347
|
-
right: type3 == "row" ? rect.map.width : 1,
|
|
37348
|
-
bottom: type3 == "column" ? rect.map.height : 1
|
|
37349
|
-
});
|
|
37350
|
-
for (let i2 = 0; i2 < cellPositions.length; i2++) {
|
|
37351
|
-
const cell = rect.table.nodeAt(cellPositions[i2]);
|
|
37352
|
-
if (cell && cell.type !== types.header_cell) {
|
|
37353
|
-
return false;
|
|
37354
37539
|
}
|
|
37355
37540
|
}
|
|
37356
|
-
|
|
37357
|
-
|
|
37358
|
-
|
|
37359
|
-
|
|
37360
|
-
|
|
37361
|
-
|
|
37362
|
-
|
|
37363
|
-
|
|
37364
|
-
|
|
37365
|
-
|
|
37366
|
-
|
|
37367
|
-
|
|
37368
|
-
|
|
37369
|
-
const isHeaderColumnEnabled = isHeaderEnabledByType(
|
|
37370
|
-
"column",
|
|
37371
|
-
rect,
|
|
37372
|
-
types
|
|
37541
|
+
function move(event2) {
|
|
37542
|
+
if (!event2.which)
|
|
37543
|
+
return finish(event2);
|
|
37544
|
+
const pluginState2 = columnResizingPluginKey.getState(view.state);
|
|
37545
|
+
if (!pluginState2)
|
|
37546
|
+
return;
|
|
37547
|
+
if (pluginState2.dragging) {
|
|
37548
|
+
const dragged = draggedWidth(pluginState2.dragging, event2, cellMinWidth);
|
|
37549
|
+
displayColumnWidth(
|
|
37550
|
+
view,
|
|
37551
|
+
pluginState2.activeHandle,
|
|
37552
|
+
dragged,
|
|
37553
|
+
defaultCellMinWidth
|
|
37373
37554
|
);
|
|
37374
|
-
const isHeaderEnabled = type3 === "column" ? isHeaderRowEnabled : type3 === "row" ? isHeaderColumnEnabled : false;
|
|
37375
|
-
const selectionStartsAt = isHeaderEnabled ? 1 : 0;
|
|
37376
|
-
const cellsRect = type3 == "column" ? {
|
|
37377
|
-
left: 0,
|
|
37378
|
-
top: selectionStartsAt,
|
|
37379
|
-
right: 1,
|
|
37380
|
-
bottom: rect.map.height
|
|
37381
|
-
} : type3 == "row" ? {
|
|
37382
|
-
left: selectionStartsAt,
|
|
37383
|
-
top: 0,
|
|
37384
|
-
right: rect.map.width,
|
|
37385
|
-
bottom: 1
|
|
37386
|
-
} : rect;
|
|
37387
|
-
const newType = type3 == "column" ? isHeaderColumnEnabled ? types.cell : types.header_cell : type3 == "row" ? isHeaderRowEnabled ? types.cell : types.header_cell : types.cell;
|
|
37388
|
-
rect.map.cellsInRect(cellsRect).forEach((relativeCellPos) => {
|
|
37389
|
-
const cellPos = relativeCellPos + rect.tableStart;
|
|
37390
|
-
const cell = tr2.doc.nodeAt(cellPos);
|
|
37391
|
-
if (cell) {
|
|
37392
|
-
tr2.setNodeMarkup(cellPos, newType, cell.attrs);
|
|
37393
|
-
}
|
|
37394
|
-
});
|
|
37395
|
-
dispatch(tr2);
|
|
37396
37555
|
}
|
|
37397
|
-
|
|
37398
|
-
|
|
37556
|
+
}
|
|
37557
|
+
displayColumnWidth(
|
|
37558
|
+
view,
|
|
37559
|
+
pluginState.activeHandle,
|
|
37560
|
+
width,
|
|
37561
|
+
defaultCellMinWidth
|
|
37562
|
+
);
|
|
37563
|
+
win.addEventListener("mouseup", finish);
|
|
37564
|
+
win.addEventListener("mousemove", move);
|
|
37565
|
+
event.preventDefault();
|
|
37566
|
+
return true;
|
|
37399
37567
|
}
|
|
37400
|
-
|
|
37401
|
-
|
|
37402
|
-
|
|
37403
|
-
|
|
37404
|
-
|
|
37405
|
-
|
|
37406
|
-
|
|
37407
|
-
|
|
37408
|
-
|
|
37409
|
-
|
|
37410
|
-
|
|
37411
|
-
|
|
37412
|
-
if (before)
|
|
37413
|
-
return $cell.pos - before.nodeSize;
|
|
37414
|
-
for (let row = $cell.index(-1) - 1, rowEnd = $cell.before(); row >= 0; row--) {
|
|
37415
|
-
const rowNode = $cell.node(-1).child(row);
|
|
37416
|
-
const lastChild2 = rowNode.lastChild;
|
|
37417
|
-
if (lastChild2) {
|
|
37418
|
-
return rowEnd - 1 - lastChild2.nodeSize;
|
|
37568
|
+
function currentColWidth(view, cellPos, { colspan, colwidth }) {
|
|
37569
|
+
const width = colwidth && colwidth[colwidth.length - 1];
|
|
37570
|
+
if (width)
|
|
37571
|
+
return width;
|
|
37572
|
+
const dom = view.domAtPos(cellPos);
|
|
37573
|
+
const node = dom.node.childNodes[dom.offset];
|
|
37574
|
+
let domWidth = node.offsetWidth, parts = colspan;
|
|
37575
|
+
if (colwidth) {
|
|
37576
|
+
for (let i2 = 0; i2 < colspan; i2++)
|
|
37577
|
+
if (colwidth[i2]) {
|
|
37578
|
+
domWidth -= colwidth[i2];
|
|
37579
|
+
parts--;
|
|
37419
37580
|
}
|
|
37420
|
-
rowEnd -= rowNode.nodeSize;
|
|
37421
|
-
}
|
|
37422
|
-
} else {
|
|
37423
|
-
if ($cell.index() < $cell.parent.childCount - 1) {
|
|
37424
|
-
return $cell.pos + $cell.nodeAfter.nodeSize;
|
|
37425
|
-
}
|
|
37426
|
-
const table = $cell.node(-1);
|
|
37427
|
-
for (let row = $cell.indexAfter(-1), rowStart = $cell.after(); row < table.childCount; row++) {
|
|
37428
|
-
const rowNode = table.child(row);
|
|
37429
|
-
if (rowNode.childCount)
|
|
37430
|
-
return rowStart + 1;
|
|
37431
|
-
rowStart += rowNode.nodeSize;
|
|
37432
|
-
}
|
|
37433
37581
|
}
|
|
37434
|
-
return
|
|
37582
|
+
return domWidth / parts;
|
|
37435
37583
|
}
|
|
37436
|
-
function
|
|
37437
|
-
|
|
37438
|
-
|
|
37439
|
-
|
|
37440
|
-
const cell = findNextCell(selectionCell(state2), direction);
|
|
37441
|
-
if (cell == null)
|
|
37442
|
-
return false;
|
|
37443
|
-
if (dispatch) {
|
|
37444
|
-
const $cell = state2.doc.resolve(cell);
|
|
37445
|
-
dispatch(
|
|
37446
|
-
state2.tr.setSelection(TextSelection.between($cell, moveCellForward($cell))).scrollIntoView()
|
|
37447
|
-
);
|
|
37448
|
-
}
|
|
37449
|
-
return true;
|
|
37450
|
-
};
|
|
37584
|
+
function domCellAround(target) {
|
|
37585
|
+
while (target && target.nodeName != "TD" && target.nodeName != "TH")
|
|
37586
|
+
target = target.classList && target.classList.contains("ProseMirror") ? null : target.parentNode;
|
|
37587
|
+
return target;
|
|
37451
37588
|
}
|
|
37452
|
-
function
|
|
37453
|
-
const
|
|
37454
|
-
|
|
37455
|
-
|
|
37456
|
-
|
|
37457
|
-
|
|
37458
|
-
|
|
37459
|
-
|
|
37589
|
+
function edgeCell(view, event, side, handleWidth) {
|
|
37590
|
+
const offset2 = side == "right" ? -handleWidth : handleWidth;
|
|
37591
|
+
const found2 = view.posAtCoords({
|
|
37592
|
+
left: event.clientX + offset2,
|
|
37593
|
+
top: event.clientY
|
|
37594
|
+
});
|
|
37595
|
+
if (!found2)
|
|
37596
|
+
return -1;
|
|
37597
|
+
const { pos } = found2;
|
|
37598
|
+
const $cell = cellAround(view.state.doc.resolve(pos));
|
|
37599
|
+
if (!$cell)
|
|
37600
|
+
return -1;
|
|
37601
|
+
if (side == "right")
|
|
37602
|
+
return $cell.pos;
|
|
37603
|
+
const map4 = TableMap.get($cell.node(-1)), start2 = $cell.start(-1);
|
|
37604
|
+
const index2 = map4.map.indexOf($cell.pos - start2);
|
|
37605
|
+
return index2 % map4.width == 0 ? -1 : start2 + map4.map[index2 - 1];
|
|
37606
|
+
}
|
|
37607
|
+
function draggedWidth(dragging, event, resizeMinWidth) {
|
|
37608
|
+
const offset2 = event.clientX - dragging.startX;
|
|
37609
|
+
return Math.max(resizeMinWidth, dragging.startWidth + offset2);
|
|
37610
|
+
}
|
|
37611
|
+
function updateHandle(view, value) {
|
|
37612
|
+
view.dispatch(
|
|
37613
|
+
view.state.tr.setMeta(columnResizingPluginKey, { setHandle: value })
|
|
37614
|
+
);
|
|
37615
|
+
}
|
|
37616
|
+
function updateColumnWidth(view, cell, width) {
|
|
37617
|
+
const $cell = view.state.doc.resolve(cell);
|
|
37618
|
+
const table = $cell.node(-1), map4 = TableMap.get(table), start2 = $cell.start(-1);
|
|
37619
|
+
const col = map4.colCount($cell.pos - start2) + $cell.nodeAfter.attrs.colspan - 1;
|
|
37620
|
+
const tr2 = view.state.tr;
|
|
37621
|
+
for (let row = 0; row < map4.height; row++) {
|
|
37622
|
+
const mapIndex = row * map4.width + col;
|
|
37623
|
+
if (row && map4.map[mapIndex] == map4.map[mapIndex - map4.width])
|
|
37624
|
+
continue;
|
|
37625
|
+
const pos = map4.map[mapIndex];
|
|
37626
|
+
const attrs = table.nodeAt(pos).attrs;
|
|
37627
|
+
const index2 = attrs.colspan == 1 ? 0 : col - map4.colCount(pos);
|
|
37628
|
+
if (attrs.colwidth && attrs.colwidth[index2] == width)
|
|
37629
|
+
continue;
|
|
37630
|
+
const colwidth = attrs.colwidth ? attrs.colwidth.slice() : zeroes(attrs.colspan);
|
|
37631
|
+
colwidth[index2] = width;
|
|
37632
|
+
tr2.setNodeMarkup(start2 + pos, null, { ...attrs, colwidth });
|
|
37633
|
+
}
|
|
37634
|
+
if (tr2.docChanged)
|
|
37635
|
+
view.dispatch(tr2);
|
|
37636
|
+
}
|
|
37637
|
+
function displayColumnWidth(view, cell, width, defaultCellMinWidth) {
|
|
37638
|
+
const $cell = view.state.doc.resolve(cell);
|
|
37639
|
+
const table = $cell.node(-1), start2 = $cell.start(-1);
|
|
37640
|
+
const col = TableMap.get(table).colCount($cell.pos - start2) + $cell.nodeAfter.attrs.colspan - 1;
|
|
37641
|
+
let dom = view.domAtPos($cell.start(-1)).node;
|
|
37642
|
+
while (dom && dom.nodeName != "TABLE") {
|
|
37643
|
+
dom = dom.parentNode;
|
|
37644
|
+
}
|
|
37645
|
+
if (!dom)
|
|
37646
|
+
return;
|
|
37647
|
+
updateColumnsOnResize(
|
|
37648
|
+
table,
|
|
37649
|
+
dom.firstChild,
|
|
37650
|
+
dom,
|
|
37651
|
+
defaultCellMinWidth,
|
|
37652
|
+
col,
|
|
37653
|
+
width
|
|
37654
|
+
);
|
|
37655
|
+
}
|
|
37656
|
+
function zeroes(n2) {
|
|
37657
|
+
return Array(n2).fill(0);
|
|
37658
|
+
}
|
|
37659
|
+
function handleDecorations(state2, cell) {
|
|
37660
|
+
var _a2;
|
|
37661
|
+
const decorations = [];
|
|
37662
|
+
const $cell = state2.doc.resolve(cell);
|
|
37663
|
+
const table = $cell.node(-1);
|
|
37664
|
+
if (!table) {
|
|
37665
|
+
return DecorationSet.empty;
|
|
37666
|
+
}
|
|
37667
|
+
const map4 = TableMap.get(table);
|
|
37668
|
+
const start2 = $cell.start(-1);
|
|
37669
|
+
const col = map4.colCount($cell.pos - start2) + $cell.nodeAfter.attrs.colspan - 1;
|
|
37670
|
+
for (let row = 0; row < map4.height; row++) {
|
|
37671
|
+
const index2 = col + row * map4.width;
|
|
37672
|
+
if ((col == map4.width - 1 || map4.map[index2] != map4.map[index2 + 1]) && (row == 0 || map4.map[index2] != map4.map[index2 - map4.width])) {
|
|
37673
|
+
const cellPos = map4.map[index2];
|
|
37674
|
+
const pos = start2 + cellPos + table.nodeAt(cellPos).nodeSize - 1;
|
|
37675
|
+
const dom = document.createElement("div");
|
|
37676
|
+
dom.className = "column-resize-handle";
|
|
37677
|
+
if ((_a2 = columnResizingPluginKey.getState(state2)) == null ? void 0 : _a2.dragging) {
|
|
37678
|
+
decorations.push(
|
|
37679
|
+
Decoration.node(
|
|
37680
|
+
start2 + cellPos,
|
|
37681
|
+
start2 + cellPos + table.nodeAt(cellPos).nodeSize,
|
|
37682
|
+
{
|
|
37683
|
+
class: "column-resize-dragging"
|
|
37684
|
+
}
|
|
37685
|
+
)
|
|
37460
37686
|
);
|
|
37461
|
-
|
|
37687
|
+
}
|
|
37688
|
+
decorations.push(Decoration.widget(pos, dom));
|
|
37462
37689
|
}
|
|
37463
37690
|
}
|
|
37464
|
-
return
|
|
37691
|
+
return DecorationSet.create(state2.doc, decorations);
|
|
37465
37692
|
}
|
|
37466
37693
|
function tableEditing({
|
|
37467
37694
|
allowTableNodeSelection = false
|
|
@@ -37506,33 +37733,46 @@ function tableEditing({
|
|
|
37506
37733
|
}
|
|
37507
37734
|
});
|
|
37508
37735
|
}
|
|
37736
|
+
function getColStyleDeclaration(minWidth, width) {
|
|
37737
|
+
if (width) {
|
|
37738
|
+
return ["width", `${Math.max(width, minWidth)}px`];
|
|
37739
|
+
}
|
|
37740
|
+
return ["min-width", `${minWidth}px`];
|
|
37741
|
+
}
|
|
37509
37742
|
function updateColumns(node, colgroup, table, cellMinWidth, overrideCol, overrideValue) {
|
|
37743
|
+
var _a2;
|
|
37510
37744
|
let totalWidth = 0;
|
|
37511
37745
|
let fixedWidth = true;
|
|
37512
37746
|
let nextDOM = colgroup.firstChild;
|
|
37513
37747
|
const row = node.firstChild;
|
|
37514
|
-
|
|
37515
|
-
|
|
37516
|
-
|
|
37517
|
-
|
|
37518
|
-
|
|
37519
|
-
|
|
37520
|
-
|
|
37521
|
-
|
|
37522
|
-
|
|
37523
|
-
|
|
37524
|
-
|
|
37525
|
-
|
|
37526
|
-
|
|
37527
|
-
|
|
37748
|
+
if (row !== null) {
|
|
37749
|
+
for (let i2 = 0, col = 0; i2 < row.childCount; i2 += 1) {
|
|
37750
|
+
const { colspan, colwidth } = row.child(i2).attrs;
|
|
37751
|
+
for (let j2 = 0; j2 < colspan; j2 += 1, col += 1) {
|
|
37752
|
+
const hasWidth = overrideCol === col ? overrideValue : colwidth && colwidth[j2];
|
|
37753
|
+
const cssWidth = hasWidth ? `${hasWidth}px` : "";
|
|
37754
|
+
totalWidth += hasWidth || cellMinWidth;
|
|
37755
|
+
if (!hasWidth) {
|
|
37756
|
+
fixedWidth = false;
|
|
37757
|
+
}
|
|
37758
|
+
if (!nextDOM) {
|
|
37759
|
+
const colElement = document.createElement("col");
|
|
37760
|
+
const [propertyKey, propertyValue] = getColStyleDeclaration(cellMinWidth, hasWidth);
|
|
37761
|
+
colElement.style.setProperty(propertyKey, propertyValue);
|
|
37762
|
+
colgroup.appendChild(colElement);
|
|
37763
|
+
} else {
|
|
37764
|
+
if (nextDOM.style.width !== cssWidth) {
|
|
37765
|
+
const [propertyKey, propertyValue] = getColStyleDeclaration(cellMinWidth, hasWidth);
|
|
37766
|
+
nextDOM.style.setProperty(propertyKey, propertyValue);
|
|
37767
|
+
}
|
|
37768
|
+
nextDOM = nextDOM.nextSibling;
|
|
37528
37769
|
}
|
|
37529
|
-
nextDOM = nextDOM.nextSibling;
|
|
37530
37770
|
}
|
|
37531
37771
|
}
|
|
37532
37772
|
}
|
|
37533
37773
|
while (nextDOM) {
|
|
37534
37774
|
const after = nextDOM.nextSibling;
|
|
37535
|
-
nextDOM.parentNode.removeChild(nextDOM);
|
|
37775
|
+
(_a2 = nextDOM.parentNode) === null || _a2 === void 0 ? void 0 : _a2.removeChild(nextDOM);
|
|
37536
37776
|
nextDOM = after;
|
|
37537
37777
|
}
|
|
37538
37778
|
if (fixedWidth) {
|
|
@@ -37578,12 +37818,15 @@ function createColGroup(node, cellMinWidth, overrideCol, overrideValue) {
|
|
|
37578
37818
|
const { colspan, colwidth } = row.child(i2).attrs;
|
|
37579
37819
|
for (let j2 = 0; j2 < colspan; j2 += 1, col += 1) {
|
|
37580
37820
|
const hasWidth = overrideCol === col ? overrideValue : colwidth && colwidth[j2];
|
|
37581
|
-
const cssWidth = hasWidth ? `${hasWidth}px` : "";
|
|
37582
37821
|
totalWidth += hasWidth || cellMinWidth;
|
|
37583
37822
|
if (!hasWidth) {
|
|
37584
37823
|
fixedWidth = false;
|
|
37585
37824
|
}
|
|
37586
|
-
|
|
37825
|
+
const [property, value] = getColStyleDeclaration(cellMinWidth, hasWidth);
|
|
37826
|
+
cols.push([
|
|
37827
|
+
"col",
|
|
37828
|
+
{ style: `${property}: ${value}` }
|
|
37829
|
+
]);
|
|
37587
37830
|
}
|
|
37588
37831
|
}
|
|
37589
37832
|
const tableWidth = fixedWidth ? `${totalWidth}px` : "";
|
|
@@ -37792,6 +38035,7 @@ const Table = Node$1.create({
|
|
|
37792
38035
|
columnResizing({
|
|
37793
38036
|
handleWidth: this.options.handleWidth,
|
|
37794
38037
|
cellMinWidth: this.options.cellMinWidth,
|
|
38038
|
+
defaultCellMinWidth: this.options.cellMinWidth,
|
|
37795
38039
|
View: this.options.View,
|
|
37796
38040
|
lastColumnResizable: this.options.lastColumnResizable
|
|
37797
38041
|
})
|
|
@@ -37832,7 +38076,7 @@ const TableCell = Node$1.create({
|
|
|
37832
38076
|
default: null,
|
|
37833
38077
|
parseHTML: (element) => {
|
|
37834
38078
|
const colwidth = element.getAttribute("colwidth");
|
|
37835
|
-
const value = colwidth ?
|
|
38079
|
+
const value = colwidth ? colwidth.split(",").map((width) => parseInt(width, 10)) : null;
|
|
37836
38080
|
return value;
|
|
37837
38081
|
}
|
|
37838
38082
|
}
|
|
@@ -37869,7 +38113,7 @@ const TableHeader = Node$1.create({
|
|
|
37869
38113
|
default: null,
|
|
37870
38114
|
parseHTML: (element) => {
|
|
37871
38115
|
const colwidth = element.getAttribute("colwidth");
|
|
37872
|
-
const value = colwidth ?
|
|
38116
|
+
const value = colwidth ? colwidth.split(",").map((width) => parseInt(width, 10)) : null;
|
|
37873
38117
|
return value;
|
|
37874
38118
|
}
|
|
37875
38119
|
}
|
|
@@ -38186,6 +38430,10 @@ const Bold = Mark.create({
|
|
|
38186
38430
|
tag: "b",
|
|
38187
38431
|
getAttrs: (node) => node.style.fontWeight !== "normal" && null
|
|
38188
38432
|
},
|
|
38433
|
+
{
|
|
38434
|
+
style: "font-weight=400",
|
|
38435
|
+
clearMark: (mark) => mark.type.name === this.name
|
|
38436
|
+
},
|
|
38189
38437
|
{
|
|
38190
38438
|
style: "font-weight",
|
|
38191
38439
|
getAttrs: (value) => /^(bold(er)?|[5-9]\d{2,})$/.test(value) && null
|
|
@@ -38239,73 +38487,8 @@ const Bold = Mark.create({
|
|
|
38239
38487
|
];
|
|
38240
38488
|
}
|
|
38241
38489
|
});
|
|
38242
|
-
const
|
|
38243
|
-
|
|
38244
|
-
addOptions() {
|
|
38245
|
-
return {
|
|
38246
|
-
HTMLAttributes: {},
|
|
38247
|
-
bulletListTypeName: "bulletList",
|
|
38248
|
-
orderedListTypeName: "orderedList"
|
|
38249
|
-
};
|
|
38250
|
-
},
|
|
38251
|
-
content: "paragraph block*",
|
|
38252
|
-
defining: true,
|
|
38253
|
-
parseHTML() {
|
|
38254
|
-
return [
|
|
38255
|
-
{
|
|
38256
|
-
tag: "li"
|
|
38257
|
-
}
|
|
38258
|
-
];
|
|
38259
|
-
},
|
|
38260
|
-
renderHTML({ HTMLAttributes }) {
|
|
38261
|
-
return ["li", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
38262
|
-
},
|
|
38263
|
-
addKeyboardShortcuts() {
|
|
38264
|
-
return {
|
|
38265
|
-
Enter: () => this.editor.commands.splitListItem(this.name),
|
|
38266
|
-
Tab: () => this.editor.commands.sinkListItem(this.name),
|
|
38267
|
-
"Shift-Tab": () => this.editor.commands.liftListItem(this.name)
|
|
38268
|
-
};
|
|
38269
|
-
}
|
|
38270
|
-
});
|
|
38271
|
-
const TextStyle$1 = Mark.create({
|
|
38272
|
-
name: "textStyle",
|
|
38273
|
-
priority: 101,
|
|
38274
|
-
addOptions() {
|
|
38275
|
-
return {
|
|
38276
|
-
HTMLAttributes: {}
|
|
38277
|
-
};
|
|
38278
|
-
},
|
|
38279
|
-
parseHTML() {
|
|
38280
|
-
return [
|
|
38281
|
-
{
|
|
38282
|
-
tag: "span",
|
|
38283
|
-
getAttrs: (element) => {
|
|
38284
|
-
const hasStyles = element.hasAttribute("style");
|
|
38285
|
-
if (!hasStyles) {
|
|
38286
|
-
return false;
|
|
38287
|
-
}
|
|
38288
|
-
return {};
|
|
38289
|
-
}
|
|
38290
|
-
}
|
|
38291
|
-
];
|
|
38292
|
-
},
|
|
38293
|
-
renderHTML({ HTMLAttributes }) {
|
|
38294
|
-
return ["span", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
38295
|
-
},
|
|
38296
|
-
addCommands() {
|
|
38297
|
-
return {
|
|
38298
|
-
removeEmptyTextStyle: () => ({ state: state2, commands: commands2 }) => {
|
|
38299
|
-
const attributes = getMarkAttributes(state2, this.type);
|
|
38300
|
-
const hasStyles = Object.entries(attributes).some(([, value]) => !!value);
|
|
38301
|
-
if (hasStyles) {
|
|
38302
|
-
return true;
|
|
38303
|
-
}
|
|
38304
|
-
return commands2.unsetMark(this.name);
|
|
38305
|
-
}
|
|
38306
|
-
};
|
|
38307
|
-
}
|
|
38308
|
-
});
|
|
38490
|
+
const ListItemName$1 = "listItem";
|
|
38491
|
+
const TextStyleName$1 = "textStyle";
|
|
38309
38492
|
const inputRegex$3 = /^\s*([-+*])\s$/;
|
|
38310
38493
|
const BulletList = Node$1.create({
|
|
38311
38494
|
name: "bulletList",
|
|
@@ -38333,7 +38516,7 @@ const BulletList = Node$1.create({
|
|
|
38333
38516
|
return {
|
|
38334
38517
|
toggleBulletList: () => ({ commands: commands2, chain }) => {
|
|
38335
38518
|
if (this.options.keepAttributes) {
|
|
38336
|
-
return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
38519
|
+
return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName$1, this.editor.getAttributes(TextStyleName$1)).run();
|
|
38337
38520
|
}
|
|
38338
38521
|
return commands2.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks);
|
|
38339
38522
|
}
|
|
@@ -38356,7 +38539,7 @@ const BulletList = Node$1.create({
|
|
|
38356
38539
|
keepMarks: this.options.keepMarks,
|
|
38357
38540
|
keepAttributes: this.options.keepAttributes,
|
|
38358
38541
|
getAttributes: () => {
|
|
38359
|
-
return this.editor.getAttributes(
|
|
38542
|
+
return this.editor.getAttributes(TextStyleName$1);
|
|
38360
38543
|
},
|
|
38361
38544
|
editor: this.editor
|
|
38362
38545
|
});
|
|
@@ -38366,8 +38549,8 @@ const BulletList = Node$1.create({
|
|
|
38366
38549
|
];
|
|
38367
38550
|
}
|
|
38368
38551
|
});
|
|
38369
|
-
const inputRegex$2 =
|
|
38370
|
-
const pasteRegex$1 =
|
|
38552
|
+
const inputRegex$2 = new RegExp("(?<!`)`([^`]+)`(?!`)");
|
|
38553
|
+
const pasteRegex$1 = new RegExp("(?<!`)`([^`]+)`(?!`)", "g");
|
|
38371
38554
|
const Code = Mark.create({
|
|
38372
38555
|
name: "code",
|
|
38373
38556
|
addOptions() {
|
|
@@ -38994,6 +39177,7 @@ const HardBreak = Node$1.create({
|
|
|
38994
39177
|
inline: true,
|
|
38995
39178
|
group: "inline",
|
|
38996
39179
|
selectable: false,
|
|
39180
|
+
linebreakReplacement: true,
|
|
38997
39181
|
parseHTML() {
|
|
38998
39182
|
return [
|
|
38999
39183
|
{ tag: "br" }
|
|
@@ -39755,6 +39939,10 @@ const Italic = Mark.create({
|
|
|
39755
39939
|
tag: "i",
|
|
39756
39940
|
getAttrs: (node) => node.style.fontStyle !== "normal" && null
|
|
39757
39941
|
},
|
|
39942
|
+
{
|
|
39943
|
+
style: "font-style=normal",
|
|
39944
|
+
clearMark: (mark) => mark.type.name === this.name
|
|
39945
|
+
},
|
|
39758
39946
|
{
|
|
39759
39947
|
style: "font-style=italic"
|
|
39760
39948
|
}
|
|
@@ -39807,35 +39995,6 @@ const Italic = Mark.create({
|
|
|
39807
39995
|
];
|
|
39808
39996
|
}
|
|
39809
39997
|
});
|
|
39810
|
-
const ListItem$1 = Node$1.create({
|
|
39811
|
-
name: "listItem",
|
|
39812
|
-
addOptions() {
|
|
39813
|
-
return {
|
|
39814
|
-
HTMLAttributes: {},
|
|
39815
|
-
bulletListTypeName: "bulletList",
|
|
39816
|
-
orderedListTypeName: "orderedList"
|
|
39817
|
-
};
|
|
39818
|
-
},
|
|
39819
|
-
content: "paragraph block*",
|
|
39820
|
-
defining: true,
|
|
39821
|
-
parseHTML() {
|
|
39822
|
-
return [
|
|
39823
|
-
{
|
|
39824
|
-
tag: "li"
|
|
39825
|
-
}
|
|
39826
|
-
];
|
|
39827
|
-
},
|
|
39828
|
-
renderHTML({ HTMLAttributes }) {
|
|
39829
|
-
return ["li", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
39830
|
-
},
|
|
39831
|
-
addKeyboardShortcuts() {
|
|
39832
|
-
return {
|
|
39833
|
-
Enter: () => this.editor.commands.splitListItem(this.name),
|
|
39834
|
-
Tab: () => this.editor.commands.sinkListItem(this.name),
|
|
39835
|
-
"Shift-Tab": () => this.editor.commands.liftListItem(this.name)
|
|
39836
|
-
};
|
|
39837
|
-
}
|
|
39838
|
-
});
|
|
39839
39998
|
const ListItem = Node$1.create({
|
|
39840
39999
|
name: "listItem",
|
|
39841
40000
|
addOptions() {
|
|
@@ -39865,44 +40024,8 @@ const ListItem = Node$1.create({
|
|
|
39865
40024
|
};
|
|
39866
40025
|
}
|
|
39867
40026
|
});
|
|
39868
|
-
const
|
|
39869
|
-
|
|
39870
|
-
priority: 101,
|
|
39871
|
-
addOptions() {
|
|
39872
|
-
return {
|
|
39873
|
-
HTMLAttributes: {}
|
|
39874
|
-
};
|
|
39875
|
-
},
|
|
39876
|
-
parseHTML() {
|
|
39877
|
-
return [
|
|
39878
|
-
{
|
|
39879
|
-
tag: "span",
|
|
39880
|
-
getAttrs: (element) => {
|
|
39881
|
-
const hasStyles = element.hasAttribute("style");
|
|
39882
|
-
if (!hasStyles) {
|
|
39883
|
-
return false;
|
|
39884
|
-
}
|
|
39885
|
-
return {};
|
|
39886
|
-
}
|
|
39887
|
-
}
|
|
39888
|
-
];
|
|
39889
|
-
},
|
|
39890
|
-
renderHTML({ HTMLAttributes }) {
|
|
39891
|
-
return ["span", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
|
|
39892
|
-
},
|
|
39893
|
-
addCommands() {
|
|
39894
|
-
return {
|
|
39895
|
-
removeEmptyTextStyle: () => ({ state: state2, commands: commands2 }) => {
|
|
39896
|
-
const attributes = getMarkAttributes(state2, this.type);
|
|
39897
|
-
const hasStyles = Object.entries(attributes).some(([, value]) => !!value);
|
|
39898
|
-
if (hasStyles) {
|
|
39899
|
-
return true;
|
|
39900
|
-
}
|
|
39901
|
-
return commands2.unsetMark(this.name);
|
|
39902
|
-
}
|
|
39903
|
-
};
|
|
39904
|
-
}
|
|
39905
|
-
});
|
|
40027
|
+
const ListItemName = "listItem";
|
|
40028
|
+
const TextStyleName = "textStyle";
|
|
39906
40029
|
const inputRegex$1 = /^(\d+)\.\s$/;
|
|
39907
40030
|
const OrderedList = Node$1.create({
|
|
39908
40031
|
name: "orderedList",
|
|
@@ -39947,7 +40070,7 @@ const OrderedList = Node$1.create({
|
|
|
39947
40070
|
return {
|
|
39948
40071
|
toggleOrderedList: () => ({ commands: commands2, chain }) => {
|
|
39949
40072
|
if (this.options.keepAttributes) {
|
|
39950
|
-
return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
40073
|
+
return chain().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ListItemName, this.editor.getAttributes(TextStyleName)).run();
|
|
39951
40074
|
}
|
|
39952
40075
|
return commands2.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks);
|
|
39953
40076
|
}
|
|
@@ -39971,7 +40094,7 @@ const OrderedList = Node$1.create({
|
|
|
39971
40094
|
type: this.type,
|
|
39972
40095
|
keepMarks: this.options.keepMarks,
|
|
39973
40096
|
keepAttributes: this.options.keepAttributes,
|
|
39974
|
-
getAttributes: (match2) => ({ start: +match2[1], ...this.editor.getAttributes(
|
|
40097
|
+
getAttributes: (match2) => ({ start: +match2[1], ...this.editor.getAttributes(TextStyleName) }),
|
|
39975
40098
|
joinPredicate: (match2, node) => node.childCount + node.attrs.start === +match2[1],
|
|
39976
40099
|
editor: this.editor
|
|
39977
40100
|
});
|
|
@@ -40126,7 +40249,7 @@ const StarterKit = Extension.create({
|
|
|
40126
40249
|
extensions.push(Italic.configure((_o = this.options) === null || _o === void 0 ? void 0 : _o.italic));
|
|
40127
40250
|
}
|
|
40128
40251
|
if (this.options.listItem !== false) {
|
|
40129
|
-
extensions.push(ListItem
|
|
40252
|
+
extensions.push(ListItem.configure((_p = this.options) === null || _p === void 0 ? void 0 : _p.listItem));
|
|
40130
40253
|
}
|
|
40131
40254
|
if (this.options.orderedList !== false) {
|
|
40132
40255
|
extensions.push(OrderedList.configure((_q = this.options) === null || _q === void 0 ? void 0 : _q.orderedList));
|
|
@@ -42801,6 +42924,9 @@ class BubbleMenuView {
|
|
|
42801
42924
|
if ((event === null || event === void 0 ? void 0 : event.relatedTarget) && ((_a2 = this.element.parentNode) === null || _a2 === void 0 ? void 0 : _a2.contains(event.relatedTarget))) {
|
|
42802
42925
|
return;
|
|
42803
42926
|
}
|
|
42927
|
+
if ((event === null || event === void 0 ? void 0 : event.relatedTarget) === this.editor.view.dom) {
|
|
42928
|
+
return;
|
|
42929
|
+
}
|
|
42804
42930
|
this.hide();
|
|
42805
42931
|
};
|
|
42806
42932
|
this.tippyBlurHandler = (event) => {
|
|
@@ -42833,6 +42959,7 @@ class BubbleMenuView {
|
|
|
42833
42959
|
const to2 = Math.max(...ranges.map((range2) => range2.$to.pos));
|
|
42834
42960
|
const shouldShow2 = (_a2 = this.shouldShow) === null || _a2 === void 0 ? void 0 : _a2.call(this, {
|
|
42835
42961
|
editor: this.editor,
|
|
42962
|
+
element: this.element,
|
|
42836
42963
|
view: view2,
|
|
42837
42964
|
state: state2,
|
|
42838
42965
|
oldState,
|
|
@@ -42847,12 +42974,14 @@ class BubbleMenuView {
|
|
|
42847
42974
|
getReferenceClientRect: ((_c = this.tippyOptions) === null || _c === void 0 ? void 0 : _c.getReferenceClientRect) || (() => {
|
|
42848
42975
|
if (isNodeSelection(state2.selection)) {
|
|
42849
42976
|
let node = view2.nodeDOM(from2);
|
|
42850
|
-
const nodeViewWrapper = node.dataset.nodeViewWrapper ? node : node.querySelector("[data-node-view-wrapper]");
|
|
42851
|
-
if (nodeViewWrapper) {
|
|
42852
|
-
node = nodeViewWrapper.firstChild;
|
|
42853
|
-
}
|
|
42854
42977
|
if (node) {
|
|
42855
|
-
|
|
42978
|
+
const nodeViewWrapper = node.dataset.nodeViewWrapper ? node : node.querySelector("[data-node-view-wrapper]");
|
|
42979
|
+
if (nodeViewWrapper) {
|
|
42980
|
+
node = nodeViewWrapper.firstChild;
|
|
42981
|
+
}
|
|
42982
|
+
if (node) {
|
|
42983
|
+
return node.getBoundingClientRect();
|
|
42984
|
+
}
|
|
42856
42985
|
}
|
|
42857
42986
|
}
|
|
42858
42987
|
return posToDOMRect(view2, from2, to2);
|
|
@@ -42987,6 +43116,9 @@ class FloatingMenuView {
|
|
|
42987
43116
|
if ((event === null || event === void 0 ? void 0 : event.relatedTarget) && ((_a2 = this.element.parentNode) === null || _a2 === void 0 ? void 0 : _a2.contains(event.relatedTarget))) {
|
|
42988
43117
|
return;
|
|
42989
43118
|
}
|
|
43119
|
+
if ((event === null || event === void 0 ? void 0 : event.relatedTarget) === this.editor.view.dom) {
|
|
43120
|
+
return;
|
|
43121
|
+
}
|
|
42990
43122
|
this.hide();
|
|
42991
43123
|
};
|
|
42992
43124
|
this.tippyBlurHandler = (event) => {
|
|
@@ -43247,21 +43379,8 @@ const EditorContent = defineComponent({
|
|
|
43247
43379
|
if (!editor) {
|
|
43248
43380
|
return;
|
|
43249
43381
|
}
|
|
43250
|
-
if (!editor.isDestroyed) {
|
|
43251
|
-
editor.view.setProps({
|
|
43252
|
-
nodeViews: {}
|
|
43253
|
-
});
|
|
43254
|
-
}
|
|
43255
43382
|
editor.contentComponent = null;
|
|
43256
43383
|
editor.appContext = null;
|
|
43257
|
-
if (!editor.options.element.firstChild) {
|
|
43258
|
-
return;
|
|
43259
|
-
}
|
|
43260
|
-
const newElement = document.createElement("div");
|
|
43261
|
-
newElement.append(...editor.options.element.childNodes);
|
|
43262
|
-
editor.setOptions({
|
|
43263
|
-
element: newElement
|
|
43264
|
-
});
|
|
43265
43384
|
});
|
|
43266
43385
|
return { rootEl: rootEl2 };
|
|
43267
43386
|
},
|
|
@@ -44389,7 +44508,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
44389
44508
|
});
|
|
44390
44509
|
const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-982f5078"]]);
|
|
44391
44510
|
/*!
|
|
44392
|
-
* Signature Pad v5.0.
|
|
44511
|
+
* Signature Pad v5.0.4 | https://github.com/szimek/signature_pad
|
|
44393
44512
|
* (c) 2024 Szymon Nowak | Released under the MIT license
|
|
44394
44513
|
*/
|
|
44395
44514
|
class Point {
|
|
@@ -44473,7 +44592,7 @@ class SignatureEventTarget {
|
|
|
44473
44592
|
constructor() {
|
|
44474
44593
|
try {
|
|
44475
44594
|
this._et = new EventTarget();
|
|
44476
|
-
} catch (
|
|
44595
|
+
} catch (_a2) {
|
|
44477
44596
|
this._et = document;
|
|
44478
44597
|
}
|
|
44479
44598
|
}
|
|
@@ -44587,13 +44706,16 @@ class SignaturePad extends SignatureEventTarget {
|
|
|
44587
44706
|
this._strokeEnd(this._touchEventToSignatureEvent(event));
|
|
44588
44707
|
};
|
|
44589
44708
|
this._handlePointerDown = (event) => {
|
|
44590
|
-
if (!this._isLeftButtonPressed(event) || this._drawingStroke) {
|
|
44709
|
+
if (!event.isPrimary || !this._isLeftButtonPressed(event) || this._drawingStroke) {
|
|
44591
44710
|
return;
|
|
44592
44711
|
}
|
|
44593
44712
|
event.preventDefault();
|
|
44594
44713
|
this._strokeBegin(this._pointerEventToSignatureEvent(event));
|
|
44595
44714
|
};
|
|
44596
44715
|
this._handlePointerMove = (event) => {
|
|
44716
|
+
if (!event.isPrimary) {
|
|
44717
|
+
return;
|
|
44718
|
+
}
|
|
44597
44719
|
if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) {
|
|
44598
44720
|
this._strokeEnd(this._pointerEventToSignatureEvent(event), false);
|
|
44599
44721
|
return;
|
|
@@ -44602,7 +44724,7 @@ class SignaturePad extends SignatureEventTarget {
|
|
|
44602
44724
|
this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event));
|
|
44603
44725
|
};
|
|
44604
44726
|
this._handlePointerUp = (event) => {
|
|
44605
|
-
if (this._isLeftButtonPressed(event)) {
|
|
44727
|
+
if (!event.isPrimary || this._isLeftButtonPressed(event)) {
|
|
44606
44728
|
return;
|
|
44607
44729
|
}
|
|
44608
44730
|
event.preventDefault();
|
|
@@ -48380,6 +48502,11 @@ function buildURL(url, params, options) {
|
|
|
48380
48502
|
return url;
|
|
48381
48503
|
}
|
|
48382
48504
|
const _encode = options && options.encode || encode;
|
|
48505
|
+
if (utils$1.isFunction(options)) {
|
|
48506
|
+
options = {
|
|
48507
|
+
serialize: options
|
|
48508
|
+
};
|
|
48509
|
+
}
|
|
48383
48510
|
const serializeFn = options && options.serialize;
|
|
48384
48511
|
let serializedParams;
|
|
48385
48512
|
if (serializeFn) {
|
|
@@ -48566,7 +48693,7 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
48566
48693
|
}
|
|
48567
48694
|
}
|
|
48568
48695
|
}
|
|
48569
|
-
return (
|
|
48696
|
+
return (0, JSON.stringify)(rawValue);
|
|
48570
48697
|
}
|
|
48571
48698
|
const defaults = {
|
|
48572
48699
|
transitional: transitionalDefaults,
|
|
@@ -49059,45 +49186,13 @@ const progressEventDecorator = (total, throttled) => {
|
|
|
49059
49186
|
}), throttled[1]];
|
|
49060
49187
|
};
|
|
49061
49188
|
const asyncDecorator = (fn3) => (...args) => utils$1.asap(() => fn3(...args));
|
|
49062
|
-
const isURLSameOrigin = platform.hasStandardBrowserEnv ? (
|
|
49063
|
-
|
|
49064
|
-
|
|
49065
|
-
|
|
49066
|
-
|
|
49067
|
-
|
|
49068
|
-
|
|
49069
|
-
function resolveURL(url) {
|
|
49070
|
-
let href = url;
|
|
49071
|
-
if (msie) {
|
|
49072
|
-
urlParsingNode.setAttribute("href", href);
|
|
49073
|
-
href = urlParsingNode.href;
|
|
49074
|
-
}
|
|
49075
|
-
urlParsingNode.setAttribute("href", href);
|
|
49076
|
-
return {
|
|
49077
|
-
href: urlParsingNode.href,
|
|
49078
|
-
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
|
|
49079
|
-
host: urlParsingNode.host,
|
|
49080
|
-
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
|
|
49081
|
-
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
|
|
49082
|
-
hostname: urlParsingNode.hostname,
|
|
49083
|
-
port: urlParsingNode.port,
|
|
49084
|
-
pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
|
|
49085
|
-
};
|
|
49086
|
-
}
|
|
49087
|
-
originURL = resolveURL(window.location.href);
|
|
49088
|
-
return function isURLSameOrigin2(requestURL) {
|
|
49089
|
-
const parsed = utils$1.isString(requestURL) ? resolveURL(requestURL) : requestURL;
|
|
49090
|
-
return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
|
|
49091
|
-
};
|
|
49092
|
-
}()
|
|
49093
|
-
) : (
|
|
49094
|
-
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
49095
|
-
/* @__PURE__ */ function nonStandardBrowserEnv() {
|
|
49096
|
-
return function isURLSameOrigin2() {
|
|
49097
|
-
return true;
|
|
49098
|
-
};
|
|
49099
|
-
}()
|
|
49100
|
-
);
|
|
49189
|
+
const isURLSameOrigin = platform.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url) => {
|
|
49190
|
+
url = new URL(url, platform.origin);
|
|
49191
|
+
return origin2.protocol === url.protocol && origin2.host === url.host && (isMSIE || origin2.port === url.port);
|
|
49192
|
+
})(
|
|
49193
|
+
new URL(platform.origin),
|
|
49194
|
+
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
|
49195
|
+
) : () => true;
|
|
49101
49196
|
const cookies = platform.hasStandardBrowserEnv ? (
|
|
49102
49197
|
// Standard browser envs support document.cookie
|
|
49103
49198
|
{
|
|
@@ -49145,7 +49240,7 @@ const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing }
|
|
|
49145
49240
|
function mergeConfig(config1, config2) {
|
|
49146
49241
|
config2 = config2 || {};
|
|
49147
49242
|
const config = {};
|
|
49148
|
-
function getMergedValue(target, source, caseless) {
|
|
49243
|
+
function getMergedValue(target, source, prop3, caseless) {
|
|
49149
49244
|
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
|
49150
49245
|
return utils$1.merge.call({ caseless }, target, source);
|
|
49151
49246
|
} else if (utils$1.isPlainObject(source)) {
|
|
@@ -49155,11 +49250,11 @@ function mergeConfig(config1, config2) {
|
|
|
49155
49250
|
}
|
|
49156
49251
|
return source;
|
|
49157
49252
|
}
|
|
49158
|
-
function mergeDeepProperties(a2, b2, caseless) {
|
|
49253
|
+
function mergeDeepProperties(a2, b2, prop3, caseless) {
|
|
49159
49254
|
if (!utils$1.isUndefined(b2)) {
|
|
49160
|
-
return getMergedValue(a2, b2, caseless);
|
|
49255
|
+
return getMergedValue(a2, b2, prop3, caseless);
|
|
49161
49256
|
} else if (!utils$1.isUndefined(a2)) {
|
|
49162
|
-
return getMergedValue(void 0, a2, caseless);
|
|
49257
|
+
return getMergedValue(void 0, a2, prop3, caseless);
|
|
49163
49258
|
}
|
|
49164
49259
|
}
|
|
49165
49260
|
function valueFromConfig2(a2, b2) {
|
|
@@ -49210,7 +49305,7 @@ function mergeConfig(config1, config2) {
|
|
|
49210
49305
|
socketPath: defaultToConfig2,
|
|
49211
49306
|
responseEncoding: defaultToConfig2,
|
|
49212
49307
|
validateStatus: mergeDirectKeys,
|
|
49213
|
-
headers: (a2, b2) => mergeDeepProperties(headersToObject(a2), headersToObject(b2), true)
|
|
49308
|
+
headers: (a2, b2, prop3) => mergeDeepProperties(headersToObject(a2), headersToObject(b2), prop3, true)
|
|
49214
49309
|
};
|
|
49215
49310
|
utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop3) {
|
|
49216
49311
|
const merge2 = mergeMap[prop3] || mergeDeepProperties;
|
|
@@ -49410,7 +49505,7 @@ const composeSignals = (signals, timeout) => {
|
|
|
49410
49505
|
};
|
|
49411
49506
|
const streamChunk = function* (chunk, chunkSize) {
|
|
49412
49507
|
let len = chunk.byteLength;
|
|
49413
|
-
if (
|
|
49508
|
+
if (len < chunkSize) {
|
|
49414
49509
|
yield chunk;
|
|
49415
49510
|
return;
|
|
49416
49511
|
}
|
|
@@ -49740,7 +49835,7 @@ function dispatchRequest(config) {
|
|
|
49740
49835
|
return Promise.reject(reason);
|
|
49741
49836
|
});
|
|
49742
49837
|
}
|
|
49743
|
-
const VERSION = "1.7.
|
|
49838
|
+
const VERSION = "1.7.9";
|
|
49744
49839
|
const validators$1 = {};
|
|
49745
49840
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((type3, i2) => {
|
|
49746
49841
|
validators$1[type3] = function validator2(thing) {
|
|
@@ -49771,6 +49866,12 @@ validators$1.transitional = function transitional(validator2, version2, message2
|
|
|
49771
49866
|
return validator2 ? validator2(value, opt, opts) : true;
|
|
49772
49867
|
};
|
|
49773
49868
|
};
|
|
49869
|
+
validators$1.spelling = function spelling(correctSpelling) {
|
|
49870
|
+
return (value, opt) => {
|
|
49871
|
+
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
49872
|
+
return true;
|
|
49873
|
+
};
|
|
49874
|
+
};
|
|
49774
49875
|
function assertOptions(options, schema, allowUnknown) {
|
|
49775
49876
|
if (typeof options !== "object") {
|
|
49776
49877
|
throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
|
|
@@ -49819,8 +49920,8 @@ class Axios {
|
|
|
49819
49920
|
return await this._request(configOrUrl, config);
|
|
49820
49921
|
} catch (err) {
|
|
49821
49922
|
if (err instanceof Error) {
|
|
49822
|
-
let dummy;
|
|
49823
|
-
Error.captureStackTrace ? Error.captureStackTrace(dummy
|
|
49923
|
+
let dummy = {};
|
|
49924
|
+
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
|
|
49824
49925
|
const stack2 = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
|
|
49825
49926
|
try {
|
|
49826
49927
|
if (!err.stack) {
|
|
@@ -49862,6 +49963,10 @@ class Axios {
|
|
|
49862
49963
|
}, true);
|
|
49863
49964
|
}
|
|
49864
49965
|
}
|
|
49966
|
+
validator.assertOptions(config, {
|
|
49967
|
+
baseUrl: validators.spelling("baseURL"),
|
|
49968
|
+
withXsrfToken: validators.spelling("withXSRFToken")
|
|
49969
|
+
}, true);
|
|
49865
49970
|
config.method = (config.method || this.defaults.method || "get").toLowerCase();
|
|
49866
49971
|
let contextHeaders = headers && utils$1.merge(
|
|
49867
49972
|
headers.common,
|
|
@@ -50158,7 +50263,7 @@ axios$1.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new F
|
|
|
50158
50263
|
axios$1.getAdapter = adapters.getAdapter;
|
|
50159
50264
|
axios$1.HttpStatusCode = HttpStatusCode;
|
|
50160
50265
|
axios$1.default = axios$1;
|
|
50161
|
-
const metadata = { "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(?: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, [["(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\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])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[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}", [9]], ["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-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", "[025-7]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[025-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", "[24-689]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24-689]"]]]], "BL": ["590", "00", "590\\d{6}|(?:69|80|9\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"], ["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"], ["80[0-5]\\d{6}"], 0, 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]], "BM": ["1", "011", "(?:441|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "441$1", 0, "441"], "BN": ["673", "00", "[2-578]\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-578]"]]]], "BO": ["591", "00(?:1\\d)?", "8001\\d{5}|(?:[2-467]\\d|50)\\d{6}", [8, 9], [["(\\d)(\\d{7})", "$1 $2", ["[235]|4[46]"]], ["(\\d{8})", "$1", ["[67]"]], ["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["8"]]], "0", 0, "0(1\\d)?"], "BQ": ["599", "00", "(?:[34]1|7\\d)\\d{5}", [7], 0, 0, 0, 0, 0, 0, "[347]"], "BR": ["55", "00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)", "(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}", [8, 9, 10, 11], [["(\\d{4})(\\d{4})", "$1-$2", ["300|4(?:0[02]|37)", "4(?:02|37)0|[34]00"]], ["(\\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", "[17]\\d{7}|[2-8]\\d{6}", [7, 8], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-68]|7[246]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[67]|7"]]]], "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-8]\\d|90)\\d{8}|3\\d{6}", [7, 10], 0, "1", 0, 0, 0, 0, 0, [["(?:2(?:04|[23]6|[48]9|50|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])|90[25])[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(?:00|2[125-9]|33|44|66|77|88)|622)[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-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-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", "(?:[27]\\d{3}|8776)\\d{4}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[278]"]]]], "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{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[2-9]"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[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])", "60\\d{8}|(?:1\\d|[39])\\d{9}", [10, 11], [["(\\d{3})(\\d{7})", "$1 $2", ["6|90"], "($1)"], ["(\\d{3})(\\d{7})", "$1 $2", ["3[0-357]|91"]], ["(\\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-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-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]|31)"], "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, "528[89]"], "ER": ["291", "00", "[178]\\d{6}", [7], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[178]"], "0$1"]], "0"], "ES": ["34", "00", "[5-9]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]00"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-9]"]]]], "ET": ["251", "00", "(?:11|[2-579]\\d)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-579]"], "0$1"]], "0"], "FI": ["358", "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", "[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}", [5, 6, 7, 8, 9, 10, 11, 12], [["(\\d{5})", "$1", ["20[2-59]"], "0$1"], ["(\\d{3})(\\d{3,7})", "$1 $2", ["(?:[1-3]0|[68])0|70[07-9]"], "0$1"], ["(\\d{2})(\\d{4,8})", "$1 $2", ["[14]|2[09]|50|7[135]"], "0$1"], ["(\\d{2})(\\d{6,10})", "$1 $2", ["7"], "0$1"], ["(\\d)(\\d{4,9})", "$1 $2", ["(?:1[49]|[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, 0, 0, 0, [["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-35])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\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", "[56]94\\d{6}|(?:80|9\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[56]|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", "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{3}|800)\\d{5}", [8, 9], [["(\\d{3})(\\d{5})", "$1 $2", ["8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[235]"], "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", "590\\d{6}|(?:69|80|9\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[569]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"], ["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"], ["80[0-5]\\d{6}"], 0, 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\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", "(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}", [6, 7, 8, 9], [["(\\d{2})(\\d{2})(\\d{2,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-489]\\d|55)\\d{6}", [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", "1624$1", 0, "74576|(?:16|7[56])24"], "IN": ["91", "00", "(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}", [8, 9, 10, 11, 12, 13], [["(\\d{8})", "$1", ["5(?:0|2[23]|3[03]|[67]1|88)", "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)", "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"], 0, 1], ["(\\d{4})(\\d{4,5})", "$1 $2", ["180", "1800"], 0, 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["140"], 0, 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["11|2[02]|33|4[04]|79[1-7]|80[2-46]", "11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])", "11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]", "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]", "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"], "0$1", 1], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807", "1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]", "1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"], "0$1", 1], ["(\\d{5})(\\d{5})", "$1 $2", ["[6-9]"], "0$1", 1], ["(\\d{4})(\\d{2,4})(\\d{4})", "$1 $2 $3", ["1(?:6|8[06])", "1(?:6|8[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,10}|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", ["3"]]], 0, 0, 0, 0, 0, 0, [["0669[0-79]\\d{1,6}|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[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}", [6, 7, 8, 9, 10, 11]], ["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", "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|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", ["7"], "0$1"]], "0"], "JP": ["81", "010", "00[1-9]\\d{6,14}|[257-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", ["[36]|4(?:2[09]|7[01])", "[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"], "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", ["[257-9]"], "0$1"]], "0", 0, "(000[259]\\d{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", "(?:33622|8\\d{8})\\d{5}|[78]\\d{9}", [10, 14], 0, "8", 0, 0, 0, 0, "33|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", ["30[0135-9]"], "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-7]|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", "(?:[245]\\d|33|77|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", ["2(?:[0367]|4[3-8])"]], ["(\\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", ["2(?:[0367]|4[3-8])"]], ["(\\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]"]]], 0, 0, "(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"], "LV": ["371", "00", "(?:[268]\\d|90)\\d{6}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[269]|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{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["5[45]"], "0$1"], ["(\\d{4})(\\d{5})", "$1-$2", ["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"], "0$1"], ["(\\d{2})(\\d{7})", "$1-$2", ["8"], "0$1"], ["(\\d{3})(\\d{6})", "$1-$2", ["[5-7]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"], ["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\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}"]]], "MC": ["377", "00", "(?:[3489]|6\\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", ["6"], "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", "590\\d{6}|(?:69|80|9\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"], ["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"], ["80[0-5]\\d{6}"], 0, 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\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", ["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"], "0$1"], ["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[12]"], "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", ["[12]1"], "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", "596\\d{6}|(?:69|80|9\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[569]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], "MR": ["222", "00", "(?:[2-4]\\d\\d|800)\\d{5}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-48]"]]]], "MS": ["1", "011", "(?:[58]\\d\\d|664|900)\\d{7}", [10], 0, "1", 0, "([34]\\d{6})$|1", "664$1", 0, "664"], "MT": ["356", "00", "3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[2357-9]"]]]], "MU": ["230", "0(?:0|[24-7]0|3[03])", "(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}", [7, 8, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-46]|8[013]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[57]"]], ["(\\d{5})(\\d{5})", "$1 $2", ["8"]]], 0, 0, 0, 0, 0, 0, 0, "020"], "MV": ["960", "0(?:0|19)", "(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}", [7, 10], [["(\\d{3})(\\d{4})", "$1-$2", ["[34679]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "MW": ["265", "00", "(?:[1289]\\d|31|77)\\d{7}|1\\d{6}", [7, 9], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["1[2-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[137-9]"], "0$1"]], "0"], "MX": ["52", "0[09]", "[2-9]\\d{9}", [10], [["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["33|5[56]|81"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "MY": ["60", "00", "1\\d{8,9}|(?:3\\d|[4-9])\\d{7}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1-$2 $3", ["[4-79]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1-$2 $3", ["1(?:[02469]|[378][1-9]|53)|8", "1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1-$2 $3", ["3"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{4})", "$1-$2-$3-$4", ["1(?:[367]|80)"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2 $3", ["15"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2 $3", ["1"], "0$1"]], "0"], "MZ": ["258", "00", "(?:2|8\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2|8[2-79]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]]]], "NA": ["264", "00", "[68]\\d{7,8}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["88"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["6"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["87"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"]], "0"], "NC": ["687", "00", "(?:050|[2-57-9]\\d\\d)\\d{3}", [6], [["(\\d{2})(\\d{2})(\\d{2})", "$1.$2.$3", ["[02-57-9]"]]]], "NE": ["227", "00", "[027-9]\\d{7}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["08"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[089]|2[013]|7[0467]"]]]], "NF": ["672", "00", "[13]\\d{5}", [6], [["(\\d{2})(\\d{4})", "$1 $2", ["1[0-3]"]], ["(\\d)(\\d{5})", "$1 $2", ["[13]"]]], 0, 0, "([0-258]\\d{4})$", "3$1"], "NG": ["234", "009", "38\\d{6}|[78]\\d{9,13}|(?:20|9\\d)\\d{8}", [8, 10, 11, 12, 13, 14], [["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["3"], "0$1"], ["(\\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", "(?:444|(?:55|8\\d)\\d|666)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[4-68]"]]]], "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", ["(?: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", "(?: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", "[45]\\d{5}|(?:708|80\\d)\\d{6}", [6, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[45]"], "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", "59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,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", ["[26]1|3[289]|4[1246-8]|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[16]|8"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[3-7]"]]]], "RE": ["262", "00", "(?:26|[689]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2689]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"], ["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}"], ["80\\d{7}"], ["89[1-37-9]\\d{6}"], 0, 0, 0, 0, ["9(?:399[0-3]|479[0-5]|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, "3[04-689]|[489]", 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", "92\\d{7}|(?:[15]|8\\d)\\d{8}", [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{3,4})", "$1 $2 $3", ["81"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]]], "0"], "SB": ["677", "0[01]", "[6-9]\\d{6}|[1-6]\\d{4}", [5, 7], [["(\\d{2})(\\d{5})", "$1 $2", ["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]], "SC": ["248", "010|0[0-2]", "(?:[2489]\\d|64)\\d{5}", [7], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[246]|9[57]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "SD": ["249", "00", "[19]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[19]"], "0$1"]], "0"], "SE": ["46", "00", "(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}", [6, 7, 8, 9, 10, 12], [["(\\d{2})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["20"], "0$1", 0, "$1 $2 $3"], ["(\\d{3})(\\d{4})", "$1-$2", ["9(?:00|39|44|9)"], "0$1", 0, "$1 $2"], ["(\\d{2})(\\d{3})(\\d{2})", "$1-$2 $3", ["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"], "0$1", 0, "$1 $2 $3"], ["(\\d)(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], "0$1", 0, "$1 $2 $3"], ["(\\d{3})(\\d{2,3})(\\d{3})", "$1-$2 $3", ["9(?:00|39|44)"], "0$1", 0, "$1 $2 $3"], ["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["10|7"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{3})", "$1-$2 $3 $4", ["9"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1-$2 $3 $4 $5", ["[26]"], "0$1", 0, "$1 $2 $3 $4 $5"]], "0"], "SG": ["65", "0[0-3]\\d", "(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}", [8, 10, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["[369]|8(?:0[1-9]|[1-9])"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]], ["(\\d{4})(\\d{4})(\\d{3})", "$1 $2 $3", ["7"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]]]], "SH": ["290", "00", "(?:[256]\\d|8)\\d{3}", [4, 5], 0, 0, 0, 0, 0, 0, "[256]"], "SI": ["386", "00|10(?:22|66|88|99)", "[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}", [5, 6, 7, 8], [["(\\d{2})(\\d{3,6})", "$1 $2", ["8[09]|9"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["59|8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37][01]|4[0139]|51|6"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-57]"], "(0$1)"]], "0", 0, 0, 0, 0, 0, 0, "00"], "SJ": ["47", "00", "0\\d{4}|(?:[489]\\d|79)\\d{6}", [5, 8], 0, 0, 0, 0, 0, 0, "79"], "SK": ["421", "00", "[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}", [6, 7, 9], [["(\\d)(\\d{2})(\\d{3,4})", "$1 $2 $3", ["21"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["[3-5][1-8]1", "[3-5][1-8]1[67]"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1/$2 $3 $4", ["2"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[689]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1/$2 $3 $4", ["[3-5]"], "0$1"]], "0"], "SL": ["232", "00", "(?:[237-9]\\d|66)\\d{6}", [8], [["(\\d{2})(\\d{6})", "$1 $2", ["[236-9]"], "(0$1)"]], "0"], "SM": ["378", "00", "(?:0549|[5-7]\\d)\\d{6}", [8, 10], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-7]"]], ["(\\d{4})(\\d{6})", "$1 $2", ["0"]]], 0, 0, "([89]\\d{5})$", "0549$1"], "SN": ["221", "00", "(?:[378]\\d|93)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[379]"]]]], "SO": ["252", "00", "[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}", [6, 7, 8, 9], [["(\\d{2})(\\d{4})", "$1 $2", ["8[125]"]], ["(\\d{6})", "$1", ["[134]"]], ["(\\d)(\\d{6})", "$1 $2", ["[15]|2[0-79]|3[0-46-8]|4[0-7]"]], ["(\\d)(\\d{7})", "$1 $2", ["(?:2|90)4|[67]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[348]|64|79|90"]], ["(\\d{2})(\\d{5,7})", "$1 $2", ["1|28|6[0-35-9]|77|9[2-9]"]]], "0"], "SR": ["597", "00", "(?:[2-5]|68|[78]\\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-8]"]]]], "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", "[267]\\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", ["[267]"]], ["(\\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-39]\\d{8}|[1-5]\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-5]"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "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|[689]\\d|77)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[26-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{8}", [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", ["[0-57-9]"]]], 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-59]|61)", "5(?:[0-59]|61[06])", "5(?:[0-59]|61[06]1)"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24][1-8]|3[1-9]"], "(0$1)", 1], ["(\\d{3})(\\d{3})(\\d{6,7})", "$1 $2 $3", ["80"], "0$1", 1]], "0"], "TT": ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-46-8]\\d{6})$|1", "868$1", 0, "868"], "TV": ["688", "00", "(?:2|7\\d\\d|90)\\d{4}", [5, 6, 7], [["(\\d{2})(\\d{3})", "$1 $2", ["2"]], ["(\\d{2})(\\d{4})", "$1 $2", ["90"]], ["(\\d{2})(\\d{5})", "$1 $2", ["7"]]]], "TW": ["886", "0(?:0[25-79]|19)", "[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}", [7, 8, 9, 10, 11], [["(\\d{2})(\\d)(\\d{4})", "$1 $2 $3", ["202"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[258]0"], "0$1"], ["(\\d)(\\d{3,4})(\\d{4})", "$1 $2 $3", ["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]", "[23568]|4(?:0[2-48]|[1-47-9])|(?: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, [["(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[468])|7302[0-4]\\d)\\d{4}|(?:305[3-9]|472[24]|505[2-57-9]|7306|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-47-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|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-47-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-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|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-389]|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]|33|44|66|77|88)[2-9]\\d{6}"], 0, 0, 0, ["305209\\d{4}"]]], "UY": ["598", "0(?:0|1[3-9]\\d)", "0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}", [6, 7, 8, 9, 10, 11, 12, 13], [["(\\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-79]\\d|88)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[235-9]"]]]], "VA": ["39", "00", "0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}", [6, 7, 8, 9, 10, 11, 12], 0, 0, 0, 0, 0, 0, "06698"], "VC": ["1", "011", "(?:[58]\\d\\d|784|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "784$1", 0, "784"], "VE": ["58", "00", "[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}", [10], [["(\\d{3})(\\d{7})", "$1-$2", ["[24-689]"], "0$1"]], "0"], "VG": ["1", "011", "(?:284|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-578]\\d{6})$|1", "284$1", 0, "284"], "VI": ["1", "011", "[58]\\d{9}|(?:34|90)0\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "340$1", 0, "340"], "VN": ["84", "00", "[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}", [7, 8, 9, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["80"], "0$1", 1], ["(\\d{4})(\\d{4,6})", "$1 $2", ["1"], 0, 1], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["6"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[357-9]"], "0$1", 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["2[48]"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["2"], "0$1", 1]], "0"], "VU": ["678", "00", "[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}", [5, 7], [["(\\d{3})(\\d{4})", "$1 $2", ["[57-9]"]]]], "WF": ["681", "00", "(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?", [6, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[478]"]], ["(\\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", "(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}", [9], 0, "0", 0, 0, 0, 0, 0, [["269(?: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])\\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|63|[79]\\d)\\d{7}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[28]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["[79]"], "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}|[35-7]\\d{8}", [9, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[35-7]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]], "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|51"]], ["(\\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})|50\\d{3})\\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}"]]] } };
|
|
50266
|
+
const metadata = { "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(?: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, [["(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\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])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[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}", [9]], ["4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-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", "[025-7]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[025-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|[24-689])\\d{7}", [8, 10], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24-689]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["0"]]]], "BL": ["590", "00", "(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"], ["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"], ["80[0-5]\\d{6}"], 0, 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]], "BM": ["1", "011", "(?:441|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "441$1", 0, "441"], "BN": ["673", "00", "[2-578]\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-578]"]]]], "BO": ["591", "00(?:1\\d)?", "8001\\d{5}|(?:[2-467]\\d|50)\\d{6}", [8, 9], [["(\\d)(\\d{7})", "$1 $2", ["[235]|4[46]"]], ["(\\d{8})", "$1", ["[67]"]], ["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["8"]]], "0", 0, "0(1\\d)?"], "BQ": ["599", "00", "(?:[34]1|7\\d)\\d{5}", [7], 0, 0, 0, 0, 0, 0, "[347]"], "BR": ["55", "00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)", "(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}", [8, 9, 10, 11], [["(\\d{4})(\\d{4})", "$1-$2", ["300|4(?:0[02]|37)", "4(?:02|37)0|[34]00"]], ["(\\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", "[17]\\d{7}|[2-8]\\d{6}", [7, 8], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-68]|7[246]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[67]|7"]]]], "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|50|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(?:00|2[125-9]|33|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-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-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", "(?:[27]\\d{3}|8776)\\d{4}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[278]"]]]], "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{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[2-9]"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[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]|91"]], ["(\\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-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-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]|31)"], "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, "528[89]"], "ER": ["291", "00", "[178]\\d{6}", [7], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[178]"], "0$1"]], "0"], "ES": ["34", "00", "[5-9]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]00"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-9]"]]]], "ET": ["251", "00", "(?:11|[2-579]\\d)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-579]"], "0$1"]], "0"], "FI": ["358", "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", "[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}", [5, 6, 7, 8, 9, 10, 11, 12], [["(\\d{5})", "$1", ["20[2-59]"], "0$1"], ["(\\d{3})(\\d{3,7})", "$1 $2", ["(?:[1-3]0|[68])0|70[07-9]"], "0$1"], ["(\\d{2})(\\d{4,8})", "$1 $2", ["[14]|2[09]|50|7[135]"], "0$1"], ["(\\d{2})(\\d{6,10})", "$1 $2", ["7"], "0$1"], ["(\\d)(\\d{4,9})", "$1 $2", ["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"], "0$1"]], "0", 0, 0, 0, 0, "1[03-79]|[2-9]", 0, "00"], "FJ": ["679", "0(?:0|52)", "45\\d{5}|(?:0800\\d|[235-9])\\d{6}", [7, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["[235-9]|45"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "FK": ["500", "00", "[2-7]\\d{4}", [5]], "FM": ["691", "00", "(?:[39]\\d\\d|820)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[389]"]]]], "FO": ["298", "00", "[2-9]\\d{5}", [6], [["(\\d{6})", "$1", ["[2-9]"]]], 0, 0, "(10(?:01|[12]0|88))"], "FR": ["33", "00", "[1-9]\\d{8}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0 $1"], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[1-79]"], "0$1"]], "0"], "GA": ["241", "00", "(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}", [7, 8], [["(\\d)(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-7]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["0"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["11|[67]"], "0$1"]], 0, 0, "0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})", "$1"], "GB": ["44", "00", "[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}", [7, 9, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["800", "8001", "80011", "800111", "8001111"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["845", "8454", "84546", "845464"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["800"], "0$1"], ["(\\d{5})(\\d{4,5})", "$1 $2", ["1(?:38|5[23]|69|76|94)", "1(?:(?:38|69)7|5(?:24|39)|768|946)", "1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"], "0$1"], ["(\\d{4})(\\d{5,6})", "$1 $2", ["1(?:[2-69][02-9]|[78])"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["[25]|7(?:0|6[02-9])", "[25]|7(?:0|6(?:[03-9]|2[356]))"], "0$1"], ["(\\d{4})(\\d{6})", "$1 $2", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1389]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-35])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\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", "(?:[56]94\\d|7093)\\d{5}|(?:80|9\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-7]|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", "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{3}|800)\\d{5}", [8, 9], [["(\\d{3})(\\d{5})", "$1 $2", ["8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[235]"], "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", "(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-79]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"], ["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"], ["80[0-5]\\d{6}"], 0, 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\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", "(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}", [6, 7, 8, 9], [["(\\d{2})(\\d{2})(\\d{2,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-489]\\d|55)\\d{6}", [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", "1624$1", 0, "74576|(?:16|7[56])24"], "IN": ["91", "00", "(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}", [8, 9, 10, 11, 12, 13], [["(\\d{8})", "$1", ["5(?:0|2[23]|3[03]|[67]1|88)", "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)", "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"], 0, 1], ["(\\d{4})(\\d{4,5})", "$1 $2", ["180", "1800"], 0, 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["140"], 0, 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["11|2[02]|33|4[04]|79[1-7]|80[2-46]", "11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])", "11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]", "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]", "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"], "0$1", 1], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807", "1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]", "1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"], "0$1", 1], ["(\\d{5})(\\d{5})", "$1 $2", ["[6-9]"], "0$1", 1], ["(\\d{4})(\\d{2,4})(\\d{4})", "$1 $2 $3", ["1(?:6|8[06])", "1(?:6|8[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,10}|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", ["3"]]], 0, 0, 0, 0, 0, 0, [["0669[0-79]\\d{1,6}|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[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}", [6, 7, 8, 9, 10, 11]], ["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", "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|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", ["7"], "0$1"]], "0"], "JP": ["81", "010", "00[1-9]\\d{6,14}|[257-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", ["[36]|4(?:2[09]|7[01])", "[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"], "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", ["[257-9]"], "0$1"]], "0", 0, "(000[259]\\d{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", "(?:33622|8\\d{8})\\d{5}|[78]\\d{9}", [10, 14], 0, "8", 0, 0, 0, 0, "33|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", ["30[0135-9]"], "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-7]|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", "(?:[245]\\d|33|77|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", ["2(?:[0367]|4[3-8])"]], ["(\\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", ["2(?:[0367]|4[3-8])"]], ["(\\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]"]]], 0, 0, "(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"], "LV": ["371", "00", "(?:[268]\\d|90)\\d{6}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[269]|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{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["5[45]"], "0$1"], ["(\\d{4})(\\d{5})", "$1-$2", ["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"], "0$1"], ["(\\d{2})(\\d{7})", "$1-$2", ["8"], "0$1"], ["(\\d{3})(\\d{6})", "$1-$2", ["[5-7]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"], ["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\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}"]]], "MC": ["377", "00", "(?:[3489]|6\\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", ["6"], "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", "(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"], ["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"], ["80[0-5]\\d{6}"], 0, 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\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", ["[12]1"], "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", "(?:596\\d|7091)\\d{5}|(?:69|[89]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-79]|8(?:0[6-9]|[36])"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], "MR": ["222", "00", "(?:[2-4]\\d\\d|800)\\d{5}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-48]"]]]], "MS": ["1", "011", "(?:[58]\\d\\d|664|900)\\d{7}", [10], 0, "1", 0, "([34]\\d{6})$|1", "664$1", 0, "664"], "MT": ["356", "00", "3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[2357-9]"]]]], "MU": ["230", "0(?:0|[24-7]0|3[03])", "(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}", [7, 8, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-46]|8[013]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[57]"]], ["(\\d{5})(\\d{5})", "$1 $2", ["8"]]], 0, 0, 0, 0, 0, 0, 0, "020"], "MV": ["960", "0(?:0|19)", "(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}", [7, 10], [["(\\d{3})(\\d{4})", "$1-$2", ["[34679]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "MW": ["265", "00", "(?:[1289]\\d|31|77)\\d{7}|1\\d{6}", [7, 9], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["1[2-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[137-9]"], "0$1"]], "0"], "MX": ["52", "0[09]", "[2-9]\\d{9}", [10], [["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["33|5[56]|81"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "MY": ["60", "00", "1\\d{8,9}|(?:3\\d|[4-9])\\d{7}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1-$2 $3", ["[4-79]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1-$2 $3", ["1(?:[02469]|[378][1-9]|53)|8", "1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1-$2 $3", ["3"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{4})", "$1-$2-$3-$4", ["1(?:[367]|80)"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2 $3", ["15"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2 $3", ["1"], "0$1"]], "0"], "MZ": ["258", "00", "(?:2|8\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2|8[2-79]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]]]], "NA": ["264", "00", "[68]\\d{7,8}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["88"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["6"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["87"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"]], "0"], "NC": ["687", "00", "(?:050|[2-57-9]\\d\\d)\\d{3}", [6], [["(\\d{2})(\\d{2})(\\d{2})", "$1.$2.$3", ["[02-57-9]"]]]], "NE": ["227", "00", "[027-9]\\d{7}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["08"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[089]|2[013]|7[0467]"]]]], "NF": ["672", "00", "[13]\\d{5}", [6], [["(\\d{2})(\\d{4})", "$1 $2", ["1[0-3]"]], ["(\\d)(\\d{5})", "$1 $2", ["[13]"]]], 0, 0, "([0-258]\\d{4})$", "3$1"], "NG": ["234", "009", "38\\d{6}|[78]\\d{9,13}|(?:20|9\\d)\\d{8}", [8, 10, 11, 12, 13, 14], [["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["3"], "0$1"], ["(\\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", "(?:444|(?:55|8\\d)\\d|666)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[4-68]"]]]], "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", ["(?: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", "(?: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", "[45]\\d{5}|(?:708|8\\d\\d)\\d{6}", [6, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[45]"], "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", "59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,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", ["[26]1|3[289]|4[1246-8]|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[16]|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, [["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"], ["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[013]|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-5]|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, "3[04-689]|[489]", 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", "92\\d{7}|(?:[15]|8\\d)\\d{8}", [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{3,4})", "$1 $2 $3", ["81"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]]], "0"], "SB": ["677", "0[01]", "[6-9]\\d{6}|[1-6]\\d{4}", [5, 7], [["(\\d{2})(\\d{5})", "$1 $2", ["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]], "SC": ["248", "010|0[0-2]", "(?:[2489]\\d|64)\\d{5}", [7], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[246]|9[57]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], "SD": ["249", "00", "[19]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[19]"], "0$1"]], "0"], "SE": ["46", "00", "(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}", [6, 7, 8, 9, 10, 12], [["(\\d{2})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["20"], "0$1", 0, "$1 $2 $3"], ["(\\d{3})(\\d{4})", "$1-$2", ["9(?:00|39|44|9)"], "0$1", 0, "$1 $2"], ["(\\d{2})(\\d{3})(\\d{2})", "$1-$2 $3", ["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"], "0$1", 0, "$1 $2 $3"], ["(\\d)(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], "0$1", 0, "$1 $2 $3"], ["(\\d{3})(\\d{2,3})(\\d{3})", "$1-$2 $3", ["9(?:00|39|44)"], "0$1", 0, "$1 $2 $3"], ["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["10|7"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{3})", "$1-$2 $3 $4", ["9"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1-$2 $3 $4 $5", ["[26]"], "0$1", 0, "$1 $2 $3 $4 $5"]], "0"], "SG": ["65", "0[0-3]\\d", "(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}", [8, 10, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["[369]|8(?:0[1-9]|[1-9])"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]], ["(\\d{4})(\\d{4})(\\d{3})", "$1 $2 $3", ["7"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]]]], "SH": ["290", "00", "(?:[256]\\d|8)\\d{3}", [4, 5], 0, 0, 0, 0, 0, 0, "[256]"], "SI": ["386", "00|10(?:22|66|88|99)", "[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}", [5, 6, 7, 8], [["(\\d{2})(\\d{3,6})", "$1 $2", ["8[09]|9"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["59|8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37][01]|4[0139]|51|6"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-57]"], "(0$1)"]], "0", 0, 0, 0, 0, 0, 0, "00"], "SJ": ["47", "00", "0\\d{4}|(?:[489]\\d|79)\\d{6}", [5, 8], 0, 0, 0, 0, 0, 0, "79"], "SK": ["421", "00", "[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}", [6, 7, 9], [["(\\d)(\\d{2})(\\d{3,4})", "$1 $2 $3", ["21"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["[3-5][1-8]1", "[3-5][1-8]1[67]"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1/$2 $3 $4", ["2"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[689]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1/$2 $3 $4", ["[3-5]"], "0$1"]], "0"], "SL": ["232", "00", "(?:[237-9]\\d|66)\\d{6}", [8], [["(\\d{2})(\\d{6})", "$1 $2", ["[236-9]"], "(0$1)"]], "0"], "SM": ["378", "00", "(?:0549|[5-7]\\d)\\d{6}", [8, 10], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-7]"]], ["(\\d{4})(\\d{6})", "$1 $2", ["0"]]], 0, 0, "([89]\\d{5})$", "0549$1"], "SN": ["221", "00", "(?:[378]\\d|93)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[379]"]]]], "SO": ["252", "00", "[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}", [6, 7, 8, 9], [["(\\d{2})(\\d{4})", "$1 $2", ["8[125]"]], ["(\\d{6})", "$1", ["[134]"]], ["(\\d)(\\d{6})", "$1 $2", ["[15]|2[0-79]|3[0-46-8]|4[0-7]"]], ["(\\d)(\\d{7})", "$1 $2", ["(?:2|90)4|[67]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[348]|64|79|90"]], ["(\\d{2})(\\d{5,7})", "$1 $2", ["1|28|6[0-35-9]|77|9[2-9]"]]], "0"], "SR": ["597", "00", "(?:[2-5]|68|[78]\\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-8]"]]]], "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", "[267]\\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", ["[267]"]], ["(\\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|[689]\\d|77)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[26-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{8}", [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", ["[0-57-9]"]]], 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-59]|61)", "5(?:[0-59]|61[06])", "5(?:[0-59]|61[06]1)"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24][1-8]|3[1-9]"], "(0$1)", 1], ["(\\d{3})(\\d{3})(\\d{6,7})", "$1 $2 $3", ["80"], "0$1", 1]], "0"], "TT": ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-46-8]\\d{6})$|1", "868$1", 0, "868"], "TV": ["688", "00", "(?:2|7\\d\\d|90)\\d{4}", [5, 6, 7], [["(\\d{2})(\\d{3})", "$1 $2", ["2"]], ["(\\d{2})(\\d{4})", "$1 $2", ["90"]], ["(\\d{2})(\\d{5})", "$1 $2", ["7"]]]], "TW": ["886", "0(?:0[25-79]|19)", "[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}", [7, 8, 9, 10, 11], [["(\\d{2})(\\d)(\\d{4})", "$1 $2 $3", ["202"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[258]0"], "0$1"], ["(\\d)(\\d{3,4})(\\d{4})", "$1 $2 $3", ["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]", "[23568]|4(?:0[2-48]|[1-47-9])|(?: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, [["(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[468])|7302[0-4]\\d)\\d{4}|(?:305[3-9]|472[24]|505[2-57-9]|7306|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-47-9]|1[02-9]|2[0135-79]|3[0-24679]|4[167]|5[0-2]|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-47-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-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|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-389]|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]|33|44|66|77|88)[2-9]\\d{6}"], 0, 0, 0, ["305209\\d{4}"]]], "UY": ["598", "0(?:0|1[3-9]\\d)", "0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}", [6, 7, 8, 9, 10, 11, 12, 13], [["(\\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-79]\\d|88)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[235-9]"]]]], "VA": ["39", "00", "0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}", [6, 7, 8, 9, 10, 11, 12], 0, 0, 0, 0, 0, 0, "06698"], "VC": ["1", "011", "(?:[58]\\d\\d|784|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "784$1", 0, "784"], "VE": ["58", "00", "[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}", [10], [["(\\d{3})(\\d{7})", "$1-$2", ["[24-689]"], "0$1"]], "0"], "VG": ["1", "011", "(?:284|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-578]\\d{6})$|1", "284$1", 0, "284"], "VI": ["1", "011", "[58]\\d{9}|(?:34|90)0\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "340$1", 0, "340"], "VN": ["84", "00", "[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}", [7, 8, 9, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["80"], "0$1", 1], ["(\\d{4})(\\d{4,6})", "$1 $2", ["1"], 0, 1], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["6"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[357-9]"], "0$1", 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["2[48]"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["2"], "0$1", 1]], "0"], "VU": ["678", "00", "[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}", [5, 7], [["(\\d{3})(\\d{4})", "$1 $2", ["[57-9]"]]]], "WF": ["681", "00", "(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}", [6, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[47-9]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]]]], "WS": ["685", "0", "(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}", [5, 6, 7, 10], [["(\\d{5})", "$1", ["[2-5]|6[1-9]"]], ["(\\d{3})(\\d{3,7})", "$1 $2", ["[68]"]], ["(\\d{2})(\\d{5})", "$1 $2", ["7"]]]], "XK": ["383", "00", "2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{5})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-4]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2|39"], "0$1"], ["(\\d{2})(\\d{7,10})", "$1 $2", ["3"], "0$1"]], "0"], "YE": ["967", "00", "(?:1|7\\d)\\d{7}|[1-7]\\d{6}", [7, 8, 9], [["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-6]|7(?:[24-6]|8[0-7])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["7"], "0$1"]], "0"], "YT": ["262", "00", "7093\\d{5}|(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}", [9], 0, "0", 0, 0, 0, 0, 0, [["269(?: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|63|[79]\\d)\\d{7}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[28]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["[79]"], "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|51"]], ["(\\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})|50\\d{3})\\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}"]]] } };
|
|
50162
50267
|
function withMetadataArgument(func, _arguments) {
|
|
50163
50268
|
var args = Array.prototype.slice.call(_arguments);
|
|
50164
50269
|
args.push(metadata);
|
|
@@ -51771,9 +51876,8 @@ function _arrayLikeToArray$1(arr, len) {
|
|
|
51771
51876
|
return arr2;
|
|
51772
51877
|
}
|
|
51773
51878
|
function getCountryByNationalNumber(nationalPhoneNumber, _ref) {
|
|
51774
|
-
var countries = _ref.countries,
|
|
51879
|
+
var countries = _ref.countries, metadata2 = _ref.metadata;
|
|
51775
51880
|
metadata2 = new Metadata(metadata2);
|
|
51776
|
-
var matchingCountries = [];
|
|
51777
51881
|
for (var _iterator = _createForOfIteratorHelperLoose(countries), _step; !(_step = _iterator()).done; ) {
|
|
51778
51882
|
var country = _step.value;
|
|
51779
51883
|
metadata2.country(country);
|
|
@@ -51785,19 +51889,9 @@ function getCountryByNationalNumber(nationalPhoneNumber, _ref) {
|
|
|
51785
51889
|
phone: nationalPhoneNumber,
|
|
51786
51890
|
country
|
|
51787
51891
|
}, void 0, metadata2.metadata)) {
|
|
51788
|
-
|
|
51789
|
-
if (country === defaultCountry) {
|
|
51790
|
-
return country;
|
|
51791
|
-
}
|
|
51792
|
-
matchingCountries.push(country);
|
|
51793
|
-
} else {
|
|
51794
|
-
return country;
|
|
51795
|
-
}
|
|
51892
|
+
return country;
|
|
51796
51893
|
}
|
|
51797
51894
|
}
|
|
51798
|
-
if (matchingCountries.length > 0) {
|
|
51799
|
-
return matchingCountries[0];
|
|
51800
|
-
}
|
|
51801
51895
|
}
|
|
51802
51896
|
function getCountryByCallingCode(callingCode, _ref) {
|
|
51803
51897
|
var nationalPhoneNumber = _ref.nationalNumber, defaultCountry = _ref.defaultCountry, metadata2 = _ref.metadata;
|
|
@@ -54563,7 +54657,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
54563
54657
|
emits: /* @__PURE__ */ mergeModels(["update:selectedItems", "orderBy", "select", "lastItemVisible"], ["update:loading", "update:itemHeight", "update:selectedItems"]),
|
|
54564
54658
|
setup(__props, { emit: __emit }) {
|
|
54565
54659
|
useCssVars((_ctx) => ({
|
|
54566
|
-
"
|
|
54660
|
+
"44de596f": unref(computedItemHeight)
|
|
54567
54661
|
}));
|
|
54568
54662
|
const emit2 = __emit;
|
|
54569
54663
|
const slots = useSlots();
|
|
@@ -54689,11 +54783,18 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
54689
54783
|
if (entry.isIntersecting && computedData.value.length) {
|
|
54690
54784
|
void ((_a2 = __props.onLastItemVisible) == null ? void 0 : _a2.call(__props));
|
|
54691
54785
|
}
|
|
54692
|
-
});
|
|
54786
|
+
}, { threshold: 0.5 });
|
|
54693
54787
|
}
|
|
54694
54788
|
onMounted(() => {
|
|
54695
54789
|
void registerLastItemObserver();
|
|
54696
54790
|
});
|
|
54791
|
+
watch(
|
|
54792
|
+
() => loading.value,
|
|
54793
|
+
(newLoadingVal, oldLoadingVal) => {
|
|
54794
|
+
if (newLoadingVal === oldLoadingVal) return;
|
|
54795
|
+
if (!newLoadingVal) registerLastItemObserver();
|
|
54796
|
+
}
|
|
54797
|
+
);
|
|
54697
54798
|
return (_ctx, _cache) => {
|
|
54698
54799
|
return openBlock(), createElementBlock("div", mergeProps({ class: "table-list-wrap h-100" }, unref(containerProps), {
|
|
54699
54800
|
class: { "loading-table": loading.value }
|
|
@@ -54787,7 +54888,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
54787
54888
|
};
|
|
54788
54889
|
}
|
|
54789
54890
|
});
|
|
54790
|
-
const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
54891
|
+
const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-3dbd30bd"]]);
|
|
54791
54892
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
54792
54893
|
__name: "Title",
|
|
54793
54894
|
props: {
|