@amwaljs/checkout-button 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/checkout/checkout.esm.js +1 -1
- package/dist/checkout/{p-c03b6161.entry.js → p-00045a8c.entry.js} +1 -1
- package/dist/checkout/p-01bbe74f.entry.js +1 -0
- package/dist/checkout/p-051412fa.entry.js +1 -0
- package/dist/checkout/p-09cbe586.entry.js +4 -0
- package/dist/checkout/{p-439ad699.entry.js → p-0a85a01f.entry.js} +2 -2
- package/dist/checkout/{p-d5652cd4.entry.js → p-0bbfeb3c.entry.js} +1 -1
- package/dist/checkout/{p-4ae1a390.entry.js → p-0d96b482.entry.js} +1 -1
- package/dist/checkout/{p-DUa_5Mmb.js → p-0f03cd28.js} +2 -2
- package/dist/checkout/p-104d7733.entry.js +1 -0
- package/dist/checkout/{p-8036cf49.entry.js → p-10ad151a.entry.js} +5 -5
- package/dist/checkout/p-112455b1.js +1 -0
- package/dist/checkout/p-11beffea.entry.js +1 -0
- package/dist/checkout/p-13245fd4.js +1 -0
- package/dist/checkout/p-13741a94.entry.js +1 -0
- package/dist/checkout/p-14ea2c82.entry.js +1 -0
- package/dist/checkout/p-167dc7a7.entry.js +4 -0
- package/dist/checkout/p-1a749b59.entry.js +1 -0
- package/dist/checkout/p-1c718939.entry.js +1 -0
- package/dist/checkout/{p-11205aeb.entry.js → p-1cbb13f2.entry.js} +1 -1
- package/dist/checkout/{p-46ff73b3.entry.js → p-20df5234.entry.js} +1 -1
- package/dist/checkout/p-24068b1c.entry.js +1 -0
- package/dist/checkout/{p-7006753a.entry.js → p-28ccecc7.entry.js} +2 -2
- package/dist/checkout/p-361649c3.js +4 -0
- package/dist/{components/p-DoR35tr_.js → checkout/p-39ad94cf.js} +2 -2
- package/dist/checkout/p-3b75b22a.js +5 -0
- package/dist/checkout/p-3b80783d.js +8 -0
- package/dist/checkout/p-3d3eefc3.js +4 -0
- package/dist/checkout/p-3e1e3453.js +4 -0
- package/dist/checkout/p-3e681e57.js +4 -0
- package/dist/checkout/{p-bf933eb6.entry.js → p-3e8da476.entry.js} +1 -1
- package/dist/checkout/{p-1dc08181.entry.js → p-4028c0d2.entry.js} +1 -1
- package/dist/checkout/p-44c91c42.entry.js +1 -0
- package/dist/checkout/p-464f5a60.entry.js +1 -0
- package/dist/checkout/p-46b7ee7f.entry.js +1 -0
- package/dist/checkout/p-48784250.entry.js +1 -0
- package/dist/{components/p-wiOwkFtc.js → checkout/p-4be20bf2.js} +1 -1
- package/dist/{components/p-Dl_WhQZu.js → checkout/p-4f78d3a0.js} +2 -2
- package/dist/checkout/{p-4da4ecc4.entry.js → p-529bce3f.entry.js} +1 -1
- package/dist/checkout/p-536a0294.js +4 -0
- package/dist/checkout/{p-eae2d3f2.entry.js → p-5eecd5ef.entry.js} +1 -1
- package/dist/checkout/p-64257c8d.entry.js +1 -0
- package/dist/checkout/{p-5903b3af.entry.js → p-64bd1dd3.entry.js} +1 -1
- package/dist/checkout/{p-9b7d7231.entry.js → p-68a4caba.entry.js} +1 -1
- package/dist/checkout/{p-978b3762.entry.js → p-69242ed6.entry.js} +1 -1
- package/dist/checkout/{p-62b7c8b0.entry.js → p-6d886d7e.entry.js} +1 -1
- package/dist/checkout/{p-ofaUly0p.js → p-6fa979e3.js} +2 -2
- package/dist/checkout/p-6fb474f3.entry.js +1 -0
- package/dist/checkout/p-77104220.js +7 -0
- package/dist/checkout/{p-aba43d04.entry.js → p-79ec3e4b.entry.js} +1 -1
- package/dist/checkout/{p-cd2c344b.entry.js → p-7b51bf67.entry.js} +2 -2
- package/dist/checkout/p-7f0004c9.js +4 -0
- package/dist/checkout/p-7fe50ab4.entry.js +1 -0
- package/dist/checkout/p-880b451c.entry.js +4 -0
- package/dist/checkout/p-886dad62.entry.js +1 -0
- package/dist/checkout/p-886e8746.entry.js +1 -0
- package/dist/checkout/p-88abdf59.js +4 -0
- package/dist/checkout/{p-f845e91b.entry.js → p-8a97a411.entry.js} +1 -1
- package/dist/checkout/p-8af3c6cc.entry.js +1 -0
- package/dist/checkout/{p-8b015c21.entry.js → p-8c022f5d.entry.js} +1 -1
- package/dist/checkout/{p-56e307eb.entry.js → p-91855eae.entry.js} +1 -1
- package/dist/checkout/{p-ca257d45.entry.js → p-9185e55b.entry.js} +1 -1
- package/dist/checkout/{p-4b34896c.entry.js → p-926eda98.entry.js} +1 -1
- package/dist/checkout/p-93e5b313.entry.js +4 -0
- package/dist/checkout/{p-4a86b731.entry.js → p-97024acb.entry.js} +1 -1
- package/dist/checkout/p-99e447f9.js +1 -0
- package/dist/{components/p-BgOwfqIY.js → checkout/p-9b519de5.js} +2 -2
- package/dist/checkout/{p-b8245f6a.entry.js → p-9b65a6e5.entry.js} +1 -1
- package/dist/checkout/{p-53ae9dd0.entry.js → p-9cc1fdfb.entry.js} +1 -1
- package/dist/checkout/{p-8fc1287a.entry.js → p-9f26fb71.entry.js} +1 -1
- package/dist/checkout/p-9f41a631.entry.js +1 -0
- package/dist/checkout/{p-5f005b5e.entry.js → p-a2ce8858.entry.js} +1 -1
- package/dist/checkout/{p-e4d0702d.entry.js → p-a3fca65c.entry.js} +1 -1
- package/dist/checkout/{p-d370e756.entry.js → p-a6056eb1.entry.js} +2 -2
- package/dist/checkout/{p-c929d6ea.entry.js → p-a7b2cbb9.entry.js} +1 -1
- package/dist/{components/p-Dwo-QLgs.js → checkout/p-ab16e6ce.js} +1 -1
- package/dist/checkout/{p-63db3363.entry.js → p-ab9a18c4.entry.js} +1 -1
- package/dist/checkout/p-b038db20.js +4 -0
- package/dist/checkout/p-b4ad8642.entry.js +1 -0
- package/dist/checkout/p-b4cf78ad.entry.js +1 -0
- package/dist/checkout/p-b7be2ec0.js +4 -0
- package/dist/checkout/p-b84d9e44.js +4 -0
- package/dist/{components/p-CwRU9ccI.js → checkout/p-b8fdd517.js} +1 -1
- package/dist/checkout/{p-d799009b.entry.js → p-b9d8ab12.entry.js} +1 -1
- package/dist/checkout/p-bb1f698e.js +4 -0
- package/dist/checkout/p-bd17be25.js +4 -0
- package/dist/checkout/p-bd4df0bc.entry.js +1 -0
- package/dist/checkout/p-c152bdea.js +4 -0
- package/dist/checkout/{p-f22v7XAM.js → p-c30e2b28.js} +2 -2
- package/dist/checkout/{p-c2296aa1.entry.js → p-c61a3d5d.entry.js} +1 -1
- package/dist/checkout/p-c6ee4bb6.entry.js +1 -0
- package/dist/checkout/p-c771a565.entry.js +1 -0
- package/dist/checkout/{p-3c9a8bee.entry.js → p-c82b2823.entry.js} +1 -1
- package/dist/checkout/p-c8f7d1b5.entry.js +1 -0
- package/dist/checkout/p-ceef30cd.entry.js +1 -0
- package/dist/checkout/p-d5733333.entry.js +1 -0
- package/dist/checkout/p-d5bba69c.entry.js +1 -0
- package/dist/checkout/p-d60b2328.js +4 -0
- package/dist/checkout/p-d60e05e2.entry.js +1 -0
- package/dist/checkout/p-d6b04157.entry.js +1 -0
- package/dist/checkout/p-d7a430bf.js +2 -0
- package/dist/checkout/{p-B3WORC1a.js → p-d839c693.js} +1 -1
- package/dist/checkout/{p-141f2eab.entry.js → p-d9dfb3ae.entry.js} +3 -3
- package/dist/checkout/p-dc51d318.js +5 -0
- package/dist/checkout/p-ddbe30b8.entry.js +1 -0
- package/dist/checkout/p-de418dd1.entry.js +1 -0
- package/dist/checkout/{p-b4000357.entry.js → p-defa5f72.entry.js} +2 -2
- package/dist/checkout/{p-b90c064e.entry.js → p-df0fa5e1.entry.js} +2 -2
- package/dist/checkout/{p-c8740acc.entry.js → p-e0f073f1.entry.js} +3 -3
- package/dist/checkout/p-e237d611.entry.js +1 -0
- package/dist/checkout/p-ea71fb8d.entry.js +1 -0
- package/dist/checkout/{p-95563c4c.entry.js → p-eda93a0b.entry.js} +1 -1
- package/dist/checkout/p-eee05053.entry.js +1 -0
- package/dist/checkout/{p-95431a73.entry.js → p-f8460dc4.entry.js} +1 -1
- package/dist/checkout/p-f875507d.entry.js +1 -0
- package/dist/checkout/p-faf06441.js +4 -0
- package/dist/checkout/p-fb147065.entry.js +1 -0
- package/dist/checkout/{p-af32124b.entry.js → p-fb45cdd1.entry.js} +1 -1
- package/dist/cjs/_commonjsHelpers-537d719a.js +20 -0
- package/dist/cjs/amwal-checkout-button_5.cjs.entry.js +1298 -2881
- package/dist/cjs/amwal-installments-guide.cjs.entry.js +42 -43
- package/dist/cjs/amwal-pos.cjs.entry.js +3180 -3452
- package/dist/cjs/amwal-widget-modal.cjs.entry.js +162 -175
- package/dist/cjs/amwal-widget.cjs.entry.js +314 -343
- package/dist/cjs/{animation-BhN-MT4J.js → animation-26241cb2.js} +2 -2
- package/dist/cjs/{app-globals-NtXImkuk.js → app-globals-42a13029.js} +1 -1
- package/dist/cjs/{ar-CbT6TM-Q.js → ar-3a6829a4.js} +10 -4
- package/dist/cjs/{capacitor-CqhugS19.js → capacitor-a9365f60.js} +1 -1
- package/dist/cjs/checkout.cjs.js +19 -16
- package/dist/cjs/{data-UgkxeXMB.js → data-19081291.js} +1 -1
- package/dist/cjs/{form-controller-DRf0gBOg.js → form-controller-3ffb27b1.js} +1 -1
- package/dist/cjs/{framework-delegate-D-6PUvOi.js → framework-delegate-ab2cc190.js} +1 -1
- package/dist/cjs/{gesture-controller-IMq9Cgi2.js → gesture-controller-b1c0efac.js} +1 -1
- package/dist/cjs/{haptic-CC9tl6g8.js → haptic-80174512.js} +1 -1
- package/dist/cjs/{hardware-back-button-C2D2eOk8.js → hardware-back-button-ddfefd22.js} +3 -3
- package/dist/cjs/{helpers-B4vhh9gt.js → helpers-72ba682d.js} +4 -1
- package/dist/cjs/i18n-18ad02d5.js +13 -0
- package/dist/cjs/{index-CKcQE8Zg.js → index-0d0b84fb.js} +4 -3
- package/dist/cjs/{index-6eOg4xTk.js → index-2602a653.js} +0 -1
- package/dist/cjs/{index-DZA7ogU0.js → index-2cd1a895.js} +4 -4
- package/dist/cjs/index-7522b3a9.js +2256 -0
- package/dist/cjs/{index-bc_r9XRf.js → index-9b7d2c31.js} +9 -9
- package/dist/cjs/{index-q1ImtF5k.js → index-ce06e6a3.js} +3 -3
- package/dist/cjs/{index-XMjUjboS.js → index-da554121.js} +3 -3
- package/dist/cjs/{input-shims-CCRbO2DB.js → input-shims-1a8ed779.js} +6 -6
- package/dist/cjs/{input.utils-CyVgmmWQ.js → input.utils-67143876.js} +3 -3
- package/dist/cjs/ion-accordion-group.cjs.entry.js +199 -203
- package/dist/cjs/ion-accordion.cjs.entry.js +305 -305
- package/dist/cjs/ion-action-sheet_3.cjs.entry.js +695 -705
- package/dist/cjs/ion-app.cjs.entry.js +95 -93
- package/dist/cjs/ion-avatar.cjs.entry.js +14 -12
- package/dist/cjs/ion-back-button.cjs.entry.js +78 -76
- package/dist/cjs/ion-backdrop.cjs.entry.js +44 -42
- package/dist/cjs/ion-badge.cjs.entry.js +19 -17
- package/dist/cjs/ion-breadcrumb.cjs.entry.js +86 -84
- package/dist/cjs/ion-breadcrumbs.cjs.entry.js +120 -124
- package/dist/cjs/ion-buttons_3.cjs.entry.js +822 -822
- package/dist/cjs/ion-card-content.cjs.entry.js +19 -17
- package/dist/cjs/ion-card-header.cjs.entry.js +22 -20
- package/dist/cjs/ion-card-subtitle.cjs.entry.js +20 -18
- package/dist/cjs/ion-card-title.cjs.entry.js +20 -18
- package/dist/cjs/ion-card.cjs.entry.js +55 -53
- package/dist/cjs/ion-checkbox_7.cjs.entry.js +862 -882
- package/dist/cjs/ion-chip.cjs.entry.js +24 -22
- package/dist/cjs/ion-col.cjs.entry.js +110 -108
- package/dist/cjs/ion-content.cjs.entry.js +376 -374
- package/dist/cjs/ion-datetime-button.cjs.entry.js +330 -328
- package/dist/cjs/ion-datetime.cjs.entry.js +1547 -1567
- package/dist/cjs/ion-fab-button.cjs.entry.js +78 -76
- package/dist/cjs/ion-fab-list.cjs.entry.js +31 -31
- package/dist/cjs/ion-fab.cjs.entry.js +58 -58
- package/dist/cjs/ion-footer.cjs.entry.js +94 -92
- package/dist/cjs/ion-grid.cjs.entry.js +17 -15
- package/dist/cjs/ion-header.cjs.entry.js +143 -141
- package/dist/cjs/ion-icon.cjs.entry.js +104 -112
- package/dist/cjs/ion-img.cjs.entry.js +83 -83
- package/dist/cjs/ion-infinite-scroll-content.cjs.entry.js +34 -32
- package/dist/cjs/ion-infinite-scroll.cjs.entry.js +174 -176
- package/dist/cjs/ion-input.cjs.entry.js +447 -453
- package/dist/cjs/ion-item-divider.cjs.entry.js +23 -21
- package/dist/cjs/ion-item-group.cjs.entry.js +20 -18
- package/dist/cjs/ion-item-option.cjs.entry.js +45 -43
- package/dist/cjs/ion-item-options.cjs.entry.js +40 -38
- package/dist/cjs/ion-item-sliding.cjs.entry.js +391 -391
- package/dist/cjs/ion-loading.cjs.entry.js +162 -164
- package/dist/cjs/ion-menu-button.cjs.entry.js +60 -58
- package/dist/cjs/ion-menu-toggle.cjs.entry.js +36 -34
- package/dist/cjs/ion-menu.cjs.entry.js +606 -612
- package/dist/cjs/ion-modal.cjs.entry.js +551 -553
- package/dist/cjs/ion-nav-link.cjs.entry.js +17 -15
- package/dist/cjs/ion-nav.cjs.entry.js +823 -825
- package/dist/cjs/ion-note.cjs.entry.js +19 -17
- package/dist/cjs/ion-picker-column.cjs.entry.js +327 -327
- package/dist/cjs/ion-picker.cjs.entry.js +198 -200
- package/dist/cjs/ion-popover.cjs.entry.js +326 -330
- package/dist/cjs/ion-progress-bar.cjs.entry.js +44 -42
- package/dist/cjs/ion-range.cjs.entry.js +644 -654
- package/dist/cjs/ion-refresher-content.cjs.entry.js +53 -51
- package/dist/cjs/ion-refresher.cjs.entry.js +586 -586
- package/dist/cjs/ion-reorder-group.cjs.entry.js +252 -252
- package/dist/cjs/ion-reorder.cjs.entry.js +26 -24
- package/dist/cjs/ion-route-redirect.cjs.entry.js +19 -21
- package/dist/cjs/ion-route.cjs.entry.js +37 -41
- package/dist/cjs/ion-router-link.cjs.entry.js +31 -29
- package/dist/cjs/ion-router-outlet.cjs.entry.js +178 -178
- package/dist/cjs/ion-router.cjs.entry.js +266 -264
- package/dist/cjs/ion-row.cjs.entry.js +12 -10
- package/dist/cjs/ion-searchbar.cjs.entry.js +388 -396
- package/dist/cjs/ion-segment-button.cjs.entry.js +96 -96
- package/dist/cjs/ion-segment.cjs.entry.js +414 -420
- package/dist/cjs/ion-select-option.cjs.entry.js +16 -14
- package/dist/cjs/ion-select.cjs.entry.js +693 -699
- package/dist/cjs/ion-skeleton-text.cjs.entry.js +35 -33
- package/dist/cjs/ion-spinner.cjs.entry.js +50 -48
- package/dist/cjs/ion-split-pane.cjs.entry.js +120 -124
- package/dist/cjs/ion-tab-bar.cjs.entry.js +66 -66
- package/dist/cjs/ion-tab-button.cjs.entry.js +82 -80
- package/dist/cjs/ion-tab.cjs.entry.js +50 -50
- package/dist/cjs/ion-tabs.cjs.entry.js +134 -132
- package/dist/cjs/ion-textarea.cjs.entry.js +396 -400
- package/dist/cjs/ion-thumbnail.cjs.entry.js +12 -10
- package/dist/cjs/ion-title.cjs.entry.js +43 -43
- package/dist/cjs/ion-toast.cjs.entry.js +371 -375
- package/dist/cjs/ion-toggle.cjs.entry.js +230 -230
- package/dist/cjs/ion-toolbar.cjs.entry.js +61 -59
- package/dist/cjs/{ionic-global-DRLi5Iq3.js → ionic-global-3915f1f1.js} +55 -58
- package/dist/cjs/{ios.transition-D4vyO_a_.js → ios.transition-b9c0b967.js} +5 -5
- package/dist/cjs/{keyboard-iyHR2ZF4.js → keyboard-5d4b83b3.js} +3 -3
- package/dist/cjs/{keyboard-DuKzsHsS.js → keyboard-bc8ebbf7.js} +1 -1
- package/dist/cjs/{keyboard-controller-rH21qC_2.js → keyboard-controller-c6633754.js} +2 -2
- package/dist/cjs/loader.cjs.js +19 -8
- package/dist/cjs/{md.transition-Dkxy3kpE.js → md.transition-830acbb7.js} +5 -5
- package/dist/cjs/{menu-toggle-util-CmPuayU0.js → menu-toggle-util-315c26b3.js} +1 -1
- package/dist/cjs/{notch-controller-Dtpow1eD.js → notch-controller-dcf09601.js} +2 -2
- package/dist/cjs/{overlays-Bc8tk6t5.js → overlays-08819e3f.js} +6 -6
- package/dist/cjs/{refresher.utils-CPl6gciv.js → refresher.utils-e41509f7.js} +3 -3
- package/dist/cjs/{status-tap-XtIhF72O.js → status-tap-ec021cb4.js} +4 -4
- package/dist/cjs/{swipe-back-C9j0kufI.js → swipe-back-3d3a5129.js} +4 -4
- package/dist/collection/collection-manifest.json +8 -8
- package/dist/collection/components/amwal-checkout-button/amwal-checkout-button.js +1714 -1888
- package/dist/collection/components/amwal-checkout-button/amwal-checkout-button.stories.js +84 -84
- package/dist/collection/components/amwal-installments-guide/amwal-installments-guide.js +75 -80
- package/dist/collection/components/amwal-installments-guide/amwal-installments-guide.stories.js +25 -25
- package/dist/collection/components/amwal-installments-timeline/amwal-installments-timeline.js +506 -569
- package/dist/collection/components/amwal-installments-timeline/amwal-installments-timeline.stories.js +80 -80
- package/dist/collection/components/amwal-pos/amwal-pos.js +1022 -1094
- package/dist/collection/components/amwal-pos/amwal-pos.stories.js +209 -209
- package/dist/collection/components/amwal-widget/amwal-widget-modal.js +326 -350
- package/dist/collection/components/amwal-widget/amwal-widget.js +673 -736
- package/dist/collection/components/amwal-widget/amwal-widget.stories.js +184 -184
- package/dist/collection/lang/i18n.js +7 -7
- package/dist/components/amwal-checkout-button.d.ts +2 -2
- package/dist/components/amwal-checkout-button.js +3811 -1
- package/dist/components/amwal-installments-guide.d.ts +2 -2
- package/dist/components/amwal-installments-guide.js +75 -1
- package/dist/components/amwal-installments-timeline.d.ts +2 -2
- package/dist/components/amwal-installments-timeline.js +6 -1
- package/dist/components/amwal-pos.d.ts +2 -2
- package/dist/components/amwal-pos.js +3391 -1
- package/dist/components/amwal-widget-modal.d.ts +2 -2
- package/dist/components/amwal-widget-modal.js +6 -1
- package/dist/components/amwal-widget.d.ts +2 -2
- package/dist/components/amwal-widget.js +389 -1
- package/dist/components/index.d.ts +0 -6
- package/dist/components/index.js +6 -1
- package/dist/components/ion-accordion-group.js +248 -1
- package/dist/components/ion-accordion.js +353 -1
- package/dist/components/ion-action-sheet.js +6 -1
- package/dist/components/ion-alert.js +6 -1
- package/dist/components/ion-app.js +125 -1
- package/dist/components/ion-avatar.js +39 -1
- package/dist/components/ion-back-button.js +127 -1
- package/dist/components/ion-backdrop.js +6 -1
- package/dist/components/ion-badge.js +46 -1
- package/dist/components/ion-breadcrumb.js +131 -1
- package/dist/components/ion-breadcrumbs.js +152 -1
- package/dist/components/ion-button.js +6 -1
- package/dist/components/ion-buttons.js +6 -1
- package/dist/components/ion-card-content.js +43 -1
- package/dist/components/ion-card-header.js +50 -1
- package/dist/components/ion-card-subtitle.js +47 -1
- package/dist/components/ion-card-title.js +47 -1
- package/dist/components/ion-card.js +98 -1
- package/dist/components/ion-checkbox.js +6 -1
- package/dist/components/ion-chip.js +59 -1
- package/dist/components/ion-col.js +186 -2
- package/dist/components/ion-content.js +440 -1
- package/dist/components/ion-datetime-button.js +378 -1
- package/dist/components/ion-datetime.js +1961 -2
- package/dist/components/ion-fab-button.js +130 -1
- package/dist/components/ion-fab-list.js +56 -1
- package/dist/components/ion-fab.js +90 -1
- package/dist/components/ion-footer.js +152 -2
- package/dist/components/ion-grid.js +41 -1
- package/dist/components/ion-header.js +356 -2
- package/dist/components/ion-icon.js +6 -1
- package/dist/components/ion-img.js +124 -1
- package/dist/components/ion-infinite-scroll-content.js +69 -1
- package/dist/components/ion-infinite-scroll.js +209 -1
- package/dist/components/ion-input.js +564 -1
- package/dist/components/ion-item-divider.js +51 -1
- package/dist/components/ion-item-group.js +44 -1
- package/dist/components/ion-item-option.js +85 -1
- package/dist/components/ion-item-options.js +67 -1
- package/dist/components/ion-item-sliding.js +449 -1
- package/dist/components/ion-item.js +6 -1
- package/dist/components/ion-label.js +6 -1
- package/dist/components/ion-list-header.js +6 -1
- package/dist/components/ion-list.js +6 -1
- package/dist/components/ion-loading.js +325 -3
- package/dist/components/ion-menu-button.js +100 -1
- package/dist/components/ion-menu-toggle.js +57 -1
- package/dist/components/ion-menu.js +679 -1
- package/dist/components/ion-modal.js +1775 -3
- package/dist/components/ion-nav-link.js +63 -2
- package/dist/components/ion-nav.js +945 -2
- package/dist/components/ion-note.js +6 -1
- package/dist/components/ion-picker-column-internal.js +6 -1
- package/dist/components/ion-picker-column.js +6 -1
- package/dist/components/ion-picker-internal.js +6 -1
- package/dist/components/ion-picker.js +317 -3
- package/dist/components/ion-popover.js +6 -1
- package/dist/components/ion-progress-bar.js +79 -1
- package/dist/components/ion-radio-group.js +6 -1
- package/dist/components/ion-radio.js +6 -1
- package/dist/components/ion-range.js +778 -2
- package/dist/components/ion-refresher-content.js +90 -1
- package/dist/components/ion-refresher.js +652 -1
- package/dist/components/ion-reorder-group.js +300 -1
- package/dist/components/ion-reorder.js +58 -1
- package/dist/components/ion-ripple-effect.js +6 -1
- package/dist/components/ion-route-redirect.js +42 -1
- package/dist/components/ion-route.js +66 -1
- package/dist/components/ion-router-link.js +60 -1
- package/dist/components/ion-router-outlet.js +219 -1
- package/dist/components/ion-router.js +833 -3
- package/dist/components/ion-row.js +34 -1
- package/dist/components/ion-searchbar.js +472 -1
- package/dist/components/ion-segment-button.js +139 -1
- package/dist/components/ion-segment.js +472 -1
- package/dist/components/ion-select-option.js +42 -1
- package/dist/components/ion-select-popover.js +6 -1
- package/dist/components/ion-select.js +864 -1
- package/dist/components/ion-skeleton-text.js +59 -1
- package/dist/components/ion-spinner.js +6 -1
- package/dist/components/ion-split-pane.js +166 -1
- package/dist/components/ion-tab-bar.js +95 -1
- package/dist/components/ion-tab-button.js +125 -1
- package/dist/components/ion-tab.js +80 -1
- package/dist/components/ion-tabs.js +176 -1
- package/dist/components/ion-text.js +6 -1
- package/dist/components/ion-textarea.js +496 -1
- package/dist/components/ion-thumbnail.js +34 -1
- package/dist/components/ion-title.js +71 -1
- package/dist/components/ion-toast.js +914 -3
- package/dist/components/ion-toggle.js +282 -1
- package/dist/components/ion-toolbar.js +91 -1
- package/dist/components/p-01b49f83.js +269 -0
- package/dist/{esm/ios.transition-DMsViooj.js → components/p-02b77441.js} +2 -5
- package/dist/components/p-02bc6b21.js +203 -0
- package/dist/components/p-031ed92d.js +389 -0
- package/dist/components/p-03803c7d.js +369 -0
- package/dist/components/p-089e034e.js +234 -0
- package/dist/components/p-0dc7a5ff.js +512 -0
- package/dist/components/p-110f8490.js +566 -0
- package/dist/components/p-112455b1.js +17 -0
- package/dist/{esm/index-BMJhFU53.js → components/p-1596e301.js} +4 -4
- package/dist/components/p-1785e30a.js +318 -0
- package/dist/{esm/helpers-C6kqtbmV.js → components/p-2bb89b46.js} +5 -2
- package/dist/components/p-2d7d745d.js +224 -0
- package/dist/components/p-2fc99fef.js +262 -0
- package/dist/{esm/input-shims-DSFPFhb7.js → components/p-3296ebd9.js} +4 -6
- package/dist/{esm/data-Cl-_yBA0.js → components/p-39ad94cf.js} +2 -2
- package/dist/{esm/capacitor-CG3xQUND.js → components/p-3d3eefc3.js} +1 -1
- package/dist/{esm/form-controller-xetTxjL6.js → components/p-3e1d2896.js} +1 -1
- package/dist/{esm/keyboard-controller-CqGCg8tB.js → components/p-3e1e3453.js} +2 -2
- package/dist/{esm/md.transition-BQT2r4ED.js → components/p-503328f2.js} +2 -5
- package/dist/components/p-51c44f42.js +98 -0
- package/dist/components/p-5280b372.js +42 -0
- package/dist/{esm/index-DuUXGZp2.js → components/p-53e2dbe4.js} +3 -3
- package/dist/components/p-5441c730.js +851 -0
- package/dist/{esm/refresher.utils-D4tPnZsM.js → components/p-74e68924.js} +4 -4
- package/dist/{esm/framework-delegate-D_uGiYYw.js → components/p-76525f0f.js} +1 -1
- package/dist/{esm/index-CcopIPA0.js → components/p-77104220.js} +6 -4
- package/dist/components/p-77ccb793.js +185 -0
- package/dist/components/p-83e529db.js +380 -0
- package/dist/{esm/animation-DRf3dwMu.js → components/p-89c4c5cb.js} +2 -2
- package/dist/components/p-8b3d1e06.js +67 -0
- package/dist/components/p-901c16c5.js +210 -0
- package/dist/components/p-93e2a608.js +374 -0
- package/dist/components/p-95c79593.js +43 -0
- package/dist/components/p-96073863.js +82 -0
- package/dist/components/p-99e447f9.js +13 -0
- package/dist/{esm/keyboard-DgiyREKb.js → components/p-9b519de5.js} +1 -1
- package/dist/{esm/input.utils-BuIvhxo3.js → components/p-9d350d61.js} +3 -3
- package/dist/{esm/notch-controller-CQeDnZLe.js → components/p-9df67c24.js} +2 -2
- package/dist/components/p-a0e691dd.js +39 -0
- package/dist/components/p-ab10d1ae.js +47 -0
- package/dist/components/p-abc01c5d.js +194 -0
- package/dist/components/p-abd248d1.js +196 -0
- package/dist/{esm/haptic-D5jGzBs8.js → components/p-af073aaf.js} +2 -2
- package/dist/{esm/swipe-back-DE05lWQD.js → components/p-b32529b9.js} +3 -4
- package/dist/{esm/index-C75BfBAE.js → components/p-b8fdd517.js} +1 -2
- package/dist/components/p-cebc113f.js +38 -0
- package/dist/components/p-d25fd077.js +331 -0
- package/dist/{esm/menu-toggle-util-wdO31cdC.js → components/p-d3596f64.js} +1 -1
- package/dist/{esm/keyboard-DcbqYXj5.js → components/p-d60b2328.js} +1 -3
- package/dist/components/p-d69dc32f.js +97 -0
- package/dist/{esm/hardware-back-button-CzxcJiYO.js → components/p-d72e8d7b.js} +2 -3
- package/dist/{esm/ar-B3WORC1a.js → components/p-d839c693.js} +12 -5
- package/dist/{esm/index-D8d_89Nl.js → components/p-e187a77c.js} +1 -1
- package/dist/components/p-e65ea9fb.js +1379 -0
- package/dist/components/p-ec0e3f3f.js +2040 -0
- package/dist/components/p-ecb4db1c.js +64 -0
- package/dist/{esm/gesture-controller-CukVBo5-.js → components/p-f728a68f.js} +1 -1
- package/dist/components/p-f7e3c502.js +73 -0
- package/dist/components/p-fe463a42.js +272 -0
- package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
- package/dist/esm/amwal-checkout-button_5.entry.js +1296 -2881
- package/dist/esm/amwal-installments-guide.entry.js +40 -43
- package/dist/esm/amwal-pos.entry.js +3178 -3452
- package/dist/esm/amwal-widget-modal.entry.js +160 -175
- package/dist/esm/amwal-widget.entry.js +312 -343
- package/dist/esm/animation-a6d5c3b1.js +1063 -0
- package/dist/esm/{app-globals-BHnkZZiH.js → app-globals-c817b28b.js} +1 -1
- package/dist/esm/ar-7d2629bf.js +51 -0
- package/dist/esm/capacitor-ba4337da.js +13 -0
- package/dist/esm/checkout.js +18 -16
- package/dist/esm/config-8e06237c.js +171 -0
- package/dist/esm/cubic-bezier-874f336d.js +90 -0
- package/dist/esm/data-8916315d.js +1628 -0
- package/dist/esm/dir-1d4aa386.js +18 -0
- package/dist/esm/focus-visible-32968d3d.js +75 -0
- package/dist/esm/form-controller-b1aa7393.js +64 -0
- package/dist/esm/framework-delegate-de1aa369.js +140 -0
- package/dist/esm/gesture-controller-58ffa500.js +195 -0
- package/dist/esm/haptic-4d4d8eb1.js +206 -0
- package/dist/esm/hardware-back-button-f93acff0.js +116 -0
- package/dist/esm/helpers-f0dcbd72.js +418 -0
- package/dist/esm/i18n-53f85411.js +13 -0
- package/dist/esm/{index-CNcx43L8.js → index-0b560278.js} +4 -4
- package/dist/esm/index-5894dd63.js +196 -0
- package/dist/esm/{index-DUF6JAQL.js → index-5a126e54.js} +6 -6
- package/dist/esm/index-5e663431.js +128 -0
- package/dist/esm/index-8cc94b11.js +2219 -0
- package/dist/esm/index-afdf867c.js +26 -0
- package/dist/esm/index-d9b41a43.js +34 -0
- package/dist/esm/index-f6dce931.js +466 -0
- package/dist/esm/index-fb97e55c.js +7 -0
- package/dist/esm/input-shims-75d4750d.js +617 -0
- package/dist/esm/input.utils-79bde07f.js +138 -0
- package/dist/esm/ion-accordion-group.entry.js +197 -203
- package/dist/esm/ion-accordion.entry.js +303 -305
- package/dist/esm/ion-action-sheet_3.entry.js +693 -705
- package/dist/esm/ion-app.entry.js +93 -93
- package/dist/esm/ion-avatar.entry.js +12 -12
- package/dist/esm/ion-back-button.entry.js +76 -76
- package/dist/esm/ion-backdrop.entry.js +42 -42
- package/dist/esm/ion-badge.entry.js +17 -17
- package/dist/esm/ion-breadcrumb.entry.js +84 -84
- package/dist/esm/ion-breadcrumbs.entry.js +118 -124
- package/dist/esm/ion-buttons_3.entry.js +820 -822
- package/dist/esm/ion-card-content.entry.js +17 -17
- package/dist/esm/ion-card-header.entry.js +20 -20
- package/dist/esm/ion-card-subtitle.entry.js +18 -18
- package/dist/esm/ion-card-title.entry.js +18 -18
- package/dist/esm/ion-card.entry.js +53 -53
- package/dist/esm/ion-checkbox_7.entry.js +860 -882
- package/dist/esm/ion-chip.entry.js +22 -22
- package/dist/esm/ion-col.entry.js +108 -108
- package/dist/esm/ion-content.entry.js +374 -374
- package/dist/esm/ion-datetime-button.entry.js +328 -328
- package/dist/esm/ion-datetime.entry.js +1545 -1567
- package/dist/esm/ion-fab-button.entry.js +76 -76
- package/dist/esm/ion-fab-list.entry.js +29 -31
- package/dist/esm/ion-fab.entry.js +56 -58
- package/dist/esm/ion-footer.entry.js +92 -92
- package/dist/esm/ion-grid.entry.js +15 -15
- package/dist/esm/ion-header.entry.js +141 -141
- package/dist/esm/ion-icon.entry.js +102 -112
- package/dist/esm/ion-img.entry.js +81 -83
- package/dist/esm/ion-infinite-scroll-content.entry.js +32 -32
- package/dist/esm/ion-infinite-scroll.entry.js +172 -176
- package/dist/esm/ion-input.entry.js +445 -453
- package/dist/esm/ion-item-divider.entry.js +21 -21
- package/dist/esm/ion-item-group.entry.js +18 -18
- package/dist/esm/ion-item-option.entry.js +43 -43
- package/dist/esm/ion-item-options.entry.js +38 -38
- package/dist/esm/ion-item-sliding.entry.js +389 -391
- package/dist/esm/ion-loading.entry.js +160 -164
- package/dist/esm/ion-menu-button.entry.js +58 -58
- package/dist/esm/ion-menu-toggle.entry.js +34 -34
- package/dist/esm/ion-menu.entry.js +604 -612
- package/dist/esm/ion-modal.entry.js +549 -553
- package/dist/esm/ion-nav-link.entry.js +15 -15
- package/dist/esm/ion-nav.entry.js +821 -825
- package/dist/esm/ion-note.entry.js +17 -17
- package/dist/esm/ion-picker-column.entry.js +325 -327
- package/dist/esm/ion-picker.entry.js +196 -200
- package/dist/esm/ion-popover.entry.js +324 -330
- package/dist/esm/ion-progress-bar.entry.js +42 -42
- package/dist/esm/ion-range.entry.js +642 -654
- package/dist/esm/ion-refresher-content.entry.js +51 -51
- package/dist/esm/ion-refresher.entry.js +584 -586
- package/dist/esm/ion-reorder-group.entry.js +250 -252
- package/dist/esm/ion-reorder.entry.js +24 -24
- package/dist/esm/ion-route-redirect.entry.js +17 -21
- package/dist/esm/ion-route.entry.js +35 -41
- package/dist/esm/ion-router-link.entry.js +29 -29
- package/dist/esm/ion-router-outlet.entry.js +176 -178
- package/dist/esm/ion-router.entry.js +264 -264
- package/dist/esm/ion-row.entry.js +10 -10
- package/dist/esm/ion-searchbar.entry.js +386 -396
- package/dist/esm/ion-segment-button.entry.js +94 -96
- package/dist/esm/ion-segment.entry.js +412 -420
- package/dist/esm/ion-select-option.entry.js +14 -14
- package/dist/esm/ion-select.entry.js +691 -699
- package/dist/esm/ion-skeleton-text.entry.js +33 -33
- package/dist/esm/ion-spinner.entry.js +48 -48
- package/dist/esm/ion-split-pane.entry.js +118 -124
- package/dist/esm/ion-tab-bar.entry.js +64 -66
- package/dist/esm/ion-tab-button.entry.js +80 -80
- package/dist/esm/ion-tab.entry.js +48 -50
- package/dist/esm/ion-tabs.entry.js +132 -132
- package/dist/esm/ion-textarea.entry.js +394 -400
- package/dist/esm/ion-thumbnail.entry.js +10 -10
- package/dist/esm/ion-title.entry.js +41 -43
- package/dist/esm/ion-toast.entry.js +369 -375
- package/dist/esm/ion-toggle.entry.js +228 -230
- package/dist/esm/ion-toolbar.entry.js +59 -59
- package/dist/esm/{ionic-global-DXXzPLPc.js → ionic-global-0b7766cb.js} +55 -58
- package/dist/esm/ios.transition-22fb53bc.js +651 -0
- package/dist/esm/keyboard-1f073554.js +82 -0
- package/dist/esm/keyboard-96b6e80b.js +146 -0
- package/dist/esm/keyboard-controller-5a2f625f.js +165 -0
- package/dist/esm/loader.js +17 -8
- package/dist/esm/lock-controller-632e3c10.js +38 -0
- package/dist/esm/md.transition-f6ff9834.js +57 -0
- package/dist/esm/menu-toggle-util-594849ff.js +12 -0
- package/dist/esm/notch-controller-d511b3b3.js +153 -0
- package/dist/esm/{overlays-SBLrmFy6.js → overlays-642a91df.js} +7 -7
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/refresher.utils-19137568.js +196 -0
- package/dist/esm/{status-tap-CjxQA4Bj.js → status-tap-bb6959a8.js} +4 -4
- package/dist/esm/swipe-back-6cec4c33.js +79 -0
- package/dist/esm/theme-35c700b7.js +43 -0
- package/dist/esm/watch-options-7bf43687.js +47 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/accordion/accordion.ios.css +193 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/accordion/accordion.md.css +135 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/accordion-group/accordion-group.ios.css +127 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/accordion-group/accordion-group.md.css +229 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.ios.css +456 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.md.css +384 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.ios.css +755 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.md.css +770 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/app/app.css +17 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.ios.css +132 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.md.css +132 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.ios.css +372 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.md.css +385 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.ios.css +136 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.md.css +136 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.ios.css +168 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.md.css +164 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumb/breadcrumb.ios.css +326 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumb/breadcrumb.md.css +310 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumbs/breadcrumbs.ios.css +81 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumbs/breadcrumbs.md.css +80 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/button/button.ios.css +596 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/button/button.md.css +517 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.ios.css +279 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.md.css +299 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card/card.ios.css +203 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card/card.md.css +198 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.ios.css +163 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.md.css +165 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.ios.css +141 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.md.css +138 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.ios.css +138 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.md.css +136 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.ios.css +137 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.md.css +137 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.ios.css +536 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.md.css +552 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.ios.css +212 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.md.css +207 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/col/col.css +200 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/content/content.css +282 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.ios.css +850 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.md.css +706 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/datetime-button/datetime-button.css +100 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/fab/fab.css +366 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.ios.css +422 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.md.css +393 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/fab-list/fab-list.css +240 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.ios.css +146 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.md.css +129 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/grid/grid.css +235 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/header/header.ios.css +250 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/header/header.md.css +133 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/img/img.css +12 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll/infinite-scroll.css +8 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.ios.css +156 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.md.css +156 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/input/input.ios.css +833 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/input/input.md.css +1446 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item/item.ios.css +815 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item/item.md.css +1187 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.ios.css +351 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.md.css +417 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.ios.css +114 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.md.css +114 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.ios.css +242 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.md.css +236 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.ios.css +287 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.md.css +284 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-sliding/item-sliding.css +121 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/label/label.ios.css +334 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/label/label.md.css +421 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/list/list.ios.css +242 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/list/list.md.css +287 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.ios.css +285 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.md.css +266 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.ios.css +205 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.md.css +196 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.ios.css +378 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.md.css +374 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.ios.css +279 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.md.css +282 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/menu-toggle/menu-toggle.css +3 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.ios.css +357 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.md.css +272 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/nav/nav.css +64 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/note/note.ios.css +127 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/note/note.md.css +127 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.ios.css +367 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.md.css +354 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.ios.css +255 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.md.css +246 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.ios.css +138 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.md.css +196 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.ios.css +262 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.md.css +258 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.ios.css +366 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.md.css +266 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.ios.css +261 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.md.css +261 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.ios.css +557 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.md.css +580 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/range/range.ios.css +660 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/range/range.md.css +819 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.ios.css +321 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.md.css +316 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.ios.css +77 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.md.css +77 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/reorder-group/reorder-group.css +89 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/ripple-effect/ripple-effect.css +113 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/router-link/router-link.css +84 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/router-outlet/router-outlet.css +64 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/row/row.css +136 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.ios.css +477 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.md.css +456 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.ios.css +224 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.md.css +214 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.ios.css +520 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.md.css +506 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/select/select.ios.css +787 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/select/select.md.css +1374 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/select-option/select-option.css +3 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/select-popover.ios.css +190 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/select-popover.md.css +212 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/skeleton-text/skeleton-text.css +108 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/spinner/spinner.css +232 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.ios.css +265 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.md.css +265 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tab/tab.css +4 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.ios.css +252 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.md.css +239 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.ios.css +477 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.md.css +501 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tabs/tabs.css +74 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/text/text.css +58 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.ios.css +987 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.md.css +1553 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/thumbnail/thumbnail.css +76 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/title/title.ios.css +183 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/title/title.md.css +102 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.ios.css +399 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.md.css +429 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.ios.css +680 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.md.css +625 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.ios.css +265 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.md.css +244 -0
- package/dist/node_modules/ionicons/dist/collection/components/icon/icon.css +144 -0
- package/dist/types/components/amwal-checkout-button/amwal-checkout-button.d.ts +327 -327
- package/dist/types/components/amwal-checkout-button/amwal-checkout-button.stories.d.ts +34 -34
- package/dist/types/components/amwal-installments-guide/amwal-installments-guide.d.ts +14 -14
- package/dist/types/components/amwal-installments-guide/amwal-installments-guide.stories.d.ts +17 -17
- package/dist/types/components/amwal-installments-timeline/amwal-installments-timeline.d.ts +106 -106
- package/dist/types/components/amwal-installments-timeline/amwal-installments-timeline.stories.d.ts +67 -67
- package/dist/types/components/amwal-pos/amwal-pos.d.ts +228 -228
- package/dist/types/components/amwal-pos/amwal-pos.stories.d.ts +185 -185
- package/dist/types/components/amwal-widget/amwal-widget-modal.d.ts +56 -56
- package/dist/types/components/amwal-widget/amwal-widget.d.ts +165 -165
- package/dist/types/components/amwal-widget/amwal-widget.stories.d.ts +101 -101
- package/dist/types/components.d.ts +0 -206
- package/dist/types/lang/i18n.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +21 -191
- package/loader/cdn.js +3 -1
- package/loader/index.cjs.js +3 -1
- package/loader/index.d.ts +1 -4
- package/loader/index.es2017.js +3 -1
- package/loader/index.js +3 -1
- package/loader/package.json +11 -0
- package/package.json +28 -34
- package/dist/checkout/p-0161d109.entry.js +0 -1
- package/dist/checkout/p-0a8ef1ec.entry.js +0 -1
- package/dist/checkout/p-10a72fbe.entry.js +0 -1
- package/dist/checkout/p-12ed4081.entry.js +0 -1
- package/dist/checkout/p-13c36adc.entry.js +0 -1
- package/dist/checkout/p-194b17d8.entry.js +0 -1
- package/dist/checkout/p-272a1ffd.entry.js +0 -1
- package/dist/checkout/p-307af48b.entry.js +0 -1
- package/dist/checkout/p-3207674d.entry.js +0 -1
- package/dist/checkout/p-3208e56f.entry.js +0 -1
- package/dist/checkout/p-4426eb3b.entry.js +0 -1
- package/dist/checkout/p-458da59f.entry.js +0 -1
- package/dist/checkout/p-46e69508.entry.js +0 -1
- package/dist/checkout/p-49046c16.entry.js +0 -4
- package/dist/checkout/p-53dc0e86.entry.js +0 -1
- package/dist/checkout/p-5a6fc9fd.entry.js +0 -1
- package/dist/checkout/p-5e65653a.entry.js +0 -1
- package/dist/checkout/p-5f124c24.entry.js +0 -1
- package/dist/checkout/p-6a8ad104.entry.js +0 -1
- package/dist/checkout/p-76fb4325.entry.js +0 -1
- package/dist/checkout/p-78db60fb.entry.js +0 -1
- package/dist/checkout/p-8e34a1bb.entry.js +0 -1
- package/dist/checkout/p-91474b10.entry.js +0 -1
- package/dist/checkout/p-93OyAGoo.js +0 -2
- package/dist/checkout/p-94a57258.entry.js +0 -1
- package/dist/checkout/p-BEVStXwd.js +0 -7
- package/dist/checkout/p-BQu7QPd5.js +0 -4
- package/dist/checkout/p-BR7SJd-v.js +0 -4
- package/dist/checkout/p-BcFRJSFv.js +0 -4
- package/dist/checkout/p-BcUxrseY.js +0 -1
- package/dist/checkout/p-BdG893XR.js +0 -4
- package/dist/checkout/p-BgOwfqIY.js +0 -4
- package/dist/checkout/p-Bm9bMvCb.js +0 -4
- package/dist/checkout/p-C03M5ZSM.js +0 -1
- package/dist/checkout/p-C6kqtbmV.js +0 -4
- package/dist/checkout/p-C75BfBAE.js +0 -1
- package/dist/checkout/p-CVrvo9Qz.js +0 -4
- package/dist/checkout/p-ChixdDt6.js +0 -4
- package/dist/checkout/p-Cjnmql4G.js +0 -8
- package/dist/checkout/p-D0I0TqZU.js +0 -4
- package/dist/checkout/p-D2NxOvQ8.js +0 -4
- package/dist/checkout/p-D8d_89Nl.js +0 -4
- package/dist/checkout/p-DAhcxcAh.js +0 -4
- package/dist/checkout/p-DDtPO7yO.js +0 -4
- package/dist/checkout/p-DKg_dYcq.js +0 -4
- package/dist/checkout/p-DMAPbDyG.js +0 -4
- package/dist/checkout/p-DihS-5gH.js +0 -4
- package/dist/checkout/p-DkrNcwKK.js +0 -5
- package/dist/checkout/p-Dzj_jqIY.js +0 -4
- package/dist/checkout/p-E8AXUhZ3.js +0 -7
- package/dist/checkout/p-Ufaww5Lq.js +0 -4
- package/dist/checkout/p-a90efa79.entry.js +0 -1
- package/dist/checkout/p-abd12b84.entry.js +0 -1
- package/dist/checkout/p-abe1becc.entry.js +0 -1
- package/dist/checkout/p-b2f66c60.entry.js +0 -4
- package/dist/checkout/p-b45f5952.entry.js +0 -1
- package/dist/checkout/p-c2240d19.entry.js +0 -1
- package/dist/checkout/p-c28b4374.entry.js +0 -1
- package/dist/checkout/p-cb2db223.entry.js +0 -1
- package/dist/checkout/p-cb3967fc.entry.js +0 -1
- package/dist/checkout/p-cef16f11.entry.js +0 -1
- package/dist/checkout/p-df1b4347.entry.js +0 -4
- package/dist/checkout/p-e4bc42fb.entry.js +0 -1
- package/dist/checkout/p-e785fb8a.entry.js +0 -1
- package/dist/checkout/p-e8bd206a.entry.js +0 -1
- package/dist/checkout/p-ef749875.entry.js +0 -1
- package/dist/checkout/p-f157b6b2.entry.js +0 -4
- package/dist/checkout/p-f351a19a.entry.js +0 -1
- package/dist/checkout/p-ff2e59e3.entry.js +0 -1
- package/dist/checkout/p-hAETByzF.js +0 -5
- package/dist/checkout/p-vn1iXXUO.js +0 -9
- package/dist/cjs/i18n-uGNv9SLK.js +0 -13
- package/dist/cjs/index-DncWzXDA.js +0 -3738
- package/dist/components/p-55BwDerf.js +0 -8
- package/dist/components/p-B-M4K7iJ.js +0 -7
- package/dist/components/p-B-hirT0v.js +0 -4
- package/dist/components/p-B3WORC1a.js +0 -1
- package/dist/components/p-B5XH2zAk.js +0 -1
- package/dist/components/p-B5ZghgSh.js +0 -4
- package/dist/components/p-BEVStXwd.js +0 -7
- package/dist/components/p-BH0TCnxk.js +0 -4
- package/dist/components/p-BIA8A9ZO.js +0 -1
- package/dist/components/p-BOkYKP6F.js +0 -1
- package/dist/components/p-BOm0KT2x.js +0 -1
- package/dist/components/p-Bb_Zji0h.js +0 -4
- package/dist/components/p-BmVRXR1y.js +0 -4
- package/dist/components/p-BnQDByf2.js +0 -1
- package/dist/components/p-BoxjYI-Q.js +0 -4
- package/dist/components/p-BriBxgcM.js +0 -1
- package/dist/components/p-BwKjt_Dc.js +0 -4
- package/dist/components/p-Bx78uXfc.js +0 -5
- package/dist/components/p-C-20JWsp.js +0 -4
- package/dist/components/p-C03M5ZSM.js +0 -1
- package/dist/components/p-C53feagD.js +0 -4
- package/dist/components/p-CLrB3zV0.js +0 -4
- package/dist/components/p-CN34uOrj.js +0 -9
- package/dist/components/p-CQmcNwZM.js +0 -4
- package/dist/components/p-CYd0Smt1.js +0 -1
- package/dist/components/p-CgPXSjzI.js +0 -4
- package/dist/components/p-Cho32MPa.js +0 -4
- package/dist/components/p-ClE6rMJs.js +0 -4
- package/dist/components/p-Cm9b7fIl.js +0 -1
- package/dist/components/p-CukVBo5-.js +0 -4
- package/dist/components/p-D2NxOvQ8.js +0 -4
- package/dist/components/p-D4DqwBlW.js +0 -4
- package/dist/components/p-D7YY0NXg.js +0 -4
- package/dist/components/p-D8OVJo1v.js +0 -7
- package/dist/components/p-DKg_dYcq.js +0 -4
- package/dist/components/p-DLVYPrYs.js +0 -1
- package/dist/components/p-DMmSL7_l.js +0 -1
- package/dist/components/p-DOPF2QRF.js +0 -1
- package/dist/components/p-DTgJTJD6.js +0 -1
- package/dist/components/p-DiVJyqlX.js +0 -4
- package/dist/components/p-DrS88eFz.js +0 -1
- package/dist/components/p-Dtdm8lKC.js +0 -4
- package/dist/components/p-DuZ7hY1a.js +0 -4
- package/dist/components/p-Dx-C8Ob_.js +0 -7
- package/dist/components/p-DxEgz9x_.js +0 -1
- package/dist/components/p-DxSo4SXG.js +0 -1
- package/dist/components/p-HSPzo8it.js +0 -1
- package/dist/components/p-OrwCUtWu.js +0 -4
- package/dist/components/p-UgkI2Wa4.js +0 -1
- package/dist/components/p-VeNdmYSo.js +0 -1
- package/dist/components/p-YbpebnFS.js +0 -4
- package/dist/components/p-ZjP4CjeZ.js +0 -4
- package/dist/components/p-_VuKPdkD.js +0 -4
- package/dist/components/p-aWL6BxTN.js +0 -4
- package/dist/components/p-hHmYLOfE.js +0 -4
- package/dist/components/p-qoI-S7yk.js +0 -4
- package/dist/components/p-uXV7tzS3.js +0 -1
- package/dist/components/p-yu3xCFhr.js +0 -7
- package/dist/components/p-zp5f483d.js +0 -1
- package/dist/esm/i18n-C_AfxZ5D.js +0 -13
- package/dist/esm/index-93OyAGoo.js +0 -3721
- /package/dist/checkout/{p-B-hirT0v.js → p-01ad898f.js} +0 -0
- /package/dist/checkout/{p-DiVJyqlX.js → p-350e7423.js} +0 -0
- /package/dist/checkout/{p-sObYyvOy.js → p-52b4c112.js} +0 -0
- /package/dist/checkout/{p-BmVRXR1y.js → p-620fa0ec.js} +0 -0
- /package/dist/checkout/{p-hHmYLOfE.js → p-94286cc3.js} +0 -0
- /package/dist/checkout/{p-D4RIp70E.js → p-9efbca93.js} +0 -0
- /package/dist/checkout/{p-Dtdm8lKC.js → p-9f4ac833.js} +0 -0
- /package/dist/checkout/{p-yu3xCFhr.js → p-b2289937.js} +0 -0
- /package/dist/checkout/{p-C53feagD.js → p-d5862637.js} +0 -0
- /package/dist/checkout/{p-ZjP4CjeZ.js → p-d7fe59ee.js} +0 -0
- /package/dist/{components/p-CYPPT3AE.js → checkout/p-e187a77c.js} +0 -0
- /package/dist/checkout/{p-CukVBo5-.js → p-f728a68f.js} +0 -0
- /package/dist/cjs/{compare-with-utils-JlLIkecm.js → compare-with-utils-adbe64a6.js} +0 -0
- /package/dist/cjs/{config-ptk2Lf4l.js → config-e2a8c0c7.js} +0 -0
- /package/dist/cjs/{cubic-bezier-Bv3PvaRI.js → cubic-bezier-5ff9b04e.js} +0 -0
- /package/dist/cjs/{dir-Br-7_bel.js → dir-374f13f2.js} +0 -0
- /package/dist/cjs/{focus-visible-Da2o6bTP.js → focus-visible-b7381162.js} +0 -0
- /package/dist/cjs/{index-CH3IFTaK.js → index-071786b4.js} +0 -0
- /package/dist/cjs/{index-D3mJ1Cix.js → index-a281cac3.js} +0 -0
- /package/dist/cjs/{lock-controller-58TZFRHC.js → lock-controller-e2dfece6.js} +0 -0
- /package/dist/cjs/{spinner-configs-BN41iw42.js → spinner-configs-036ebfd8.js} +0 -0
- /package/dist/cjs/{theme-DbHdw1Nx.js → theme-12dec869.js} +0 -0
- /package/dist/cjs/{watch-options-DOFUPyuf.js → watch-options-1cccbe6a.js} +0 -0
- /package/dist/{esm/lock-controller-B-hirT0v.js → components/p-01ad898f.js} +0 -0
- /package/dist/{esm/theme-DiVJyqlX.js → components/p-350e7423.js} +0 -0
- /package/dist/{esm/focus-visible-BmVRXR1y.js → components/p-620fa0ec.js} +0 -0
- /package/dist/{esm/cubic-bezier-hHmYLOfE.js → components/p-94286cc3.js} +0 -0
- /package/dist/{esm/watch-options-Dtdm8lKC.js → components/p-9f4ac833.js} +0 -0
- /package/dist/{esm/config-yu3xCFhr.js → components/p-b2289937.js} +0 -0
- /package/dist/{esm/dir-C53feagD.js → components/p-d5862637.js} +0 -0
- /package/dist/{esm/index-ZjP4CjeZ.js → components/p-d7fe59ee.js} +0 -0
- /package/dist/esm/{compare-with-utils-sObYyvOy.js → compare-with-utils-d58be312.js} +0 -0
- /package/dist/esm/{spinner-configs-D4RIp70E.js → spinner-configs-c9fb0813.js} +0 -0
|
@@ -1 +1,3811 @@
|
|
|
1
|
-
import{p as d,t,H as i,c as e,h as r}from"./p-BnQDByf2.js";import{T as o}from"./p-C03M5ZSM.js";import{m as n}from"./p-OrwCUtWu.js";import{d as a}from"./p-DrS88eFz.js";import{d as $}from"./p-Cm9b7fIl.js";import{d as s}from"./p-B5XH2zAk.js";import{d as u}from"./p-BOkYKP6F.js";var l,c={exports:{}},h=c.exports,f=(l||(l=1,function(d,t){!function(i,e){var r="user-agent",o="",n="function",a="object",$="string",s="undefined",u="browser",l="cpu",c="device",h="engine",f="os",b="result",p="name",m="type",w="vendor",v="version",y="architecture",g="major",k="model",x="console",M="mobile",C="tablet",N="smarttv",S="wearable",O="xr",j="embedded",A="inapp",L="brands",T="formFactors",I="fullVersionList",E="platform",D="platformVersion",P="bitness",R="sec-ch-ua",F=R+"-full-version-list",U=R+"-arch",z=R+"-"+P,B=R+"-form-factors",_=R+"-"+M,G=R+"-"+k,H=R+"-"+E,W=H+"-version",V=[L,I,M,k,E,D,y,T,P],Y="Amazon",Z="Apple",q="ASUS",K="BlackBerry",J="Google",Q="Huawei",X="Lenovo",dd="Honor",td="LG",id="Microsoft",ed="Motorola",rd="Nvidia",od="OnePlus",nd="OPPO",ad="Samsung",$d="Sharp",sd="Sony",ud="Xiaomi",ld="Zebra",cd="Chrome",hd="Chromium",fd="Chromecast",bd="Edge",pd="Firefox",md="Opera",wd="Facebook",vd="Sogou",yd="Mobile ",gd=" Browser",kd="Windows",xd=typeof i!==s,Md=xd&&i.navigator?i.navigator:e,Cd=Md&&Md.userAgentData?Md.userAgentData:e,Nd=function(d){for(var t={},i=0;i<d.length;i++)t[d[i].toUpperCase()]=d[i];return t},Sd=function(d,t){if(typeof d===a&&d.length>0){for(var i in d)if(Ld(t)==Ld(d[i]))return!0;return!1}return!!jd(d)&&Ld(t)==Ld(d)},Od=function(d,t){for(var i in d)return/^(browser|cpu|device|engine|os)$/.test(i)||!!t&&Od(d[i])},jd=function(d){return typeof d===$},Ad=function(d){if(!d)return e;for(var t=[],i=Ed(/\\?\"/g,d).split(","),r=0;r<i.length;r++)if(i[r].indexOf(";")>-1){var o=Pd(i[r]).split(";v=");t[r]={brand:o[0],version:o[1]}}else t[r]=Pd(i[r]);return t},Ld=function(d){return jd(d)?d.toLowerCase():d},Td=function(d){return jd(d)?Ed(/[^\d\.]/g,d).split(".")[0]:e},Id=function(d){for(var t in d)if(d.hasOwnProperty(t)){var i=d[t];typeof i==a&&2==i.length?this[i[0]]=i[1]:this[i]=e}return this},Ed=function(d,t){return jd(t)?t.replace(d,o):t},Dd=function(d){return Ed(/\\?\"/g,d)},Pd=function(d,t){return d=Ed(/^\s\s*/,d+""),typeof t===s?d:d.substring(0,t)},Rd=function(d,t){if(d&&t)for(var i,r,o,$,s,u,l=0;l<t.length&&!s;){var c=t[l],h=t[l+1];for(i=r=0;i<c.length&&!s&&c[i];)if(s=c[i++].exec(d))for(o=0;o<h.length;o++)u=s[++r],typeof($=h[o])===a&&$.length>0?2===$.length?this[$[0]]=typeof $[1]==n?$[1].call(this,u):$[1]:$.length>=3&&(typeof $[1]!==n||$[1].exec&&$[1].test?3==$.length?this[$[0]]=u?u.replace($[1],$[2]):e:4==$.length?this[$[0]]=u?$[3].call(this,u.replace($[1],$[2])):e:$.length>4&&(this[$[0]]=u?$[3].apply(this,[u.replace($[1],$[2])].concat($.slice(4))):e):this[$[0]]=$.length>3?u?$[1].apply(this,$.slice(2)):e:u?$[1].call(this,u,$[2]):e):this[$]=u||e;l+=2}},Fd=function(d,t){for(var i in t)if(typeof t[i]===a&&t[i].length>0){for(var r=0;r<t[i].length;r++)if(Sd(t[i][r],d))return"?"===i?e:i}else if(Sd(t[i],d))return"?"===i?e:i;return t.hasOwnProperty("*")?t["*"]:d},Ud={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2",8.1:"6.3",10:["6.4","10.0"],NT:""},zd={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":e},Bd={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},_d={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[v,[p,yd+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[v,[p,bd+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[v,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,v],[/opios[\/ ]+([\w\.]+)/i],[v,[p,md+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[v,[p,md+" GX"]],[/\bopr\/([\w\.]+)/i],[v,[p,md]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[v,[p,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[v,[p,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser|palemoon)\/([-\w\.]+)/i,/(heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[p,v],[/quark(?:pc)?\/([-\w\.]+)/i],[v,[p,"Quark"]],[/\bddg\/([\w\.]+)/i],[v,[p,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[v,[p,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[v,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[v,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[v,[p,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[v,[p,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[v,[p,"Smart "+X+gd]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure"+gd],v],[/\bfocus\/([\w\.]+)/i],[v,[p,pd+" Focus"]],[/\bopt\/([\w\.]+)/i],[v,[p,md+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[v,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[v,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[v,[p,md+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[v,[p,"MIUI"+gd]],[/fxios\/([\w\.-]+)/i],[v,[p,yd+pd]],[/\bqihoobrowser\/?([\w\.]*)/i],[v,[p,"360"]],[/\b(qq)\/([\w\.]+)/i],[[p,/(.+)/,"$1Browser"],v],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1"+gd],v],[/samsungbrowser\/([\w\.]+)/i],[v,[p,ad+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[v,[p,vd+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[p,vd+" Mobile"],v],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[p,v],[/(lbbrowser|rekonq|steam(?= (clie|tenf|gameo)))/i],[p],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[v,p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,wd],v,[m,A]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[p,v,[m,A]],[/\bgsa\/([\w\.]+) .*safari\//i],[v,[p,"GSA"],[m,A]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[v,[p,"TikTok"],[m,A]],[/\[(linkedin)app\]/i],[p,[m,A]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[p,/(.+)/,"Zalo"],v,[m,A]],[/(chromium)[\/ ]([-\w\.]+)/i],[p,v],[/headlesschrome(?:\/([\w\.]+)| )/i],[v,[p,cd+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[v,[p,bd+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,cd+" WebView"],v],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[v,[p,"Android"+gd]],[/chrome\/([\w\.]+) mobile/i],[v,[p,yd+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,v],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[v,[p,yd+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[p,yd+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[v,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[v,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[p,v],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[p,yd+pd],v],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,"Netscape"],v],[/(wolvic|librewolf)\/([\w\.]+)/i],[p,v],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[v,[p,pd+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[p,[v,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[p,[v,/[^\d\.]+./,o]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[y,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[y,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[y,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[y,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[y,"arm"]],[/ sun4\w[;\)]/i],[[y,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[y,/ower/,o,Ld]],[/mc680.0/i],[[y,"68k"]],[/winnt.+\[axp/i],[[y,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[k,[w,ad],[m,C]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[k,[w,ad],[m,M]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[k,[w,Z],[m,M]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[k,[w,Z],[m,C]],[/(macintosh);/i],[k,[w,Z]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[k,[w,$d],[m,M]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[k,[w,dd],[m,C]],[/honor([-\w ]+)[;\)]/i],[k,[w,dd],[m,M]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[k,[w,Q],[m,C]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[k,[w,Q],[m,M]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[k,/_/g," "],[w,ud],[m,C]],[/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[k,/_/g," "],[w,ud],[m,M]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[k,[w,od],[m,M]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[k,[w,nd],[m,M]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[k,[w,Fd,{OnePlus:["203","304","403","404","413","415"],"*":nd}],[m,C]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[k,[w,"BLU"],[m,M]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[k,[w,"Vivo"],[m,M]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[k,[w,"Realme"],[m,M]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[k,[w,X],[m,C]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[k,[w,X],[m,M]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[k,[w,ed],[m,M]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[k,[w,ed],[m,C]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[k,[w,td],[m,C]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[k,[w,td],[m,M]],[/(nokia) (t[12][01])/i],[w,k,[m,C]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[k,/_/g," "],[m,M],[w,"Nokia"]],[/(pixel (c|tablet))\b/i],[k,[w,J],[m,C]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[k,[w,J],[m,M]],[/(google) (pixelbook( go)?)/i],[w,k],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[k,[w,sd],[m,M]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[k,"Xperia Tablet"],[w,sd],[m,C]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[k,[w,Y],[m,C]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[k,/(.+)/g,"Fire Phone $1"],[w,Y],[m,M]],[/(playbook);[-\w\),; ]+(rim)/i],[k,w,[m,C]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[k,[w,K],[m,M]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[k,[w,q],[m,C]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[k,[w,q],[m,M]],[/(nexus 9)/i],[k,[w,"HTC"],[m,C]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[w,[k,/_/g," "],[m,M]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[k,[w,"TCL"],[m,C]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[k,[w,"TCL"],[m,M]],[/(itel) ((\w+))/i],[[w,Ld],k,[m,Fd,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[k,[w,"Acer"],[m,C]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[k,[w,"Meizu"],[m,M]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[k,[w,"Ulefone"],[m,M]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[k,[w,"Energizer"],[m,M]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[k,[w,"Cat"],[m,M]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[k,[w,"Smartfren"],[m,M]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[k,[w,"Nothing"],[m,M]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[k,[w,"Archos"],[m,C]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[k,[w,"Archos"],[m,M]],[/; (n159v)/i],[k,[w,"HMD"],[m,M]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[w,k,[m,C]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[w,k,[m,M]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[w,k,[m,C]],[/(surface duo)/i],[k,[w,id],[m,C]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[k,[w,"Fairphone"],[m,M]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[k,[w,rd],[m,C]],[/(sprint) (\w+)/i],[w,k,[m,M]],[/(kin\.[onetw]{3})/i],[[k,/\./g," "],[w,id],[m,M]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[k,[w,ld],[m,C]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[k,[w,ld],[m,M]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[w,[m,N]],[/hbbtv.+maple;(\d+)/i],[[k,/^/,"SmartTV"],[w,ad],[m,N]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[w,k,[m,N]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[w,td],[m,N]],[/(apple) ?tv/i],[w,[k,Z+" TV"],[m,N]],[/crkey.*devicetype\/chromecast/i],[[k,fd+" Third Generation"],[w,J],[m,N]],[/crkey.*devicetype\/([^/]*)/i],[[k,/^/,"Chromecast "],[w,J],[m,N]],[/fuchsia.*crkey/i],[[k,fd+" Nest Hub"],[w,J],[m,N]],[/crkey/i],[[k,fd],[w,J],[m,N]],[/(portaltv)/i],[k,[w,wd],[m,N]],[/droid.+aft(\w+)( bui|\))/i],[k,[w,Y],[m,N]],[/(shield \w+ tv)/i],[k,[w,rd],[m,N]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[k,[w,$d],[m,N]],[/(bravia[\w ]+)( bui|\))/i],[k,[w,sd],[m,N]],[/(mi(tv|box)-?\w+) bui/i],[k,[w,ud],[m,N]],[/Hbbtv.*(technisat) (.*);/i],[w,k,[m,N]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[w,/.+\/(\w+)/,"$1",Fd,{LG:"lge"}],[k,Pd],[m,N]],[/(playstation \w+)/i],[k,[w,sd],[m,x]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[k,[w,id],[m,x]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[w,Fd,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],k,[m,x]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[k,[w,ad],[m,S]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[w,k,[m,S]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[k,[w,nd],[m,S]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[k,[w,Z],[m,S]],[/(opwwe\d{3})/i],[k,[w,od],[m,S]],[/(moto 360)/i],[k,[w,ed],[m,S]],[/(smartwatch 3)/i],[k,[w,sd],[m,S]],[/(g watch r)/i],[k,[w,td],[m,S]],[/droid.+; (wt63?0{2,3})\)/i],[k,[w,ld],[m,S]],[/droid.+; (glass) \d/i],[k,[w,J],[m,O]],[/(pico) ([\w ]+) os\d/i],[w,k,[m,O]],[/(quest( \d| pro)?s?).+vr/i],[k,[w,wd],[m,O]],[/mobile vr; rv.+firefox/i],[[m,O]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[w,[m,j]],[/(aeobc)\b/i],[k,[w,Y],[m,j]],[/(homepod).+mac os/i],[k,[w,Z],[m,j]],[/windows iot/i],[[m,j]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[k,[m,N]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[m,N]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[k,[m,Fd,{mobile:"Mobile",xr:"VR","*":C}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,C]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,M]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[k,[w,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[v,[p,bd+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[p,v],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[v,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[p,v],[/ladybird\//i],[[p,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[v,p]],os:[[/(windows nt) (6\.[23]); arm/i],[[p,/N/,"R"],[v,Fd,Ud]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[p,v],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[v,/(;|\))/g,"",Fd,Ud],[p,kd]],[/(windows ce)\/?([\d\.]*)/i],[p,v],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,/\btvos ?([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[v,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[p,"macOS"],[v,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[v,[p,fd+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[v,[p,fd+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[v,[p,fd+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[v,[p,fd+" Linux"]],[/crkey\/([\d\.]+)/i],[v,[p,fd]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[v,p],[/(ubuntu) ([\w\.]+) like android/i],[[p,/(.+)/,"$1 Touch"],v],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[p,v],[/\(bb(10);/i],[v,[p,K]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[v,[p,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[v,[p,pd+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[v,[p,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[v,Fd,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[p,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[v,[p,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[p,"Chrome OS"],v],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[p,v],[/(sunos) ?([\d\.]*)/i],[[p,"Solaris"],v],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[p,v]]},Gd=function(){var d={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return Id.call(d.init,[[u,[p,v,g,m]],[l,[y]],[c,[m,k,w]],[h,[p,v]],[f,[p,v]]]),Id.call(d.isIgnore,[[u,[v,g]],[h,[v]],[f,[v]]]),Id.call(d.isIgnoreRgx,[[u,/ ?browser$/i],[f,/ ?os$/i]]),Id.call(d.toString,[[u,[p,v]],[l,[y]],[c,[w,k]],[h,[p,v]],[f,[p,v]]]),d}(),Hd=function(d,t){var i=Gd.init[t],e=Gd.isIgnore[t]||0,r=Gd.isIgnoreRgx[t]||0,n=Gd.toString[t]||0;function a(){Id.call(this,i)}return a.prototype.getItem=function(){return d},a.prototype.withClientHints=function(){return Cd?Cd.getHighEntropyValues(V).then((function(t){return d.setCH(new Wd(t,!1)).parseCH().get()})):d.parseCH().get()},a.prototype.withFeatureCheck=function(){return d.detectFeature().get()},t!=b&&(a.prototype.is=function(d){var t=!1;for(var i in this)if(this.hasOwnProperty(i)&&!Sd(e,i)&&Ld(r?Ed(r,this[i]):this[i])==Ld(r?Ed(r,d):d)){if(t=!0,d!=s)break}else if(d==s&&t){t=!t;break}return t},a.prototype.toString=function(){var d=o;for(var t in n)typeof this[n[t]]!==s&&(d+=(d?" ":o)+this[n[t]]);return d||s}),a.prototype.then=function(d){var t=this,i=function(){for(var d in t)t.hasOwnProperty(d)&&(this[d]=t[d])};i.prototype={is:a.prototype.is,toString:a.prototype.toString,withClientHints:a.prototype.withClientHints,withFeatureCheck:a.prototype.withFeatureCheck};var e=new i;return d(e),e},new a};function Wd(d,t){if(d=d||{},Id.call(this,V),t)Id.call(this,[[L,Ad(d[R])],[I,Ad(d[F])],[M,/\?1/.test(d[_])],[k,Dd(d[G])],[E,Dd(d[H])],[D,Dd(d[W])],[y,Dd(d[U])],[T,Ad(d[B])],[P,Dd(d[z])]]);else for(var i in d)this.hasOwnProperty(i)&&typeof d[i]!==s&&(this[i]=d[i])}function Vd(d,t,i,e){return Id.call(this,[["itemType",d],["ua",t],["uaCH",e],["rgxMap",i],["data",Hd(this,d)]]),this}function Yd(d,t,i){if(typeof d===a?(Od(d,!0)?(typeof t===a&&(i=t),t=d):(i=d,t=e),d=e):typeof d!==$||Od(t,!0)||(i=t,t=e),i)if(typeof i.append===n){var s={};i.forEach((function(d,t){s[(t+"").toLowerCase()]=d})),i=s}else{var p={};for(var m in i)i.hasOwnProperty(m)&&(p[(m+"").toLowerCase()]=i[m]);i=p}if(!(this instanceof Yd))return new Yd(d,t,i).getResult();var w=typeof d===$?d:i&&i[r]?i[r]:Md&&Md.userAgent?Md.userAgent:o,v=new Wd(i,!0),y=t?function(d,t){var i={},e=t;if(!Od(t))for(var r in e={},t)for(var o in t[r])e[o]=t[r][o].concat(e[o]?e[o]:[]);for(var n in d)i[n]=e[n]&&e[n].length%2==0?e[n].concat(d[n]):d[n];return i}(_d,t):_d,g=function(d){return d==b?function(){return new Vd(d,w,y,v).set("ua",w).set(u,this.getBrowser()).set(l,this.getCPU()).set(c,this.getDevice()).set(h,this.getEngine()).set(f,this.getOS()).get()}:function(){return new Vd(d,w,y[d],v).parseUA().get()}};return Id.call(this,[["getBrowser",g(u)],["getCPU",g(l)],["getDevice",g(c)],["getEngine",g(h)],["getOS",g(f)],["getResult",g(b)],["getUA",function(){return w}],["setUA",function(d){return jd(d)&&(w=Pd(d,500)),this}]]).setUA(w),this}Vd.prototype.get=function(d){return d?this.data.hasOwnProperty(d)?this.data[d]:e:this.data},Vd.prototype.set=function(d,t){return this.data[d]=t,this},Vd.prototype.setCH=function(d){return this.uaCH=d,this},Vd.prototype.detectFeature=function(){if(Md&&Md.userAgent==this.ua)switch(this.itemType){case u:Md.brave&&typeof Md.brave.isBrave==n&&this.set(p,"Brave");break;case c:!this.get(m)&&Cd&&Cd[M]&&this.set(m,M),"Macintosh"==this.get(k)&&Md&&typeof Md.standalone!==s&&Md.maxTouchPoints&&Md.maxTouchPoints>2&&this.set(k,"iPad").set(m,C);break;case f:!this.get(p)&&Cd&&Cd[E]&&this.set(p,Cd[E]);break;case b:var d=this.data,t=function(t){return d[t].getItem().detectFeature().get()};this.set(u,t(u)).set(l,t(l)).set(c,t(c)).set(h,t(h)).set(f,t(f))}return this},Vd.prototype.parseUA=function(){switch(this.itemType!=b&&Rd.call(this.data,this.ua,this.rgxMap),this.itemType){case u:this.set(g,Td(this.get(v)));break;case f:if("iOS"==this.get(p)&&"18.6"==this.get(v)){var d=/\) Version\/([\d\.]+)/.exec(this.ua);d&&parseInt(d[1].substring(0,2),10)>=26&&this.set(v,d[1])}}return this},Vd.prototype.parseCH=function(){var d=this.uaCH,t=this.rgxMap;switch(this.itemType){case u:case h:var i,r=d[I]||d[L];if(r)for(var o=0;o<r.length;o++){var n=r[o].brand||r[o],a=r[o].version;this.itemType==u&&!/not.a.brand/i.test(n)&&(!i||/Chrom/.test(i)&&n!=hd||i==bd&&/WebView2/.test(n))&&(n=Fd(n,Bd),(i=this.get(p))&&!/Chrom/.test(i)&&/Chrom/.test(n)||this.set(p,n).set(v,a).set(g,Td(a)),i=n),this.itemType==h&&n==hd&&this.set(v,a)}break;case l:var $=d[y];$&&($&&"64"==d[P]&&($+="64"),Rd.call(this.data,$+";",t));break;case c:if(d[M]&&this.set(m,M),d[k]&&(this.set(k,d[k]),!this.get(m)||!this.get(w))){var s={};Rd.call(s,"droid 9; "+d[k]+")",t),!this.get(m)&&s.type&&this.set(m,s.type),!this.get(w)&&s.vendor&&this.set(w,s.vendor)}if(d[T]){var x;if("string"!=typeof d[T])for(var C=0;!x&&C<d[T].length;)x=Fd(d[T][C++],zd);else x=Fd(d[T],zd);this.set(m,x)}break;case f:var N=d[E];if(N){var S=d[D];N==kd&&(S=parseInt(Td(S),10)>=13?"11":"10"),this.set(p,N).set(v,S)}this.get(p)==kd&&"Xbox"==d[k]&&this.set(p,"Xbox").set(v,e);break;case b:var O=this.data,j=function(t){return O[t].getItem().setCH(d).parseCH().get()};this.set(u,j(u)).set(l,j(l)).set(c,j(c)).set(h,j(h)).set(f,j(f))}return this},Yd.VERSION="2.0.7",Yd.BROWSER=Nd([p,v,g,m]),Yd.CPU=Nd([y]),Yd.DEVICE=Nd([k,w,m,x,M,N,C,S,j]),Yd.ENGINE=Yd.OS=Nd([p,v]),d.exports&&(t=d.exports=Yd),t.UAParser=Yd;var Zd=xd&&(i.jQuery||i.Zepto);if(Zd&&!Zd.ua){var qd=new Yd;Zd.ua=qd.getResult(),Zd.ua.get=function(){return qd.getUA()},Zd.ua.set=function(d){qd.setUA(d);var t=qd.getResult();for(var i in t)Zd.ua[i]=t[i]}}}("object"==typeof window?window:h)}(c,c.exports)),c.exports),b={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","(?:[025-7]\\d|44)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","(?: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-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|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-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","(?:[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{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"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|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:[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|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{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-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689])\\d|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33622|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["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|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:[19]|2[2-46-9]|3[3-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(?:(?:18|4[0679]|5[03])\\d|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]))\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","(?: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-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[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","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?: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[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,0,[["336(?:[013-9]\\d|2[013-9])\\d{5}|(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15-7]|6[0-35-79]|7[1-37-9]))\\d{7}",[10]],["9\\d{9}",[10]],["8(?:0[04]|108\\d{3})\\d{7}"],["80[39]\\d{7}",[10]],["808\\d{7}",[10]]],"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-8]\\d|90)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|30|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-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)\\d{4}|(?:2742|305[3-9])\\d{6}|(?:472|983)[2-47-9]\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|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}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","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|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|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}"]]]}};function p(d,t){d=d.split("-"),t=t.split("-");for(var i=d[0].split("."),e=t[0].split("."),r=0;r<3;r++){var o=Number(i[r]),n=Number(e[r]);if(o>n)return 1;if(n>o)return-1;if(!isNaN(o)&&isNaN(n))return 1;if(isNaN(o)&&!isNaN(n))return-1}return d[1]&&t[1]?d[1]>t[1]?1:d[1]<t[1]?-1:0:!d[1]&&t[1]?1:d[1]&&!t[1]?-1:0}var m={}.constructor;function w(d){return null!=d&&d.constructor===m}function v(d){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(d){return typeof d}:function(d){return d&&"function"==typeof Symbol&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},v(d)}function y(d,t){if(!(d instanceof t))throw new TypeError("Cannot call a class as a function")}function g(d,t){return t&&function(d,t){for(var i=0;i<t.length;i++){var e=t[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(d,k(e.key),e)}}(d.prototype,t),Object.defineProperty(d,"prototype",{writable:!1}),d}function k(d){var t=function(d){if("object"!=v(d)||!d)return d;var t=d[Symbol.toPrimitive];if(void 0!==t){var i=t.call(d,"string");if("object"!=v(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return d+""}(d);return"symbol"==v(t)?t:t+""}var x=" ext. ",M=/^\d+$/,C=function(){return g((function d(t){y(this,d),L(t),this.metadata=t,E.call(this,t)}),[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter((function(d){return"001"!==d}))}},{key:"getCountryMetadata",value:function(d){return this.metadata.countries[d]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(d){return void 0!==this.getCountryMetadata(d)}},{key:"hasCallingCode",value:function(d){if(this.getCountryCodesForCallingCode(d))return!0;if(this.nonGeographic()){if(this.nonGeographic()[d])return!0}else{var t=this.countryCallingCodes()[d];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(d){return this.nonGeographic()?!!this.nonGeographic()[d]:!this.getCountryCodesForCallingCode(d)}},{key:"country",value:function(d){return this.selectNumberingPlan(d)}},{key:"selectNumberingPlan",value:function(d,t){if(d&&M.test(d)&&(t=d,d=null),d&&"001"!==d){if(!this.hasCountry(d))throw Error("Unknown country: ".concat(d));this.numberingPlan=new N(this.getCountryMetadata(d),this)}else if(t){if(!this.hasCallingCode(t))throw Error("Unknown calling code: ".concat(t));this.numberingPlan=new N(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(d){var t=this.countryCallingCodes()[d];if(t){if(1===t.length&&3===t[0].length)return;return t}}},{key:"getCountryCodeForCallingCode",value:function(d){var t=this.getCountryCodesForCallingCode(d);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(d){var t=this.getCountryCodeForCallingCode(d);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var i=this.nonGeographic()[d];if(i)return i}else{var e=this.countryCallingCodes()[d];if(e&&1===e.length&&"001"===e[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(d){return this.numberingPlan.type(d)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(d){return this.selectNumberingPlan(d)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}])}(),N=function(){return g((function d(t,i){y(this,d),this.globalMetadataObject=i,this.metadata=t,E.call(this,i.metadata)}),[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(d){return d[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var d=this;return(this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[]).map((function(t){return new S(t,d)}))}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(d){return d[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return!(this.types()&&0===this.types().length||!this.types())}},{key:"type",value:function(d){if(this.hasTypes()&&A(this.types(),d))return new j(A(this.types(),d),this)}},{key:"ext",value:function(){return this.v1||this.v2?x:this.metadata[13]||x}}])}(),S=function(){return g((function d(t,i){y(this,d),this._format=t,this.metadata=i}),[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||O.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])}(),O=/^\(?\$1\)?$/,j=function(){return g((function d(t,i){y(this,d),this.type=t,this.metadata=i}),[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}])}();function A(d,t){switch(t){case"FIXED_LINE":return d[0];case"MOBILE":return d[1];case"TOLL_FREE":return d[2];case"PREMIUM_RATE":return d[3];case"PERSONAL_NUMBER":return d[4];case"VOICEMAIL":return d[5];case"UAN":return d[6];case"PAGER":return d[7];case"VOIP":return d[8];case"SHARED_COST":return d[9]}}function L(d){if(!d)throw Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!w(d)||!w(d.countries))throw Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(w(d)?"an object of shape: { "+Object.keys(d).join(", ")+" }":"a "+T(d)+": "+d,"."))}var T=function(d){return v(d)};function I(d,t){if((t=new C(t)).hasCountry(d))return t.selectNumberingPlan(d).countryCallingCode();throw Error("Unknown country: ".concat(d))}function E(d){var t=d.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===p(t,"1.2.0")?this.v2=!0:-1===p(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}function D(d,t,i){return function(d,t,i,e){t&&(e=new C(e.metadata)).selectNumberingPlan(t);var r=e.type(void 0),o=r&&r.possibleLengths()||e.possibleLengths();if(!o)return"IS_POSSIBLE";var n=d.length,a=o[0];return a===n?"IS_POSSIBLE":a>n?"TOO_SHORT":o[o.length-1]<n?"TOO_LONG":o.indexOf(n,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}(d,t,0,i)}function P(d,t,i){return"IS_POSSIBLE"===D(d,t,i)}function R(d,t){return d=d||"",RegExp("^(?:"+t+")$").test(d)}function F(d,t){(null==t||t>d.length)&&(t=d.length);for(var i=0,e=Array(t);i<t;i++)e[i]=d[i];return e}var U=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function z(d,t,i){if(t=t||{},d.country||d.countryCallingCode){(i=new C(i)).selectNumberingPlan(d.country,d.countryCallingCode);var e=t.v2?d.nationalNumber:d.phone;if(R(e,i.nationalNumberPattern())){if(B(e,"FIXED_LINE",i))return i.type("MOBILE")&&""===i.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":i.type("MOBILE")?B(e,"MOBILE",i)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var r,o=function(d,t){var i="undefined"!=typeof Symbol&&d[Symbol.iterator]||d["@@iterator"];if(i)return(i=i.call(d)).next.bind(i);if(Array.isArray(d)||(i=function(d,t){if(d){if("string"==typeof d)return F(d,t);var i={}.toString.call(d).slice(8,-1);return"Object"===i&&d.constructor&&(i=d.constructor.name),"Map"===i||"Set"===i?Array.from(d):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?F(d,t):void 0}}(d))||t){i&&(d=i);var e=0;return function(){return e>=d.length?{done:!0}:{done:!1,value:d[e++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(U);!(r=o()).done;){var n=r.value;if(B(e,n,i))return n}}}}function B(d,t,i){return!(!(t=i.type(t))||!t.pattern())&&!(t.possibleLengths()&&t.possibleLengths().indexOf(d.length)<0)&&R(d,t.pattern())}var _="0-90-9٠-٩۰-۹",G="".concat("-‐-―−ー-").concat("//").concat("..").concat(" ").concat("()()[]\\[\\]").concat("~⁓∼~"),H=RegExp("(["+_+"])");function W(d,t){(null==t||t>d.length)&&(t=d.length);for(var i=0,e=Array(t);i<t;i++)e[i]=d[i];return e}function V(d,t){var i=t.nationalNumber,e=t.metadata,r=e.getCountryCodesForCallingCode(d);if(r)return 1===r.length?r[0]:function(d,t){var i=t.countries,e=t.metadata;e=new C(e);for(var r,o=function(d,t){var i="undefined"!=typeof Symbol&&d[Symbol.iterator]||d["@@iterator"];if(i)return(i=i.call(d)).next.bind(i);if(Array.isArray(d)||(i=function(d,t){if(d){if("string"==typeof d)return W(d,t);var i={}.toString.call(d).slice(8,-1);return"Object"===i&&d.constructor&&(i=d.constructor.name),"Map"===i||"Set"===i?Array.from(d):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?W(d,t):void 0}}(d))||t){i&&(d=i);var e=0;return function(){return e>=d.length?{done:!0}:{done:!1,value:d[e++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(i);!(r=o()).done;){var n=r.value;if(e.selectNumberingPlan(n),e.leadingDigits()){if(d&&0===d.search(e.leadingDigits()))return n}else if(z({phone:d,country:n},void 0,e.metadata))return n}}(i,{countries:r,metadata:e.metadata})}function Y(d,t,i){var e=function(d,t){if(d&&t.numberingPlan.nationalPrefixForParsing()){var i=RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),e=i.exec(d);if(e){var r,o,n,a=e.length-1,$=a>0&&e[a];if(t.nationalPrefixTransformRule()&&$?(r=d.replace(i,t.nationalPrefixTransformRule()),a>1&&(o=e[1])):(r=d.slice(e[0].length),$&&(o=e[1])),$){var s=d.indexOf(e[1]);d.slice(0,s)===t.numberingPlan.nationalPrefix()&&(n=t.numberingPlan.nationalPrefix())}else n=e[0];return{nationalNumber:r,nationalPrefix:n,carrierCode:o}}}return{nationalNumber:d}}(d,i),r=e.carrierCode,o=e.nationalNumber;if(o!==d){if(!function(d,t,i){return!(R(d,i.nationalNumberPattern())&&!R(t,i.nationalNumberPattern()))}(d,o,i))return{nationalNumber:d};if(i.numberingPlan.possibleLengths()&&(t||(t=V(i.numberingPlan.callingCode(),{nationalNumber:o,metadata:i})),!function(d,t,i){switch(D(d,t,i)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(o,t,i)))return{nationalNumber:d}}return{nationalNumber:o,carrierCode:r}}function Z(d,t,i,e,r){if(!d)return{};var o;if("+"!==d[0]){var n=function(d,t,i,e){if(t){var r=new C(e);r.selectNumberingPlan(t,i);var o=RegExp(r.IDDPrefix());if(0===d.search(o)){var n=(d=d.slice(d.match(o)[0].length)).match(H);if(!(n&&null!=n[1]&&n[1].length>0&&"0"===n[1]))return d}}}(d,i,e,r);if(!n||n===d){if(i||e){var a=function(d,t,i,e,r){var o=i?I(i,r):e;if(0===d.indexOf(o)){(r=new C(r)).selectNumberingPlan(i,o);var n=d.slice(o.length),a=Y(n,t,r).nationalNumber,$=Y(d,t,r).nationalNumber;if(!R($,r.nationalNumberPattern())&&R(a,r.nationalNumberPattern())||"TOO_LONG"===D($,t,r))return{countryCallingCode:o,number:n}}return{number:d}}(d,t,i,e,r),$=a.countryCallingCode;if($)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:$,number:a.number}}return{number:d}}o=!0,d="+"+n}if("0"===d[1])return{};r=new C(r);for(var s=2;s-1<=3&&s<=d.length;){var u=d.slice(1,s);if(r.hasCallingCode(u))return r.selectNumberingPlan(u),{countryCallingCodeSource:o?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:d.slice(s)};s++}return{}}var q=/(\$\d)/;var K=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/,J=function(d){return"([0-90-9٠-٩۰-۹]{1,".concat(d,"})")};function Q(){var d="[ \\t,]*",t="[:\\..]?[ \\t,-]*",i="#?",e="[ \\t]*";return";ext="+J("20")+"|"+d+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+t+J("20")+"#?|"+d+"(?:[xx##~~]|int|int)"+t+J("9")+"#?|[- ]+"+J("6")+"#|"+e+"(?:,{2}|;)"+t+J("15")+"#?|"+e+"(?:,)+"+t+J("9")+i}var X="["+_+"]{2}",dd="[++]{0,1}(?:["+G+"]*["+_+"]){3,}["+G+_+"]*",td=RegExp("^[++]{0,1}(?:["+G+"]*["+_+"]){1,2}$","i"),id=dd+"(?:"+Q()+")?",ed=RegExp("^"+X+"$|^"+id+"$","i"),rd={formatExtension:function(d,t,i){return"".concat(d).concat(i.ext()).concat(t)}};function od(d,t,i,e,r){var o=function(d,t){return function(d,t){for(var i=0;i<d.length;){if(t(d[i]))return d[i];i++}}(d,(function(d){if(d.leadingDigitsPatterns().length>0){var i=d.leadingDigitsPatterns()[d.leadingDigitsPatterns().length-1];if(0!==t.search(i))return!1}return R(t,d.pattern())}))}(e.formats(),d);return o?function(d,t,i){var e=i.useInternationalFormat,r=i.withNationalPrefix,o=d.replace(RegExp(t.pattern()),e?t.internationalFormat():r&&t.nationalPrefixFormattingRule()?t.format().replace(q,t.nationalPrefixFormattingRule()):t.format());return e?function(d){return d.replace(RegExp("[".concat(G,"]+"),"g")," ").trim()}(o):o}(d,o,{useInternationalFormat:"INTERNATIONAL"===i,withNationalPrefix:!o.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!r||!1!==r.nationalPrefix}):d}function nd(d,t,i,e){return t?e(d,t,i):d}function ad(d){return ad="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(d){return typeof d}:function(d){return d&&"function"==typeof Symbol&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},ad(d)}function $d(d,t){var i=Object.keys(d);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(d);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(d,t).enumerable}))),i.push.apply(i,e)}return i}function sd(d){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?$d(Object(i),!0).forEach((function(t){ud(d,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(i)):$d(Object(i)).forEach((function(t){Object.defineProperty(d,t,Object.getOwnPropertyDescriptor(i,t))}))}return d}function ud(d,t,i){return(t=ld(t))in d?Object.defineProperty(d,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):d[t]=i,d}function ld(d){var t=function(d){if("object"!=ad(d)||!d)return d;var t=d[Symbol.toPrimitive];if(void 0!==t){var i=t.call(d,"string");if("object"!=ad(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return d+""}(d);return"symbol"==ad(t)?t:t+""}var cd=function(){return function(d,t){return t&&function(d,t){for(var i=0;i<t.length;i++){var e=t[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(d,ld(e.key),e)}}(d.prototype,t),Object.defineProperty(d,"prototype",{writable:!1}),d}((function d(t,i,e){if(function(d,t){if(!(d instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),!t)throw new TypeError("First argument is required");if("string"!=typeof t)throw new TypeError("First argument must be a string");if("+"===t[0]&&!i)throw new TypeError("`metadata` argument not passed");if(w(i)&&w(i.countries)){e=i;var r=t;if(!fd.test(r))throw Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var o=Z(r,void 0,void 0,void 0,e);if(t=o.countryCallingCode,!(i=o.number))throw Error("Invalid `number` argument passed: too short")}if(!i)throw new TypeError("`nationalNumber` argument is required");if("string"!=typeof i)throw new TypeError("`nationalNumber` argument must be a string");L(e);var n=function(d,t){var i,e,r=new C(t);return hd(d)?(r.selectNumberingPlan(i=d),e=r.countryCallingCode()):e=d,{country:i,countryCallingCode:e}}(t,e),a=n.countryCallingCode;this.country=n.country,this.countryCallingCode=a,this.nationalNumber=i,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return e}}),[{key:"setExt",value:function(d){this.ext=d}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:function(d,t,i){var e=new C(i).getCountryCodesForCallingCode(d);return e?e.filter((function(d){return function(d,t,i){var e=new C(i);return e.selectNumberingPlan(t),e.numberingPlan.possibleLengths().indexOf(d.length)>=0}(t,d,i)})):[]}(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(d,t,i){if(void 0===t&&(t={}),i=new C(i),t.v2){if(!d.countryCallingCode)throw Error("Invalid phone number object passed");i.selectNumberingPlan(d.countryCallingCode)}else{if(!d.phone)return!1;if(d.country){if(!i.hasCountry(d.country))throw Error("Unknown country: ".concat(d.country));i.selectNumberingPlan(d.country)}else{if(!d.countryCallingCode)throw Error("Invalid phone number object passed");i.selectNumberingPlan(d.countryCallingCode)}}if(i.possibleLengths())return P(d.phone||d.nationalNumber,d.country,i);if(d.countryCallingCode&&i.isNonGeographicCallingCode(d.countryCallingCode))return!0;throw Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return function(d,t,i){return t=t||{},(i=new C(i)).selectNumberingPlan(d.country,d.countryCallingCode),i.hasTypes()?void 0!==z(d,t,i.metadata):R(t.v2?d.nationalNumber:d.phone,i.nationalNumberPattern())}(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new C(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(d){return this.number===d.number&&this.ext===d.ext}},{key:"getType",value:function(){return z(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(d,t){return function(d,t,i,e){if(i=i?function(){for(var d=1,t=arguments.length,i=Array(t),e=0;e<t;e++)i[e]=arguments[e];for(;d<i.length;){if(i[d])for(var r in i[d])i[0][r]=i[d][r];d++}return i[0]}({},rd,i):rd,e=new C(e),d.country&&"001"!==d.country){if(!e.hasCountry(d.country))throw Error("Unknown country: ".concat(d.country));e.selectNumberingPlan(d.country)}else{if(!d.countryCallingCode)return d.phone||"";e.selectNumberingPlan(d.countryCallingCode)}var r,o=e.countryCallingCode(),n=i.v2?d.nationalNumber:d.phone;switch(t){case"NATIONAL":return n?nd(r=od(n,0,"NATIONAL",e,i),d.ext,e,i.formatExtension):"";case"INTERNATIONAL":return n?(r=od(n,0,"INTERNATIONAL",e,i),nd(r="+".concat(o," ").concat(r),d.ext,e,i.formatExtension)):"+".concat(o);case"E.164":return"+".concat(o).concat(n);case"RFC3966":return function(d){var t=d.number,i=d.ext;if(!t)return"";if("+"!==t[0])throw Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(i?";ext="+i:"")}({number:"+".concat(o).concat(n),ext:d.ext});case"IDD":if(!i.fromCountry)return;var a=function(d,t,i,e,r){if(I(e,r.metadata)===i){var o=od(d,0,"NATIONAL",r);return"1"===i?i+" "+o:o}var n=function(d,t,i){var e=new C(i);return e.selectNumberingPlan(d,void 0),e.defaultIDDPrefix()?e.defaultIDDPrefix():K.test(e.IDDPrefix())?e.IDDPrefix():void 0}(e,0,r.metadata);if(n)return"".concat(n," ").concat(i," ").concat(od(d,0,"INTERNATIONAL",r))}(n,0,o,i.fromCountry,e);return nd(a,d.ext,e,i.formatExtension);default:throw Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}(this,d,t?sd(sd({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(d){return this.format("NATIONAL",d)}},{key:"formatInternational",value:function(d){return this.format("INTERNATIONAL",d)}},{key:"getURI",value:function(d){return this.format("RFC3966",d)}}])}(),hd=function(d){return/^[A-Z]{2}$/.test(d)},fd=/^\+\d+$/;function bd(d){return bd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(d){return typeof d}:function(d){return d&&"function"==typeof Symbol&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},bd(d)}function pd(d){var t="function"==typeof Map?new Map:void 0;return pd=function(d){if(null===d||!function(d){try{return-1!==Function.toString.call(d).indexOf("[native code]")}catch(t){return"function"==typeof d}}(d))return d;if("function"!=typeof d)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(d))return t.get(d);t.set(d,i)}function i(){return function(d,t,i){if(md())return Reflect.construct.apply(null,arguments);var e=[null];e.push.apply(e,t);var r=new(d.bind.apply(d,e));return i&&wd(r,i.prototype),r}(d,arguments,vd(this).constructor)}return i.prototype=Object.create(d.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),wd(i,d)},pd(d)}function md(){try{var d=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(d){}return(md=function(){return!!d})()}function wd(d,t){return wd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,t){return d.__proto__=t,d},wd(d,t)}function vd(d){return vd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(d){return d.__proto__||Object.getPrototypeOf(d)},vd(d)}var yd=function(){function d(t){var i;return function(d,t){if(!(d instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),i=function(d,t,i){return t=vd(t),function(d,t){if(t&&("object"==bd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(void 0===d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(d)}(d,md()?Reflect.construct(t,i||[],vd(d).constructor):t.apply(d,i))}(this,d,[t]),Object.setPrototypeOf(i,d.prototype),i.name=i.constructor.name,i}return function(d,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(t&&t.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),Object.defineProperty(d,"prototype",{writable:!1}),t&&wd(d,t)}(d,pd(Error)),function(d){return Object.defineProperty(d,"prototype",{writable:!1}),d}(d)}(),gd=RegExp("(?:"+Q()+")$","i"),kd={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function xd(d,t){(null==t||t>d.length)&&(t=d.length);for(var i=0,e=Array(t);i<t;i++)e[i]=d[i];return e}function Md(d){for(var t,i="",e=function(d,t){var i="undefined"!=typeof Symbol&&d[Symbol.iterator]||d["@@iterator"];if(i)return(i=i.call(d)).next.bind(i);if(Array.isArray(d)||(i=function(d,t){if(d){if("string"==typeof d)return xd(d,t);var i={}.toString.call(d).slice(8,-1);return"Object"===i&&d.constructor&&(i=d.constructor.name),"Map"===i||"Set"===i?Array.from(d):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?xd(d,t):void 0}}(d))||t){i&&(d=i);var e=0;return function(){return e>=d.length?{done:!0}:{done:!1,value:d[e++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(d.split(""));!(t=e()).done;)i+=Cd(t.value,i)||"";return i}function Cd(d,t){if("+"===d){if(t)return;return"+"}return function(d){return kd[d]}(d)}var Nd="(["+_+"]|[\\-\\.\\(\\)]?)",Sd=RegExp("^\\+"+Nd+"*["+_+"]"+Nd+"*$","g"),Od=RegExp("^(["+_+"]+((\\-)*["+_+"])*\\.)*[a-zA-Z]+((\\-)*["+_+"])*\\.?$","g"),jd=";phone-context=";var Ad=RegExp("[++"+_+"]"),Ld=RegExp("[^"+_+"#]+$");function Td(d,t,i){if(t=t||{},i=new C(i),t.defaultCountry&&!i.hasCountry(t.defaultCountry)){if(t.v2)throw new yd("INVALID_COUNTRY");throw Error("Unknown country: ".concat(t.defaultCountry))}var e=function(d,t,i){var e=function(d,t){var i,e=t.extractFormattedPhoneNumber,r=function(d){var t=d.indexOf(jd);if(t<0)return null;var i=t+15;if(i>=d.length)return"";var e=d.indexOf(";",i);return e>=0?d.substring(i,e):d.substring(i)}(d);if(!function(d){return null===d||0!==d.length&&(Sd.test(d)||Od.test(d))}(r))throw new yd("NOT_A_NUMBER");if(null===r)i=e(d)||"";else{i="","+"===r.charAt(0)&&(i+=r);var o,n=d.indexOf("tel:");o=n>=0?n+4:0;var a=d.indexOf(jd);i+=d.substring(o,a)}var $=i.indexOf(";isub=");if($>0&&(i=i.substring(0,$)),""!==i)return i}(d,{extractFormattedPhoneNumber:function(d){return function(d,t,i){if(d)if(d.length>250){if(i)throw new yd("TOO_LONG")}else{if(!1===t)return d;var e=d.search(Ad);if(!(e<0))return d.slice(e).replace(Ld,"")}}(d,i,t)}});if(!e)return{};if(!function(d){return d.length>=2&&ed.test(d)}(e))return function(d){return td.test(d)}(e)?{error:"TOO_SHORT"}:{};var r=function(d){var t=d.search(gd);if(t<0)return{};for(var i=d.slice(0,t),e=d.match(gd),r=1;r<e.length;){if(e[r])return{number:i,ext:e[r]};r++}}(e);return r.ext?r:{number:e}}(d,t.v2,t.extract),r=e.number,o=e.ext;if(!r){if(t.v2){if("TOO_SHORT"===e.error)throw new yd("TOO_SHORT");throw new yd("NOT_A_NUMBER")}return{}}var n=function(d,t,i,e){var r,o=Z(Md(d),void 0,t,i,e.metadata),n=o.countryCallingCodeSource,a=o.countryCallingCode,$=o.number;if(a)e.selectNumberingPlan(a);else{if(!$||!t&&!i)return{};e.selectNumberingPlan(t,i),t&&(r=t),a=i||I(t,e.metadata)}if(!$)return{countryCallingCodeSource:n,countryCallingCode:a};var s=Y(Md($),r,e),u=s.nationalNumber,l=s.carrierCode,c=V(a,{nationalNumber:u,metadata:e});return c&&(r=c,"001"===c||e.selectNumberingPlan(r)),{country:r,countryCallingCode:a,countryCallingCodeSource:n,nationalNumber:u,carrierCode:l}}(r,t.defaultCountry,t.defaultCallingCode,i),a=n.country,$=n.nationalNumber,s=n.countryCallingCode,u=n.countryCallingCodeSource,l=n.carrierCode;if(!i.hasSelectedNumberingPlan()){if(t.v2)throw new yd("INVALID_COUNTRY");return{}}if(!$||$.length<2){if(t.v2)throw new yd("TOO_SHORT");return{}}if($.length>17){if(t.v2)throw new yd("TOO_LONG");return{}}if(t.v2){var c=new cd(s,$,i.metadata);return a&&(c.country=a),l&&(c.carrierCode=l),o&&(c.ext=o),c.__countryCallingCodeSource=u,c}var h=!!(t.extended?i.hasSelectedNumberingPlan():a)&&R($,i.nationalNumberPattern());return t.extended?{country:a,countryCallingCode:s,carrierCode:l,valid:h,possible:!!h||!(!0!==t.extended||!i.possibleLengths()||!P($,a,i)),phone:$,ext:o}:h?function(d,t,i){var e={country:d,phone:t};return i&&(e.ext=i),e}(a,$,o):{}}function Id(d){return Id="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(d){return typeof d}:function(d){return d&&"function"==typeof Symbol&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},Id(d)}function Ed(d,t){var i=Object.keys(d);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(d);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(d,t).enumerable}))),i.push.apply(i,e)}return i}function Dd(d){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ed(Object(i),!0).forEach((function(t){Pd(d,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(i)):Ed(Object(i)).forEach((function(t){Object.defineProperty(d,t,Object.getOwnPropertyDescriptor(i,t))}))}return d}function Pd(d,t,i){return(t=function(d){var t=function(d,t){if("object"!=Id(d)||!d)return d;var i=d[Symbol.toPrimitive];if(void 0!==i){var e=i.call(d,t);if("object"!=Id(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return d+""}(d,"string");return"symbol"==Id(t)?t:t+""}(t))in d?Object.defineProperty(d,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):d[t]=i,d}function Rd(d){return Rd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(d){return typeof d}:function(d){return d&&"function"==typeof Symbol&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},Rd(d)}function Fd(d,t){var i=Object.keys(d);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(d);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(d,t).enumerable}))),i.push.apply(i,e)}return i}function Ud(d,t,i){return(t=function(d){var t=function(d,t){if("object"!=Rd(d)||!d)return d;var i=d[Symbol.toPrimitive];if(void 0!==i){var e=i.call(d,t);if("object"!=Rd(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return d+""}(d,"string");return"symbol"==Rd(t)?t:t+""}(t))in d?Object.defineProperty(d,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):d[t]=i,d}function zd(d,t){(null==t||t>d.length)&&(t=d.length);for(var i=0,e=Array(t);i<t;i++)e[i]=d[i];return e}function Bd(d){var t,i,e,r=function(d,t){return function(d){if(Array.isArray(d))return d}(d)||function(d,t){var i=null==d?null:"undefined"!=typeof Symbol&&d[Symbol.iterator]||d["@@iterator"];if(null!=i){var e,r,o,n,a=[],$=!0,s=!1;try{if(o=(i=i.call(d)).next,0===t);else for(;!($=(e=o.call(i)).done)&&(a.push(e.value),a.length!==t);$=!0);}catch(d){s=!0,r=d}finally{try{if(!$&&null!=i.return&&(n=i.return(),Object(n)!==n))return}finally{if(s)throw r}}return a}}(d,t)||function(d,t){if(d){if("string"==typeof d)return zd(d,t);var i={}.toString.call(d).slice(8,-1);return"Object"===i&&d.constructor&&(i=d.constructor.name),"Map"===i||"Set"===i?Array.from(d):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?zd(d,t):void 0}}(d,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Array.prototype.slice.call(d),4),o=r[0],n=r[1],a=r[2],$=r[3];if("string"!=typeof o)throw new TypeError("A text for parsing must be a string.");if(t=o,n&&"string"!=typeof n){if(!w(n))throw Error("Invalid second argument: ".concat(n));a?(i=n,e=a):e=n}else $?(i=a,e=$):(i=void 0,e=a),n&&(i=function(d){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Fd(Object(i),!0).forEach((function(t){Ud(d,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(i)):Fd(Object(i)).forEach((function(t){Object.defineProperty(d,t,Object.getOwnPropertyDescriptor(i,t))}))}return d}({defaultCountry:n},i));return{text:t,options:i,metadata:e}}function _d(d){return _d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(d){return typeof d}:function(d){return d&&"function"==typeof Symbol&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},_d(d)}function Gd(d,t){var i=Object.keys(d);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(d);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(d,t).enumerable}))),i.push.apply(i,e)}return i}function Hd(d){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Gd(Object(i),!0).forEach((function(t){Wd(d,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(i)):Gd(Object(i)).forEach((function(t){Object.defineProperty(d,t,Object.getOwnPropertyDescriptor(i,t))}))}return d}function Wd(d,t,i){return(t=function(d){var t=function(d,t){if("object"!=_d(d)||!d)return d;var i=d[Symbol.toPrimitive];if(void 0!==i){var e=i.call(d,t);if("object"!=_d(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return d+""}(d,"string");return"symbol"==_d(t)?t:t+""}(t))in d?Object.defineProperty(d,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):d[t]=i,d}function Vd(){var d=Bd(arguments);return function(d,t,i){t&&t.defaultCountry&&!function(d,t){return t.countries.hasOwnProperty(d)}(t.defaultCountry,i)&&(t=Hd(Hd({},t),{},{defaultCountry:void 0}));try{return function(d,t,i){return Td(d,Dd(Dd({},t),{},{v2:!0}),i)}(d,t,i)}catch(d){if(!(d instanceof yd))throw d}}(d.text,d.options,d.metadata)}const Yd={},Zd=d(class extends i{constructor(d){var t;super(),!1!==d&&this.__registerHost(),this.amwalCheckoutSuccess=e(this,"amwalCheckoutSuccess",7),this.updateOrderOnPaymentsuccess=e(this,"updateOrderOnPaymentsuccess",7),this.amwalDismissed=e(this,"amwalDismissed",7),this.amwalAddressUpdate=e(this,"amwalAddressUpdate",7),this.amwalAddressCountryUpdate=e(this,"amwalAddressCountryUpdate",7),this.amwalAddressStateUpdate=e(this,"amwalAddressStateUpdate",7),this.amwalPrePayTrigger=e(this,"amwalPrePayTrigger",7),this.amwalPreCheckoutTrigger=e(this,"amwalPreCheckoutTrigger",7),this.requirePopup=!1,this.showButton=this.debug,this.hideIcons=!0,this.countryCode="SA",this.locale="en",this.label="Quick Checkout",this.darkMode="off",this.disabled=!1,this.addressRequired=!0,this.showPaymentBrands=!1,this.showDiscountRibbon=!1,this.street2Required=!1,this.emailRequired=!0,this.addressHandshake=!1,this.enableDynamicShippingDetails=!1,this.sendExtraAddressFields=!1,this.shippingMethods=[],this.taxes=0,this.discount=0,this.fees=0,this.uniqueRef=!1,this.onlyShowBankInstallment=!1,this.enableAppleCheckout=!1,this.debug=!1,this.showContinueShoppingButton=!1,this.enablePrePayTrigger=!1,this.enablePreCheckoutTrigger=!1,this.installmentsCount=6,this.timelineStyle="default",this.footerMessage="",this.waitingForPreCheckoutTriggerAck=!1,this.waitingForPrePayTriggerAck=!1,this.agent=new f.UAParser((null===(t=null===window||void 0===window?void 0:window.navigator)||void 0===t?void 0:t.userAgent)||"").getResult(),this.paymentSuccessful=!1,this.orderId="",this.internallyDisabled=!1,this.prefersDark=window.matchMedia("(prefers-color-scheme: dark)"),this.waitingForAddressAck=!1,this.waitingForAddressCountryAck=!1,this.waitingForAddressStateAck=!1}getApiUrl(){return this.apiUrl||("undefined"!=typeof process?"https://qa.amwal.dev":null)||"https://backend.sa.amwal.tech"}getPayUrl(){return this.payUrl||("undefined"!=typeof process?"http://localhost:3000":null)||"https://pay.sa.amwal.tech"}prePayCheckoutAckHandler(d){this.debugMsg("Pre Checkout Trigger Ack Received"),this.debugMsg("Current Amount: ",this.amount),this.debugMsg("Current Taxes: ",this.taxes),this.debugMsg("Current Discount: ",this.discount),this.debugMsg("Current Fees: ",this.fees),this.debugMsg("Order Details: ",d.detail),d.detail.locale=this.locale,this.waitingForPreCheckoutTriggerAck?(this.waitingForPreCheckoutTriggerAck=!1,this.createTransaction(Object.assign({},d.detail))):this.debugMsg("Error: Unexpected or repeated amwalPreCheckoutTriggerAck")}prePayCheckoutErrorHandler(d){this.debugMsg("Pre Checkout Trigger Error Received: "+d.detail),this.waitingForPreCheckoutTriggerAck?(this.waitingForPreCheckoutTriggerAck=!1,this.orderError=d.detail,this.sendOrderDetails()):this.debugMsg("Error: Unexpected or repeated amwalPreCheckoutTriggerError")}prePayTriggerAckHandler(d){var t;this.debugMsg("Pre Pay Trigger Ack Received"),this.debugMsg("Current Shipping Methods: ",this.shippingMethods),this.debugMsg("Current Taxes: ",this.taxes),this.debugMsg("Current Discount: ",this.discount),this.debugMsg("Current Fees: ",this.fees),this.waitingForPrePayTriggerAck?(this.waitingForPrePayTriggerAck=!1,null===(t=this.payWindow)||void 0===t||t.postMessage(Object.assign({type:"pre-pay-trigger-ack",shippingMethods:this.shippingMethods,taxes:this.taxes,discount:this.discount,discountDescription:this.discountDescription,fees:this.fees,feesDescription:this.feesDescription,amount:this.amount},d.detail),"*")):this.debugMsg("Error: Unexpected or repeated amwalPrePayTriggerAck")}prePayTriggerErrorHandler(d){var t;this.debugMsg("Pre Pay Trigger Error Received"),this.waitingForPrePayTriggerAck?(this.waitingForPrePayTriggerAck=!1,null===(t=this.payWindow)||void 0===t||t.postMessage(Object.assign({type:"pre-pay-trigger-error"},d.detail),"*")):this.debugMsg("Error: Unexpected or repeated amwalPrePayTriggerError")}parseMyArrayProp(d,t){const i="string"==typeof d?JSON.parse(d):d;Array.isArray(i)?(this.debugMsg("Setting shippingMethods to:",i),this.shippingMethods=i):this.debugMsg("Failed to set shippingMethods to:",i)}parseInitiaalAddressProp(d,t){this.initialAddress="string"==typeof d?JSON.parse(d):d}parseAllowedAddressCountries(d,t){const i="string"==typeof d?JSON.parse(d):d;Array.isArray(i)?(this.debugMsg("Setting allowedAddressCountries to:",i),this.allowedAddressCountries=i):this.debugMsg("Failed to set allowedAddressCountries to:",d)}parsepostcodeOptionalCountries(d,t){const i="string"==typeof d?JSON.parse(d):d;Array.isArray(i)?(this.debugMsg("Setting postcodeOptionalCountries to:",i),this.postcodeOptionalCountries=i):this.debugMsg("Failed to set postcodeOptionalCountries to:",d)}parseAllowedAddressStates(d,t){const i="string"==typeof d?JSON.parse(d):d;i?(this.debugMsg("Setting allowedAddressStates to:",i),this.allowedAddressStates=i):this.debugMsg("Failed to set allowedAddressStates to:",d)}parseAllowedAddressCities(d,t){const i="string"==typeof d?JSON.parse(d):d;i?(this.debugMsg("Setting allowedAddressCities to:",i),this.allowedAddressCities=i):this.debugMsg("Failed to set allowedAddressCities to:",d)}async updateLocale(d){this.locale=d,this.t=await o.useTranslation(this.locale)}validateDiscount(d,t){if("number"!=typeof d)throw Error("Discount has to be a number");if(d>=this.amount)throw Error("Discount must be less than amount field")}validateFees(d,t){if("number"!=typeof d)throw Error("Fees has to be a number")}toggleDark(d){this.dark="on"==this.darkMode||"auto"==this.darkMode&&d}debugMsg(...d){this.debug&&console.log(...d)}async componentWillLoad(){var d,t,i,e;const r=`${this.merchantId}-${this.countryCode}`;let n=Yd[r];if(!n)try{const d=sessionStorage.getItem("amwal-showbrand-"+r);d&&(n=JSON.parse(d))}catch(d){console.log(d)}if(!n)try{const d=await fetch(this.getApiUrl()+"/showbrand/",{headers:{"Content-Type":"application/json",Amwal:this.merchantId}});if(d.ok){n=await d.json(),Yd[r]=n;try{sessionStorage.setItem("amwal-showbrand-"+r,JSON.stringify(n))}catch(d){console.log(d)}}}catch(d){console.log(d)}n&&(this.requirePopup=n.REQUIRE_POPUP&&window.top!==window.self,this.showButton=!0);const a=null===window||void 0===window?void 0:window.PublicKeyCredential,$=null==a?void 0:a.isConditionalMediationAvailable,s=!!$&&await $(),u=null===(t=null===(d=this.agent)||void 0===d?void 0:d.browser)||void 0===t?void 0:t.name,l=null===(e=null===(i=this.agent)||void 0===i?void 0:i.os)||void 0===e?void 0:e.name,c="Firefox"===u&&"Mac OS"==l,h=("Chrome"===u||"Edge"===u)&&"iOS"!==l,f=("iOS"===l||"Android"===l)&&!["Chrome","Edge","Firefox","Safari"].includes(u);this.useModal=!this.requirePopup&&!this.isApplePaySupported()&&(s||h||c||f),this.toggleDark(this.prefersDark.matches),this.prefersDark.addEventListener("change",(d=>this.toggleDark(d.matches))),this.t=await o.useTranslation(this.locale),this.shippingMethods=JSON.parse(this.el.getAttribute("shipping-methods")),this.initialAddress=JSON.parse(this.el.getAttribute("initial-address")),this.allowedAddressCountries=JSON.parse(this.el.getAttribute("allowed-address-countries")),this.postcodeOptionalCountries=JSON.parse(this.el.getAttribute("postcode-optional-countries")),this.allowedAddressStates=JSON.parse(this.el.getAttribute("allowed-address-states")),this.allowedAddressCities=JSON.parse(this.el.getAttribute("allowed-address-cities"))}componentDidLoad(){this.computeHideIcons(this.el.offsetWidth),this.resizeObserver&&this.resizeObserver.disconnect(),this.resizeObserver=new ResizeObserver((d=>d.forEach((d=>{this.computeHideIcons(d.contentRect.width)})))),this.resizeObserver.observe(this.el.querySelector("ion-button").shadowRoot.querySelector("button"))}disconnectedCallback(){this.resizeObserver&&this.resizeObserver.disconnect()}sendOrderDetails(){if(this.payWindow&&!this.paymentSuccessful)if(this.orderError)this.payWindow.postMessage(Object.assign({type:"amwal-order-error"},this.orderError),"*");else if(this.orderId){const d={type:"amwal-order-id",id:this.orderId,darkMode:this.darkMode,lang:this.locale,addressRequired:this.addressRequired,street2Required:this.street2Required,emailRequired:this.emailRequired,addressHandshake:this.addressHandshake,sendExtraAddressFields:this.sendExtraAddressFields,enableDynamicShippingDetails:this.enableDynamicShippingDetails,enablePrePayTrigger:this.enablePrePayTrigger,shippingMethods:this.shippingMethods,taxes:this.taxes,discount:this.discount,discountDescription:this.discountDescription,fees:this.fees,feesDescription:this.feesDescription,initialEmail:this.initialEmail,initialFirstName:this.initialFirstName,initialLastName:this.initialLastName,initialPhoneNumber:this.initialPhoneNumber,initialAddress:this.initialAddress,allowedAddressCountries:this.allowedAddressCountries,allowedAddressStates:this.allowedAddressStates,allowedAddressCities:this.allowedAddressCities,installmentOptionsUrl:this.installmentOptionsUrl,postcodeOptionalCountries:this.postcodeOptionalCountries,onlyShowBankInstallment:this.onlyShowBankInstallment,enableAppleCheckout:this.enableAppleCheckout};this.payWindow.postMessage(d,"*"),this.debugMsg("Sent Order details: ",d)}}async createTransaction(d){var t,i,e,r;try{let o;try{const d=function(){return function(d,t){var i=Array.prototype.slice.call(t);return i.push(b),d.apply(this,i)}(Vd,arguments)}(this.initialPhoneNumber,this.countryCode);d&&d.isValid()&&(o=d.number)}catch(d){console.log(d)}const n=null!==(i=null!==(t=null==d?void 0:d.locale)&&void 0!==t?t:this.locale)&&void 0!==i?i:"en",a=Object.assign(Object.assign(Object.assign({merchantID:this.merchantId,amount:this.amount,taxes:this.taxes,discount:this.discount,fees:this.fees,installmentOptionsUrl:this.installmentOptionsUrl,client_email:this.initialEmail,client_first_name:this.initialFirstName,client_last_name:this.initialLastName,client_phone_number:o,trx_lang:n,address_details:this.initialAddress},d?{order_details:d}:void 0),1==(null===(e=this.shippingMethods)||void 0===e?void 0:e.length)?{shipping:this.shippingMethods[0].price,shipping_details:this.shippingMethods[0]}:void 0),this.refId?{refId:this.refId,uniqueRef:this.uniqueRef}:void 0),$=await fetch(this.getApiUrl()+"/transactions/",{method:"POST",headers:{"Content-Type":"application/json",Amwal:this.merchantId},body:JSON.stringify(Object.assign({},a))});if(this.result=await $.json(),!$.ok)throw null!==(r=this.result.detail)&&void 0!==r?r:$.statusText;this.orderId=this.result.id}catch(d){console.log(d),this.orderError={description:""+d}}this.sendOrderDetails()}async handleCheckout(){var d;if(this.orderId=void 0,this.orderError=void 0,this.internallyDisabled=!0,this.useModal)await this.presentModal();else{this.openPopup(),document.body.classList.add("amwal-overlay-active");const d=this.el.querySelector("#amwal-overlay-id");d&&d.nodeType===Node.ELEMENT_NODE&&document.body.appendChild(d);const t=setInterval((()=>{var d;if(null===(d=this.payWindow)||void 0===d?void 0:d.closed)try{document.body.classList.remove("amwal-overlay-active");const d=document.querySelector("body > #amwal-overlay-id"),t=this.el.querySelector("#amwal-overlay-template");if(d&&t){const i=document.body.removeChild(d);i&&i.nodeType===Node.ELEMENT_NODE&&t.appendChild(i)}this.sendDismissEvent()}catch(d){console.log(d)}finally{clearInterval(t)}}),200)}null===(d=this.payWindow)||void 0===d||d.postMessage({type:"amwal-lang",lang:this.locale},"*"),this.enablePreCheckoutTrigger?(this.waitingForPreCheckoutTriggerAck=!0,this.amwalPreCheckoutTrigger.emit()):this.createTransaction()}async presentModal(){const d=document.createElement("div");d.innerHTML=`\n <iframe\n name="amwal-pay" allow="publickey-credentials-get; geolocation; payment"\n style="flex: 1; border: none;"\n src=${this.getPayUrl()}\n />\n `,this.checkoutModalEl=await n.create({component:d,canDismiss:!1}),await this.checkoutModalEl.present();const t=document.getElementsByTagName("iframe").namedItem("amwal-pay");this.payWindow=null==t?void 0:t.contentWindow}setSuccess(d){this.paymentSuccessful=d,this.paymentSuccessful&&this.amwalCheckoutSuccess.emit({orderId:this.orderId})}async dismissModal(){this.checkoutModalEl&&(this.checkoutModalEl.canDismiss=!0,await n.dismiss(),this.checkoutModalEl=void 0),this.sendDismissEvent()}async sendDismissEvent(){if(this.orderId&&!this.paymentSuccessful)try{const d=await fetch(`${this.getApiUrl()}/transactions/${this.orderId}`),t=await d.json();this.setSuccess("success"===t.status)}catch(d){console.error(d)}this.internallyDisabled=!1,this.amwalDismissed.emit({orderId:this.orderId,paymentSuccessful:this.paymentSuccessful}),this.orderId="",this.paymentSuccessful=!1}payWindowMessageHandler(d){var t,i;let e=!0;try{const t=JSON.parse(d.data);if("MF-3DSecure"===t.sender){const d=t.url;if(d)return void(this.payWindow.location.href=d)}}catch(d){}"query-dark-mode"==d.data?null===(t=this.payWindow)||void 0===t||t.postMessage({type:"dark-mode",darkMode:this.darkMode},"*"):"query-lang"==d.data?null===(i=this.payWindow)||void 0===i||i.postMessage({type:"lang",lang:this.locale,showContinueShoppingButton:this.showContinueShoppingButton},"*"):"query-amwal-order-id"==d.data?this.sendOrderDetails():"dismiss"===d.data?this.dismissModal():this.orderId?"paymentSuccessful"===d.data?this.setSuccess(!0):"updateOrderOnPaymentsuccess"===d.data?this.updateOrderOnPaymentsuccess.emit({orderId:this.orderId}):"address-country-update"===d.data.type?(this.waitingForAddressCountryAck=!0,this.amwalAddressCountryUpdate.emit(Object.assign({},d.data))):"address-state-update"===d.data.type?(this.waitingForAddressStateAck=!0,this.amwalAddressStateUpdate.emit(Object.assign({},d.data))):"amwal-address-update"==d.data.type?(this.waitingForAddressAck=!0,this.amwalAddressUpdate.emit(Object.assign(Object.assign({},d.data.address),{orderId:this.orderId}))):"amwal-pre-pay-trigger"==d.data.type?(this.waitingForPrePayTriggerAck=!0,this.amwalPrePayTrigger.emit(d.data.transactionDetails)):e=!1:e=!1,e&&this.debugMsg(d)}addressAckHandler(){var d;this.debugMsg("Address Ack Received"),this.debugMsg("Current Shipping Methods: ",this.shippingMethods),this.debugMsg("Current Taxes: ",this.taxes),this.debugMsg("Current Discount: ",this.discount),this.debugMsg("Current Fees: ",this.fees),this.waitingForAddressAck?(this.waitingForAddressAck=!1,null===(d=this.payWindow)||void 0===d||d.postMessage({type:"amwal-address-ack",shippingMethods:this.shippingMethods,taxes:this.taxes,discount:this.discount,discountDescription:this.discountDescription,fees:this.fees,feesDescription:this.feesDescription,amount:this.amount},"*")):this.debugMsg("Error: Unexpected or repeated amwalAddressAck")}addressTriggerErrorHandler(d){var t;this.debugMsg("Address Trigger Error Received"),this.waitingForAddressAck?(this.waitingForAddressAck=!1,null===(t=this.payWindow)||void 0===t||t.postMessage(Object.assign({type:"amwal-address-trigger-error"},d.detail),"*")):this.debugMsg("Error: Unexpected or repeated amwalAddressTriggerError")}addressCountryAckHandler(){var d;this.waitingForAddressCountryAck?(this.waitingForAddressCountryAck=!1,null===(d=this.payWindow)||void 0===d||d.postMessage({type:"amwal-address-country-ack",allowedAddressStates:this.allowedAddressStates},"*")):this.debugMsg("Error: Unexpected or repeated amwalAddressCountryAck")}addressStateAckHandler(){var d;this.waitingForAddressStateAck?(this.waitingForAddressStateAck=!1,null===(d=this.payWindow)||void 0===d||d.postMessage({type:"amwal-address-state-ack",allowedAddressCities:this.allowedAddressCities},"*")):this.debugMsg("Error: Unexpected or repeated amwalAddressStateAck")}openPopup(){var d;null===(d=this.payWindow)||void 0===d||d.close();const t=window.screenLeft+(screen.width-500)/2,i=`modal=yes, width=500, height=860, top=${window.screenTop+(screen.height-860)/4}, left=${t}`;this.payWindow=window.open(this.getPayUrl(),"amwal-pay",i),this.payWindow.focus()}checkBrowserType(){var d,t;return(null===(t=null===(d=this.agent)||void 0===d?void 0:d.browser)||void 0===t?void 0:t.name)||"Unknown"}isApplePaySupported(){var d;try{return null===(d=window.ApplePaySession)||void 0===d?void 0:d.canMakePayments()}catch(d){console.error(d)}return!1}computeHideIcons(d){if(d){const t=this.showDiscountRibbon&&this.discount>0&&this.amount>0,i=t?270:220,e=t?220:170,r=d<(this.isApplePaySupported()?i:e);this.hideIcons!==r&&(this.hideIcons=r)}}formatNumber(d){return Number(d.toFixed(2))}getNetAmount(){var d,t,i;const e=this.amount+(null!==(d=this.taxes)&&void 0!==d?d:0)+(null!==(t=this.fees)&&void 0!==t?t:0)-(null!==(i=this.discount)&&void 0!==i?i:0);return this.formatNumber(e)}render(){var d,t;return[r("div",{key:"b76ac6db910ab50712e99980b6eac68fb878b0ac"},r("link",{key:"a12ae0412721f6fe7a1dca35b8ce984379c4120b",href:"https://fonts.googleapis.com/css?family=Cairo",rel:"stylesheet"}),this.paymentSuccessful?r("center",null,r("ion-text",null,this.t("Your Payment has been processed successfully!")),",",r("div",{style:{width:"40px",height:"40px",margin:"10px"},class:this.paymentSuccessful?void 0:"hidden"},r("svg",{version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 50 50",style:{"enable-background":"new 0 0 50 50;"}},r("circle",{style:{fill:"#25AE88"},cx:"25",cy:"25",r:"25"}),r("polyline",{style:{fill:"none",stroke:"#FFFFFF","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":"10"},points:"38,15 22,33 12,25"})))):r("center",{hidden:!this.showButton},r("amwal-installments-timeline",{"enable-installments":this.onlyShowBankInstallment,"installments-count":this.installmentsCount,locale:this.locale,amount:this.getNetAmount(),"timeline-style":this.timelineStyle,"footer-message":this.footerMessage}),r("ion-button",{class:"amwal-checkout-button",color:"dark",onClick:()=>this.handleCheckout(),disabled:this.disabled||this.internallyDisabled},!this.hideIcons&&this.showDiscountRibbon&&this.discount>0&&this.amount>0&&r("div",{class:"ribbon"},r("span",{class:"ribbon-text"},this.t("OFF")," ",r("br",null),this.formatNumber(this.discount/(this.amount+(null!==(d=this.taxes)&&void 0!==d?d:0)+(null!==(t=this.fees)&&void 0!==t?t:0))*100)+"%")),r("div",{class:"payment-brand-class",slot:"ar"===this.locale?"start":"end"},r("div",null,this.isApplePaySupported()&&r("img",{width:63,src:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIxLjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9InRpbnkiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIgoJIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNTEyIDIxMC4yIiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHBhdGggaWQ9IlhNTElEXzM0XyIgZmlsbD0id2hpdGUiIGQ9Ik05My42LDI3LjFDODcuNiwzNC4yLDc4LDM5LjgsNjguNCwzOWMtMS4yLTkuNiwzLjUtMTkuOCw5LTI2LjFjNi03LjMsMTYuNS0xMi41LDI1LTEyLjkKCUMxMDMuNCwxMCw5OS41LDE5LjgsOTMuNiwyNy4xIE0xMDIuMyw0MC45Yy0xMy45LTAuOC0yNS44LDcuOS0zMi40LDcuOWMtNi43LDAtMTYuOC03LjUtMjcuOC03LjNjLTE0LjMsMC4yLTI3LjYsOC4zLTM0LjksMjEuMgoJYy0xNSwyNS44LTMuOSw2NCwxMC42LDg1YzcuMSwxMC40LDE1LjYsMjEuOCwyNi44LDIxLjRjMTAuNi0wLjQsMTQuOC02LjksMjcuNi02LjljMTIuOSwwLDE2LjYsNi45LDI3LjgsNi43CgljMTEuNi0wLjIsMTguOS0xMC40LDI2LTIwLjhjOC4xLTExLjgsMTEuNC0yMy4zLDExLjYtMjMuOWMtMC4yLTAuMi0yMi40LTguNy0yMi42LTM0LjNjLTAuMi0yMS40LDE3LjUtMzEuNiwxOC4zLTMyLjIKCUMxMjMuMyw0Mi45LDEwNy43LDQxLjMsMTAyLjMsNDAuOSBNMTgyLjYsMTEuOXYxNTUuOWgyNC4ydi01My4zaDMzLjVjMzAuNiwwLDUyLjEtMjEsNTIuMS01MS40YzAtMzAuNC0yMS4xLTUxLjItNTEuMy01MS4ySDE4Mi42egoJIE0yMDYuOCwzMi4zaDI3LjljMjEsMCwzMywxMS4yLDMzLDMwLjljMCwxOS43LTEyLDMxLTMzLjEsMzFoLTI3LjhWMzIuM3ogTTMzNi42LDE2OWMxNS4yLDAsMjkuMy03LjcsMzUuNy0xOS45aDAuNXYxOC43aDIyLjRWOTAuMgoJYzAtMjIuNS0xOC0zNy00NS43LTM3Yy0yNS43LDAtNDQuNywxNC43LTQ1LjQsMzQuOWgyMS44YzEuOC05LjYsMTAuNy0xNS45LDIyLjktMTUuOWMxNC44LDAsMjMuMSw2LjksMjMuMSwxOS42djguNmwtMzAuMiwxLjgKCWMtMjguMSwxLjctNDMuMywxMy4yLTQzLjMsMzMuMkMyOTguNCwxNTUuNiwzMTQuMSwxNjksMzM2LjYsMTY5eiBNMzQzLjEsMTUwLjVjLTEyLjksMC0yMS4xLTYuMi0yMS4xLTE1LjdjMC05LjgsNy45LTE1LjUsMjMtMTYuNAoJbDI2LjktMS43djguOEMzNzEuOSwxNDAuMSwzNTkuNSwxNTAuNSwzNDMuMSwxNTAuNXogTTQyNS4xLDIxMC4yYzIzLjYsMCwzNC43LTksNDQuNC0zNi4zTDUxMiw1NC43aC0yNC42bC0yOC41LDkyLjFoLTAuNQoJbC0yOC41LTkyLjFoLTI1LjNsNDEsMTEzLjVsLTIuMiw2LjljLTMuNywxMS43LTkuNywxNi4yLTIwLjQsMTYuMmMtMS45LDAtNS42LTAuMi03LjEtMC40djE4LjdDNDE3LjMsMjEwLDQyMy4zLDIxMC4yLDQyNS4xLDIxMC4yegoJIi8+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo="}),r("img",{width:60,src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTkiIGhlaWdodD0iNjMiIHZpZXdCb3g9IjAgMCA5OSA2MyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTk5IDUuOTA2MjVWNTcuMDkzOEM5OSA1OC42Njg4IDk4LjI1NzUgNjAuMDQ2OSA5Ni43NzI1IDYxLjIyODFDOTUuMjg3NSA2Mi40MDk0IDkzLjU1NSA2MyA5MS41NzUgNjNINy40MjVDNS40NDUgNjMgMy43MTI1IDYyLjQwOTQgMi4yMjc1IDYxLjIyODFDMC43NDI1IDYwLjA0NjkgMCA1OC42Njg4IDAgNTcuMDkzOFY1LjkwNjI1QzAgNC4zMzEyNSAwLjc0MjUgMi45NTMxMiAyLjIyNzUgMS43NzE4N0MzLjcxMjUgMC41OTA2MjQgNS40NDUgMCA3LjQyNSAwSDkxLjU3NUM5My41NTUgMCA5NS4yODc1IDAuNTkwNjI0IDk2Ljc3MjUgMS43NzE4N0M5OC4yNTc1IDIuOTUzMTIgOTkgNC4zMzEyNSA5OSA1LjkwNjI1Wk03LjQyNSAxNi42MzU5SDkxLjU3NVY1LjkwNjI1SDcuNDI1VjE2LjYzNTlaTTcuNDI1IDI5LjMzNDRWNTcuMDkzOEg5MS41NzVWMjkuMzM0NEg3LjQyNVoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo="}))),"ar"===this.locale&&r("div",{class:"vl"}),r("div",{class:"button-text"},this.t(this.label)," "),"en"===this.locale&&r("div",{class:"vl"})))),r("template",{key:"fe6b3cffd28c8c2a9695ad2387103a9b660f00a5",id:"amwal-overlay-template"},r("div",{key:"f31222335364ea7575f04a91c33e16bc06e2e7fb",class:"amwal-overlay",id:"amwal-overlay-id"},r("div",{key:"f4c5c1d989b2cea17b6a944ab0c9a9f5958943c5",class:"amwal-overlay-container"},r("span",{key:"dc6bf122ed72c8593d77b24554ed42d519bc911f",class:"amwal-overlay-close",onClick:()=>{var d;return null===(d=this.payWindow)||void 0===d?void 0:d.close()}},"✕"),r("p",{key:"99ad5d36b214d269f8ed1cd95d58bfdcb2f83d10"},this.t("Don't see your checkout window?")),r("a",{key:"261cfe1e083c451e01ee0a3cd4d2529c80582e2d",role:"button",class:"amwal-overlay-button",onClick:()=>{"Safari"!==this.checkBrowserType()&&this.payWindow?this.payWindow.focus():this.openPopup()}},this.t("Click here")))))]}get el(){return this}static get watchers(){return{shippingMethods:[{parseMyArrayProp:0}],initialAddress:[{parseInitiaalAddressProp:0}],allowedAddressCountries:[{parseAllowedAddressCountries:0}],postcodeOptionalCountries:[{parsepostcodeOptionalCountries:0}],allowedAddressStates:[{parseAllowedAddressStates:0}],allowedAddressCities:[{parseAllowedAddressCities:0}],locale:[{updateLocale:0}],discount:[{validateDiscount:0}],fees:[{validateFees:0}]}}static get style(){return'html.ios{--ion-default-font:-apple-system, BlinkMacSystemFont, "Helvetica Neue", "Roboto", sans-serif}html.md{--ion-default-font:"Roboto", "Helvetica Neue", sans-serif}html{--ion-default-dynamic-font:-apple-system-body;--ion-font-family:var(--ion-default-font)}body{background:var(--ion-background-color)}body.backdrop-no-scroll{overflow:hidden}html.ios ion-modal.modal-card ion-header ion-toolbar:first-of-type,html.ios ion-modal.modal-sheet ion-header ion-toolbar:first-of-type,html.ios ion-modal ion-footer ion-toolbar:first-of-type{padding-top:6px}html.ios ion-modal.modal-card ion-header ion-toolbar:last-of-type,html.ios ion-modal.modal-sheet ion-header ion-toolbar:last-of-type{padding-bottom:6px}html.ios ion-modal ion-toolbar{padding-right:calc(var(--ion-safe-area-right) + 8px);padding-left:calc(var(--ion-safe-area-left) + 8px)}@media screen and (min-width: 768px){html.ios ion-modal.modal-card:first-of-type{--backdrop-opacity:0.18}}ion-modal.modal-default.show-modal~ion-modal.modal-default{--backdrop-opacity:0;--box-shadow:none}html.ios ion-modal.modal-card .ion-page{border-top-left-radius:var(--border-radius)}.ion-color-primary{--ion-color-base:var(--ion-color-primary, #3880ff) !important;--ion-color-base-rgb:var(--ion-color-primary-rgb, 56, 128, 255) !important;--ion-color-contrast:var(--ion-color-primary-contrast, #fff) !important;--ion-color-contrast-rgb:var(--ion-color-primary-contrast-rgb, 255, 255, 255) !important;--ion-color-shade:var(--ion-color-primary-shade, #3171e0) !important;--ion-color-tint:var(--ion-color-primary-tint, #4c8dff) !important}.ion-color-secondary{--ion-color-base:var(--ion-color-secondary, #3dc2ff) !important;--ion-color-base-rgb:var(--ion-color-secondary-rgb, 61, 194, 255) !important;--ion-color-contrast:var(--ion-color-secondary-contrast, #fff) !important;--ion-color-contrast-rgb:var(--ion-color-secondary-contrast-rgb, 255, 255, 255) !important;--ion-color-shade:var(--ion-color-secondary-shade, #36abe0) !important;--ion-color-tint:var(--ion-color-secondary-tint, #50c8ff) !important}.ion-color-tertiary{--ion-color-base:var(--ion-color-tertiary, #5260ff) !important;--ion-color-base-rgb:var(--ion-color-tertiary-rgb, 82, 96, 255) !important;--ion-color-contrast:var(--ion-color-tertiary-contrast, #fff) !important;--ion-color-contrast-rgb:var(--ion-color-tertiary-contrast-rgb, 255, 255, 255) !important;--ion-color-shade:var(--ion-color-tertiary-shade, #4854e0) !important;--ion-color-tint:var(--ion-color-tertiary-tint, #6370ff) !important}.ion-color-success{--ion-color-base:var(--ion-color-success, #2dd36f) !important;--ion-color-base-rgb:var(--ion-color-success-rgb, 45, 211, 111) !important;--ion-color-contrast:var(--ion-color-success-contrast, #fff) !important;--ion-color-contrast-rgb:var(--ion-color-success-contrast-rgb, 255, 255, 255) !important;--ion-color-shade:var(--ion-color-success-shade, #28ba62) !important;--ion-color-tint:var(--ion-color-success-tint, #42d77d) !important}.ion-color-warning{--ion-color-base:var(--ion-color-warning, #ffc409) !important;--ion-color-base-rgb:var(--ion-color-warning-rgb, 255, 196, 9) !important;--ion-color-contrast:var(--ion-color-warning-contrast, #000) !important;--ion-color-contrast-rgb:var(--ion-color-warning-contrast-rgb, 0, 0, 0) !important;--ion-color-shade:var(--ion-color-warning-shade, #e0ac08) !important;--ion-color-tint:var(--ion-color-warning-tint, #ffca22) !important}.ion-color-danger{--ion-color-base:var(--ion-color-danger, #eb445a) !important;--ion-color-base-rgb:var(--ion-color-danger-rgb, 235, 68, 90) !important;--ion-color-contrast:var(--ion-color-danger-contrast, #fff) !important;--ion-color-contrast-rgb:var(--ion-color-danger-contrast-rgb, 255, 255, 255) !important;--ion-color-shade:var(--ion-color-danger-shade, #cf3c4f) !important;--ion-color-tint:var(--ion-color-danger-tint, #ed576b) !important}.ion-color-light{--ion-color-base:var(--ion-color-light, #f4f5f8) !important;--ion-color-base-rgb:var(--ion-color-light-rgb, 244, 245, 248) !important;--ion-color-contrast:var(--ion-color-light-contrast, #000) !important;--ion-color-contrast-rgb:var(--ion-color-light-contrast-rgb, 0, 0, 0) !important;--ion-color-shade:var(--ion-color-light-shade, #d7d8da) !important;--ion-color-tint:var(--ion-color-light-tint, #f5f6f9) !important}.ion-color-medium{--ion-color-base:var(--ion-color-medium, #92949c) !important;--ion-color-base-rgb:var(--ion-color-medium-rgb, 146, 148, 156) !important;--ion-color-contrast:var(--ion-color-medium-contrast, #fff) !important;--ion-color-contrast-rgb:var(--ion-color-medium-contrast-rgb, 255, 255, 255) !important;--ion-color-shade:var(--ion-color-medium-shade, #808289) !important;--ion-color-tint:var(--ion-color-medium-tint, #9d9fa6) !important}.ion-color-dark{--ion-color-base:var(--ion-color-dark, #222428) !important;--ion-color-base-rgb:var(--ion-color-dark-rgb, 34, 36, 40) !important;--ion-color-contrast:var(--ion-color-dark-contrast, #fff) !important;--ion-color-contrast-rgb:var(--ion-color-dark-contrast-rgb, 255, 255, 255) !important;--ion-color-shade:var(--ion-color-dark-shade, #1e2023) !important;--ion-color-tint:var(--ion-color-dark-tint, #383a3e) !important}.ion-page{left:0;right:0;top:0;bottom:0;display:flex;position:absolute;flex-direction:column;justify-content:space-between;contain:layout size style;z-index:0}ion-modal>.ion-page{position:relative;contain:layout style;height:100%}.split-pane-visible>.ion-page.split-pane-main{position:relative}ion-route,ion-route-redirect,ion-router,ion-select-option,ion-nav-controller,ion-menu-controller,ion-action-sheet-controller,ion-alert-controller,ion-loading-controller,ion-modal-controller,ion-picker-controller,ion-popover-controller,ion-toast-controller,.ion-page-hidden{display:none !important}.ion-page-invisible{opacity:0}.can-go-back>ion-header ion-back-button{display:block}html.plt-ios.plt-hybrid,html.plt-ios.plt-pwa{--ion-statusbar-padding:20px}@supports (padding-top: 20px){html{--ion-safe-area-top:var(--ion-statusbar-padding)}}@supports (padding-top: env(safe-area-inset-top)){html{--ion-safe-area-top:env(safe-area-inset-top);--ion-safe-area-bottom:env(safe-area-inset-bottom);--ion-safe-area-left:env(safe-area-inset-left);--ion-safe-area-right:env(safe-area-inset-right)}}ion-card.ion-color .ion-inherit-color,ion-card-header.ion-color .ion-inherit-color{color:inherit}.menu-content{transform:translate3d(0, 0, 0)}.menu-content-open{cursor:pointer;touch-action:manipulation;pointer-events:none;overflow-y:hidden}.menu-content-open ion-content{--overflow:hidden}.menu-content-open .ion-content-scroll-host{overflow:hidden}.ios .menu-content-reveal{box-shadow:-8px 0 42px rgba(0,0,0,.08)}[dir=rtl].ios .menu-content-reveal{box-shadow:8px 0 42px rgba(0,0,0,.08)}.md .menu-content-reveal{box-shadow:4px 0px 16px rgba(0,0,0,.18)}.md .menu-content-push{box-shadow:4px 0px 16px rgba(0,0,0,.18)}ion-accordion-group.accordion-group-expand-inset>ion-accordion:first-of-type{border-top-left-radius:8px;border-top-right-radius:8px}ion-accordion-group.accordion-group-expand-inset>ion-accordion:last-of-type{border-bottom-left-radius:8px;border-bottom-right-radius:8px}ion-accordion-group>ion-accordion:last-of-type ion-item[slot=header]{--border-width:0px}ion-accordion.accordion-animated>[slot=header] .ion-accordion-toggle-icon{transition:300ms transform cubic-bezier(0.25, 0.8, 0.5, 1)}@media (prefers-reduced-motion: reduce){ion-accordion .ion-accordion-toggle-icon{transition:none !important}}ion-accordion.accordion-expanding>[slot=header] .ion-accordion-toggle-icon,ion-accordion.accordion-expanded>[slot=header] .ion-accordion-toggle-icon{transform:rotate(180deg)}ion-accordion-group.accordion-group-expand-inset.md>ion-accordion.accordion-previous ion-item[slot=header]{--border-width:0px;--inner-border-width:0px}ion-accordion-group.accordion-group-expand-inset.md>ion-accordion.accordion-expanding:first-of-type,ion-accordion-group.accordion-group-expand-inset.md>ion-accordion.accordion-expanded:first-of-type{margin-top:0}ion-input input::-webkit-date-and-time-value{text-align:start}.ion-datetime-button-overlay{--width:fit-content;--height:fit-content}.ion-datetime-button-overlay ion-datetime.datetime-grid{width:320px;min-height:320px}.popover-viewport:has(>ion-content){overflow:hidden}@supports not selector(:has(> ion-content)){.popover-viewport{overflow:hidden}}.amwal-checkout-button{display:flex;font-family:\'Cairo\', sans-serif;font-weight:bolder}.hidden{display:none}body.amwal-overlay-active{overflow:hidden}.amwal-overlay{position:fixed;z-index:999999;top:0;bottom:0;left:0;right:0;background-color:rgba(0, 0, 0, .75);display:flex;align-items:center;justify-content:center}.amwal-overlay-container{text-align:center;font:400 16px Arial, sans-serif;color:#fafafa}.amwal-overlay-close{position:absolute;top:1rem;right:1rem;font-size:24px;cursor:pointer;transition:transform .5s ease-in-out}.amwal-overlay-button,.amwal-overlay-button:link,.amwal-overlay-button:target,.amwal-overlay-button:active,.amwal-overlay-button:hover,.amwal-overlay-button:visited,.amwal-overlay-button:focus{display:inline;background-color:transparent;color:white;text-decoration:underline;outline:none;cursor:pointer}ion-modal{--width:35vw;--height:85vh;--border-radius:10px;position:fixed}@media only screen and (max-width: 1000px) and (min-width: 700px){ion-modal{--width:100vw;--height:100vh}}@media only screen and (max-width: 690px){ion-modal{--width:100vw;--height:100vh;--border-radius:0px}.amwal-checkout-button{--border-radius:4px}.ribbon{width:34px !important;left:0}.ribbon~.button-text{font-size:14px}.ribbon:after{border-left:17px solid #F8463F !important;border-right:17px solid #F8463F !important}}@media only screen and (max-height: 690px){ion-modal{--width:100%;--height:100%;--border-radius:0px}}:root{--ion-color-dark:#000000 !important}.amwal-checkout-button{background:none !important;border:none !important;box-shadow:none !important;width:100% !important;height:100% !important;padding:0 !important}amwal-checkout-button button{height:unset !important}.vl{border-left:2px solid white;height:15px;margin:10px}.amwal-checkout-button-height{height:35px !important}.payment-brand-class{max-width:360px}.payment-brand-class img{height:13px;width:30px;margin:2px;object-fit:contain;box-sizing:content-box;padding-top:1px}.masterLogo{border:none !important}.logo-white{background-color:white}.mada-logo{padding:0px !important;height:30px !important;width:50px !important}.ribbon{width:34px;padding:10px 0;position:absolute;top:-15px;left:-15px;text-align:center;font-size:12px;border-top-left-radius:3px;background:#F8463F}.ribbon-text{color:white;font-weight:700;font-size:10px;line-height:1.2;text-transform:uppercase;letter-spacing:0.5px;display:block}.ribbon:before,.ribbon:after{content:"";position:absolute}.ribbon:after{height:0;width:0;bottom:-7px;left:0;border-left:17px solid #F8463F;border-right:17px solid #F8463F;border-bottom:7px solid transparent}.button-text{margin:10px}'}},[0,"amwal-checkout-button",{merchantId:[1,"merchant-id"],installmentOptionsUrl:[1,"installment-options-url"],amount:[2],countryCode:[1,"country-code"],locale:[1],label:[1],darkMode:[1,"dark-mode"],disabled:[4],addressRequired:[4,"address-required"],showPaymentBrands:[4,"show-payment-brands"],showDiscountRibbon:[4,"show-discount-ribbon"],initialAddress:[16],allowedAddressCountries:[16],allowedAddressStates:[16],allowedAddressCities:[16],street2Required:[4,"street2-required"],emailRequired:[4,"email-required"],initialEmail:[1,"initial-email"],initialFirstName:[1,"initial-first-name"],initialLastName:[1,"initial-last-name"],initialPhoneNumber:[1,"initial-phone-number"],addressHandshake:[4,"address-handshake"],enableDynamicShippingDetails:[4,"enable-dynamic-shipping-details"],sendExtraAddressFields:[4,"send-extra-address-fields"],shippingMethods:[16],taxes:[2],discount:[2],discountDescription:[1,"discount-description"],fees:[2],feesDescription:[1,"fees-description"],refId:[1,"ref-id"],uniqueRef:[4,"unique-ref"],onlyShowBankInstallment:[4,"only-show-bank-installment"],enableAppleCheckout:[4,"enable-apple-checkout"],apiUrl:[1,"api-url"],payUrl:[1,"pay-url"],debug:[4],showContinueShoppingButton:[4,"show-continue-shopping-button"],enablePrePayTrigger:[4,"enable-pre-pay-trigger"],enablePreCheckoutTrigger:[4,"enable-pre-checkout-trigger"],postcodeOptionalCountries:[16],installmentsCount:[2,"installments-count"],timelineStyle:[1,"timeline-style"],footerMessage:[1,"footer-message"],hideIcons:[32],result:[32],paymentSuccessful:[32],orderId:[32],dark:[32],internallyDisabled:[32],dismissModal:[64]},[[0,"amwalPreCheckoutTriggerAck","prePayCheckoutAckHandler"],[0,"amwalPreCheckoutTriggerError","prePayCheckoutErrorHandler"],[0,"amwalPrePayTriggerAck","prePayTriggerAckHandler"],[0,"amwalPrePayTriggerError","prePayTriggerErrorHandler"],[8,"message","payWindowMessageHandler"],[0,"amwalAddressAck","addressAckHandler"],[0,"amwalAddressTriggerError","addressTriggerErrorHandler"],[0,"amwalAddressCountryAck","addressCountryAckHandler"],[0,"amwalAddressStateAck","addressStateAckHandler"]],{shippingMethods:[{parseMyArrayProp:0}],initialAddress:[{parseInitiaalAddressProp:0}],allowedAddressCountries:[{parseAllowedAddressCountries:0}],postcodeOptionalCountries:[{parsepostcodeOptionalCountries:0}],allowedAddressStates:[{parseAllowedAddressStates:0}],allowedAddressCities:[{parseAllowedAddressCities:0}],locale:[{updateLocale:0}],discount:[{validateDiscount:0}],fees:[{validateFees:0}]}]),qd=Zd,Kd=function(){"undefined"!=typeof customElements&&["amwal-checkout-button","amwal-installments-timeline","ion-button","ion-ripple-effect","ion-text"].forEach((d=>{switch(d){case"amwal-checkout-button":customElements.get(t(d))||customElements.define(t(d),Zd);break;case"amwal-installments-timeline":customElements.get(t(d))||a();break;case"ion-button":customElements.get(t(d))||$();break;case"ion-ripple-effect":customElements.get(t(d))||s();break;case"ion-text":customElements.get(t(d))||u()}}))};export{qd as AmwalCheckoutButton,Kd as defineCustomElement}
|
|
1
|
+
import { p as proxyCustomElement, H, c as createEvent, h } from './p-ec0e3f3f.js';
|
|
2
|
+
import { T as TranslationUtils } from './p-99e447f9.js';
|
|
3
|
+
import { c as createCommonjsModule, a as commonjsGlobal } from './p-112455b1.js';
|
|
4
|
+
import { m as modalController } from './p-5441c730.js';
|
|
5
|
+
import { d as defineCustomElement$5 } from './p-fe463a42.js';
|
|
6
|
+
import { d as defineCustomElement$4 } from './p-2fc99fef.js';
|
|
7
|
+
import { d as defineCustomElement$3 } from './p-51c44f42.js';
|
|
8
|
+
import { d as defineCustomElement$2 } from './p-cebc113f.js';
|
|
9
|
+
|
|
10
|
+
var uaParser_pack = createCommonjsModule(function (module, exports) {
|
|
11
|
+
/* UAParser.js v2.0.7
|
|
12
|
+
Copyright © 2012-2025 Faisal Salman <f@faisalman.com>
|
|
13
|
+
AGPLv3 License */
|
|
14
|
+
((i,c)=>{function A(i){for(var e={},t=0;t<i.length;t++)e[i[t].toUpperCase()]=i[t];return e}function B(i){return Ii(i)?Ui(/[^\d\.]/g,i).split(".")[0]:c}function H(i,e){if(i&&e)for(var t,o,r,a,s,n=0;n<e.length&&!a;){for(var w=e[n],b=e[n+1],d=t=0;d<w.length&&!a&&w[d];)if(a=w[d++].exec(i))for(o=0;o<b.length;o++)s=a[++t],typeof(r=b[o])===l.OBJECT&&0<r.length?2===r.length?typeof r[1]==l.FUNCTION?this[r[0]]=r[1].call(this,s):this[r[0]]=r[1]:3<=r.length&&(typeof r[1]!==l.FUNCTION||r[1].exec&&r[1].test?3==r.length?this[r[0]]=s?s.replace(r[1],r[2]):c:4==r.length?this[r[0]]=s?r[3].call(this,s.replace(r[1],r[2])):c:4<r.length&&(this[r[0]]=s?r[3].apply(this,[s.replace(r[1],r[2])].concat(r.slice(4))):c):3<r.length?this[r[0]]=s?r[1].apply(this,r.slice(2)):c:this[r[0]]=s?r[1].call(this,s,r[2]):c):this[r]=s||c;n+=2;}}function p(i,e){for(var t in e)if(typeof e[t]===l.OBJECT&&0<e[t].length){for(var o=0;o<e[t].length;o++)if(Si(e[t][o],i))return "?"===t?c:t}else if(Si(e[t],i))return "?"===t?c:t;return e.hasOwnProperty("*")?e["*"]:i}function M(e,i){var t=Bi.init[i],o=Bi.isIgnore[i]||0,r=Bi.isIgnoreRgx[i]||0,a=Bi.toString[i]||0;function s(){D.call(this,t);}return s.prototype.getItem=function(){return e},s.prototype.withClientHints=function(){return _?_.getHighEntropyValues(oi).then(function(i){return e.setCH(new Hi(i,!1)).parseCH().get()}):e.parseCH().get()},s.prototype.withFeatureCheck=function(){return e.detectFeature().get()},i!=v&&(s.prototype.is=function(i){var e,t=!1;for(e in this)if(this.hasOwnProperty(e)&&!Si(o,e)&&q(r?Ui(r,this[e]):this[e])==q(r?Ui(r,i):i)){if(t=!0,i!=l.UNDEFINED)break}else if(i==l.UNDEFINED&&t){t=!t;break}return t},s.prototype.toString=function(){var i,e=d;for(i in a)typeof this[a[i]]!==l.UNDEFINED&&(e+=(e?" ":d)+this[a[i]]);return e||l.UNDEFINED}),s.prototype.then=function(i){function e(){for(var i in t)t.hasOwnProperty(i)&&(this[i]=t[i]);}var t=this,o=(e.prototype={is:s.prototype.is,toString:s.prototype.toString,withClientHints:s.prototype.withClientHints,withFeatureCheck:s.prototype.withFeatureCheck},new e);return i(o),o},new s}var j="user-agent",d="",l={FUNCTION:"function",OBJECT:"object",STRING:"string",UNDEFINED:"undefined"},u="browser",h="cpu",m="device",f="engine",g="os",v="result",k="name",x="type",y="vendor",C="version",N="architecture",R="major",E="model",V="console",S="mobile",t="tablet",e="smarttv",o="wearable",P="xr",G="embedded",r="inapp",L="brands",T="formFactors",W="fullVersionList",I="platform",$="platformVersion",J="bitness",a="sec-ch-ua",X=a+"-full-version-list",Y=a+"-arch",Z=a+"-"+J,Q=a+"-form-factors",K=a+"-"+S,ii=a+"-"+E,ei=a+"-"+I,ti=ei+"-version",oi=[L,W,S,E,I,$,N,T,J],ri="Amazon",s="Apple",ai="ASUS",si="BlackBerry",n="Google",ni="Huawei",wi="Lenovo",bi="Honor",di="LG",li="Microsoft",ci="Motorola",pi="OnePlus",ui="OPPO",hi="Samsung",mi="Sony",fi="Xiaomi",gi="Zebra",vi="Chromium",w="Chromecast",ki="Edge",xi="Firefox",b="Opera",yi="Facebook",O="Mobile ",Ci=" Browser",Ni="Windows",Ei=typeof i!==l.UNDEFINED,U=Ei&&i.navigator?i.navigator:c,_=U&&U.userAgentData?U.userAgentData:c,Si=function(i,e){if(typeof i===l.OBJECT&&0<i.length){for(var t in i)if(q(e)==q(i[t]))return !0;return !1}return !!Ii(i)&&q(e)==q(i)},Ti=function(i,e){for(var t in i)return /^(browser|cpu|device|engine|os)$/.test(t)||!!e&&Ti(i[t])},Ii=function(i){return typeof i===l.STRING},Oi=function(i){if(!i)return c;for(var e,t=[],o=Ui(/\\?\"/g,i).split(","),r=0;r<o.length;r++)-1<o[r].indexOf(";")?(e=qi(o[r]).split(";v="),t[r]={brand:e[0],version:e[1]}):t[r]=qi(o[r]);return t},q=function(i){return Ii(i)?i.toLowerCase():i},D=function(i){for(var e in i)i.hasOwnProperty(e)&&(typeof(e=i[e])==l.OBJECT&&2==e.length?this[e[0]]=e[1]:this[e]=c);return this},Ui=function(i,e){return Ii(e)?e.replace(i,d):e},_i=function(i){return Ui(/\\?\"/g,i)},qi=function(i,e){return i=Ui(/^\s\s*/,String(i)),typeof e===l.UNDEFINED?i:i.substring(0,e)},Di={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2",8.1:"6.3",10:["6.4","10.0"],NT:""},Fi={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":c},zi={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},Ai={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[C,[k,O+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[C,[k,ki+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[C,[k,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[k,C],[/opios[\/ ]+([\w\.]+)/i],[C,[k,b+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[C,[k,b+" GX"]],[/\bopr\/([\w\.]+)/i],[C,[k,b]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[C,[k,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[C,[k,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser|palemoon)\/([-\w\.]+)/i,/(heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[k,C],[/quark(?:pc)?\/([-\w\.]+)/i],[C,[k,"Quark"]],[/\bddg\/([\w\.]+)/i],[C,[k,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[C,[k,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[C,[k,"WeChat"]],[/konqueror\/([\w\.]+)/i],[C,[k,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[C,[k,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[C,[k,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[C,[k,"Smart "+wi+Ci]],[/(avast|avg)\/([\w\.]+)/i],[[k,/(.+)/,"$1 Secure"+Ci],C],[/\bfocus\/([\w\.]+)/i],[C,[k,xi+" Focus"]],[/\bopt\/([\w\.]+)/i],[C,[k,b+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[C,[k,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[C,[k,"Dolphin"]],[/coast\/([\w\.]+)/i],[C,[k,b+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[C,[k,"MIUI"+Ci]],[/fxios\/([\w\.-]+)/i],[C,[k,O+xi]],[/\bqihoobrowser\/?([\w\.]*)/i],[C,[k,"360"]],[/\b(qq)\/([\w\.]+)/i],[[k,/(.+)/,"$1Browser"],C],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[k,/(.+)/,"$1"+Ci],C],[/samsungbrowser\/([\w\.]+)/i],[C,[k,hi+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[C,[k,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[k,"Sogou Mobile"],C],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[k,C],[/(lbbrowser|rekonq|steam(?= (clie|tenf|gameo)))/i],[k],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[C,k],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[k,yi],C,[x,r]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[k,C,[x,r]],[/\bgsa\/([\w\.]+) .*safari\//i],[C,[k,"GSA"],[x,r]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[C,[k,"TikTok"],[x,r]],[/\[(linkedin)app\]/i],[k,[x,r]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[k,/(.+)/,"Zalo"],C,[x,r]],[/(chromium)[\/ ]([-\w\.]+)/i],[k,C],[/headlesschrome(?:\/([\w\.]+)| )/i],[C,[k,"Chrome Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[C,[k,ki+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[k,"Chrome WebView"],C],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[C,[k,"Android"+Ci]],[/chrome\/([\w\.]+) mobile/i],[C,[k,O+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[k,C],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[C,[k,O+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[k,O+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[C,k],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[k,[C,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[k,C],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[k,O+xi],C],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[k,"Netscape"],C],[/(wolvic|librewolf)\/([\w\.]+)/i],[k,C],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[C,[k,xi+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[k,[C,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[k,[C,/[^\d\.]+./,d]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[N,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[N,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[N,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[N,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[N,"arm"]],[/ sun4\w[;\)]/i],[[N,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[N,/ower/,d,q]],[/mc680.0/i],[[N,"68k"]],[/winnt.+\[axp/i],[[N,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[E,[y,hi],[x,t]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[E,[y,hi],[x,S]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[E,[y,s],[x,S]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[E,[y,s],[x,t]],[/(macintosh);/i],[E,[y,s]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[E,[y,"Sharp"],[x,S]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[E,[y,bi],[x,t]],[/honor([-\w ]+)[;\)]/i],[E,[y,bi],[x,S]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[E,[y,ni],[x,t]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[E,[y,ni],[x,S]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[E,/_/g," "],[y,fi],[x,t]],[/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[E,/_/g," "],[y,fi],[x,S]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[E,[y,pi],[x,S]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[E,[y,ui],[x,S]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[E,[y,p,{OnePlus:["203","304","403","404","413","415"],"*":ui}],[x,t]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[E,[y,"BLU"],[x,S]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[E,[y,"Vivo"],[x,S]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[E,[y,"Realme"],[x,S]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[E,[y,wi],[x,t]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[E,[y,wi],[x,S]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[E,[y,ci],[x,S]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[E,[y,ci],[x,t]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[E,[y,di],[x,t]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[E,[y,di],[x,S]],[/(nokia) (t[12][01])/i],[y,E,[x,t]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[E,/_/g," "],[x,S],[y,"Nokia"]],[/(pixel (c|tablet))\b/i],[E,[y,n],[x,t]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[E,[y,n],[x,S]],[/(google) (pixelbook( go)?)/i],[y,E],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[E,[y,mi],[x,S]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[E,"Xperia Tablet"],[y,mi],[x,t]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[E,[y,ri],[x,t]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[E,/(.+)/g,"Fire Phone $1"],[y,ri],[x,S]],[/(playbook);[-\w\),; ]+(rim)/i],[E,y,[x,t]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[E,[y,si],[x,S]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[E,[y,ai],[x,t]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[E,[y,ai],[x,S]],[/(nexus 9)/i],[E,[y,"HTC"],[x,t]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[y,[E,/_/g," "],[x,S]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[E,[y,"TCL"],[x,t]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[E,[y,"TCL"],[x,S]],[/(itel) ((\w+))/i],[[y,q],E,[x,p,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[E,[y,"Acer"],[x,t]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[E,[y,"Meizu"],[x,S]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[E,[y,"Ulefone"],[x,S]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[E,[y,"Energizer"],[x,S]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[E,[y,"Cat"],[x,S]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[E,[y,"Smartfren"],[x,S]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[E,[y,"Nothing"],[x,S]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[E,[y,"Archos"],[x,t]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[E,[y,"Archos"],[x,S]],[/; (n159v)/i],[E,[y,"HMD"],[x,S]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[y,E,[x,t]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[y,E,[x,S]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[y,E,[x,t]],[/(surface duo)/i],[E,[y,li],[x,t]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[E,[y,"Fairphone"],[x,S]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[E,[y,"Nvidia"],[x,t]],[/(sprint) (\w+)/i],[y,E,[x,S]],[/(kin\.[onetw]{3})/i],[[E,/\./g," "],[y,li],[x,S]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[E,[y,gi],[x,t]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[E,[y,gi],[x,S]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[y,[x,e]],[/hbbtv.+maple;(\d+)/i],[[E,/^/,"SmartTV"],[y,hi],[x,e]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[y,E,[x,e]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[y,di],[x,e]],[/(apple) ?tv/i],[y,[E,s+" TV"],[x,e]],[/crkey.*devicetype\/chromecast/i],[[E,w+" Third Generation"],[y,n],[x,e]],[/crkey.*devicetype\/([^/]*)/i],[[E,/^/,"Chromecast "],[y,n],[x,e]],[/fuchsia.*crkey/i],[[E,w+" Nest Hub"],[y,n],[x,e]],[/crkey/i],[[E,w],[y,n],[x,e]],[/(portaltv)/i],[E,[y,yi],[x,e]],[/droid.+aft(\w+)( bui|\))/i],[E,[y,ri],[x,e]],[/(shield \w+ tv)/i],[E,[y,"Nvidia"],[x,e]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[E,[y,"Sharp"],[x,e]],[/(bravia[\w ]+)( bui|\))/i],[E,[y,mi],[x,e]],[/(mi(tv|box)-?\w+) bui/i],[E,[y,fi],[x,e]],[/Hbbtv.*(technisat) (.*);/i],[y,E,[x,e]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[y,/.+\/(\w+)/,"$1",p,{LG:"lge"}],[E,qi],[x,e]],[/(playstation \w+)/i],[E,[y,mi],[x,V]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[E,[y,li],[x,V]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[y,p,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],E,[x,V]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[E,[y,hi],[x,o]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[y,E,[x,o]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[E,[y,ui],[x,o]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[E,[y,s],[x,o]],[/(opwwe\d{3})/i],[E,[y,pi],[x,o]],[/(moto 360)/i],[E,[y,ci],[x,o]],[/(smartwatch 3)/i],[E,[y,mi],[x,o]],[/(g watch r)/i],[E,[y,di],[x,o]],[/droid.+; (wt63?0{2,3})\)/i],[E,[y,gi],[x,o]],[/droid.+; (glass) \d/i],[E,[y,n],[x,P]],[/(pico) ([\w ]+) os\d/i],[y,E,[x,P]],[/(quest( \d| pro)?s?).+vr/i],[E,[y,yi],[x,P]],[/mobile vr; rv.+firefox/i],[[x,P]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[y,[x,G]],[/(aeobc)\b/i],[E,[y,ri],[x,G]],[/(homepod).+mac os/i],[E,[y,s],[x,G]],[/windows iot/i],[[x,G]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[E,[x,e]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[x,e]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[E,[x,p,{mobile:"Mobile",xr:"VR","*":t}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[x,t]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[x,S]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[E,[y,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[C,[k,ki+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[k,C],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[C,[k,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[k,C],[/ladybird\//i],[[k,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[C,k]],os:[[/(windows nt) (6\.[23]); arm/i],[[k,/N/,"R"],[C,p,Di]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[k,C],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[C,/(;|\))/g,"",p,Di],[k,Ni]],[/(windows ce)\/?([\d\.]*)/i],[k,C],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,/\btvos ?([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[C,/_/g,"."],[k,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[k,"macOS"],[C,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[C,[k,w+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[C,[k,w+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[C,[k,w+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[C,[k,w+" Linux"]],[/crkey\/([\d\.]+)/i],[C,[k,w]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[C,k],[/(ubuntu) ([\w\.]+) like android/i],[[k,/(.+)/,"$1 Touch"],C],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[k,C],[/\(bb(10);/i],[C,[k,si]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[C,[k,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[C,[k,xi+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[C,[k,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[C,p,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[k,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[C,[k,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[k,"Chrome OS"],C],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[k,C],[/(sunos) ?([\d\.]*)/i],[[k,"Solaris"],C],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[k,C]]},Bi=(b={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}},D.call(b.init,[[u,[k,C,R,x]],[h,[N]],[m,[x,E,y]],[f,[k,C]],[g,[k,C]]]),D.call(b.isIgnore,[[u,[C,R]],[f,[C]],[g,[C]]]),D.call(b.isIgnoreRgx,[[u,/ ?browser$/i],[g,/ ?os$/i]]),D.call(b.toString,[[u,[k,C]],[h,[N]],[m,[y,E]],[f,[k,C]],[g,[k,C]]]),b);function Hi(i,e){if(i=i||{},D.call(this,oi),e)D.call(this,[[L,Oi(i[a])],[W,Oi(i[X])],[S,/\?1/.test(i[K])],[E,_i(i[ii])],[I,_i(i[ei])],[$,_i(i[ti])],[N,_i(i[Y])],[T,Oi(i[Q])],[J,_i(i[Z])]]);else for(var t in i)this.hasOwnProperty(t)&&typeof i[t]!==l.UNDEFINED&&(this[t]=i[t]);}function F(i,e,t,o){return D.call(this,[["itemType",i],["ua",e],["uaCH",o],["rgxMap",t],["data",M(this,i)]]),this}function z(i,e,t){if(typeof i===l.OBJECT?(e=Ti(i,!0)?(typeof e===l.OBJECT&&(t=e),i):(t=i,c),i=c):typeof i!==l.STRING||Ti(e,!0)||(t=e,e=c),t)if(typeof t.append===l.FUNCTION){var o={};t.forEach(function(i,e){o[String(e).toLowerCase()]=i;}),t=o;}else {var r,a={};for(r in t)t.hasOwnProperty(r)&&(a[String(r).toLowerCase()]=t[r]);t=a;}var s,n,w,b;return this instanceof z?(s=typeof i===l.STRING?i:t&&t[j]?t[j]:U&&U.userAgent?U.userAgent:d,n=new Hi(t,!0),w=e?((i,e)=>{var t,o={},r=e;if(!Ti(e))for(var a in r={},e)for(var s in e[a])r[s]=e[a][s].concat(r[s]||[]);for(t in i)o[t]=r[t]&&r[t].length%2==0?r[t].concat(i[t]):i[t];return o})(Ai,e):Ai,D.call(this,[["getBrowser",(b=function(i){return i==v?function(){return new F(i,s,w,n).set("ua",s).set(u,this.getBrowser()).set(h,this.getCPU()).set(m,this.getDevice()).set(f,this.getEngine()).set(g,this.getOS()).get()}:function(){return new F(i,s,w[i],n).parseUA().get()}})(u)],["getCPU",b(h)],["getDevice",b(m)],["getEngine",b(f)],["getOS",b(g)],["getResult",b(v)],["getUA",function(){return s}],["setUA",function(i){return Ii(i)&&(s=qi(i,500)),this}]]).setUA(s),this):new z(i,e,t).getResult()}F.prototype.get=function(i){return i?this.data.hasOwnProperty(i)?this.data[i]:c:this.data},F.prototype.set=function(i,e){return this.data[i]=e,this},F.prototype.setCH=function(i){return this.uaCH=i,this},F.prototype.detectFeature=function(){if(U&&U.userAgent==this.ua)switch(this.itemType){case u:U.brave&&typeof U.brave.isBrave==l.FUNCTION&&this.set(k,"Brave");break;case m:!this.get(x)&&_&&_[S]&&this.set(x,S),"Macintosh"==this.get(E)&&U&&typeof U.standalone!==l.UNDEFINED&&U.maxTouchPoints&&2<U.maxTouchPoints&&this.set(E,"iPad").set(x,t);break;case g:!this.get(k)&&_&&_[I]&&this.set(k,_[I]);break;case v:var e=this.data,i=function(i){return e[i].getItem().detectFeature().get()};this.set(u,i(u)).set(h,i(h)).set(m,i(m)).set(f,i(f)).set(g,i(g));}return this},F.prototype.parseUA=function(){switch(this.itemType!=v&&H.call(this.data,this.ua,this.rgxMap),this.itemType){case u:this.set(R,B(this.get(C)));break;case g:var i;"iOS"==this.get(k)&&"18.6"==this.get(C)&&(i=/\) Version\/([\d\.]+)/.exec(this.ua))&&26<=parseInt(i[1].substring(0,2),10)&&this.set(C,i[1]);}return this},F.prototype.parseCH=function(){var i,e=this.uaCH,t=this.rgxMap;switch(this.itemType){case u:case f:var o,r=e[W]||e[L];if(r)for(var a=0;a<r.length;a++){var s=r[a].brand||r[a],n=r[a].version;this.itemType==u&&!/not.a.brand/i.test(s)&&(!o||/Chrom/.test(o)&&s!=vi||o==ki&&/WebView2/.test(s))&&(s=p(s,zi),(o=this.get(k))&&!/Chrom/.test(o)&&/Chrom/.test(s)||this.set(k,s).set(C,n).set(R,B(n)),o=s),this.itemType==f&&s==vi&&this.set(C,n);}break;case h:var w=e[N];w&&("64"==e[J]&&(w+="64"),H.call(this.data,w+";",t));break;case m:if(e[S]&&this.set(x,S),e[E]&&(this.set(E,e[E]),this.get(x)&&this.get(y)||(H.call(w={},"droid 9; "+e[E]+")",t),!this.get(x)&&w.type&&this.set(x,w.type),!this.get(y)&&w.vendor&&this.set(y,w.vendor))),e[T]){if("string"!=typeof e[T])for(var b=0;!i&&b<e[T].length;)i=p(e[T][b++],Fi);else i=p(e[T],Fi);this.set(x,i);}break;case g:var d,w=e[I];w&&(d=e[$],w==Ni&&(d=13<=parseInt(B(d),10)?"11":"10"),this.set(k,w).set(C,d)),this.get(k)==Ni&&"Xbox"==e[E]&&this.set(k,"Xbox").set(C,c);break;case v:var l=this.data,w=function(i){return l[i].getItem().setCH(e).parseCH().get()};this.set(u,w(u)).set(h,w(h)).set(m,w(m)).set(f,w(f)).set(g,w(g));}return this},z.VERSION="2.0.7",z.BROWSER=A([k,C,R,x]),z.CPU=A([N]),z.DEVICE=A([E,y,x,V,S,e,t,o,G]),z.ENGINE=z.OS=A([k,C]),(exports=module.exports?module.exports=z:exports).UAParser=z;var Mi,ji=Ei&&(i.jQuery||i.Zepto);ji&&!ji.ua&&(Mi=new z,ji.ua=Mi.getResult(),ji.ua.get=function(){return Mi.getUA()},ji.ua.set=function(i){Mi.setUA(i);var e,t=Mi.getResult();for(e in t)ji.ua[e]=t[e];});})("object"==typeof window?window:commonjsGlobal);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const applePayLogoSvg = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIxLjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9InRpbnkiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIgoJIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNTEyIDIxMC4yIiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHBhdGggaWQ9IlhNTElEXzM0XyIgZmlsbD0id2hpdGUiIGQ9Ik05My42LDI3LjFDODcuNiwzNC4yLDc4LDM5LjgsNjguNCwzOWMtMS4yLTkuNiwzLjUtMTkuOCw5LTI2LjFjNi03LjMsMTYuNS0xMi41LDI1LTEyLjkKCUMxMDMuNCwxMCw5OS41LDE5LjgsOTMuNiwyNy4xIE0xMDIuMyw0MC45Yy0xMy45LTAuOC0yNS44LDcuOS0zMi40LDcuOWMtNi43LDAtMTYuOC03LjUtMjcuOC03LjNjLTE0LjMsMC4yLTI3LjYsOC4zLTM0LjksMjEuMgoJYy0xNSwyNS44LTMuOSw2NCwxMC42LDg1YzcuMSwxMC40LDE1LjYsMjEuOCwyNi44LDIxLjRjMTAuNi0wLjQsMTQuOC02LjksMjcuNi02LjljMTIuOSwwLDE2LjYsNi45LDI3LjgsNi43CgljMTEuNi0wLjIsMTguOS0xMC40LDI2LTIwLjhjOC4xLTExLjgsMTEuNC0yMy4zLDExLjYtMjMuOWMtMC4yLTAuMi0yMi40LTguNy0yMi42LTM0LjNjLTAuMi0yMS40LDE3LjUtMzEuNiwxOC4zLTMyLjIKCUMxMjMuMyw0Mi45LDEwNy43LDQxLjMsMTAyLjMsNDAuOSBNMTgyLjYsMTEuOXYxNTUuOWgyNC4ydi01My4zaDMzLjVjMzAuNiwwLDUyLjEtMjEsNTIuMS01MS40YzAtMzAuNC0yMS4xLTUxLjItNTEuMy01MS4ySDE4Mi42egoJIE0yMDYuOCwzMi4zaDI3LjljMjEsMCwzMywxMS4yLDMzLDMwLjljMCwxOS43LTEyLDMxLTMzLjEsMzFoLTI3LjhWMzIuM3ogTTMzNi42LDE2OWMxNS4yLDAsMjkuMy03LjcsMzUuNy0xOS45aDAuNXYxOC43aDIyLjRWOTAuMgoJYzAtMjIuNS0xOC0zNy00NS43LTM3Yy0yNS43LDAtNDQuNywxNC43LTQ1LjQsMzQuOWgyMS44YzEuOC05LjYsMTAuNy0xNS45LDIyLjktMTUuOWMxNC44LDAsMjMuMSw2LjksMjMuMSwxOS42djguNmwtMzAuMiwxLjgKCWMtMjguMSwxLjctNDMuMywxMy4yLTQzLjMsMzMuMkMyOTguNCwxNTUuNiwzMTQuMSwxNjksMzM2LjYsMTY5eiBNMzQzLjEsMTUwLjVjLTEyLjksMC0yMS4xLTYuMi0yMS4xLTE1LjdjMC05LjgsNy45LTE1LjUsMjMtMTYuNAoJbDI2LjktMS43djguOEMzNzEuOSwxNDAuMSwzNTkuNSwxNTAuNSwzNDMuMSwxNTAuNXogTTQyNS4xLDIxMC4yYzIzLjYsMCwzNC43LTksNDQuNC0zNi4zTDUxMiw1NC43aC0yNC42bC0yOC41LDkyLjFoLTAuNQoJbC0yOC41LTkyLjFoLTI1LjNsNDEsMTEzLjVsLTIuMiw2LjljLTMuNywxMS43LTkuNywxNi4yLTIwLjQsMTYuMmMtMS45LDAtNS42LTAuMi03LjEtMC40djE4LjdDNDE3LjMsMjEwLDQyMy4zLDIxMC4yLDQyNS4xLDIxMC4yegoJIi8+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=';
|
|
18
|
+
|
|
19
|
+
const cardLogoSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTkiIGhlaWdodD0iNjMiIHZpZXdCb3g9IjAgMCA5OSA2MyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTk5IDUuOTA2MjVWNTcuMDkzOEM5OSA1OC42Njg4IDk4LjI1NzUgNjAuMDQ2OSA5Ni43NzI1IDYxLjIyODFDOTUuMjg3NSA2Mi40MDk0IDkzLjU1NSA2MyA5MS41NzUgNjNINy40MjVDNS40NDUgNjMgMy43MTI1IDYyLjQwOTQgMi4yMjc1IDYxLjIyODFDMC43NDI1IDYwLjA0NjkgMCA1OC42Njg4IDAgNTcuMDkzOFY1LjkwNjI1QzAgNC4zMzEyNSAwLjc0MjUgMi45NTMxMiAyLjIyNzUgMS43NzE4N0MzLjcxMjUgMC41OTA2MjQgNS40NDUgMCA3LjQyNSAwSDkxLjU3NUM5My41NTUgMCA5NS4yODc1IDAuNTkwNjI0IDk2Ljc3MjUgMS43NzE4N0M5OC4yNTc1IDIuOTUzMTIgOTkgNC4zMzEyNSA5OSA1LjkwNjI1Wk03LjQyNSAxNi42MzU5SDkxLjU3NVY1LjkwNjI1SDcuNDI1VjE2LjYzNTlaTTcuNDI1IDI5LjMzNDRWNTcuMDkzOEg5MS41NzVWMjkuMzM0NEg3LjQyNVoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=';
|
|
20
|
+
|
|
21
|
+
// This file is a workaround for a bug in web browsers' "native"
|
|
22
|
+
// ES6 importing system which is uncapable of importing "*.json" files.
|
|
23
|
+
// https://github.com/catamphetamine/libphonenumber-js/issues/239
|
|
24
|
+
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(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],"AU":["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],"AW":["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],"AX":["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],"AZ":["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],"BA":["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],"BB":["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],"BD":["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],"BE":["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],"BF":["226","00","(?:[025-7]\\d|44)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],"BG":["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],"BH":["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],"BI":["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],"BJ":["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],"BL":["590","00","(?: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-6])\\d{4}"]]],"BM":["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],"BN":["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],"BO":["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],"BQ":["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],"BR":["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],"BS":["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],"BT":["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],"BW":["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],"BY":["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],"BZ":["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],"CA":["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|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-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],"CD":["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],"CF":["236","00","(?:[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{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],"CM":["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],"CN":["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],"CO":["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],"CR":["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],"CU":["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],"CV":["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],"CW":["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],"CX":["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],"CY":["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],"CZ":["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],"DE":["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],"DJ":["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],"DK":["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],"DM":["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],"DO":["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],"DZ":["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],"EC":["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],"EE":["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],"EG":["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],"EH":["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"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|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],"GD":["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],"GE":["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],"GF":["594","00","(?:[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|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],"GH":["233","00","(?:[235]\\d{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-6])\\d{4}"]]],"GQ":["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],"GR":["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],"GT":["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],"GU":["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],"GW":["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],"GY":["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],"HK":["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],"HN":["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],"HR":["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],"HT":["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],"HU":["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],"ID":["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],"IE":["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],"IL":["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],"IM":["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],"IN":["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689])\\d|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[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,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],"JE":["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],"JM":["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],"JO":["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],"JP":["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],"KE":["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],"KG":["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],"KH":["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],"KI":["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],"KM":["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],"KN":["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],"KP":["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],"KR":["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],"KW":["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],"KY":["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],"KZ":["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33622|7",0,"8~10"],"LA":["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],"LB":["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],"LC":["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],"LI":["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],"LK":["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],"LR":["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],"LS":["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],"LT":["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],"LU":["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["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|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],"LY":["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],"MA":["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:[19]|2[2-46-9]|3[3-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(?:(?:18|4[0679]|5[03])\\d|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]))\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],"MC":["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],"MD":["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],"ME":["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],"MF":["590","00","(?: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-6])\\d{4}"]]],"MG":["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],"MH":["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],"MK":["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],"ML":["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],"MM":["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],"MN":["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[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","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],"NI":["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],"NL":["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],"NO":["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],"NP":["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],"NR":["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],"NU":["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],"NZ":["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],"OM":["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],"PA":["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],"PE":["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],"PF":["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],"PG":["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],"PH":["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],"PK":["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],"PL":["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?: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[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],"RE":["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],"RO":["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],"RS":["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],"RU":["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,0,[["336(?:[013-9]\\d|2[013-9])\\d{5}|(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15-7]|6[0-35-79]|7[1-37-9]))\\d{7}",[10]],["9\\d{9}",[10]],["8(?:0[04]|108\\d{3})\\d{7}"],["80[39]\\d{7}",[10]],["808\\d{7}",[10]]],"8~10"],"RW":["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],"SA":["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],"SB":["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],"SC":["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],"SD":["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],"SE":["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],"SG":["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],"SH":["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],"SI":["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],"SJ":["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],"SK":["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],"SL":["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],"SM":["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],"SN":["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],"SO":["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0"],"SR":["597","00","(?:[2-5]|[6-8]\\d|90)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],"SS":["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],"ST":["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],"SV":["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],"SX":["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],"SY":["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],"SZ":["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],"TA":["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],"TC":["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],"TD":["235","00|16","(?:22|30|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],"TG":["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],"TH":["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],"TJ":["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],"TK":["690","00","[2-47]\\d{3,6}",[4,5,6,7]],"TL":["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],"TM":["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],"TN":["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],"TO":["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],"TR":["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-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)\\d{4}|(?:2742|305[3-9])\\d{6}|(?:472|983)[2-47-9]\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[013-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-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|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}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],"UZ":["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],"VA":["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],"VC":["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],"VE":["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],"VG":["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],"VI":["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],"VN":["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],"VU":["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],"WF":["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],"WS":["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],"XK":["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],"YE":["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],"YT":["262","00","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|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],"ZW":["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},"nonGeographic":{"800":["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],"808":["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],"870":["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],"878":["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],"881":["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],"882":["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|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}"]]]}};
|
|
25
|
+
|
|
26
|
+
// Importing from a ".js" file is a workaround for Node.js "ES Modules"
|
|
27
|
+
|
|
28
|
+
function withMetadataArgument(func, _arguments) {
|
|
29
|
+
var args = Array.prototype.slice.call(_arguments);
|
|
30
|
+
args.push(metadata);
|
|
31
|
+
return func.apply(this, args)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Copy-pasted from:
|
|
35
|
+
// https://github.com/substack/semver-compare/blob/master/index.js
|
|
36
|
+
//
|
|
37
|
+
// Inlining this function because some users reported issues with
|
|
38
|
+
// importing from `semver-compare` in a browser with ES6 "native" modules.
|
|
39
|
+
//
|
|
40
|
+
// Fixes `semver-compare` not being able to compare versions with alpha/beta/etc "tags".
|
|
41
|
+
// https://github.com/catamphetamine/libphonenumber-js/issues/381
|
|
42
|
+
function compare (a, b) {
|
|
43
|
+
a = a.split('-');
|
|
44
|
+
b = b.split('-');
|
|
45
|
+
var pa = a[0].split('.');
|
|
46
|
+
var pb = b[0].split('.');
|
|
47
|
+
for (var i = 0; i < 3; i++) {
|
|
48
|
+
var na = Number(pa[i]);
|
|
49
|
+
var nb = Number(pb[i]);
|
|
50
|
+
if (na > nb) return 1;
|
|
51
|
+
if (nb > na) return -1;
|
|
52
|
+
if (!isNaN(na) && isNaN(nb)) return 1;
|
|
53
|
+
if (isNaN(na) && !isNaN(nb)) return -1;
|
|
54
|
+
}
|
|
55
|
+
if (a[1] && b[1]) {
|
|
56
|
+
return a[1] > b[1] ? 1 : a[1] < b[1] ? -1 : 0;
|
|
57
|
+
}
|
|
58
|
+
return !a[1] && b[1] ? 1 : a[1] && !b[1] ? -1 : 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
var objectConstructor = {}.constructor;
|
|
62
|
+
function isObject(object) {
|
|
63
|
+
return object !== undefined && object !== null && object.constructor === objectConstructor;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function _typeof$5(o) { "@babel/helpers - typeof"; return _typeof$5 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$5(o); }
|
|
67
|
+
function _classCallCheck$2(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
68
|
+
function _defineProperties$2(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$5(o.key), o); } }
|
|
69
|
+
function _createClass$2(e, r, t) { return r && _defineProperties$2(e.prototype, r), t && _defineProperties$2(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
70
|
+
function _toPropertyKey$5(t) { var i = _toPrimitive$5(t, "string"); return "symbol" == _typeof$5(i) ? i : i + ""; }
|
|
71
|
+
function _toPrimitive$5(t, r) { if ("object" != _typeof$5(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$5(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
72
|
+
|
|
73
|
+
// Added "idd_prefix" and "default_idd_prefix".
|
|
74
|
+
var V3 = '1.2.0';
|
|
75
|
+
|
|
76
|
+
// Moved `001` country code to "nonGeographic" section of metadata.
|
|
77
|
+
var V4 = '1.7.35';
|
|
78
|
+
var DEFAULT_EXT_PREFIX = ' ext. ';
|
|
79
|
+
var CALLING_CODE_REG_EXP = /^\d+$/;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* See: https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md
|
|
83
|
+
*/
|
|
84
|
+
var Metadata = /*#__PURE__*/function () {
|
|
85
|
+
function Metadata(metadata) {
|
|
86
|
+
_classCallCheck$2(this, Metadata);
|
|
87
|
+
validateMetadata(metadata);
|
|
88
|
+
this.metadata = metadata;
|
|
89
|
+
setVersion.call(this, metadata);
|
|
90
|
+
}
|
|
91
|
+
return _createClass$2(Metadata, [{
|
|
92
|
+
key: "getCountries",
|
|
93
|
+
value: function getCountries() {
|
|
94
|
+
return Object.keys(this.metadata.countries).filter(function (_) {
|
|
95
|
+
return _ !== '001';
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}, {
|
|
99
|
+
key: "getCountryMetadata",
|
|
100
|
+
value: function getCountryMetadata(countryCode) {
|
|
101
|
+
return this.metadata.countries[countryCode];
|
|
102
|
+
}
|
|
103
|
+
}, {
|
|
104
|
+
key: "nonGeographic",
|
|
105
|
+
value: function nonGeographic() {
|
|
106
|
+
if (this.v1 || this.v2 || this.v3) return;
|
|
107
|
+
// `nonGeographical` was a typo.
|
|
108
|
+
// It's present in metadata generated from `1.7.35` to `1.7.37`.
|
|
109
|
+
// The test case could be found by searching for "nonGeographical".
|
|
110
|
+
return this.metadata.nonGeographic || this.metadata.nonGeographical;
|
|
111
|
+
}
|
|
112
|
+
}, {
|
|
113
|
+
key: "hasCountry",
|
|
114
|
+
value: function hasCountry(country) {
|
|
115
|
+
return this.getCountryMetadata(country) !== undefined;
|
|
116
|
+
}
|
|
117
|
+
}, {
|
|
118
|
+
key: "hasCallingCode",
|
|
119
|
+
value: function hasCallingCode(callingCode) {
|
|
120
|
+
if (this.getCountryCodesForCallingCode(callingCode)) {
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
123
|
+
if (this.nonGeographic()) {
|
|
124
|
+
if (this.nonGeographic()[callingCode]) {
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
} else {
|
|
128
|
+
// A hacky workaround for old custom metadata (generated before V4).
|
|
129
|
+
var countryCodes = this.countryCallingCodes()[callingCode];
|
|
130
|
+
if (countryCodes && countryCodes.length === 1 && countryCodes[0] === '001') {
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}, {
|
|
136
|
+
key: "isNonGeographicCallingCode",
|
|
137
|
+
value: function isNonGeographicCallingCode(callingCode) {
|
|
138
|
+
if (this.nonGeographic()) {
|
|
139
|
+
return this.nonGeographic()[callingCode] ? true : false;
|
|
140
|
+
} else {
|
|
141
|
+
return this.getCountryCodesForCallingCode(callingCode) ? false : true;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Deprecated.
|
|
146
|
+
}, {
|
|
147
|
+
key: "country",
|
|
148
|
+
value: function country(countryCode) {
|
|
149
|
+
return this.selectNumberingPlan(countryCode);
|
|
150
|
+
}
|
|
151
|
+
}, {
|
|
152
|
+
key: "selectNumberingPlan",
|
|
153
|
+
value: function selectNumberingPlan(countryCode, callingCode) {
|
|
154
|
+
// Supports just passing `callingCode` as the first argument.
|
|
155
|
+
if (countryCode && CALLING_CODE_REG_EXP.test(countryCode)) {
|
|
156
|
+
callingCode = countryCode;
|
|
157
|
+
countryCode = null;
|
|
158
|
+
}
|
|
159
|
+
if (countryCode && countryCode !== '001') {
|
|
160
|
+
if (!this.hasCountry(countryCode)) {
|
|
161
|
+
throw new Error("Unknown country: ".concat(countryCode));
|
|
162
|
+
}
|
|
163
|
+
this.numberingPlan = new NumberingPlan(this.getCountryMetadata(countryCode), this);
|
|
164
|
+
} else if (callingCode) {
|
|
165
|
+
if (!this.hasCallingCode(callingCode)) {
|
|
166
|
+
throw new Error("Unknown calling code: ".concat(callingCode));
|
|
167
|
+
}
|
|
168
|
+
this.numberingPlan = new NumberingPlan(this.getNumberingPlanMetadata(callingCode), this);
|
|
169
|
+
} else {
|
|
170
|
+
this.numberingPlan = undefined;
|
|
171
|
+
}
|
|
172
|
+
return this;
|
|
173
|
+
}
|
|
174
|
+
}, {
|
|
175
|
+
key: "getCountryCodesForCallingCode",
|
|
176
|
+
value: function getCountryCodesForCallingCode(callingCode) {
|
|
177
|
+
var countryCodes = this.countryCallingCodes()[callingCode];
|
|
178
|
+
if (countryCodes) {
|
|
179
|
+
// Metadata before V4 included "non-geographic entity" calling codes
|
|
180
|
+
// inside `country_calling_codes` (for example, `"881":["001"]`).
|
|
181
|
+
// Now the semantics of `country_calling_codes` has changed:
|
|
182
|
+
// it's specifically for "countries" now.
|
|
183
|
+
// Older versions of custom metadata will simply skip parsing
|
|
184
|
+
// "non-geographic entity" phone numbers with new versions
|
|
185
|
+
// of this library: it's not considered a bug,
|
|
186
|
+
// because such numbers are extremely rare,
|
|
187
|
+
// and developers extremely rarely use custom metadata.
|
|
188
|
+
if (countryCodes.length === 1 && countryCodes[0].length === 3) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
return countryCodes;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}, {
|
|
195
|
+
key: "getCountryCodeForCallingCode",
|
|
196
|
+
value: function getCountryCodeForCallingCode(callingCode) {
|
|
197
|
+
var countryCodes = this.getCountryCodesForCallingCode(callingCode);
|
|
198
|
+
if (countryCodes) {
|
|
199
|
+
return countryCodes[0];
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}, {
|
|
203
|
+
key: "getNumberingPlanMetadata",
|
|
204
|
+
value: function getNumberingPlanMetadata(callingCode) {
|
|
205
|
+
var countryCode = this.getCountryCodeForCallingCode(callingCode);
|
|
206
|
+
if (countryCode) {
|
|
207
|
+
return this.getCountryMetadata(countryCode);
|
|
208
|
+
}
|
|
209
|
+
if (this.nonGeographic()) {
|
|
210
|
+
var metadata = this.nonGeographic()[callingCode];
|
|
211
|
+
if (metadata) {
|
|
212
|
+
return metadata;
|
|
213
|
+
}
|
|
214
|
+
} else {
|
|
215
|
+
// A hacky workaround for old custom metadata (generated before V4).
|
|
216
|
+
// In that metadata, there was no concept of "non-geographic" metadata
|
|
217
|
+
// so metadata for `001` country code was stored along with other countries.
|
|
218
|
+
// The test case can be found by searching for:
|
|
219
|
+
// "should work around `nonGeographic` metadata not existing".
|
|
220
|
+
var countryCodes = this.countryCallingCodes()[callingCode];
|
|
221
|
+
if (countryCodes && countryCodes.length === 1 && countryCodes[0] === '001') {
|
|
222
|
+
return this.metadata.countries['001'];
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Deprecated.
|
|
228
|
+
}, {
|
|
229
|
+
key: "countryCallingCode",
|
|
230
|
+
value: function countryCallingCode() {
|
|
231
|
+
return this.numberingPlan.callingCode();
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// Deprecated.
|
|
235
|
+
}, {
|
|
236
|
+
key: "IDDPrefix",
|
|
237
|
+
value: function IDDPrefix() {
|
|
238
|
+
return this.numberingPlan.IDDPrefix();
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// Deprecated.
|
|
242
|
+
}, {
|
|
243
|
+
key: "defaultIDDPrefix",
|
|
244
|
+
value: function defaultIDDPrefix() {
|
|
245
|
+
return this.numberingPlan.defaultIDDPrefix();
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// Deprecated.
|
|
249
|
+
}, {
|
|
250
|
+
key: "nationalNumberPattern",
|
|
251
|
+
value: function nationalNumberPattern() {
|
|
252
|
+
return this.numberingPlan.nationalNumberPattern();
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// Deprecated.
|
|
256
|
+
}, {
|
|
257
|
+
key: "possibleLengths",
|
|
258
|
+
value: function possibleLengths() {
|
|
259
|
+
return this.numberingPlan.possibleLengths();
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// Deprecated.
|
|
263
|
+
}, {
|
|
264
|
+
key: "formats",
|
|
265
|
+
value: function formats() {
|
|
266
|
+
return this.numberingPlan.formats();
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// Deprecated.
|
|
270
|
+
}, {
|
|
271
|
+
key: "nationalPrefixForParsing",
|
|
272
|
+
value: function nationalPrefixForParsing() {
|
|
273
|
+
return this.numberingPlan.nationalPrefixForParsing();
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// Deprecated.
|
|
277
|
+
}, {
|
|
278
|
+
key: "nationalPrefixTransformRule",
|
|
279
|
+
value: function nationalPrefixTransformRule() {
|
|
280
|
+
return this.numberingPlan.nationalPrefixTransformRule();
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// Deprecated.
|
|
284
|
+
}, {
|
|
285
|
+
key: "leadingDigits",
|
|
286
|
+
value: function leadingDigits() {
|
|
287
|
+
return this.numberingPlan.leadingDigits();
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// Deprecated.
|
|
291
|
+
}, {
|
|
292
|
+
key: "hasTypes",
|
|
293
|
+
value: function hasTypes() {
|
|
294
|
+
return this.numberingPlan.hasTypes();
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// Deprecated.
|
|
298
|
+
}, {
|
|
299
|
+
key: "type",
|
|
300
|
+
value: function type(_type) {
|
|
301
|
+
return this.numberingPlan.type(_type);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// Deprecated.
|
|
305
|
+
}, {
|
|
306
|
+
key: "ext",
|
|
307
|
+
value: function ext() {
|
|
308
|
+
return this.numberingPlan.ext();
|
|
309
|
+
}
|
|
310
|
+
}, {
|
|
311
|
+
key: "countryCallingCodes",
|
|
312
|
+
value: function countryCallingCodes() {
|
|
313
|
+
if (this.v1) return this.metadata.country_phone_code_to_countries;
|
|
314
|
+
return this.metadata.country_calling_codes;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
// Deprecated.
|
|
318
|
+
}, {
|
|
319
|
+
key: "chooseCountryByCountryCallingCode",
|
|
320
|
+
value: function chooseCountryByCountryCallingCode(callingCode) {
|
|
321
|
+
return this.selectNumberingPlan(callingCode);
|
|
322
|
+
}
|
|
323
|
+
}, {
|
|
324
|
+
key: "hasSelectedNumberingPlan",
|
|
325
|
+
value: function hasSelectedNumberingPlan() {
|
|
326
|
+
return this.numberingPlan !== undefined;
|
|
327
|
+
}
|
|
328
|
+
}]);
|
|
329
|
+
}();
|
|
330
|
+
var NumberingPlan = /*#__PURE__*/function () {
|
|
331
|
+
function NumberingPlan(metadata, globalMetadataObject) {
|
|
332
|
+
_classCallCheck$2(this, NumberingPlan);
|
|
333
|
+
this.globalMetadataObject = globalMetadataObject;
|
|
334
|
+
this.metadata = metadata;
|
|
335
|
+
setVersion.call(this, globalMetadataObject.metadata);
|
|
336
|
+
}
|
|
337
|
+
return _createClass$2(NumberingPlan, [{
|
|
338
|
+
key: "callingCode",
|
|
339
|
+
value: function callingCode() {
|
|
340
|
+
return this.metadata[0];
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// Formatting information for regions which share
|
|
344
|
+
// a country calling code is contained by only one region
|
|
345
|
+
// for performance reasons. For example, for NANPA region
|
|
346
|
+
// ("North American Numbering Plan Administration",
|
|
347
|
+
// which includes USA, Canada, Cayman Islands, Bahamas, etc)
|
|
348
|
+
// it will be contained in the metadata for `US`.
|
|
349
|
+
}, {
|
|
350
|
+
key: "getDefaultCountryMetadataForRegion",
|
|
351
|
+
value: function getDefaultCountryMetadataForRegion() {
|
|
352
|
+
return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode());
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// Is always present.
|
|
356
|
+
}, {
|
|
357
|
+
key: "IDDPrefix",
|
|
358
|
+
value: function IDDPrefix() {
|
|
359
|
+
if (this.v1 || this.v2) return;
|
|
360
|
+
return this.metadata[1];
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// Is only present when a country supports multiple IDD prefixes.
|
|
364
|
+
}, {
|
|
365
|
+
key: "defaultIDDPrefix",
|
|
366
|
+
value: function defaultIDDPrefix() {
|
|
367
|
+
if (this.v1 || this.v2) return;
|
|
368
|
+
return this.metadata[12];
|
|
369
|
+
}
|
|
370
|
+
}, {
|
|
371
|
+
key: "nationalNumberPattern",
|
|
372
|
+
value: function nationalNumberPattern() {
|
|
373
|
+
if (this.v1 || this.v2) return this.metadata[1];
|
|
374
|
+
return this.metadata[2];
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
// "possible length" data is always present in Google's metadata.
|
|
378
|
+
}, {
|
|
379
|
+
key: "possibleLengths",
|
|
380
|
+
value: function possibleLengths() {
|
|
381
|
+
if (this.v1) return;
|
|
382
|
+
return this.metadata[this.v2 ? 2 : 3];
|
|
383
|
+
}
|
|
384
|
+
}, {
|
|
385
|
+
key: "_getFormats",
|
|
386
|
+
value: function _getFormats(metadata) {
|
|
387
|
+
return metadata[this.v1 ? 2 : this.v2 ? 3 : 4];
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// For countries of the same region (e.g. NANPA)
|
|
391
|
+
// formats are all stored in the "main" country for that region.
|
|
392
|
+
// E.g. "RU" and "KZ", "US" and "CA".
|
|
393
|
+
}, {
|
|
394
|
+
key: "formats",
|
|
395
|
+
value: function formats() {
|
|
396
|
+
var _this = this;
|
|
397
|
+
var formats = this._getFormats(this.metadata) || this._getFormats(this.getDefaultCountryMetadataForRegion()) || [];
|
|
398
|
+
return formats.map(function (_) {
|
|
399
|
+
return new Format(_, _this);
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
}, {
|
|
403
|
+
key: "nationalPrefix",
|
|
404
|
+
value: function nationalPrefix() {
|
|
405
|
+
return this.metadata[this.v1 ? 3 : this.v2 ? 4 : 5];
|
|
406
|
+
}
|
|
407
|
+
}, {
|
|
408
|
+
key: "_getNationalPrefixFormattingRule",
|
|
409
|
+
value: function _getNationalPrefixFormattingRule(metadata) {
|
|
410
|
+
return metadata[this.v1 ? 4 : this.v2 ? 5 : 6];
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
// For countries of the same region (e.g. NANPA)
|
|
414
|
+
// national prefix formatting rule is stored in the "main" country for that region.
|
|
415
|
+
// E.g. "RU" and "KZ", "US" and "CA".
|
|
416
|
+
}, {
|
|
417
|
+
key: "nationalPrefixFormattingRule",
|
|
418
|
+
value: function nationalPrefixFormattingRule() {
|
|
419
|
+
return this._getNationalPrefixFormattingRule(this.metadata) || this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion());
|
|
420
|
+
}
|
|
421
|
+
}, {
|
|
422
|
+
key: "_nationalPrefixForParsing",
|
|
423
|
+
value: function _nationalPrefixForParsing() {
|
|
424
|
+
return this.metadata[this.v1 ? 5 : this.v2 ? 6 : 7];
|
|
425
|
+
}
|
|
426
|
+
}, {
|
|
427
|
+
key: "nationalPrefixForParsing",
|
|
428
|
+
value: function nationalPrefixForParsing() {
|
|
429
|
+
// If `national_prefix_for_parsing` is not set explicitly,
|
|
430
|
+
// then infer it from `national_prefix` (if any)
|
|
431
|
+
return this._nationalPrefixForParsing() || this.nationalPrefix();
|
|
432
|
+
}
|
|
433
|
+
}, {
|
|
434
|
+
key: "nationalPrefixTransformRule",
|
|
435
|
+
value: function nationalPrefixTransformRule() {
|
|
436
|
+
return this.metadata[this.v1 ? 6 : this.v2 ? 7 : 8];
|
|
437
|
+
}
|
|
438
|
+
}, {
|
|
439
|
+
key: "_getNationalPrefixIsOptionalWhenFormatting",
|
|
440
|
+
value: function _getNationalPrefixIsOptionalWhenFormatting() {
|
|
441
|
+
return !!this.metadata[this.v1 ? 7 : this.v2 ? 8 : 9];
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
// For countries of the same region (e.g. NANPA)
|
|
445
|
+
// "national prefix is optional when formatting" flag is
|
|
446
|
+
// stored in the "main" country for that region.
|
|
447
|
+
// E.g. "RU" and "KZ", "US" and "CA".
|
|
448
|
+
}, {
|
|
449
|
+
key: "nationalPrefixIsOptionalWhenFormattingInNationalFormat",
|
|
450
|
+
value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() {
|
|
451
|
+
return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata) || this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion());
|
|
452
|
+
}
|
|
453
|
+
}, {
|
|
454
|
+
key: "leadingDigits",
|
|
455
|
+
value: function leadingDigits() {
|
|
456
|
+
return this.metadata[this.v1 ? 8 : this.v2 ? 9 : 10];
|
|
457
|
+
}
|
|
458
|
+
}, {
|
|
459
|
+
key: "types",
|
|
460
|
+
value: function types() {
|
|
461
|
+
return this.metadata[this.v1 ? 9 : this.v2 ? 10 : 11];
|
|
462
|
+
}
|
|
463
|
+
}, {
|
|
464
|
+
key: "hasTypes",
|
|
465
|
+
value: function hasTypes() {
|
|
466
|
+
// Versions 1.2.0 - 1.2.4: can be `[]`.
|
|
467
|
+
/* istanbul ignore next */
|
|
468
|
+
if (this.types() && this.types().length === 0) {
|
|
469
|
+
return false;
|
|
470
|
+
}
|
|
471
|
+
// Versions <= 1.2.4: can be `undefined`.
|
|
472
|
+
// Version >= 1.2.5: can be `0`.
|
|
473
|
+
return !!this.types();
|
|
474
|
+
}
|
|
475
|
+
}, {
|
|
476
|
+
key: "type",
|
|
477
|
+
value: function type(_type2) {
|
|
478
|
+
if (this.hasTypes() && getType(this.types(), _type2)) {
|
|
479
|
+
return new Type(getType(this.types(), _type2), this);
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}, {
|
|
483
|
+
key: "ext",
|
|
484
|
+
value: function ext() {
|
|
485
|
+
if (this.v1 || this.v2) return DEFAULT_EXT_PREFIX;
|
|
486
|
+
return this.metadata[13] || DEFAULT_EXT_PREFIX;
|
|
487
|
+
}
|
|
488
|
+
}]);
|
|
489
|
+
}();
|
|
490
|
+
var Format = /*#__PURE__*/function () {
|
|
491
|
+
function Format(format, metadata) {
|
|
492
|
+
_classCallCheck$2(this, Format);
|
|
493
|
+
this._format = format;
|
|
494
|
+
this.metadata = metadata;
|
|
495
|
+
}
|
|
496
|
+
return _createClass$2(Format, [{
|
|
497
|
+
key: "pattern",
|
|
498
|
+
value: function pattern() {
|
|
499
|
+
return this._format[0];
|
|
500
|
+
}
|
|
501
|
+
}, {
|
|
502
|
+
key: "format",
|
|
503
|
+
value: function format() {
|
|
504
|
+
return this._format[1];
|
|
505
|
+
}
|
|
506
|
+
}, {
|
|
507
|
+
key: "leadingDigitsPatterns",
|
|
508
|
+
value: function leadingDigitsPatterns() {
|
|
509
|
+
return this._format[2] || [];
|
|
510
|
+
}
|
|
511
|
+
}, {
|
|
512
|
+
key: "nationalPrefixFormattingRule",
|
|
513
|
+
value: function nationalPrefixFormattingRule() {
|
|
514
|
+
return this._format[3] || this.metadata.nationalPrefixFormattingRule();
|
|
515
|
+
}
|
|
516
|
+
}, {
|
|
517
|
+
key: "nationalPrefixIsOptionalWhenFormattingInNationalFormat",
|
|
518
|
+
value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() {
|
|
519
|
+
return !!this._format[4] || this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat();
|
|
520
|
+
}
|
|
521
|
+
}, {
|
|
522
|
+
key: "nationalPrefixIsMandatoryWhenFormattingInNationalFormat",
|
|
523
|
+
value: function nationalPrefixIsMandatoryWhenFormattingInNationalFormat() {
|
|
524
|
+
// National prefix is omitted if there's no national prefix formatting rule
|
|
525
|
+
// set for this country, or when the national prefix formatting rule
|
|
526
|
+
// contains no national prefix itself, or when this rule is set but
|
|
527
|
+
// national prefix is optional for this phone number format
|
|
528
|
+
// (and it is not enforced explicitly)
|
|
529
|
+
return this.usesNationalPrefix() && !this.nationalPrefixIsOptionalWhenFormattingInNationalFormat();
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
// Checks whether national prefix formatting rule contains national prefix.
|
|
533
|
+
}, {
|
|
534
|
+
key: "usesNationalPrefix",
|
|
535
|
+
value: function usesNationalPrefix() {
|
|
536
|
+
return this.nationalPrefixFormattingRule() &&
|
|
537
|
+
// Check that national prefix formatting rule is not a "dummy" one.
|
|
538
|
+
!FIRST_GROUP_ONLY_PREFIX_PATTERN.test(this.nationalPrefixFormattingRule())
|
|
539
|
+
// In compressed metadata, `this.nationalPrefixFormattingRule()` is `0`
|
|
540
|
+
// when `national_prefix_formatting_rule` is not present.
|
|
541
|
+
// So, `true` or `false` are returned explicitly here, so that
|
|
542
|
+
// `0` number isn't returned.
|
|
543
|
+
? true : false;
|
|
544
|
+
}
|
|
545
|
+
}, {
|
|
546
|
+
key: "internationalFormat",
|
|
547
|
+
value: function internationalFormat() {
|
|
548
|
+
return this._format[5] || this.format();
|
|
549
|
+
}
|
|
550
|
+
}]);
|
|
551
|
+
}();
|
|
552
|
+
/**
|
|
553
|
+
* A pattern that is used to determine if the national prefix formatting rule
|
|
554
|
+
* has the first group only, i.e., does not start with the national prefix.
|
|
555
|
+
* Note that the pattern explicitly allows for unbalanced parentheses.
|
|
556
|
+
*/
|
|
557
|
+
var FIRST_GROUP_ONLY_PREFIX_PATTERN = /^\(?\$1\)?$/;
|
|
558
|
+
var Type = /*#__PURE__*/function () {
|
|
559
|
+
function Type(type, metadata) {
|
|
560
|
+
_classCallCheck$2(this, Type);
|
|
561
|
+
this.type = type;
|
|
562
|
+
this.metadata = metadata;
|
|
563
|
+
}
|
|
564
|
+
return _createClass$2(Type, [{
|
|
565
|
+
key: "pattern",
|
|
566
|
+
value: function pattern() {
|
|
567
|
+
if (this.metadata.v1) return this.type;
|
|
568
|
+
return this.type[0];
|
|
569
|
+
}
|
|
570
|
+
}, {
|
|
571
|
+
key: "possibleLengths",
|
|
572
|
+
value: function possibleLengths() {
|
|
573
|
+
if (this.metadata.v1) return;
|
|
574
|
+
return this.type[1] || this.metadata.possibleLengths();
|
|
575
|
+
}
|
|
576
|
+
}]);
|
|
577
|
+
}();
|
|
578
|
+
function getType(types, type) {
|
|
579
|
+
switch (type) {
|
|
580
|
+
case 'FIXED_LINE':
|
|
581
|
+
return types[0];
|
|
582
|
+
case 'MOBILE':
|
|
583
|
+
return types[1];
|
|
584
|
+
case 'TOLL_FREE':
|
|
585
|
+
return types[2];
|
|
586
|
+
case 'PREMIUM_RATE':
|
|
587
|
+
return types[3];
|
|
588
|
+
case 'PERSONAL_NUMBER':
|
|
589
|
+
return types[4];
|
|
590
|
+
case 'VOICEMAIL':
|
|
591
|
+
return types[5];
|
|
592
|
+
case 'UAN':
|
|
593
|
+
return types[6];
|
|
594
|
+
case 'PAGER':
|
|
595
|
+
return types[7];
|
|
596
|
+
case 'VOIP':
|
|
597
|
+
return types[8];
|
|
598
|
+
case 'SHARED_COST':
|
|
599
|
+
return types[9];
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
function validateMetadata(metadata) {
|
|
603
|
+
if (!metadata) {
|
|
604
|
+
throw new Error('[libphonenumber-js] `metadata` argument not passed. Check your arguments.');
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
// `country_phone_code_to_countries` was renamed to `country_calling_codes` in `1.0.18`.
|
|
608
|
+
// For that reason, it's not used in this detection algorithm.
|
|
609
|
+
// Instead, it detects by `countries: {}` property existence.
|
|
610
|
+
if (!isObject(metadata) || !isObject(metadata.countries)) {
|
|
611
|
+
throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(isObject(metadata) ? 'an object of shape: { ' + Object.keys(metadata).join(', ') + ' }' : 'a ' + typeOf(metadata) + ': ' + metadata, "."));
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
// Babel transforms `typeof` into some "branches"
|
|
616
|
+
// so istanbul will show this as "branch not covered".
|
|
617
|
+
/* istanbul ignore next */
|
|
618
|
+
var typeOf = function typeOf(_) {
|
|
619
|
+
return _typeof$5(_);
|
|
620
|
+
};
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* Returns "country calling code" for a country.
|
|
624
|
+
* Throws an error if the country doesn't exist or isn't supported by this library.
|
|
625
|
+
* @param {string} country
|
|
626
|
+
* @param {object} metadata
|
|
627
|
+
* @return {string}
|
|
628
|
+
* @example
|
|
629
|
+
* // Returns "44"
|
|
630
|
+
* getCountryCallingCode("GB")
|
|
631
|
+
*/
|
|
632
|
+
function getCountryCallingCode(country, metadata) {
|
|
633
|
+
metadata = new Metadata(metadata);
|
|
634
|
+
if (metadata.hasCountry(country)) {
|
|
635
|
+
return metadata.selectNumberingPlan(country).countryCallingCode();
|
|
636
|
+
}
|
|
637
|
+
throw new Error("Unknown country: ".concat(country));
|
|
638
|
+
}
|
|
639
|
+
function isSupportedCountry(country, metadata) {
|
|
640
|
+
// metadata = new Metadata(metadata)
|
|
641
|
+
// return metadata.hasCountry(country)
|
|
642
|
+
return metadata.countries.hasOwnProperty(country);
|
|
643
|
+
}
|
|
644
|
+
function setVersion(metadata) {
|
|
645
|
+
var version = metadata.version;
|
|
646
|
+
if (typeof version === 'number') {
|
|
647
|
+
this.v1 = version === 1;
|
|
648
|
+
this.v2 = version === 2;
|
|
649
|
+
this.v3 = version === 3;
|
|
650
|
+
this.v4 = version === 4;
|
|
651
|
+
} else {
|
|
652
|
+
if (!version) {
|
|
653
|
+
this.v1 = true;
|
|
654
|
+
} else if (compare(version, V3) === -1) {
|
|
655
|
+
this.v2 = true;
|
|
656
|
+
} else if (compare(version, V4) === -1) {
|
|
657
|
+
this.v3 = true;
|
|
658
|
+
} else {
|
|
659
|
+
this.v4 = true;
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
// const ISO_COUNTRY_CODE = /^[A-Z]{2}$/
|
|
665
|
+
// function isCountryCode(countryCode) {
|
|
666
|
+
// return ISO_COUNTRY_CODE.test(countryCodeOrCountryCallingCode)
|
|
667
|
+
// }
|
|
668
|
+
|
|
669
|
+
function _createForOfIteratorHelperLoose$3(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$4(r)) || e && r && "number" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
670
|
+
function _unsupportedIterableToArray$4(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$4(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$4(r, a) : void 0; } }
|
|
671
|
+
function _arrayLikeToArray$4(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
672
|
+
/**
|
|
673
|
+
* Merges two arrays.
|
|
674
|
+
* @param {*} a
|
|
675
|
+
* @param {*} b
|
|
676
|
+
* @return {*}
|
|
677
|
+
*/
|
|
678
|
+
function mergeArrays(a, b) {
|
|
679
|
+
var merged = a.slice();
|
|
680
|
+
for (var _iterator = _createForOfIteratorHelperLoose$3(b), _step; !(_step = _iterator()).done;) {
|
|
681
|
+
var element = _step.value;
|
|
682
|
+
if (a.indexOf(element) < 0) {
|
|
683
|
+
merged.push(element);
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
return merged.sort(function (a, b) {
|
|
687
|
+
return a - b;
|
|
688
|
+
});
|
|
689
|
+
|
|
690
|
+
// ES6 version, requires Set polyfill.
|
|
691
|
+
// let merged = new Set(a)
|
|
692
|
+
// for (const element of b) {
|
|
693
|
+
// merged.add(i)
|
|
694
|
+
// }
|
|
695
|
+
// return Array.from(merged).sort((a, b) => a - b)
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
function checkNumberLength(nationalNumber, country, metadata) {
|
|
699
|
+
return checkNumberLengthForType(nationalNumber, country, undefined, metadata);
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
// Checks whether a number is possible for a certain `country` based on the number length.
|
|
703
|
+
//
|
|
704
|
+
// This function is not supported by metadata generated with ancient versions of
|
|
705
|
+
// `libphonenumber-js` (before version `1.0.18`) which didn't include "possible lengths".
|
|
706
|
+
//
|
|
707
|
+
// There was also a known issue with `checkNumberLength()` function:
|
|
708
|
+
// if a number is possible only in a certain `country` among several `countries`
|
|
709
|
+
// that share the same "country calling code", that function would check
|
|
710
|
+
// the possibility of the phone number only in the "main" `country` for the "country calling code"
|
|
711
|
+
// and would not check if it's actually be possible in the speciifc `country`.
|
|
712
|
+
//
|
|
713
|
+
// For example, "+1310xxxx" numbers are valid in Canada.
|
|
714
|
+
// However, they are not possible in the US due to being too short.
|
|
715
|
+
// Since Canada and the US share the same country calling code — "+1" —
|
|
716
|
+
// `checkNumberLength()` function used to return not "IS_POSSIBLE" for "+1310xxxx" numbers.
|
|
717
|
+
//
|
|
718
|
+
// In such cases, when using "/max" metadata, `isValid()` could output `true`
|
|
719
|
+
// but at the same time `isPossible()` could output `false`, which was contradictory.
|
|
720
|
+
//
|
|
721
|
+
// See https://issuetracker.google.com/issues/335892662 for the discusson in Google's issues.
|
|
722
|
+
//
|
|
723
|
+
// The solution suggested by Google was implemented: an optional `country` argument
|
|
724
|
+
// was added to `checkNumberLength()` function. If present, that `country` will be used
|
|
725
|
+
// to check phone number length for that specific `country` rather than the "main" country
|
|
726
|
+
// for the shared "country calling code".
|
|
727
|
+
//
|
|
728
|
+
function checkNumberLengthForType(nationalNumber, country, type, metadata) {
|
|
729
|
+
// If the exact `country` is specified, it's no necessarily already selected in `metadata`.
|
|
730
|
+
// Most likely, in cases when there're multiple countries corresponding to the same
|
|
731
|
+
// "country calling code", the "main" country for that "country calling code" will be selected.
|
|
732
|
+
if (country) {
|
|
733
|
+
metadata = new Metadata(metadata.metadata);
|
|
734
|
+
metadata.selectNumberingPlan(country);
|
|
735
|
+
}
|
|
736
|
+
var type_info = metadata.type(type);
|
|
737
|
+
|
|
738
|
+
// There should always be "<possiblePengths/>" set for every type element.
|
|
739
|
+
// This is declared in the XML schema.
|
|
740
|
+
// For size efficiency, where a sub-description (e.g. fixed-line)
|
|
741
|
+
// has the same "<possiblePengths/>" as the "general description", this is missing,
|
|
742
|
+
// so we fall back to the "general description". Where no numbers of the type
|
|
743
|
+
// exist at all, there is one possible length (-1) which is guaranteed
|
|
744
|
+
// not to match the length of any real phone number.
|
|
745
|
+
var possible_lengths = type_info && type_info.possibleLengths() || metadata.possibleLengths();
|
|
746
|
+
// let local_lengths = type_info && type.possibleLengthsLocal() || metadata.possibleLengthsLocal()
|
|
747
|
+
|
|
748
|
+
// Metadata before version `1.0.18` didn't contain `possible_lengths`.
|
|
749
|
+
if (!possible_lengths) {
|
|
750
|
+
return 'IS_POSSIBLE';
|
|
751
|
+
}
|
|
752
|
+
if (type === 'FIXED_LINE_OR_MOBILE') {
|
|
753
|
+
// No such country in metadata.
|
|
754
|
+
/* istanbul ignore next */
|
|
755
|
+
if (!metadata.type('FIXED_LINE')) {
|
|
756
|
+
// The rare case has been encountered where no fixedLine data is available
|
|
757
|
+
// (true for some non-geographic entities), so we just check mobile.
|
|
758
|
+
return checkNumberLengthForType(nationalNumber, country, 'MOBILE', metadata);
|
|
759
|
+
}
|
|
760
|
+
var mobile_type = metadata.type('MOBILE');
|
|
761
|
+
if (mobile_type) {
|
|
762
|
+
// Merge the mobile data in if there was any. "Concat" creates a new
|
|
763
|
+
// array, it doesn't edit possible_lengths in place, so we don't need a copy.
|
|
764
|
+
// Note that when adding the possible lengths from mobile, we have
|
|
765
|
+
// to again check they aren't empty since if they are this indicates
|
|
766
|
+
// they are the same as the general desc and should be obtained from there.
|
|
767
|
+
possible_lengths = mergeArrays(possible_lengths, mobile_type.possibleLengths());
|
|
768
|
+
// The current list is sorted; we need to merge in the new list and
|
|
769
|
+
// re-sort (duplicates are okay). Sorting isn't so expensive because
|
|
770
|
+
// the lists are very small.
|
|
771
|
+
|
|
772
|
+
// if (local_lengths) {
|
|
773
|
+
// local_lengths = mergeArrays(local_lengths, mobile_type.possibleLengthsLocal())
|
|
774
|
+
// } else {
|
|
775
|
+
// local_lengths = mobile_type.possibleLengthsLocal()
|
|
776
|
+
// }
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
// If the type doesn't exist then return 'INVALID_LENGTH'.
|
|
780
|
+
else if (type && !type_info) {
|
|
781
|
+
return 'INVALID_LENGTH';
|
|
782
|
+
}
|
|
783
|
+
var actual_length = nationalNumber.length;
|
|
784
|
+
|
|
785
|
+
// In `libphonenumber-js` all "local-only" formats are dropped for simplicity.
|
|
786
|
+
// // This is safe because there is never an overlap beween the possible lengths
|
|
787
|
+
// // and the local-only lengths; this is checked at build time.
|
|
788
|
+
// if (local_lengths && local_lengths.indexOf(nationalNumber.length) >= 0)
|
|
789
|
+
// {
|
|
790
|
+
// return 'IS_POSSIBLE_LOCAL_ONLY'
|
|
791
|
+
// }
|
|
792
|
+
|
|
793
|
+
var minimum_length = possible_lengths[0];
|
|
794
|
+
if (minimum_length === actual_length) {
|
|
795
|
+
return 'IS_POSSIBLE';
|
|
796
|
+
}
|
|
797
|
+
if (minimum_length > actual_length) {
|
|
798
|
+
return 'TOO_SHORT';
|
|
799
|
+
}
|
|
800
|
+
if (possible_lengths[possible_lengths.length - 1] < actual_length) {
|
|
801
|
+
return 'TOO_LONG';
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
// We skip the first element since we've already checked it.
|
|
805
|
+
return possible_lengths.indexOf(actual_length, 1) >= 0 ? 'IS_POSSIBLE' : 'INVALID_LENGTH';
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* Checks if a phone number is "possible" (basically just checks its length).
|
|
810
|
+
*
|
|
811
|
+
* isPossible(phoneNumberInstance, { ..., v2: true }, metadata)
|
|
812
|
+
*
|
|
813
|
+
* isPossible({ phone: '8005553535', country: 'RU' }, { ... }, metadata)
|
|
814
|
+
* isPossible({ phone: '8005553535', country: 'RU' }, undefined, metadata)
|
|
815
|
+
*
|
|
816
|
+
* @param {object|PhoneNumber} input — If `options.v2: true` flag is passed, the `input` should be a `PhoneNumber` instance. Otherwise, it should be an object of shape `{ phone: '...', country: '...' }`.
|
|
817
|
+
* @param {object} [options]
|
|
818
|
+
* @param {object} metadata
|
|
819
|
+
* @return {string}
|
|
820
|
+
*/
|
|
821
|
+
function isPossiblePhoneNumber(input, options, metadata) {
|
|
822
|
+
/* istanbul ignore if */
|
|
823
|
+
if (options === undefined) {
|
|
824
|
+
options = {};
|
|
825
|
+
}
|
|
826
|
+
metadata = new Metadata(metadata);
|
|
827
|
+
if (options.v2) {
|
|
828
|
+
if (!input.countryCallingCode) {
|
|
829
|
+
throw new Error('Invalid phone number object passed');
|
|
830
|
+
}
|
|
831
|
+
metadata.selectNumberingPlan(input.countryCallingCode);
|
|
832
|
+
} else {
|
|
833
|
+
if (!input.phone) {
|
|
834
|
+
return false;
|
|
835
|
+
}
|
|
836
|
+
if (input.country) {
|
|
837
|
+
if (!metadata.hasCountry(input.country)) {
|
|
838
|
+
throw new Error("Unknown country: ".concat(input.country));
|
|
839
|
+
}
|
|
840
|
+
metadata.selectNumberingPlan(input.country);
|
|
841
|
+
} else {
|
|
842
|
+
if (!input.countryCallingCode) {
|
|
843
|
+
throw new Error('Invalid phone number object passed');
|
|
844
|
+
}
|
|
845
|
+
metadata.selectNumberingPlan(input.countryCallingCode);
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
// Old metadata (< 1.0.18) had no "possible length" data.
|
|
850
|
+
if (metadata.possibleLengths()) {
|
|
851
|
+
return isPossibleNumber(input.phone || input.nationalNumber, input.country, metadata);
|
|
852
|
+
} else {
|
|
853
|
+
// There was a bug between `1.7.35` and `1.7.37` where "possible_lengths"
|
|
854
|
+
// were missing for "non-geographical" numbering plans.
|
|
855
|
+
// Just assume the number is possible in such cases:
|
|
856
|
+
// it's unlikely that anyone generated their custom metadata
|
|
857
|
+
// in that short period of time (one day).
|
|
858
|
+
// This code can be removed in some future major version update.
|
|
859
|
+
if (input.countryCallingCode && metadata.isNonGeographicCallingCode(input.countryCallingCode)) {
|
|
860
|
+
// "Non-geographic entities" did't have `possibleLengths`
|
|
861
|
+
// due to a bug in metadata generation process.
|
|
862
|
+
return true;
|
|
863
|
+
} else {
|
|
864
|
+
throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.');
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
function isPossibleNumber(nationalNumber, country, metadata) {
|
|
869
|
+
//, isInternational) {
|
|
870
|
+
switch (checkNumberLength(nationalNumber, country, metadata)) {
|
|
871
|
+
case 'IS_POSSIBLE':
|
|
872
|
+
return true;
|
|
873
|
+
// This library ignores "local-only" phone numbers (for simplicity).
|
|
874
|
+
// See the readme for more info on what are "local-only" phone numbers.
|
|
875
|
+
// case 'IS_POSSIBLE_LOCAL_ONLY':
|
|
876
|
+
// return !isInternational
|
|
877
|
+
default:
|
|
878
|
+
return false;
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* Checks whether the entire input sequence can be matched
|
|
884
|
+
* against the regular expression.
|
|
885
|
+
* @return {boolean}
|
|
886
|
+
*/
|
|
887
|
+
function matchesEntirely(text, regularExpressionText) {
|
|
888
|
+
// If the assigning of the `''` default value is moved to the arguments above,
|
|
889
|
+
// the code coverage would decrease for some weird reason.
|
|
890
|
+
text = text || '';
|
|
891
|
+
return new RegExp('^(?:' + regularExpressionText + ')$').test(text);
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
function _createForOfIteratorHelperLoose$2(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$3(r)) || e && r && "number" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
895
|
+
function _unsupportedIterableToArray$3(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$3(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$3(r, a) : void 0; } }
|
|
896
|
+
function _arrayLikeToArray$3(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
897
|
+
var NON_FIXED_LINE_PHONE_TYPES = ['MOBILE', 'PREMIUM_RATE', 'TOLL_FREE', 'SHARED_COST', 'VOIP', 'PERSONAL_NUMBER', 'PAGER', 'UAN', 'VOICEMAIL'];
|
|
898
|
+
|
|
899
|
+
// Finds out national phone number type (fixed line, mobile, etc)
|
|
900
|
+
function getNumberType(input, options, metadata) {
|
|
901
|
+
// If assigning the `{}` default value is moved to the arguments above,
|
|
902
|
+
// code coverage would decrease for some weird reason.
|
|
903
|
+
options = options || {};
|
|
904
|
+
|
|
905
|
+
// When `parse()` returns an empty object — `{}` —
|
|
906
|
+
// that means that the phone number is malformed,
|
|
907
|
+
// so it can't possibly be valid.
|
|
908
|
+
if (!input.country && !input.countryCallingCode) {
|
|
909
|
+
return;
|
|
910
|
+
}
|
|
911
|
+
metadata = new Metadata(metadata);
|
|
912
|
+
metadata.selectNumberingPlan(input.country, input.countryCallingCode);
|
|
913
|
+
var nationalNumber = options.v2 ? input.nationalNumber : input.phone;
|
|
914
|
+
|
|
915
|
+
// The following is copy-pasted from the original function:
|
|
916
|
+
// https://github.com/googlei18n/libphonenumber/blob/3ea547d4fbaa2d0b67588904dfa5d3f2557c27ff/javascript/i18n/phonenumbers/phonenumberutil.js#L2835
|
|
917
|
+
|
|
918
|
+
// Is this national number even valid for this country
|
|
919
|
+
if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern())) {
|
|
920
|
+
return;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
// Is it fixed line number
|
|
924
|
+
if (isNumberTypeEqualTo(nationalNumber, 'FIXED_LINE', metadata)) {
|
|
925
|
+
// Because duplicate regular expressions are removed
|
|
926
|
+
// to reduce metadata size, if "mobile" pattern is ""
|
|
927
|
+
// then it means it was removed due to being a duplicate of the fixed-line pattern.
|
|
928
|
+
//
|
|
929
|
+
if (metadata.type('MOBILE') && metadata.type('MOBILE').pattern() === '') {
|
|
930
|
+
return 'FIXED_LINE_OR_MOBILE';
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
// `MOBILE` type pattern isn't included if it matched `FIXED_LINE` one.
|
|
934
|
+
// For example, for "US" country.
|
|
935
|
+
// Old metadata (< `1.0.18`) had a specific "types" data structure
|
|
936
|
+
// that happened to be `undefined` for `MOBILE` in that case.
|
|
937
|
+
// Newer metadata (>= `1.0.18`) has another data structure that is
|
|
938
|
+
// not `undefined` for `MOBILE` in that case (it's just an empty array).
|
|
939
|
+
// So this `if` is just for backwards compatibility with old metadata.
|
|
940
|
+
if (!metadata.type('MOBILE')) {
|
|
941
|
+
return 'FIXED_LINE_OR_MOBILE';
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
// Check if the number happens to qualify as both fixed line and mobile.
|
|
945
|
+
// (no such country in the minimal metadata set)
|
|
946
|
+
/* istanbul ignore if */
|
|
947
|
+
if (isNumberTypeEqualTo(nationalNumber, 'MOBILE', metadata)) {
|
|
948
|
+
return 'FIXED_LINE_OR_MOBILE';
|
|
949
|
+
}
|
|
950
|
+
return 'FIXED_LINE';
|
|
951
|
+
}
|
|
952
|
+
for (var _iterator = _createForOfIteratorHelperLoose$2(NON_FIXED_LINE_PHONE_TYPES), _step; !(_step = _iterator()).done;) {
|
|
953
|
+
var type = _step.value;
|
|
954
|
+
if (isNumberTypeEqualTo(nationalNumber, type, metadata)) {
|
|
955
|
+
return type;
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
function isNumberTypeEqualTo(nationalNumber, type, metadata) {
|
|
960
|
+
type = metadata.type(type);
|
|
961
|
+
if (!type || !type.pattern()) {
|
|
962
|
+
return false;
|
|
963
|
+
}
|
|
964
|
+
// Check if any possible number lengths are present;
|
|
965
|
+
// if so, we use them to avoid checking
|
|
966
|
+
// the validation pattern if they don't match.
|
|
967
|
+
// If they are absent, this means they match
|
|
968
|
+
// the general description, which we have
|
|
969
|
+
// already checked before a specific number type.
|
|
970
|
+
if (type.possibleLengths() && type.possibleLengths().indexOf(nationalNumber.length) < 0) {
|
|
971
|
+
return false;
|
|
972
|
+
}
|
|
973
|
+
return matchesEntirely(nationalNumber, type.pattern());
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
/**
|
|
977
|
+
* Checks if a given phone number is valid.
|
|
978
|
+
*
|
|
979
|
+
* isValid(phoneNumberInstance, { ..., v2: true }, metadata)
|
|
980
|
+
*
|
|
981
|
+
* isPossible({ phone: '8005553535', country: 'RU' }, { ... }, metadata)
|
|
982
|
+
* isPossible({ phone: '8005553535', country: 'RU' }, undefined, metadata)
|
|
983
|
+
*
|
|
984
|
+
* If the `number` is a string, it will be parsed to an object,
|
|
985
|
+
* but only if it contains only valid phone number characters (including punctuation).
|
|
986
|
+
* If the `number` is an object, it is used as is.
|
|
987
|
+
*
|
|
988
|
+
* The optional `defaultCountry` argument is the default country.
|
|
989
|
+
* I.e. it does not restrict to just that country,
|
|
990
|
+
* e.g. in those cases where several countries share
|
|
991
|
+
* the same phone numbering rules (NANPA, Britain, etc).
|
|
992
|
+
* For example, even though the number `07624 369230`
|
|
993
|
+
* belongs to the Isle of Man ("IM" country code)
|
|
994
|
+
* calling `isValidNumber('07624369230', 'GB', metadata)`
|
|
995
|
+
* still returns `true` because the country is not restricted to `GB`,
|
|
996
|
+
* it's just that `GB` is the default one for the phone numbering rules.
|
|
997
|
+
* For restricting the country see `isValidNumberForRegion()`
|
|
998
|
+
* though restricting a country might not be a good idea.
|
|
999
|
+
* https://github.com/googlei18n/libphonenumber/blob/master/FAQ.md#when-should-i-use-isvalidnumberforregion
|
|
1000
|
+
*
|
|
1001
|
+
* Examples:
|
|
1002
|
+
*
|
|
1003
|
+
* ```js
|
|
1004
|
+
* isValidNumber('+78005553535', metadata)
|
|
1005
|
+
* isValidNumber('8005553535', 'RU', metadata)
|
|
1006
|
+
* isValidNumber('88005553535', 'RU', metadata)
|
|
1007
|
+
* isValidNumber({ phone: '8005553535', country: 'RU' }, metadata)
|
|
1008
|
+
* ```
|
|
1009
|
+
*/
|
|
1010
|
+
function isValidNumber(input, options, metadata) {
|
|
1011
|
+
// If assigning the `{}` default value is moved to the arguments above,
|
|
1012
|
+
// code coverage would decrease for some weird reason.
|
|
1013
|
+
options = options || {};
|
|
1014
|
+
metadata = new Metadata(metadata);
|
|
1015
|
+
metadata.selectNumberingPlan(input.country, input.countryCallingCode);
|
|
1016
|
+
|
|
1017
|
+
// By default, countries only have type regexps when it's required for
|
|
1018
|
+
// distinguishing different countries having the same `countryCallingCode`.
|
|
1019
|
+
if (metadata.hasTypes()) {
|
|
1020
|
+
return getNumberType(input, options, metadata.metadata) !== undefined;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
// If there are no type regexps for this country in metadata then use
|
|
1024
|
+
// `nationalNumberPattern` as a "better than nothing" replacement.
|
|
1025
|
+
var nationalNumber = options.v2 ? input.nationalNumber : input.phone;
|
|
1026
|
+
return matchesEntirely(nationalNumber, metadata.nationalNumberPattern());
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
/**
|
|
1030
|
+
* Returns a list of countries that the phone number could potentially belong to.
|
|
1031
|
+
* @param {string} callingCode — Calling code.
|
|
1032
|
+
* @param {string} nationalNumber — National (significant) number.
|
|
1033
|
+
* @param {object} metadata — Metadata.
|
|
1034
|
+
* @return {string[]} A list of possible countries.
|
|
1035
|
+
*/
|
|
1036
|
+
function getPossibleCountriesForNumber(callingCode, nationalNumber, metadata) {
|
|
1037
|
+
var _metadata = new Metadata(metadata);
|
|
1038
|
+
var possibleCountries = _metadata.getCountryCodesForCallingCode(callingCode);
|
|
1039
|
+
if (!possibleCountries) {
|
|
1040
|
+
return [];
|
|
1041
|
+
}
|
|
1042
|
+
return possibleCountries.filter(function (country) {
|
|
1043
|
+
return couldNationalNumberBelongToCountry(nationalNumber, country, metadata);
|
|
1044
|
+
});
|
|
1045
|
+
}
|
|
1046
|
+
function couldNationalNumberBelongToCountry(nationalNumber, country, metadata) {
|
|
1047
|
+
var _metadata = new Metadata(metadata);
|
|
1048
|
+
_metadata.selectNumberingPlan(country);
|
|
1049
|
+
if (_metadata.numberingPlan.possibleLengths().indexOf(nationalNumber.length) >= 0) {
|
|
1050
|
+
return true;
|
|
1051
|
+
}
|
|
1052
|
+
return false;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
// The minimum length of the national significant number.
|
|
1056
|
+
var MIN_LENGTH_FOR_NSN = 2;
|
|
1057
|
+
|
|
1058
|
+
// The ITU says the maximum length should be 15,
|
|
1059
|
+
// but one can find longer numbers in Germany.
|
|
1060
|
+
var MAX_LENGTH_FOR_NSN = 17;
|
|
1061
|
+
|
|
1062
|
+
// The maximum length of the country calling code.
|
|
1063
|
+
var MAX_LENGTH_COUNTRY_CODE = 3;
|
|
1064
|
+
|
|
1065
|
+
// Digits accepted in phone numbers
|
|
1066
|
+
// (ascii, fullwidth, arabic-indic, and eastern arabic digits).
|
|
1067
|
+
var VALID_DIGITS = "0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9";
|
|
1068
|
+
|
|
1069
|
+
// `DASHES` will be right after the opening square bracket of the "character class"
|
|
1070
|
+
var DASHES = "-\u2010-\u2015\u2212\u30FC\uFF0D";
|
|
1071
|
+
var SLASHES = "\uFF0F/";
|
|
1072
|
+
var DOTS = "\uFF0E.";
|
|
1073
|
+
var WHITESPACE = " \xA0\xAD\u200B\u2060\u3000";
|
|
1074
|
+
var BRACKETS = "()\uFF08\uFF09\uFF3B\uFF3D\\[\\]";
|
|
1075
|
+
// export const OPENING_BRACKETS = '(\uFF08\uFF3B\\\['
|
|
1076
|
+
var TILDES = "~\u2053\u223C\uFF5E";
|
|
1077
|
+
|
|
1078
|
+
// Regular expression of acceptable punctuation found in phone numbers. This
|
|
1079
|
+
// excludes punctuation found as a leading character only. This consists of dash
|
|
1080
|
+
// characters, white space characters, full stops, slashes, square brackets,
|
|
1081
|
+
// parentheses and tildes. Full-width variants are also present.
|
|
1082
|
+
var VALID_PUNCTUATION = "".concat(DASHES).concat(SLASHES).concat(DOTS).concat(WHITESPACE).concat(BRACKETS).concat(TILDES);
|
|
1083
|
+
var PLUS_CHARS = "+\uFF0B";
|
|
1084
|
+
// const LEADING_PLUS_CHARS_PATTERN = new RegExp('^[' + PLUS_CHARS + ']+')
|
|
1085
|
+
|
|
1086
|
+
var CAPTURING_DIGIT_PATTERN = new RegExp('([' + VALID_DIGITS + '])');
|
|
1087
|
+
function stripIddPrefix(number, country, callingCode, metadata) {
|
|
1088
|
+
if (!country) {
|
|
1089
|
+
return;
|
|
1090
|
+
}
|
|
1091
|
+
// Check if the number is IDD-prefixed.
|
|
1092
|
+
var countryMetadata = new Metadata(metadata);
|
|
1093
|
+
countryMetadata.selectNumberingPlan(country, callingCode);
|
|
1094
|
+
var IDDPrefixPattern = new RegExp(countryMetadata.IDDPrefix());
|
|
1095
|
+
if (number.search(IDDPrefixPattern) !== 0) {
|
|
1096
|
+
return;
|
|
1097
|
+
}
|
|
1098
|
+
// Strip IDD prefix.
|
|
1099
|
+
number = number.slice(number.match(IDDPrefixPattern)[0].length);
|
|
1100
|
+
// If there're any digits after an IDD prefix,
|
|
1101
|
+
// then those digits are a country calling code.
|
|
1102
|
+
// Since no country code starts with a `0`,
|
|
1103
|
+
// the code below validates that the next digit (if present) is not `0`.
|
|
1104
|
+
var matchedGroups = number.match(CAPTURING_DIGIT_PATTERN);
|
|
1105
|
+
if (matchedGroups && matchedGroups[1] != null && matchedGroups[1].length > 0) {
|
|
1106
|
+
if (matchedGroups[1] === '0') {
|
|
1107
|
+
return;
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
return number;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
/**
|
|
1114
|
+
* Strips any national prefix (such as 0, 1) present in a
|
|
1115
|
+
* (possibly incomplete) number provided.
|
|
1116
|
+
* "Carrier codes" are only used in Colombia and Brazil,
|
|
1117
|
+
* and only when dialing within those countries from a mobile phone to a fixed line number.
|
|
1118
|
+
* Sometimes it won't actually strip national prefix
|
|
1119
|
+
* and will instead prepend some digits to the `number`:
|
|
1120
|
+
* for example, when number `2345678` is passed with `VI` country selected,
|
|
1121
|
+
* it will return `{ number: "3402345678" }`, because `340` area code is prepended.
|
|
1122
|
+
* @param {string} number — National number digits.
|
|
1123
|
+
* @param {object} metadata — Metadata with country selected.
|
|
1124
|
+
* @return {object} `{ nationalNumber: string, nationalPrefix: string? carrierCode: string? }`. Even if a national prefix was extracted, it's not necessarily present in the returned object, so don't rely on its presence in the returned object in order to find out whether a national prefix has been extracted or not.
|
|
1125
|
+
*/
|
|
1126
|
+
function extractNationalNumberFromPossiblyIncompleteNumber(number, metadata) {
|
|
1127
|
+
if (number && metadata.numberingPlan.nationalPrefixForParsing()) {
|
|
1128
|
+
// See METADATA.md for the description of
|
|
1129
|
+
// `national_prefix_for_parsing` and `national_prefix_transform_rule`.
|
|
1130
|
+
// Attempt to parse the first digits as a national prefix.
|
|
1131
|
+
var prefixPattern = new RegExp('^(?:' + metadata.numberingPlan.nationalPrefixForParsing() + ')');
|
|
1132
|
+
var prefixMatch = prefixPattern.exec(number);
|
|
1133
|
+
if (prefixMatch) {
|
|
1134
|
+
var nationalNumber;
|
|
1135
|
+
var carrierCode;
|
|
1136
|
+
// https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule
|
|
1137
|
+
// If a `national_prefix_for_parsing` has any "capturing groups"
|
|
1138
|
+
// then it means that the national (significant) number is equal to
|
|
1139
|
+
// those "capturing groups" transformed via `national_prefix_transform_rule`,
|
|
1140
|
+
// and nothing could be said about the actual national prefix:
|
|
1141
|
+
// what is it and was it even there.
|
|
1142
|
+
// If a `national_prefix_for_parsing` doesn't have any "capturing groups",
|
|
1143
|
+
// then everything it matches is a national prefix.
|
|
1144
|
+
// To determine whether `national_prefix_for_parsing` matched any
|
|
1145
|
+
// "capturing groups", the value of the result of calling `.exec()`
|
|
1146
|
+
// is looked at, and if it has non-undefined values where there're
|
|
1147
|
+
// "capturing groups" in the regular expression, then it means
|
|
1148
|
+
// that "capturing groups" have been matched.
|
|
1149
|
+
// It's not possible to tell whether there'll be any "capturing gropus"
|
|
1150
|
+
// before the matching process, because a `national_prefix_for_parsing`
|
|
1151
|
+
// could exhibit both behaviors.
|
|
1152
|
+
var capturedGroupsCount = prefixMatch.length - 1;
|
|
1153
|
+
var hasCapturedGroups = capturedGroupsCount > 0 && prefixMatch[capturedGroupsCount];
|
|
1154
|
+
if (metadata.nationalPrefixTransformRule() && hasCapturedGroups) {
|
|
1155
|
+
nationalNumber = number.replace(prefixPattern, metadata.nationalPrefixTransformRule());
|
|
1156
|
+
// If there's more than one captured group,
|
|
1157
|
+
// then carrier code is the second one.
|
|
1158
|
+
if (capturedGroupsCount > 1) {
|
|
1159
|
+
carrierCode = prefixMatch[1];
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
// If there're no "capturing groups",
|
|
1163
|
+
// or if there're "capturing groups" but no
|
|
1164
|
+
// `national_prefix_transform_rule`,
|
|
1165
|
+
// then just strip the national prefix from the number,
|
|
1166
|
+
// and possibly a carrier code.
|
|
1167
|
+
// Seems like there could be more.
|
|
1168
|
+
else {
|
|
1169
|
+
// `prefixBeforeNationalNumber` is the whole substring matched by
|
|
1170
|
+
// the `national_prefix_for_parsing` regular expression.
|
|
1171
|
+
// There seem to be no guarantees that it's just a national prefix.
|
|
1172
|
+
// For example, if there's a carrier code, it's gonna be a
|
|
1173
|
+
// part of `prefixBeforeNationalNumber` too.
|
|
1174
|
+
var prefixBeforeNationalNumber = prefixMatch[0];
|
|
1175
|
+
nationalNumber = number.slice(prefixBeforeNationalNumber.length);
|
|
1176
|
+
// If there's at least one captured group,
|
|
1177
|
+
// then carrier code is the first one.
|
|
1178
|
+
if (hasCapturedGroups) {
|
|
1179
|
+
carrierCode = prefixMatch[1];
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
// Tries to guess whether a national prefix was present in the input.
|
|
1183
|
+
// This is not something copy-pasted from Google's library:
|
|
1184
|
+
// they don't seem to have an equivalent for that.
|
|
1185
|
+
// So this isn't an "officially approved" way of doing something like that.
|
|
1186
|
+
// But since there seems no other existing method, this library uses it.
|
|
1187
|
+
var nationalPrefix;
|
|
1188
|
+
if (hasCapturedGroups) {
|
|
1189
|
+
var possiblePositionOfTheFirstCapturedGroup = number.indexOf(prefixMatch[1]);
|
|
1190
|
+
var possibleNationalPrefix = number.slice(0, possiblePositionOfTheFirstCapturedGroup);
|
|
1191
|
+
// Example: an Argentinian (AR) phone number `0111523456789`.
|
|
1192
|
+
// `prefixMatch[0]` is `01115`, and `$1` is `11`,
|
|
1193
|
+
// and the rest of the phone number is `23456789`.
|
|
1194
|
+
// The national number is transformed via `9$1` to `91123456789`.
|
|
1195
|
+
// National prefix `0` is detected being present at the start.
|
|
1196
|
+
// if (possibleNationalPrefix.indexOf(metadata.numberingPlan.nationalPrefix()) === 0) {
|
|
1197
|
+
if (possibleNationalPrefix === metadata.numberingPlan.nationalPrefix()) {
|
|
1198
|
+
nationalPrefix = metadata.numberingPlan.nationalPrefix();
|
|
1199
|
+
}
|
|
1200
|
+
} else {
|
|
1201
|
+
nationalPrefix = prefixMatch[0];
|
|
1202
|
+
}
|
|
1203
|
+
return {
|
|
1204
|
+
nationalNumber: nationalNumber,
|
|
1205
|
+
nationalPrefix: nationalPrefix,
|
|
1206
|
+
carrierCode: carrierCode
|
|
1207
|
+
};
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
return {
|
|
1211
|
+
nationalNumber: number
|
|
1212
|
+
};
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
function _createForOfIteratorHelperLoose$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$2(r)) || e && r && "number" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
1216
|
+
function _unsupportedIterableToArray$2(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$2(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$2(r, a) : void 0; } }
|
|
1217
|
+
function _arrayLikeToArray$2(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
1218
|
+
|
|
1219
|
+
// Returns the exact country that the `nationalPhoneNumber` belongs to
|
|
1220
|
+
// in cases of ambiguity, i.e. when multiple countries share the same "country calling code".
|
|
1221
|
+
function getCountryByNationalNumber(nationalPhoneNumber, _ref) {
|
|
1222
|
+
var countries = _ref.countries,
|
|
1223
|
+
metadata = _ref.metadata;
|
|
1224
|
+
// Re-create `metadata` because it will be selecting a `country`.
|
|
1225
|
+
metadata = new Metadata(metadata);
|
|
1226
|
+
|
|
1227
|
+
// const matchingCountries = []
|
|
1228
|
+
|
|
1229
|
+
for (var _iterator = _createForOfIteratorHelperLoose$1(countries), _step; !(_step = _iterator()).done;) {
|
|
1230
|
+
var country = _step.value;
|
|
1231
|
+
metadata.selectNumberingPlan(country);
|
|
1232
|
+
// "Leading digits" patterns are only defined for about 20% of all countries.
|
|
1233
|
+
// By definition, matching "leading digits" is a sufficient but not a necessary
|
|
1234
|
+
// condition for a phone number to belong to a country.
|
|
1235
|
+
// The point of "leading digits" check is that it's the fastest one to get a match.
|
|
1236
|
+
// https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md#leading_digits
|
|
1237
|
+
// I'd suppose that "leading digits" patterns are mutually exclusive for different countries
|
|
1238
|
+
// because of the intended use of that feature.
|
|
1239
|
+
if (metadata.leadingDigits()) {
|
|
1240
|
+
if (nationalPhoneNumber && nationalPhoneNumber.search(metadata.leadingDigits()) === 0) {
|
|
1241
|
+
return country;
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
// Else perform full validation with all of those
|
|
1245
|
+
// fixed-line/mobile/etc regular expressions.
|
|
1246
|
+
else if (getNumberType({
|
|
1247
|
+
phone: nationalPhoneNumber,
|
|
1248
|
+
country: country
|
|
1249
|
+
}, undefined, metadata.metadata)) {
|
|
1250
|
+
// When multiple countries share the same "country calling code",
|
|
1251
|
+
// type patterns aren't guaranteed to be unique among them.
|
|
1252
|
+
// For example, both `US` and `CA` have the same pattern for `toll_free` numbers.
|
|
1253
|
+
// https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/103#note_1417147572
|
|
1254
|
+
//
|
|
1255
|
+
// That means that this `if` condition could be `true` for multiple countries from the list.
|
|
1256
|
+
// Currently, it just returns the first one, which is also the "main" country for the "country calling code".
|
|
1257
|
+
// In an example with `toll_free` numbers above, `"US"` would be returned even though
|
|
1258
|
+
// it could as well be `"CA"`.
|
|
1259
|
+
//
|
|
1260
|
+
// There was also a time when this attempted to be overly smart
|
|
1261
|
+
// and kept track of all such multiple matching countries
|
|
1262
|
+
// and then picked the one that matched the `defaultCountry`, if provided.
|
|
1263
|
+
// For example, with `toll_free` numbers above, and with `defaultCountry: "CA"`,
|
|
1264
|
+
// it would've returned `"CA"` instead of `"US"`.
|
|
1265
|
+
// Later it turned out that such "overly smart" behavior turned out to be just confusing,
|
|
1266
|
+
// so this "overly smart" country detection was reverted to returning the "main" country
|
|
1267
|
+
// for the "country calling code".
|
|
1268
|
+
// https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/154
|
|
1269
|
+
//
|
|
1270
|
+
return country;
|
|
1271
|
+
//
|
|
1272
|
+
// The "overly smart" behavior code:
|
|
1273
|
+
//
|
|
1274
|
+
// if (defaultCountry) {
|
|
1275
|
+
// if (country === defaultCountry) {
|
|
1276
|
+
// return country
|
|
1277
|
+
// } else {
|
|
1278
|
+
// matchingCountries.push(country)
|
|
1279
|
+
// }
|
|
1280
|
+
// } else {
|
|
1281
|
+
// return country
|
|
1282
|
+
// }
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
// // Return the first ("main") one of the `matchingCountries`.
|
|
1287
|
+
// if (matchingCountries.length > 0) {
|
|
1288
|
+
// return matchingCountries[0]
|
|
1289
|
+
// }
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
// Returns the exact country for the `nationalNumber`
|
|
1293
|
+
// that belongs to the specified "country calling code".
|
|
1294
|
+
function getCountryByCallingCode(callingCode, _ref) {
|
|
1295
|
+
var nationalPhoneNumber = _ref.nationalNumber,
|
|
1296
|
+
metadata = _ref.metadata;
|
|
1297
|
+
var possibleCountries = metadata.getCountryCodesForCallingCode(callingCode);
|
|
1298
|
+
if (!possibleCountries) {
|
|
1299
|
+
return;
|
|
1300
|
+
}
|
|
1301
|
+
// If there's just one country corresponding to the country code,
|
|
1302
|
+
// then just return it, without further phone number digits validation.
|
|
1303
|
+
if (possibleCountries.length === 1) {
|
|
1304
|
+
return possibleCountries[0];
|
|
1305
|
+
}
|
|
1306
|
+
return getCountryByNationalNumber(nationalPhoneNumber, {
|
|
1307
|
+
countries: possibleCountries,
|
|
1308
|
+
metadata: metadata.metadata
|
|
1309
|
+
});
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* Strips national prefix and carrier code from a complete phone number.
|
|
1314
|
+
* The difference from the non-"FromCompleteNumber" function is that
|
|
1315
|
+
* it won't extract national prefix if the resultant number is too short
|
|
1316
|
+
* to be a complete number for the selected phone numbering plan.
|
|
1317
|
+
* @param {string} number — Complete phone number digits.
|
|
1318
|
+
* @param {string?} country — Country, if known.
|
|
1319
|
+
* @param {Metadata} metadata — Metadata with a phone numbering plan selected.
|
|
1320
|
+
* @return {object} `{ nationalNumber: string, carrierCode: string? }`.
|
|
1321
|
+
*/
|
|
1322
|
+
function extractNationalNumber(number, country, metadata) {
|
|
1323
|
+
// Parsing national prefixes and carrier codes
|
|
1324
|
+
// is only required for local phone numbers
|
|
1325
|
+
// but some people don't understand that
|
|
1326
|
+
// and sometimes write international phone numbers
|
|
1327
|
+
// with national prefixes (or maybe even carrier codes).
|
|
1328
|
+
// http://ucken.blogspot.ru/2016/03/trunk-prefixes-in-skype4b.html
|
|
1329
|
+
// Google's original library forgives such mistakes
|
|
1330
|
+
// and so does this library, because it has been requested:
|
|
1331
|
+
// https://github.com/catamphetamine/libphonenumber-js/issues/127
|
|
1332
|
+
var _extractNationalNumbe = extractNationalNumberFromPossiblyIncompleteNumber(number, metadata),
|
|
1333
|
+
carrierCode = _extractNationalNumbe.carrierCode,
|
|
1334
|
+
nationalNumber = _extractNationalNumbe.nationalNumber;
|
|
1335
|
+
if (nationalNumber !== number) {
|
|
1336
|
+
if (!shouldHaveExtractedNationalPrefix(number, nationalNumber, metadata)) {
|
|
1337
|
+
// Don't strip the national prefix.
|
|
1338
|
+
return {
|
|
1339
|
+
nationalNumber: number
|
|
1340
|
+
};
|
|
1341
|
+
}
|
|
1342
|
+
// Check the national (significant) number length after extracting national prefix and carrier code.
|
|
1343
|
+
// Legacy generated metadata (before `1.0.18`) didn't support the "possible lengths" feature.
|
|
1344
|
+
if (metadata.numberingPlan.possibleLengths()) {
|
|
1345
|
+
// If an exact `country` is not specified, attempt to detect it from the assumed national number.
|
|
1346
|
+
if (!country) {
|
|
1347
|
+
country = getCountryByCallingCode(metadata.numberingPlan.callingCode(), {
|
|
1348
|
+
nationalNumber: nationalNumber,
|
|
1349
|
+
metadata: metadata
|
|
1350
|
+
});
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
// The number remaining after stripping the national prefix and carrier code
|
|
1354
|
+
// should be long enough to have a possible length for the country.
|
|
1355
|
+
// Otherwise, don't strip the national prefix and carrier code,
|
|
1356
|
+
// since the original number could be a valid number.
|
|
1357
|
+
// This check has been copy-pasted "as is" from Google's original library:
|
|
1358
|
+
// https://github.com/google/libphonenumber/blob/876268eb1ad6cdc1b7b5bef17fc5e43052702d57/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L3236-L3250
|
|
1359
|
+
// It doesn't check for the "possibility" of the original `number`.
|
|
1360
|
+
// I guess it's fine not checking that one. It works as is anyway.
|
|
1361
|
+
if (!isPossibleIncompleteNationalNumber(nationalNumber, country, metadata)) {
|
|
1362
|
+
// Don't strip the national prefix.
|
|
1363
|
+
return {
|
|
1364
|
+
nationalNumber: number
|
|
1365
|
+
};
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
return {
|
|
1370
|
+
nationalNumber: nationalNumber,
|
|
1371
|
+
carrierCode: carrierCode
|
|
1372
|
+
};
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
// In some countries, the same digit could be a national prefix
|
|
1376
|
+
// or a leading digit of a valid phone number.
|
|
1377
|
+
// For example, in Russia, national prefix is `8`,
|
|
1378
|
+
// and also `800 555 35 35` is a valid number
|
|
1379
|
+
// in which `8` is not a national prefix, but the first digit
|
|
1380
|
+
// of a national (significant) number.
|
|
1381
|
+
// Same's with Belarus:
|
|
1382
|
+
// `82004910060` is a valid national (significant) number,
|
|
1383
|
+
// but `2004910060` is not.
|
|
1384
|
+
// To support such cases (to prevent the code from always stripping
|
|
1385
|
+
// national prefix), a condition is imposed: a national prefix
|
|
1386
|
+
// is not extracted when the original number is "viable" and the
|
|
1387
|
+
// resultant number is not, a "viable" national number being the one
|
|
1388
|
+
// that matches `national_number_pattern`.
|
|
1389
|
+
function shouldHaveExtractedNationalPrefix(nationalNumberBefore, nationalNumberAfter, metadata) {
|
|
1390
|
+
// The equivalent in Google's code is:
|
|
1391
|
+
// https://github.com/google/libphonenumber/blob/e326fa1fc4283bb05eb35cb3c15c18f98a31af33/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L2969-L3004
|
|
1392
|
+
if (matchesEntirely(nationalNumberBefore, metadata.nationalNumberPattern()) && !matchesEntirely(nationalNumberAfter, metadata.nationalNumberPattern())) {
|
|
1393
|
+
return false;
|
|
1394
|
+
}
|
|
1395
|
+
// This "is possible" national number (length) check has been commented out
|
|
1396
|
+
// because it's superceded by the (effectively) same check done in the
|
|
1397
|
+
// `extractNationalNumber()` function after it calls `shouldHaveExtractedNationalPrefix()`.
|
|
1398
|
+
// In other words, why run the same check twice if it could only be run once.
|
|
1399
|
+
// // Check the national (significant) number length after extracting national prefix and carrier code.
|
|
1400
|
+
// // Fixes a minor "weird behavior" bug: https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/57
|
|
1401
|
+
// // (Legacy generated metadata (before `1.0.18`) didn't support the "possible lengths" feature).
|
|
1402
|
+
// if (metadata.possibleLengths()) {
|
|
1403
|
+
// if (isPossibleIncompleteNationalNumber(nationalNumberBefore, metadata) &&
|
|
1404
|
+
// !isPossibleIncompleteNationalNumber(nationalNumberAfter, metadata)) {
|
|
1405
|
+
// return false
|
|
1406
|
+
// }
|
|
1407
|
+
// }
|
|
1408
|
+
return true;
|
|
1409
|
+
}
|
|
1410
|
+
function isPossibleIncompleteNationalNumber(nationalNumber, country, metadata) {
|
|
1411
|
+
switch (checkNumberLength(nationalNumber, country, metadata)) {
|
|
1412
|
+
case 'TOO_SHORT':
|
|
1413
|
+
case 'INVALID_LENGTH':
|
|
1414
|
+
// This library ignores "local-only" phone numbers (for simplicity).
|
|
1415
|
+
// See the readme for more info on what are "local-only" phone numbers.
|
|
1416
|
+
// case 'IS_POSSIBLE_LOCAL_ONLY':
|
|
1417
|
+
return false;
|
|
1418
|
+
default:
|
|
1419
|
+
return true;
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
/**
|
|
1424
|
+
* Sometimes some people incorrectly input international phone numbers
|
|
1425
|
+
* without the leading `+`. This function corrects such input.
|
|
1426
|
+
* @param {string} number — Phone number digits.
|
|
1427
|
+
* @param {string} [country] — Exact country of the phone number.
|
|
1428
|
+
* @param {string} [defaultCountry]
|
|
1429
|
+
* @param {string} [defaultCallingCode]
|
|
1430
|
+
* @param {object} metadata
|
|
1431
|
+
* @return {object} `{ countryCallingCode: string?, number: string }`.
|
|
1432
|
+
*/
|
|
1433
|
+
function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, defaultCountry, defaultCallingCode, metadata) {
|
|
1434
|
+
var countryCallingCode = country || defaultCountry ? getCountryCallingCode(country || defaultCountry, metadata) : defaultCallingCode;
|
|
1435
|
+
if (number.indexOf(countryCallingCode) === 0) {
|
|
1436
|
+
metadata = new Metadata(metadata);
|
|
1437
|
+
metadata.selectNumberingPlan(country || defaultCountry, countryCallingCode);
|
|
1438
|
+
var possibleShorterNumber = number.slice(countryCallingCode.length);
|
|
1439
|
+
var _extractNationalNumbe = extractNationalNumber(possibleShorterNumber, country, metadata),
|
|
1440
|
+
possibleShorterNationalNumber = _extractNationalNumbe.nationalNumber;
|
|
1441
|
+
var _extractNationalNumbe2 = extractNationalNumber(number, country, metadata),
|
|
1442
|
+
nationalNumber = _extractNationalNumbe2.nationalNumber;
|
|
1443
|
+
|
|
1444
|
+
// If the number was not valid before but is valid now,
|
|
1445
|
+
// or if it was too long before, we consider the number
|
|
1446
|
+
// with the country calling code stripped to be a better result
|
|
1447
|
+
// and keep that instead.
|
|
1448
|
+
// For example, in Germany (+49), `49` is a valid area code,
|
|
1449
|
+
// so if a number starts with `49`, it could be both a valid
|
|
1450
|
+
// national German number or an international number without
|
|
1451
|
+
// a leading `+`.
|
|
1452
|
+
if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) && matchesEntirely(possibleShorterNationalNumber, metadata.nationalNumberPattern()) || checkNumberLength(nationalNumber, country, metadata) === 'TOO_LONG') {
|
|
1453
|
+
return {
|
|
1454
|
+
countryCallingCode: countryCallingCode,
|
|
1455
|
+
number: possibleShorterNumber
|
|
1456
|
+
};
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
return {
|
|
1460
|
+
number: number
|
|
1461
|
+
};
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
/**
|
|
1465
|
+
* Converts a phone number digits (possibly with a `+`)
|
|
1466
|
+
* into a calling code and the rest phone number digits.
|
|
1467
|
+
* The "rest phone number digits" could include
|
|
1468
|
+
* a national prefix, carrier code, and national
|
|
1469
|
+
* (significant) number.
|
|
1470
|
+
* @param {string} number — Phone number digits (possibly with a `+`).
|
|
1471
|
+
* @param {string} [country] — Country.
|
|
1472
|
+
* @param {string} [defaultCountry] — Default country.
|
|
1473
|
+
* @param {string} [defaultCallingCode] — Default calling code (some phone numbering plans are non-geographic).
|
|
1474
|
+
* @param {object} metadata
|
|
1475
|
+
* @return {object} `{ countryCallingCodeSource: string?, countryCallingCode: string?, number: string }`
|
|
1476
|
+
* @example
|
|
1477
|
+
* // Returns `{ countryCallingCode: "1", number: "2133734253" }`.
|
|
1478
|
+
* extractCountryCallingCode('2133734253', null, 'US', null, metadata)
|
|
1479
|
+
* extractCountryCallingCode('2133734253', null, null, '1', metadata)
|
|
1480
|
+
* extractCountryCallingCode('+12133734253', null, null, null, metadata)
|
|
1481
|
+
* extractCountryCallingCode('+12133734253', null, 'RU', null, metadata)
|
|
1482
|
+
*/
|
|
1483
|
+
function extractCountryCallingCode(number, country, defaultCountry, defaultCallingCode, metadata) {
|
|
1484
|
+
if (!number) {
|
|
1485
|
+
return {};
|
|
1486
|
+
}
|
|
1487
|
+
var isNumberWithIddPrefix;
|
|
1488
|
+
|
|
1489
|
+
// If this is not an international phone number,
|
|
1490
|
+
// then either extract an "IDD" prefix, or extract a
|
|
1491
|
+
// country calling code from a number by autocorrecting it
|
|
1492
|
+
// by prepending a leading `+` in cases when it starts
|
|
1493
|
+
// with the country calling code.
|
|
1494
|
+
// https://wikitravel.org/en/International_dialling_prefix
|
|
1495
|
+
// https://github.com/catamphetamine/libphonenumber-js/issues/376
|
|
1496
|
+
if (number[0] !== '+') {
|
|
1497
|
+
// Convert an "out-of-country" dialing phone number
|
|
1498
|
+
// to a proper international phone number.
|
|
1499
|
+
var numberWithoutIDD = stripIddPrefix(number, country || defaultCountry, defaultCallingCode, metadata);
|
|
1500
|
+
// If an IDD prefix was stripped then
|
|
1501
|
+
// convert the number to international one
|
|
1502
|
+
// for subsequent parsing.
|
|
1503
|
+
if (numberWithoutIDD && numberWithoutIDD !== number) {
|
|
1504
|
+
isNumberWithIddPrefix = true;
|
|
1505
|
+
number = '+' + numberWithoutIDD;
|
|
1506
|
+
} else {
|
|
1507
|
+
// Check to see if the number starts with the country calling code
|
|
1508
|
+
// for the default country. If so, we remove the country calling code,
|
|
1509
|
+
// and do some checks on the validity of the number before and after.
|
|
1510
|
+
// https://github.com/catamphetamine/libphonenumber-js/issues/376
|
|
1511
|
+
if (country || defaultCountry || defaultCallingCode) {
|
|
1512
|
+
var _extractCountryCallin = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, defaultCountry, defaultCallingCode, metadata),
|
|
1513
|
+
countryCallingCode = _extractCountryCallin.countryCallingCode,
|
|
1514
|
+
shorterNumber = _extractCountryCallin.number;
|
|
1515
|
+
if (countryCallingCode) {
|
|
1516
|
+
return {
|
|
1517
|
+
countryCallingCodeSource: 'FROM_NUMBER_WITHOUT_PLUS_SIGN',
|
|
1518
|
+
countryCallingCode: countryCallingCode,
|
|
1519
|
+
number: shorterNumber
|
|
1520
|
+
};
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
return {
|
|
1524
|
+
// No need to set it to `UNSPECIFIED`. It can be just `undefined`.
|
|
1525
|
+
// countryCallingCodeSource: 'UNSPECIFIED',
|
|
1526
|
+
number: number
|
|
1527
|
+
};
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
// `number` can only be international at this point.
|
|
1532
|
+
|
|
1533
|
+
// Fast abortion: country codes do not begin with a '0'
|
|
1534
|
+
if (number[1] === '0') {
|
|
1535
|
+
return {};
|
|
1536
|
+
}
|
|
1537
|
+
metadata = new Metadata(metadata);
|
|
1538
|
+
|
|
1539
|
+
// The thing with country phone codes
|
|
1540
|
+
// is that they are orthogonal to each other
|
|
1541
|
+
// i.e. there's no such country phone code A
|
|
1542
|
+
// for which country phone code B exists
|
|
1543
|
+
// where B starts with A.
|
|
1544
|
+
// Therefore, while scanning digits,
|
|
1545
|
+
// if a valid country code is found,
|
|
1546
|
+
// that means that it is the country code.
|
|
1547
|
+
//
|
|
1548
|
+
var i = 2;
|
|
1549
|
+
while (i - 1 <= MAX_LENGTH_COUNTRY_CODE && i <= number.length) {
|
|
1550
|
+
var _countryCallingCode = number.slice(1, i);
|
|
1551
|
+
if (metadata.hasCallingCode(_countryCallingCode)) {
|
|
1552
|
+
metadata.selectNumberingPlan(_countryCallingCode);
|
|
1553
|
+
return {
|
|
1554
|
+
countryCallingCodeSource: isNumberWithIddPrefix ? 'FROM_NUMBER_WITH_IDD' : 'FROM_NUMBER_WITH_PLUS_SIGN',
|
|
1555
|
+
countryCallingCode: _countryCallingCode,
|
|
1556
|
+
number: number.slice(i)
|
|
1557
|
+
};
|
|
1558
|
+
}
|
|
1559
|
+
i++;
|
|
1560
|
+
}
|
|
1561
|
+
return {};
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
// The possible values for the returned `countryCallingCodeSource` are:
|
|
1565
|
+
//
|
|
1566
|
+
// Copy-pasted from:
|
|
1567
|
+
// https://github.com/google/libphonenumber/blob/master/resources/phonenumber.proto
|
|
1568
|
+
//
|
|
1569
|
+
// // The source from which the country_code is derived. This is not set in the
|
|
1570
|
+
// // general parsing method, but in the method that parses and keeps raw_input.
|
|
1571
|
+
// // New fields could be added upon request.
|
|
1572
|
+
// enum CountryCodeSource {
|
|
1573
|
+
// // Default value returned if this is not set, because the phone number was
|
|
1574
|
+
// // created using parse, not parseAndKeepRawInput. hasCountryCodeSource will
|
|
1575
|
+
// // return false if this is the case.
|
|
1576
|
+
// UNSPECIFIED = 0;
|
|
1577
|
+
//
|
|
1578
|
+
// // The country_code is derived based on a phone number with a leading "+",
|
|
1579
|
+
// // e.g. the French number "+33 1 42 68 53 00".
|
|
1580
|
+
// FROM_NUMBER_WITH_PLUS_SIGN = 1;
|
|
1581
|
+
//
|
|
1582
|
+
// // The country_code is derived based on a phone number with a leading IDD,
|
|
1583
|
+
// // e.g. the French number "011 33 1 42 68 53 00", as it is dialled from US.
|
|
1584
|
+
// FROM_NUMBER_WITH_IDD = 5;
|
|
1585
|
+
//
|
|
1586
|
+
// // The country_code is derived based on a phone number without a leading
|
|
1587
|
+
// // "+", e.g. the French number "33 1 42 68 53 00" when defaultCountry is
|
|
1588
|
+
// // supplied as France.
|
|
1589
|
+
// FROM_NUMBER_WITHOUT_PLUS_SIGN = 10;
|
|
1590
|
+
//
|
|
1591
|
+
// // The country_code is derived NOT based on the phone number itself, but
|
|
1592
|
+
// // from the defaultCountry parameter provided in the parsing function by the
|
|
1593
|
+
// // clients. This happens mostly for numbers written in the national format
|
|
1594
|
+
// // (without country code). For example, this would be set when parsing the
|
|
1595
|
+
// // French number "01 42 68 53 00", when defaultCountry is supplied as
|
|
1596
|
+
// // France.
|
|
1597
|
+
// FROM_DEFAULT_COUNTRY = 20;
|
|
1598
|
+
// }
|
|
1599
|
+
|
|
1600
|
+
// Removes brackets and replaces dashes with spaces.
|
|
1601
|
+
//
|
|
1602
|
+
// E.g. "(999) 111-22-33" -> "999 111 22 33"
|
|
1603
|
+
//
|
|
1604
|
+
// For some reason Google's metadata contains `<intlFormat/>`s with brackets and dashes.
|
|
1605
|
+
// Meanwhile, there's no single opinion about using punctuation in international phone numbers.
|
|
1606
|
+
//
|
|
1607
|
+
// For example, Google's `<intlFormat/>` for USA is `+1 213-373-4253`.
|
|
1608
|
+
// And here's a quote from WikiPedia's "North American Numbering Plan" page:
|
|
1609
|
+
// https://en.wikipedia.org/wiki/North_American_Numbering_Plan
|
|
1610
|
+
//
|
|
1611
|
+
// "The country calling code for all countries participating in the NANP is 1.
|
|
1612
|
+
// In international format, an NANP number should be listed as +1 301 555 01 00,
|
|
1613
|
+
// where 301 is an area code (Maryland)."
|
|
1614
|
+
//
|
|
1615
|
+
// I personally prefer the international format without any punctuation.
|
|
1616
|
+
// For example, brackets are remnants of the old age, meaning that the
|
|
1617
|
+
// phone number part in brackets (so called "area code") can be omitted
|
|
1618
|
+
// if dialing within the same "area".
|
|
1619
|
+
// And hyphens were clearly introduced for splitting local numbers into memorizable groups.
|
|
1620
|
+
// For example, remembering "5553535" is difficult but "555-35-35" is much simpler.
|
|
1621
|
+
// Imagine a man taking a bus from home to work and seeing an ad with a phone number.
|
|
1622
|
+
// He has a couple of seconds to memorize that number until it passes by.
|
|
1623
|
+
// If it were spaces instead of hyphens the man wouldn't necessarily get it,
|
|
1624
|
+
// but with hyphens instead of spaces the grouping is more explicit.
|
|
1625
|
+
// I personally think that hyphens introduce visual clutter,
|
|
1626
|
+
// so I prefer replacing them with spaces in international numbers.
|
|
1627
|
+
// In the modern age all output is done on displays where spaces are clearly distinguishable
|
|
1628
|
+
// so hyphens can be safely replaced with spaces without losing any legibility.
|
|
1629
|
+
//
|
|
1630
|
+
function applyInternationalSeparatorStyle(formattedNumber) {
|
|
1631
|
+
return formattedNumber.replace(new RegExp("[".concat(VALID_PUNCTUATION, "]+"), 'g'), ' ').trim();
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
// This was originally set to $1 but there are some countries for which the
|
|
1635
|
+
// first group is not used in the national pattern (e.g. Argentina) so the $1
|
|
1636
|
+
// group does not match correctly. Therefore, we use `\d`, so that the first
|
|
1637
|
+
// group actually used in the pattern will be matched.
|
|
1638
|
+
var FIRST_GROUP_PATTERN = /(\$\d)/;
|
|
1639
|
+
function formatNationalNumberUsingFormat(number, format, _ref) {
|
|
1640
|
+
var useInternationalFormat = _ref.useInternationalFormat,
|
|
1641
|
+
withNationalPrefix = _ref.withNationalPrefix;
|
|
1642
|
+
var formattedNumber = number.replace(new RegExp(format.pattern()), useInternationalFormat ? format.internationalFormat() :
|
|
1643
|
+
// This library doesn't use `domestic_carrier_code_formatting_rule`,
|
|
1644
|
+
// because that one is only used when formatting phone numbers
|
|
1645
|
+
// for dialing from a mobile phone, and this is not a dialing library.
|
|
1646
|
+
// carrierCode && format.domesticCarrierCodeFormattingRule()
|
|
1647
|
+
// // First, replace the $CC in the formatting rule with the desired carrier code.
|
|
1648
|
+
// // Then, replace the $FG in the formatting rule with the first group
|
|
1649
|
+
// // and the carrier code combined in the appropriate way.
|
|
1650
|
+
// ? format.format().replace(FIRST_GROUP_PATTERN, format.domesticCarrierCodeFormattingRule().replace('$CC', carrierCode))
|
|
1651
|
+
// : (
|
|
1652
|
+
// withNationalPrefix && format.nationalPrefixFormattingRule()
|
|
1653
|
+
// ? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule())
|
|
1654
|
+
// : format.format()
|
|
1655
|
+
// )
|
|
1656
|
+
withNationalPrefix && format.nationalPrefixFormattingRule() ? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule()) : format.format());
|
|
1657
|
+
if (useInternationalFormat) {
|
|
1658
|
+
return applyInternationalSeparatorStyle(formattedNumber);
|
|
1659
|
+
}
|
|
1660
|
+
return formattedNumber;
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
/**
|
|
1664
|
+
* Pattern that makes it easy to distinguish whether a region has a single
|
|
1665
|
+
* international dialing prefix or not. If a region has a single international
|
|
1666
|
+
* prefix (e.g. 011 in USA), it will be represented as a string that contains
|
|
1667
|
+
* a sequence of ASCII digits, and possibly a tilde, which signals waiting for
|
|
1668
|
+
* the tone. If there are multiple available international prefixes in a
|
|
1669
|
+
* region, they will be represented as a regex string that always contains one
|
|
1670
|
+
* or more characters that are not ASCII digits or a tilde.
|
|
1671
|
+
*/
|
|
1672
|
+
var SINGLE_IDD_PREFIX_REG_EXP = /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;
|
|
1673
|
+
|
|
1674
|
+
// For regions that have multiple IDD prefixes
|
|
1675
|
+
// a preferred IDD prefix is returned.
|
|
1676
|
+
function getIddPrefix(country, callingCode, metadata) {
|
|
1677
|
+
var countryMetadata = new Metadata(metadata);
|
|
1678
|
+
countryMetadata.selectNumberingPlan(country, callingCode);
|
|
1679
|
+
if (countryMetadata.defaultIDDPrefix()) {
|
|
1680
|
+
return countryMetadata.defaultIDDPrefix();
|
|
1681
|
+
}
|
|
1682
|
+
if (SINGLE_IDD_PREFIX_REG_EXP.test(countryMetadata.IDDPrefix())) {
|
|
1683
|
+
return countryMetadata.IDDPrefix();
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
// The RFC 3966 format for extensions.
|
|
1688
|
+
var RFC3966_EXTN_PREFIX = ';ext=';
|
|
1689
|
+
|
|
1690
|
+
/**
|
|
1691
|
+
* Helper method for constructing regular expressions for parsing. Creates
|
|
1692
|
+
* an expression that captures up to max_length digits.
|
|
1693
|
+
* @return {string} RegEx pattern to capture extension digits.
|
|
1694
|
+
*/
|
|
1695
|
+
var getExtensionDigitsPattern = function getExtensionDigitsPattern(maxLength) {
|
|
1696
|
+
return "([".concat(VALID_DIGITS, "]{1,").concat(maxLength, "})");
|
|
1697
|
+
};
|
|
1698
|
+
|
|
1699
|
+
/**
|
|
1700
|
+
* Helper initialiser method to create the regular-expression pattern to match
|
|
1701
|
+
* extensions.
|
|
1702
|
+
* Copy-pasted from Google's `libphonenumber`:
|
|
1703
|
+
* https://github.com/google/libphonenumber/blob/55b2646ec9393f4d3d6661b9c82ef9e258e8b829/javascript/i18n/phonenumbers/phonenumberutil.js#L759-L766
|
|
1704
|
+
* @return {string} RegEx pattern to capture extensions.
|
|
1705
|
+
*/
|
|
1706
|
+
function createExtensionPattern(purpose) {
|
|
1707
|
+
// We cap the maximum length of an extension based on the ambiguity of the way
|
|
1708
|
+
// the extension is prefixed. As per ITU, the officially allowed length for
|
|
1709
|
+
// extensions is actually 40, but we don't support this since we haven't seen real
|
|
1710
|
+
// examples and this introduces many false interpretations as the extension labels
|
|
1711
|
+
// are not standardized.
|
|
1712
|
+
/** @type {string} */
|
|
1713
|
+
var extLimitAfterExplicitLabel = '20';
|
|
1714
|
+
/** @type {string} */
|
|
1715
|
+
var extLimitAfterLikelyLabel = '15';
|
|
1716
|
+
/** @type {string} */
|
|
1717
|
+
var extLimitAfterAmbiguousChar = '9';
|
|
1718
|
+
/** @type {string} */
|
|
1719
|
+
var extLimitWhenNotSure = '6';
|
|
1720
|
+
|
|
1721
|
+
/** @type {string} */
|
|
1722
|
+
var possibleSeparatorsBetweenNumberAndExtLabel = "[ \xA0\\t,]*";
|
|
1723
|
+
// Optional full stop (.) or colon, followed by zero or more spaces/tabs/commas.
|
|
1724
|
+
/** @type {string} */
|
|
1725
|
+
var possibleCharsAfterExtLabel = "[:\\.\uFF0E]?[ \xA0\\t,-]*";
|
|
1726
|
+
/** @type {string} */
|
|
1727
|
+
var optionalExtnSuffix = "#?";
|
|
1728
|
+
|
|
1729
|
+
// Here the extension is called out in more explicit way, i.e mentioning it obvious
|
|
1730
|
+
// patterns like "ext.".
|
|
1731
|
+
/** @type {string} */
|
|
1732
|
+
var explicitExtLabels = "(?:e?xt(?:ensi(?:o\u0301?|\xF3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|\u0434\u043E\u0431|anexo)";
|
|
1733
|
+
// One-character symbols that can be used to indicate an extension, and less
|
|
1734
|
+
// commonly used or more ambiguous extension labels.
|
|
1735
|
+
/** @type {string} */
|
|
1736
|
+
var ambiguousExtLabels = "(?:[x\uFF58#\uFF03~\uFF5E]|int|\uFF49\uFF4E\uFF54)";
|
|
1737
|
+
// When extension is not separated clearly.
|
|
1738
|
+
/** @type {string} */
|
|
1739
|
+
var ambiguousSeparator = "[- ]+";
|
|
1740
|
+
// This is the same as possibleSeparatorsBetweenNumberAndExtLabel, but not matching
|
|
1741
|
+
// comma as extension label may have it.
|
|
1742
|
+
/** @type {string} */
|
|
1743
|
+
var possibleSeparatorsNumberExtLabelNoComma = "[ \xA0\\t]*";
|
|
1744
|
+
// ",," is commonly used for auto dialling the extension when connected. First
|
|
1745
|
+
// comma is matched through possibleSeparatorsBetweenNumberAndExtLabel, so we do
|
|
1746
|
+
// not repeat it here. Semi-colon works in Iphone and Android also to pop up a
|
|
1747
|
+
// button with the extension number following.
|
|
1748
|
+
/** @type {string} */
|
|
1749
|
+
var autoDiallingAndExtLabelsFound = "(?:,{2}|;)";
|
|
1750
|
+
|
|
1751
|
+
/** @type {string} */
|
|
1752
|
+
var rfcExtn = RFC3966_EXTN_PREFIX + getExtensionDigitsPattern(extLimitAfterExplicitLabel);
|
|
1753
|
+
/** @type {string} */
|
|
1754
|
+
var explicitExtn = possibleSeparatorsBetweenNumberAndExtLabel + explicitExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterExplicitLabel) + optionalExtnSuffix;
|
|
1755
|
+
/** @type {string} */
|
|
1756
|
+
var ambiguousExtn = possibleSeparatorsBetweenNumberAndExtLabel + ambiguousExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;
|
|
1757
|
+
/** @type {string} */
|
|
1758
|
+
var americanStyleExtnWithSuffix = ambiguousSeparator + getExtensionDigitsPattern(extLimitWhenNotSure) + "#";
|
|
1759
|
+
|
|
1760
|
+
/** @type {string} */
|
|
1761
|
+
var autoDiallingExtn = possibleSeparatorsNumberExtLabelNoComma + autoDiallingAndExtLabelsFound + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterLikelyLabel) + optionalExtnSuffix;
|
|
1762
|
+
/** @type {string} */
|
|
1763
|
+
var onlyCommasExtn = possibleSeparatorsNumberExtLabelNoComma + "(?:,)+" + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;
|
|
1764
|
+
|
|
1765
|
+
// The first regular expression covers RFC 3966 format, where the extension is added
|
|
1766
|
+
// using ";ext=". The second more generic where extension is mentioned with explicit
|
|
1767
|
+
// labels like "ext:". In both the above cases we allow more numbers in extension than
|
|
1768
|
+
// any other extension labels. The third one captures when single character extension
|
|
1769
|
+
// labels or less commonly used labels are used. In such cases we capture fewer
|
|
1770
|
+
// extension digits in order to reduce the chance of falsely interpreting two
|
|
1771
|
+
// numbers beside each other as a number + extension. The fourth one covers the
|
|
1772
|
+
// special case of American numbers where the extension is written with a hash
|
|
1773
|
+
// at the end, such as "- 503#". The fifth one is exclusively for extension
|
|
1774
|
+
// autodialling formats which are used when dialling and in this case we accept longer
|
|
1775
|
+
// extensions. The last one is more liberal on the number of commas that acts as
|
|
1776
|
+
// extension labels, so we have a strict cap on the number of digits in such extensions.
|
|
1777
|
+
return rfcExtn + "|" + explicitExtn + "|" + ambiguousExtn + "|" + americanStyleExtnWithSuffix + "|" + autoDiallingExtn + "|" + onlyCommasExtn;
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
// Regular expression of viable phone numbers. This is location independent.
|
|
1781
|
+
// Checks we have at least three leading digits, and only valid punctuation,
|
|
1782
|
+
// alpha characters and digits in the phone number. Does not include extension
|
|
1783
|
+
// data. The symbol 'x' is allowed here as valid punctuation since it is often
|
|
1784
|
+
// used as a placeholder for carrier codes, for example in Brazilian phone
|
|
1785
|
+
// numbers. We also allow multiple '+' characters at the start.
|
|
1786
|
+
//
|
|
1787
|
+
// Corresponds to the following:
|
|
1788
|
+
// [digits]{minLengthNsn}|
|
|
1789
|
+
// plus_sign*
|
|
1790
|
+
// (([punctuation]|[star])*[digits]){3,}([punctuation]|[star]|[digits]|[alpha])*
|
|
1791
|
+
//
|
|
1792
|
+
// The first reg-ex is to allow short numbers (two digits long) to be parsed if
|
|
1793
|
+
// they are entered as "15" etc, but only if there is no punctuation in them.
|
|
1794
|
+
// The second expression restricts the number of digits to three or more, but
|
|
1795
|
+
// then allows them to be in international form, and to have alpha-characters
|
|
1796
|
+
// and punctuation. We split up the two reg-exes here and combine them when
|
|
1797
|
+
// creating the reg-ex VALID_PHONE_NUMBER_PATTERN itself so we can prefix it
|
|
1798
|
+
// with ^ and append $ to each branch.
|
|
1799
|
+
//
|
|
1800
|
+
// "Note VALID_PUNCTUATION starts with a -,
|
|
1801
|
+
// so must be the first in the range" (c) Google devs.
|
|
1802
|
+
// (wtf did they mean by saying that; probably nothing)
|
|
1803
|
+
//
|
|
1804
|
+
var MIN_LENGTH_PHONE_NUMBER_PATTERN = '[' + VALID_DIGITS + ']{' + MIN_LENGTH_FOR_NSN + '}';
|
|
1805
|
+
//
|
|
1806
|
+
// And this is the second reg-exp:
|
|
1807
|
+
// (see MIN_LENGTH_PHONE_NUMBER_PATTERN for a full description of this reg-exp)
|
|
1808
|
+
//
|
|
1809
|
+
var VALID_PHONE_NUMBER = '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){3,}' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']*';
|
|
1810
|
+
|
|
1811
|
+
// This regular expression isn't present in Google's `libphonenumber`
|
|
1812
|
+
// and is only used to determine whether the phone number being input
|
|
1813
|
+
// is too short for it to even consider it a "valid" number.
|
|
1814
|
+
// This is just a way to differentiate between a really invalid phone
|
|
1815
|
+
// number like "abcde" and a valid phone number that a user has just
|
|
1816
|
+
// started inputting, like "+1" or "1": both these cases would be
|
|
1817
|
+
// considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this
|
|
1818
|
+
// library can provide a more detailed error message — whether it's
|
|
1819
|
+
// really "not a number", or is it just a start of a valid phone number.
|
|
1820
|
+
var VALID_PHONE_NUMBER_START_REG_EXP = new RegExp('^' + '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){1,2}' + '$', 'i');
|
|
1821
|
+
var VALID_PHONE_NUMBER_WITH_EXTENSION = VALID_PHONE_NUMBER +
|
|
1822
|
+
// Phone number extensions
|
|
1823
|
+
'(?:' + createExtensionPattern() + ')?';
|
|
1824
|
+
|
|
1825
|
+
// The combined regular expression for valid phone numbers:
|
|
1826
|
+
//
|
|
1827
|
+
var VALID_PHONE_NUMBER_PATTERN = new RegExp(
|
|
1828
|
+
// Either a short two-digit-only phone number
|
|
1829
|
+
'^' + MIN_LENGTH_PHONE_NUMBER_PATTERN + '$' + '|' +
|
|
1830
|
+
// Or a longer fully parsed phone number (min 3 characters)
|
|
1831
|
+
'^' + VALID_PHONE_NUMBER_WITH_EXTENSION + '$', 'i');
|
|
1832
|
+
|
|
1833
|
+
// Checks to see if the string of characters could possibly be a phone number at
|
|
1834
|
+
// all. At the moment, checks to see that the string begins with at least 2
|
|
1835
|
+
// digits, ignoring any punctuation commonly found in phone numbers. This method
|
|
1836
|
+
// does not require the number to be normalized in advance - but does assume
|
|
1837
|
+
// that leading non-number symbols have been removed, such as by the method
|
|
1838
|
+
// `extract_possible_number`.
|
|
1839
|
+
//
|
|
1840
|
+
function isViablePhoneNumber(number) {
|
|
1841
|
+
return number.length >= MIN_LENGTH_FOR_NSN && VALID_PHONE_NUMBER_PATTERN.test(number);
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
// This is just a way to differentiate between a really invalid phone
|
|
1845
|
+
// number like "abcde" and a valid phone number that a user has just
|
|
1846
|
+
// started inputting, like "+1" or "1": both these cases would be
|
|
1847
|
+
// considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this
|
|
1848
|
+
// library can provide a more detailed error message — whether it's
|
|
1849
|
+
// really "not a number", or is it just a start of a valid phone number.
|
|
1850
|
+
function isViablePhoneNumberStart(number) {
|
|
1851
|
+
return VALID_PHONE_NUMBER_START_REG_EXP.test(number);
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
/**
|
|
1855
|
+
* @param {object} - `{ ?number, ?extension }`.
|
|
1856
|
+
* @return {string} Phone URI (RFC 3966).
|
|
1857
|
+
*/
|
|
1858
|
+
function formatRFC3966(_ref) {
|
|
1859
|
+
var number = _ref.number,
|
|
1860
|
+
ext = _ref.ext;
|
|
1861
|
+
if (!number) {
|
|
1862
|
+
return '';
|
|
1863
|
+
}
|
|
1864
|
+
if (number[0] !== '+') {
|
|
1865
|
+
throw new Error("\"formatRFC3966()\" expects \"number\" to be in E.164 format.");
|
|
1866
|
+
}
|
|
1867
|
+
return "tel:".concat(number).concat(ext ? ';ext=' + ext : '');
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
// This is a port of Google Android `libphonenumber`'s
|
|
1871
|
+
var DEFAULT_OPTIONS = {
|
|
1872
|
+
formatExtension: function formatExtension(formattedNumber, extension, metadata) {
|
|
1873
|
+
return "".concat(formattedNumber).concat(metadata.ext()).concat(extension);
|
|
1874
|
+
}
|
|
1875
|
+
};
|
|
1876
|
+
|
|
1877
|
+
/**
|
|
1878
|
+
* Formats a phone number.
|
|
1879
|
+
*
|
|
1880
|
+
* format(phoneNumberInstance, 'INTERNATIONAL', { ..., v2: true }, metadata)
|
|
1881
|
+
* format(phoneNumberInstance, 'NATIONAL', { ..., v2: true }, metadata)
|
|
1882
|
+
*
|
|
1883
|
+
* format({ phone: '8005553535', country: 'RU' }, 'INTERNATIONAL', { ... }, metadata)
|
|
1884
|
+
* format({ phone: '8005553535', country: 'RU' }, 'NATIONAL', undefined, metadata)
|
|
1885
|
+
*
|
|
1886
|
+
* @param {object|PhoneNumber} input — If `options.v2: true` flag is passed, the `input` should be a `PhoneNumber` instance. Otherwise, it should be an object of shape `{ phone: '...', country: '...' }`.
|
|
1887
|
+
* @param {string} format
|
|
1888
|
+
* @param {object} [options]
|
|
1889
|
+
* @param {object} metadata
|
|
1890
|
+
* @return {string}
|
|
1891
|
+
*/
|
|
1892
|
+
function formatNumber(input, format, options, metadata) {
|
|
1893
|
+
// Apply default options.
|
|
1894
|
+
if (options) {
|
|
1895
|
+
// Using ES6 "rest spread" syntax here didn't work with `babel`/`istanbul`
|
|
1896
|
+
// for some weird reason: this line of code would cause the code coverage
|
|
1897
|
+
// to show as not 100%. That's because `babel`/`istanbul`, for some weird reason,
|
|
1898
|
+
// apparently doesn't know how to properly exclude Babel polyfills from code coverage.
|
|
1899
|
+
//
|
|
1900
|
+
// options = { ...DEFAULT_OPTIONS, ...options }
|
|
1901
|
+
//
|
|
1902
|
+
options = merge({}, DEFAULT_OPTIONS, options);
|
|
1903
|
+
} else {
|
|
1904
|
+
options = DEFAULT_OPTIONS;
|
|
1905
|
+
}
|
|
1906
|
+
metadata = new Metadata(metadata);
|
|
1907
|
+
if (input.country && input.country !== '001') {
|
|
1908
|
+
// Validate `input.country`.
|
|
1909
|
+
if (!metadata.hasCountry(input.country)) {
|
|
1910
|
+
throw new Error("Unknown country: ".concat(input.country));
|
|
1911
|
+
}
|
|
1912
|
+
metadata.selectNumberingPlan(input.country);
|
|
1913
|
+
} else if (input.countryCallingCode) {
|
|
1914
|
+
metadata.selectNumberingPlan(input.countryCallingCode);
|
|
1915
|
+
} else return input.phone || '';
|
|
1916
|
+
var countryCallingCode = metadata.countryCallingCode();
|
|
1917
|
+
var nationalNumber = options.v2 ? input.nationalNumber : input.phone;
|
|
1918
|
+
|
|
1919
|
+
// This variable should have been declared inside `case`s
|
|
1920
|
+
// but Babel has a bug and it says "duplicate variable declaration".
|
|
1921
|
+
var number;
|
|
1922
|
+
switch (format) {
|
|
1923
|
+
case 'NATIONAL':
|
|
1924
|
+
// Legacy argument support.
|
|
1925
|
+
// (`{ country: ..., phone: '' }`)
|
|
1926
|
+
if (!nationalNumber) {
|
|
1927
|
+
return '';
|
|
1928
|
+
}
|
|
1929
|
+
number = formatNationalNumber(nationalNumber, input.carrierCode, 'NATIONAL', metadata, options);
|
|
1930
|
+
return addExtension(number, input.ext, metadata, options.formatExtension);
|
|
1931
|
+
case 'INTERNATIONAL':
|
|
1932
|
+
// Legacy argument support.
|
|
1933
|
+
// (`{ country: ..., phone: '' }`)
|
|
1934
|
+
if (!nationalNumber) {
|
|
1935
|
+
return "+".concat(countryCallingCode);
|
|
1936
|
+
}
|
|
1937
|
+
number = formatNationalNumber(nationalNumber, null, 'INTERNATIONAL', metadata, options);
|
|
1938
|
+
number = "+".concat(countryCallingCode, " ").concat(number);
|
|
1939
|
+
return addExtension(number, input.ext, metadata, options.formatExtension);
|
|
1940
|
+
case 'E.164':
|
|
1941
|
+
// `E.164` doesn't define "phone number extensions".
|
|
1942
|
+
return "+".concat(countryCallingCode).concat(nationalNumber);
|
|
1943
|
+
case 'RFC3966':
|
|
1944
|
+
return formatRFC3966({
|
|
1945
|
+
number: "+".concat(countryCallingCode).concat(nationalNumber),
|
|
1946
|
+
ext: input.ext
|
|
1947
|
+
});
|
|
1948
|
+
|
|
1949
|
+
// For reference, here's Google's IDD formatter:
|
|
1950
|
+
// https://github.com/google/libphonenumber/blob/32719cf74e68796788d1ca45abc85dcdc63ba5b9/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L1546
|
|
1951
|
+
// Not saying that this IDD formatter replicates it 1:1, but it seems to work.
|
|
1952
|
+
// Who would even need to format phone numbers in IDD format anyway?
|
|
1953
|
+
case 'IDD':
|
|
1954
|
+
if (!options.fromCountry) {
|
|
1955
|
+
return;
|
|
1956
|
+
// throw new Error('`fromCountry` option not passed for IDD-prefixed formatting.')
|
|
1957
|
+
}
|
|
1958
|
+
var formattedNumber = formatIDD(nationalNumber, input.carrierCode, countryCallingCode, options.fromCountry, metadata);
|
|
1959
|
+
return addExtension(formattedNumber, input.ext, metadata, options.formatExtension);
|
|
1960
|
+
default:
|
|
1961
|
+
throw new Error("Unknown \"format\" argument passed to \"formatNumber()\": \"".concat(format, "\""));
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
function formatNationalNumber(number, carrierCode, formatAs, metadata, options) {
|
|
1965
|
+
var format = chooseFormatForNumber(metadata.formats(), number);
|
|
1966
|
+
if (!format) {
|
|
1967
|
+
return number;
|
|
1968
|
+
}
|
|
1969
|
+
return formatNationalNumberUsingFormat(number, format, {
|
|
1970
|
+
useInternationalFormat: formatAs === 'INTERNATIONAL',
|
|
1971
|
+
withNationalPrefix: format.nationalPrefixIsOptionalWhenFormattingInNationalFormat() && options && options.nationalPrefix === false ? false : true,
|
|
1972
|
+
carrierCode: carrierCode,
|
|
1973
|
+
metadata: metadata
|
|
1974
|
+
});
|
|
1975
|
+
}
|
|
1976
|
+
function chooseFormatForNumber(availableFormats, nationalNumber) {
|
|
1977
|
+
// Using a `for ... of` loop here didn't work with `babel`/`istanbul`:
|
|
1978
|
+
// for some weird reason, it showed code coverage less than 100%.
|
|
1979
|
+
// That's because `babel`/`istanbul`, for some weird reason,
|
|
1980
|
+
// apparently doesn't know how to properly exclude Babel polyfills from code coverage.
|
|
1981
|
+
//
|
|
1982
|
+
// for (const format of availableFormats) { ... }
|
|
1983
|
+
//
|
|
1984
|
+
return pickFirstMatchingElement(availableFormats, function (format) {
|
|
1985
|
+
// Validate leading digits.
|
|
1986
|
+
// The test case for "else path" could be found by searching for
|
|
1987
|
+
// "format.leadingDigitsPatterns().length === 0".
|
|
1988
|
+
if (format.leadingDigitsPatterns().length > 0) {
|
|
1989
|
+
// The last leading_digits_pattern is used here, as it is the most detailed
|
|
1990
|
+
var lastLeadingDigitsPattern = format.leadingDigitsPatterns()[format.leadingDigitsPatterns().length - 1];
|
|
1991
|
+
// If leading digits don't match then move on to the next phone number format
|
|
1992
|
+
if (nationalNumber.search(lastLeadingDigitsPattern) !== 0) {
|
|
1993
|
+
return false;
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
// Check that the national number matches the phone number format regular expression
|
|
1997
|
+
return matchesEntirely(nationalNumber, format.pattern());
|
|
1998
|
+
});
|
|
1999
|
+
}
|
|
2000
|
+
function addExtension(formattedNumber, ext, metadata, formatExtension) {
|
|
2001
|
+
return ext ? formatExtension(formattedNumber, ext, metadata) : formattedNumber;
|
|
2002
|
+
}
|
|
2003
|
+
function formatIDD(nationalNumber, carrierCode, countryCallingCode, fromCountry, metadata) {
|
|
2004
|
+
var fromCountryCallingCode = getCountryCallingCode(fromCountry, metadata.metadata);
|
|
2005
|
+
// When calling within the same country calling code.
|
|
2006
|
+
if (fromCountryCallingCode === countryCallingCode) {
|
|
2007
|
+
var formattedNumber = formatNationalNumber(nationalNumber, carrierCode, 'NATIONAL', metadata);
|
|
2008
|
+
// For NANPA regions, return the national format for these regions
|
|
2009
|
+
// but prefix it with the country calling code.
|
|
2010
|
+
if (countryCallingCode === '1') {
|
|
2011
|
+
return countryCallingCode + ' ' + formattedNumber;
|
|
2012
|
+
}
|
|
2013
|
+
// If regions share a country calling code, the country calling code need
|
|
2014
|
+
// not be dialled. This also applies when dialling within a region, so this
|
|
2015
|
+
// if clause covers both these cases. Technically this is the case for
|
|
2016
|
+
// dialling from La Reunion to other overseas departments of France (French
|
|
2017
|
+
// Guiana, Martinique, Guadeloupe), but not vice versa - so we don't cover
|
|
2018
|
+
// this edge case for now and for those cases return the version including
|
|
2019
|
+
// country calling code. Details here:
|
|
2020
|
+
// http://www.petitfute.com/voyage/225-info-pratiques-reunion
|
|
2021
|
+
//
|
|
2022
|
+
return formattedNumber;
|
|
2023
|
+
}
|
|
2024
|
+
var iddPrefix = getIddPrefix(fromCountry, undefined, metadata.metadata);
|
|
2025
|
+
if (iddPrefix) {
|
|
2026
|
+
return "".concat(iddPrefix, " ").concat(countryCallingCode, " ").concat(formatNationalNumber(nationalNumber, null, 'INTERNATIONAL', metadata));
|
|
2027
|
+
}
|
|
2028
|
+
}
|
|
2029
|
+
function merge() {
|
|
2030
|
+
var i = 1;
|
|
2031
|
+
for (var _len = arguments.length, objects = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2032
|
+
objects[_key] = arguments[_key];
|
|
2033
|
+
}
|
|
2034
|
+
while (i < objects.length) {
|
|
2035
|
+
if (objects[i]) {
|
|
2036
|
+
for (var key in objects[i]) {
|
|
2037
|
+
objects[0][key] = objects[i][key];
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
i++;
|
|
2041
|
+
}
|
|
2042
|
+
return objects[0];
|
|
2043
|
+
}
|
|
2044
|
+
function pickFirstMatchingElement(elements, testFunction) {
|
|
2045
|
+
var i = 0;
|
|
2046
|
+
while (i < elements.length) {
|
|
2047
|
+
if (testFunction(elements[i])) {
|
|
2048
|
+
return elements[i];
|
|
2049
|
+
}
|
|
2050
|
+
i++;
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
|
|
2054
|
+
function _typeof$4(o) { "@babel/helpers - typeof"; return _typeof$4 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$4(o); }
|
|
2055
|
+
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2056
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty$3(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2057
|
+
function _defineProperty$3(e, r, t) { return (r = _toPropertyKey$4(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2058
|
+
function _classCallCheck$1(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
2059
|
+
function _defineProperties$1(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$4(o.key), o); } }
|
|
2060
|
+
function _createClass$1(e, r, t) { return r && _defineProperties$1(e.prototype, r), t && _defineProperties$1(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
2061
|
+
function _toPropertyKey$4(t) { var i = _toPrimitive$4(t, "string"); return "symbol" == _typeof$4(i) ? i : i + ""; }
|
|
2062
|
+
function _toPrimitive$4(t, r) { if ("object" != _typeof$4(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$4(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
2063
|
+
var PhoneNumber = /*#__PURE__*/function () {
|
|
2064
|
+
/**
|
|
2065
|
+
* @param {string} countryOrCountryCallingCode
|
|
2066
|
+
* @param {string} nationalNumber
|
|
2067
|
+
* @param {object} metadata — Metadata JSON
|
|
2068
|
+
* @return {PhoneNumber}
|
|
2069
|
+
*/
|
|
2070
|
+
function PhoneNumber(countryOrCountryCallingCode, nationalNumber, metadata) {
|
|
2071
|
+
_classCallCheck$1(this, PhoneNumber);
|
|
2072
|
+
// Validate `countryOrCountryCallingCode` argument.
|
|
2073
|
+
if (!countryOrCountryCallingCode) {
|
|
2074
|
+
throw new TypeError('First argument is required');
|
|
2075
|
+
}
|
|
2076
|
+
if (typeof countryOrCountryCallingCode !== 'string') {
|
|
2077
|
+
throw new TypeError('First argument must be a string');
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2080
|
+
// In case of public API use: `constructor(number, metadata)`.
|
|
2081
|
+
// Transform the arguments from `constructor(number, metadata)` to
|
|
2082
|
+
// `constructor(countryOrCountryCallingCode, nationalNumber, metadata)`.
|
|
2083
|
+
if (countryOrCountryCallingCode[0] === '+' && !nationalNumber) {
|
|
2084
|
+
throw new TypeError('`metadata` argument not passed');
|
|
2085
|
+
}
|
|
2086
|
+
if (isObject(nationalNumber) && isObject(nationalNumber.countries)) {
|
|
2087
|
+
metadata = nationalNumber;
|
|
2088
|
+
var e164Number = countryOrCountryCallingCode;
|
|
2089
|
+
if (!E164_NUMBER_REGEXP.test(e164Number)) {
|
|
2090
|
+
throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');
|
|
2091
|
+
}
|
|
2092
|
+
var _extractCountryCallin = extractCountryCallingCode(e164Number, undefined, undefined, undefined, metadata),
|
|
2093
|
+
_countryCallingCode = _extractCountryCallin.countryCallingCode,
|
|
2094
|
+
number = _extractCountryCallin.number;
|
|
2095
|
+
nationalNumber = number;
|
|
2096
|
+
countryOrCountryCallingCode = _countryCallingCode;
|
|
2097
|
+
if (!nationalNumber) {
|
|
2098
|
+
throw new Error('Invalid `number` argument passed: too short');
|
|
2099
|
+
}
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
// Validate `nationalNumber` argument.
|
|
2103
|
+
if (!nationalNumber) {
|
|
2104
|
+
throw new TypeError('`nationalNumber` argument is required');
|
|
2105
|
+
}
|
|
2106
|
+
if (typeof nationalNumber !== 'string') {
|
|
2107
|
+
throw new TypeError('`nationalNumber` argument must be a string');
|
|
2108
|
+
}
|
|
2109
|
+
|
|
2110
|
+
// Validate `metadata` argument.
|
|
2111
|
+
validateMetadata(metadata);
|
|
2112
|
+
|
|
2113
|
+
// Initialize properties.
|
|
2114
|
+
var _getCountryAndCountry = getCountryAndCountryCallingCode(countryOrCountryCallingCode, metadata),
|
|
2115
|
+
country = _getCountryAndCountry.country,
|
|
2116
|
+
countryCallingCode = _getCountryAndCountry.countryCallingCode;
|
|
2117
|
+
this.country = country;
|
|
2118
|
+
this.countryCallingCode = countryCallingCode;
|
|
2119
|
+
this.nationalNumber = nationalNumber;
|
|
2120
|
+
this.number = '+' + this.countryCallingCode + this.nationalNumber;
|
|
2121
|
+
// Exclude `metadata` property output from `PhoneNumber.toString()`
|
|
2122
|
+
// so that it doesn't clutter the console output of Node.js.
|
|
2123
|
+
// Previously, when Node.js did `console.log(new PhoneNumber(...))`,
|
|
2124
|
+
// it would output the whole internal structure of the `metadata` object.
|
|
2125
|
+
this.getMetadata = function () {
|
|
2126
|
+
return metadata;
|
|
2127
|
+
};
|
|
2128
|
+
}
|
|
2129
|
+
return _createClass$1(PhoneNumber, [{
|
|
2130
|
+
key: "setExt",
|
|
2131
|
+
value: function setExt(ext) {
|
|
2132
|
+
this.ext = ext;
|
|
2133
|
+
}
|
|
2134
|
+
}, {
|
|
2135
|
+
key: "getPossibleCountries",
|
|
2136
|
+
value: function getPossibleCountries() {
|
|
2137
|
+
if (this.country) {
|
|
2138
|
+
return [this.country];
|
|
2139
|
+
}
|
|
2140
|
+
return getPossibleCountriesForNumber(this.countryCallingCode, this.nationalNumber, this.getMetadata());
|
|
2141
|
+
}
|
|
2142
|
+
}, {
|
|
2143
|
+
key: "isPossible",
|
|
2144
|
+
value: function isPossible() {
|
|
2145
|
+
return isPossiblePhoneNumber(this, {
|
|
2146
|
+
v2: true
|
|
2147
|
+
}, this.getMetadata());
|
|
2148
|
+
}
|
|
2149
|
+
}, {
|
|
2150
|
+
key: "isValid",
|
|
2151
|
+
value: function isValid() {
|
|
2152
|
+
return isValidNumber(this, {
|
|
2153
|
+
v2: true
|
|
2154
|
+
}, this.getMetadata());
|
|
2155
|
+
}
|
|
2156
|
+
}, {
|
|
2157
|
+
key: "isNonGeographic",
|
|
2158
|
+
value: function isNonGeographic() {
|
|
2159
|
+
var metadata = new Metadata(this.getMetadata());
|
|
2160
|
+
return metadata.isNonGeographicCallingCode(this.countryCallingCode);
|
|
2161
|
+
}
|
|
2162
|
+
}, {
|
|
2163
|
+
key: "isEqual",
|
|
2164
|
+
value: function isEqual(phoneNumber) {
|
|
2165
|
+
return this.number === phoneNumber.number && this.ext === phoneNumber.ext;
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
// This function was originally meant to be an equivalent for `validatePhoneNumberLength()`,
|
|
2169
|
+
// but later it was found out that it doesn't include the possible `TOO_SHORT` result
|
|
2170
|
+
// returned from `parsePhoneNumberWithError()` in the original `validatePhoneNumberLength()`,
|
|
2171
|
+
// so eventually I simply commented out this method from the `PhoneNumber` class
|
|
2172
|
+
// and just left the `validatePhoneNumberLength()` function, even though that one would require
|
|
2173
|
+
// and additional step to also validate the actual country / calling code of the phone number.
|
|
2174
|
+
// validateLength() {
|
|
2175
|
+
// const metadata = new Metadata(this.getMetadata())
|
|
2176
|
+
// metadata.selectNumberingPlan(this.countryCallingCode)
|
|
2177
|
+
// const result = checkNumberLength(this.nationalNumber, metadata)
|
|
2178
|
+
// if (result !== 'IS_POSSIBLE') {
|
|
2179
|
+
// return result
|
|
2180
|
+
// }
|
|
2181
|
+
// }
|
|
2182
|
+
}, {
|
|
2183
|
+
key: "getType",
|
|
2184
|
+
value: function getType() {
|
|
2185
|
+
return getNumberType(this, {
|
|
2186
|
+
v2: true
|
|
2187
|
+
}, this.getMetadata());
|
|
2188
|
+
}
|
|
2189
|
+
}, {
|
|
2190
|
+
key: "format",
|
|
2191
|
+
value: function format(_format, options) {
|
|
2192
|
+
return formatNumber(this, _format, options ? _objectSpread$3(_objectSpread$3({}, options), {}, {
|
|
2193
|
+
v2: true
|
|
2194
|
+
}) : {
|
|
2195
|
+
v2: true
|
|
2196
|
+
}, this.getMetadata());
|
|
2197
|
+
}
|
|
2198
|
+
}, {
|
|
2199
|
+
key: "formatNational",
|
|
2200
|
+
value: function formatNational(options) {
|
|
2201
|
+
return this.format('NATIONAL', options);
|
|
2202
|
+
}
|
|
2203
|
+
}, {
|
|
2204
|
+
key: "formatInternational",
|
|
2205
|
+
value: function formatInternational(options) {
|
|
2206
|
+
return this.format('INTERNATIONAL', options);
|
|
2207
|
+
}
|
|
2208
|
+
}, {
|
|
2209
|
+
key: "getURI",
|
|
2210
|
+
value: function getURI(options) {
|
|
2211
|
+
return this.format('RFC3966', options);
|
|
2212
|
+
}
|
|
2213
|
+
}]);
|
|
2214
|
+
}();
|
|
2215
|
+
var isCountryCode = function isCountryCode(value) {
|
|
2216
|
+
return /^[A-Z]{2}$/.test(value);
|
|
2217
|
+
};
|
|
2218
|
+
function getCountryAndCountryCallingCode(countryOrCountryCallingCode, metadataJson) {
|
|
2219
|
+
var country;
|
|
2220
|
+
var countryCallingCode;
|
|
2221
|
+
var metadata = new Metadata(metadataJson);
|
|
2222
|
+
// If country code is passed then derive `countryCallingCode` from it.
|
|
2223
|
+
// Also store the country code as `.country`.
|
|
2224
|
+
if (isCountryCode(countryOrCountryCallingCode)) {
|
|
2225
|
+
country = countryOrCountryCallingCode;
|
|
2226
|
+
metadata.selectNumberingPlan(country);
|
|
2227
|
+
countryCallingCode = metadata.countryCallingCode();
|
|
2228
|
+
} else {
|
|
2229
|
+
countryCallingCode = countryOrCountryCallingCode;
|
|
2230
|
+
}
|
|
2231
|
+
return {
|
|
2232
|
+
country: country,
|
|
2233
|
+
countryCallingCode: countryCallingCode
|
|
2234
|
+
};
|
|
2235
|
+
}
|
|
2236
|
+
var E164_NUMBER_REGEXP = /^\+\d+$/;
|
|
2237
|
+
|
|
2238
|
+
function _typeof$3(o) { "@babel/helpers - typeof"; return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$3(o); }
|
|
2239
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$3(o.key), o); } }
|
|
2240
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
2241
|
+
function _toPropertyKey$3(t) { var i = _toPrimitive$3(t, "string"); return "symbol" == _typeof$3(i) ? i : i + ""; }
|
|
2242
|
+
function _toPrimitive$3(t, r) { if ("object" != _typeof$3(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$3(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
2243
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
2244
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
2245
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof$3(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
2246
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
2247
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
2248
|
+
function _wrapNativeSuper(t) { var r = "function" == typeof Map ? new Map() : void 0; return _wrapNativeSuper = function _wrapNativeSuper(t) { if (null === t || !_isNativeFunction(t)) return t; if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); if (void 0 !== r) { if (r.has(t)) return r.get(t); r.set(t, Wrapper); } function Wrapper() { return _construct(t, arguments, _getPrototypeOf(this).constructor); } return Wrapper.prototype = Object.create(t.prototype, { constructor: { value: Wrapper, enumerable: !1, writable: !0, configurable: !0 } }), _setPrototypeOf(Wrapper, t); }, _wrapNativeSuper(t); }
|
|
2249
|
+
function _construct(t, e, r) { if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); var o = [null]; o.push.apply(o, e); var p = new (t.bind.apply(t, o))(); return r && _setPrototypeOf(p, r.prototype), p; }
|
|
2250
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
2251
|
+
function _isNativeFunction(t) { try { return -1 !== Function.toString.call(t).indexOf("[native code]"); } catch (n) { return "function" == typeof t; } }
|
|
2252
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
2253
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
2254
|
+
// https://stackoverflow.com/a/46971044/970769
|
|
2255
|
+
// "Breaking changes in Typescript 2.1"
|
|
2256
|
+
// "Extending built-ins like Error, Array, and Map may no longer work."
|
|
2257
|
+
// "As a recommendation, you can manually adjust the prototype immediately after any super(...) calls."
|
|
2258
|
+
// https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
|
|
2259
|
+
var ParseError = /*#__PURE__*/function (_Error) {
|
|
2260
|
+
function ParseError(code) {
|
|
2261
|
+
var _this;
|
|
2262
|
+
_classCallCheck(this, ParseError);
|
|
2263
|
+
_this = _callSuper(this, ParseError, [code]);
|
|
2264
|
+
// Set the prototype explicitly.
|
|
2265
|
+
// Any subclass of FooError will have to manually set the prototype as well.
|
|
2266
|
+
Object.setPrototypeOf(_this, ParseError.prototype);
|
|
2267
|
+
_this.name = _this.constructor.name;
|
|
2268
|
+
return _this;
|
|
2269
|
+
}
|
|
2270
|
+
_inherits(ParseError, _Error);
|
|
2271
|
+
return _createClass(ParseError);
|
|
2272
|
+
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
2273
|
+
|
|
2274
|
+
// Regexp of all known extension prefixes used by different regions followed by
|
|
2275
|
+
// 1 or more valid digits, for use when parsing.
|
|
2276
|
+
var EXTN_PATTERN = new RegExp('(?:' + createExtensionPattern() + ')$', 'i');
|
|
2277
|
+
|
|
2278
|
+
// Strips any extension (as in, the part of the number dialled after the call is
|
|
2279
|
+
// connected, usually indicated with extn, ext, x or similar) from the end of
|
|
2280
|
+
// the number, and returns it.
|
|
2281
|
+
function extractExtension(number) {
|
|
2282
|
+
var start = number.search(EXTN_PATTERN);
|
|
2283
|
+
if (start < 0) {
|
|
2284
|
+
return {};
|
|
2285
|
+
}
|
|
2286
|
+
// If we find a potential extension, and the number preceding this is a viable
|
|
2287
|
+
// number, we assume it is an extension.
|
|
2288
|
+
var numberWithoutExtension = number.slice(0, start);
|
|
2289
|
+
var matches = number.match(EXTN_PATTERN);
|
|
2290
|
+
var i = 1;
|
|
2291
|
+
while (i < matches.length) {
|
|
2292
|
+
if (matches[i]) {
|
|
2293
|
+
return {
|
|
2294
|
+
number: numberWithoutExtension,
|
|
2295
|
+
ext: matches[i]
|
|
2296
|
+
};
|
|
2297
|
+
}
|
|
2298
|
+
i++;
|
|
2299
|
+
}
|
|
2300
|
+
}
|
|
2301
|
+
|
|
2302
|
+
// These mappings map a character (key) to a specific digit that should
|
|
2303
|
+
// replace it for normalization purposes. Non-European digits that
|
|
2304
|
+
// may be used in phone numbers are mapped to a European equivalent.
|
|
2305
|
+
//
|
|
2306
|
+
// E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.
|
|
2307
|
+
//
|
|
2308
|
+
var DIGITS = {
|
|
2309
|
+
'0': '0',
|
|
2310
|
+
'1': '1',
|
|
2311
|
+
'2': '2',
|
|
2312
|
+
'3': '3',
|
|
2313
|
+
'4': '4',
|
|
2314
|
+
'5': '5',
|
|
2315
|
+
'6': '6',
|
|
2316
|
+
'7': '7',
|
|
2317
|
+
'8': '8',
|
|
2318
|
+
'9': '9',
|
|
2319
|
+
"\uFF10": '0',
|
|
2320
|
+
// Fullwidth digit 0
|
|
2321
|
+
"\uFF11": '1',
|
|
2322
|
+
// Fullwidth digit 1
|
|
2323
|
+
"\uFF12": '2',
|
|
2324
|
+
// Fullwidth digit 2
|
|
2325
|
+
"\uFF13": '3',
|
|
2326
|
+
// Fullwidth digit 3
|
|
2327
|
+
"\uFF14": '4',
|
|
2328
|
+
// Fullwidth digit 4
|
|
2329
|
+
"\uFF15": '5',
|
|
2330
|
+
// Fullwidth digit 5
|
|
2331
|
+
"\uFF16": '6',
|
|
2332
|
+
// Fullwidth digit 6
|
|
2333
|
+
"\uFF17": '7',
|
|
2334
|
+
// Fullwidth digit 7
|
|
2335
|
+
"\uFF18": '8',
|
|
2336
|
+
// Fullwidth digit 8
|
|
2337
|
+
"\uFF19": '9',
|
|
2338
|
+
// Fullwidth digit 9
|
|
2339
|
+
"\u0660": '0',
|
|
2340
|
+
// Arabic-indic digit 0
|
|
2341
|
+
"\u0661": '1',
|
|
2342
|
+
// Arabic-indic digit 1
|
|
2343
|
+
"\u0662": '2',
|
|
2344
|
+
// Arabic-indic digit 2
|
|
2345
|
+
"\u0663": '3',
|
|
2346
|
+
// Arabic-indic digit 3
|
|
2347
|
+
"\u0664": '4',
|
|
2348
|
+
// Arabic-indic digit 4
|
|
2349
|
+
"\u0665": '5',
|
|
2350
|
+
// Arabic-indic digit 5
|
|
2351
|
+
"\u0666": '6',
|
|
2352
|
+
// Arabic-indic digit 6
|
|
2353
|
+
"\u0667": '7',
|
|
2354
|
+
// Arabic-indic digit 7
|
|
2355
|
+
"\u0668": '8',
|
|
2356
|
+
// Arabic-indic digit 8
|
|
2357
|
+
"\u0669": '9',
|
|
2358
|
+
// Arabic-indic digit 9
|
|
2359
|
+
"\u06F0": '0',
|
|
2360
|
+
// Eastern-Arabic digit 0
|
|
2361
|
+
"\u06F1": '1',
|
|
2362
|
+
// Eastern-Arabic digit 1
|
|
2363
|
+
"\u06F2": '2',
|
|
2364
|
+
// Eastern-Arabic digit 2
|
|
2365
|
+
"\u06F3": '3',
|
|
2366
|
+
// Eastern-Arabic digit 3
|
|
2367
|
+
"\u06F4": '4',
|
|
2368
|
+
// Eastern-Arabic digit 4
|
|
2369
|
+
"\u06F5": '5',
|
|
2370
|
+
// Eastern-Arabic digit 5
|
|
2371
|
+
"\u06F6": '6',
|
|
2372
|
+
// Eastern-Arabic digit 6
|
|
2373
|
+
"\u06F7": '7',
|
|
2374
|
+
// Eastern-Arabic digit 7
|
|
2375
|
+
"\u06F8": '8',
|
|
2376
|
+
// Eastern-Arabic digit 8
|
|
2377
|
+
"\u06F9": '9' // Eastern-Arabic digit 9
|
|
2378
|
+
};
|
|
2379
|
+
function parseDigit(character) {
|
|
2380
|
+
return DIGITS[character];
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
function _createForOfIteratorHelperLoose(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
2384
|
+
function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
|
|
2385
|
+
function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
2386
|
+
|
|
2387
|
+
/**
|
|
2388
|
+
* Parses phone number characters from a string.
|
|
2389
|
+
* Drops all punctuation leaving only digits and the leading `+` sign (if any).
|
|
2390
|
+
* Also converts wide-ascii and arabic-indic numerals to conventional numerals.
|
|
2391
|
+
* E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.
|
|
2392
|
+
* @param {string} string
|
|
2393
|
+
* @return {string}
|
|
2394
|
+
* @example
|
|
2395
|
+
* ```js
|
|
2396
|
+
* // Outputs '8800555'.
|
|
2397
|
+
* parseIncompletePhoneNumber('8 (800) 555')
|
|
2398
|
+
* // Outputs '+7800555'.
|
|
2399
|
+
* parseIncompletePhoneNumber('+7 800 555')
|
|
2400
|
+
* ```
|
|
2401
|
+
*/
|
|
2402
|
+
function parseIncompletePhoneNumber(string) {
|
|
2403
|
+
var result = '';
|
|
2404
|
+
// Using `.split('')` here instead of normal `for ... of`
|
|
2405
|
+
// because the importing application doesn't neccessarily include an ES6 polyfill.
|
|
2406
|
+
// The `.split('')` approach discards "exotic" UTF-8 characters
|
|
2407
|
+
// (the ones consisting of four bytes) but digits
|
|
2408
|
+
// (including non-European ones) don't fall into that range
|
|
2409
|
+
// so such "exotic" characters would be discarded anyway.
|
|
2410
|
+
for (var _iterator = _createForOfIteratorHelperLoose(string.split('')), _step; !(_step = _iterator()).done;) {
|
|
2411
|
+
var character = _step.value;
|
|
2412
|
+
result += parsePhoneNumberCharacter(character, result) || '';
|
|
2413
|
+
}
|
|
2414
|
+
return result;
|
|
2415
|
+
}
|
|
2416
|
+
|
|
2417
|
+
/**
|
|
2418
|
+
* Parses next character while parsing phone number digits (including a `+`)
|
|
2419
|
+
* from text: discards everything except `+` and digits, and `+` is only allowed
|
|
2420
|
+
* at the start of a phone number.
|
|
2421
|
+
* For example, is used in `react-phone-number-input` where it uses
|
|
2422
|
+
* [`input-format`](https://gitlab.com/catamphetamine/input-format).
|
|
2423
|
+
* @param {string} character - Yet another character from raw input string.
|
|
2424
|
+
* @param {string?} prevParsedCharacters - Previous parsed characters.
|
|
2425
|
+
* @param {function?} eventListener - An optional "on event" function.
|
|
2426
|
+
* @return {string?} The parsed character.
|
|
2427
|
+
*/
|
|
2428
|
+
function parsePhoneNumberCharacter(character, prevParsedCharacters, eventListener) {
|
|
2429
|
+
// Only allow a leading `+`.
|
|
2430
|
+
if (character === '+') {
|
|
2431
|
+
// If this `+` is not the first parsed character
|
|
2432
|
+
// then discard it.
|
|
2433
|
+
if (prevParsedCharacters) {
|
|
2434
|
+
// `eventListener` argument was added to this `export`ed function on Dec 26th, 2023.
|
|
2435
|
+
// Any 3rd-party code that used to `import` and call this function before that
|
|
2436
|
+
// won't be passing any `eventListener` argument.
|
|
2437
|
+
//
|
|
2438
|
+
// The addition of the `eventListener` argument was to fix the slightly-weird behavior
|
|
2439
|
+
// of parsing an input string when the user inputs something like `"2+7"
|
|
2440
|
+
// https://github.com/catamphetamine/react-phone-number-input/issues/437
|
|
2441
|
+
//
|
|
2442
|
+
// If the parser encounters an unexpected `+` in a string being parsed
|
|
2443
|
+
// then it simply discards that out-of-place `+` and any following characters.
|
|
2444
|
+
//
|
|
2445
|
+
if (typeof eventListener === 'function') {
|
|
2446
|
+
eventListener('end');
|
|
2447
|
+
}
|
|
2448
|
+
return;
|
|
2449
|
+
}
|
|
2450
|
+
return '+';
|
|
2451
|
+
}
|
|
2452
|
+
// Allow digits.
|
|
2453
|
+
return parseDigit(character);
|
|
2454
|
+
}
|
|
2455
|
+
|
|
2456
|
+
// When phone numbers are written in `RFC3966` format — `"tel:+12133734253"` —
|
|
2457
|
+
var PLUS_SIGN = '+';
|
|
2458
|
+
var RFC3966_VISUAL_SEPARATOR_ = '[\\-\\.\\(\\)]?';
|
|
2459
|
+
var RFC3966_PHONE_DIGIT_ = '(' + '[' + VALID_DIGITS + ']' + '|' + RFC3966_VISUAL_SEPARATOR_ + ')';
|
|
2460
|
+
var RFC3966_GLOBAL_NUMBER_DIGITS_ = '^' + '\\' + PLUS_SIGN + RFC3966_PHONE_DIGIT_ + '*' + '[' + VALID_DIGITS + ']' + RFC3966_PHONE_DIGIT_ + '*' + '$';
|
|
2461
|
+
|
|
2462
|
+
/**
|
|
2463
|
+
* Regular expression of valid global-number-digits for the phone-context
|
|
2464
|
+
* parameter, following the syntax defined in RFC3966.
|
|
2465
|
+
*/
|
|
2466
|
+
var RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_ = new RegExp(RFC3966_GLOBAL_NUMBER_DIGITS_, 'g');
|
|
2467
|
+
|
|
2468
|
+
// In this port of Google's library, we don't accept alpha characters in phone numbers.
|
|
2469
|
+
// const ALPHANUM_ = VALID_ALPHA_ + VALID_DIGITS
|
|
2470
|
+
var ALPHANUM_ = VALID_DIGITS;
|
|
2471
|
+
var RFC3966_DOMAINLABEL_ = '[' + ALPHANUM_ + ']+((\\-)*[' + ALPHANUM_ + '])*';
|
|
2472
|
+
var VALID_ALPHA_ = 'a-zA-Z';
|
|
2473
|
+
var RFC3966_TOPLABEL_ = '[' + VALID_ALPHA_ + ']+((\\-)*[' + ALPHANUM_ + '])*';
|
|
2474
|
+
var RFC3966_DOMAINNAME_ = '^(' + RFC3966_DOMAINLABEL_ + '\\.)*' + RFC3966_TOPLABEL_ + '\\.?$';
|
|
2475
|
+
|
|
2476
|
+
/**
|
|
2477
|
+
* Regular expression of valid domainname for the phone-context parameter,
|
|
2478
|
+
* following the syntax defined in RFC3966.
|
|
2479
|
+
*/
|
|
2480
|
+
var RFC3966_DOMAINNAME_PATTERN_ = new RegExp(RFC3966_DOMAINNAME_, 'g');
|
|
2481
|
+
var RFC3966_PREFIX_ = 'tel:';
|
|
2482
|
+
var RFC3966_PHONE_CONTEXT_ = ';phone-context=';
|
|
2483
|
+
var RFC3966_ISDN_SUBADDRESS_ = ';isub=';
|
|
2484
|
+
|
|
2485
|
+
/**
|
|
2486
|
+
* Extracts the value of the phone-context parameter of `numberToExtractFrom`,
|
|
2487
|
+
* following the syntax defined in RFC3966.
|
|
2488
|
+
*
|
|
2489
|
+
* @param {string} numberToExtractFrom
|
|
2490
|
+
* @return {string|null} the extracted string (possibly empty), or `null` if no phone-context parameter is found.
|
|
2491
|
+
*/
|
|
2492
|
+
function extractPhoneContext(numberToExtractFrom) {
|
|
2493
|
+
var indexOfPhoneContext = numberToExtractFrom.indexOf(RFC3966_PHONE_CONTEXT_);
|
|
2494
|
+
// If no phone-context parameter is present
|
|
2495
|
+
if (indexOfPhoneContext < 0) {
|
|
2496
|
+
return null;
|
|
2497
|
+
}
|
|
2498
|
+
var phoneContextStart = indexOfPhoneContext + RFC3966_PHONE_CONTEXT_.length;
|
|
2499
|
+
// If phone-context parameter is empty
|
|
2500
|
+
if (phoneContextStart >= numberToExtractFrom.length) {
|
|
2501
|
+
return '';
|
|
2502
|
+
}
|
|
2503
|
+
var phoneContextEnd = numberToExtractFrom.indexOf(';', phoneContextStart);
|
|
2504
|
+
// If phone-context is not the last parameter
|
|
2505
|
+
if (phoneContextEnd >= 0) {
|
|
2506
|
+
return numberToExtractFrom.substring(phoneContextStart, phoneContextEnd);
|
|
2507
|
+
} else {
|
|
2508
|
+
return numberToExtractFrom.substring(phoneContextStart);
|
|
2509
|
+
}
|
|
2510
|
+
}
|
|
2511
|
+
|
|
2512
|
+
/**
|
|
2513
|
+
* Returns whether the value of phoneContext follows the syntax defined in RFC3966.
|
|
2514
|
+
*
|
|
2515
|
+
* @param {string|null} phoneContext
|
|
2516
|
+
* @return {boolean}
|
|
2517
|
+
*/
|
|
2518
|
+
function isPhoneContextValid(phoneContext) {
|
|
2519
|
+
if (phoneContext === null) {
|
|
2520
|
+
return true;
|
|
2521
|
+
}
|
|
2522
|
+
if (phoneContext.length === 0) {
|
|
2523
|
+
return false;
|
|
2524
|
+
}
|
|
2525
|
+
|
|
2526
|
+
// Does phone-context value match pattern of global-number-digits or domainname.
|
|
2527
|
+
return RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_.test(phoneContext) || RFC3966_DOMAINNAME_PATTERN_.test(phoneContext);
|
|
2528
|
+
}
|
|
2529
|
+
|
|
2530
|
+
/**
|
|
2531
|
+
* @param {string} numberToParse
|
|
2532
|
+
* @param {string} nationalNumber
|
|
2533
|
+
* @return {}
|
|
2534
|
+
*/
|
|
2535
|
+
function extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(numberToParse, _ref) {
|
|
2536
|
+
var extractFormattedPhoneNumber = _ref.extractFormattedPhoneNumber;
|
|
2537
|
+
var phoneContext = extractPhoneContext(numberToParse);
|
|
2538
|
+
if (!isPhoneContextValid(phoneContext)) {
|
|
2539
|
+
throw new ParseError('NOT_A_NUMBER');
|
|
2540
|
+
}
|
|
2541
|
+
var phoneNumberString;
|
|
2542
|
+
if (phoneContext === null) {
|
|
2543
|
+
// Extract a possible number from the string passed in.
|
|
2544
|
+
// (this strips leading characters that could not be the start of a phone number)
|
|
2545
|
+
phoneNumberString = extractFormattedPhoneNumber(numberToParse) || '';
|
|
2546
|
+
} else {
|
|
2547
|
+
phoneNumberString = '';
|
|
2548
|
+
|
|
2549
|
+
// If the phone context contains a phone number prefix, we need to capture
|
|
2550
|
+
// it, whereas domains will be ignored.
|
|
2551
|
+
if (phoneContext.charAt(0) === PLUS_SIGN) {
|
|
2552
|
+
phoneNumberString += phoneContext;
|
|
2553
|
+
}
|
|
2554
|
+
|
|
2555
|
+
// Now append everything between the "tel:" prefix and the phone-context.
|
|
2556
|
+
// This should include the national number, an optional extension or
|
|
2557
|
+
// isdn-subaddress component. Note we also handle the case when "tel:" is
|
|
2558
|
+
// missing, as we have seen in some of the phone number inputs.
|
|
2559
|
+
// In that case, we append everything from the beginning.
|
|
2560
|
+
var indexOfRfc3966Prefix = numberToParse.indexOf(RFC3966_PREFIX_);
|
|
2561
|
+
var indexOfNationalNumber;
|
|
2562
|
+
// RFC 3966 "tel:" prefix is preset at this stage because
|
|
2563
|
+
// `isPhoneContextValid()` requires it to be present.
|
|
2564
|
+
/* istanbul ignore else */
|
|
2565
|
+
if (indexOfRfc3966Prefix >= 0) {
|
|
2566
|
+
indexOfNationalNumber = indexOfRfc3966Prefix + RFC3966_PREFIX_.length;
|
|
2567
|
+
} else {
|
|
2568
|
+
indexOfNationalNumber = 0;
|
|
2569
|
+
}
|
|
2570
|
+
var indexOfPhoneContext = numberToParse.indexOf(RFC3966_PHONE_CONTEXT_);
|
|
2571
|
+
phoneNumberString += numberToParse.substring(indexOfNationalNumber, indexOfPhoneContext);
|
|
2572
|
+
}
|
|
2573
|
+
|
|
2574
|
+
// Delete the isdn-subaddress and everything after it if it is present.
|
|
2575
|
+
// Note extension won't appear at the same time with isdn-subaddress
|
|
2576
|
+
// according to paragraph 5.3 of the RFC3966 spec.
|
|
2577
|
+
var indexOfIsdn = phoneNumberString.indexOf(RFC3966_ISDN_SUBADDRESS_);
|
|
2578
|
+
if (indexOfIsdn > 0) {
|
|
2579
|
+
phoneNumberString = phoneNumberString.substring(0, indexOfIsdn);
|
|
2580
|
+
}
|
|
2581
|
+
// If both phone context and isdn-subaddress are absent but other
|
|
2582
|
+
// parameters are present, the parameters are left in nationalNumber.
|
|
2583
|
+
// This is because we are concerned about deleting content from a potential
|
|
2584
|
+
// number string when there is no strong evidence that the number is
|
|
2585
|
+
// actually written in RFC3966.
|
|
2586
|
+
|
|
2587
|
+
if (phoneNumberString !== '') {
|
|
2588
|
+
return phoneNumberString;
|
|
2589
|
+
}
|
|
2590
|
+
}
|
|
2591
|
+
|
|
2592
|
+
// This is a port of Google Android `libphonenumber`'s
|
|
2593
|
+
|
|
2594
|
+
// We don't allow input strings for parsing to be longer than 250 chars.
|
|
2595
|
+
// This prevents malicious input from consuming CPU.
|
|
2596
|
+
var MAX_INPUT_STRING_LENGTH = 250;
|
|
2597
|
+
|
|
2598
|
+
// This consists of the plus symbol, digits, and arabic-indic digits.
|
|
2599
|
+
var PHONE_NUMBER_START_PATTERN = new RegExp('[' + PLUS_CHARS + VALID_DIGITS + ']');
|
|
2600
|
+
|
|
2601
|
+
// Regular expression of trailing characters that we want to remove.
|
|
2602
|
+
// A trailing `#` is sometimes used when writing phone numbers with extensions in US.
|
|
2603
|
+
// Example: "+1 (645) 123 1234-910#" number has extension "910".
|
|
2604
|
+
var AFTER_PHONE_NUMBER_END_PATTERN = new RegExp('[^' + VALID_DIGITS + '#' + ']+$');
|
|
2605
|
+
|
|
2606
|
+
// Examples:
|
|
2607
|
+
//
|
|
2608
|
+
// ```js
|
|
2609
|
+
// parse('8 (800) 555-35-35', 'RU')
|
|
2610
|
+
// parse('8 (800) 555-35-35', 'RU', metadata)
|
|
2611
|
+
// parse('8 (800) 555-35-35', { country: { default: 'RU' } })
|
|
2612
|
+
// parse('8 (800) 555-35-35', { country: { default: 'RU' } }, metadata)
|
|
2613
|
+
// parse('+7 800 555 35 35')
|
|
2614
|
+
// parse('+7 800 555 35 35', metadata)
|
|
2615
|
+
// ```
|
|
2616
|
+
//
|
|
2617
|
+
|
|
2618
|
+
/**
|
|
2619
|
+
* Parses a phone number.
|
|
2620
|
+
*
|
|
2621
|
+
* parse('123456789', { defaultCountry: 'RU', v2: true }, metadata)
|
|
2622
|
+
* parse('123456789', { defaultCountry: 'RU' }, metadata)
|
|
2623
|
+
* parse('123456789', undefined, metadata)
|
|
2624
|
+
*
|
|
2625
|
+
* @param {string} input
|
|
2626
|
+
* @param {object} [options]
|
|
2627
|
+
* @param {object} metadata
|
|
2628
|
+
* @return {object|PhoneNumber?} If `options.v2: true` flag is passed, it returns a `PhoneNumber?` instance. Otherwise, returns an object of shape `{ phone: '...', country: '...' }` (or just `{}` if no phone number was parsed).
|
|
2629
|
+
*/
|
|
2630
|
+
function parse(text, options, metadata) {
|
|
2631
|
+
// If assigning the `{}` default value is moved to the arguments above,
|
|
2632
|
+
// code coverage would decrease for some weird reason.
|
|
2633
|
+
options = options || {};
|
|
2634
|
+
metadata = new Metadata(metadata);
|
|
2635
|
+
|
|
2636
|
+
// Validate `defaultCountry`.
|
|
2637
|
+
if (options.defaultCountry && !metadata.hasCountry(options.defaultCountry)) {
|
|
2638
|
+
if (options.v2) {
|
|
2639
|
+
throw new ParseError('INVALID_COUNTRY');
|
|
2640
|
+
}
|
|
2641
|
+
throw new Error("Unknown country: ".concat(options.defaultCountry));
|
|
2642
|
+
}
|
|
2643
|
+
|
|
2644
|
+
// Parse the phone number.
|
|
2645
|
+
var _parseInput = parseInput(text, options.v2, options.extract),
|
|
2646
|
+
formattedPhoneNumber = _parseInput.number,
|
|
2647
|
+
ext = _parseInput.ext,
|
|
2648
|
+
error = _parseInput.error;
|
|
2649
|
+
|
|
2650
|
+
// If the phone number is not viable then return nothing.
|
|
2651
|
+
if (!formattedPhoneNumber) {
|
|
2652
|
+
if (options.v2) {
|
|
2653
|
+
if (error === 'TOO_SHORT') {
|
|
2654
|
+
throw new ParseError('TOO_SHORT');
|
|
2655
|
+
}
|
|
2656
|
+
throw new ParseError('NOT_A_NUMBER');
|
|
2657
|
+
}
|
|
2658
|
+
return {};
|
|
2659
|
+
}
|
|
2660
|
+
var _parsePhoneNumber = parsePhoneNumber$3(formattedPhoneNumber, options.defaultCountry, options.defaultCallingCode, metadata),
|
|
2661
|
+
country = _parsePhoneNumber.country,
|
|
2662
|
+
nationalNumber = _parsePhoneNumber.nationalNumber,
|
|
2663
|
+
countryCallingCode = _parsePhoneNumber.countryCallingCode,
|
|
2664
|
+
countryCallingCodeSource = _parsePhoneNumber.countryCallingCodeSource,
|
|
2665
|
+
carrierCode = _parsePhoneNumber.carrierCode;
|
|
2666
|
+
if (!metadata.hasSelectedNumberingPlan()) {
|
|
2667
|
+
if (options.v2) {
|
|
2668
|
+
throw new ParseError('INVALID_COUNTRY');
|
|
2669
|
+
}
|
|
2670
|
+
return {};
|
|
2671
|
+
}
|
|
2672
|
+
|
|
2673
|
+
// Validate national (significant) number length.
|
|
2674
|
+
if (!nationalNumber || nationalNumber.length < MIN_LENGTH_FOR_NSN) {
|
|
2675
|
+
// Won't throw here because the regexp already demands length > 1.
|
|
2676
|
+
/* istanbul ignore if */
|
|
2677
|
+
if (options.v2) {
|
|
2678
|
+
throw new ParseError('TOO_SHORT');
|
|
2679
|
+
}
|
|
2680
|
+
// Google's demo just throws an error in this case.
|
|
2681
|
+
return {};
|
|
2682
|
+
}
|
|
2683
|
+
|
|
2684
|
+
// Validate national (significant) number length.
|
|
2685
|
+
//
|
|
2686
|
+
// A sidenote:
|
|
2687
|
+
//
|
|
2688
|
+
// They say that sometimes national (significant) numbers
|
|
2689
|
+
// can be longer than `MAX_LENGTH_FOR_NSN` (e.g. in Germany).
|
|
2690
|
+
// https://github.com/googlei18n/libphonenumber/blob/7e1748645552da39c4e1ba731e47969d97bdb539/resources/phonenumber.proto#L36
|
|
2691
|
+
// Such numbers will just be discarded.
|
|
2692
|
+
//
|
|
2693
|
+
if (nationalNumber.length > MAX_LENGTH_FOR_NSN) {
|
|
2694
|
+
if (options.v2) {
|
|
2695
|
+
throw new ParseError('TOO_LONG');
|
|
2696
|
+
}
|
|
2697
|
+
// Google's demo just throws an error in this case.
|
|
2698
|
+
return {};
|
|
2699
|
+
}
|
|
2700
|
+
if (options.v2) {
|
|
2701
|
+
var phoneNumber = new PhoneNumber(countryCallingCode, nationalNumber, metadata.metadata);
|
|
2702
|
+
if (country) {
|
|
2703
|
+
phoneNumber.country = country;
|
|
2704
|
+
}
|
|
2705
|
+
if (carrierCode) {
|
|
2706
|
+
phoneNumber.carrierCode = carrierCode;
|
|
2707
|
+
}
|
|
2708
|
+
if (ext) {
|
|
2709
|
+
phoneNumber.ext = ext;
|
|
2710
|
+
}
|
|
2711
|
+
phoneNumber.__countryCallingCodeSource = countryCallingCodeSource;
|
|
2712
|
+
return phoneNumber;
|
|
2713
|
+
}
|
|
2714
|
+
|
|
2715
|
+
// Check if national phone number pattern matches the number.
|
|
2716
|
+
// National number pattern is different for each country,
|
|
2717
|
+
// even for those ones which are part of the "NANPA" group.
|
|
2718
|
+
var valid = (options.extended ? metadata.hasSelectedNumberingPlan() : country) ? matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) : false;
|
|
2719
|
+
if (!options.extended) {
|
|
2720
|
+
return valid ? result(country, nationalNumber, ext) : {};
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2723
|
+
// isInternational: countryCallingCode !== undefined
|
|
2724
|
+
|
|
2725
|
+
return {
|
|
2726
|
+
country: country,
|
|
2727
|
+
countryCallingCode: countryCallingCode,
|
|
2728
|
+
carrierCode: carrierCode,
|
|
2729
|
+
valid: valid,
|
|
2730
|
+
possible: valid ? true : options.extended === true && metadata.possibleLengths() && isPossibleNumber(nationalNumber, country, metadata) ? true : false,
|
|
2731
|
+
phone: nationalNumber,
|
|
2732
|
+
ext: ext
|
|
2733
|
+
};
|
|
2734
|
+
}
|
|
2735
|
+
|
|
2736
|
+
/**
|
|
2737
|
+
* Extracts a formatted phone number from text.
|
|
2738
|
+
* Doesn't guarantee that the extracted phone number
|
|
2739
|
+
* is a valid phone number (for example, doesn't validate its length).
|
|
2740
|
+
* @param {string} text
|
|
2741
|
+
* @param {boolean} [extract] — If `false`, then will parse the entire `text` as a phone number.
|
|
2742
|
+
* @param {boolean} [throwOnError] — By default, it won't throw if the text is too long.
|
|
2743
|
+
* @return {string}
|
|
2744
|
+
* @example
|
|
2745
|
+
* // Returns "(213) 373-4253".
|
|
2746
|
+
* extractFormattedPhoneNumber("Call (213) 373-4253 for assistance.")
|
|
2747
|
+
*/
|
|
2748
|
+
function _extractFormattedPhoneNumber(text, extract, throwOnError) {
|
|
2749
|
+
if (!text) {
|
|
2750
|
+
return;
|
|
2751
|
+
}
|
|
2752
|
+
if (text.length > MAX_INPUT_STRING_LENGTH) {
|
|
2753
|
+
if (throwOnError) {
|
|
2754
|
+
throw new ParseError('TOO_LONG');
|
|
2755
|
+
}
|
|
2756
|
+
return;
|
|
2757
|
+
}
|
|
2758
|
+
if (extract === false) {
|
|
2759
|
+
return text;
|
|
2760
|
+
}
|
|
2761
|
+
// Attempt to extract a possible number from the string passed in
|
|
2762
|
+
var startsAt = text.search(PHONE_NUMBER_START_PATTERN);
|
|
2763
|
+
if (startsAt < 0) {
|
|
2764
|
+
return;
|
|
2765
|
+
}
|
|
2766
|
+
return text
|
|
2767
|
+
// Trim everything to the left of the phone number
|
|
2768
|
+
.slice(startsAt)
|
|
2769
|
+
// Remove trailing non-numerical characters
|
|
2770
|
+
.replace(AFTER_PHONE_NUMBER_END_PATTERN, '');
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2773
|
+
/**
|
|
2774
|
+
* @param {string} text - Input.
|
|
2775
|
+
* @param {boolean} v2 - Legacy API functions don't pass `v2: true` flag.
|
|
2776
|
+
* @param {boolean} [extract] - Whether to extract a phone number from `text`, or attempt to parse the entire text as a phone number.
|
|
2777
|
+
* @return {object} `{ ?number, ?ext }`.
|
|
2778
|
+
*/
|
|
2779
|
+
function parseInput(text, v2, extract) {
|
|
2780
|
+
// // Parse RFC 3966 phone number URI.
|
|
2781
|
+
// if (text && text.indexOf('tel:') === 0) {
|
|
2782
|
+
// return parseRFC3966(text)
|
|
2783
|
+
// }
|
|
2784
|
+
// let number = extractFormattedPhoneNumber(text, extract, v2)
|
|
2785
|
+
var number = extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(text, {
|
|
2786
|
+
extractFormattedPhoneNumber: function extractFormattedPhoneNumber(text) {
|
|
2787
|
+
return _extractFormattedPhoneNumber(text, extract, v2);
|
|
2788
|
+
}
|
|
2789
|
+
});
|
|
2790
|
+
// If the phone number is not viable, then abort.
|
|
2791
|
+
if (!number) {
|
|
2792
|
+
return {};
|
|
2793
|
+
}
|
|
2794
|
+
if (!isViablePhoneNumber(number)) {
|
|
2795
|
+
if (isViablePhoneNumberStart(number)) {
|
|
2796
|
+
return {
|
|
2797
|
+
error: 'TOO_SHORT'
|
|
2798
|
+
};
|
|
2799
|
+
}
|
|
2800
|
+
return {};
|
|
2801
|
+
}
|
|
2802
|
+
// Attempt to parse extension first, since it doesn't require region-specific
|
|
2803
|
+
// data and we want to have the non-normalised number here.
|
|
2804
|
+
var withExtensionStripped = extractExtension(number);
|
|
2805
|
+
if (withExtensionStripped.ext) {
|
|
2806
|
+
return withExtensionStripped;
|
|
2807
|
+
}
|
|
2808
|
+
return {
|
|
2809
|
+
number: number
|
|
2810
|
+
};
|
|
2811
|
+
}
|
|
2812
|
+
|
|
2813
|
+
/**
|
|
2814
|
+
* Creates `parse()` result object.
|
|
2815
|
+
*/
|
|
2816
|
+
function result(country, nationalNumber, ext) {
|
|
2817
|
+
var result = {
|
|
2818
|
+
country: country,
|
|
2819
|
+
phone: nationalNumber
|
|
2820
|
+
};
|
|
2821
|
+
if (ext) {
|
|
2822
|
+
result.ext = ext;
|
|
2823
|
+
}
|
|
2824
|
+
return result;
|
|
2825
|
+
}
|
|
2826
|
+
|
|
2827
|
+
/**
|
|
2828
|
+
* Parses a viable phone number.
|
|
2829
|
+
* @param {string} formattedPhoneNumber — Example: "(213) 373-4253".
|
|
2830
|
+
* @param {string} [defaultCountry]
|
|
2831
|
+
* @param {string} [defaultCallingCode]
|
|
2832
|
+
* @param {Metadata} metadata
|
|
2833
|
+
* @return {object} Returns `{ country: string?, countryCallingCode: string?, nationalNumber: string? }`.
|
|
2834
|
+
*/
|
|
2835
|
+
function parsePhoneNumber$3(formattedPhoneNumber, defaultCountry, defaultCallingCode, metadata) {
|
|
2836
|
+
// Extract calling code from phone number.
|
|
2837
|
+
var _extractCountryCallin = extractCountryCallingCode(parseIncompletePhoneNumber(formattedPhoneNumber), undefined, defaultCountry, defaultCallingCode, metadata.metadata),
|
|
2838
|
+
countryCallingCodeSource = _extractCountryCallin.countryCallingCodeSource,
|
|
2839
|
+
countryCallingCode = _extractCountryCallin.countryCallingCode,
|
|
2840
|
+
number = _extractCountryCallin.number;
|
|
2841
|
+
|
|
2842
|
+
// The exact country of the phone number
|
|
2843
|
+
var country;
|
|
2844
|
+
|
|
2845
|
+
// If `formattedPhoneNumber` is passed in "international" format,
|
|
2846
|
+
// choose a country by `countryCallingCode`.
|
|
2847
|
+
if (countryCallingCode) {
|
|
2848
|
+
metadata.selectNumberingPlan(countryCallingCode);
|
|
2849
|
+
}
|
|
2850
|
+
// Else, if `formattedPhoneNumber` is passed in "national" format,
|
|
2851
|
+
// then `number` is defined and `countryCallingCode` is `undefined`.
|
|
2852
|
+
else if (number && (defaultCountry || defaultCallingCode)) {
|
|
2853
|
+
metadata.selectNumberingPlan(defaultCountry, defaultCallingCode);
|
|
2854
|
+
if (defaultCountry) {
|
|
2855
|
+
country = defaultCountry;
|
|
2856
|
+
}
|
|
2857
|
+
countryCallingCode = defaultCallingCode || getCountryCallingCode(defaultCountry, metadata.metadata);
|
|
2858
|
+
} else return {};
|
|
2859
|
+
if (!number) {
|
|
2860
|
+
return {
|
|
2861
|
+
countryCallingCodeSource: countryCallingCodeSource,
|
|
2862
|
+
countryCallingCode: countryCallingCode
|
|
2863
|
+
};
|
|
2864
|
+
}
|
|
2865
|
+
var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number), country, metadata),
|
|
2866
|
+
nationalNumber = _extractNationalNumbe.nationalNumber,
|
|
2867
|
+
carrierCode = _extractNationalNumbe.carrierCode;
|
|
2868
|
+
|
|
2869
|
+
// Sometimes there are several countries
|
|
2870
|
+
// corresponding to the same country phone code
|
|
2871
|
+
// (e.g. NANPA countries all having `1` country phone code).
|
|
2872
|
+
// Therefore, to reliably determine the exact country,
|
|
2873
|
+
// national (significant) number should have been parsed first.
|
|
2874
|
+
//
|
|
2875
|
+
// When `metadata.json` is generated, all "ambiguous" country phone codes
|
|
2876
|
+
// get their countries populated with the full set of
|
|
2877
|
+
// "phone number type" regular expressions.
|
|
2878
|
+
//
|
|
2879
|
+
var exactCountry = getCountryByCallingCode(countryCallingCode, {
|
|
2880
|
+
nationalNumber: nationalNumber,
|
|
2881
|
+
metadata: metadata
|
|
2882
|
+
});
|
|
2883
|
+
if (exactCountry) {
|
|
2884
|
+
country = exactCountry;
|
|
2885
|
+
/* istanbul ignore if */
|
|
2886
|
+
if (exactCountry === '001') ; else {
|
|
2887
|
+
metadata.selectNumberingPlan(country);
|
|
2888
|
+
}
|
|
2889
|
+
}
|
|
2890
|
+
return {
|
|
2891
|
+
country: country,
|
|
2892
|
+
countryCallingCode: countryCallingCode,
|
|
2893
|
+
countryCallingCodeSource: countryCallingCodeSource,
|
|
2894
|
+
nationalNumber: nationalNumber,
|
|
2895
|
+
carrierCode: carrierCode
|
|
2896
|
+
};
|
|
2897
|
+
}
|
|
2898
|
+
|
|
2899
|
+
function _typeof$2(o) { "@babel/helpers - typeof"; return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$2(o); }
|
|
2900
|
+
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2901
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty$2(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2902
|
+
function _defineProperty$2(e, r, t) { return (r = _toPropertyKey$2(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2903
|
+
function _toPropertyKey$2(t) { var i = _toPrimitive$2(t, "string"); return "symbol" == _typeof$2(i) ? i : i + ""; }
|
|
2904
|
+
function _toPrimitive$2(t, r) { if ("object" != _typeof$2(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$2(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
2905
|
+
function parsePhoneNumberWithError(text, options, metadata) {
|
|
2906
|
+
return parse(text, _objectSpread$2(_objectSpread$2({}, options), {}, {
|
|
2907
|
+
v2: true
|
|
2908
|
+
}), metadata);
|
|
2909
|
+
}
|
|
2910
|
+
|
|
2911
|
+
function _typeof$1(o) { "@babel/helpers - typeof"; return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$1(o); }
|
|
2912
|
+
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2913
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2914
|
+
function _defineProperty$1(e, r, t) { return (r = _toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2915
|
+
function _toPropertyKey$1(t) { var i = _toPrimitive$1(t, "string"); return "symbol" == _typeof$1(i) ? i : i + ""; }
|
|
2916
|
+
function _toPrimitive$1(t, r) { if ("object" != _typeof$1(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$1(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
2917
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2918
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
2919
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
2920
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
2921
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
2922
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
2923
|
+
|
|
2924
|
+
// Extracts the following properties from function arguments:
|
|
2925
|
+
// * input `text`
|
|
2926
|
+
// * `options` object
|
|
2927
|
+
// * `metadata` JSON
|
|
2928
|
+
function normalizeArguments(args) {
|
|
2929
|
+
var _Array$prototype$slic = Array.prototype.slice.call(args),
|
|
2930
|
+
_Array$prototype$slic2 = _slicedToArray(_Array$prototype$slic, 4),
|
|
2931
|
+
arg_1 = _Array$prototype$slic2[0],
|
|
2932
|
+
arg_2 = _Array$prototype$slic2[1],
|
|
2933
|
+
arg_3 = _Array$prototype$slic2[2],
|
|
2934
|
+
arg_4 = _Array$prototype$slic2[3];
|
|
2935
|
+
var text;
|
|
2936
|
+
var options;
|
|
2937
|
+
var metadata;
|
|
2938
|
+
|
|
2939
|
+
// If the phone number is passed as a string.
|
|
2940
|
+
// `parsePhoneNumber('88005553535', ...)`.
|
|
2941
|
+
if (typeof arg_1 === 'string') {
|
|
2942
|
+
text = arg_1;
|
|
2943
|
+
} else throw new TypeError('A text for parsing must be a string.');
|
|
2944
|
+
|
|
2945
|
+
// If "default country" argument is being passed then move it to `options`.
|
|
2946
|
+
// `parsePhoneNumber('88005553535', 'RU', [options], metadata)`.
|
|
2947
|
+
if (!arg_2 || typeof arg_2 === 'string') {
|
|
2948
|
+
if (arg_4) {
|
|
2949
|
+
options = arg_3;
|
|
2950
|
+
metadata = arg_4;
|
|
2951
|
+
} else {
|
|
2952
|
+
options = undefined;
|
|
2953
|
+
metadata = arg_3;
|
|
2954
|
+
}
|
|
2955
|
+
if (arg_2) {
|
|
2956
|
+
options = _objectSpread$1({
|
|
2957
|
+
defaultCountry: arg_2
|
|
2958
|
+
}, options);
|
|
2959
|
+
}
|
|
2960
|
+
}
|
|
2961
|
+
// `defaultCountry` is not passed.
|
|
2962
|
+
// Example: `parsePhoneNumber('+78005553535', [options], metadata)`.
|
|
2963
|
+
else if (isObject(arg_2)) {
|
|
2964
|
+
if (arg_3) {
|
|
2965
|
+
options = arg_2;
|
|
2966
|
+
metadata = arg_3;
|
|
2967
|
+
} else {
|
|
2968
|
+
metadata = arg_2;
|
|
2969
|
+
}
|
|
2970
|
+
} else throw new Error("Invalid second argument: ".concat(arg_2));
|
|
2971
|
+
return {
|
|
2972
|
+
text: text,
|
|
2973
|
+
options: options,
|
|
2974
|
+
metadata: metadata
|
|
2975
|
+
};
|
|
2976
|
+
}
|
|
2977
|
+
|
|
2978
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2979
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2980
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2981
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2982
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
2983
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
2984
|
+
function parsePhoneNumber$2(text, options, metadata) {
|
|
2985
|
+
// Validate `defaultCountry`.
|
|
2986
|
+
if (options && options.defaultCountry && !isSupportedCountry(options.defaultCountry, metadata)) {
|
|
2987
|
+
options = _objectSpread(_objectSpread({}, options), {}, {
|
|
2988
|
+
defaultCountry: undefined
|
|
2989
|
+
});
|
|
2990
|
+
}
|
|
2991
|
+
// Parse phone number.
|
|
2992
|
+
try {
|
|
2993
|
+
return parsePhoneNumberWithError(text, options, metadata);
|
|
2994
|
+
} catch (error) {
|
|
2995
|
+
/* istanbul ignore else */
|
|
2996
|
+
if (error instanceof ParseError) ; else {
|
|
2997
|
+
throw error;
|
|
2998
|
+
}
|
|
2999
|
+
}
|
|
3000
|
+
}
|
|
3001
|
+
|
|
3002
|
+
function parsePhoneNumber$1() {
|
|
3003
|
+
var _normalizeArguments = normalizeArguments(arguments),
|
|
3004
|
+
text = _normalizeArguments.text,
|
|
3005
|
+
options = _normalizeArguments.options,
|
|
3006
|
+
metadata = _normalizeArguments.metadata;
|
|
3007
|
+
return parsePhoneNumber$2(text, options, metadata);
|
|
3008
|
+
}
|
|
3009
|
+
|
|
3010
|
+
function parsePhoneNumber() {
|
|
3011
|
+
return withMetadataArgument(parsePhoneNumber$1, arguments)
|
|
3012
|
+
}
|
|
3013
|
+
|
|
3014
|
+
const amwalCheckoutButtonCss = "html.ios{--ion-default-font:-apple-system, BlinkMacSystemFont, \"Helvetica Neue\", \"Roboto\", sans-serif}html.md{--ion-default-font:\"Roboto\", \"Helvetica Neue\", sans-serif}html{--ion-default-dynamic-font:-apple-system-body;--ion-font-family:var(--ion-default-font)}body{background:var(--ion-background-color)}body.backdrop-no-scroll{overflow:hidden}html.ios ion-modal.modal-card ion-header ion-toolbar:first-of-type,html.ios ion-modal.modal-sheet ion-header ion-toolbar:first-of-type,html.ios ion-modal ion-footer ion-toolbar:first-of-type{padding-top:6px}html.ios ion-modal.modal-card ion-header ion-toolbar:last-of-type,html.ios ion-modal.modal-sheet ion-header ion-toolbar:last-of-type{padding-bottom:6px}html.ios ion-modal ion-toolbar{padding-right:calc(var(--ion-safe-area-right) + 8px);padding-left:calc(var(--ion-safe-area-left) + 8px)}@media screen and (min-width: 768px){html.ios ion-modal.modal-card:first-of-type{--backdrop-opacity:0.18}}ion-modal.modal-default.show-modal~ion-modal.modal-default{--backdrop-opacity:0;--box-shadow:none}html.ios ion-modal.modal-card .ion-page{border-top-left-radius:var(--border-radius)}.ion-color-primary{--ion-color-base:var(--ion-color-primary, #3880ff) !important;--ion-color-base-rgb:var(--ion-color-primary-rgb, 56, 128, 255) !important;--ion-color-contrast:var(--ion-color-primary-contrast, #fff) !important;--ion-color-contrast-rgb:var(--ion-color-primary-contrast-rgb, 255, 255, 255) !important;--ion-color-shade:var(--ion-color-primary-shade, #3171e0) !important;--ion-color-tint:var(--ion-color-primary-tint, #4c8dff) !important}.ion-color-secondary{--ion-color-base:var(--ion-color-secondary, #3dc2ff) !important;--ion-color-base-rgb:var(--ion-color-secondary-rgb, 61, 194, 255) !important;--ion-color-contrast:var(--ion-color-secondary-contrast, #fff) !important;--ion-color-contrast-rgb:var(--ion-color-secondary-contrast-rgb, 255, 255, 255) !important;--ion-color-shade:var(--ion-color-secondary-shade, #36abe0) !important;--ion-color-tint:var(--ion-color-secondary-tint, #50c8ff) !important}.ion-color-tertiary{--ion-color-base:var(--ion-color-tertiary, #5260ff) !important;--ion-color-base-rgb:var(--ion-color-tertiary-rgb, 82, 96, 255) !important;--ion-color-contrast:var(--ion-color-tertiary-contrast, #fff) !important;--ion-color-contrast-rgb:var(--ion-color-tertiary-contrast-rgb, 255, 255, 255) !important;--ion-color-shade:var(--ion-color-tertiary-shade, #4854e0) !important;--ion-color-tint:var(--ion-color-tertiary-tint, #6370ff) !important}.ion-color-success{--ion-color-base:var(--ion-color-success, #2dd36f) !important;--ion-color-base-rgb:var(--ion-color-success-rgb, 45, 211, 111) !important;--ion-color-contrast:var(--ion-color-success-contrast, #fff) !important;--ion-color-contrast-rgb:var(--ion-color-success-contrast-rgb, 255, 255, 255) !important;--ion-color-shade:var(--ion-color-success-shade, #28ba62) !important;--ion-color-tint:var(--ion-color-success-tint, #42d77d) !important}.ion-color-warning{--ion-color-base:var(--ion-color-warning, #ffc409) !important;--ion-color-base-rgb:var(--ion-color-warning-rgb, 255, 196, 9) !important;--ion-color-contrast:var(--ion-color-warning-contrast, #000) !important;--ion-color-contrast-rgb:var(--ion-color-warning-contrast-rgb, 0, 0, 0) !important;--ion-color-shade:var(--ion-color-warning-shade, #e0ac08) !important;--ion-color-tint:var(--ion-color-warning-tint, #ffca22) !important}.ion-color-danger{--ion-color-base:var(--ion-color-danger, #eb445a) !important;--ion-color-base-rgb:var(--ion-color-danger-rgb, 235, 68, 90) !important;--ion-color-contrast:var(--ion-color-danger-contrast, #fff) !important;--ion-color-contrast-rgb:var(--ion-color-danger-contrast-rgb, 255, 255, 255) !important;--ion-color-shade:var(--ion-color-danger-shade, #cf3c4f) !important;--ion-color-tint:var(--ion-color-danger-tint, #ed576b) !important}.ion-color-light{--ion-color-base:var(--ion-color-light, #f4f5f8) !important;--ion-color-base-rgb:var(--ion-color-light-rgb, 244, 245, 248) !important;--ion-color-contrast:var(--ion-color-light-contrast, #000) !important;--ion-color-contrast-rgb:var(--ion-color-light-contrast-rgb, 0, 0, 0) !important;--ion-color-shade:var(--ion-color-light-shade, #d7d8da) !important;--ion-color-tint:var(--ion-color-light-tint, #f5f6f9) !important}.ion-color-medium{--ion-color-base:var(--ion-color-medium, #92949c) !important;--ion-color-base-rgb:var(--ion-color-medium-rgb, 146, 148, 156) !important;--ion-color-contrast:var(--ion-color-medium-contrast, #fff) !important;--ion-color-contrast-rgb:var(--ion-color-medium-contrast-rgb, 255, 255, 255) !important;--ion-color-shade:var(--ion-color-medium-shade, #808289) !important;--ion-color-tint:var(--ion-color-medium-tint, #9d9fa6) !important}.ion-color-dark{--ion-color-base:var(--ion-color-dark, #222428) !important;--ion-color-base-rgb:var(--ion-color-dark-rgb, 34, 36, 40) !important;--ion-color-contrast:var(--ion-color-dark-contrast, #fff) !important;--ion-color-contrast-rgb:var(--ion-color-dark-contrast-rgb, 255, 255, 255) !important;--ion-color-shade:var(--ion-color-dark-shade, #1e2023) !important;--ion-color-tint:var(--ion-color-dark-tint, #383a3e) !important}.ion-page{left:0;right:0;top:0;bottom:0;display:flex;position:absolute;flex-direction:column;justify-content:space-between;contain:layout size style;z-index:0}ion-modal>.ion-page{position:relative;contain:layout style;height:100%}.split-pane-visible>.ion-page.split-pane-main{position:relative}ion-route,ion-route-redirect,ion-router,ion-select-option,ion-nav-controller,ion-menu-controller,ion-action-sheet-controller,ion-alert-controller,ion-loading-controller,ion-modal-controller,ion-picker-controller,ion-popover-controller,ion-toast-controller,.ion-page-hidden{display:none !important}.ion-page-invisible{opacity:0}.can-go-back>ion-header ion-back-button{display:block}html.plt-ios.plt-hybrid,html.plt-ios.plt-pwa{--ion-statusbar-padding:20px}@supports (padding-top: 20px){html{--ion-safe-area-top:var(--ion-statusbar-padding)}}@supports (padding-top: env(safe-area-inset-top)){html{--ion-safe-area-top:env(safe-area-inset-top);--ion-safe-area-bottom:env(safe-area-inset-bottom);--ion-safe-area-left:env(safe-area-inset-left);--ion-safe-area-right:env(safe-area-inset-right)}}ion-card.ion-color .ion-inherit-color,ion-card-header.ion-color .ion-inherit-color{color:inherit}.menu-content{transform:translate3d(0, 0, 0)}.menu-content-open{cursor:pointer;touch-action:manipulation;pointer-events:none;overflow-y:hidden}.menu-content-open ion-content{--overflow:hidden}.menu-content-open .ion-content-scroll-host{overflow:hidden}.ios .menu-content-reveal{box-shadow:-8px 0 42px rgba(0,0,0,.08)}[dir=rtl].ios .menu-content-reveal{box-shadow:8px 0 42px rgba(0,0,0,.08)}.md .menu-content-reveal{box-shadow:4px 0px 16px rgba(0,0,0,.18)}.md .menu-content-push{box-shadow:4px 0px 16px rgba(0,0,0,.18)}ion-accordion-group.accordion-group-expand-inset>ion-accordion:first-of-type{border-top-left-radius:8px;border-top-right-radius:8px}ion-accordion-group.accordion-group-expand-inset>ion-accordion:last-of-type{border-bottom-left-radius:8px;border-bottom-right-radius:8px}ion-accordion-group>ion-accordion:last-of-type ion-item[slot=header]{--border-width:0px}ion-accordion.accordion-animated>[slot=header] .ion-accordion-toggle-icon{transition:300ms transform cubic-bezier(0.25, 0.8, 0.5, 1)}@media (prefers-reduced-motion: reduce){ion-accordion .ion-accordion-toggle-icon{transition:none !important}}ion-accordion.accordion-expanding>[slot=header] .ion-accordion-toggle-icon,ion-accordion.accordion-expanded>[slot=header] .ion-accordion-toggle-icon{transform:rotate(180deg)}ion-accordion-group.accordion-group-expand-inset.md>ion-accordion.accordion-previous ion-item[slot=header]{--border-width:0px;--inner-border-width:0px}ion-accordion-group.accordion-group-expand-inset.md>ion-accordion.accordion-expanding:first-of-type,ion-accordion-group.accordion-group-expand-inset.md>ion-accordion.accordion-expanded:first-of-type{margin-top:0}ion-input input::-webkit-date-and-time-value{text-align:start}.ion-datetime-button-overlay{--width:fit-content;--height:fit-content}.ion-datetime-button-overlay ion-datetime.datetime-grid{width:320px;min-height:320px}.popover-viewport:has(>ion-content){overflow:hidden}@supports not selector(:has(> ion-content)){.popover-viewport{overflow:hidden}}.amwal-checkout-button{display:flex;font-family:'Cairo', sans-serif;font-weight:bolder}.hidden{display:none}body.amwal-overlay-active{overflow:hidden}.amwal-overlay{position:fixed;z-index:999999;top:0;bottom:0;left:0;right:0;background-color:rgba(0, 0, 0, .75);display:flex;align-items:center;justify-content:center}.amwal-overlay-container{text-align:center;font:400 16px Arial, sans-serif;color:#fafafa}.amwal-overlay-close{position:absolute;top:1rem;right:1rem;font-size:24px;cursor:pointer;transition:transform .5s ease-in-out}.amwal-overlay-button,.amwal-overlay-button:link,.amwal-overlay-button:target,.amwal-overlay-button:active,.amwal-overlay-button:hover,.amwal-overlay-button:visited,.amwal-overlay-button:focus{display:inline;background-color:transparent;color:white;text-decoration:underline;outline:none;cursor:pointer}ion-modal{--width:35vw;--height:85vh;--border-radius:10px;position:fixed}@media only screen and (max-width: 1000px) and (min-width: 700px){ion-modal{--width:100vw;--height:100vh}}@media only screen and (max-width: 690px){ion-modal{--width:100vw;--height:100vh;--border-radius:0px}.amwal-checkout-button{--border-radius:4px}.ribbon{width:34px !important;left:0}.ribbon~.button-text{font-size:14px}.ribbon:after{border-left:17px solid #F8463F !important;border-right:17px solid #F8463F !important}}@media only screen and (max-height: 690px){ion-modal{--width:100%;--height:100%;--border-radius:0px}}:root{--ion-color-dark:#000000 !important}.amwal-checkout-button{background:none !important;border:none !important;box-shadow:none !important;width:100% !important;height:100% !important;padding:0 !important}amwal-checkout-button button{height:unset !important}.vl{border-left:2px solid white;height:15px;margin:10px}.amwal-checkout-button-height{height:35px !important}.payment-brand-class{max-width:360px}.payment-brand-class img{height:13px;width:30px;margin:2px;object-fit:contain;box-sizing:content-box;padding-top:1px}.masterLogo{border:none !important}.logo-white{background-color:white}.mada-logo{padding:0px !important;height:30px !important;width:50px !important}.ribbon{width:34px;padding:10px 0;position:absolute;top:-15px;left:-15px;text-align:center;font-size:12px;border-top-left-radius:3px;background:#F8463F}.ribbon-text{color:white;font-weight:700;font-size:10px;line-height:1.2;text-transform:uppercase;letter-spacing:0.5px;display:block}.ribbon:before,.ribbon:after{content:\"\";position:absolute}.ribbon:after{height:0;width:0;bottom:-7px;left:0;border-left:17px solid #F8463F;border-right:17px solid #F8463F;border-bottom:7px solid transparent}.button-text{margin:10px}";
|
|
3015
|
+
|
|
3016
|
+
const showBrandingCache = {};
|
|
3017
|
+
const AmwalCheckoutButton$1 = /*@__PURE__*/ proxyCustomElement(class AmwalCheckoutButton extends H {
|
|
3018
|
+
constructor() {
|
|
3019
|
+
super();
|
|
3020
|
+
this.__registerHost();
|
|
3021
|
+
this.amwalCheckoutSuccess = createEvent(this, "amwalCheckoutSuccess", 7);
|
|
3022
|
+
this.updateOrderOnPaymentsuccess = createEvent(this, "updateOrderOnPaymentsuccess", 7);
|
|
3023
|
+
this.amwalDismissed = createEvent(this, "amwalDismissed", 7);
|
|
3024
|
+
this.amwalAddressUpdate = createEvent(this, "amwalAddressUpdate", 7);
|
|
3025
|
+
this.amwalAddressCountryUpdate = createEvent(this, "amwalAddressCountryUpdate", 7);
|
|
3026
|
+
this.amwalAddressStateUpdate = createEvent(this, "amwalAddressStateUpdate", 7);
|
|
3027
|
+
this.amwalPrePayTrigger = createEvent(this, "amwalPrePayTrigger", 7);
|
|
3028
|
+
this.amwalPreCheckoutTrigger = createEvent(this, "amwalPreCheckoutTrigger", 7);
|
|
3029
|
+
// private showBranding = false;
|
|
3030
|
+
this.requirePopup = false;
|
|
3031
|
+
this.showButton = this.debug;
|
|
3032
|
+
this.waitingForPreCheckoutTriggerAck = false;
|
|
3033
|
+
this.waitingForPrePayTriggerAck = false;
|
|
3034
|
+
this.agent = new uaParser_pack(window.navigator.userAgent).getResult();
|
|
3035
|
+
this.prefersDark = window.matchMedia('(prefers-color-scheme: dark)');
|
|
3036
|
+
this.waitingForAddressAck = false;
|
|
3037
|
+
this.waitingForAddressCountryAck = false;
|
|
3038
|
+
this.waitingForAddressStateAck = false;
|
|
3039
|
+
this.hideIcons = true;
|
|
3040
|
+
this.merchantId = undefined;
|
|
3041
|
+
this.installmentOptionsUrl = undefined;
|
|
3042
|
+
this.amount = undefined;
|
|
3043
|
+
this.countryCode = "SA";
|
|
3044
|
+
this.locale = "en";
|
|
3045
|
+
this.label = "Quick Checkout";
|
|
3046
|
+
this.darkMode = "off";
|
|
3047
|
+
this.disabled = false;
|
|
3048
|
+
this.addressRequired = true;
|
|
3049
|
+
this.showPaymentBrands = false;
|
|
3050
|
+
this.showDiscountRibbon = false;
|
|
3051
|
+
this.initialAddress = undefined;
|
|
3052
|
+
this.allowedAddressCountries = undefined;
|
|
3053
|
+
this.allowedAddressStates = undefined;
|
|
3054
|
+
this.allowedAddressCities = undefined;
|
|
3055
|
+
this.street2Required = false;
|
|
3056
|
+
this.emailRequired = true;
|
|
3057
|
+
this.initialEmail = undefined;
|
|
3058
|
+
this.initialFirstName = undefined;
|
|
3059
|
+
this.initialLastName = undefined;
|
|
3060
|
+
this.initialPhoneNumber = undefined;
|
|
3061
|
+
this.addressHandshake = false;
|
|
3062
|
+
this.enableDynamicShippingDetails = false;
|
|
3063
|
+
this.sendExtraAddressFields = false;
|
|
3064
|
+
this.shippingMethods = [];
|
|
3065
|
+
this.taxes = 0;
|
|
3066
|
+
this.discount = 0;
|
|
3067
|
+
this.discountDescription = undefined;
|
|
3068
|
+
this.fees = 0;
|
|
3069
|
+
this.feesDescription = undefined;
|
|
3070
|
+
this.refId = undefined;
|
|
3071
|
+
this.uniqueRef = false;
|
|
3072
|
+
this.onlyShowBankInstallment = false;
|
|
3073
|
+
this.enableAppleCheckout = false;
|
|
3074
|
+
this.apiUrl = undefined;
|
|
3075
|
+
this.payUrl = undefined;
|
|
3076
|
+
this.debug = false;
|
|
3077
|
+
this.showContinueShoppingButton = false;
|
|
3078
|
+
this.enablePrePayTrigger = false;
|
|
3079
|
+
this.enablePreCheckoutTrigger = false;
|
|
3080
|
+
this.postcodeOptionalCountries = undefined;
|
|
3081
|
+
this.installmentsCount = 6;
|
|
3082
|
+
this.timelineStyle = 'default';
|
|
3083
|
+
this.footerMessage = '';
|
|
3084
|
+
this.result = undefined;
|
|
3085
|
+
this.paymentSuccessful = false;
|
|
3086
|
+
this.orderId = "";
|
|
3087
|
+
this.dark = undefined;
|
|
3088
|
+
this.internallyDisabled = false;
|
|
3089
|
+
}
|
|
3090
|
+
/**
|
|
3091
|
+
* Get the backend URL - uses custom apiUrl prop if provided, otherwise falls back to "http://localhost:8000"
|
|
3092
|
+
*/
|
|
3093
|
+
getApiUrl() {
|
|
3094
|
+
return this.apiUrl || (typeof process !== 'undefined' ? "http://localhost:8000" : null) || 'https://backend.sa.amwal.tech';
|
|
3095
|
+
}
|
|
3096
|
+
/**
|
|
3097
|
+
* Get the payment page URL - uses custom payUrl prop if provided, otherwise falls back to "http://localhost:3000"
|
|
3098
|
+
*/
|
|
3099
|
+
getPayUrl() {
|
|
3100
|
+
return this.payUrl || (typeof process !== 'undefined' ? "http://localhost:3000" : null) || 'https://pay.sa.amwal.tech';
|
|
3101
|
+
}
|
|
3102
|
+
prePayCheckoutAckHandler(event) {
|
|
3103
|
+
this.debugMsg("Pre Checkout Trigger Ack Received");
|
|
3104
|
+
this.debugMsg("Current Amount: ", this.amount);
|
|
3105
|
+
this.debugMsg("Current Taxes: ", this.taxes);
|
|
3106
|
+
this.debugMsg("Current Discount: ", this.discount);
|
|
3107
|
+
this.debugMsg("Current Fees: ", this.fees);
|
|
3108
|
+
this.debugMsg("Order Details: ", event.detail);
|
|
3109
|
+
event.detail.locale = this.locale;
|
|
3110
|
+
if (this.waitingForPreCheckoutTriggerAck) {
|
|
3111
|
+
this.waitingForPreCheckoutTriggerAck = false;
|
|
3112
|
+
this.createTransaction(Object.assign({}, event.detail));
|
|
3113
|
+
}
|
|
3114
|
+
else {
|
|
3115
|
+
this.debugMsg("Error: Unexpected or repeated amwalPreCheckoutTriggerAck");
|
|
3116
|
+
}
|
|
3117
|
+
}
|
|
3118
|
+
prePayCheckoutErrorHandler(event) {
|
|
3119
|
+
this.debugMsg(`Pre Checkout Trigger Error Received: ${event.detail}`);
|
|
3120
|
+
if (this.waitingForPreCheckoutTriggerAck) {
|
|
3121
|
+
this.waitingForPreCheckoutTriggerAck = false;
|
|
3122
|
+
this.orderError = event.detail;
|
|
3123
|
+
this.sendOrderDetails();
|
|
3124
|
+
}
|
|
3125
|
+
else {
|
|
3126
|
+
this.debugMsg("Error: Unexpected or repeated amwalPreCheckoutTriggerError");
|
|
3127
|
+
}
|
|
3128
|
+
}
|
|
3129
|
+
prePayTriggerAckHandler(event) {
|
|
3130
|
+
var _a;
|
|
3131
|
+
this.debugMsg("Pre Pay Trigger Ack Received");
|
|
3132
|
+
this.debugMsg("Current Shipping Methods: ", this.shippingMethods);
|
|
3133
|
+
this.debugMsg("Current Taxes: ", this.taxes);
|
|
3134
|
+
this.debugMsg("Current Discount: ", this.discount);
|
|
3135
|
+
this.debugMsg("Current Fees: ", this.fees);
|
|
3136
|
+
if (this.waitingForPrePayTriggerAck) {
|
|
3137
|
+
this.waitingForPrePayTriggerAck = false;
|
|
3138
|
+
(_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage(Object.assign({ type: 'pre-pay-trigger-ack', shippingMethods: this.shippingMethods, taxes: this.taxes, discount: this.discount, discountDescription: this.discountDescription, fees: this.fees, feesDescription: this.feesDescription, amount: this.amount }, event.detail), '*');
|
|
3139
|
+
}
|
|
3140
|
+
else {
|
|
3141
|
+
this.debugMsg("Error: Unexpected or repeated amwalPrePayTriggerAck");
|
|
3142
|
+
}
|
|
3143
|
+
}
|
|
3144
|
+
prePayTriggerErrorHandler(event) {
|
|
3145
|
+
var _a;
|
|
3146
|
+
this.debugMsg("Pre Pay Trigger Error Received");
|
|
3147
|
+
if (this.waitingForPrePayTriggerAck) {
|
|
3148
|
+
this.waitingForPrePayTriggerAck = false;
|
|
3149
|
+
(_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage(Object.assign({ type: 'pre-pay-trigger-error' }, event.detail), '*');
|
|
3150
|
+
}
|
|
3151
|
+
else {
|
|
3152
|
+
this.debugMsg("Error: Unexpected or repeated amwalPrePayTriggerError");
|
|
3153
|
+
}
|
|
3154
|
+
}
|
|
3155
|
+
parseMyArrayProp(newValue, _oldValue) {
|
|
3156
|
+
const newVal = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
|
|
3157
|
+
if (Array.isArray(newVal)) {
|
|
3158
|
+
this.debugMsg("Setting shippingMethods to:", newVal);
|
|
3159
|
+
this.shippingMethods = newVal;
|
|
3160
|
+
}
|
|
3161
|
+
else {
|
|
3162
|
+
this.debugMsg("Failed to set shippingMethods to:", newVal);
|
|
3163
|
+
}
|
|
3164
|
+
}
|
|
3165
|
+
parseInitiaalAddressProp(newValue, _oldValue) {
|
|
3166
|
+
this.initialAddress = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
|
|
3167
|
+
}
|
|
3168
|
+
parseAllowedAddressCountries(newValue, _oldValue) {
|
|
3169
|
+
const newVal = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
|
|
3170
|
+
if (Array.isArray(newVal)) {
|
|
3171
|
+
this.debugMsg("Setting allowedAddressCountries to:", newVal);
|
|
3172
|
+
this.allowedAddressCountries = newVal;
|
|
3173
|
+
}
|
|
3174
|
+
else {
|
|
3175
|
+
this.debugMsg("Failed to set allowedAddressCountries to:", newValue);
|
|
3176
|
+
}
|
|
3177
|
+
}
|
|
3178
|
+
parsepostcodeOptionalCountries(newValue, _oldValue) {
|
|
3179
|
+
const newVal = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
|
|
3180
|
+
if (Array.isArray(newVal)) {
|
|
3181
|
+
this.debugMsg("Setting postcodeOptionalCountries to:", newVal);
|
|
3182
|
+
this.postcodeOptionalCountries = newVal;
|
|
3183
|
+
}
|
|
3184
|
+
else {
|
|
3185
|
+
this.debugMsg("Failed to set postcodeOptionalCountries to:", newValue);
|
|
3186
|
+
}
|
|
3187
|
+
}
|
|
3188
|
+
parseAllowedAddressStates(newValue, _oldValue) {
|
|
3189
|
+
const newVal = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
|
|
3190
|
+
if (newVal) {
|
|
3191
|
+
this.debugMsg("Setting allowedAddressStates to:", newVal);
|
|
3192
|
+
this.allowedAddressStates = newVal;
|
|
3193
|
+
}
|
|
3194
|
+
else {
|
|
3195
|
+
this.debugMsg("Failed to set allowedAddressStates to:", newValue);
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
parseAllowedAddressCities(newValue, _oldValue) {
|
|
3199
|
+
const newVal = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
|
|
3200
|
+
if (newVal) {
|
|
3201
|
+
this.debugMsg("Setting allowedAddressCities to:", newVal);
|
|
3202
|
+
this.allowedAddressCities = newVal;
|
|
3203
|
+
}
|
|
3204
|
+
else {
|
|
3205
|
+
this.debugMsg("Failed to set allowedAddressCities to:", newValue);
|
|
3206
|
+
}
|
|
3207
|
+
}
|
|
3208
|
+
async updateLocale(newValue) {
|
|
3209
|
+
this.locale = newValue;
|
|
3210
|
+
this.t = await TranslationUtils.useTranslation(this.locale);
|
|
3211
|
+
}
|
|
3212
|
+
validateDiscount(newValue, _oldValue) {
|
|
3213
|
+
const isNumber = typeof newValue === 'number';
|
|
3214
|
+
if (isNumber) {
|
|
3215
|
+
if (newValue >= this.amount) {
|
|
3216
|
+
throw new Error('Discount must be less than amount field');
|
|
3217
|
+
}
|
|
3218
|
+
}
|
|
3219
|
+
else {
|
|
3220
|
+
throw new Error('Discount has to be a number');
|
|
3221
|
+
}
|
|
3222
|
+
}
|
|
3223
|
+
validateFees(newValue, _oldValue) {
|
|
3224
|
+
const isNumber = typeof newValue === 'number';
|
|
3225
|
+
if (!isNumber) {
|
|
3226
|
+
throw new Error('Fees has to be a number');
|
|
3227
|
+
}
|
|
3228
|
+
}
|
|
3229
|
+
toggleDark(matches) {
|
|
3230
|
+
this.dark = this.darkMode == 'on' || (this.darkMode == 'auto' && matches);
|
|
3231
|
+
}
|
|
3232
|
+
debugMsg(...args) {
|
|
3233
|
+
if (this.debug) {
|
|
3234
|
+
console.log(...args);
|
|
3235
|
+
}
|
|
3236
|
+
}
|
|
3237
|
+
async componentWillLoad() {
|
|
3238
|
+
// https://w3c.github.io/webauthn/#dom-publickeycredential-isconditionalmediationavailable
|
|
3239
|
+
const cacheKey = `${this.merchantId}-${this.countryCode}`;
|
|
3240
|
+
let config = showBrandingCache[cacheKey];
|
|
3241
|
+
if (!config) {
|
|
3242
|
+
try {
|
|
3243
|
+
const fromSession = sessionStorage.getItem('amwal-showbrand-' + cacheKey);
|
|
3244
|
+
if (fromSession) {
|
|
3245
|
+
config = JSON.parse(fromSession);
|
|
3246
|
+
}
|
|
3247
|
+
}
|
|
3248
|
+
catch (e) {
|
|
3249
|
+
console.log(e);
|
|
3250
|
+
}
|
|
3251
|
+
}
|
|
3252
|
+
if (!config) {
|
|
3253
|
+
try {
|
|
3254
|
+
const response = await fetch(`${this.getApiUrl()}/showbrand/`, {
|
|
3255
|
+
headers: {
|
|
3256
|
+
'Content-Type': 'application/json',
|
|
3257
|
+
'Amwal': this.merchantId,
|
|
3258
|
+
}
|
|
3259
|
+
});
|
|
3260
|
+
if (response.ok) {
|
|
3261
|
+
config = await response.json();
|
|
3262
|
+
showBrandingCache[cacheKey] = config;
|
|
3263
|
+
try {
|
|
3264
|
+
sessionStorage.setItem('amwal-showbrand-' + cacheKey, JSON.stringify(config));
|
|
3265
|
+
}
|
|
3266
|
+
catch (e) {
|
|
3267
|
+
console.log(e);
|
|
3268
|
+
}
|
|
3269
|
+
}
|
|
3270
|
+
}
|
|
3271
|
+
catch (e) {
|
|
3272
|
+
console.log(e);
|
|
3273
|
+
}
|
|
3274
|
+
}
|
|
3275
|
+
if (config) {
|
|
3276
|
+
// this.showBranding = config.SHOW_BRANDING;
|
|
3277
|
+
this.requirePopup = config.REQUIRE_POPUP && (window.top !== window.self);
|
|
3278
|
+
this.showButton = true;
|
|
3279
|
+
}
|
|
3280
|
+
try {
|
|
3281
|
+
this.t = await TranslationUtils.useTranslation(this.locale);
|
|
3282
|
+
}
|
|
3283
|
+
catch (e) {
|
|
3284
|
+
console.error('Failed to initialize translation:', e);
|
|
3285
|
+
}
|
|
3286
|
+
const publickeycredential = window === null || window === void 0 ? void 0 : window.PublicKeyCredential;
|
|
3287
|
+
const isConditionalMediationAvailable = publickeycredential === null || publickeycredential === void 0 ? void 0 : publickeycredential.isConditionalMediationAvailable;
|
|
3288
|
+
const browserSupportsWebauthnAutofill = isConditionalMediationAvailable ? await isConditionalMediationAvailable() : false;
|
|
3289
|
+
const browserName = this.agent.browser.name;
|
|
3290
|
+
const osName = this.agent.os.name;
|
|
3291
|
+
const firefoxOnMac = browserName === "Firefox" && osName == "Mac OS";
|
|
3292
|
+
const chromeOnNonIOS = ((browserName === "Chrome" || browserName === "Edge") && osName !== "iOS");
|
|
3293
|
+
const supportedBrowsers = ["Chrome", "Edge", "Firefox", "Safari"];
|
|
3294
|
+
const mobileOnSocialMediaBrowsers = (osName === "iOS" || osName === "Android") && !supportedBrowsers.includes(browserName);
|
|
3295
|
+
//const useAppleCheckout = this.enableAppleCheckout && this.isApplePaySupported()
|
|
3296
|
+
this.useModal = !this.requirePopup && !this.isApplePaySupported() &&
|
|
3297
|
+
(browserSupportsWebauthnAutofill
|
|
3298
|
+
|| chromeOnNonIOS
|
|
3299
|
+
|| firefoxOnMac
|
|
3300
|
+
|| mobileOnSocialMediaBrowsers);
|
|
3301
|
+
this.toggleDark(this.prefersDark.matches);
|
|
3302
|
+
this.prefersDark.addEventListener('change', (e) => this.toggleDark(e.matches));
|
|
3303
|
+
this.t = await TranslationUtils.useTranslation(this.locale);
|
|
3304
|
+
this.shippingMethods = JSON.parse(this.el.getAttribute('shipping-methods'));
|
|
3305
|
+
this.initialAddress = JSON.parse(this.el.getAttribute('initial-address'));
|
|
3306
|
+
this.allowedAddressCountries = JSON.parse(this.el.getAttribute('allowed-address-countries'));
|
|
3307
|
+
this.postcodeOptionalCountries = JSON.parse(this.el.getAttribute('postcode-optional-countries'));
|
|
3308
|
+
this.allowedAddressStates = JSON.parse(this.el.getAttribute('allowed-address-states'));
|
|
3309
|
+
this.allowedAddressCities = JSON.parse(this.el.getAttribute('allowed-address-cities'));
|
|
3310
|
+
}
|
|
3311
|
+
componentDidLoad() {
|
|
3312
|
+
this.computeHideIcons(this.el.offsetWidth);
|
|
3313
|
+
if (this.resizeObserver) {
|
|
3314
|
+
this.resizeObserver.disconnect();
|
|
3315
|
+
}
|
|
3316
|
+
this.resizeObserver = new ResizeObserver(entries => entries.forEach(entry => {
|
|
3317
|
+
this.computeHideIcons(entry.contentRect.width);
|
|
3318
|
+
}));
|
|
3319
|
+
this.resizeObserver.observe(this.el.querySelector('ion-button').shadowRoot.querySelector('button'));
|
|
3320
|
+
}
|
|
3321
|
+
disconnectedCallback() {
|
|
3322
|
+
if (this.resizeObserver) {
|
|
3323
|
+
this.resizeObserver.disconnect();
|
|
3324
|
+
}
|
|
3325
|
+
}
|
|
3326
|
+
sendOrderDetails() {
|
|
3327
|
+
if (this.payWindow && !this.paymentSuccessful) {
|
|
3328
|
+
if (this.orderError) {
|
|
3329
|
+
this.payWindow.postMessage(Object.assign({ type: 'amwal-order-error' }, this.orderError), '*');
|
|
3330
|
+
}
|
|
3331
|
+
else if (this.orderId) {
|
|
3332
|
+
const orderDetails = {
|
|
3333
|
+
type: 'amwal-order-id',
|
|
3334
|
+
id: this.orderId,
|
|
3335
|
+
darkMode: this.darkMode,
|
|
3336
|
+
lang: this.locale,
|
|
3337
|
+
addressRequired: this.addressRequired,
|
|
3338
|
+
street2Required: this.street2Required,
|
|
3339
|
+
emailRequired: this.emailRequired,
|
|
3340
|
+
addressHandshake: this.addressHandshake,
|
|
3341
|
+
sendExtraAddressFields: this.sendExtraAddressFields,
|
|
3342
|
+
enableDynamicShippingDetails: this.enableDynamicShippingDetails,
|
|
3343
|
+
enablePrePayTrigger: this.enablePrePayTrigger,
|
|
3344
|
+
shippingMethods: this.shippingMethods,
|
|
3345
|
+
taxes: this.taxes,
|
|
3346
|
+
discount: this.discount,
|
|
3347
|
+
discountDescription: this.discountDescription,
|
|
3348
|
+
fees: this.fees,
|
|
3349
|
+
feesDescription: this.feesDescription,
|
|
3350
|
+
initialEmail: this.initialEmail,
|
|
3351
|
+
initialFirstName: this.initialFirstName,
|
|
3352
|
+
initialLastName: this.initialLastName,
|
|
3353
|
+
initialPhoneNumber: this.initialPhoneNumber,
|
|
3354
|
+
initialAddress: this.initialAddress,
|
|
3355
|
+
allowedAddressCountries: this.allowedAddressCountries,
|
|
3356
|
+
allowedAddressStates: this.allowedAddressStates,
|
|
3357
|
+
allowedAddressCities: this.allowedAddressCities,
|
|
3358
|
+
installmentOptionsUrl: this.installmentOptionsUrl,
|
|
3359
|
+
postcodeOptionalCountries: this.postcodeOptionalCountries,
|
|
3360
|
+
onlyShowBankInstallment: this.onlyShowBankInstallment,
|
|
3361
|
+
enableAppleCheckout: this.enableAppleCheckout
|
|
3362
|
+
};
|
|
3363
|
+
this.payWindow.postMessage(orderDetails, '*');
|
|
3364
|
+
this.debugMsg("Sent Order details: ", orderDetails);
|
|
3365
|
+
}
|
|
3366
|
+
}
|
|
3367
|
+
}
|
|
3368
|
+
async createTransaction(orderDetails = undefined) {
|
|
3369
|
+
var _a, _b, _c, _d;
|
|
3370
|
+
try {
|
|
3371
|
+
let client_phone_number = undefined;
|
|
3372
|
+
try {
|
|
3373
|
+
const parsedNumber = parsePhoneNumber(this.initialPhoneNumber, this.countryCode);
|
|
3374
|
+
if (parsedNumber && parsedNumber.isValid()) {
|
|
3375
|
+
client_phone_number = parsedNumber.number;
|
|
3376
|
+
}
|
|
3377
|
+
}
|
|
3378
|
+
catch (err) {
|
|
3379
|
+
console.log(err);
|
|
3380
|
+
}
|
|
3381
|
+
const modalLang = (_b = (_a = orderDetails === null || orderDetails === void 0 ? void 0 : orderDetails.locale) !== null && _a !== void 0 ? _a : this.locale) !== null && _b !== void 0 ? _b : 'en';
|
|
3382
|
+
const payload = Object.assign(Object.assign(Object.assign({ merchantID: this.merchantId, amount: this.amount, taxes: this.taxes, discount: this.discount, fees: this.fees, installmentOptionsUrl: this.installmentOptionsUrl, client_email: this.initialEmail, client_first_name: this.initialFirstName, client_last_name: this.initialLastName, client_phone_number, trx_lang: modalLang, address_details: this.initialAddress }, (orderDetails ? {
|
|
3383
|
+
order_details: orderDetails
|
|
3384
|
+
} : undefined)), (((_c = this.shippingMethods) === null || _c === void 0 ? void 0 : _c.length) == 1 ? {
|
|
3385
|
+
shipping: this.shippingMethods[0].price,
|
|
3386
|
+
shipping_details: this.shippingMethods[0]
|
|
3387
|
+
} : undefined)), (this.refId ? { refId: this.refId, uniqueRef: this.uniqueRef } : undefined));
|
|
3388
|
+
const response = await fetch(`${this.getApiUrl()}/transactions/`, {
|
|
3389
|
+
method: 'POST',
|
|
3390
|
+
headers: {
|
|
3391
|
+
'Content-Type': 'application/json',
|
|
3392
|
+
'Amwal': this.merchantId,
|
|
3393
|
+
},
|
|
3394
|
+
body: JSON.stringify(Object.assign({}, payload))
|
|
3395
|
+
});
|
|
3396
|
+
this.result = await response.json();
|
|
3397
|
+
if (!response.ok) {
|
|
3398
|
+
throw (_d = this.result.detail) !== null && _d !== void 0 ? _d : response.statusText;
|
|
3399
|
+
}
|
|
3400
|
+
this.orderId = this.result.id;
|
|
3401
|
+
}
|
|
3402
|
+
catch (e) {
|
|
3403
|
+
console.log(e);
|
|
3404
|
+
this.orderError = {
|
|
3405
|
+
description: e.toString(),
|
|
3406
|
+
};
|
|
3407
|
+
}
|
|
3408
|
+
this.sendOrderDetails();
|
|
3409
|
+
}
|
|
3410
|
+
async handleCheckout() {
|
|
3411
|
+
var _a;
|
|
3412
|
+
this.orderId = undefined;
|
|
3413
|
+
this.orderError = undefined;
|
|
3414
|
+
this.internallyDisabled = true;
|
|
3415
|
+
if (this.useModal) {
|
|
3416
|
+
await this.presentModal();
|
|
3417
|
+
}
|
|
3418
|
+
else {
|
|
3419
|
+
this.openPopup();
|
|
3420
|
+
document.body.classList.add("amwal-overlay-active");
|
|
3421
|
+
document.body.appendChild(this.el.querySelector('#amwal-overlay-id'));
|
|
3422
|
+
const timer = setInterval(() => {
|
|
3423
|
+
var _a;
|
|
3424
|
+
// all popup urls shouldn't have "Cross-Origin-Opener-Policy" header set otherwise window.closed will be true
|
|
3425
|
+
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy
|
|
3426
|
+
if ((_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.closed) {
|
|
3427
|
+
try {
|
|
3428
|
+
document.body.classList.remove("amwal-overlay-active");
|
|
3429
|
+
const overlayElement = document.body.removeChild(document.querySelector('body > #amwal-overlay-id'));
|
|
3430
|
+
this.el.querySelector('#amwal-overlay-template').appendChild(overlayElement);
|
|
3431
|
+
this.sendDismissEvent();
|
|
3432
|
+
}
|
|
3433
|
+
catch (err) {
|
|
3434
|
+
console.log(err);
|
|
3435
|
+
}
|
|
3436
|
+
finally {
|
|
3437
|
+
clearInterval(timer);
|
|
3438
|
+
}
|
|
3439
|
+
}
|
|
3440
|
+
}, 200);
|
|
3441
|
+
}
|
|
3442
|
+
(_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage({ type: "amwal-lang", lang: this.locale }, '*');
|
|
3443
|
+
if (this.enablePreCheckoutTrigger) {
|
|
3444
|
+
this.waitingForPreCheckoutTriggerAck = true;
|
|
3445
|
+
this.amwalPreCheckoutTrigger.emit();
|
|
3446
|
+
}
|
|
3447
|
+
else {
|
|
3448
|
+
this.createTransaction();
|
|
3449
|
+
}
|
|
3450
|
+
}
|
|
3451
|
+
async presentModal() {
|
|
3452
|
+
const div = document.createElement('div');
|
|
3453
|
+
div.innerHTML = `
|
|
3454
|
+
<iframe
|
|
3455
|
+
name="amwal-pay" allow="publickey-credentials-get; geolocation; payment"
|
|
3456
|
+
style="flex: 1; border: none;"
|
|
3457
|
+
src=${this.getPayUrl()}
|
|
3458
|
+
/>
|
|
3459
|
+
`;
|
|
3460
|
+
this.checkoutModalEl = await modalController.create({
|
|
3461
|
+
component: div,
|
|
3462
|
+
canDismiss: false,
|
|
3463
|
+
});
|
|
3464
|
+
await this.checkoutModalEl.present();
|
|
3465
|
+
const iframeEl = document.getElementsByTagName("iframe").namedItem("amwal-pay");
|
|
3466
|
+
this.payWindow = iframeEl === null || iframeEl === void 0 ? void 0 : iframeEl.contentWindow;
|
|
3467
|
+
}
|
|
3468
|
+
setSuccess(success) {
|
|
3469
|
+
this.paymentSuccessful = success;
|
|
3470
|
+
if (this.paymentSuccessful) {
|
|
3471
|
+
this.amwalCheckoutSuccess.emit({
|
|
3472
|
+
orderId: this.orderId,
|
|
3473
|
+
});
|
|
3474
|
+
}
|
|
3475
|
+
}
|
|
3476
|
+
async dismissModal() {
|
|
3477
|
+
if (this.checkoutModalEl) {
|
|
3478
|
+
this.checkoutModalEl.canDismiss = true;
|
|
3479
|
+
await modalController.dismiss();
|
|
3480
|
+
this.checkoutModalEl = undefined;
|
|
3481
|
+
}
|
|
3482
|
+
this.sendDismissEvent();
|
|
3483
|
+
}
|
|
3484
|
+
async sendDismissEvent() {
|
|
3485
|
+
if (this.orderId && !this.paymentSuccessful) {
|
|
3486
|
+
try {
|
|
3487
|
+
const response = await fetch(`${this.getApiUrl()}/transactions/${this.orderId}`);
|
|
3488
|
+
const order = await response.json();
|
|
3489
|
+
this.setSuccess(order.status === 'success');
|
|
3490
|
+
}
|
|
3491
|
+
catch (error) {
|
|
3492
|
+
console.error(error);
|
|
3493
|
+
}
|
|
3494
|
+
}
|
|
3495
|
+
this.internallyDisabled = false;
|
|
3496
|
+
this.amwalDismissed.emit({
|
|
3497
|
+
orderId: this.orderId,
|
|
3498
|
+
paymentSuccessful: this.paymentSuccessful
|
|
3499
|
+
});
|
|
3500
|
+
this.orderId = "";
|
|
3501
|
+
this.paymentSuccessful = false;
|
|
3502
|
+
}
|
|
3503
|
+
payWindowMessageHandler(ev) {
|
|
3504
|
+
var _a, _b;
|
|
3505
|
+
let match = true;
|
|
3506
|
+
try {
|
|
3507
|
+
const message = JSON.parse(ev.data);
|
|
3508
|
+
if (message.sender === "MF-3DSecure") {
|
|
3509
|
+
const url = message.url;
|
|
3510
|
+
if (url) {
|
|
3511
|
+
this.payWindow.location.href = url;
|
|
3512
|
+
return;
|
|
3513
|
+
}
|
|
3514
|
+
}
|
|
3515
|
+
}
|
|
3516
|
+
catch (error) {
|
|
3517
|
+
//console.log(error);
|
|
3518
|
+
}
|
|
3519
|
+
if (ev.data == 'query-dark-mode') {
|
|
3520
|
+
(_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage({
|
|
3521
|
+
type: 'dark-mode',
|
|
3522
|
+
darkMode: this.darkMode,
|
|
3523
|
+
}, '*');
|
|
3524
|
+
}
|
|
3525
|
+
else if (ev.data == 'query-lang') {
|
|
3526
|
+
(_b = this.payWindow) === null || _b === void 0 ? void 0 : _b.postMessage({
|
|
3527
|
+
type: 'lang',
|
|
3528
|
+
lang: this.locale,
|
|
3529
|
+
showContinueShoppingButton: this.showContinueShoppingButton,
|
|
3530
|
+
}, '*');
|
|
3531
|
+
}
|
|
3532
|
+
else if (ev.data == 'query-amwal-order-id') {
|
|
3533
|
+
this.sendOrderDetails();
|
|
3534
|
+
}
|
|
3535
|
+
else if (ev.data === 'dismiss') {
|
|
3536
|
+
this.dismissModal();
|
|
3537
|
+
}
|
|
3538
|
+
else if (this.orderId) {
|
|
3539
|
+
//following messages result in emitted events. to avoid duplicate event firing, only button with orderId is triggered
|
|
3540
|
+
if (ev.data === 'paymentSuccessful') {
|
|
3541
|
+
this.setSuccess(true);
|
|
3542
|
+
}
|
|
3543
|
+
else if (ev.data === 'updateOrderOnPaymentsuccess') {
|
|
3544
|
+
this.updateOrderOnPaymentsuccess.emit({
|
|
3545
|
+
orderId: this.orderId,
|
|
3546
|
+
});
|
|
3547
|
+
}
|
|
3548
|
+
else if (ev.data.type === 'address-country-update') {
|
|
3549
|
+
this.waitingForAddressCountryAck = true;
|
|
3550
|
+
this.amwalAddressCountryUpdate.emit(Object.assign({}, ev.data));
|
|
3551
|
+
}
|
|
3552
|
+
else if (ev.data.type === 'address-state-update') {
|
|
3553
|
+
this.waitingForAddressStateAck = true;
|
|
3554
|
+
this.amwalAddressStateUpdate.emit(Object.assign({}, ev.data));
|
|
3555
|
+
}
|
|
3556
|
+
else if (ev.data.type == 'amwal-address-update') {
|
|
3557
|
+
this.waitingForAddressAck = true;
|
|
3558
|
+
this.amwalAddressUpdate.emit(Object.assign(Object.assign({}, ev.data.address), { orderId: this.orderId }));
|
|
3559
|
+
}
|
|
3560
|
+
else if (ev.data.type == 'amwal-pre-pay-trigger') {
|
|
3561
|
+
this.waitingForPrePayTriggerAck = true;
|
|
3562
|
+
this.amwalPrePayTrigger.emit(ev.data.transactionDetails);
|
|
3563
|
+
}
|
|
3564
|
+
else {
|
|
3565
|
+
match = false;
|
|
3566
|
+
}
|
|
3567
|
+
}
|
|
3568
|
+
else {
|
|
3569
|
+
match = false;
|
|
3570
|
+
}
|
|
3571
|
+
if (match) {
|
|
3572
|
+
this.debugMsg(ev);
|
|
3573
|
+
}
|
|
3574
|
+
}
|
|
3575
|
+
addressAckHandler() {
|
|
3576
|
+
var _a;
|
|
3577
|
+
this.debugMsg("Address Ack Received");
|
|
3578
|
+
this.debugMsg("Current Shipping Methods: ", this.shippingMethods);
|
|
3579
|
+
this.debugMsg("Current Taxes: ", this.taxes);
|
|
3580
|
+
this.debugMsg("Current Discount: ", this.discount);
|
|
3581
|
+
this.debugMsg("Current Fees: ", this.fees);
|
|
3582
|
+
if (this.waitingForAddressAck) {
|
|
3583
|
+
this.waitingForAddressAck = false;
|
|
3584
|
+
(_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage({
|
|
3585
|
+
type: 'amwal-address-ack',
|
|
3586
|
+
shippingMethods: this.shippingMethods,
|
|
3587
|
+
taxes: this.taxes,
|
|
3588
|
+
discount: this.discount,
|
|
3589
|
+
discountDescription: this.discountDescription,
|
|
3590
|
+
fees: this.fees,
|
|
3591
|
+
feesDescription: this.feesDescription,
|
|
3592
|
+
amount: this.amount,
|
|
3593
|
+
}, '*');
|
|
3594
|
+
}
|
|
3595
|
+
else {
|
|
3596
|
+
this.debugMsg("Error: Unexpected or repeated amwalAddressAck");
|
|
3597
|
+
}
|
|
3598
|
+
}
|
|
3599
|
+
addressTriggerErrorHandler(event) {
|
|
3600
|
+
var _a;
|
|
3601
|
+
this.debugMsg("Address Trigger Error Received");
|
|
3602
|
+
if (this.waitingForAddressAck) {
|
|
3603
|
+
this.waitingForAddressAck = false;
|
|
3604
|
+
(_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage(Object.assign({ type: 'amwal-address-trigger-error' }, event.detail), '*');
|
|
3605
|
+
}
|
|
3606
|
+
else {
|
|
3607
|
+
this.debugMsg("Error: Unexpected or repeated amwalAddressTriggerError");
|
|
3608
|
+
}
|
|
3609
|
+
}
|
|
3610
|
+
addressCountryAckHandler() {
|
|
3611
|
+
var _a;
|
|
3612
|
+
if (this.waitingForAddressCountryAck) {
|
|
3613
|
+
this.waitingForAddressCountryAck = false;
|
|
3614
|
+
(_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage({
|
|
3615
|
+
type: 'amwal-address-country-ack',
|
|
3616
|
+
allowedAddressStates: this.allowedAddressStates,
|
|
3617
|
+
}, '*');
|
|
3618
|
+
}
|
|
3619
|
+
else {
|
|
3620
|
+
this.debugMsg("Error: Unexpected or repeated amwalAddressCountryAck");
|
|
3621
|
+
}
|
|
3622
|
+
}
|
|
3623
|
+
addressStateAckHandler() {
|
|
3624
|
+
var _a;
|
|
3625
|
+
if (this.waitingForAddressStateAck) {
|
|
3626
|
+
this.waitingForAddressStateAck = false;
|
|
3627
|
+
(_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.postMessage({
|
|
3628
|
+
type: 'amwal-address-state-ack',
|
|
3629
|
+
allowedAddressCities: this.allowedAddressCities,
|
|
3630
|
+
}, '*');
|
|
3631
|
+
}
|
|
3632
|
+
else {
|
|
3633
|
+
this.debugMsg("Error: Unexpected or repeated amwalAddressStateAck");
|
|
3634
|
+
}
|
|
3635
|
+
}
|
|
3636
|
+
openPopup() {
|
|
3637
|
+
var _a;
|
|
3638
|
+
(_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.close();
|
|
3639
|
+
const popupWidth = 500;
|
|
3640
|
+
const popupHeight = 860;
|
|
3641
|
+
const popupLeft = window.screenLeft + (screen.width - popupWidth) / 2;
|
|
3642
|
+
const popupTop = window.screenTop + (screen.height - popupHeight) / 4;
|
|
3643
|
+
const strWindowFeatures = `modal=yes, width=${popupWidth}, height=${popupHeight}, top=${popupTop}, left=${popupLeft}`;
|
|
3644
|
+
this.payWindow = window.open(this.getPayUrl(), 'amwal-pay', strWindowFeatures);
|
|
3645
|
+
this.payWindow.focus();
|
|
3646
|
+
}
|
|
3647
|
+
checkBrowserType() {
|
|
3648
|
+
return this.agent.browser.name;
|
|
3649
|
+
}
|
|
3650
|
+
isApplePaySupported() {
|
|
3651
|
+
var _a;
|
|
3652
|
+
// const osName = this.agent.os.name;
|
|
3653
|
+
// const browserName = this.agent.browser.name;
|
|
3654
|
+
// console.log('browserName ', browserName, ' / osName ', osName)
|
|
3655
|
+
// return osName && browserName && (osName === 'iOS' || osName === 'Mac OS' || osName === 'iPadOS') && (browserName === 'Safari' || browserName === 'Chrome');
|
|
3656
|
+
try {
|
|
3657
|
+
return (_a = window.ApplePaySession) === null || _a === void 0 ? void 0 : _a.canMakePayments();
|
|
3658
|
+
}
|
|
3659
|
+
catch (e) {
|
|
3660
|
+
console.error(e);
|
|
3661
|
+
}
|
|
3662
|
+
return false;
|
|
3663
|
+
}
|
|
3664
|
+
computeHideIcons(buttonWidth) {
|
|
3665
|
+
if (buttonWidth) {
|
|
3666
|
+
const ribbonShown = this.showDiscountRibbon && this.discount > 0 && this.amount > 0;
|
|
3667
|
+
const appleMaxWidth = ribbonShown ? 270 : 220;
|
|
3668
|
+
const nonAppleMaxWidth = ribbonShown ? 220 : 170;
|
|
3669
|
+
const newHideIcons = buttonWidth < (this.isApplePaySupported() ? appleMaxWidth : nonAppleMaxWidth);
|
|
3670
|
+
if (this.hideIcons !== newHideIcons) {
|
|
3671
|
+
this.hideIcons = newHideIcons;
|
|
3672
|
+
}
|
|
3673
|
+
}
|
|
3674
|
+
}
|
|
3675
|
+
formatNumber(value) {
|
|
3676
|
+
return Number(value.toFixed(2));
|
|
3677
|
+
}
|
|
3678
|
+
getNetAmount() {
|
|
3679
|
+
var _a, _b, _c;
|
|
3680
|
+
const netAmount = this.amount + ((_a = this.taxes) !== null && _a !== void 0 ? _a : 0) + ((_b = this.fees) !== null && _b !== void 0 ? _b : 0) - ((_c = this.discount) !== null && _c !== void 0 ? _c : 0);
|
|
3681
|
+
return this.formatNumber(netAmount);
|
|
3682
|
+
}
|
|
3683
|
+
render() {
|
|
3684
|
+
var _a, _b;
|
|
3685
|
+
return [
|
|
3686
|
+
h("div", null, h("link", { href: 'https://fonts.googleapis.com/css?family=Cairo', rel: 'stylesheet' }), this.paymentSuccessful ?
|
|
3687
|
+
h("center", null, h("ion-text", null, this.t("Your Payment has been processed successfully!")), ",", h("div", { style: { width: '40px', height: '40px', margin: '10px' }, class: this.paymentSuccessful ? undefined : 'hidden' }, h("svg", { version: "1.1", id: "Capa_1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 50 50", style: { "enable-background": "new 0 0 50 50;" } }, h("circle", { style: { fill: "#25AE88" }, cx: "25", cy: "25", r: "25" }), h("polyline", { style: {
|
|
3688
|
+
fill: 'none',
|
|
3689
|
+
stroke: '#FFFFFF',
|
|
3690
|
+
'stroke-width': '2',
|
|
3691
|
+
'stroke-linecap': 'round',
|
|
3692
|
+
'stroke-linejoin': 'round',
|
|
3693
|
+
'stroke-miterlimit': '10'
|
|
3694
|
+
}, points: "38,15 22,33 12,25" }))))
|
|
3695
|
+
:
|
|
3696
|
+
h("center", { hidden: !this.showButton }, h("amwal-installments-timeline", { "enable-installments": this.onlyShowBankInstallment, "installments-count": this.installmentsCount, locale: this.locale, amount: this.getNetAmount(), "timeline-style": this.timelineStyle, "footer-message": this.footerMessage }), h("ion-button", { class: `amwal-checkout-button`, color: "dark", onClick: () => this.handleCheckout(), disabled: this.disabled || this.internallyDisabled }, !this.hideIcons && this.showDiscountRibbon && this.discount > 0 && this.amount > 0 &&
|
|
3697
|
+
h("div", { class: 'ribbon' }, h("span", { class: 'ribbon-text' }, this.t("OFF"), " ", h("br", null), this.formatNumber((this.discount / (this.amount + ((_a = this.taxes) !== null && _a !== void 0 ? _a : 0) + ((_b = this.fees) !== null && _b !== void 0 ? _b : 0))) * 100) + '%')), h("div", { class: 'payment-brand-class', slot: this.locale === 'ar' ? "start" : "end" }, h("div", null, this.isApplePaySupported() && h("img", { width: 63, src: applePayLogoSvg }), h("img", { width: 60, src: cardLogoSvg }))), this.locale === 'ar' && h("div", { class: "vl" }), h("div", { class: 'button-text' }, this.t(this.label), " "), this.locale === 'en' && h("div", { class: "vl" })))),
|
|
3698
|
+
h("template", { id: "amwal-overlay-template" }, h("div", { class: "amwal-overlay", id: "amwal-overlay-id" }, h("div", { class: "amwal-overlay-container" }, h("span", { class: "amwal-overlay-close", onClick: () => { var _a; return (_a = this.payWindow) === null || _a === void 0 ? void 0 : _a.close(); } }, "\u2715"), h("p", null, this.t("Don't see your checkout window?")), h("a", { role: "button", class: "amwal-overlay-button", onClick: () => {
|
|
3699
|
+
if (this.checkBrowserType() === 'Safari' || !this.payWindow) {
|
|
3700
|
+
this.openPopup();
|
|
3701
|
+
}
|
|
3702
|
+
else {
|
|
3703
|
+
this.payWindow.focus();
|
|
3704
|
+
}
|
|
3705
|
+
} }, this.t("Click here")))))
|
|
3706
|
+
];
|
|
3707
|
+
}
|
|
3708
|
+
get el() { return this; }
|
|
3709
|
+
static get watchers() { return {
|
|
3710
|
+
"shippingMethods": ["parseMyArrayProp"],
|
|
3711
|
+
"initialAddress": ["parseInitiaalAddressProp"],
|
|
3712
|
+
"allowedAddressCountries": ["parseAllowedAddressCountries"],
|
|
3713
|
+
"postcodeOptionalCountries": ["parsepostcodeOptionalCountries"],
|
|
3714
|
+
"allowedAddressStates": ["parseAllowedAddressStates"],
|
|
3715
|
+
"allowedAddressCities": ["parseAllowedAddressCities"],
|
|
3716
|
+
"locale": ["updateLocale"],
|
|
3717
|
+
"discount": ["validateDiscount"],
|
|
3718
|
+
"fees": ["validateFees"]
|
|
3719
|
+
}; }
|
|
3720
|
+
static get style() { return amwalCheckoutButtonCss; }
|
|
3721
|
+
}, [0, "amwal-checkout-button", {
|
|
3722
|
+
"merchantId": [1, "merchant-id"],
|
|
3723
|
+
"installmentOptionsUrl": [1, "installment-options-url"],
|
|
3724
|
+
"amount": [2],
|
|
3725
|
+
"countryCode": [1, "country-code"],
|
|
3726
|
+
"locale": [1],
|
|
3727
|
+
"label": [1],
|
|
3728
|
+
"darkMode": [1, "dark-mode"],
|
|
3729
|
+
"disabled": [4],
|
|
3730
|
+
"addressRequired": [4, "address-required"],
|
|
3731
|
+
"showPaymentBrands": [4, "show-payment-brands"],
|
|
3732
|
+
"showDiscountRibbon": [4, "show-discount-ribbon"],
|
|
3733
|
+
"initialAddress": [16],
|
|
3734
|
+
"allowedAddressCountries": [16],
|
|
3735
|
+
"allowedAddressStates": [16],
|
|
3736
|
+
"allowedAddressCities": [16],
|
|
3737
|
+
"street2Required": [4, "street2-required"],
|
|
3738
|
+
"emailRequired": [4, "email-required"],
|
|
3739
|
+
"initialEmail": [1, "initial-email"],
|
|
3740
|
+
"initialFirstName": [1, "initial-first-name"],
|
|
3741
|
+
"initialLastName": [1, "initial-last-name"],
|
|
3742
|
+
"initialPhoneNumber": [1, "initial-phone-number"],
|
|
3743
|
+
"addressHandshake": [4, "address-handshake"],
|
|
3744
|
+
"enableDynamicShippingDetails": [4, "enable-dynamic-shipping-details"],
|
|
3745
|
+
"sendExtraAddressFields": [4, "send-extra-address-fields"],
|
|
3746
|
+
"shippingMethods": [16],
|
|
3747
|
+
"taxes": [2],
|
|
3748
|
+
"discount": [2],
|
|
3749
|
+
"discountDescription": [1, "discount-description"],
|
|
3750
|
+
"fees": [2],
|
|
3751
|
+
"feesDescription": [1, "fees-description"],
|
|
3752
|
+
"refId": [1, "ref-id"],
|
|
3753
|
+
"uniqueRef": [4, "unique-ref"],
|
|
3754
|
+
"onlyShowBankInstallment": [4, "only-show-bank-installment"],
|
|
3755
|
+
"enableAppleCheckout": [4, "enable-apple-checkout"],
|
|
3756
|
+
"apiUrl": [1, "api-url"],
|
|
3757
|
+
"payUrl": [1, "pay-url"],
|
|
3758
|
+
"debug": [4],
|
|
3759
|
+
"showContinueShoppingButton": [4, "show-continue-shopping-button"],
|
|
3760
|
+
"enablePrePayTrigger": [4, "enable-pre-pay-trigger"],
|
|
3761
|
+
"enablePreCheckoutTrigger": [4, "enable-pre-checkout-trigger"],
|
|
3762
|
+
"postcodeOptionalCountries": [16],
|
|
3763
|
+
"installmentsCount": [2, "installments-count"],
|
|
3764
|
+
"timelineStyle": [1, "timeline-style"],
|
|
3765
|
+
"footerMessage": [1, "footer-message"],
|
|
3766
|
+
"hideIcons": [32],
|
|
3767
|
+
"result": [32],
|
|
3768
|
+
"paymentSuccessful": [32],
|
|
3769
|
+
"orderId": [32],
|
|
3770
|
+
"dark": [32],
|
|
3771
|
+
"internallyDisabled": [32],
|
|
3772
|
+
"dismissModal": [64]
|
|
3773
|
+
}, [[0, "amwalPreCheckoutTriggerAck", "prePayCheckoutAckHandler"], [0, "amwalPreCheckoutTriggerError", "prePayCheckoutErrorHandler"], [0, "amwalPrePayTriggerAck", "prePayTriggerAckHandler"], [0, "amwalPrePayTriggerError", "prePayTriggerErrorHandler"], [8, "message", "payWindowMessageHandler"], [0, "amwalAddressAck", "addressAckHandler"], [0, "amwalAddressTriggerError", "addressTriggerErrorHandler"], [0, "amwalAddressCountryAck", "addressCountryAckHandler"], [0, "amwalAddressStateAck", "addressStateAckHandler"]]]);
|
|
3774
|
+
function defineCustomElement$1() {
|
|
3775
|
+
if (typeof customElements === "undefined") {
|
|
3776
|
+
return;
|
|
3777
|
+
}
|
|
3778
|
+
const components = ["amwal-checkout-button", "amwal-installments-timeline", "ion-button", "ion-ripple-effect", "ion-text"];
|
|
3779
|
+
components.forEach(tagName => { switch (tagName) {
|
|
3780
|
+
case "amwal-checkout-button":
|
|
3781
|
+
if (!customElements.get(tagName)) {
|
|
3782
|
+
customElements.define(tagName, AmwalCheckoutButton$1);
|
|
3783
|
+
}
|
|
3784
|
+
break;
|
|
3785
|
+
case "amwal-installments-timeline":
|
|
3786
|
+
if (!customElements.get(tagName)) {
|
|
3787
|
+
defineCustomElement$5();
|
|
3788
|
+
}
|
|
3789
|
+
break;
|
|
3790
|
+
case "ion-button":
|
|
3791
|
+
if (!customElements.get(tagName)) {
|
|
3792
|
+
defineCustomElement$4();
|
|
3793
|
+
}
|
|
3794
|
+
break;
|
|
3795
|
+
case "ion-ripple-effect":
|
|
3796
|
+
if (!customElements.get(tagName)) {
|
|
3797
|
+
defineCustomElement$3();
|
|
3798
|
+
}
|
|
3799
|
+
break;
|
|
3800
|
+
case "ion-text":
|
|
3801
|
+
if (!customElements.get(tagName)) {
|
|
3802
|
+
defineCustomElement$2();
|
|
3803
|
+
}
|
|
3804
|
+
break;
|
|
3805
|
+
} });
|
|
3806
|
+
}
|
|
3807
|
+
|
|
3808
|
+
const AmwalCheckoutButton = AmwalCheckoutButton$1;
|
|
3809
|
+
const defineCustomElement = defineCustomElement$1;
|
|
3810
|
+
|
|
3811
|
+
export { AmwalCheckoutButton, defineCustomElement };
|