@descope/user-management-widget 0.2.4 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,7 @@
1
- // @descope/user-management-widget v0.2.4
2
- !function(){"use strict";function e(...e){return t=>e.reduce(((e,t)=>t(e)),t)}var t=function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},t.apply(this,arguments)};function n(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function r(e,t,n,r){return new(n||(n=Promise))((function(o,d){function i(e){try{s(r.next(e))}catch(e){d(e)}}function a(e){try{s(r.throw(e))}catch(e){d(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,a)}s((r=r.apply(e,t||[])).next())}))}function o(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function d(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}"function"==typeof SuppressedError&&SuppressedError;const i=e=>{const t=Symbol((e=>{const t=e.toString();let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n&=n;return n.toString(16)})(e));return n=>{if(n[t])return n;const r=e(n);return r[t]=!0,r}},a=i((e=>{var t,n;return n=class extends e{constructor(){super(...arguments),t.set(this,!0)}connectedCallback(){var e,n;null===(e=super.connectedCallback)||void 0===e||e.call(this),(null===(n=this.shadowRoot)||void 0===n?void 0:n.isConnected)&&o(this,t,"f")&&(d(this,t,!1,"f"),this.init())}init(){return r(this,void 0,void 0,(function*(){}))}},t=new WeakMap,n})),s=["error","warn","info","debug"],u=i((e=>{var t,n,r,i;return i=class extends e{constructor(){super(...arguments),t.add(this),n.set(this,o(this,t,"m",r).call(this,console))}set logger(e){d(this,n,o(this,t,"m",r).call(this,e),"f")}get logger(){return o(this,n,"f")}onLogEvent(e,t){}},n=new WeakMap,t=new WeakSet,r=function(e){return s.reduce(((t,n)=>(t[n]=(...t)=>{var r;this.onLogEvent(n,t),null===(r=e[n])||void 0===r||r.call(e,...t)},t)),{})},i})),c=i((t=>{var n,i,s,c,l,$,f;return f=class extends(e(a,u)(t)){constructor(){super(...arguments),n.add(this),i.set(this,void 0),this.attributeChangedCallback=(e,t,r)=>{var d;null===(d=super.attributeChangedCallback)||void 0===d||d.call(this,e,t,r),"debug"===e&&o(this,n,"m",l).call(this)}}get debug(){return"true"===this.getAttribute("debug")}onLogEvent(e,t){var r;null===(r=super.onLogEvent)||void 0===r||r.call(this,e,t),"error"===e&&o(this,n,"m",$).call(this,t[0]||"Error",t[1])}init(){const e=Object.create(null,{init:{get:()=>super.init}});var t;return r(this,void 0,void 0,(function*(){yield null===(t=e.init)||void 0===t?void 0:t.call(this),o(this,n,"m",l).call(this)}))}},i=new WeakMap,n=new WeakSet,s=function(){var e;null===(e=o(this,i,"f"))||void 0===e||e.remove(),d(this,i,null,"f")},c=function(){return r(this,void 0,void 0,(function*(){d(this,i,document.createElement("descope-debugger"),"f"),Object.assign(o(this,i,"f").style,{position:"fixed",top:"0",right:"0",height:"100vh",width:"100vw",pointerEvents:"none",zIndex:99999}),yield Promise.resolve().then((function(){return Vu})),document.body.appendChild(o(this,i,"f"))}))},l=function(){this.debug?o(this,n,"m",c).call(this):o(this,n,"m",s).call(this)},$=function(e,t){var n;e&&(null===(n=o(this,i,"f"))||void 0===n||n.updateData({title:e,description:t}))},f})),l=(e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n])),$=e=>{let t,n;return(...r)=>(t&&l(t,r)||(t=r,n=e(...r)),n)},f=e=>(t,...n)=>t.reduce(((t,r,o)=>{var d;return`${t}${r}${(null===(d=null==n?void 0:n[o])||void 0===d?void 0:d[e>1?1:0])||""}`}),""),h=(e,t=500)=>{let n;return function(...r){clearTimeout(n),n=setTimeout((()=>e.apply(this,r)),t)}},p="undefined"!=typeof localStorage,g=p&&localStorage.getItem("base.content.url")||"https://static.descope.com/pages",v=(e,t)=>!t&&`${e} cannot be empty`,y=i((t=>{var n,d;const i=e(u,a)(t);return d=class extends i{constructor(){super(...arguments),n.set(this,{})}init(){const e=Object.create(null,{init:{get:()=>super.init}});var t;return r(this,void 0,void 0,(function*(){var r,d;yield null===(t=e.init)||void 0===t?void 0:t.call(this),r=this,d=e=>{var t;null===(t=o(this,n,"f")[e])||void 0===t||t.forEach((t=>{t(e,this.getAttribute(e))}))},Array.from(r.attributes).forEach((e=>d(e.name))),new MutationObserver((e=>{e.forEach((e=>{"attributes"===e.type&&d(e.attributeName)}))})).observe(r,{attributes:!0})}))}observeAttribute(e,t){o(this,n,"f")[e]||(o(this,n,"f")[e]=[]);const r=o(this,n,"f")[e].push(t);return()=>o(this,n,"f")[e].splice(r,1)}observeAttributes(e,t){const n=e.reduce(((e,n)=>(e.push(this.observeAttribute(n,t)),e)),[]);return()=>n.forEach((e=>e()))}},n=new WeakMap,d})),m=t=>n=>{var d,i,s;const c=e(u,a,y)(n),l=Object.keys(t);return s=class extends c{constructor(...e){super(...e),d.add(this),this.observeAttributes(l,o(this,d,"m",i).bind(this))}init(){const e=Object.create(null,{init:{get:()=>super.init}});var t;return r(this,void 0,void 0,(function*(){yield null===(t=e.init)||void 0===t?void 0:t.call(this),l.forEach((e=>o(this,d,"m",i).call(this,e,this.getAttribute(e))))}))}},d=new WeakSet,i=function(e,n){const r=t[e],o="function"==typeof r?r(e,n):r;o&&this.logger.error(o)},s},b=i((t=>{const n=e(m({"project-id":v}))(t);return class extends n{get projectId(){return this.getAttribute("project-id")}}}));const w=i((t=>{const n=e(u,b)(t);return class extends n{fetchStaticResource(e,t){return r(this,void 0,void 0,(function*(){const n=function(e,t,n="v2-beta"){const r=new URL(g);return r.pathname=((...e)=>e.join("/").replace(/\/+/g,"/"))(r.pathname,e,n,t),r.toString()}(this.projectId,e),r=yield fetch(n,{cache:"default"});return r.ok||this.logger.error(`Error fetching URL ${n} [${r.status}]`),{body:yield r[t](),headers:Object.fromEntries(r.headers.entries())}}))}}})),O=i((t=>{var n,i,a;const s=e(w)(t);return a=class extends s{constructor(){super(...arguments),n.set(this,void 0),i.set(this,(()=>r(this,void 0,void 0,(function*(){try{const{body:e,headers:t}=yield this.fetchStaticResource("config.json","json");return{projectConfig:e,executionContext:{geo:t["x-geo"]}}}catch(e){this.logger.error("Cannot fetch config file","make sure that your projectId & flowId are correct")}}))))}get config(){return o(this,n,"f")||d(this,n,o(this,i,"f").call(this),"f"),o(this,n,"f")}},n=new WeakMap,i=new WeakMap,a})),C="load-descope-ui",I="base.ui.components.url",k=p&&localStorage.getItem(I)||"https://static.descope.com/npm/@descope/web-components-ui@<version>/dist/umd/index.js",S=p&&localStorage.getItem(I)||"https://cdn.jsdelivr.net/npm/@descope/web-components-ui@<version>/dist/umd/index.js",j=e=>{const t=document.createElement("script");return t.id=e,t},x=(e,t)=>e.replace("<version>",t),E=i((t=>{var n,i,a,s,c,l,$,f,h,p,g,v;const y=e(u,O)(t);return v=class extends y{constructor(){super(...arguments),n.add(this),i.set(this,Symbol("errorCbs")),a.set(this,Symbol("loadCbs")),h.set(this,void 0)}get descopeUi(){return o(this,h,"f")||d(this,h,o(this,n,"m",g).call(this),"f"),o(this,h,"f")}loadDescopeUiComponents(e){return r(this,void 0,void 0,(function*(){const t=Array.isArray(e)?e:(e=>[...Array.from(e.content.querySelectorAll("*")).reduce(((e,t)=>t.localName.startsWith("descope-")?e.add(t.localName):e),new Set)])(e);return Promise.all(t.map((e=>o(this,n,"m",p).call(this,e))))}))}},i=new WeakMap,a=new WeakMap,h=new WeakMap,n=new WeakSet,s=function(){var e;return r(this,void 0,void 0,(function*(){const t=yield this.config,n=null===(e=null==t?void 0:t.projectConfig)||void 0===e?void 0:e.componentsVersion;return n?this.logger.debug(`Got component version "${n}"`):this.logger.error("Could not get components version"),n}))},c=function(e){const t=o(this,i,"f"),n=o(this,a,"f");e[t]=[],e[n]=[],Object.defineProperty(e,"onerror",{set(n){e[t].push(n)}}),Object.defineProperty(e,"onload",{set(t){e[n].push(t)}})},l=function(e,t){return r(this,void 0,void 0,(function*(){this.logger.debug("Trying to load DescopeUI from a fallback URL");const r=j("load-descope-ui-fallback-script");document.body.append(r),r.addEventListener("error",(()=>{e.forEach((e=>e(`Cannot load DescopeUI from fallback URL, Make sure this URL is valid and return the correct script: "${r.src}"`)))})),r.addEventListener("load",(()=>{t.forEach((e=>e()))})),r.src=x(S,yield o(this,n,"m",s).call(this))}))},$=function(e){e.addEventListener("error",(()=>{e[o(this,i,"f")].forEach((t=>t(`Cannot load DescopeUI from main URL, Make sure this URL is valid and return the correct script: "${e.src}"`))),o(this,n,"m",l).call(this,e[o(this,i,"f")],e[o(this,a,"f")])})),e.addEventListener("load",(()=>{e[o(this,a,"f")].forEach((e=>e()))}))},f=function(){return r(this,void 0,void 0,(function*(){if(document.querySelector(`script#${C}`))this.logger.debug("DescopeUI loading script already exists",this);else{this.logger.debug("DescopeUI loading script does not exist, creating it",this);const e=j(C);document.body.append(e),o(this,n,"m",c).call(this,e),o(this,n,"m",$).call(this,e),e.src=x(k,yield o(this,n,"m",s).call(this))}return document.getElementById(C)}))},p=function(e){return r(this,void 0,void 0,(function*(){if(!!customElements.get(e))return void this.logger.debug(`Loading component "${e}" is skipped as it is already defined`);const t=yield this.descopeUi;if(t[e])try{return yield t[e]()}catch(t){if("NotSupportedError"!==t.name)throw t;console.debug(`Encountered an error while attempting to define the "${e}" component, it is likely that this component is already defined`)}else this.logger.error(`Cannot load UI component "${e}"`,`Descope UI does not have a component named "${e}", available components are: "${Object.keys(t).join(", ")}"`)}))},g=function(){return new Promise((e=>{globalThis.DescopeUI&&e(globalThis.DescopeUI),o(this,n,"m",f).call(this).then((t=>{t.onerror=this.logger.error,t.onload=()=>{this.logger.debug("DescopeUI was loaded"),e(globalThis.DescopeUI)},setTimeout((()=>{globalThis.DescopeUI&&e(globalThis.DescopeUI)}))}))}))},v})),P="content-root",_="root",R=i((e=>class extends e{constructor(...e){var t,n;super(...e),this.attachShadow({mode:"open"}).innerHTML=`\n\n <style>\n #${_}, #${P} {\n height: 100%;\n }\n </style>\n <div id="${_}">\n <div id="${P}"></div>\n </div>\n `,this.contentRootElement=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById(P),this.rootElement=null===(n=this.shadowRoot)||void 0===n?void 0:n.getElementById(_)}})),M=(e,t)=>!!t&&"light"!==t&&"dark"!==t&&'Supported theme values are "light", "dark", or leave empty for using the OS theme',A=i((t=>{var n,i,s,u,c,l,$,f,h;const p=e(m({theme:M}),w,a,E,O,R)(t);return h=class extends p{constructor(){super(...arguments),n.add(this),i.set(this,void 0)}get theme(){var e,t;const n=this.getAttribute("theme");if("os"===n){return window.matchMedia&&(null===(t=null===(e=window.matchMedia)||void 0===e?void 0:e.call(window,"(prefers-color-scheme: dark)"))||void 0===t?void 0:t.matches)?"dark":"light"}return n||"light"}init(){const e=Object.create(null,{init:{get:()=>super.init}});var t;return r(this,void 0,void 0,(function*(){yield null===(t=e.init)||void 0===t?void 0:t.call(this),o(this,n,"m",c).call(this),o(this,n,"m",l).call(this),o(this,n,"m",$).call(this),o(this,n,"m",f).call(this)}))}},i=new WeakMap,n=new WeakSet,s=function(){return r(this,void 0,void 0,(function*(){try{const{body:e}=yield this.fetchStaticResource("theme.json","json");return e}catch(e){this.logger.error("Cannot fetch theme file","make sure that your projectId & flowId are correct")}}))},u=function(){return o(this,i,"f")||(d(this,i,o(this,n,"m",s).call(this),"f"),o(this,i,"f").then((e=>this.logger.debug("Fetched theme",e)))),o(this,i,"f")},c=function(){var e,t;return r(this,void 0,void 0,(function*(){const r=yield o(this,n,"a",u);if(!r)return;const d=document.createElement("style");d.innerText=((null===(e=null==r?void 0:r.light)||void 0===e?void 0:e.globals)||"")+((null===(t=null==r?void 0:r.dark)||void 0===t?void 0:t.globals)||""),this.shadowRoot.appendChild(d)}))},l=function(){var e,t;return r(this,void 0,void 0,(function*(){const r=Object.assign({},yield o(this,n,"a",u));if(!r)return;const d=yield this.descopeUi;(null==d?void 0:d.componentsThemeManager)&&(d.componentsThemeManager.themes={light:null===(e=null==r?void 0:r.light)||void 0===e?void 0:e.components,dark:null===(t=null==r?void 0:r.dark)||void 0===t?void 0:t.components})}))},$=function(){var e,t;return r(this,void 0,void 0,(function*(){const{projectConfig:n}=yield this.config,r=null===(t=null===(e=null==n?void 0:n.cssTemplate)||void 0===e?void 0:e[this.theme])||void 0===t?void 0:t.fonts;r&&Object.values(r).forEach((e=>{e.url&&(this.logger.debug(`Loading font from URL "${e.url}"`),(e=>{const t=document.createElement("link");t.href=e,t.rel="stylesheet",document.head.appendChild(t)})(e.url))}))}))},f=function(){return r(this,void 0,void 0,(function*(){this.rootElement.setAttribute("data-theme",this.theme);const e=yield this.descopeUi;(null==e?void 0:e.componentsThemeManager)&&(e.componentsThemeManager.currentThemeName=this.theme)}))},h}));var N;class T{constructor(e,t){N.set(this,void 0),this.nodeName="",d(this,N,e,"f"),this.logger=t.logger}get asyncEle(){return e=o(this,N,"f"),t=1e3,r(void 0,void 0,void 0,(function*(){return new Promise((n=>{const r=setInterval((()=>{const t="function"==typeof e?e():e;t&&(clearInterval(r),n(t))}),100);setTimeout((()=>{clearInterval(r),n(null)}),t)}))}));var e,t}get ele(){var e,t;const n="function"==typeof o(this,N,"f")?o(this,N,"f").call(this):o(this,N,"f");return n?(null==n?void 0:n.localName)!==this.nodeName?(null===(t=this.logger)||void 0===t||t.debug(`node name do not match, expected "${this.nodeName}", received "${n.localName}" `,Error()),null):n:(null===(e=this.logger)||void 0===e||e.debug("no element for driver ",this.constructor.name,new Error),null)}}N=new WeakMap;class U extends T{constructor(){super(...arguments),this.nodeName="descope-button"}onClick(e){var t;return null===(t=this.ele)||void 0===t||t.addEventListener("click",e),()=>{var t;return null===(t=this.ele)||void 0===t?void 0:t.removeEventListener("click",e)}}disable(){var e;null===(e=this.ele)||void 0===e||e.setAttribute("disabled","true")}enable(){var e;null===(e=this.ele)||void 0===e||e.removeAttribute("disabled")}}const L=e=>{const t=document.createElement("template");return t.innerHTML=e,t},D=i((e=>class extends(u(e)){validateForm(e){return this.getFormInputs(e).every((e=>{var t,n;return null===(t=e.reportValidity)||void 0===t||t.call(e),null===(n=e.checkValidity)||void 0===n?void 0:n.call(e)}))}getFormInputs(e){return e?Array.from(e.querySelectorAll("[name]")):(this.logger.debug("cannot get form inputs, no root element was received"),[])}getFormData(e){return this.getFormInputs(e).reduce(((e,t)=>Object.assign(e,{[t.getAttribute("name")]:t.value})),{})}setFormData(e,t){this.getFormInputs(e).forEach((e=>{t.hasOwnProperty(e.getAttribute("name"))&&(e.value=t[e.getAttribute("name")])}))}resetFormData(e){this.getFormInputs(e).forEach((e=>{e.value=""}))}})),F="descope-modal";var W;class B extends T{constructor(){super(...arguments),W.set(this,void 0),this.nodeName="descope-modal"}close(){var e,t;null===(e=this.ele)||void 0===e||e.removeAttribute("opened"),null===(t=this.afterClose)||void 0===t||t.call(this)}open(){var e,t;return r(this,void 0,void 0,(function*(){yield null===(e=this.beforeOpen)||void 0===e?void 0:e.call(this),null===(t=this.ele)||void 0===t||t.setAttribute("opened","true")}))}reset(){var e;this.ele&&(this.ele.innerHTML=""),o(this,W,"f")&&(null===(e=this.ele)||void 0===e||e.append(o(this,W,"f").content.cloneNode(!0)))}setContent(e){d(this,W,e,"f"),this.reset()}remove(){var e;null===(e=this.ele)||void 0===e||e.remove()}}W=new WeakMap;const G=i((t=>{var n,d;const i=e(a,R,E)(t);return d=class extends i{constructor(){super(...arguments),n.set(this,(()=>{const e=this.loadDescopeUiComponents.bind(this);return class extends B{setContent(t){e(t),super.setContent(t)}}})())}createModal(e){const t=((e={})=>{const t=document.createElement(F);return Object.keys(e).forEach((n=>{t.setAttribute(n,e[n])})),t})(Object.assign(Object.assign({},{}),e));return this.rootElement.append(t),new(o(this,n,"f"))(t,{logger:this.logger})}init(){const e=Object.create(null,{init:{get:()=>super.init}});var t;return r(this,void 0,void 0,(function*(){this.loadDescopeUiComponents([F]),yield null===(t=e.init)||void 0===t?void 0:t.call(this)}))}},n=new WeakMap,d}));class q extends T{constructor(){super(...arguments),this.nodeName="descope-multi-select-combo-box"}setData(e){var t;return r(this,void 0,void 0,(function*(){null===(t=yield this.asyncEle)||void 0===t||t.setAttribute("data",JSON.stringify(e.sort()))}))}}var z=e=>{let t=!1;try{const n={};e(n)===n&&(t=!0)}catch{}if(t){let e;try{throw new Error}catch(t){({stack:e}=t)}console.warn("The result function returned its own inputs without modification. e.g\n`createSelector([state => state.todos], todos => todos)`\nThis could lead to inefficient memoization and unnecessary re-renders.\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.",{stack:e})}},H=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:d,inputSelectorResultsCopy:i}=e,a=r((()=>({})),...o);if(!(a.apply(null,d)===a.apply(null,i))){let e;try{throw new Error}catch(t){({stack:e}=t)}console.warn("An input selector returned a different result when passed same arguments.\nThis means your output selector will likely run more frequently than intended.\nAvoid returning a new reference inside your input selector, e.g.\n`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)`",{arguments:n,firstInputs:d,secondInputs:i,stack:e})}},K={inputStabilityCheck:"once",identityFunctionCheck:"once"};var V=e=>Array.isArray(e)?e:[e];function J(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every((e=>"function"==typeof e))){const n=e.map((e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e)).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Z(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var Y="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}},X=0,Q=1;function ee(){return{s:X,v:void 0,o:null,p:null}}function te(e,t={}){let n=ee();const{resultEqualityCheck:r}=t;let o,d=0;function i(){let t=n;const{length:i}=arguments;for(let e=0,n=i;e<n;e++){const n=arguments[e];if("function"==typeof n||"object"==typeof n&&null!==n){let e=t.o;null===e&&(t.o=e=new WeakMap);const r=e.get(n);void 0===r?(t=ee(),e.set(n,t)):t=r}else{let e=t.p;null===e&&(t.p=e=new Map);const r=e.get(n);void 0===r?(t=ee(),e.set(n,t)):t=r}}const a=t;let s;if(t.s===Q?s=t.v:(s=e.apply(null,arguments),d++),a.s=Q,r){const e=o?.deref()??o;null!=e&&r(e,s)&&(s=e,0!==d&&d--);o="object"==typeof s&&null!==s||"function"==typeof s?new Y(s):s}return a.v=s,s}return i.clearCache=()=>{n=ee(),i.resetResultsCount()},i.resultsCount=()=>d,i.resetResultsCount=()=>{d=0},i}function ne(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e;return(...e)=>{let t,r=0,o=0,d={},i=e.pop();"object"==typeof i&&(d=i,i=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(i,`createSelector expects an output function after the inputs, but received: [${typeof i}]`);const a={...n,...d},{memoize:s,memoizeOptions:u=[],argsMemoize:c=te,argsMemoizeOptions:l=[],devModeChecks:$={}}=a,f=V(u),h=V(l),p=J(e),g=s((function(){return r++,i.apply(null,arguments)}),...f);let v=!0;const y=c((function(){o++;const e=Z(p,arguments);{const{identityFunctionCheck:t,inputStabilityCheck:n}=((e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...K,...t};return{identityFunctionCheck:{shouldRun:"always"===n||"once"===n&&e,run:z},inputStabilityCheck:{shouldRun:"always"===r||"once"===r&&e,run:H}}})(v,$);if(t.shouldRun&&t.run(i),n.shouldRun){const t=Z(p,arguments);n.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:s,memoizeOptions:f},arguments)}v&&(v=!1)}return t=g.apply(null,e),t}),...h);return Object.assign(y,{resultFunc:i,memoizedResultFunc:g,dependencies:p,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:s,argsMemoize:c})}}var re=ne(te);const oe={enabled:"active"},de=e=>e.tenantRoles.data,ie=e=>e.selectedUsersLoginIds,ae=e=>e.notifications,se=re((e=>e.usersList.data),(e=>e.map((e=>Object.assign(Object.assign({},e),{status:oe[e.status]||e.status,roles:e.roleNames}))))),ue=re(se,ie,((e,t)=>e.filter((e=>t.includes(e.loginIds))).map((e=>e.userId)))),ce=re(ie,se,((e,t)=>t.filter((t=>e.includes(t.loginIds))))),le=re(ie,(e=>!!e.length)),$e=re(ie,(e=>1===e.length)),fe=re(ce,(e=>1===e.length?e[0].email:`${e.length} users`));var he=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),pe=()=>Math.random().toString(36).substring(7).split("").join("."),ge={INIT:`@@redux/INIT${pe()}`,REPLACE:`@@redux/REPLACE${pe()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${pe()}`};function ve(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function ye(e){if(void 0===e)return"undefined";if(null===e)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";const n=function(e){return"function"==typeof e.constructor?e.constructor.name:null}(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function me(e){let t=typeof e;return t=ye(e),t}function be(e,t,n){if("function"!=typeof e)throw new Error(`Expected the root reducer to be a function. Instead, received: '${me(e)}'`);if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(`Expected the enhancer to be a function. Instead, received: '${me(n)}'`);return n(be)(e,t)}let r=e,o=t,d=new Map,i=d,a=0,s=!1;function u(){i===d&&(i=new Map,d.forEach(((e,t)=>{i.set(t,e)})))}function c(){if(s)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function l(e){if("function"!=typeof e)throw new Error(`Expected the listener to be a function. Instead, received: '${me(e)}'`);if(s)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let t=!0;u();const n=a++;return i.set(n,e),function(){if(t){if(s)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");t=!1,u(),i.delete(n),d=null}}}function $(e){if(!ve(e))throw new Error(`Actions must be plain objects. Instead, the actual type was: '${me(e)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if("string"!=typeof e.type)throw new Error(`Action "type" property must be a string. Instead, the actual type was: '${me(e.type)}'. Value was: '${e.type}' (stringified)`);if(s)throw new Error("Reducers may not dispatch actions.");try{s=!0,o=r(o,e)}finally{s=!1}return(d=i).forEach((e=>{e()})),e}$({type:ge.INIT});return{dispatch:$,subscribe:l,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw new Error(`Expected the nextReducer to be a function. Instead, received: '${me(e)}`);r=e,$({type:ge.REPLACE})},[he]:function(){const e=l;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(`Expected the observer to be an object. Instead, received: '${me(t)}'`);function n(){const e=t;e.next&&e.next(c())}n();return{unsubscribe:e(n)}},[he](){return this}}}}}function we(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}function Oe(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];void 0===e[o]&&we(`No reducer provided for key "${o}"`),"function"==typeof e[o]&&(n[o]=e[o])}const r=Object.keys(n);let o,d;o={};try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:ge.INIT}))throw new Error(`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(void 0===n(void 0,{type:ge.PROBE_UNKNOWN_ACTION()}))throw new Error(`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${ge.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)}))}(n)}catch(e){d=e}return function(e={},t){if(d)throw d;{const r=function(e,t,n,r){const o=Object.keys(t),d=n&&n.type===ge.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(0===o.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!ve(e))return`The ${d} has unexpected type of "${me(e)}". Expected argument to be an object with the following keys: "${o.join('", "')}"`;const i=Object.keys(e).filter((e=>!t.hasOwnProperty(e)&&!r[e]));return i.forEach((e=>{r[e]=!0})),n&&n.type===ge.REPLACE?void 0:i.length>0?`Unexpected ${i.length>1?"keys":"key"} "${i.join('", "')}" found in ${d}. Expected to find one of the known reducer keys instead: "${o.join('", "')}". Unexpected keys will be ignored.`:void 0}(e,n,t,o);r&&we(r)}let i=!1;const a={};for(let o=0;o<r.length;o++){const d=r[o],s=n[d],u=e[d],c=s(u,t);if(void 0===c){const e=t&&t.type;throw new Error(`When called with an action of type ${e?`"${String(e)}"`:"(unknown type)"}, the slice reducer for key "${d}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}a[d]=c,i=i||c!==u}return i=i||r.length!==Object.keys(e).length,i?a:e}}function Ce(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}function Ie(e){return ve(e)&&"type"in e&&"string"==typeof e.type}var ke=Symbol.for("immer-nothing"),Se=Symbol.for("immer-draftable"),je=Symbol.for("immer-state"),xe=[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}];function Ee(e,...t){{const n=xe[e],r="function"==typeof n?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}}var Pe=Object.getPrototypeOf;function _e(e){return!!e&&!!e[je]}function Re(e){return!!e&&(Ae(e)||Array.isArray(e)||!!e[Se]||!!e.constructor?.[Se]||De(e)||Fe(e))}var Me=Object.prototype.constructor.toString();function Ae(e){if(!e||"object"!=typeof e)return!1;const t=Pe(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Me}function Ne(e,t){0===Te(e)?Object.entries(e).forEach((([n,r])=>{t(n,r,e)})):e.forEach(((n,r)=>t(r,n,e)))}function Te(e){const t=e[je];return t?t.type_:Array.isArray(e)?1:De(e)?2:Fe(e)?3:0}function Ue(e,t){return 2===Te(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Le(e,t,n){const r=Te(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function De(e){return e instanceof Map}function Fe(e){return e instanceof Set}function We(e){return e.copy_||e.base_}function Be(e,t){if(De(e))return new Map(e);if(Fe(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Ae(e)){if(!Pe(e)){const t=Object.create(null);return Object.assign(t,e)}return{...e}}const n=Object.getOwnPropertyDescriptors(e);delete n[je];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const o=r[t],d=n[o];!1===d.writable&&(d.writable=!0,d.configurable=!0),(d.get||d.set)&&(n[o]={configurable:!0,writable:!0,enumerable:d.enumerable,value:e[o]})}return Object.create(Pe(e),n)}function Ge(e,t=!1){return ze(e)||_e(e)||!Re(e)||(Te(e)>1&&(e.set=e.add=e.clear=e.delete=qe),Object.freeze(e),t&&Ne(e,((e,t)=>Ge(t,!0)))),e}function qe(){Ee(2)}function ze(e){return Object.isFrozen(e)}var He,Ke={};function Ve(e){const t=Ke[e];return t||Ee(0,e),t}function Je(){return He}function Ze(e,t){t&&(Ve("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ye(e){Xe(e),e.drafts_.forEach(et),e.drafts_=null}function Xe(e){e===He&&(He=e.parent_)}function Qe(e){return He={drafts_:[],parent_:He,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function et(e){const t=e[je];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function tt(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[je].modified_&&(Ye(t),Ee(4)),Re(e)&&(e=nt(t,e),t.parent_||ot(t,e)),t.patches_&&Ve("Patches").generateReplacementPatches_(n[je].base_,e,t.patches_,t.inversePatches_)):e=nt(t,n,[]),Ye(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ke?e:void 0}function nt(e,t,n){if(ze(t))return t;const r=t[je];if(!r)return Ne(t,((o,d)=>rt(e,r,t,o,d,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return ot(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,d=!1;3===r.type_&&(o=new Set(t),t.clear(),d=!0),Ne(o,((o,i)=>rt(e,r,t,o,i,n,d))),ot(e,t,!1),n&&e.patches_&&Ve("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function rt(e,t,n,r,o,d,i){if(o===n&&Ee(5),_e(o)){const i=nt(e,o,d&&t&&3!==t.type_&&!Ue(t.assigned_,r)?d.concat(r):void 0);if(Le(n,r,i),!_e(i))return;e.canAutoFreeze_=!1}else i&&n.add(o);if(Re(o)&&!ze(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;nt(e,o),t&&t.scope_.parent_||ot(e,o)}}function ot(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ge(t,n)}var dt={get(e,t){if(t===je)return e;const n=We(e);if(!Ue(n,t))return function(e,t,n){const r=st(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!Re(r)?r:r===at(e.base_,t)?(ct(e),e.copy_[t]=lt(r,e)):r},has:(e,t)=>t in We(e),ownKeys:e=>Reflect.ownKeys(We(e)),set(e,t,n){const r=st(We(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=at(We(e),t),o=r?.[je];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||Ue(e.base_,t)))return!0;ct(e),ut(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==at(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,ct(e),ut(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=We(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){Ee(11)},getPrototypeOf:e=>Pe(e.base_),setPrototypeOf(){Ee(12)}},it={};function at(e,t){const n=e[je];return(n?We(n):e)[t]}function st(e,t){if(!(t in e))return;let n=Pe(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Pe(n)}}function ut(e){e.modified_||(e.modified_=!0,e.parent_&&ut(e.parent_))}function ct(e){e.copy_||(e.copy_=Be(e.base_,e.scope_.immer_.useStrictShallowCopy_))}Ne(dt,((e,t)=>{it[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),it.deleteProperty=function(e,t){return isNaN(parseInt(t))&&Ee(13),it.set.call(this,e,t,void 0)},it.set=function(e,t,n){return"length"!==t&&isNaN(parseInt(t))&&Ee(14),dt.set.call(this,e[0],t,n,e[0])};function lt(e,t){const n=De(e)?Ve("MapSet").proxyMap_(e,t):Fe(e)?Ve("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Je(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,d=dt;n&&(o=[r],d=it);const{revoke:i,proxy:a}=Proxy.revocable(o,d);return r.draft_=a,r.revoke_=i,a}(e,t);return(t?t.scope_:Je()).drafts_.push(n),n}function $t(e){return _e(e)||Ee(10,e),ft(e)}function ft(e){if(!Re(e)||ze(e))return e;const t=e[je];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Be(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Be(e,!0);return Ne(n,((e,t)=>{Le(n,e,ft(t))})),t&&(t.finalized_=!1),n}var ht=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,(e=>t.call(this,e,...o)))}}let r;if("function"!=typeof t&&Ee(6),void 0!==n&&"function"!=typeof n&&Ee(7),Re(e)){const o=Qe(this),d=lt(e,void 0);let i=!0;try{r=t(d),i=!1}finally{i?Ye(o):Xe(o)}return Ze(o,n),tt(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===ke&&(r=void 0),this.autoFreeze_&&Ge(r,!0),n){const t=[],o=[];Ve("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}Ee(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;const o=this.produce(e,t,((e,t)=>{n=e,r=t}));return[o,n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Re(e)||Ee(8),_e(e)&&(e=$t(e));const t=Qe(this),n=lt(e,void 0);return n[je].isManual_=!0,Xe(t),n}finishDraft(e,t){const n=e&&e[je];n&&n.isManual_||Ee(9);const{scope_:r}=n;return Ze(r,t),tt(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=Ve("Patches").applyPatches_;return _e(e)?r(e,t):this.produce(e,(e=>r(e,t)))}},pt=ht.produce;function gt(e){return({dispatch:t,getState:n})=>r=>o=>"function"==typeof o?o(t,n,e):r(o)}ht.produceWithPatches.bind(ht),ht.setAutoFreeze.bind(ht),ht.setUseStrictShallowCopy.bind(ht),ht.applyPatches.bind(ht),ht.createDraft.bind(ht),ht.finishDraft.bind(ht);var vt=gt(),yt=gt;((...e)=>{const t=ne(...e)})(te);var mt="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Ce:Ce.apply(null,arguments)},bt=e=>e&&"function"==typeof e.match;function wt(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error("prepareAction did not return an object");return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>Ie(t)&&t.type===e,n}function Ot(e){return"function"==typeof e&&"type"in e&&bt(e)}function Ct(e,t){let n=0;return{measureTime(e){const t=Date.now();try{return e()}finally{const e=Date.now();n+=e-t}},warnIfExceeded(){n>e&&console.warn(`${t} took ${n}ms, which is more than the warning threshold of ${e}ms. \nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\nIt is disabled in production builds, so you don't need to worry about that.`)}}}var It=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function kt(e){return Re(e)?pt(e,(()=>{})):e}function St(e,t,n){if(e.has(t)){let r=e.get(t);return n.update&&(r=n.update(r,t,e),e.set(t,r)),r}if(!n.insert)throw new Error("No insert provided for key not already in map");const r=n.insert(t,e);return e.set(t,r),r}function jt(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function xt(e,t,n){const r=Et(e,t,n);return{detectMutations:()=>Pt(e,t,r,n)}}function Et(e,t=[],n,r="",o=new Set){const d={value:n};if(!e(n)&&!o.has(n)){o.add(n),d.children={};for(const o in n){const i=r?r+"."+o:o;t.length&&-1!==t.indexOf(i)||(d.children[o]=Et(e,t,n[o],i))}}return d}function Pt(e,t=[],n,r,o=!1,d=""){const i=n?n.value:void 0,a=i===r;if(o&&!a&&!Number.isNaN(r))return{wasMutated:!0,path:d};if(e(i)||e(r))return{wasMutated:!1};const s={};for(let e in n.children)s[e]=!0;for(let e in r)s[e]=!0;const u=t.length>0;for(let o in s){const i=d?d+"."+o:o;if(u){if(t.some((e=>e instanceof RegExp?e.test(i):i===e)))continue}const s=Pt(e,t,n.children[o],r[o],a,i);if(s.wasMutated)return s}return{wasMutated:!1}}function _t(e){const t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||ve(e)}function Rt(e,t="",n=_t,r,o=[],d){let i;if(!n(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e)return!1;if(d?.has(e))return!1;const a=null!=r?r(e):Object.entries(e),s=o.length>0;for(const[e,u]of a){const a=t?t+"."+e:e;if(s){if(o.some((e=>e instanceof RegExp?e.test(a):a===e)))continue}if(!n(u))return{keyPath:a,value:u};if("object"==typeof u&&(i=Rt(u,a,n,r,o,d),i))return i}return d&&Mt(e)&&d.add(e),!1}function Mt(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if("object"==typeof t&&null!==t&&!Mt(t))return!1;return!0}function At(e){return"boolean"==typeof e}var Nt=()=>function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:o=!0}=e??{};let d=new It;if(t&&(At(t)?d.push(vt):d.push(yt(t.extraArgument))),n){let e={};At(n)||(e=n),d.unshift(function(e={}){{let t=function(e,t,r,o){return JSON.stringify(e,n(t,o),r)},n=function(e,t){let n=[],r=[];return t||(t=function(e,t){return n[0]===t?"[Circular ~]":"[Circular ~."+r.slice(0,n.indexOf(t)).join(".")+"]"}),function(o,d){if(n.length>0){var i=n.indexOf(this);~i?n.splice(i+1):n.push(this),~i?r.splice(i,1/0,o):r.push(o),~n.indexOf(d)&&(d=t.call(this,o,d))}else n.push(d);return null==e?d:e.call(this,o,d)}},{isImmutable:r=jt,ignoredPaths:o,warnAfter:d=32}=e;const i=xt.bind(null,r,o);return({getState:e})=>{let n,r=e(),o=i(r);return a=>s=>{const u=Ct(d,"ImmutableStateInvariantMiddleware");u.measureTime((()=>{if(r=e(),n=o.detectMutations(),o=i(r),n.wasMutated)throw new Error(`A state mutation was detected between dispatches, in the path '${n.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}));const c=a(s);return u.measureTime((()=>{if(r=e(),n=o.detectMutations(),o=i(r),n.wasMutated)throw new Error(`A state mutation was detected inside a dispatch, in the path: ${n.path||""}. Take a look at the reducer(s) handling the action ${t(s)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)})),u.warnIfExceeded(),c}}}}(e))}if(r){let e={};At(r)||(e=r),d.push(function(e={}){{const{isSerializable:t=_t,getEntries:n,ignoredActions:r=[],ignoredActionPaths:o=["meta.arg","meta.baseQueryMeta"],ignoredPaths:d=[],warnAfter:i=32,ignoreState:a=!1,ignoreActions:s=!1,disableCache:u=!1}=e,c=!u&&WeakSet?new WeakSet:void 0;return e=>u=>l=>{if(!Ie(l))return u(l);const $=u(l),f=Ct(i,"SerializableStateInvariantMiddleware");return s||r.length&&-1!==r.indexOf(l.type)||f.measureTime((()=>{const e=Rt(l,"",t,n,o,c);if(e){const{keyPath:t,value:n}=e;console.error(`A non-serializable value was detected in an action, in the path: \`${t}\`. Value:`,n,"\nTake a look at the logic that dispatched this action: ",l,"\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)","\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)")}})),a||(f.measureTime((()=>{const r=Rt(e.getState(),"",t,n,d,c);if(r){const{keyPath:e,value:t}=r;console.error(`A non-serializable value was detected in the state, in the path: \`${e}\`. Value:`,t,`\nTake a look at the reducer(s) handling this action type: ${l.type}.\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}})),f.warnIfExceeded()),$}}}(e))}if(o){let e={};At(o)||(e=o),d.unshift(function(e={}){const{isActionCreator:t=Ot}=e;return()=>e=>n=>(t(n)&&console.warn(function(e){const t=e?`${e}`.split("/"):[],n=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched. \nMake sure you're calling the action creator before dispatching, i.e. \`dispatch(${n}())\` instead of \`dispatch(${n})\`. This is necessary even if the action has no payload.`}(n.type)),e(n))}(e))}return d},Tt=e=>t=>{setTimeout(t,e)},Ut="undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:Tt(10),Lt=e=>function(t){const{autoBatch:n=!0}=t??{};let r=new It(e);return n&&r.push(((e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,d=!1,i=!1;const a=new Set,s="tick"===e.type?queueMicrotask:"raf"===e.type?Ut:"callback"===e.type?e.queueNotification:Tt(e.timeout),u=()=>{i=!1,d&&(d=!1,a.forEach((e=>e())))};return Object.assign({},r,{subscribe(e){const t=r.subscribe((()=>o&&e()));return a.add(e),()=>{t(),a.delete(e)}},dispatch(e){try{return o=!e?.meta?.RTK_autoBatch,d=!o,d&&(i||(i=!0,s(u))),r.dispatch(e)}finally{o=!0}}})})("object"==typeof n?n:void 0)),r};function Dt(e){const t=Nt(),{reducer:n,middleware:r,devTools:o=!0,preloadedState:d,enhancers:i}=e||{};let a,s;if("function"==typeof n)a=n;else{if(!ve(n))throw new Error("`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");a=Oe(n)}if(r&&"function"!=typeof r)throw new Error("`middleware` field must be a callback");if("function"==typeof r){if(s=r(t),!Array.isArray(s))throw new Error("when using a middleware builder function, an array of middleware must be returned")}else s=t();if(s.some((e=>"function"!=typeof e)))throw new Error("each middleware provided to configureStore must be a function");let u=Ce;o&&(u=mt({trace:!0,..."object"==typeof o&&o}));const c=function(...e){return t=>(n,r)=>{const o=t(n,r);let d=()=>{throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const i={getState:o.getState,dispatch:(e,...t)=>d(e,...t)},a=e.map((e=>e(i)));return d=Ce(...a)(o.dispatch),{...o,dispatch:d}}}(...s),l=Lt(c);if(i&&"function"!=typeof i)throw new Error("`enhancers` field must be a callback");let $="function"==typeof i?i(l):l();if(!Array.isArray($))throw new Error("`enhancers` callback must return an array");if($.some((e=>"function"!=typeof e)))throw new Error("each enhancer provided to configureStore must be a function");s.length&&!$.includes(c)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");return be(a,d,u(...$))}function Ft(e){const t={},n=[];let r;const o={addCase(e,d){if(n.length>0)throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`");const i="string"==typeof e?e:e.type;if(!i)throw new Error("`builder.addCase` cannot be called with an empty action type");if(i in t)throw new Error(`\`builder.addCase\` cannot be called with two reducers for the same action type '${i}'`);return t[i]=d,o},addMatcher(e,t){if(r)throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:e,reducer:t}),o},addDefaultCase(e){if(r)throw new Error("`builder.addDefaultCase` can only be called once");return r=e,o}};return e(o),[t,n,r]}function Wt(...e){return t=>e.some((e=>((e,t)=>bt(e)?e.match(t):e(t))(e,t)))}var Bt=["name","message","stack","code"],Gt=class{constructor(e,t){this.payload=e,this.meta=t}_type},qt=class{constructor(e,t){this.payload=e,this.meta=t}_type},zt=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of Bt)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},Ht=(()=>{function e(e,t,n){const r=wt(e+"/fulfilled",((e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}}))),o=wt(e+"/pending",((e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}}))),d=wt(e+"/rejected",((e,t,r,o,d)=>({payload:o,error:(n&&n.serializeError||zt)(e||"Rejected"),meta:{...d||{},arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===e?.name,condition:"ConditionError"===e?.name}})));return Object.assign((function(e){return(i,a,s)=>{const u=n?.idGenerator?n.idGenerator(e):((e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t})(),c=new AbortController;let l;function $(e){l=e,c.abort()}const f=async function(){let f;try{let d=n?.condition?.(e,{getState:a,extra:s});if(null!==(h=d)&&"object"==typeof h&&"function"==typeof h.then&&(d=await d),!1===d||c.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const p=new Promise(((e,t)=>c.signal.addEventListener("abort",(()=>t({name:"AbortError",message:l||"Aborted"})))));i(o(u,e,n?.getPendingMeta?.({requestId:u,arg:e},{getState:a,extra:s}))),f=await Promise.race([p,Promise.resolve(t(e,{dispatch:i,getState:a,extra:s,requestId:u,signal:c.signal,abort:$,rejectWithValue:(e,t)=>new Gt(e,t),fulfillWithValue:(e,t)=>new qt(e,t)})).then((t=>{if(t instanceof Gt)throw t;return t instanceof qt?r(t.payload,u,e,t.meta):r(t,u,e)}))])}catch(t){f=t instanceof Gt?d(null,u,e,t.payload,t.meta):d(t,u,e)}var h;return n&&!n.dispatchConditionRejection&&d.match(f)&&f.meta.condition||i(f),f}();return Object.assign(f,{abort:$,requestId:u,arg:e,unwrap:()=>f.then(Kt)})}}),{pending:o,rejected:d,fulfilled:r,settled:Wt(d,r),typePrefix:e})}return e.withTypes=()=>e,e})();function Kt(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var Vt=Symbol.for("rtk-slice-createasyncthunk");function Jt(e,t){return`${e}/${t}`}function Zt(e,t,n,r){function o(o,...d){let i=n.call(e,o);if(void 0===i){if(!r)throw new Error("selectState returned undefined for an uninjected slice reducer");i=e.getInitialState()}return t(i,...d)}return o.unwrapped=t,o}var Yt=function({creators:e}={}){const t=e?.asyncThunk?.[Vt];return function(e){const{name:n,reducerPath:r=n}=e;if(!n)throw new Error("`name` is a required option for createSlice");"undefined"!=typeof process&&void 0===e.initialState&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const o=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},d=Object.keys(o),i={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},a={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error("`context.addCase` cannot be called with an empty action type");if(n in i.sliceCaseReducersByType)throw new Error("`context.addCase` cannot be called with two reducers for the same action type: "+n);return i.sliceCaseReducersByType[n]=t,a},addMatcher:(e,t)=>(i.sliceMatchers.push({matcher:e,reducer:t}),a),exposeAction:(e,t)=>(i.actionCreators[e]=t,a),exposeCaseReducer:(e,t)=>(i.sliceCaseReducersByName[e]=t,a)};function s(){if("object"==typeof e.extraReducers)throw new Error("The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[t={},n=[],r]="function"==typeof e.extraReducers?Ft(e.extraReducers):[e.extraReducers],o={...t,...i.sliceCaseReducersByType};return function(e,t){if("object"==typeof t)throw new Error("The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let n,[r,o,d]=Ft(t);if(function(e){return"function"==typeof e}(e))n=()=>kt(e());else{const t=kt(e);n=()=>t}function i(e=n(),t){let i=[r[t.type],...o.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===i.filter((e=>!!e)).length&&(i=[d]),i.reduce(((e,n)=>{if(n){if(_e(e)){const r=n(e,t);return void 0===r?e:r}if(Re(e))return pt(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw new Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e}),e)}return i.getInitialState=n,i}(e.initialState,(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of i.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)}))}d.forEach((r=>{const d=o[r],i={reducerName:r,type:Jt(n,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(d)?function({type:e,reducerName:t,createNotation:n},r,o){let d,i;if("reducer"in r){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error("Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");d=r.reducer,i=r.prepare}else d=r;o.addCase(e,d).exposeCaseReducer(t,d).exposeAction(t,i?wt(e,i):wt(e))}(i,d,a):function({type:e,reducerName:t},n,r,o){if(!o)throw new Error("Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:d,fulfilled:i,pending:a,rejected:s,settled:u,options:c}=n,l=o(e,d,c);r.exposeAction(t,l),i&&r.addCase(l.fulfilled,i);a&&r.addCase(l.pending,a);s&&r.addCase(l.rejected,s);u&&r.addMatcher(l.settled,u);r.exposeCaseReducer(t,{fulfilled:i||Xt,pending:a||Xt,rejected:s||Xt,settled:u||Xt})}(i,d,a,t)}));const u=e=>e,c=new WeakMap;let l;const $={name:n,reducerPath:r,reducer:(e,t)=>(l||(l=s()),l(e,t)),actions:i.actionCreators,caseReducers:i.sliceCaseReducersByName,getInitialState:()=>(l||(l=s()),l.getInitialState()),getSelectors(t=u){const n=St(c,this,{insert:()=>new WeakMap});return St(n,t,{insert:()=>{const n={};for(const[r,o]of Object.entries(e.selectors??{}))n[r]=Zt(this,o,t,this!==$);return n}})},selectSlice(e){let t=e[this.reducerPath];if(void 0===t){if(this===$)throw new Error("selectSlice returned undefined for an uninjected slice reducer");t=this.getInitialState()}return t},get selectors(){return this.getSelectors(this.selectSlice)},injectInto(e,{reducerPath:t,...n}={}){const r=t??this.reducerPath;return e.inject({reducerPath:r,reducer:this.reducer},n),{...this,reducerPath:r}}};return $}}();function Xt(){}var Qt="listenerMiddleware";wt(`${Qt}/add`),wt(`${Qt}/removeAll`),wt(`${Qt}/remove`);const en=t=>i((n=>{const o=Yt(t),d=Object.assign(Object.assign({},o.actions),t.asyncActions);return class extends(e(u)(n)){constructor(...e){super(...e);const t=Dt({reducer:o.reducer,middleware:e=>e({thunk:{extraArgument:this},serializableCheck:!1}),devTools:!1}),n=e=>(...n)=>r(this,void 0,void 0,(function*(){const r=yield t.dispatch(e(...n));try{Kt(r)}catch(e){this.logger.error(e.message,r.type,e.stack)}return r})),i=Object.keys(d).reduce(((e,t)=>(e[t]=n(d[t]),e)),{});this.actions=i,this.subscribe=(e,n=(e=>e))=>t.subscribe((()=>e(n(t.getState()))))}}})),tn=e=>(...t)=>n=>{n.addCase(e.pending,((e,n)=>{t.forEach((({onPending:t})=>{null==t||t(e,n)}))})),n.addCase(e.fulfilled,((e,n)=>{t.forEach((({onFulfilled:t})=>{null==t||t(e,n)}))})),n.addCase(e.rejected,((e,n)=>{t.forEach((({onRejected:t})=>{null==t||t(e,n)}))}))},nn=e=>({onFulfilled:t=>{e(t).loading=!1},onPending:t=>{e(t).loading=!0,e(t).error=null},onRejected:(t,n)=>{e(t).loading=!1,e(t).error=n.error}}),rn=({getErrorMsg:e,getSuccessMsg:t})=>({onFulfilled:(e,n)=>{t&&e.notifications.push({type:"success",msg:t(n)})},onRejected:(t,n)=>{e&&t.notifications.push({type:"error",msg:e(n)})}}),on=Ht("users/create",((e,{extra:{api:t}})=>t.user.create(e))),dn=tn(on)({onFulfilled:(e,t)=>{e.usersList.data.unshift(t.payload)}},nn((e=>e.createUser)),rn({getSuccessMsg:()=>"User created successfully",getErrorMsg:e=>{var t;return`\n <div>\n <div>Failed to create user</div>\n ${null===(t=e.error)||void 0===t?void 0:t.message}\n </div>`}})),an={action:on,reducer:dn},sn=Ht("users/delete",((e,{extra:{api:t}})=>t.user.deleteBatch(e))),un=tn(sn)({onFulfilled:(e,t)=>{e.usersList.data=e.usersList.data.filter((e=>!t.meta.arg.includes(e.userId))),e.selectedUsersLoginIds=[]}},nn((e=>e.deleteUser)),rn({getSuccessMsg:e=>f(e.meta.arg.length)`${["",e.meta.arg.length]} ${["U","u"]}ser${["","s"]} deleted successfully`,getErrorMsg:e=>f(e.meta.arg.length)`Failed to delete user${["","s"]}`})),cn={action:sn,reducer:un},ln=Ht("users/expirePassword",((e,{extra:{api:t}})=>t.user.expirePassword(e))),$n={action:ln,reducer:tn(ln)(nn((e=>e.expireUserPassword)))},fn=Ht("users/getCustomAttributes",((e,{extra:{api:t}})=>t.user.getCustomAttributes())),hn=tn(fn)({onFulfilled:(e,t)=>{e.customAttributes.data=t.payload}},nn((e=>e.customAttributes))),pn={action:fn,reducer:hn},gn=Ht("users/search",((e,{extra:{api:t},getState:n})=>{const r=n().searchParams;return t.user.search(Object.assign(Object.assign({},r),e))})),vn=tn(gn)({onPending:(e,t)=>{e.searchParams=Object.assign(Object.assign({},e.searchParams),t.meta.arg)},onFulfilled:(e,t)=>{e.usersList.data=t.payload}},nn((e=>e.usersList))),yn={action:gn,reducer:vn},mn=Ht("tenant/getTenantRoles",((e,{extra:{api:t}})=>t.tenant.getTenantRoles())),bn=tn(mn)({onFulfilled:(e,t)=>{e.tenantRoles.data=t.payload.roles}},nn((e=>e.tenantRoles))),wn={action:mn,reducer:bn},On=Ht("users/update",((e,{extra:{api:t}})=>t.user.update(e))),Cn={action:On,reducer:tn(On)({onFulfilled:(e,t)=>{const n=e.usersList.data.findIndex((e=>l(e.loginIds,t.payload.loginIds)));-1!==n&&(e.usersList.data[n]=t.payload)}},nn((e=>e.updateUser)),rn({getSuccessMsg:()=>"User updated successfully",getErrorMsg:e=>{var t;return`\n <div>\n <div>Failed to update user</div>\n ${null===(t=e.error)||void 0===t?void 0:t.message}\n </div>`}}))},In={usersList:{data:[],loading:!1,error:null},createUser:{loading:!1,error:null},updateUser:{loading:!1,error:null},deleteUser:{loading:!1,error:null},expireUserPassword:{loading:!1,error:null},customAttributes:{loading:!1,error:null,data:{}},tenantRoles:{loading:!1,error:null,data:[]},searchParams:{text:"",sort:[]},selectedUsersLoginIds:[],notifications:[]};function kn(e){this.message=e}kn.prototype=new Error,kn.prototype.name="InvalidCharacterError";var Sn="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new kn("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,o=0,d=0,i="";r=t.charAt(d++);~r&&(n=o%4?64*n+r:r,o++%4)?i+=String.fromCharCode(255&n>>(-2*o&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return i};function jn(e){this.message=e}function xn(e,t){if("string"!=typeof e)throw new jn("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(Sn(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return Sn(t)}}(e.split(".")[n]))}catch(e){throw new jn("Invalid token specified: "+e.message)}}jn.prototype=new Error,jn.prototype.name="InvalidTokenError";var En="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Pn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _n="__lodash_hash_undefined__",Rn=1/0,Mn="[object Function]",An="[object GeneratorFunction]",Nn="[object Symbol]",Tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Un=/^\w*$/,Ln=/^\./,Dn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fn=/\\(\\)?/g,Wn=/^\[object .+?Constructor\]$/,Bn="object"==typeof En&&En&&En.Object===Object&&En,Gn="object"==typeof self&&self&&self.Object===Object&&self,qn=Bn||Gn||Function("return this")();var zn,Hn=Array.prototype,Kn=Function.prototype,Vn=Object.prototype,Jn=qn["__core-js_shared__"],Zn=(zn=/[^.]+$/.exec(Jn&&Jn.keys&&Jn.keys.IE_PROTO||""))?"Symbol(src)_1."+zn:"",Yn=Kn.toString,Xn=Vn.hasOwnProperty,Qn=Vn.toString,er=RegExp("^"+Yn.call(Xn).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),tr=qn.Symbol,nr=Hn.splice,rr=hr(qn,"Map"),or=hr(Object,"create"),dr=tr?tr.prototype:void 0,ir=dr?dr.toString:void 0;function ar(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function sr(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ur(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function cr(e,t){for(var n,r,o=e.length;o--;)if((n=e[o][0])===(r=t)||n!=n&&r!=r)return o;return-1}function lr(e,t){var n;t=function(e,t){if(yr(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||br(e))return!0;return Un.test(e)||!Tn.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:yr(n=t)?n:pr(n);for(var r=0,o=t.length;null!=e&&r<o;)e=e[gr(t[r++])];return r&&r==o?e:void 0}function $r(e){if(!mr(e)||(t=e,Zn&&Zn in t))return!1;var t,n=function(e){var t=mr(e)?Qn.call(e):"";return t==Mn||t==An}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?er:Wn;return n.test(function(e){if(null!=e){try{return Yn.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function fr(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function hr(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return $r(n)?n:void 0}ar.prototype.clear=function(){this.__data__=or?or(null):{}},ar.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},ar.prototype.get=function(e){var t=this.__data__;if(or){var n=t[e];return n===_n?void 0:n}return Xn.call(t,e)?t[e]:void 0},ar.prototype.has=function(e){var t=this.__data__;return or?void 0!==t[e]:Xn.call(t,e)},ar.prototype.set=function(e,t){return this.__data__[e]=or&&void 0===t?_n:t,this},sr.prototype.clear=function(){this.__data__=[]},sr.prototype.delete=function(e){var t=this.__data__,n=cr(t,e);return!(n<0)&&(n==t.length-1?t.pop():nr.call(t,n,1),!0)},sr.prototype.get=function(e){var t=this.__data__,n=cr(t,e);return n<0?void 0:t[n][1]},sr.prototype.has=function(e){return cr(this.__data__,e)>-1},sr.prototype.set=function(e,t){var n=this.__data__,r=cr(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},ur.prototype.clear=function(){this.__data__={hash:new ar,map:new(rr||sr),string:new ar}},ur.prototype.delete=function(e){return fr(this,e).delete(e)},ur.prototype.get=function(e){return fr(this,e).get(e)},ur.prototype.has=function(e){return fr(this,e).has(e)},ur.prototype.set=function(e,t){return fr(this,e).set(e,t),this};var pr=vr((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(br(e))return ir?ir.call(e):"";var t=e+"";return"0"==t&&1/e==-Rn?"-0":t}(t);var n=[];return Ln.test(e)&&n.push(""),e.replace(Dn,(function(e,t,r,o){n.push(r?o.replace(Fn,"$1"):t||e)})),n}));function gr(e){if("string"==typeof e||br(e))return e;var t=e+"";return"0"==t&&1/e==-Rn?"-0":t}function vr(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],d=n.cache;if(d.has(o))return d.get(o);var i=e.apply(this,r);return n.cache=d.set(o,i),i};return n.cache=new(vr.Cache||ur),n}vr.Cache=ur;var yr=Array.isArray;function mr(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function br(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&Qn.call(e)==Nn}var wr=function(e,t,n){var r=null==e?void 0:lr(e,t);return void 0===r?n:r},Or=Pn(wr),Cr="/v1/auth/accesskey/exchange",Ir="/v1/auth/otp/verify",kr="/v1/auth/otp/signin",Sr="/v1/auth/otp/signup",jr={email:"/v1/auth/otp/update/email",phone:"/v1/auth/otp/update/phone"},xr="/v1/auth/otp/signup-in",Er="/v1/auth/magiclink/verify",Pr="/v1/auth/magiclink/signin",_r="/v1/auth/magiclink/signup",Rr={email:"/v1/auth/magiclink/update/email",phone:"/v1/auth/magiclink/update/phone"},Mr="/v1/auth/magiclink/signup-in",Ar="/v1/auth/enchantedlink/verify",Nr="/v1/auth/enchantedlink/signin",Tr="/v1/auth/enchantedlink/signup",Ur="/v1/auth/enchantedlink/pending-session",Lr={email:"/v1/auth/enchantedlink/update/email"},Dr="/v1/auth/enchantedlink/signup-in",Fr="/v1/auth/oauth/authorize",Wr="/v1/auth/oauth/exchange",Br="v1/auth/oauth/native/start",Gr="v1/auth/oauth/native/finish",qr="/v1/auth/saml/authorize",zr="/v1/auth/saml/exchange",Hr="/v1/auth/totp/verify",Kr="/v1/auth/totp/signup",Vr="/v1/auth/totp/update",Jr={start:"/v1/auth/webauthn/signup/start",finish:"/v1/auth/webauthn/signup/finish"},Zr={start:"/v1/auth/webauthn/signin/start",finish:"/v1/auth/webauthn/signin/finish"},Yr={start:"/v1/auth/webauthn/signup-in/start"},Xr={start:"v1/auth/webauthn/update/start",finish:"/v1/auth/webauthn/update/finish"},Qr="/v1/auth/password/signup",eo="/v1/auth/password/signin",to="/v1/auth/password/reset",no="/v1/auth/password/update",ro="/v1/auth/password/replace",oo="/v1/auth/password/policy",io="/v1/auth/refresh",ao="/v1/auth/tenant/select",so="/v1/auth/logout",uo="/v1/auth/logoutall",co="/v1/auth/me",lo="/v1/auth/me/history",$o="/v1/flow/start",fo="/v1/flow/next";const ho="<region>",po=`https://api.${ho}descope.com`,go=6e5,vo=()=>{const e={};return{headers(t){const n="function"==typeof t.entries?Object.fromEntries(t.entries()):t;return e.Headers=JSON.stringify(n),this},body(t){return e.Body=t,this},url(t){return e.Url=t.toString(),this},method(t){return e.Method=t,this},title(t){return e.Title=t,this},status(t){return e.Status=t,this},build:()=>Object.keys(e).flatMap((t=>e[t]?[`${"Title"!==t?`${t}: `:""}${e[t]}`]:[])).join("\n")}};var yo;!function(e){e.get="GET",e.delete="DELETE",e.post="POST",e.put="PUT"}(yo||(yo={}));const mo=(...e)=>new Headers(e.reduce(((e,t)=>{const n=(e=>Array.isArray(e)?e:e instanceof Headers?Array.from(e.entries()):e?Object.entries(e):[])(t);return n.reduce(((t,[n,r])=>(e[n]=r,e)),e),e}),{})),bo=e=>void 0===e?void 0:JSON.stringify(e),wo=(e,t="")=>{let n=e;return t&&(n=n+":"+t),{Authorization:`Bearer ${n}`}},Oo=({baseUrl:e,projectId:t,baseConfig:n,logger:r,hooks:o,cookiePolicy:d,fetch:i})=>{const a=((e,t)=>{const n=(e=>async(...t)=>{const n=await e(...t),r=await n.text();return n.text=()=>Promise.resolve(r),n.json=()=>Promise.resolve(JSON.parse(r)),n.clone=()=>n,n})(t||fetch);return n||null==e||e.warn("Fetch is not defined, you will not be able to send http requests, if you are running in a test, make sure fetch is defined globally"),e?async(...t)=>{if(!n)throw Error("Cannot send http request, fetch is not defined, if you are running in a test, make sure fetch is defined globally");e.log((e=>vo().title("Request").url(e[0]).method(e[1].method).headers(e[1].headers).body(e[1].body).build())(t));const r=await n(...t);return e[r.ok?"log":"error"](await(async e=>{const t=await e.text();return vo().title("Response").url(e.url.toString()).status(`${e.status} ${e.statusText}`).headers(e.headers).body(t).build()})(r)),r}:n})(r,i),s=async r=>{const i=(null==o?void 0:o.beforeRequest)?o.beforeRequest(r):r,{path:s,body:u,headers:c,queryParams:l,method:$,token:f}=i,h={headers:mo(wo(t,f),{"x-descope-sdk-name":"core-js","x-descope-sdk-version":"2.11.3"},(null==n?void 0:n.baseHeaders)||{},c),method:$,body:bo(u)};null!==d&&(h.credentials=d||"include");const p=await a((({path:e,baseUrl:t,queryParams:n,projectId:r})=>{const o=r.slice(1,-27);t=t.replace(ho,o?o+".":"");const d=new URL(e,t);return n&&(d.search=new URLSearchParams(n).toString()),d})({path:s,baseUrl:e,queryParams:l,projectId:t}),h);return(null==o?void 0:o.afterRequest)&&await o.afterRequest(r,null==p?void 0:p.clone()),p};return{get:(e,{headers:t,queryParams:n,token:r}={})=>s({path:e,headers:t,queryParams:n,body:void 0,method:yo.get,token:r}),post:(e,t,{headers:n,queryParams:r,token:o}={})=>s({path:e,headers:n,queryParams:r,body:t,method:yo.post,token:o}),put:(e,t,{headers:n,queryParams:r,token:o}={})=>s({path:e,headers:n,queryParams:r,body:t,method:yo.put,token:o}),delete:(e,{headers:t,queryParams:n,token:r}={})=>s({path:e,headers:t,queryParams:n,body:void 0,method:yo.delete,token:r}),hooks:o}};var Co=429;function Io(e,t,n){var r;let o=ko(e);t&&(o=null===(r=null==o?void 0:o.tenants)||void 0===r?void 0:r[t]);const d=null==o?void 0:o[n];return Array.isArray(d)?d:[]}function ko(e){if("string"!=typeof e||!e)throw new Error("Invalid token provided");return xn(e)}function So(e){const{exp:t}=ko(e);return(new Date).getTime()/1e3>t}function jo(e){let t=ko(e);const n=Object.keys(null==t?void 0:t.tenants);return Array.isArray(n)?n:[]}function xo(e,t){return Io(e,t,"permissions")}function Eo(e,t){return Io(e,t,"roles")}const Po=(...e)=>e.join("/").replace(/\/{2,}/g,"/");async function _o(e,t){var n;const r=await e,o={code:r.status,ok:r.ok,response:r},d=await r.clone().json();return r.ok?o.data=t?t(d):d:(o.error=d,r.status===Co&&Object.assign(o.error,{retryAfter:Number.parseInt(null===(n=r.headers)||void 0===n?void 0:n.get("retry-after"))||0})),o}const Ro=(e,t)=>(n=t)=>t=>!e(t)&&n.replace("{val}",t),Mo=(...e)=>({validate:t=>(e.forEach((e=>{const n=e(t);if(n)throw new Error(n)})),!0)}),Ao=e=>t=>e.test(t),No=Ao(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/),To=Ao(/^\+[1-9]{1}[0-9]{3,14}$/),Uo=Ro(No,'"{val}" is not a valid email'),Lo=Ro(To,'"{val}" is not a valid phone number'),Do=Ro((1,e=>e.length>=1),"Minimum length is 1");const Fo=Ro((e=>"string"==typeof e),"Input is not a string"),Wo=Ro((e=>void 0===e),"Input is defined"),Bo=(Go=[Fo(),Wo()],"Input is not a string or undefined",(e="Input is not a string or undefined")=>t=>{const n=Go.filter((e=>e(t)));return!(n.length<Go.length)&&(e?e.replace("{val}",t):n.join(" OR "))});var Go;const qo=(...e)=>t=>(...n)=>(e.forEach(((e,t)=>Mo(...e).validate(n[t]))),t(...n)),zo=e=>[Fo(`"${e}" must be a string`),Do(`"${e}" must not be empty`)],Ho=e=>[Fo(`"${e}" must be a string`),Uo()],Ko=e=>[Fo(`"${e}" must be a string`),Lo()],Vo=qo(zo("accessKey")),Jo=e=>({exchange:Vo(((t,n)=>_o(e.post(Cr,{loginOptions:n},{token:t}))))});var Zo,Yo;!function(e){e.sms="sms",e.whatsapp="whatsapp"}(Zo||(Zo={})),function(e){e.email="email"}(Yo||(Yo={}));const Xo=Object.assign(Object.assign({},Zo),Yo);var Qo;!function(e){e.waiting="waiting",e.running="running",e.completed="completed",e.failed="failed"}(Qo||(Qo={}));const ed=zo("loginId"),td=qo(zo("token")),nd=qo(ed),rd=qo(zo("pendingRef")),od=qo(ed,Ho("email")),dd=e=>({verify:td((t=>_o(e.post(Ar,{token:t})))),signIn:nd(((t,n,r,o)=>_o(e.post(Po(Nr,Xo.email),{loginId:t,URI:n,loginOptions:r},{token:o})))),signUpOrIn:nd(((t,n,r)=>_o(e.post(Po(Dr,Xo.email),{loginId:t,URI:n,loginOptions:r})))),signUp:nd(((t,n,r,o)=>_o(e.post(Po(Tr,Xo.email),{loginId:t,URI:n,user:r,loginOptions:o})))),waitForSession:rd(((t,n)=>new Promise((r=>{const{pollingIntervalMs:o,timeoutMs:d}=(({pollingIntervalMs:e=1e3,timeoutMs:t=6e5}={})=>({pollingIntervalMs:Math.max(e||1e3,1e3),timeoutMs:Math.min(t||go,go)}))(n);let i;const a=setInterval((async()=>{const n=await e.post(Ur,{pendingRef:t});n.ok&&(clearInterval(a),i&&clearTimeout(i),r(_o(Promise.resolve(n))))}),o);i=setTimeout((()=>{r({error:{errorDescription:`Session polling timeout exceeded: ${d}ms`,errorCode:"0"},ok:!1}),clearInterval(a)}),d)})))),update:{email:od(((t,n,r,o,d)=>_o(e.post(Lr.email,Object.assign({loginId:t,email:n,URI:r},d),{token:o}))))}}),id=qo(zo("flowId")),ad=qo(zo("executionId"),zo("stepId"),zo("interactionId")),sd=e=>({start:id(((t,n,r,o,d,i,a)=>_o(e.post($o,{flowId:t,options:n,conditionInteractionId:r,interactionId:o,version:d,componentsVersion:i,input:a})))),next:ad(((t,n,r,o,d,i)=>_o(e.post(fo,{executionId:t,stepId:n,interactionId:r,version:o,componentsVersion:d,input:i}))))}),ud=zo("loginId"),cd=qo(zo("token")),ld=qo(ud),$d=qo(ud,Ko("phone")),fd=qo(ud,Ho("email")),hd=e=>({verify:cd((t=>_o(e.post(Er,{token:t})))),signIn:Object.keys(Xo).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:ld(((t,r,o,d)=>_o(e.post(Po(Pr,n),{loginId:t,URI:r,loginOptions:o},{token:d}))))})),{}),signUp:Object.keys(Xo).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:ld(((t,r,o,d)=>_o(e.post(Po(_r,n),{loginId:t,URI:r,user:o,loginOptions:d}))))})),{}),signUpOrIn:Object.keys(Xo).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:ld(((t,r,o)=>_o(e.post(Po(Mr,n),{loginId:t,URI:r,loginOptions:o}))))})),{}),update:{email:fd(((t,n,r,o,d)=>_o(e.post(Rr.email,Object.assign({loginId:t,email:n,URI:r},d),{token:o})))),phone:Object.keys(Zo).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:$d(((t,r,o,d,i)=>_o(e.post(Po(Rr.phone,n),Object.assign({loginId:t,phone:r,URI:o},i),{token:d}))))})),{})}});var pd;!function(e){e.facebook="facebook",e.github="github",e.google="google",e.microsoft="microsoft",e.gitlab="gitlab",e.apple="apple",e.discord="discord",e.linkedin="linkedin",e.slack="slack"}(pd||(pd={}));const gd=qo(zo("code")),vd=e=>({start:Object.assign(((t,n,r,o)=>_o(e.post(Fr,r||{},{queryParams:Object.assign({provider:t},n&&{redirectURL:n}),token:o}))),Object.keys(pd).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:(t,r,o)=>_o(e.post(Fr,r||{},{queryParams:Object.assign({provider:n},t&&{redirectURL:t}),token:o}))})),{})),exchange:gd((t=>_o(e.post(Wr,{code:t})))),startNative:(t,n)=>_o(e.post(Br,{provider:t,loginOptions:n})),finishNative:(t,n,r,o,d)=>_o(e.post(Gr,{provider:t,stateId:n,user:r,code:o,idToken:d}))}),yd=zo("loginId"),md=qo(yd,zo("code")),bd=qo(yd),wd=qo(yd,Ko("phone")),Od=qo(yd,Ho("email")),Cd=e=>({verify:Object.keys(Xo).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:md(((t,r)=>_o(e.post(Po(Ir,n),{code:r,loginId:t}))))})),{}),signIn:Object.keys(Xo).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:bd(((t,r,o)=>_o(e.post(Po(kr,n),{loginId:t,loginOptions:r},{token:o}))))})),{}),signUp:Object.keys(Xo).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:bd(((t,r,o)=>_o(e.post(Po(Sr,n),{loginId:t,user:r,loginOptions:o}))))})),{}),signUpOrIn:Object.keys(Xo).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:bd(((t,r)=>_o(e.post(Po(xr,n),{loginId:t,loginOptions:r}))))})),{}),update:{email:Od(((t,n,r,o)=>_o(e.post(jr.email,Object.assign({loginId:t,email:n},o),{token:r})))),phone:Object.keys(Zo).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:wd(((t,r,o,d)=>_o(e.post(Po(jr.phone,n),Object.assign({loginId:t,phone:r},d),{token:o}))))})),{})}}),Id=qo(zo("tenant")),kd=qo(zo("code")),Sd=e=>({start:Id(((t,n,r,o)=>_o(e.post(qr,r||{},{queryParams:{tenant:t,redirectURL:n},token:o})))),exchange:kd((t=>_o(e.post(zr,{code:t}))))}),jd=zo("loginId"),xd=qo(jd,zo("code")),Ed=qo(jd),Pd=qo(jd),_d=e=>({signUp:Ed(((t,n)=>_o(e.post(Kr,{loginId:t,user:n})))),verify:xd(((t,n,r,o)=>_o(e.post(Hr,{loginId:t,code:n,loginOptions:r},{token:o})))),update:Pd(((t,n)=>_o(e.post(Vr,{loginId:t},{token:n}))))}),Rd=zo("loginId"),Md=zo("newPassword"),Ad=qo(Rd,zo("password")),Nd=qo(Rd),Td=qo(Rd,Md),Ud=qo(Rd,zo("oldPassword"),Md),Ld=e=>({signUp:Ad(((t,n,r)=>_o(e.post(Qr,{loginId:t,password:n,user:r})))),signIn:Ad(((t,n)=>_o(e.post(eo,{loginId:t,password:n})))),sendReset:Nd(((t,n,r)=>_o(e.post(to,{loginId:t,redirectUrl:n,templateOptions:r})))),update:Td(((t,n,r)=>_o(e.post(no,{loginId:t,newPassword:n},{token:r})))),replace:Ud(((t,n,r)=>_o(e.post(ro,{loginId:t,oldPassword:n,newPassword:r})))),policy:()=>_o(e.get(oo))}),Dd=[Fo('"loginId" must be a string')],Fd=zo("loginId"),Wd=zo("origin"),Bd=qo(Fd,Wd,zo("name")),Gd=qo(Fd,Wd),qd=qo(Dd,Wd),zd=qo(Fd,Wd,zo("token")),Hd=qo(zo("transactionId"),zo("response")),Kd=e=>({signUp:{start:Bd(((t,n,r)=>_o(e.post(Jr.start,{user:{loginId:t,name:r},origin:n})))),finish:Hd(((t,n)=>_o(e.post(Jr.finish,{transactionId:t,response:n}))))},signIn:{start:qd(((t,n,r,o)=>_o(e.post(Zr.start,{loginId:t,origin:n,loginOptions:r},{token:o})))),finish:Hd(((t,n)=>_o(e.post(Zr.finish,{transactionId:t,response:n}))))},signUpOrIn:{start:Gd(((t,n)=>_o(e.post(Yr.start,{loginId:t,origin:n}))))},update:{start:zd(((t,n,r)=>_o(e.post(Xr.start,{loginId:t,origin:n},{token:r})))),finish:Hd(((t,n)=>_o(e.post(Xr.finish,{transactionId:t,response:n}))))}}),Vd=qo(zo("token")),Jd=qo([Bo('"token" must be string or undefined')]);var Zd,Yd=qo([("projectId",Zd=zo("projectId"),Ro(((e,t)=>n=>Mo(...t).validate(Or(n,e)))("projectId",Zd))())])((e=>(({projectId:e,logger:t,baseUrl:n,hooks:r,cookiePolicy:o,baseHeaders:d={},fetch:i})=>{return a=Oo({baseUrl:n||po,projectId:e,logger:t,hooks:r,cookiePolicy:o,baseConfig:{baseHeaders:d},fetch:i}),{accessKey:Jo(a),otp:Cd(a),magicLink:hd(a),enchantedLink:dd(a),oauth:vd(a),saml:Sd(a),totp:_d(a),webauthn:Kd(a),password:Ld(a),flow:sd(a),refresh:Jd((e=>_o(a.post(io,{},{token:e})))),selectTenant:qo([Fo("tenantId")],[Bo('"token" must be string or undefined')])(((e,t)=>_o(a.post(ao,{tenant:e},{token:t})))),logout:Jd((e=>_o(a.post(so,{},{token:e})))),logoutAll:Jd((e=>_o(a.post(uo,{},{token:e})))),me:Jd((e=>_o(a.get(co,{token:e})))),history:Jd((e=>_o(a.get(lo,{token:e})))),isJwtExpired:Vd(So),getTenants:Vd(jo),getJwtPermissions:Vd(xo),getJwtRoles:Vd(Eo),httpClient:a};var a})(Object.assign(Object.assign({},e),{hooks:{beforeRequest:t=>{var n;const r=[].concat((null===(n=e.hooks)||void 0===n?void 0:n.beforeRequest)||[]);return null==r?void 0:r.reduce(((e,t)=>t(e)),t)},afterRequest:async(t,n)=>{var r;const o=[].concat((null===(r=e.hooks)||void 0===r?void 0:r.afterRequest)||[]);(await Promise.allSettled(null==o?void 0:o.map((e=>e(t,null==n?void 0:n.clone()))))).forEach((t=>{var n;return"rejected"===t.status&&(null===(n=e.logger)||void 0===n?void 0:n.error(t.reason))}))}}}))));const Xd=(e,t,n)=>(t.forEach((t=>{const r=t.split(".");let o=r.shift(),d=e;for(;r.length>0;){if(d=d[o],!o||!d)throw Error(`Invalid path "${t}", "${o}" is missing or has no value`);o=r.shift()}if("function"!=typeof d[o])throw Error(`"${t}" is not a function`);const i=d[o];d[o]=n(i)})),e);var Qd=Object.assign(Yd,{DeliveryMethods:Xo});var ei={default:"endpoint"},ti="Blocked by CSP",ni="9319";function ri(e,t){var n=[];return function(e,t){var n,r,o=(r=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,d=t.length;o<d;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],e,!0),{current:function(){return r[0]},postpone:function(){var e=r.shift();void 0!==e&&r.push(e)},exclude:function(){r.shift()}}),d=(100,3e3,n=0,function(){return Math.random()*Math.min(3e3,100*Math.pow(2,n++))}),i=o.current();if(void 0===i)return Promise.reject(new TypeError("The list of script URL patterns is empty"));var a=function(e,n){return t(e).catch((function(e){if(n+1>=5)throw e;!function(e){if(!(e instanceof Error))return!1;var t=e.message;return t===ti||t===ni}(e)?o.postpone():o.exclude();var t,r=o.current();if(void 0===r)throw e;return(t=d(),new Promise((function(e){return setTimeout(e,t)}))).then((function(){return a(r,n+1)}))}))};return a(i,0)}(e,(function(e){var r=new Date,o=function(t){return n.push({url:e,startedAt:r,finishedAt:new Date,error:t})},d=t(e);return d.then((function(){return o()}),o),d})).then((function(e){return[e,{attempts:n}]}))}var oi="https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js",di=oi,ii="Failed to load the JS script of the agent";function ai(e){var r;e.scriptUrlPattern;var o=e.token,d=e.apiKey,i=void 0===d?o:d,a=n(e,["scriptUrlPattern","token","apiKey"]),s=null!==(r=function(e,t){return function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(e,t)?e[t]:void 0}(e,"scriptUrlPattern"))&&void 0!==r?r:oi;return Promise.resolve().then((function(){if(!i||"string"!=typeof i)throw new Error("API key required");var e=function(e,t){return(Array.isArray(e)?e:[e]).map((function(e){return function(e,t){var n=encodeURIComponent;return e.replace(/<[^<>]+>/g,(function(e){return"<version>"===e?"3":"<apiKey>"===e?n(t):"<loaderVersion>"===e?n("3.8.5"):e}))}(String(e),t)}))}(s,i);return ri(e,si).catch(ci)})).then((function(e){var n=e[0],r=e[1];return n.load(t(t({},a),{ldi:r}))}))}function si(e){return function(e,t,n,r){var o,d=document,i="securitypolicyviolation",a=function(t){var n=new URL(e,location.href),r=t.blockedURI;r!==n.href&&r!==n.protocol.slice(0,-1)&&r!==n.origin||(o=t,s())};d.addEventListener(i,a);var s=function(){return d.removeEventListener(i,a)};return Promise.resolve().then(t).then((function(e){return s(),e}),(function(e){return new Promise((function(e){return setTimeout(e)})).then((function(){if(s(),o)return function(){throw new Error(ti)}();throw e}))}))}(e,(function(){return function(e){return new Promise((function(t,n){var r=document.createElement("script"),o=function(){var e;return null===(e=r.parentNode)||void 0===e?void 0:e.removeChild(r)},d=document.head||document.getElementsByTagName("head")[0];r.onload=function(){o(),t()},r.onerror=function(){o(),n(new Error(ii))},r.async=!0,r.src=e,d.appendChild(r)}))}(e)})).then(ui)}function ui(){var e=window,t="__fpjs_p_l_b",n=e[t];if(function(e,t){var n,r=null===(n=Object.getOwnPropertyDescriptor)||void 0===n?void 0:n.call(Object,e,t);(null==r?void 0:r.configurable)?delete e[t]:r&&!r.writable||(e[t]=void 0)}(e,t),"function"!=typeof(null==n?void 0:n.load))throw new Error(ni);return n}function ci(e){throw e instanceof Error&&e.message===ni?new Error(ii):e}
3
- /*! js-cookie v3.0.5 | MIT */function li(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var $i=function e(t,n){function r(e,r,o){if("undefined"!=typeof document){"number"==typeof(o=li({},n,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var d="";for(var i in o)o[i]&&(d+="; "+i,!0!==o[i]&&(d+="="+o[i].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+d}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},o=0;o<n.length;o++){var d=n[o].split("="),i=d.slice(1).join("=");try{var a=decodeURIComponent(d[0]);if(r[a]=t.read(i,a),e===a)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",li({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,li({},this.attributes,t))},withConverter:function(t){return e(li({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});const fi=(e,t)=>{var n;return["beforeRequest","afterRequest"].reduce(((n,r)=>{var o;return n[r]=[].concat((null===(o=e.hooks)||void 0===o?void 0:o[r])||[]).concat((null==t?void 0:t[r])||[]),n}),null!==(n=e.hooks)&&void 0!==n?n:e.hooks={}),e},hi=async e=>{if(!(null==e?void 0:e.ok))return{};const t=await(null==e?void 0:e.clone().json());return(null==t?void 0:t.authInfo)||t||{}},pi=async e=>{const t=await hi(e);return(null==t?void 0:t.user)||((null==t?void 0:t.hasOwnProperty("userId"))?t:void 0)},gi="undefined"!=typeof localStorage,vi=(e,t)=>gi&&(null===localStorage||void 0===localStorage?void 0:localStorage.setItem(e,t)),yi=e=>gi&&(null===localStorage||void 0===localStorage?void 0:localStorage.getItem(e)),mi=e=>gi&&(null===localStorage||void 0===localStorage?void 0:localStorage.removeItem(e)),bi=(...e)=>{console.debug(...e)},wi="undefined"!=typeof window,Oi=Math.pow(2,31)-1,Ci=wi&&(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("fingerprint.endpoint.url"))||"https://api.descope.com",Ii=(e=!1)=>{const t=localStorage.getItem("fp");if(!t)return null;const n=JSON.parse(t);return(new Date).getTime()>n.expiry&&!e?null:n.value},ki=async(e,t=Ci)=>{try{if(Ii())return;const n=(Date.now().toString(36)+Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).substring(0,27),r=new URL(t);r.pathname="/fXj8gt3x8VulJBna/x96Emn69oZwcd7I6";const o=new URL(t);o.pathname="/fXj8gt3x8VulJBna/w78aRZnnDZ3Aqw0I";const d=o.toString()+"?apiKey=<apiKey>&version=<version>&loaderVersion=<loaderVersion>",i=ai({apiKey:e,endpoint:[r.toString(),ei],scriptUrlPattern:[d,di]}),a=await i,{requestId:s}=await a.get({linkedId:n}),u=((e,t)=>({vsid:e,vrid:t}))(n,s);(e=>{const t={value:e,expiry:(new Date).getTime()+864e5};localStorage.setItem("fp",JSON.stringify(t))})(u)}catch(e){console.warn("Could not load fingerprint",e)}},Si=e=>{const t=Ii(!0);return t&&e.body&&(e.body.fpData=t),e},ji="dls_last_user_login_id",xi="dls_last_user_display_name",Ei=()=>yi(ji),Pi=()=>yi(xi),_i=e=>async(...t)=>{var n;t[1]=t[1]||{};const[,r={}]=t,o=Ei(),d=Pi();return o&&(null!==(n=r.lastAuth)&&void 0!==n||(r.lastAuth={}),r.lastAuth.loginId=o,r.lastAuth.name=d),await e(...t)},Ri=e=>async(...t)=>{const n=await e(...t);return mi(ji),mi(xi),n};function Mi(){const e=[];return{pub:t=>{e.forEach((e=>e(t)))},sub:t=>{const n=e.push(t)-1;return()=>e.splice(n,1)}}}const Ai="DS",Ni="DSR";function Ti(e=""){return yi(`${e}${Ni}`)||""}function Ui(e=""){mi(`${e}${Ni}`),mi(`${e}${Ai}`),$i.remove(Ai)}async function Li(e){const t=function(e){var t;const n=JSON.parse(e);return n.publicKey.challenge=qi(n.publicKey.challenge),n.publicKey.user.id=qi(n.publicKey.user.id),null===(t=n.publicKey.excludeCredentials)||void 0===t||t.forEach((e=>{e.id=qi(e.id)})),n}(e);return n=await navigator.credentials.create(t),JSON.stringify({id:n.id,rawId:zi(n.rawId),type:n.type,response:{attestationObject:zi(n.response.attestationObject),clientDataJSON:zi(n.response.clientDataJSON)}});var n}async function Di(e){const t=Bi(e);return Gi(await navigator.credentials.get(t))}async function Fi(e,t){const n=Bi(e);return n.signal=t.signal,n.mediation="conditional",Gi(await navigator.credentials.get(n))}async function Wi(e=!1){if(!wi)return Promise.resolve(!1);const t=!!(window.PublicKeyCredential&&navigator.credentials&&navigator.credentials.create&&navigator.credentials.get);return t&&e&&PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable?PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable():t}function Bi(e){var t;const n=JSON.parse(e);return n.publicKey.challenge=qi(n.publicKey.challenge),null===(t=n.publicKey.allowCredentials)||void 0===t||t.forEach((e=>{e.id=qi(e.id)})),n}function Gi(e){return JSON.stringify({id:e.id,rawId:zi(e.rawId),type:e.type,response:{authenticatorData:zi(e.response.authenticatorData),clientDataJSON:zi(e.response.clientDataJSON),signature:zi(e.response.signature),userHandle:e.response.userHandle?zi(e.response.userHandle):void 0}})}function qi(e){const t=e.replace(/_/g,"/").replace(/-/g,"+");return Uint8Array.from(atob(t),(e=>e.charCodeAt(0))).buffer}function zi(e){return btoa(String.fromCharCode.apply(null,new Uint8Array(e))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}var Hi,Ki=(Hi=e=>({async signUp(t,n){const r=await e.webauthn.signUp.start(t,window.location.origin,n);if(!r.ok)return r;const o=await Li(r.data.options);return await e.webauthn.signUp.finish(r.data.transactionId,o)},async signIn(t){const n=await e.webauthn.signIn.start(t,window.location.origin);if(!n.ok)return n;const r=await Di(n.data.options);return await e.webauthn.signIn.finish(n.data.transactionId,r)},async signUpOrIn(t){var n;const r=await e.webauthn.signUpOrIn.start(t,window.location.origin);if(!r.ok)return r;if(null===(n=r.data)||void 0===n?void 0:n.create){const t=await Li(r.data.options);return await e.webauthn.signUp.finish(r.data.transactionId,t)}{const t=await Di(r.data.options);return await e.webauthn.signIn.finish(r.data.transactionId,t)}},async update(t,n){const r=await e.webauthn.update.start(t,window.location.origin,n);if(!r.ok)return r;const o=await Li(r.data.options);return await e.webauthn.update.finish(r.data.transactionId,o)},helpers:{create:Li,get:Di,isSupported:Wi,conditional:Fi}}),(...e)=>{const t=Hi(...e);return Object.assign(t.signUp,e[0].webauthn.signUp),Object.assign(t.signIn,e[0].webauthn.signIn),Object.assign(t.signUpOrIn,e[0].webauthn.signUpOrIn),Object.assign(t.update,e[0].webauthn.update),t});const Vi=e=>({async oneTap(t,n,r,o){const d=null!=t?t:"google",i=await e.oauth.startNative(d,r);if(!i.ok)return i;const{clientId:a,stateId:s,nonce:u}=i.data,c=await async function(){return new Promise(((e,t)=>{if(window.google)return void e(window.google.accounts.id);let n=document.getElementById("google-gsi-client-script");n||(n=document.createElement("script"),document.head.appendChild(n),n.async=!0,n.defer=!0,n.id="google-gsi-client-script",n.src="https://accounts.google.com/gsi/client"),n.onload=function(){window.google?e(window.google.accounts.id):t("Failed to load Google GSI client script - not loaded properly")},n.onerror=function(){t("Failed to load Google GSI client script - failed to load")}}))}();return new Promise((t=>{var r,i;c.initialize(Object.assign(Object.assign({},n),{itp_support:null===(r=null==n?void 0:n.itp_support)||void 0===r||r,use_fedcm_for_prompt:null===(i=null==n?void 0:n.use_fedcm_for_prompt)||void 0===i||i,client_id:a,callback:n=>{t(e.oauth.finishNative(d,s,"","",n.credential))},nonce:u})),c.prompt((e=>{(null==e?void 0:e.isSkippedMoment())&&(null==o||o())}))}))}});var Ji=e=>Object.assign(Object.assign({},e.flow),{start:async(...t)=>{const n=await Wi(),r=Object.assign(Object.assign({location:window.location.href},t[1]),{deviceInfo:{webAuthnSupport:n},startOptionsVersion:1});return t[1]=r,e.flow.start(...t)}});const Zi=function(...e){return t=>e.reduce(((e,t)=>t(e)),t)}((e=>t=>{var{fpKey:r,fpLoad:o}=t,d=n(t,["fpKey","fpLoad"]);return wi?(r&&o&&ki(r).catch((()=>null)),e(fi(d,{beforeRequest:Si}))):(console.warn("Fingerprint is a client side only capability and will not work when running in the server"),e(d))}),(e=>t=>{var{autoRefresh:r}=t,o=n(t,["autoRefresh"]);if(!r)return e(o);const{clearAllTimers:d,setTimer:i}=(()=>{const e=[];return{clearAllTimers:()=>{for(;e.length;)clearTimeout(e.pop())},setTimer:(t,n)=>{e.push(setTimeout(t,n))}}})();let a,s;document.addEventListener("visibilitychange",(()=>{"visible"===document.visibilityState&&new Date>a&&(bi("Expiration time passed, refreshing session"),u.refresh(s))}));const u=e(fi(o,{afterRequest:async(e,t)=>{const{refreshJwt:n,sessionJwt:r}=await hi(t);if(401===(null==t?void 0:t.status))bi("Received 401, canceling all timers"),d();else if(r){a=(e=>{const t=e.split(".");try{if(3===t.length){const e=JSON.parse(window.atob(t[1]));if(e.exp)return new Date(1e3*e.exp)}}catch(e){}return null})(r),s=n;let e=((o=a)?o.getTime()-(new Date).getTime():0)-2e4;e>Oi&&(bi(`Timeout is too large (${e}ms), setting it to ${Oi}ms`),e=Oi),d();const t=new Date(Date.now()+e).toLocaleTimeString("en-US",{hour12:!1});bi(`Setting refresh timer for ${t}. (${e}ms)`),i((()=>{bi("Refreshing session due to timer"),u.refresh(n)}),e)}var o}}));return Xd(u,["logout","logoutAll"],(e=>async(...t)=>{const n=await e(...t);return bi("Clearing all timers"),d(),n}))}),(e=>t=>e(Object.assign(Object.assign({},t),{baseHeaders:Object.assign({"x-descope-sdk-name":"web-js","x-descope-sdk-version":"1.10.5"},t.baseHeaders)}))),(e=>t=>{const n=Mi(),r=Mi(),o=e(fi(t,{afterRequest:async(e,t)=>{if(401===(null==t?void 0:t.status))n.pub(null),r.pub(null);else{const e=await pi(t);e&&r.pub(e);const{sessionJwt:o}=await hi(t);o&&n.pub(o)}}})),d=Xd(o,["logout","logoutAll"],(e=>async(...t)=>{const o=await e(...t);return n.pub(null),r.pub(null),o}));return Object.assign(d,{onSessionTokenChange:n.sub,onUserChange:r.sub})}),(e=>t=>{const n=e(fi(t,{afterRequest:async(e,t)=>{var n;const r=await pi(t),o=null===(n=null==r?void 0:r.loginIds)||void 0===n?void 0:n[0],d=null==r?void 0:r.name;o&&((e=>{vi(ji,e)})(o),(e=>{vi(xi,e)})(d))}}));let r=Xd(n,["flow.start"],_i);return r=Xd(r,["logout","logoutAll"],Ri),Object.assign(r,{getLastUserLoginId:Ei,getLastUserDisplayName:Pi})}),(e=>t=>{var{persistTokens:r,sessionTokenViaCookie:o,storagePrefix:d}=t,i=n(t,["persistTokens","sessionTokenViaCookie","storagePrefix"]);if(!r||!wi)return r&&console.warn("Storing auth tokens in local storage and cookies are a client side only capabilities and will not be done when running in the server"),e(i);const a=e(fi(i,{beforeRequest:(s=d,e=>Object.assign(e,{token:e.token||Ti(s)})),afterRequest:async(e,t)=>{401===(null==t?void 0:t.status)?Ui(d):((e={},t,r)=>{var{refreshJwt:o,sessionJwt:d}=e,i=n(e,["refreshJwt","sessionJwt"]);void 0===t&&(t=!1),void 0===r&&(r=""),o&&vi(`${r}${Ni}`,o),d&&(t?function(e,t,{cookiePath:n,cookieDomain:r,cookieExpiration:o}){if(t){const d=new Date(1e3*o),i=function(e){const t=window.location.hostname.split("."),n=e.split(".");return t.slice(-n.length).join(".")===e}(r);$i.set(e,t,{path:n,domain:i?r:void 0,expires:d,sameSite:"Strict",secure:!0})}}(Ai,d,i):vi(`${r}${Ai}`,d))})(await hi(t),o,d)}}));var s;const u=Xd(a,["logout","logoutAll"],(e=>t=>async(...n)=>{const r=await t(...n);return Ui(e),r})(d));return Object.assign(u,{getRefreshToken:()=>Ti(d),getSessionToken:()=>function(e=""){return $i.get(Ai)||yi(`${e}${Ai}`)||""}(d)})}))(((...e)=>{const t=Qd(...e);return Object.assign(Object.assign({},t),{flow:Ji(t),webauthn:Ki(t),fedcm:Vi(t)})})),Yi={search:"/v1/mgmt/user/search",deleteBatch:"/v1/mgmt/user/delete/batch",create:"/v1/mgmt/user/create",update:"/v1/mgmt/user/update",expirePassword:"/v1/mgmt/user/password/expire",customAttributes:"/v1/mgmt/user/customattributes"},Xi={roles:"/v1/mgmt/role/all"},Qi=e=>r(void 0,void 0,void 0,(function*(){const t=yield e.text(),n=JSON.parse(t);if(!e.ok){const t=`${n.errorDescription}${n.errorMessage?`: ${n.errorMessage}`:""}`;throw Error(t||`${e.status} ${e.statusText}`)}e.json=()=>Promise.resolve(n),e.text=()=>Promise.resolve(t)})),ea=({httpClient:e,tenant:t})=>({search:({page:n,limit:o=1e4,customAttributes:d,statuses:i,emails:a,phones:s,text:u,sort:c}={})=>r(void 0,void 0,void 0,(function*(){const r=yield e.post(Yi.search,{limit:o,page:n,withTestUser:!1,customAttributes:d,statuses:i,emails:a,phones:s,text:u,sort:c},{queryParams:{tenant:t}});yield Qi(r);return(yield r.json()).users})),deleteBatch:n=>r(void 0,void 0,void 0,(function*(){const r=yield e.post(Yi.deleteBatch,{userIds:n},{queryParams:{tenant:t}});return yield Qi(r),r.json()})),create:({loginId:n,email:o,phone:d,displayName:i,roles:a,customAttributes:s,picture:u,verifiedEmail:c,verifiedPhone:l,givenName:$,middleName:f,familyName:h,additionalLoginIds:p,sendSMS:g,sendMail:v,inviteUrl:y,invite:m})=>r(void 0,void 0,void 0,(function*(){const r=yield e.post(Yi.create,{loginId:n,email:o,phone:d,displayName:i,givenName:$,middleName:f,familyName:h,roleNames:a,userTenants:[{tenantId:t}],customAttributes:s,picture:u,verifiedEmail:c,verifiedPhone:l,additionalLoginIds:p,sendSMS:g,sendMail:v,inviteUrl:y,invite:m},{queryParams:{tenant:t}});yield Qi(r);return(yield r.json()).user})),update:({loginId:n,email:o,phone:d,displayName:i,roles:a,customAttributes:s,picture:u,verifiedEmail:c,verifiedPhone:l,givenName:$,middleName:f,familyName:h,additionalLoginIds:p})=>r(void 0,void 0,void 0,(function*(){const r=yield e.post(Yi.update,{loginId:n,email:o,phone:d,displayName:i,givenName:$,middleName:f,familyName:h,roleNames:a,customAttributes:s,picture:u,verifiedEmail:c,verifiedPhone:l,additionalLoginIds:p},{queryParams:{tenant:t}});yield Qi(r);return(yield r.json()).user})),expirePassword:n=>r(void 0,void 0,void 0,(function*(){const r=yield e.post(Yi.expirePassword,{loginId:n[0]},{queryParams:{tenant:t}});return yield Qi(r),r.json()})),getCustomAttributes:()=>r(void 0,void 0,void 0,(function*(){const n=yield e.get(Yi.customAttributes,{queryParams:{tenant:t}});return yield Qi(n),n.json()}))}),ta=({httpClient:e,tenant:t})=>({getTenantRoles:()=>r(void 0,void 0,void 0,(function*(){const n=yield e.get(Xi.roles,{queryParams:{tenant:t}});return yield Qi(n),n.json()}))}),na=i((t=>{var n,i,a,s;const c=e(b,y,u,m({tenant:v}))(t);return s=class extends c{constructor(){super(...arguments),n.add(this),i.set(this,void 0)}get baseUrl(){return this.getAttribute("base-url")}get tenant(){return this.getAttribute("tenant")}get api(){return o(this,i,"f")||o(this,n,"m",a).call(this),o(this,i,"f")}init(){const e=Object.create(null,{init:{get:()=>super.init}});var t;return r(this,void 0,void 0,(function*(){yield null===(t=e.init)||void 0===t?void 0:t.call(this),this.observeAttributes(["project-id","base-url","tenant"],(()=>{o(this,i,"f")&&o(this,n,"m",a).call(this)}))}))}},i=new WeakMap,n=new WeakSet,a=function(){this.logger.debug("creating an sdk instance"),d(this,i,((e,t)=>{const n=Zi(Object.assign(Object.assign({},e),{persistTokens:!0}));return{user:ea({httpClient:n.httpClient,tenant:t}),tenant:ta({httpClient:n.httpClient,tenant:t})}})({projectId:this.projectId,baseUrl:this.baseUrl},this.tenant),"f")},s})),ra=i((t=>{const n=e(en({name:"widget",initialState:In,reducers:{setSelectedUsersIds:(e,{payload:t})=>{e.selectedUsersLoginIds=t},clearNotifications:e=>{e.notifications=[]}},extraReducers:e=>{an.reducer(e),Cn.reducer(e),cn.reducer(e),yn.reducer(e),$n.reducer(e),pn.reducer(e),wn.reducer(e)},asyncActions:{searchUsers:yn.action,createUser:an.action,updateUser:Cn.action,deleteUsers:cn.action,expireUserPassword:$n.action,getCustomAttributes:pn.action,getTenantRoles:wn.action}}),a,u,na)(t);return class extends n{constructor(...e){super(...e),this.state=In,this.subscribe((e=>{this.logger.debug("State update:",e),this.state=e}))}}})),oa=i((t=>{const n=e(w,m({"widget-id":v}))(t);return class extends n{get widgetId(){return this.getAttribute("widget-id")}fetchWidgetPage(e){return r(this,void 0,void 0,(function*(){return(yield this.fetchStaticResource(`user-management-widget/${this.widgetId}/${e}`,"text")).body}))}}})),da=i((t=>{var n,d,i;return i=class extends(e(u,a,E,R,oa,ra)(t)){constructor(){super(...arguments),n.add(this)}onWidgetRootReady(){return r(this,void 0,void 0,(function*(){}))}init(){const e=Object.create(null,{init:{get:()=>super.init}});var t;return r(this,void 0,void 0,(function*(){yield null===(t=e.init)||void 0===t?void 0:t.call(this),yield Promise.all([o(this,n,"m",d).call(this),this.actions.searchUsers(),this.actions.getTenantRoles()]),this.onWidgetRootReady()}))}},n=new WeakSet,d=function(){return r(this,void 0,void 0,(function*(){const e=L(yield this.fetchWidgetPage("root.html"));yield this.loadDescopeUiComponents(e),this.contentRootElement.append(e.content.cloneNode(!0))}))},i})),ia=i((t=>{var n,i,a,s,c;return c=class extends(e(ra,G,D,u,da)(t)){constructor(){super(...arguments),n.add(this),i.set(this,void 0),s.set(this,(()=>r(this,void 0,void 0,(function*(){yield o(this,i,"f").setData(de(this.state).map((({name:e})=>({value:e,label:e}))))}))))}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var t;return r(this,void 0,void 0,(function*(){yield null===(t=e.onWidgetRootReady)||void 0===t?void 0:t.call(this),o(this,n,"m",a).call(this)}))}},i=new WeakMap,s=new WeakMap,n=new WeakSet,a=function(){return r(this,void 0,void 0,(function*(){this.createUserModal=this.createModal(),this.createUserModal.setContent(L(yield this.fetchWidgetPage("create-user-modal.html")));const e=new U((()=>{var e;return null===(e=this.createUserModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-cancel"]')}),{logger:this.logger});e.onClick((()=>{this.createUserModal.close(),this.resetFormData(this.createUserModal.ele)}));const t=new U((()=>{var e;return null===(e=this.createUserModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-submit"]')}),{logger:this.logger});t.onClick((()=>r(this,void 0,void 0,(function*(){this.validateForm(this.createUserModal.ele)&&(this.actions.createUser(Object.assign(Object.assign({},this.getFormData(this.createUserModal.ele)),{invite:!0,verifiedEmail:!0,verifiedPhone:!0})),this.createUserModal.close(),this.resetFormData(this.createUserModal.ele))})))),d(this,i,new q((()=>{var e;return null===(e=this.createUserModal.ele)||void 0===e?void 0:e.querySelector('[data-id="roles-multiselect"]')}),{logger:this.logger}),"f"),o(this,s,"f").call(this)}))},c})),aa=i((t=>{var n,d,i;return i=class extends(e(u,ia,da)(t)){constructor(){super(...arguments),n.add(this)}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var t;return r(this,void 0,void 0,(function*(){yield null===(t=e.onWidgetRootReady)||void 0===t?void 0:t.call(this),o(this,n,"m",d).call(this)}))}},n=new WeakSet,d=function(){var e;this.createButton=new U(null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector('[data-id="create-user"]'),{logger:this.logger}),this.createButton.onClick((()=>this.createUserModal.open()))},i}));class sa extends T{constructor(){super(...arguments),this.nodeName="descope-text"}get ele(){return super.ele}get text(){var e;return null===(e=this.ele)||void 0===e?void 0:e.innerText}set text(e){this.ele&&(this.ele.innerText=e)}}const ua=i((t=>{var n,d,i;return i=class extends(e(ra,G,u,da)(t)){constructor(){super(...arguments),n.add(this)}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var t;return r(this,void 0,void 0,(function*(){yield null===(t=e.onWidgetRootReady)||void 0===t?void 0:t.call(this),yield o(this,n,"m",d).call(this)}))}},n=new WeakSet,d=function(){var e;return r(this,void 0,void 0,(function*(){this.deleteUsersModal=this.createModal(),this.deleteUsersModal.setContent(L(yield this.fetchWidgetPage("delete-users-modal.html")));const t=new U((()=>{var e;return null===(e=this.deleteUsersModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-cancel"]')}),{logger:this.logger});t.onClick((()=>this.deleteUsersModal.close()));const n=new U((()=>{var e;return null===(e=this.deleteUsersModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-submit"]')}),{logger:this.logger});n.onClick((()=>{const e=ue(this.state);this.actions.deleteUsers(e),this.deleteUsersModal.close()}));const r=new sa(null===(e=this.deleteUsersModal.ele)||void 0===e?void 0:e.querySelector('[data-id="body-text"]'),{logger:this.logger});this.deleteUsersModal.beforeOpen=()=>{const e=fe(this.state);r.text=`Delete ${e}?`}}))},i})),ca=i((t=>{var n,d,i,a;return a=class extends(e(u,da,ra,ua)(t)){constructor(){super(...arguments),n.add(this),i.set(this,$((e=>{e?this.deleteButton.enable():this.deleteButton.disable()})))}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var t;return r(this,void 0,void 0,(function*(){yield null===(t=e.onWidgetRootReady)||void 0===t?void 0:t.call(this),o(this,n,"m",d).call(this),this.subscribe(o(this,i,"f").bind(this),le)}))}},i=new WeakMap,n=new WeakSet,d=function(){var e;this.deleteButton=new U(null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector('[data-id="delete-users"]'),{logger:this.logger}),this.deleteButton.disable(),this.deleteButton.onClick((()=>{this.deleteUsersModal.open()}))},a}));class la extends T{constructor(){super(...arguments),this.nodeName="descope-text-field"}onInput(e){var t;return null===(t=this.ele)||void 0===t||t.addEventListener("input",e),()=>{var t;return null===(t=this.ele)||void 0===t?void 0:t.removeEventListener("input",e)}}get value(){var e;return null===(e=this.ele)||void 0===e?void 0:e.value}set value(e){this.ele&&(this.ele.value=e)}disable(){var e;null===(e=this.ele)||void 0===e||e.setAttribute("disabled","true")}enable(){var e;null===(e=this.ele)||void 0===e||e.removeAttribute("disabled")}}const $a=i((t=>{var n,d,i,a;return a=class extends(e(u,da,ra)(t)){constructor(){super(...arguments),n.add(this),d.set(this,h((()=>{this.actions.searchUsers({text:this.searchInput.value})})))}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var t;return r(this,void 0,void 0,(function*(){yield null===(t=e.onWidgetRootReady)||void 0===t?void 0:t.call(this),o(this,n,"m",i).call(this)}))}},d=new WeakMap,n=new WeakSet,i=function(){var e;this.searchInput=new la(null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector('[data-id="search-input"]'),{logger:this.logger}),this.searchInput.onInput(o(this,d,"f"))},a})),fa="descope-notification";class ha extends T{constructor(){super(...arguments),this.nodeName="descope-notification"}close(){var e;null===(e=this.ele)||void 0===e||e.removeAttribute("opened")}show(){var e;null===(e=this.ele)||void 0===e||e.setAttribute("opened","true")}setContent(e){this.ele.innerHTML="",this.ele.appendChild(e.content.cloneNode(!0))}remove(){var e;null===(e=this.ele)||void 0===e||e.remove()}}const pa=i((t=>{var n,d;const i=e(a,R,E)(t);return d=class extends i{constructor(){super(...arguments),n.set(this,(()=>{const e=this.loadDescopeUiComponents.bind(this);return class extends ha{setContent(t){const n="string"==typeof t?L(t):t;e(n),super.setContent(n)}}})())}createNotification(e){const t=((e={})=>{const t=document.createElement(fa);return Object.keys(e).forEach((n=>{t.setAttribute(n,e[n])})),t})(Object.assign(Object.assign({},{}),e));return this.rootElement.append(t),new(o(this,n,"f"))(t,{logger:this.logger})}init(){const e=Object.create(null,{init:{get:()=>super.init}});var t;return r(this,void 0,void 0,(function*(){yield null===(t=e.init)||void 0===t?void 0:t.call(this),this.loadDescopeUiComponents([fa])}))}},n=new WeakMap,d}));const ga={success:(new DOMParser).parseFromString('<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g id="Checkmark">\n<path id="Shape" d="M10.0485 15.6396C9.5799 15.171 8.8201 15.171 8.35147 15.6396C7.88284 16.1082 7.88284 16.868 8.35147 17.3367L12.7072 21.6924C13.1759 22.1611 13.9357 22.1611 14.4043 21.6924L24.7152 11.3815C25.1838 10.9129 25.1838 10.1531 24.7152 9.68448C24.2466 9.21585 23.4868 9.21585 23.0181 9.68448L13.5558 19.1469L10.0485 15.6396Z" fill="white"/>\n</g>\n</svg>\n',"image/svg+xml").firstChild,error:(new DOMParser).parseFromString('<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g id="Icon">\n<path id="Vector" d="M15.9998 26.6558C10.1118 26.6558 5.34375 21.8878 5.34375 15.9998C5.34375 10.1118 10.1118 5.34375 15.9998 5.34375C21.8878 5.34375 26.6558 10.1118 26.6558 15.9998C26.6558 21.8878 21.8878 26.6558 15.9998 26.6558ZM15.9998 24.4798C20.6718 24.4798 24.4798 20.7038 24.4798 15.9998C24.4798 11.3278 20.7038 7.51975 15.9998 7.51975C11.3278 7.51975 7.51975 11.2958 7.51975 15.9998C7.51975 20.6718 11.2958 24.4798 15.9998 24.4798ZM15.3278 9.34375H16.6718C17.0558 9.34375 17.3438 9.63175 17.3118 9.98375L16.9598 16.9278C16.9598 17.1838 16.7678 17.3438 16.5438 17.3438H15.4558C15.2318 17.3438 15.0398 17.1518 15.0398 16.9278L14.6878 9.98375C14.6878 9.63175 14.9758 9.34375 15.3278 9.34375ZM15.4558 19.4558H16.5438C16.9278 19.4558 17.2158 19.7438 17.1838 20.1278V21.1838C17.1838 21.5678 16.8958 21.8558 16.5438 21.8558H15.4558C15.0718 21.8558 14.7838 21.5678 14.7838 21.1838V20.1278C14.7838 19.7438 15.0718 19.4558 15.4558 19.4558Z" fill="#FFDFDD"/>\n</g>\n</svg>\n',"image/svg+xml").firstChild},va=i((t=>{var n,d,i,s,c;return c=class extends(e(u,ra,pa,a)(t)){constructor(){super(...arguments),n.add(this),s.set(this,$((e=>{e.length&&(e.forEach((({type:e,msg:t})=>{const r=o(this,n,"m",i).call(this,e);r.setContent(o(this,n,"m",d).call(this,{type:e,msg:t})),r.show()})),setTimeout((()=>this.actions.clearNotifications())))})))}init(){const e=Object.create(null,{init:{get:()=>super.init}});var t;return r(this,void 0,void 0,(function*(){yield null===(t=e.init)||void 0===t?void 0:t.call(this),this.subscribe(o(this,s,"f").bind(this),ae)}))}},s=new WeakMap,n=new WeakSet,d=function({type:e,msg:t}){const n=ga[e],r=Object.assign((new DOMParser).parseFromString('<svg width="2em" height="2em" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g id="Icon">\n<path id="Shape" d="M10.6712 12L7.27521 8.60406C6.90826 8.23711 6.90826 7.64216 7.27521 7.27521C7.64216 6.90826 8.23711 6.90826 8.60406 7.27521L12 10.6712L15.3959 7.27521C15.7629 6.90826 16.3578 6.90826 16.7248 7.27521C17.0917 7.64216 17.0917 8.23711 16.7248 8.60406L13.3288 12L16.7248 15.3959C17.0917 15.7629 17.0917 16.3578 16.7248 16.7248C16.3578 17.0917 15.7629 17.0917 15.3959 16.7248L12 13.3288L8.60406 16.7248C8.23711 17.0917 7.64216 17.0917 7.27521 16.7248C6.90826 16.3578 6.90826 15.7629 7.27521 15.3959L10.6712 12Z" fill="white"/>\n</g>\n</svg>\n',"image/svg+xml").firstChild,{slot:"close"});return`${(null==n?void 0:n.outerHTML)||""}${t}${r.outerHTML}`},i=function(e){return this.createNotification({mode:e,duration:"error"===e?0:3e3,position:"bottom-start",size:"sm"})},c}));const ya=/^descope-grid-([^-]+)-column$/,ma={text:class extends T{constructor(){super(...arguments),this.nodeName="descope-grid-text-column"}onSortDirectionChange(e){var t;return null===(t=this.ele)||void 0===t||t.addEventListener("direction-changed",e),()=>{var t;return null===(t=this.ele)||void 0===t?void 0:t.removeEventListener("selected-items-changed",e)}}},custom:class extends T{constructor(){super(...arguments),this.nodeName="descope-grid-custom-column"}onSortDirectionChange(e){var t;return null===(t=this.ele)||void 0===t||t.addEventListener("direction-changed",e),()=>{var t;return null===(t=this.ele)||void 0===t?void 0:t.removeEventListener("selected-items-changed",e)}}}};class ba extends T{constructor(){super(...arguments),this.nodeName="descope-grid"}onSelectedItemsChange(e){var t;return null===(t=this.ele)||void 0===t||t.addEventListener("selected-items-changed",e),()=>{var t;return null===(t=this.ele)||void 0===t?void 0:t.removeEventListener("selected-items-changed",e)}}get ele(){return super.ele}get data(){var e;return null===(e=this.ele)||void 0===e?void 0:e.data}set data(e){this.ele&&(this.ele.data=e)}get columns(){return this.ele?Array.from(this.ele.children).reduce(((e,t)=>{var n;const r=null===(n=ya.exec(t.localName))||void 0===n?void 0:n[1],o=ma[r];return o?(e.push(new o(t,{logger:this.logger})),e):e}),[]):[]}}const wa=i((t=>{var n,d,i,a,s;return s=class extends(e(ra,u,da)(t)){constructor(){super(...arguments),n.add(this),i.set(this,$((e=>{this.usersTable.data=e}))),a.set(this,h(((e,t)=>{const n=[],{value:r}=t;if(r){const t=e.path;n.push({field:t,desc:"desc"===r})}this.actions.searchUsers({sort:n})})))}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var t;return r(this,void 0,void 0,(function*(){yield null===(t=e.onWidgetRootReady)||void 0===t?void 0:t.call(this),o(this,n,"m",d).call(this),this.usersTable.columns.forEach((e=>{e.onSortDirectionChange((e=>{o(this,a,"f").call(this,e.target,e.detail)}))})),o(this,i,"f").call(this,se(this.state)),this.subscribe(o(this,i,"f").bind(this),se)}))}},i=new WeakMap,a=new WeakMap,n=new WeakSet,d=function(){var e;this.usersTable=new ba(null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector('[data-id="users-table"]'),{logger:this.logger}),this.usersTable.onSelectedItemsChange((e=>{this.actions.setSelectedUsersIds(e.detail.value.map((({loginIds:e})=>e)))}))},s}));var Oa={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|22"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","[24-689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]]],BL:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-467]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","(?:[2-8]\\d|90)\\d{8}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","[189]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\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{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"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],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","10(?:10|9[56])|2[0-57-9](?:100|9[56])"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}",[10,11],[["(\\d{3})(\\d{7})","$1 $2",["6"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","[27]\\d{6,7}|[34]\\d{5,7}|63\\d{6}|(?:5|8\\d\\d)\\d{7}",[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|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|31)"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:1[3-79]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0235])|4(?:[0-5]\\d\\d|69[7-9]|70[0-79])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-2]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","[56]94\\d{6}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[56]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","(?:[2-489]\\d|55)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["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]],0,0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0",0,"(000[259]\\d{6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[013-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(8-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"8 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(8-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(8-$1)",1]],"8",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","596\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","1(?:(?:22|44|7[27]|87|99)[1-9]|65[0-689])\\d{7}|(?:1(?:[01]\\d|2[13-9]|[35][1-9]|4[0-35-9]|6[0-46-9]|7[013-689]|8[1-69]|9[1-8])|[2-9]\\d)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"],0,1],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"],0,1],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"],0,1]],"01",0,"0(?:[12]|4[45])|1",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[047]"]]]],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","2[0-24-9]\\d{8}|[78]\\d{10,13}|[7-9]\\d{9}|[1-9]\\d{7}|[124-7]\\d{6}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-6]|7(?:0[0-689]|[1-79])|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|80\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[16]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-5]|76(?:2[27]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","(?:[1-6]|[7-9]\\d\\d)\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","800\\d{4}|(?:[249]\\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],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|77|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[69]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3[1-5]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","[1-6]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["6"],"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,[["(?:5056(?:[0-35-9]\\d|4[468])|7302[0-3]\\d)\\d{4}|(?:472[24]|505[2-57-9]|7306|983[237-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[6,7,8,9,10,11,12,13],[["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","810","(?:20|33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],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],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","[23]\\d{7,8}|(?:4\\d\\d|[89]00)\\d{5}",[8,9],[["(\\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",["[23]"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,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 Ca(e){return Ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ca(e)}function Ia(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ka(e){var t=Ea();return function(){var n,r=_a(e);if(t){var o=_a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ca(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Sa(e)}(this,n)}}function Sa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ja(e){var t="function"==typeof Map?new Map:void 0;return ja=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return xa(e,arguments,_a(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Pa(r,e)},ja(e)}function xa(e,t,n){return xa=Ea()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Pa(o,n.prototype),o},xa.apply(null,arguments)}function Ea(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Pa(e,t){return Pa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Pa(e,t)}function _a(e){return _a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_a(e)}var Ra=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pa(e,t)}(d,e);var t,n,r,o=ka(d);function d(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),t=o.call(this,e),Object.setPrototypeOf(Sa(t),d.prototype),t.name=t.constructor.name,t}return t=d,n&&Ia(t.prototype,n),r&&Ia(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}(ja(Error)),Ma=2,Aa=17,Na=3,Ta="0-90-9٠-٩۰-۹",Ua="".concat("-‐-―−ー-").concat("//").concat("..").concat("  ­​⁠ ").concat("()()[]\\[\\]").concat("~⁓∼~");function La(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),o=0;o<3;o++){var d=Number(n[o]),i=Number(r[o]);if(d>i)return 1;if(i>d)return-1;if(!isNaN(d)&&isNaN(i))return 1;if(isNaN(d)&&!isNaN(i))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}var Da={}.constructor;function Fa(e){return null!=e&&e.constructor===Da}function Wa(e){return Wa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wa(e)}function Ba(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ga(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qa(e,t,n){return t&&Ga(e.prototype,t),n&&Ga(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var za=" ext. ",Ha=/^\d+$/,Ka=function(){function e(t){Ba(this,e),function(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Fa(e)||!Fa(e.countries))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(Fa(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+Qa(e)+": "+e,"."))}(t),this.metadata=t,ts.call(this,t)}return qa(e,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter((function(e){return"001"!==e}))}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){if(e&&Ha.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new Va(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new Va(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t){if(1===t.length&&3===t[0].length)return;return t}}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var n=this.nonGeographic()[e];if(n)return n}else{var r=this.countryCallingCodes()[e];if(r&&1===r.length&&"001"===r[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(e){return this.numberingPlan.type(e)}},{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(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}]),e}(),Va=function(){function e(t,n){Ba(this,e),this.globalMetadataObject=n,this.metadata=t,ts.call(this,n.metadata)}return qa(e,[{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(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this,t=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return t.map((function(t){return new Ja(t,e)}))}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[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(e){if(this.hasTypes()&&Xa(this.types(),e))return new Ya(Xa(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?za:this.metadata[13]||za}}]),e}(),Ja=function(){function e(t,n){Ba(this,e),this._format=t,this.metadata=n}return qa(e,[{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()||Za.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),e}(),Za=/^\(?\$1\)?$/,Ya=function(){function e(t,n){Ba(this,e),this.type=t,this.metadata=n}return qa(e,[{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()}}]),e}();function Xa(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}var Qa=function(e){return Wa(e)};function es(e,t){if((t=new Ka(t)).hasCountry(e))return t.country(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function ts(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===La(t,"1.2.0")?this.v2=!0:-1===La(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}var ns=function(e){return"([".concat(Ta,"]{1,").concat(e,"})")};function rs(e){var t="[  \\t,]*",n="[:\\..]?[  \\t,-]*",r="#?",o="[  \\t]*";return";ext="+ns("20")+"|"+(t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+n+ns("20")+r)+"|"+(t+"(?:[xx##~~]|int|int)"+n+ns("9")+r)+"|"+("[- ]+"+ns("6")+"#")+"|"+(o+"(?:,{2}|;)"+n+ns("15")+r)+"|"+(o+"(?:,)+"+n+ns("9")+r)}var os="["+Ta+"]{"+Ma+"}",ds="[++]{0,1}(?:["+Ua+"]*["+Ta+"]){3,}["+Ua+Ta+"]*",is=new RegExp("^[++]{0,1}(?:["+Ua+"]*["+Ta+"]){1,2}$","i"),as=ds+"(?:"+rs()+")?",ss=new RegExp("^"+os+"$|^"+as+"$","i");var us=new RegExp("(?:"+rs()+")$","i");var cs={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 ls(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return $s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $s(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function $s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fs(e){for(var t,n="",r=ls(e.split(""));!(t=r()).done;){n+=hs(t.value,n)||""}return n}function hs(e,t,n){return"+"===e?t?void("function"==typeof n&&n("end")):"+":function(e){return cs[e]}(e)}function ps(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return gs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gs(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function gs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vs(e,t){return ys(e,void 0,t)}function ys(e,t,n){var r=n.type(t),o=r&&r.possibleLengths()||n.possibleLengths();if(!o)return"IS_POSSIBLE";if("FIXED_LINE_OR_MOBILE"===t){if(!n.type("FIXED_LINE"))return ys(e,"MOBILE",n);var d=n.type("MOBILE");d&&(o=function(e,t){for(var n,r=e.slice(),o=ps(t);!(n=o()).done;){var d=n.value;e.indexOf(d)<0&&r.push(d)}return r.sort((function(e,t){return e-t}))}(o,d.possibleLengths()))}else if(t&&!r)return"INVALID_LENGTH";var i=e.length,a=o[0];return a===i?"IS_POSSIBLE":a>i?"TOO_SHORT":o[o.length-1]<i?"TOO_LONG":o.indexOf(i,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function ms(e,t){return"IS_POSSIBLE"===vs(e,t)}function bs(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function ws(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Os(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Os(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Os(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Cs=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Is(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new Ka(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(bs(r,n.nationalNumberPattern())){if(ks(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?ks(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var o,d=ws(Cs);!(o=d()).done;){var i=o.value;if(ks(r,i,n))return i}}}}function ks(e,t,n){return!(!(t=n.type(t))||!t.pattern())&&(!(t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0)&&bs(e,t.pattern()))}function Ss(e,t,n){var r=new Ka(n).getCountryCodesForCallingCode(e);return r?r.filter((function(e){return function(e,t,n){var r=new Ka(n);if(r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0)return!0;return!1}(t,e,n)})):[]}var js=/(\$\d)/;function xs(e,t,n){var r=n.useInternationalFormat,o=n.withNationalPrefix;n.carrierCode,n.metadata;var d=e.replace(new RegExp(t.pattern()),r?t.internationalFormat():o&&t.nationalPrefixFormattingRule()?t.format().replace(js,t.nationalPrefixFormattingRule()):t.format());return r?function(e){return e.replace(new RegExp("[".concat(Ua,"]+"),"g")," ").trim()}(d):d}var Es=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function Ps(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return _s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _s(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ms(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rs(Object(n),!0).forEach((function(t){As(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function As(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ns={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function Ts(e,t,n,r){if(n=n?Ms(Ms({},Ns),n):Ns,r=new Ka(r),e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.country(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var o,d=r.countryCallingCode(),i=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return i?Ls(o=Us(i,e.carrierCode,"NATIONAL",r,n),e.ext,r,n.formatExtension):"";case"INTERNATIONAL":return i?(o=Us(i,null,"INTERNATIONAL",r,n),Ls(o="+".concat(d," ").concat(o),e.ext,r,n.formatExtension)):"+".concat(d);case"E.164":return"+".concat(d).concat(i);case"RFC3966":return function(e){var t=e.number,n=e.ext;if(!t)return"";if("+"!==t[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(n?";ext="+n:"")}({number:"+".concat(d).concat(i),ext:e.ext});case"IDD":if(!n.fromCountry)return;var a=function(e,t,n,r,o){var d=es(r,o.metadata);if(d===n){var i=Us(e,t,"NATIONAL",o);return"1"===n?n+" "+i:i}var a=function(e,t,n){var r=new Ka(n);return r.selectNumberingPlan(e,t),r.defaultIDDPrefix()?r.defaultIDDPrefix():Es.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,void 0,o.metadata);if(a)return"".concat(a," ").concat(n," ").concat(Us(e,null,"INTERNATIONAL",o))}(i,e.carrierCode,d,n.fromCountry,r);return Ls(a,e.ext,r,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function Us(e,t,n,r,o){var d=function(e,t){for(var n,r=Ps(e);!(n=r()).done;){var o=n.value;if(o.leadingDigitsPatterns().length>0){var d=o.leadingDigitsPatterns()[o.leadingDigitsPatterns().length-1];if(0!==t.search(d))continue}if(bs(t,o.pattern()))return o}}(r.formats(),e);return d?xs(e,d,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!d.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!o||!1!==o.nationalPrefix,carrierCode:t,metadata:r}):e}function Ls(e,t,n,r){return t?r(e,t,n):e}function Ds(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ds(Object(n),!0).forEach((function(t){Ws(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ds(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ws(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Gs=function(){function e(t,n,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new TypeError("`country` or `countryCallingCode` not passed");if(!n)throw new TypeError("`nationalNumber` not passed");if(!r)throw new TypeError("`metadata` not passed");var o=function(e,t){var n,r,o=new Ka(t);qs(e)?(n=e,o.selectNumberingPlan(n),r=o.countryCallingCode()):r=e;return{country:n,countryCallingCode:r}}(t,r),d=o.country,i=o.countryCallingCode;this.country=d,this.countryCallingCode=i,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}}var t,n,r;return t=e,n=[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:Ss(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,n){if(void 0===t&&(t={}),n=new Ka(n),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.country(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return ms(e.phone||e.nationalNumber,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new 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(e,t,n){return t=t||{},(n=new Ka(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==Is(e,t,n.metadata):bs(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern())}(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new Ka(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return Is(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return Ts(this,e,t?Fs(Fs({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}],n&&Bs(t.prototype,n),r&&Bs(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),qs=function(e){return/^[A-Z]{2}$/.test(e)};var zs=new RegExp("(["+Ta+"])");function Hs(e,t){var n=function(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),r=n.exec(e);if(r){var o,d,i,a=r.length-1,s=a>0&&r[a];if(t.nationalPrefixTransformRule()&&s)o=e.replace(n,t.nationalPrefixTransformRule()),a>1&&(d=r[1]);else{var u=r[0];o=e.slice(u.length),s&&(d=r[1])}if(s){var c=e.indexOf(r[1]);e.slice(0,c)===t.numberingPlan.nationalPrefix()&&(i=t.numberingPlan.nationalPrefix())}else i=r[0];return{nationalNumber:o,nationalPrefix:i,carrierCode:d}}}return{nationalNumber:e}}(e,t),r=n.carrierCode,o=n.nationalNumber;if(o!==e){if(!function(e,t,n){if(bs(e,n.nationalNumberPattern())&&!bs(t,n.nationalNumberPattern()))return!1;return!0}(e,o,t))return{nationalNumber:e};if(t.possibleLengths()&&!function(e,t){switch(vs(e,t)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(o,t))return{nationalNumber:e}}return{nationalNumber:o,carrierCode:r}}function Ks(e,t,n,r){if(!e)return{};var o;if("+"!==e[0]){var d=function(e,t,n,r){if(t){var o=new Ka(r);o.selectNumberingPlan(t,n);var d=new RegExp(o.IDDPrefix());if(0===e.search(d)){var i=(e=e.slice(e.match(d)[0].length)).match(zs);if(!(i&&null!=i[1]&&i[1].length>0&&"0"===i[1]))return e}}}(e,t,n,r);if(!d||d===e){if(t||n){var i=function(e,t,n,r){var o=t?es(t,r):n;if(0===e.indexOf(o)){(r=new Ka(r)).selectNumberingPlan(t,n);var d=e.slice(o.length),i=Hs(d,r).nationalNumber,a=Hs(e,r).nationalNumber;if(!bs(a,r.nationalNumberPattern())&&bs(i,r.nationalNumberPattern())||"TOO_LONG"===vs(a,r))return{countryCallingCode:o,number:d}}return{number:e}}(e,t,n,r),a=i.countryCallingCode,s=i.number;if(a)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:a,number:s}}return{number:e}}o=!0,e="+"+d}if("0"===e[1])return{};r=new Ka(r);for(var u=2;u-1<=Na&&u<=e.length;){var c=e.slice(1,u);if(r.hasCallingCode(c))return r.selectNumberingPlan(c),{countryCallingCodeSource:o?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:c,number:e.slice(u)};u++}return{}}function Vs(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Js(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Js(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Js(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Zs=!1;function Ys(e,t){var n=t.nationalNumber,r=t.defaultCountry,o=t.metadata;if(Zs&&o.isNonGeographicCallingCode(e))return"001";var d=o.getCountryCodesForCallingCode(e);return d?1===d.length?d[0]:function(e,t){var n=t.countries,r=t.defaultCountry,o=t.metadata;o=new Ka(o);for(var d,i=[],a=Vs(n);!(d=a()).done;){var s=d.value;if(o.country(s),o.leadingDigits()){if(e&&0===e.search(o.leadingDigits()))return s}else if(Is({phone:e,country:s},void 0,o.metadata)){if(!r)return s;if(s===r)return s;i.push(s)}}if(i.length>0)return i[0]}(n,{countries:d,defaultCountry:r,metadata:o.metadata}):void 0}var Xs="+",Qs="(["+Ta+"]|[\\-\\.\\(\\)]?)",eu=new RegExp("^\\"+Xs+Qs+"*["+Ta+"]"+Qs+"*$","g"),tu=new RegExp("^("+("["+Ta+"]+((\\-)*["+Ta+"])*")+"\\.)*"+("[a-zA-Z]+((\\-)*["+Ta+"])*")+"\\.?$","g"),nu="tel:",ru=";phone-context=",ou=";isub=";function du(e,t){var n,r=t.extractFormattedPhoneNumber,o=function(e){var t=e.indexOf(ru);if(t<0)return null;var n=t+ru.length;if(n>=e.length)return"";var r=e.indexOf(";",n);return r>=0?e.substring(n,r):e.substring(n)}(e);if(!function(e){return null===e||0!==e.length&&(eu.test(e)||tu.test(e))}(o))throw new Ra("NOT_A_NUMBER");if(null===o)n=r(e)||"";else{n="",o.charAt(0)===Xs&&(n+=o);var d,i=e.indexOf(nu);d=i>=0?i+nu.length:0;var a=e.indexOf(ru);n+=e.substring(d,a)}var s=n.indexOf(ou);if(s>0&&(n=n.substring(0,s)),""!==n)return n}var iu=250,au=new RegExp("[++"+Ta+"]"),su=new RegExp("[^"+Ta+"#]+$");function uu(e,t,n){if(t=t||{},n=new Ka(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new Ra("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var r=function(e,t,n){var r=du(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(!e)return;if(e.length>iu){if(n)throw new Ra("TOO_LONG");return}if(!1===t)return e;var r=e.search(au);if(r<0)return;return e.slice(r).replace(su,"")}(e,n,t)}});if(!r)return{};if(!function(e){return e.length>=Ma&&ss.test(e)}(r))return function(e){return is.test(e)}(r)?{error:"TOO_SHORT"}:{};var o=function(e){var t=e.search(us);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(us),o=1;o<r.length;){if(r[o])return{number:n,ext:r[o]};o++}}(r);if(o.ext)return o;return{number:r}}(e,t.v2,t.extract),o=r.number,d=r.ext,i=r.error;if(!o){if(t.v2){if("TOO_SHORT"===i)throw new Ra("TOO_SHORT");throw new Ra("NOT_A_NUMBER")}return{}}var a=function(e,t,n,r){var o,d=Ks(fs(e),t,n,r.metadata),i=d.countryCallingCodeSource,a=d.countryCallingCode,s=d.number;if(a)r.selectNumberingPlan(a);else{if(!s||!t&&!n)return{};r.selectNumberingPlan(t,n),t&&(o=t),a=n||es(t,r.metadata)}if(!s)return{countryCallingCodeSource:i,countryCallingCode:a};var u=Hs(fs(s),r),c=u.nationalNumber,l=u.carrierCode,$=Ys(a,{nationalNumber:c,defaultCountry:t,metadata:r});$&&(o=$,"001"===$||r.country(o));return{country:o,countryCallingCode:a,countryCallingCodeSource:i,nationalNumber:c,carrierCode:l}}(o,t.defaultCountry,t.defaultCallingCode,n),s=a.country,u=a.nationalNumber,c=a.countryCallingCode,l=a.countryCallingCodeSource,$=a.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new Ra("INVALID_COUNTRY");return{}}if(!u||u.length<Ma){if(t.v2)throw new Ra("TOO_SHORT");return{}}if(u.length>Aa){if(t.v2)throw new Ra("TOO_LONG");return{}}if(t.v2){var f=new Gs(c,u,n.metadata);return s&&(f.country=s),$&&(f.carrierCode=$),d&&(f.ext=d),f.__countryCallingCodeSource=l,f}var h=!!(t.extended?n.hasSelectedNumberingPlan():s)&&bs(u,n.nationalNumberPattern());return t.extended?{country:s,countryCallingCode:c,carrierCode:$,valid:h,possible:!!h||!(!0!==t.extended||!n.possibleLengths()||!ms(u,n)),phone:u,ext:d}:h?function(e,t,n){var r={country:e,phone:t};n&&(r.ext=n);return r}(s,u,d):{}}function cu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cu(Object(n),!0).forEach((function(t){$u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,d=[],i=!0,a=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(d.push(r.value),!t||d.length!==t);i=!0);}catch(e){a=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(a)throw o}}return d}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return gu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gu(e,t)}(e,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.")}()}function gu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vu(e){var t,n,r,o=pu(Array.prototype.slice.call(e),4),d=o[0],i=o[1],a=o[2],s=o[3];if("string"!=typeof d)throw new TypeError("A text for parsing must be a string.");if(t=d,i&&"string"!=typeof i){if(!Fa(i))throw new Error("Invalid second argument: ".concat(i));a?(n=i,r=a):r=i}else s?(n=a,r=s):(n=void 0,r=a),i&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fu(Object(n),!0).forEach((function(t){hu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({defaultCountry:i},n));return{text:t,options:n,metadata:r}}function yu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yu(Object(n),!0).forEach((function(t){bu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wu(e,t,n){t&&t.defaultCountry&&!function(e,t){return t.countries.hasOwnProperty(e)}(t.defaultCountry,n)&&(t=mu(mu({},t),{},{defaultCountry:void 0}));try{return function(e,t,n){return uu(e,lu(lu({},t),{},{v2:!0}),n)}(e,t,n)}catch(e){if(!(e instanceof Ra))throw e}}function Ou(){var e=vu(arguments);return wu(e.text,e.options,e.metadata)}function Cu(){return function(e,t){var n=Array.prototype.slice.call(t);return n.push(Oa),e.apply(this,n)}(Ou,arguments)}const Iu=e=>{if(!e)return e;const t=Cu(e),n=new RegExp(`(\\+?${t.countryCallingCode})(.*)`);return t.number.replace(n,"$1-$2")},ku=i((t=>{var i,a,s,c,l,$,f,h,p;return p=class extends(e(ra,G,u,D,da)(t)){constructor(){super(...arguments),i.add(this),a.set(this,void 0),s.set(this,void 0),$.set(this,(()=>r(this,void 0,void 0,(function*(){yield o(this,s,"f").setData(de(this.state).map((({name:e})=>({value:e,label:e}))))})))),f.set(this,(()=>{var e,t;const n=null===(e=ce(this.state))||void 0===e?void 0:e[0],r={loginId:null===(t=null==n?void 0:n.loginIds)||void 0===t?void 0:t.join(", "),displayName:null==n?void 0:n.name,email:null==n?void 0:n.email,phone:Iu(null==n?void 0:n.phone),roles:null==n?void 0:n.roles};this.setFormData(this.editUserModal.ele,r)}))}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var t;return r(this,void 0,void 0,(function*(){yield null===(t=e.onWidgetRootReady)||void 0===t?void 0:t.call(this),yield o(this,i,"m",h).call(this)}))}},a=new WeakMap,s=new WeakMap,$=new WeakMap,f=new WeakMap,i=new WeakSet,c=function(){const e=new U((()=>{var e;return null===(e=this.editUserModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-cancel"]')}),{logger:this.logger});e.onClick((()=>this.editUserModal.close()))},l=function(){const e=new U((()=>{var e;return null===(e=this.editUserModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-submit"]')}),{logger:this.logger});e.onClick((()=>{if(this.validateForm(this.editUserModal.ele)){const e=this.getFormData(this.editUserModal.ele),{loginId:t}=e,r=n(e,["loginId"]);this.actions.updateUser(Object.assign({loginId:t.split(", ")[0]},r)),this.editUserModal.close(),this.resetFormData(this.editUserModal.ele)}}))},h=function(){var e;return r(this,void 0,void 0,(function*(){this.editUserModal=this.createModal(),this.editUserModal.setContent(L(yield this.fetchWidgetPage("edit-user-modal.html"))),o(this,i,"m",c).call(this),o(this,i,"m",l).call(this),d(this,a,new la(null===(e=this.editUserModal.ele)||void 0===e?void 0:e.querySelector('[name="loginId"]'),{logger:this.logger}),"f"),d(this,s,new q((()=>{var e;return null===(e=this.editUserModal.ele)||void 0===e?void 0:e.querySelector('[data-id="roles-multiselect"]')}),{logger:this.logger}),"f"),this.editUserModal.beforeOpen=()=>r(this,void 0,void 0,(function*(){yield o(this,$,"f").call(this),o(this,a,"f").disable(),o(this,f,"f").call(this)}))}))},p})),Su=i((t=>{var n,d,i,a;return a=class extends(e(u,da,ra,ku,D)(t)){constructor(){super(...arguments),n.add(this),i.set(this,$((e=>{e?this.editButton.enable():this.editButton.disable()})))}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var t;return r(this,void 0,void 0,(function*(){yield null===(t=e.onWidgetRootReady)||void 0===t?void 0:t.call(this),o(this,n,"m",d).call(this),this.subscribe(o(this,i,"f").bind(this),$e)}))}},i=new WeakMap,n=new WeakSet,d=function(){var e;this.editButton=new U(null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector('[data-id="edit-user"]'),{logger:this.logger}),this.editButton.disable(),this.editButton.onClick((()=>{this.editUserModal.open()}))},a})),ju=i((t=>class extends(e(c,A,wa,aa,ca,Su,$a,va)(t)){init(){const e=Object.create(null,{init:{get:()=>super.init}});var t;return r(this,void 0,void 0,(function*(){yield null===(t=e.init)||void 0===t?void 0:t.call(this)}))}})),xu=e((e=>class extends(ju(e)){}))(HTMLElement);var Eu,Pu,_u,Ru;customElements.define("descope-user-management-widget",xu);function Mu(e,t){const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r+=1){const o=n[r],d=e[o],i=t[o];if(null===d||null===i){if(d!==i)return!1}else if("object"==typeof d&&"object"==typeof i){if(!Mu(d,i))return!1}else if(d!==i)return!1}return!0}class Au{constructor(e={},{updateOnlyOnChange:t=!0}={}){Eu.set(this,void 0),Pu.set(this,{}),_u.set(this,0),Ru.set(this,!1),this.update=e=>{const t="function"==typeof e?e(o(this,Eu,"f")):e,n=Object.assign(Object.assign({},o(this,Eu,"f")),t);if(!o(this,Ru,"f")||!Mu(o(this,Eu,"f"),n)){const e=o(this,Eu,"f");d(this,Eu,n,"f"),Object.freeze(o(this,Eu,"f")),setTimeout((()=>{Object.values(o(this,Pu,"f")).forEach((t=>t(n,e,((e,t)=>n=>e[n]!==t[n])(n,e))))}),0)}},d(this,Eu,e,"f"),d(this,Ru,t,"f")}get current(){return Object.assign({},o(this,Eu,"f"))}subscribe(e){return d(this,_u,o(this,_u,"f")+1,"f"),o(this,Pu,"f")[o(this,_u,"f")]=e,o(this,_u,"f").toString()}unsubscribe(e){const t=!!o(this,Pu,"f")[e];return t&&delete o(this,Pu,"f")[e],t}unsubscribeAll(){return d(this,Pu,{},"f"),!0}}Eu=new WeakMap,Pu=new WeakMap,_u=new WeakMap,Ru=new WeakMap;const Nu=(e,t,n,r={})=>{var o,d,i,a;return[Math.min(Math.max(t,("all"===r.left?e.offsetWidth:null!==(o=r.left)&&void 0!==o?o:0)-e.offsetWidth),window.innerWidth-("all"===r.right?e.offsetWidth:null!==(d=r.right)&&void 0!==d?d:0)),Math.min(Math.max(n,("all"===r.top?e.offsetHeight:null!==(i=r.top)&&void 0!==i?i:0)-e.offsetHeight),window.innerHeight-("all"===r.bottom?e.offsetHeight:null!==(a=r.bottom)&&void 0!==a?a:0))]};var Tu,Uu,Lu,Du,Fu,Wu,Bu,Gu,qu,zu;const Hu=document.createElement("template");Hu.innerHTML=`\n<style>\n .debugger {\n width: 300px;\n height: 200px;\n background-color: #FAFAFA;\n position: fixed;\n font-family: "Helvetica Neue", sans-serif;\n box-shadow: rgba(0, 0, 0, 0.1) 0px 5px 10px;\n border-radius: 8px;\n overflow: hidden;\n border: 1px solid lightgrey;\n pointer-events: initial;\n display: flex;\n flex-direction: column;\n min-width: 200px;\n max-width: 600px;\n max-height: calc(100% - 64px);\n min-height: 200px;\n resize: both;\n }\n\n .header {\n padding: 8px 16px;\n display: flex;\n align-items: center;\n background-color: #EEEEEE;\n cursor: move;\n border-bottom: 1px solid #e0e0e0;\n }\n\n .content {\n font-size: 14px;\n flex-grow: 1;\n overflow: auto;\n }\n\n .msg {\n border-bottom: 1px solid lightgrey;\n padding: 8px 16px;\n display: flex;\n gap: 5px;\n background-color: #FAFAFA;\n }\n\n .msg.collapsible {\n cursor: pointer;\n }\n\n .empty-state {\n padding: 8px 16px;\n background-color: #FAFAFA;\n }\n\n\n .msg.collapsible:not(.collapsed) {\n background-color: #F5F5F5;\n }\n\n .msg_title {\n padding-bottom: 5px;\n display: flex;\n gap: 8px;\n font-weight: 500;\n }\n\n .msg svg {\n padding: 1px;\n flex-shrink: 0;\n margin-top: -2px;\n }\n\n .msg_content {\n overflow: hidden;\n flex-grow: 1;\n margin-right:5px;\n }\n\n .msg_desc {\n color: #646464;\n cursor: initial;\n word-wrap: break-word;\n }\n\n .msg.collapsed .msg_desc {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .msg.collapsible.collapsed .chevron {\n transform: rotate(-45deg) translateX(-2px);\n }\n\n .msg.collapsible .chevron {\n content: "";\n width:6px;\n height:6px;\n border-bottom: 2px solid grey;\n border-right: 2px solid grey;\n transform: rotate(45deg) translateX(-1px);\n margin: 5px;\n flex-shrink:0;\n }\n</style>\n\n<div style="top:32px; left:${window.innerWidth-300-32}px;" class="debugger">\n <div class="header">\n <span>Debugger messages</span>\n </div>\n <div class="content">\n <div class="empty-state">\n No errors detected 👀\n </div>\n </div>\n</div>\n`;class Ku extends HTMLElement{constructor(){var e;super(),Tu.add(this),Uu.set(this,new Au({messages:[]})),Lu.set(this,void 0),Du.set(this,void 0),Fu.set(this,void 0),Wu.set(this,{resize:o(this,Tu,"m",zu).bind(this)}),this.attachShadow({mode:"open"}),null===(e=this.shadowRoot)||void 0===e||e.appendChild(Hu.content.cloneNode(!0)),d(this,Lu,this.shadowRoot.querySelector(".debugger"),"f"),d(this,Du,o(this,Lu,"f").querySelector(".content"),"f"),d(this,Fu,o(this,Lu,"f").querySelector(".header"),"f")}updateData(e){o(this,Uu,"f").update((t=>({messages:t.messages.concat(e)})))}connectedCallback(){var e;((e,t,n)=>{let r=0,o=0,d=0,i=0;function a(t){t.preventDefault(),r=d-t.clientX,o=i-t.clientY,d=t.clientX,i=t.clientY;const[a,s]=Nu(e,e.offsetLeft-r,e.offsetTop-o,n);e.style.top=`${s}px`,e.style.left=`${a}px`}function s(){document.onmouseup=null,document.onmousemove=null}function u(e){e.preventDefault(),d=e.clientX,i=e.clientY,document.onmouseup=s,document.onmousemove=a}t?t.onmousedown=u:e.onmousedown=u})(o(this,Lu,"f"),o(this,Fu,"f"),{top:"all",bottom:100,left:100,right:100}),window.addEventListener("resize",o(this,Wu,"f").resize),(e=o(this,Lu,"f")).onmousemove=t=>{var n;const r=t.target;(r.w&&r.w!==r.offsetWidth||r.h&&r.h!==r.offsetHeight)&&(null===(n=e.onresize)||void 0===n||n.call(e,t)),r.w=r.offsetWidth,r.h=r.offsetHeight},o(this,Lu,"f").onresize=o(this,Tu,"m",qu).bind(this),o(this,Uu,"f").subscribe(o(this,Tu,"m",Bu).bind(this))}disconnectedCallback(){o(this,Uu,"f").unsubscribeAll(),window.removeEventListener("resize",o(this,Wu,"f").resize)}}Uu=new WeakMap,Lu=new WeakMap,Du=new WeakMap,Fu=new WeakMap,Wu=new WeakMap,Tu=new WeakSet,Bu=function(e){o(this,Tu,"m",Gu).call(this,e),o(this,Tu,"m",qu).call(this)},Gu=function(e){o(this,Du,"f").innerHTML=e.messages.map((e=>`\n <div class="msg">\n <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M5.99984 13.167L8.99984 10.167L11.9998 13.167L13.1665 12.0003L10.1665 9.00033L13.1665 6.00033L11.9998 4.83366L8.99984 7.83366L5.99984 4.83366L4.83317 6.00033L7.83317 9.00033L4.83317 12.0003L5.99984 13.167ZM8.99984 17.3337C7.84706 17.3337 6.76373 17.1148 5.74984 16.677C4.73595 16.2398 3.854 15.6462 3.104 14.8962C2.354 14.1462 1.76039 13.2642 1.32317 12.2503C0.885393 11.2364 0.666504 10.1531 0.666504 9.00033C0.666504 7.84755 0.885393 6.76421 1.32317 5.75033C1.76039 4.73644 2.354 3.85449 3.104 3.10449C3.854 2.35449 4.73595 1.7606 5.74984 1.32283C6.76373 0.885603 7.84706 0.666992 8.99984 0.666992C10.1526 0.666992 11.2359 0.885603 12.2498 1.32283C13.2637 1.7606 14.1457 2.35449 14.8957 3.10449C15.6457 3.85449 16.2393 4.73644 16.6765 5.75033C17.1143 6.76421 17.3332 7.84755 17.3332 9.00033C17.3332 10.1531 17.1143 11.2364 16.6765 12.2503C16.2393 13.2642 15.6457 14.1462 14.8957 14.8962C14.1457 15.6462 13.2637 16.2398 12.2498 16.677C11.2359 17.1148 10.1526 17.3337 8.99984 17.3337ZM8.99984 15.667C10.8609 15.667 12.4373 15.0212 13.729 13.7295C15.0207 12.4378 15.6665 10.8614 15.6665 9.00033C15.6665 7.13921 15.0207 5.56283 13.729 4.27116C12.4373 2.97949 10.8609 2.33366 8.99984 2.33366C7.13873 2.33366 5.56234 2.97949 4.27067 4.27116C2.979 5.56283 2.33317 7.13921 2.33317 9.00033C2.33317 10.8614 2.979 12.4378 4.27067 13.7295C5.56234 15.0212 7.13873 15.667 8.99984 15.667Z" fill="#ED404A"/>\n</svg>\n\n <div class="msg_content">\n <div class="msg_title">\n ${e.title}\n </div>\n <div class="msg_desc">\n ${e.description||""}\n </div>\n </div>\n <div class="chevron"></div>\n </div>\n `)).join("")},qu=function(){o(this,Du,"f").querySelectorAll(".msg").forEach((e=>{const t=e,n=t.querySelector(".msg_desc"),r=n.scrollWidth>n.clientWidth,o=n.clientHeight>20;r||o?(t.classList.add("collapsible"),t.onclick=e=>{e.target.classList.contains("msg_desc")||t.classList.toggle("collapsed")}):(t.classList.remove("collapsible"),t.onclick=null)}))},zu=function(){const[e,t]=Nu(o(this,Lu,"f"),Number.parseInt(o(this,Lu,"f").style.left,10),Number.parseInt(o(this,Lu,"f").style.top,10),{top:"all",bottom:100,left:100,right:100});o(this,Lu,"f").style.top=`${t}px`,o(this,Lu,"f").style.left=`${e}px`},customElements.define("descope-debugger",Ku);var Vu=Object.freeze({__proto__:null,default:Ku})}();
1
+
2
+ /**
3
+ * @descope/user-management-widget v0.4.0
4
+ */
5
+ this["descope-user-management-widget"]=function(){"use strict";var e=function(){return e=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},e.apply(this,arguments)};function t(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function n(e,t,n,r){return new(n||(n=Promise))((function(o,d){function i(e){try{s(r.next(e))}catch(e){d(e)}}function a(e){try{s(r.throw(e))}catch(e){d(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,a)}s((r=r.apply(e,t||[])).next())}))}function r(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function o(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function d(...e){return t=>e.reduce(((e,t)=>t(e)),t)}"function"==typeof SuppressedError&&SuppressedError;const i=e=>{const t=document.createElement("template");return t.innerHTML=e,t},a=(e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n])),s=e=>{let t,n;return(...r)=>(t&&a(t,r)||(t=r,n=e(...r)),n)},l=e=>(t,...n)=>t.reduce(((t,r,o)=>{var d;return`${t}${r}${(null===(d=null==n?void 0:n[o])||void 0===d?void 0:d[e>1?1:0])||""}`}),""),u=(e,t=500)=>{let n;return function(...r){clearTimeout(n),n=setTimeout((()=>e.apply(this,r)),t)}},c=e=>{const t=Symbol((e=>{const t=e.toString();let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n&=n;return n.toString(16)})(e));return n=>{if(n[t])return n;const r=e(n);return r[t]=!0,r}};var $,h,f,p,g;function v(e,t){const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r+=1){const o=n[r],d=e[o],i=t[o];if(null===d||null===i){if(d!==i)return!1}else if("object"==typeof d&&"object"==typeof i){if(!v(d,i))return!1}else if(d!==i)return!1}return!0}class m{constructor(e={},{updateOnlyOnChange:t=!0}={}){$.set(this,void 0),h.set(this,{}),f.set(this,0),p.set(this,!1),this.update=e=>{const t="function"==typeof e?e(r(this,$,"f")):e,n=Object.assign(Object.assign({},r(this,$,"f")),t);if(!r(this,p,"f")||!v(r(this,$,"f"),n)){const e=r(this,$,"f");o(this,$,n,"f"),Object.freeze(r(this,$,"f")),setTimeout((()=>{Object.values(r(this,h,"f")).forEach((t=>t(n,e,((e,t)=>n=>e[n]!==t[n])(n,e))))}),0)}},o(this,$,e,"f"),o(this,p,t,"f")}get current(){return Object.assign({},r(this,$,"f"))}subscribe(e){return o(this,f,r(this,f,"f")+1,"f"),r(this,h,"f")[r(this,f,"f")]=e,r(this,f,"f").toString()}unsubscribe(e){const t=!!r(this,h,"f")[e];return t&&delete r(this,h,"f")[e],t}unsubscribeAll(){return o(this,h,{},"f"),!0}}$=new WeakMap,h=new WeakMap,f=new WeakMap,p=new WeakMap;class y{constructor(e,t){g.set(this,void 0),this.nodeName="",o(this,g,e,"f"),this.logger=t.logger}get asyncEle(){return(async(e,t)=>new Promise((t=>{const n=setInterval((()=>{const r="function"==typeof e?e():e;r&&(clearInterval(n),t(r))}),100);setTimeout((()=>{clearInterval(n),t(null)}),1e3)})))(r(this,g,"f"))}get ele(){var e,t;const n="function"==typeof r(this,g,"f")?r(this,g,"f").call(this):r(this,g,"f");return n?(null==n?void 0:n.localName)!==this.nodeName?(null===(t=this.logger)||void 0===t||t.debug(`node name do not match, expected "${this.nodeName}", received "${n.localName}" `,Error()),null):n:(null===(e=this.logger)||void 0===e||e.debug("no element for driver ",this.constructor.name,new Error),null)}}g=new WeakMap;const b=/^descope-grid-([^-]+)-column$/,w={text:class extends y{constructor(){super(...arguments),this.nodeName="descope-grid-text-column"}onSortDirectionChange(e){var t;return null===(t=this.ele)||void 0===t||t.addEventListener("direction-changed",e),()=>{var t;return null===(t=this.ele)||void 0===t?void 0:t.removeEventListener("selected-items-changed",e)}}},custom:class extends y{constructor(){super(...arguments),this.nodeName="descope-grid-custom-column"}onSortDirectionChange(e){var t;return null===(t=this.ele)||void 0===t||t.addEventListener("direction-changed",e),()=>{var t;return null===(t=this.ele)||void 0===t?void 0:t.removeEventListener("selected-items-changed",e)}}}};class O extends y{constructor(){super(...arguments),this.nodeName="descope-grid"}onSelectedItemsChange(e){var t;return null===(t=this.ele)||void 0===t||t.addEventListener("selected-items-changed",e),()=>{var t;return null===(t=this.ele)||void 0===t?void 0:t.removeEventListener("selected-items-changed",e)}}get ele(){return super.ele}get data(){var e;return null===(e=this.ele)||void 0===e?void 0:e.data}set data(e){this.ele&&(this.ele.data=e)}get columns(){return this.ele?Array.from(this.ele.children).reduce(((e,t)=>{var n;const r=null===(n=b.exec(t.localName))||void 0===n?void 0:n[1],o=w[r];return o?(e.push(new o(t,{logger:this.logger})),e):e}),[]):[]}filterColumns(e){const t=this.ele.columns.filter(e);a(t,this.ele.columns)||(this.ele.columns=t)}}class C extends y{constructor(){super(...arguments),this.nodeName="descope-button"}onClick(e){var t;return null===(t=this.ele)||void 0===t||t.addEventListener("click",e),()=>{var t;return null===(t=this.ele)||void 0===t?void 0:t.removeEventListener("click",e)}}disable(){var e;null===(e=this.ele)||void 0===e||e.setAttribute("disabled","true")}enable(){var e;null===(e=this.ele)||void 0===e||e.removeAttribute("disabled")}}var k;class P extends y{constructor(){super(...arguments),k.set(this,void 0),this.nodeName="descope-modal"}close(){var e,t;null===(e=this.ele)||void 0===e||e.removeAttribute("opened"),null===(t=this.afterClose)||void 0===t||t.call(this)}async open(){var e,t;await(null===(e=this.beforeOpen)||void 0===e?void 0:e.call(this)),null===(t=this.ele)||void 0===t||t.setAttribute("opened","true")}reset(){var e;this.ele&&(this.ele.innerHTML=""),r(this,k,"f")&&(null===(e=this.ele)||void 0===e||e.append(r(this,k,"f").content.cloneNode(!0)))}setContent(e){o(this,k,e,"f"),this.reset()}remove(){var e;null===(e=this.ele)||void 0===e||e.remove()}}k=new WeakMap;class I extends y{constructor(){super(...arguments),this.nodeName="descope-multi-select-combo-box"}async setData(e){var t;null===(t=await this.asyncEle)||void 0===t||t.setAttribute("data",JSON.stringify(e.sort()))}}class S extends y{constructor(){super(...arguments),this.nodeName="descope-notification"}close(){var e;null===(e=this.ele)||void 0===e||e.removeAttribute("opened")}show(){var e;null===(e=this.ele)||void 0===e||e.setAttribute("opened","true")}setContent(e){this.ele.innerHTML="",this.ele.appendChild(e.content.cloneNode(!0))}remove(){var e;null===(e=this.ele)||void 0===e||e.remove()}}class x extends y{constructor(){super(...arguments),this.nodeName="descope-text"}get ele(){return super.ele}get text(){var e;return null===(e=this.ele)||void 0===e?void 0:e.innerText}set text(e){this.ele&&(this.ele.innerText=e)}}class j extends y{constructor(){super(...arguments),this.nodeName="descope-text-field"}onInput(e){var t;return null===(t=this.ele)||void 0===t||t.addEventListener("input",e),()=>{var t;return null===(t=this.ele)||void 0===t?void 0:t.removeEventListener("input",e)}}get value(){var e;return null===(e=this.ele)||void 0===e?void 0:e.value}set value(e){this.ele&&(this.ele.value=e)}disable(){var e;null===(e=this.ele)||void 0===e||e.setAttribute("disabled","true")}enable(){var e;null===(e=this.ele)||void 0===e||e.removeAttribute("disabled")}}var E=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),R=()=>Math.random().toString(36).substring(7).split("").join("."),M={INIT:`@@redux/INIT${R()}`,REPLACE:`@@redux/REPLACE${R()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${R()}`};function _(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function N(e){if(void 0===e)return"undefined";if(null===e)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";const n=function(e){return"function"==typeof e.constructor?e.constructor.name:null}(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function A(e){let t=typeof e;return t=N(e),t}function T(e,t,n){if("function"!=typeof e)throw new Error(`Expected the root reducer to be a function. Instead, received: '${A(e)}'`);if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(`Expected the enhancer to be a function. Instead, received: '${A(n)}'`);return n(T)(e,t)}let r=e,o=t,d=new Map,i=d,a=0,s=!1;function l(){i===d&&(i=new Map,d.forEach(((e,t)=>{i.set(t,e)})))}function u(){if(s)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function c(e){if("function"!=typeof e)throw new Error(`Expected the listener to be a function. Instead, received: '${A(e)}'`);if(s)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let t=!0;l();const n=a++;return i.set(n,e),function(){if(t){if(s)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");t=!1,l(),i.delete(n),d=null}}}function $(e){if(!_(e))throw new Error(`Actions must be plain objects. Instead, the actual type was: '${A(e)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if("string"!=typeof e.type)throw new Error(`Action "type" property must be a string. Instead, the actual type was: '${A(e.type)}'. Value was: '${e.type}' (stringified)`);if(s)throw new Error("Reducers may not dispatch actions.");try{s=!0,o=r(o,e)}finally{s=!1}return(d=i).forEach((e=>{e()})),e}$({type:M.INIT});return{dispatch:$,subscribe:c,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(`Expected the nextReducer to be a function. Instead, received: '${A(e)}`);r=e,$({type:M.REPLACE})},[E]:function(){const e=c;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(`Expected the observer to be an object. Instead, received: '${A(t)}'`);function n(){const e=t;e.next&&e.next(u())}n();return{unsubscribe:e(n)}},[E](){return this}}}}}function U(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}function L(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];void 0===e[o]&&U(`No reducer provided for key "${o}"`),"function"==typeof e[o]&&(n[o]=e[o])}const r=Object.keys(n);let o,d;o={};try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:M.INIT}))throw new Error(`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(void 0===n(void 0,{type:M.PROBE_UNKNOWN_ACTION()}))throw new Error(`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${M.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)}))}(n)}catch(e){d=e}return function(e={},t){if(d)throw d;{const r=function(e,t,n,r){const o=Object.keys(t),d=n&&n.type===M.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(0===o.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!_(e))return`The ${d} has unexpected type of "${A(e)}". Expected argument to be an object with the following keys: "${o.join('", "')}"`;const i=Object.keys(e).filter((e=>!t.hasOwnProperty(e)&&!r[e]));return i.forEach((e=>{r[e]=!0})),n&&n.type===M.REPLACE?void 0:i.length>0?`Unexpected ${i.length>1?"keys":"key"} "${i.join('", "')}" found in ${d}. Expected to find one of the known reducer keys instead: "${o.join('", "')}". Unexpected keys will be ignored.`:void 0}(e,n,t,o);r&&U(r)}let i=!1;const a={};for(let o=0;o<r.length;o++){const d=r[o],s=n[d],l=e[d],u=s(l,t);if(void 0===u){const e=t&&t.type;throw new Error(`When called with an action of type ${e?`"${String(e)}"`:"(unknown type)"}, the slice reducer for key "${d}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}a[d]=u,i=i||u!==l}return i=i||r.length!==Object.keys(e).length,i?a:e}}function D(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}function W(e){return _(e)&&"type"in e&&"string"==typeof e.type}var F=Symbol.for("immer-nothing"),B=Symbol.for("immer-draftable"),q=Symbol.for("immer-state"),G=[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}];function z(e,...t){{const n=G[e],r="function"==typeof n?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}}var H=Object.getPrototypeOf;function K(e){return!!e&&!!e[q]}function V(e){return!!e&&(Z(e)||Array.isArray(e)||!!e[B]||!!e.constructor?.[B]||te(e)||ne(e))}var J=Object.prototype.constructor.toString();function Z(e){if(!e||"object"!=typeof e)return!1;const t=H(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===J}function Y(e,t){0===X(e)?Object.entries(e).forEach((([n,r])=>{t(n,r,e)})):e.forEach(((n,r)=>t(r,n,e)))}function X(e){const t=e[q];return t?t.type_:Array.isArray(e)?1:te(e)?2:ne(e)?3:0}function Q(e,t){return 2===X(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ee(e,t,n){const r=X(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function te(e){return e instanceof Map}function ne(e){return e instanceof Set}function re(e){return e.copy_||e.base_}function oe(e,t){if(te(e))return new Map(e);if(ne(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Z(e)){if(!H(e)){const t=Object.create(null);return Object.assign(t,e)}return{...e}}const n=Object.getOwnPropertyDescriptors(e);delete n[q];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const o=r[t],d=n[o];!1===d.writable&&(d.writable=!0,d.configurable=!0),(d.get||d.set)&&(n[o]={configurable:!0,writable:!0,enumerable:d.enumerable,value:e[o]})}return Object.create(H(e),n)}function de(e,t=!1){return ae(e)||K(e)||!V(e)||(X(e)>1&&(e.set=e.add=e.clear=e.delete=ie),Object.freeze(e),t&&Y(e,((e,t)=>de(t,!0)))),e}function ie(){z(2)}function ae(e){return Object.isFrozen(e)}var se,le={};function ue(e){const t=le[e];return t||z(0,e),t}function ce(){return se}function $e(e,t){t&&(ue("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function he(e){fe(e),e.drafts_.forEach(ge),e.drafts_=null}function fe(e){e===se&&(se=e.parent_)}function pe(e){return se={drafts_:[],parent_:se,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ge(e){const t=e[q];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function ve(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[q].modified_&&(he(t),z(4)),V(e)&&(e=me(t,e),t.parent_||be(t,e)),t.patches_&&ue("Patches").generateReplacementPatches_(n[q].base_,e,t.patches_,t.inversePatches_)):e=me(t,n,[]),he(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==F?e:void 0}function me(e,t,n){if(ae(t))return t;const r=t[q];if(!r)return Y(t,((o,d)=>ye(e,r,t,o,d,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return be(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,d=!1;3===r.type_&&(o=new Set(t),t.clear(),d=!0),Y(o,((o,i)=>ye(e,r,t,o,i,n,d))),be(e,t,!1),n&&e.patches_&&ue("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function ye(e,t,n,r,o,d,i){if(o===n&&z(5),K(o)){const i=me(e,o,d&&t&&3!==t.type_&&!Q(t.assigned_,r)?d.concat(r):void 0);if(ee(n,r,i),!K(i))return;e.canAutoFreeze_=!1}else i&&n.add(o);if(V(o)&&!ae(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;me(e,o),t&&t.scope_.parent_||be(e,o)}}function be(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&de(t,n)}var we={get(e,t){if(t===q)return e;const n=re(e);if(!Q(n,t))return function(e,t,n){const r=ke(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!V(r)?r:r===Ce(e.base_,t)?(Ie(e),e.copy_[t]=Se(r,e)):r},has:(e,t)=>t in re(e),ownKeys:e=>Reflect.ownKeys(re(e)),set(e,t,n){const r=ke(re(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Ce(re(e),t),o=r?.[q];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||Q(e.base_,t)))return!0;Ie(e),Pe(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Ce(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Ie(e),Pe(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=re(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){z(11)},getPrototypeOf:e=>H(e.base_),setPrototypeOf(){z(12)}},Oe={};function Ce(e,t){const n=e[q];return(n?re(n):e)[t]}function ke(e,t){if(!(t in e))return;let n=H(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=H(n)}}function Pe(e){e.modified_||(e.modified_=!0,e.parent_&&Pe(e.parent_))}function Ie(e){e.copy_||(e.copy_=oe(e.base_,e.scope_.immer_.useStrictShallowCopy_))}Y(we,((e,t)=>{Oe[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Oe.deleteProperty=function(e,t){return isNaN(parseInt(t))&&z(13),Oe.set.call(this,e,t,void 0)},Oe.set=function(e,t,n){return"length"!==t&&isNaN(parseInt(t))&&z(14),we.set.call(this,e[0],t,n,e[0])};function Se(e,t){const n=te(e)?ue("MapSet").proxyMap_(e,t):ne(e)?ue("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:ce(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,d=we;n&&(o=[r],d=Oe);const{revoke:i,proxy:a}=Proxy.revocable(o,d);return r.draft_=a,r.revoke_=i,a}(e,t);return(t?t.scope_:ce()).drafts_.push(n),n}function xe(e){return K(e)||z(10,e),je(e)}function je(e){if(!V(e)||ae(e))return e;const t=e[q];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=oe(e,t.scope_.immer_.useStrictShallowCopy_)}else n=oe(e,!0);return Y(n,((e,t)=>{ee(n,e,je(t))})),t&&(t.finalized_=!1),n}var Ee=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,(e=>t.call(this,e,...o)))}}let r;if("function"!=typeof t&&z(6),void 0!==n&&"function"!=typeof n&&z(7),V(e)){const o=pe(this),d=Se(e,void 0);let i=!0;try{r=t(d),i=!1}finally{i?he(o):fe(o)}return $e(o,n),ve(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===F&&(r=void 0),this.autoFreeze_&&de(r,!0),n){const t=[],o=[];ue("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}z(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;const o=this.produce(e,t,((e,t)=>{n=e,r=t}));return[o,n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){V(e)||z(8),K(e)&&(e=xe(e));const t=pe(this),n=Se(e,void 0);return n[q].isManual_=!0,fe(t),n}finishDraft(e,t){const n=e&&e[q];n&&n.isManual_||z(9);const{scope_:r}=n;return $e(r,t),ve(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=ue("Patches").applyPatches_;return K(e)?r(e,t):this.produce(e,(e=>r(e,t)))}},Re=Ee.produce;Ee.produceWithPatches.bind(Ee),Ee.setAutoFreeze.bind(Ee),Ee.setUseStrictShallowCopy.bind(Ee),Ee.applyPatches.bind(Ee),Ee.createDraft.bind(Ee),Ee.finishDraft.bind(Ee);var Me=e=>{let t=!1;try{const n={};e(n)===n&&(t=!0)}catch{}if(t){let e;try{throw new Error}catch(t){({stack:e}=t)}console.warn("The result function returned its own inputs without modification. e.g\n`createSelector([state => state.todos], todos => todos)`\nThis could lead to inefficient memoization and unnecessary re-renders.\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.",{stack:e})}},_e=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:d,inputSelectorResultsCopy:i}=e,a=r((()=>({})),...o);if(!(a.apply(null,d)===a.apply(null,i))){let e;try{throw new Error}catch(t){({stack:e}=t)}console.warn("An input selector returned a different result when passed same arguments.\nThis means your output selector will likely run more frequently than intended.\nAvoid returning a new reference inside your input selector, e.g.\n`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)`",{arguments:n,firstInputs:d,secondInputs:i,stack:e})}},Ne={inputStabilityCheck:"once",identityFunctionCheck:"once"};var Ae=e=>Array.isArray(e)?e:[e];function Te(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every((e=>"function"==typeof e))){const n=e.map((e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e)).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Ue(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var Le="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}},De=0,We=1;function Fe(){return{s:De,v:void 0,o:null,p:null}}function Be(e,t={}){let n=Fe();const{resultEqualityCheck:r}=t;let o,d=0;function i(){let t=n;const{length:i}=arguments;for(let e=0,n=i;e<n;e++){const n=arguments[e];if("function"==typeof n||"object"==typeof n&&null!==n){let e=t.o;null===e&&(t.o=e=new WeakMap);const r=e.get(n);void 0===r?(t=Fe(),e.set(n,t)):t=r}else{let e=t.p;null===e&&(t.p=e=new Map);const r=e.get(n);void 0===r?(t=Fe(),e.set(n,t)):t=r}}const a=t;let s;if(t.s===We?s=t.v:(s=e.apply(null,arguments),d++),a.s=We,r){const e=o?.deref()??o;null!=e&&r(e,s)&&(s=e,0!==d&&d--);o="object"==typeof s&&null!==s||"function"==typeof s?new Le(s):s}return a.v=s,s}return i.clearCache=()=>{n=Fe(),i.resetResultsCount()},i.resultsCount=()=>d,i.resetResultsCount=()=>{d=0},i}function qe(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e;return(...e)=>{let t,r=0,o=0,d={},i=e.pop();"object"==typeof i&&(d=i,i=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(i,`createSelector expects an output function after the inputs, but received: [${typeof i}]`);const a={...n,...d},{memoize:s,memoizeOptions:l=[],argsMemoize:u=Be,argsMemoizeOptions:c=[],devModeChecks:$={}}=a,h=Ae(l),f=Ae(c),p=Te(e),g=s((function(){return r++,i.apply(null,arguments)}),...h);let v=!0;const m=u((function(){o++;const e=Ue(p,arguments);{const{identityFunctionCheck:t,inputStabilityCheck:n}=((e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...Ne,...t};return{identityFunctionCheck:{shouldRun:"always"===n||"once"===n&&e,run:Me},inputStabilityCheck:{shouldRun:"always"===r||"once"===r&&e,run:_e}}})(v,$);if(t.shouldRun&&t.run(i),n.shouldRun){const t=Ue(p,arguments);n.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:s,memoizeOptions:h},arguments)}v&&(v=!1)}return t=g.apply(null,e),t}),...f);return Object.assign(m,{resultFunc:i,memoizedResultFunc:g,dependencies:p,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:s,argsMemoize:u})}}var Ge=qe(Be);function ze(e){return({dispatch:t,getState:n})=>r=>o=>"function"==typeof o?o(t,n,e):r(o)}var He=ze(),Ke=ze;((...e)=>{const t=qe(...e)})(Be);var Ve="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?D:D.apply(null,arguments)},Je=e=>e&&"function"==typeof e.match;function Ze(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error("prepareAction did not return an object");return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>W(t)&&t.type===e,n}function Ye(e){return"function"==typeof e&&"type"in e&&Je(e)}function Xe(e,t){let n=0;return{measureTime(e){const t=Date.now();try{return e()}finally{const e=Date.now();n+=e-t}},warnIfExceeded(){n>e&&console.warn(`${t} took ${n}ms, which is more than the warning threshold of ${e}ms. \nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\nIt is disabled in production builds, so you don't need to worry about that.`)}}}var Qe=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function et(e){return V(e)?Re(e,(()=>{})):e}function tt(e,t,n){if(e.has(t)){let r=e.get(t);return n.update&&(r=n.update(r,t,e),e.set(t,r)),r}if(!n.insert)throw new Error("No insert provided for key not already in map");const r=n.insert(t,e);return e.set(t,r),r}function nt(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function rt(e,t,n){const r=ot(e,t,n);return{detectMutations:()=>dt(e,t,r,n)}}function ot(e,t=[],n,r="",o=new Set){const d={value:n};if(!e(n)&&!o.has(n)){o.add(n),d.children={};for(const o in n){const i=r?r+"."+o:o;t.length&&-1!==t.indexOf(i)||(d.children[o]=ot(e,t,n[o],i))}}return d}function dt(e,t=[],n,r,o=!1,d=""){const i=n?n.value:void 0,a=i===r;if(o&&!a&&!Number.isNaN(r))return{wasMutated:!0,path:d};if(e(i)||e(r))return{wasMutated:!1};const s={};for(let e in n.children)s[e]=!0;for(let e in r)s[e]=!0;const l=t.length>0;for(let o in s){const i=d?d+"."+o:o;if(l){if(t.some((e=>e instanceof RegExp?e.test(i):i===e)))continue}const s=dt(e,t,n.children[o],r[o],a,i);if(s.wasMutated)return s}return{wasMutated:!1}}function it(e){const t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||_(e)}function at(e,t="",n=it,r,o=[],d){let i;if(!n(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e)return!1;if(d?.has(e))return!1;const a=null!=r?r(e):Object.entries(e),s=o.length>0;for(const[e,l]of a){const a=t?t+"."+e:e;if(s){if(o.some((e=>e instanceof RegExp?e.test(a):a===e)))continue}if(!n(l))return{keyPath:a,value:l};if("object"==typeof l&&(i=at(l,a,n,r,o,d),i))return i}return d&&st(e)&&d.add(e),!1}function st(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if("object"==typeof t&&null!==t&&!st(t))return!1;return!0}function lt(e){return"boolean"==typeof e}var ut=()=>function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:o=!0}=e??{};let d=new Qe;if(t&&(lt(t)?d.push(He):d.push(Ke(t.extraArgument))),n){let e={};lt(n)||(e=n),d.unshift(function(e={}){{let t=function(e,t,r,o){return JSON.stringify(e,n(t,o),r)},n=function(e,t){let n=[],r=[];return t||(t=function(e,t){return n[0]===t?"[Circular ~]":"[Circular ~."+r.slice(0,n.indexOf(t)).join(".")+"]"}),function(o,d){if(n.length>0){var i=n.indexOf(this);~i?n.splice(i+1):n.push(this),~i?r.splice(i,1/0,o):r.push(o),~n.indexOf(d)&&(d=t.call(this,o,d))}else n.push(d);return null==e?d:e.call(this,o,d)}},{isImmutable:r=nt,ignoredPaths:o,warnAfter:d=32}=e;const i=rt.bind(null,r,o);return({getState:e})=>{let n,r=e(),o=i(r);return a=>s=>{const l=Xe(d,"ImmutableStateInvariantMiddleware");l.measureTime((()=>{if(r=e(),n=o.detectMutations(),o=i(r),n.wasMutated)throw new Error(`A state mutation was detected between dispatches, in the path '${n.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}));const u=a(s);return l.measureTime((()=>{if(r=e(),n=o.detectMutations(),o=i(r),n.wasMutated)throw new Error(`A state mutation was detected inside a dispatch, in the path: ${n.path||""}. Take a look at the reducer(s) handling the action ${t(s)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)})),l.warnIfExceeded(),u}}}}(e))}if(r){let e={};lt(r)||(e=r),d.push(function(e={}){{const{isSerializable:t=it,getEntries:n,ignoredActions:r=[],ignoredActionPaths:o=["meta.arg","meta.baseQueryMeta"],ignoredPaths:d=[],warnAfter:i=32,ignoreState:a=!1,ignoreActions:s=!1,disableCache:l=!1}=e,u=!l&&WeakSet?new WeakSet:void 0;return e=>l=>c=>{if(!W(c))return l(c);const $=l(c),h=Xe(i,"SerializableStateInvariantMiddleware");return s||r.length&&-1!==r.indexOf(c.type)||h.measureTime((()=>{const e=at(c,"",t,n,o,u);if(e){const{keyPath:t,value:n}=e;console.error(`A non-serializable value was detected in an action, in the path: \`${t}\`. Value:`,n,"\nTake a look at the logic that dispatched this action: ",c,"\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)","\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)")}})),a||(h.measureTime((()=>{const r=at(e.getState(),"",t,n,d,u);if(r){const{keyPath:e,value:t}=r;console.error(`A non-serializable value was detected in the state, in the path: \`${e}\`. Value:`,t,`\nTake a look at the reducer(s) handling this action type: ${c.type}.\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}})),h.warnIfExceeded()),$}}}(e))}if(o){let e={};lt(o)||(e=o),d.unshift(function(e={}){const{isActionCreator:t=Ye}=e;return()=>e=>n=>(t(n)&&console.warn(function(e){const t=e?`${e}`.split("/"):[],n=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched. \nMake sure you're calling the action creator before dispatching, i.e. \`dispatch(${n}())\` instead of \`dispatch(${n})\`. This is necessary even if the action has no payload.`}(n.type)),e(n))}(e))}return d},ct=e=>t=>{setTimeout(t,e)},$t="undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:ct(10),ht=e=>function(t){const{autoBatch:n=!0}=t??{};let r=new Qe(e);return n&&r.push(((e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,d=!1,i=!1;const a=new Set,s="tick"===e.type?queueMicrotask:"raf"===e.type?$t:"callback"===e.type?e.queueNotification:ct(e.timeout),l=()=>{i=!1,d&&(d=!1,a.forEach((e=>e())))};return Object.assign({},r,{subscribe(e){const t=r.subscribe((()=>o&&e()));return a.add(e),()=>{t(),a.delete(e)}},dispatch(e){try{return o=!e?.meta?.RTK_autoBatch,d=!o,d&&(i||(i=!0,s(l))),r.dispatch(e)}finally{o=!0}}})})("object"==typeof n?n:void 0)),r};function ft(e){const t=ut(),{reducer:n,middleware:r,devTools:o=!0,preloadedState:d,enhancers:i}=e||{};let a,s;if("function"==typeof n)a=n;else{if(!_(n))throw new Error("`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");a=L(n)}if(r&&"function"!=typeof r)throw new Error("`middleware` field must be a callback");if("function"==typeof r){if(s=r(t),!Array.isArray(s))throw new Error("when using a middleware builder function, an array of middleware must be returned")}else s=t();if(s.some((e=>"function"!=typeof e)))throw new Error("each middleware provided to configureStore must be a function");let l=D;o&&(l=Ve({trace:!0,..."object"==typeof o&&o}));const u=function(...e){return t=>(n,r)=>{const o=t(n,r);let d=()=>{throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const i={getState:o.getState,dispatch:(e,...t)=>d(e,...t)},a=e.map((e=>e(i)));return d=D(...a)(o.dispatch),{...o,dispatch:d}}}(...s),c=ht(u);if(i&&"function"!=typeof i)throw new Error("`enhancers` field must be a callback");let $="function"==typeof i?i(c):c();if(!Array.isArray($))throw new Error("`enhancers` callback must return an array");if($.some((e=>"function"!=typeof e)))throw new Error("each enhancer provided to configureStore must be a function");s.length&&!$.includes(u)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");return T(a,d,l(...$))}function pt(e){const t={},n=[];let r;const o={addCase(e,d){if(n.length>0)throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`");const i="string"==typeof e?e:e.type;if(!i)throw new Error("`builder.addCase` cannot be called with an empty action type");if(i in t)throw new Error(`\`builder.addCase\` cannot be called with two reducers for the same action type '${i}'`);return t[i]=d,o},addMatcher(e,t){if(r)throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:e,reducer:t}),o},addDefaultCase(e){if(r)throw new Error("`builder.addDefaultCase` can only be called once");return r=e,o}};return e(o),[t,n,r]}function gt(...e){return t=>e.some((e=>((e,t)=>Je(e)?e.match(t):e(t))(e,t)))}var vt=["name","message","stack","code"],mt=class{constructor(e,t){this.payload=e,this.meta=t}_type},yt=class{constructor(e,t){this.payload=e,this.meta=t}_type},bt=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of vt)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},wt=(()=>{function e(e,t,n){const r=Ze(e+"/fulfilled",((e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}}))),o=Ze(e+"/pending",((e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}}))),d=Ze(e+"/rejected",((e,t,r,o,d)=>({payload:o,error:(n&&n.serializeError||bt)(e||"Rejected"),meta:{...d||{},arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===e?.name,condition:"ConditionError"===e?.name}})));return Object.assign((function(e){return(i,a,s)=>{const l=n?.idGenerator?n.idGenerator(e):((e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t})(),u=new AbortController;let c;function $(e){c=e,u.abort()}const h=async function(){let h;try{let d=n?.condition?.(e,{getState:a,extra:s});if(null!==(f=d)&&"object"==typeof f&&"function"==typeof f.then&&(d=await d),!1===d||u.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const p=new Promise(((e,t)=>u.signal.addEventListener("abort",(()=>t({name:"AbortError",message:c||"Aborted"})))));i(o(l,e,n?.getPendingMeta?.({requestId:l,arg:e},{getState:a,extra:s}))),h=await Promise.race([p,Promise.resolve(t(e,{dispatch:i,getState:a,extra:s,requestId:l,signal:u.signal,abort:$,rejectWithValue:(e,t)=>new mt(e,t),fulfillWithValue:(e,t)=>new yt(e,t)})).then((t=>{if(t instanceof mt)throw t;return t instanceof yt?r(t.payload,l,e,t.meta):r(t,l,e)}))])}catch(t){h=t instanceof mt?d(null,l,e,t.payload,t.meta):d(t,l,e)}var f;return n&&!n.dispatchConditionRejection&&d.match(h)&&h.meta.condition||i(h),h}();return Object.assign(h,{abort:$,requestId:l,arg:e,unwrap:()=>h.then(Ot)})}}),{pending:o,rejected:d,fulfilled:r,settled:gt(d,r),typePrefix:e})}return e.withTypes=()=>e,e})();function Ot(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var Ct=Symbol.for("rtk-slice-createasyncthunk");function kt(e,t){return`${e}/${t}`}function Pt(e,t,n,r){function o(o,...d){let i=n.call(e,o);if(void 0===i){if(!r)throw new Error("selectState returned undefined for an uninjected slice reducer");i=e.getInitialState()}return t(i,...d)}return o.unwrapped=t,o}var It=function({creators:e}={}){const t=e?.asyncThunk?.[Ct];return function(e){const{name:n,reducerPath:r=n}=e;if(!n)throw new Error("`name` is a required option for createSlice");"undefined"!=typeof process&&void 0===e.initialState&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const o=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},d=Object.keys(o),i={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},a={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error("`context.addCase` cannot be called with an empty action type");if(n in i.sliceCaseReducersByType)throw new Error("`context.addCase` cannot be called with two reducers for the same action type: "+n);return i.sliceCaseReducersByType[n]=t,a},addMatcher:(e,t)=>(i.sliceMatchers.push({matcher:e,reducer:t}),a),exposeAction:(e,t)=>(i.actionCreators[e]=t,a),exposeCaseReducer:(e,t)=>(i.sliceCaseReducersByName[e]=t,a)};function s(){if("object"==typeof e.extraReducers)throw new Error("The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[t={},n=[],r]="function"==typeof e.extraReducers?pt(e.extraReducers):[e.extraReducers],o={...t,...i.sliceCaseReducersByType};return function(e,t){if("object"==typeof t)throw new Error("The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let n,[r,o,d]=pt(t);if(function(e){return"function"==typeof e}(e))n=()=>et(e());else{const t=et(e);n=()=>t}function i(e=n(),t){let i=[r[t.type],...o.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===i.filter((e=>!!e)).length&&(i=[d]),i.reduce(((e,n)=>{if(n){if(K(e)){const r=n(e,t);return void 0===r?e:r}if(V(e))return Re(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw new Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e}),e)}return i.getInitialState=n,i}(e.initialState,(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of i.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)}))}d.forEach((r=>{const d=o[r],i={reducerName:r,type:kt(n,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(d)?function({type:e,reducerName:t,createNotation:n},r,o){let d,i;if("reducer"in r){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error("Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");d=r.reducer,i=r.prepare}else d=r;o.addCase(e,d).exposeCaseReducer(t,d).exposeAction(t,i?Ze(e,i):Ze(e))}(i,d,a):function({type:e,reducerName:t},n,r,o){if(!o)throw new Error("Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:d,fulfilled:i,pending:a,rejected:s,settled:l,options:u}=n,c=o(e,d,u);r.exposeAction(t,c),i&&r.addCase(c.fulfilled,i);a&&r.addCase(c.pending,a);s&&r.addCase(c.rejected,s);l&&r.addMatcher(c.settled,l);r.exposeCaseReducer(t,{fulfilled:i||St,pending:a||St,rejected:s||St,settled:l||St})}(i,d,a,t)}));const l=e=>e,u=new WeakMap;let c;const $={name:n,reducerPath:r,reducer:(e,t)=>(c||(c=s()),c(e,t)),actions:i.actionCreators,caseReducers:i.sliceCaseReducersByName,getInitialState:()=>(c||(c=s()),c.getInitialState()),getSelectors(t=l){const n=tt(u,this,{insert:()=>new WeakMap});return tt(n,t,{insert:()=>{const n={};for(const[r,o]of Object.entries(e.selectors??{}))n[r]=Pt(this,o,t,this!==$);return n}})},selectSlice(e){let t=e[this.reducerPath];if(void 0===t){if(this===$)throw new Error("selectSlice returned undefined for an uninjected slice reducer");t=this.getInitialState()}return t},get selectors(){return this.getSelectors(this.selectSlice)},injectInto(e,{reducerPath:t,...n}={}){const r=t??this.reducerPath;return e.inject({reducerPath:r,reducer:this.reducer},n),{...this,reducerPath:r}}};return $}}();function St(){}var xt="listenerMiddleware";Ze(`${xt}/add`),Ze(`${xt}/removeAll`),Ze(`${xt}/remove`);const jt=["error","warn","info","debug"],Et=c((e=>{var t,n,d,i;return i=class extends e{constructor(){super(...arguments),t.add(this),n.set(this,r(this,t,"m",d).call(this,console))}set logger(e){o(this,n,r(this,t,"m",d).call(this,e),"f")}get logger(){return r(this,n,"f")}onLogEvent(e,t){}},n=new WeakMap,t=new WeakSet,d=function(e){return jt.reduce(((t,n)=>(t[n]=(...t)=>{var r;this.onLogEvent(n,t),null===(r=e[n])||void 0===r||r.call(e,...t)},t)),{})},i})),Rt="undefined"!=typeof localStorage,Mt=Rt&&localStorage.getItem("base.content.url")||"https://static.descope.com/pages",_t=(e,t)=>!t&&`${e} cannot be empty`,Nt=c((e=>{var t,n;return n=class extends e{constructor(){super(...arguments),t.set(this,!0)}connectedCallback(){var e,n;null===(e=super.connectedCallback)||void 0===e||e.call(this),(null===(n=this.shadowRoot)||void 0===n?void 0:n.isConnected)&&r(this,t,"f")&&(o(this,t,!1,"f"),this.init())}async init(){}},t=new WeakMap,n})),At=c((e=>{var t,n;const o=d(Et,Nt)(e);return n=class extends o{constructor(){super(...arguments),t.set(this,{})}async init(){var e,n,o;await(null===(e=super.init)||void 0===e?void 0:e.call(this)),n=this,o=e=>{var n;null===(n=r(this,t,"f")[e])||void 0===n||n.forEach((t=>{t(e,this.getAttribute(e))}))},Array.from(n.attributes).forEach((e=>o(e.name))),new MutationObserver((e=>{e.forEach((e=>{"attributes"===e.type&&o(e.attributeName)}))})).observe(n,{attributes:!0})}observeAttribute(e,n){r(this,t,"f")[e]||(r(this,t,"f")[e]=[]);const o=r(this,t,"f")[e].push(n);return()=>r(this,t,"f")[e].splice(o,1)}observeAttributes(e,t){const n=e.reduce(((e,n)=>(e.push(this.observeAttribute(n,t)),e)),[]);return()=>n.forEach((e=>e()))}},t=new WeakMap,n})),Tt=e=>t=>{var n,o,i;const a=d(Et,Nt,At)(t),s=Object.keys(e);return i=class extends a{constructor(...e){super(...e),n.add(this),this.observeAttributes(s,r(this,n,"m",o).bind(this))}async init(){var e;await(null===(e=super.init)||void 0===e?void 0:e.call(this)),s.forEach((e=>r(this,n,"m",o).call(this,e,this.getAttribute(e))))}},n=new WeakSet,o=function(t,n){const r=e[t],o="function"==typeof r?r(t,n):r;o&&this.logger.error(o)},i};Tt.missingAttrValidator=_t;const Ut=c((e=>{const t=d(Tt({"project-id":_t}))(e);return class extends t{get projectId(){return this.getAttribute("project-id")}}}));const Lt=c((e=>{const t=d(Et,Ut)(e);return class extends t{async fetchStaticResource(e,t){const n=function(e,t,n="v2-beta"){const r=new URL(Mt);return r.pathname=((...e)=>e.join("/").replace(/\/+/g,"/"))(r.pathname,e,n,t),r.toString()}(this.projectId,e),r=await fetch(n,{cache:"default"});return r.ok||this.logger.error(`Error fetching URL ${n} [${r.status}]`),{body:await r[t](),headers:Object.fromEntries(r.headers.entries())}}}})),Dt=c((e=>{var t,n,i;const a=d(Lt)(e);return i=class extends a{constructor(){super(...arguments),t.set(this,void 0),n.set(this,(async()=>{try{const{body:e,headers:t}=await this.fetchStaticResource("config.json","json");return{projectConfig:e,executionContext:{geo:t["x-geo"]}}}catch(e){this.logger.error("Cannot fetch config file","make sure that your projectId & flowId are correct")}}))}get config(){return r(this,t,"f")||o(this,t,r(this,n,"f").call(this),"f"),r(this,t,"f")}},t=new WeakMap,n=new WeakMap,i})),Wt=c((e=>{var t,n,i,a,s,l,u;return u=class extends(d(Nt,Et)(e)){constructor(){super(...arguments),t.add(this),n.set(this,void 0),this.attributeChangedCallback=(e,n,o)=>{var d;null===(d=super.attributeChangedCallback)||void 0===d||d.call(this,e,n,o),"debug"===e&&r(this,t,"m",s).call(this)}}get debug(){return"true"===this.getAttribute("debug")}onLogEvent(e,n){var o;null===(o=super.onLogEvent)||void 0===o||o.call(this,e,n),"error"===e&&r(this,t,"m",l).call(this,n[0]||"Error",n[1])}async init(){var e;await(null===(e=super.init)||void 0===e?void 0:e.call(this)),r(this,t,"m",s).call(this)}},n=new WeakMap,t=new WeakSet,i=function(){var e;null===(e=r(this,n,"f"))||void 0===e||e.remove(),o(this,n,null,"f")},a=async function(){o(this,n,document.createElement("descope-debugger"),"f"),Object.assign(r(this,n,"f").style,{position:"fixed",top:"0",right:"0",height:"100vh",width:"100vw",pointerEvents:"none",zIndex:99999}),await Promise.resolve().then((function(){return yn})),document.body.appendChild(r(this,n,"f"))},s=function(){this.debug?r(this,t,"m",a).call(this):r(this,t,"m",i).call(this)},l=function(e,t){var o;e&&(null===(o=r(this,n,"f"))||void 0===o||o.updateData({title:e,description:t}))},u})),Ft="load-descope-ui",Bt="base.ui.components.url",qt=Rt&&localStorage.getItem(Bt)||"https://static.descope.com/npm/@descope/web-components-ui@<version>/dist/umd/index.js",Gt=Rt&&localStorage.getItem(Bt)||"https://cdn.jsdelivr.net/npm/@descope/web-components-ui@<version>/dist/umd/index.js",zt=e=>{const t=document.createElement("script");return t.id=e,t},Ht=(e,t)=>e.replace("<version>",t),Kt=c((e=>{var t,n,i,a,s,l,u,c,$,h,f,p;const g=d(Et,Dt)(e);return p=class extends g{constructor(){super(...arguments),t.add(this),n.set(this,Symbol("errorCbs")),i.set(this,Symbol("loadCbs")),$.set(this,void 0)}get descopeUi(){return r(this,$,"f")||o(this,$,r(this,t,"m",f).call(this),"f"),r(this,$,"f")}async loadDescopeUiComponents(e){const n=Array.isArray(e)?e:(e=>[...Array.from(e.content.querySelectorAll("*")).reduce(((e,t)=>t.localName.startsWith("descope-")?e.add(t.localName):e),new Set)])(e);return Promise.all(n.map((e=>r(this,t,"m",h).call(this,e))))}},n=new WeakMap,i=new WeakMap,$=new WeakMap,t=new WeakSet,a=async function(){var e;const t=await this.config,n=null===(e=null==t?void 0:t.projectConfig)||void 0===e?void 0:e.componentsVersion;return n?this.logger.debug(`Got component version "${n}"`):this.logger.error("Could not get components version"),n},s=function(e){const t=r(this,n,"f"),o=r(this,i,"f");e[t]=[],e[o]=[],Object.defineProperty(e,"onerror",{set(n){e[t].push(n)}}),Object.defineProperty(e,"onload",{set(t){e[o].push(t)}})},l=async function(e,n){this.logger.debug("Trying to load DescopeUI from a fallback URL");const o=zt("load-descope-ui-fallback-script");document.body.append(o),o.addEventListener("error",(()=>{e.forEach((e=>e(`Cannot load DescopeUI from fallback URL, Make sure this URL is valid and return the correct script: "${o.src}"`)))})),o.addEventListener("load",(()=>{n.forEach((e=>e()))})),o.src=Ht(Gt,await r(this,t,"m",a).call(this))},u=function(e){e.addEventListener("error",(()=>{e[r(this,n,"f")].forEach((t=>t(`Cannot load DescopeUI from main URL, Make sure this URL is valid and return the correct script: "${e.src}"`))),r(this,t,"m",l).call(this,e[r(this,n,"f")],e[r(this,i,"f")])})),e.addEventListener("load",(()=>{e[r(this,i,"f")].forEach((e=>e()))}))},c=async function(){if(document.querySelector(`script#${Ft}`))this.logger.debug("DescopeUI loading script already exists",this);else{this.logger.debug("DescopeUI loading script does not exist, creating it",this);const e=zt(Ft);document.body.append(e),r(this,t,"m",s).call(this,e),r(this,t,"m",u).call(this,e),e.src=Ht(qt,await r(this,t,"m",a).call(this))}return document.getElementById(Ft)},h=async function(e){if(!!customElements.get(e))return void this.logger.debug(`Loading component "${e}" is skipped as it is already defined`);const t=await this.descopeUi;if(t[e])try{return await t[e]()}catch(t){if("NotSupportedError"!==t.name)throw t;console.debug(`Encountered an error while attempting to define the "${e}" component, it is likely that this component is already defined`)}else this.logger.error(`Cannot load UI component "${e}"`,`Descope UI does not have a component named "${e}", available components are: "${Object.keys(t).join(", ")}"`)},f=function(){return new Promise((e=>{globalThis.DescopeUI&&e(globalThis.DescopeUI),r(this,t,"m",c).call(this).then((t=>{t.onerror=this.logger.error,t.onload=()=>{this.logger.debug("DescopeUI was loaded"),e(globalThis.DescopeUI)},setTimeout((()=>{globalThis.DescopeUI&&e(globalThis.DescopeUI)}))}))}))},p})),Vt="content-root",Jt="root",Zt=c((e=>class extends e{constructor(...e){var t,n;super(...e),this.attachShadow({mode:"open"}).innerHTML=`\n\n <style>\n #${Jt}, #${Vt} {\n height: 100%;\n }\n </style>\n <div id="${Jt}">\n <div id="${Vt}"></div>\n </div>\n `,this.contentRootElement=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById(Vt),this.rootElement=null===(n=this.shadowRoot)||void 0===n?void 0:n.getElementById(Jt)}})),Yt="descope-modal",Xt=c((e=>{var t,n;const o=d(Nt,Zt,Kt)(e);return n=class extends o{constructor(){super(...arguments),t.set(this,(()=>{const e=this.loadDescopeUiComponents.bind(this);return class extends P{setContent(t){e(t),super.setContent(t)}}})())}createModal(e){const n=((e={})=>{const t=document.createElement(Yt);return Object.keys(e).forEach((n=>{t.setAttribute(n,e[n])})),t})(Object.assign(Object.assign({},{}),e));return this.rootElement.append(n),new(r(this,t,"f"))(n,{logger:this.logger})}async init(){var e;this.loadDescopeUiComponents([Yt]),await(null===(e=super.init)||void 0===e?void 0:e.call(this))}},t=new WeakMap,n})),Qt="descope-notification",en=c((e=>{var t,n;const o=d(Nt,Zt,Kt)(e);return n=class extends o{constructor(){super(...arguments),t.set(this,(()=>{const e=this.loadDescopeUiComponents.bind(this);return class extends S{setContent(t){const n="string"==typeof t?i(t):t;e(n),super.setContent(n)}}})())}createNotification(e){const n=((e={})=>{const t=document.createElement(Qt);return Object.keys(e).forEach((n=>{t.setAttribute(n,e[n])})),t})(Object.assign(Object.assign({},{}),e));return this.rootElement.append(n),new(r(this,t,"f"))(n,{logger:this.logger})}async init(){var e;await(null===(e=super.init)||void 0===e?void 0:e.call(this)),this.loadDescopeUiComponents([Qt])}},t=new WeakMap,n})),tn=(e,t)=>!!t&&"light"!==t&&"dark"!==t&&'Supported theme values are "light", "dark", or leave empty for using the OS theme',nn=c((e=>{var t,n,i,a,s,l,u,c,$;const h=d(Tt({theme:tn}),Lt,Nt,Kt,Dt,Zt)(e);return $=class extends h{constructor(){super(...arguments),t.add(this),n.set(this,void 0)}get theme(){var e,t;const n=this.getAttribute("theme");if("os"===n){return window.matchMedia&&(null===(t=null===(e=window.matchMedia)||void 0===e?void 0:e.call(window,"(prefers-color-scheme: dark)"))||void 0===t?void 0:t.matches)?"dark":"light"}return n||"light"}async init(){var e;await(null===(e=super.init)||void 0===e?void 0:e.call(this)),r(this,t,"m",s).call(this),r(this,t,"m",l).call(this),r(this,t,"m",u).call(this),r(this,t,"m",c).call(this)}},n=new WeakMap,t=new WeakSet,i=async function(){try{const{body:e}=await this.fetchStaticResource("theme.json","json");return e}catch(e){this.logger.error("Cannot fetch theme file","make sure that your projectId & flowId are correct")}},a=function(){return r(this,n,"f")||(o(this,n,r(this,t,"m",i).call(this),"f"),r(this,n,"f").then((e=>this.logger.debug("Fetched theme",e)))),r(this,n,"f")},s=async function(){var e,n;const o=await r(this,t,"a",a);if(!o)return;const d=document.createElement("style");d.innerText=((null===(e=null==o?void 0:o.light)||void 0===e?void 0:e.globals)||"")+((null===(n=null==o?void 0:o.dark)||void 0===n?void 0:n.globals)||""),this.shadowRoot.appendChild(d)},l=async function(){var e,n;const o=Object.assign({},await r(this,t,"a",a));if(!o)return;const d=await this.descopeUi;(null==d?void 0:d.componentsThemeManager)&&(d.componentsThemeManager.themes={light:null===(e=null==o?void 0:o.light)||void 0===e?void 0:e.components,dark:null===(n=null==o?void 0:o.dark)||void 0===n?void 0:n.components})},u=async function(){var e,t;const{projectConfig:n}=await this.config,r=null===(t=null===(e=null==n?void 0:n.cssTemplate)||void 0===e?void 0:e[this.theme])||void 0===t?void 0:t.fonts;r&&Object.values(r).forEach((e=>{e.url&&(this.logger.debug(`Loading font from URL "${e.url}"`),(e=>{const t=document.createElement("link");t.href=e,t.rel="stylesheet",document.head.appendChild(t)})(e.url))}))},c=async function(){this.rootElement.setAttribute("data-theme",this.theme);const e=await this.descopeUi;(null==e?void 0:e.componentsThemeManager)&&(e.componentsThemeManager.currentThemeName=this.theme)},$})),rn=e=>c((t=>{const n=It(e),r=Object.assign(Object.assign({},n.actions),e.asyncActions);return class extends(d(Et)(t)){constructor(...e){super(...e);const t=ft({reducer:n.reducer,middleware:e=>e({thunk:{extraArgument:this},serializableCheck:!1}),devTools:!1}),o=e=>async(...n)=>{const r=await t.dispatch(e(...n));try{Ot(r)}catch(e){this.logger.error(e.message,r.type,e.stack)}return r},d=Object.keys(r).reduce(((e,t)=>(e[t]=o(r[t]),e)),{});this.actions=d,this.subscribe=(e,n=(e=>e))=>t.subscribe((()=>e(n(t.getState()))))}}})),on=c((e=>class extends(Et(e)){validateForm(e){return this.getFormInputs(e).every((e=>{var t,n;return null===(t=e.reportValidity)||void 0===t||t.call(e),null===(n=e.checkValidity)||void 0===n?void 0:n.call(e)}))}getFormInputs(e){return e?Array.from(e.querySelectorAll("[name]")):(this.logger.debug("cannot get form inputs, no root element was received"),[])}getFormData(e){return this.getFormInputs(e).reduce(((e,t)=>Object.assign(e,{[t.getAttribute("name")]:t.value})),{})}setFormData(e,t){this.getFormInputs(e).forEach((e=>{t.hasOwnProperty(e.getAttribute("name"))&&(e.value=t[e.getAttribute("name")])}))}resetFormData(e){this.getFormInputs(e).forEach((e=>{e.value=""}))}getFormFieldNames(e){return this.getFormInputs(e).map((e=>e.name))}disableFormField(e,t){var n;null===(n=this.getFormInputs(e).find((e=>e.name===t)))||void 0===n||n.setAttribute("disabled","true")}removeFormField(e,t){var n;null===(n=this.getFormInputs(e).find((e=>e.name===t)))||void 0===n||n.remove()}})),dn=(e,t,n,r={})=>{var o,d,i,a;return[Math.min(Math.max(t,("all"===r.left?e.offsetWidth:null!==(o=r.left)&&void 0!==o?o:0)-e.offsetWidth),window.innerWidth-("all"===r.right?e.offsetWidth:null!==(d=r.right)&&void 0!==d?d:0)),Math.min(Math.max(n,("all"===r.top?e.offsetHeight:null!==(i=r.top)&&void 0!==i?i:0)-e.offsetHeight),window.innerHeight-("all"===r.bottom?e.offsetHeight:null!==(a=r.bottom)&&void 0!==a?a:0))]};var an,sn,ln,un,cn,$n,hn,fn,pn,gn;const vn=document.createElement("template");vn.innerHTML=`\n<style>\n .debugger {\n width: 300px;\n height: 200px;\n background-color: #FAFAFA;\n position: fixed;\n font-family: "Helvetica Neue", sans-serif;\n box-shadow: rgba(0, 0, 0, 0.1) 0px 5px 10px;\n border-radius: 8px;\n overflow: hidden;\n border: 1px solid lightgrey;\n pointer-events: initial;\n display: flex;\n flex-direction: column;\n min-width: 200px;\n max-width: 600px;\n max-height: calc(100% - 64px);\n min-height: 200px;\n resize: both;\n }\n\n .header {\n padding: 8px 16px;\n display: flex;\n align-items: center;\n background-color: #EEEEEE;\n cursor: move;\n border-bottom: 1px solid #e0e0e0;\n }\n\n .content {\n font-size: 14px;\n flex-grow: 1;\n overflow: auto;\n }\n\n .msg {\n border-bottom: 1px solid lightgrey;\n padding: 8px 16px;\n display: flex;\n gap: 5px;\n background-color: #FAFAFA;\n }\n\n .msg.collapsible {\n cursor: pointer;\n }\n\n .empty-state {\n padding: 8px 16px;\n background-color: #FAFAFA;\n }\n\n\n .msg.collapsible:not(.collapsed) {\n background-color: #F5F5F5;\n }\n\n .msg_title {\n padding-bottom: 5px;\n display: flex;\n gap: 8px;\n font-weight: 500;\n }\n\n .msg svg {\n padding: 1px;\n flex-shrink: 0;\n margin-top: -2px;\n }\n\n .msg_content {\n overflow: hidden;\n flex-grow: 1;\n margin-right:5px;\n }\n\n .msg_desc {\n color: #646464;\n cursor: initial;\n word-wrap: break-word;\n }\n\n .msg.collapsed .msg_desc {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .msg.collapsible.collapsed .chevron {\n transform: rotate(-45deg) translateX(-2px);\n }\n\n .msg.collapsible .chevron {\n content: "";\n width:6px;\n height:6px;\n border-bottom: 2px solid grey;\n border-right: 2px solid grey;\n transform: rotate(45deg) translateX(-1px);\n margin: 5px;\n flex-shrink:0;\n }\n</style>\n\n<div style="top:32px; left:${window.innerWidth-300-32}px;" class="debugger">\n <div class="header">\n <span>Debugger messages</span>\n </div>\n <div class="content">\n <div class="empty-state">\n No errors detected 👀\n </div>\n </div>\n</div>\n`;class mn extends HTMLElement{constructor(){var e;super(),an.add(this),sn.set(this,new m({messages:[]})),ln.set(this,void 0),un.set(this,void 0),cn.set(this,void 0),$n.set(this,{resize:r(this,an,"m",gn).bind(this)}),this.attachShadow({mode:"open"}),null===(e=this.shadowRoot)||void 0===e||e.appendChild(vn.content.cloneNode(!0)),o(this,ln,this.shadowRoot.querySelector(".debugger"),"f"),o(this,un,r(this,ln,"f").querySelector(".content"),"f"),o(this,cn,r(this,ln,"f").querySelector(".header"),"f")}updateData(e){r(this,sn,"f").update((t=>({messages:t.messages.concat(e)})))}connectedCallback(){var e;((e,t,n)=>{let r=0,o=0,d=0,i=0;function a(t){t.preventDefault(),r=d-t.clientX,o=i-t.clientY,d=t.clientX,i=t.clientY;const[a,s]=dn(e,e.offsetLeft-r,e.offsetTop-o,n);e.style.top=`${s}px`,e.style.left=`${a}px`}function s(){document.onmouseup=null,document.onmousemove=null}function l(e){e.preventDefault(),d=e.clientX,i=e.clientY,document.onmouseup=s,document.onmousemove=a}t?t.onmousedown=l:e.onmousedown=l})(r(this,ln,"f"),r(this,cn,"f"),{top:"all",bottom:100,left:100,right:100}),window.addEventListener("resize",r(this,$n,"f").resize),(e=r(this,ln,"f")).onmousemove=t=>{var n;const r=t.target;(r.w&&r.w!==r.offsetWidth||r.h&&r.h!==r.offsetHeight)&&(null===(n=e.onresize)||void 0===n||n.call(e,t)),r.w=r.offsetWidth,r.h=r.offsetHeight},r(this,ln,"f").onresize=r(this,an,"m",pn).bind(this),r(this,sn,"f").subscribe(r(this,an,"m",hn).bind(this))}disconnectedCallback(){r(this,sn,"f").unsubscribeAll(),window.removeEventListener("resize",r(this,$n,"f").resize)}}sn=new WeakMap,ln=new WeakMap,un=new WeakMap,cn=new WeakMap,$n=new WeakMap,an=new WeakSet,hn=function(e){r(this,an,"m",fn).call(this,e),r(this,an,"m",pn).call(this)},fn=function(e){r(this,un,"f").innerHTML=e.messages.map((e=>`\n <div class="msg">\n <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M5.99984 13.167L8.99984 10.167L11.9998 13.167L13.1665 12.0003L10.1665 9.00033L13.1665 6.00033L11.9998 4.83366L8.99984 7.83366L5.99984 4.83366L4.83317 6.00033L7.83317 9.00033L4.83317 12.0003L5.99984 13.167ZM8.99984 17.3337C7.84706 17.3337 6.76373 17.1148 5.74984 16.677C4.73595 16.2398 3.854 15.6462 3.104 14.8962C2.354 14.1462 1.76039 13.2642 1.32317 12.2503C0.885393 11.2364 0.666504 10.1531 0.666504 9.00033C0.666504 7.84755 0.885393 6.76421 1.32317 5.75033C1.76039 4.73644 2.354 3.85449 3.104 3.10449C3.854 2.35449 4.73595 1.7606 5.74984 1.32283C6.76373 0.885603 7.84706 0.666992 8.99984 0.666992C10.1526 0.666992 11.2359 0.885603 12.2498 1.32283C13.2637 1.7606 14.1457 2.35449 14.8957 3.10449C15.6457 3.85449 16.2393 4.73644 16.6765 5.75033C17.1143 6.76421 17.3332 7.84755 17.3332 9.00033C17.3332 10.1531 17.1143 11.2364 16.6765 12.2503C16.2393 13.2642 15.6457 14.1462 14.8957 14.8962C14.1457 15.6462 13.2637 16.2398 12.2498 16.677C11.2359 17.1148 10.1526 17.3337 8.99984 17.3337ZM8.99984 15.667C10.8609 15.667 12.4373 15.0212 13.729 13.7295C15.0207 12.4378 15.6665 10.8614 15.6665 9.00033C15.6665 7.13921 15.0207 5.56283 13.729 4.27116C12.4373 2.97949 10.8609 2.33366 8.99984 2.33366C7.13873 2.33366 5.56234 2.97949 4.27067 4.27116C2.979 5.56283 2.33317 7.13921 2.33317 9.00033C2.33317 10.8614 2.979 12.4378 4.27067 13.7295C5.56234 15.0212 7.13873 15.667 8.99984 15.667Z" fill="#ED404A"/>\n</svg>\n\n <div class="msg_content">\n <div class="msg_title">\n ${e.title}\n </div>\n <div class="msg_desc">\n ${e.description||""}\n </div>\n </div>\n <div class="chevron"></div>\n </div>\n `)).join("")},pn=function(){r(this,un,"f").querySelectorAll(".msg").forEach((e=>{const t=e,n=t.querySelector(".msg_desc"),r=n.scrollWidth>n.clientWidth,o=n.clientHeight>20;r||o?(t.classList.add("collapsible"),t.onclick=e=>{e.target.classList.contains("msg_desc")||t.classList.toggle("collapsed")}):(t.classList.remove("collapsible"),t.onclick=null)}))},gn=function(){const[e,t]=dn(r(this,ln,"f"),Number.parseInt(r(this,ln,"f").style.left,10),Number.parseInt(r(this,ln,"f").style.top,10),{top:"all",bottom:100,left:100,right:100});r(this,ln,"f").style.top=`${t}px`,r(this,ln,"f").style.left=`${e}px`},customElements.get("descope-debugger")||customElements.define("descope-debugger",mn);var yn=Object.freeze({__proto__:null});const bn={enabled:"active",disabled:"disabled",invited:"invited"},wn=e=>e.tenantRoles.data,On=e=>e.selectedUsersLoginIds,Cn=e=>e.notifications,kn=e=>e.customAttributes.data,Pn=Ge((e=>e.usersList.data),(e=>e.map((e=>Object.assign(Object.assign({},e),{status:bn[e.status]||e.status,roles:e.roleNames}))))),In=Ge(On,Pn,((e,t)=>t.filter((t=>e.includes(t.loginIds))))),Sn=Ge(In,(e=>e.map((e=>e.userId)))),xn=Ge(In,(e=>e.map((e=>e.status)))),jn=Ge(In,(e=>e.every((e=>e.editable))));Ge(On,(e=>!!e.length));const En=Ge(On,(e=>1===e.length)),Rn=Ge(On,(e=>{var t;return null===(t=null==e?void 0:e[0])||void 0===t?void 0:t[0]})),Mn=Ge(En,xn,((e,t)=>e&&t.every((e=>e===bn.enabled)))),_n=Ge(xn,(e=>e.every((e=>e===bn.disabled)))),Nn=Ge(In,(e=>1===e.length?e[0].email:`${e.length} users`)),An=Ge(En,_n,jn,((e,t,n)=>e&&t&&n)),Tn=Ge(En,Mn,jn,((e,t,n)=>e&&t&&n)),Un=Ge(En,jn,((e,t)=>e&&t)),Ln=Ge(En,jn,((e,t)=>e&&t)),Dn=Ge(En,jn,((e,t)=>e&&t)),Wn=Ge(jn,(e=>e)),Fn=e=>(...t)=>n=>{n.addCase(e.pending,((e,n)=>{t.forEach((({onPending:t})=>{null==t||t(e,n)}))})),n.addCase(e.fulfilled,((e,n)=>{t.forEach((({onFulfilled:t})=>{null==t||t(e,n)}))})),n.addCase(e.rejected,((e,n)=>{t.forEach((({onRejected:t})=>{null==t||t(e,n)}))}))},Bn=e=>({onFulfilled:t=>{e(t).loading=!1},onPending:t=>{e(t).loading=!0,e(t).error=null},onRejected:(t,n)=>{e(t).loading=!1,e(t).error=n.error}}),qn=({getErrorMsg:e,getSuccessMsg:t})=>({onFulfilled:(e,n)=>{t&&e.notifications.push({type:"success",msg:t(n)})},onRejected:(t,n)=>{e&&t.notifications.push({type:"error",msg:e(n)})}}),Gn=wt("users/create",((e,{extra:{api:t}})=>t.user.create(e))),zn=Fn(Gn)({onFulfilled:(e,t)=>{e.usersList.data.unshift(t.payload)}},Bn((e=>e.createUser)),qn({getSuccessMsg:()=>"User created successfully",getErrorMsg:e=>{var t;return`\n <div>\n <div>Failed to create user</div>\n ${null===(t=e.error)||void 0===t?void 0:t.message}\n </div>`}})),Hn={action:Gn,reducer:zn},Kn=wt("users/delete",((e,{extra:{api:t}})=>t.user.deleteBatch(e))),Vn=Fn(Kn)({onFulfilled:(e,t)=>{e.usersList.data=e.usersList.data.filter((e=>!t.meta.arg.includes(e.userId))),e.selectedUsersLoginIds=[]}},Bn((e=>e.deleteUser)),qn({getSuccessMsg:e=>l(e.meta.arg.length)`${["",e.meta.arg.length]} ${["U","u"]}ser${["","s"]} deleted successfully`,getErrorMsg:e=>l(e.meta.arg.length)`Failed to delete user${["","s"]}`})),Jn={action:Kn,reducer:Vn},Zn=wt("users/setTempPassword",((e,{extra:{api:t}})=>t.user.setTempPassword(e))),Yn=Fn(Zn)(Bn((e=>e.setTempUserPassword)),qn({getSuccessMsg:()=>"Successfully reset user password",getErrorMsg:e=>{var t;return`\n <div>\n <div>Failed to reset user's password</div>\n ${null===(t=e.error)||void 0===t?void 0:t.message}\n </div>`}})),Xn={action:Zn,reducer:Yn},Qn=wt("users/getCustomAttributes",((e,{extra:{api:t}})=>t.user.getCustomAttributes())),er=Fn(Qn)({onFulfilled:(e,t)=>{e.customAttributes.data=t.payload}},Bn((e=>e.customAttributes))),tr={action:Qn,reducer:er},nr=wt("users/search",((e,{extra:{api:t},getState:n})=>{const r=n().searchParams;return t.user.search(Object.assign(Object.assign({},r),e))})),rr=Fn(nr)({onPending:(e,t)=>{e.searchParams=Object.assign(Object.assign({},e.searchParams),t.meta.arg)},onFulfilled:(e,t)=>{e.usersList.data=t.payload}},Bn((e=>e.usersList))),or={action:nr,reducer:rr},dr=wt("tenant/getTenantRoles",((e,{extra:{api:t}})=>t.tenant.getTenantRoles())),ir=Fn(dr)({onFulfilled:(e,t)=>{e.tenantRoles.data=t.payload.roles}},Bn((e=>e.tenantRoles))),ar={action:dr,reducer:ir},sr=wt("users/update",((e,{extra:{api:t}})=>t.user.update(e))),lr=Fn(sr)({onFulfilled:(e,t)=>{const n=e.usersList.data.findIndex((e=>a(e.loginIds,t.payload.loginIds)));-1!==n&&(e.usersList.data[n]=t.payload)}},Bn((e=>e.updateUser)),qn({getSuccessMsg:()=>"User updated successfully",getErrorMsg:e=>{var t;return`\n <div>\n <div>Failed to update user</div>\n ${null===(t=e.error)||void 0===t?void 0:t.message}\n </div>`}})),ur={action:sr,reducer:lr},cr=wt("users/enable",((e,{extra:{api:t}})=>t.user.enable(e))),$r=Fn(cr)({onFulfilled:(e,t)=>{const n=e.usersList.data.findIndex((e=>a(e.loginIds,t.payload.user.loginIds)));-1!==n&&(e.usersList.data[n]=t.payload.user)}},Bn((e=>e.enableUser)),qn({getSuccessMsg:()=>"User enabled successfully",getErrorMsg:e=>{var t;return`\n <div>\n <div>Failed to enable user</div>\n ${null===(t=e.error)||void 0===t?void 0:t.message}\n </div>`}})),hr={action:cr,reducer:$r},fr=wt("users/disable",((e,{extra:{api:t}})=>t.user.disable(e))),pr=Fn(fr)({onFulfilled:(e,t)=>{const n=e.usersList.data.findIndex((e=>a(e.loginIds,t.payload.user.loginIds)));-1!==n&&(e.usersList.data[n]=t.payload.user)}},Bn((e=>e.disableUser)),qn({getSuccessMsg:()=>"User disabled successfully",getErrorMsg:e=>{var t;return`\n <div>\n <div>Failed to disable user</div>\n ${null===(t=e.error)||void 0===t?void 0:t.message}\n </div>`}})),gr={action:fr,reducer:pr},vr=wt("users/removePasskey",((e,{extra:{api:t}})=>t.user.removePasskey(e))),mr={action:vr,reducer:Fn(vr)(Bn((e=>e.removePasskey)),qn({getSuccessMsg:()=>"Successfully removed user's passkey",getErrorMsg:e=>{var t;return`\n <div>\n <div>Failed to remove user's passkey</div>\n ${null===(t=e.error)||void 0===t?void 0:t.message}\n </div>`}}))},yr={usersList:{data:[],loading:!1,error:null},createUser:{loading:!1,error:null},updateUser:{loading:!1,error:null},deleteUser:{loading:!1,error:null},enableUser:{loading:!1,error:null},disableUser:{loading:!1,error:null},removePasskey:{loading:!1,error:null},setTempUserPassword:{loading:!1,error:null},customAttributes:{loading:!1,error:null,data:[]},tenantRoles:{loading:!1,error:null,data:[]},searchParams:{text:"",sort:[]},selectedUsersLoginIds:[],notifications:[]};function br(e){this.message=e}br.prototype=new Error,br.prototype.name="InvalidCharacterError";var wr="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new br("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,o=0,d=0,i="";r=t.charAt(d++);~r&&(n=o%4?64*n+r:r,o++%4)?i+=String.fromCharCode(255&n>>(-2*o&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return i};function Or(e){this.message=e}function Cr(e,t){if("string"!=typeof e)throw new Or("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(wr(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return wr(t)}}(e.split(".")[n]))}catch(e){throw new Or("Invalid token specified: "+e.message)}}Or.prototype=new Error,Or.prototype.name="InvalidTokenError";var kr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Pr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ir="__lodash_hash_undefined__",Sr=1/0,xr="[object Function]",jr="[object GeneratorFunction]",Er="[object Symbol]",Rr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mr=/^\w*$/,_r=/^\./,Nr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ar=/\\(\\)?/g,Tr=/^\[object .+?Constructor\]$/,Ur="object"==typeof kr&&kr&&kr.Object===Object&&kr,Lr="object"==typeof self&&self&&self.Object===Object&&self,Dr=Ur||Lr||Function("return this")();var Wr,Fr=Array.prototype,Br=Function.prototype,qr=Object.prototype,Gr=Dr["__core-js_shared__"],zr=(Wr=/[^.]+$/.exec(Gr&&Gr.keys&&Gr.keys.IE_PROTO||""))?"Symbol(src)_1."+Wr:"",Hr=Br.toString,Kr=qr.hasOwnProperty,Vr=qr.toString,Jr=RegExp("^"+Hr.call(Kr).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Zr=Dr.Symbol,Yr=Fr.splice,Xr=uo(Dr,"Map"),Qr=uo(Object,"create"),eo=Zr?Zr.prototype:void 0,to=eo?eo.toString:void 0;function no(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ro(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function oo(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function io(e,t){for(var n,r,o=e.length;o--;)if((n=e[o][0])===(r=t)||n!=n&&r!=r)return o;return-1}function ao(e,t){var n;t=function(e,t){if(fo(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||go(e))return!0;return Mr.test(e)||!Rr.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:fo(n=t)?n:co(n);for(var r=0,o=t.length;null!=e&&r<o;)e=e[$o(t[r++])];return r&&r==o?e:void 0}function so(e){if(!po(e)||(t=e,zr&&zr in t))return!1;var t,n=function(e){var t=po(e)?Vr.call(e):"";return t==xr||t==jr}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?Jr:Tr;return n.test(function(e){if(null!=e){try{return Hr.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function lo(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function uo(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return so(n)?n:void 0}no.prototype.clear=function(){this.__data__=Qr?Qr(null):{}},no.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},no.prototype.get=function(e){var t=this.__data__;if(Qr){var n=t[e];return n===Ir?void 0:n}return Kr.call(t,e)?t[e]:void 0},no.prototype.has=function(e){var t=this.__data__;return Qr?void 0!==t[e]:Kr.call(t,e)},no.prototype.set=function(e,t){return this.__data__[e]=Qr&&void 0===t?Ir:t,this},ro.prototype.clear=function(){this.__data__=[]},ro.prototype.delete=function(e){var t=this.__data__,n=io(t,e);return!(n<0)&&(n==t.length-1?t.pop():Yr.call(t,n,1),!0)},ro.prototype.get=function(e){var t=this.__data__,n=io(t,e);return n<0?void 0:t[n][1]},ro.prototype.has=function(e){return io(this.__data__,e)>-1},ro.prototype.set=function(e,t){var n=this.__data__,r=io(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},oo.prototype.clear=function(){this.__data__={hash:new no,map:new(Xr||ro),string:new no}},oo.prototype.delete=function(e){return lo(this,e).delete(e)},oo.prototype.get=function(e){return lo(this,e).get(e)},oo.prototype.has=function(e){return lo(this,e).has(e)},oo.prototype.set=function(e,t){return lo(this,e).set(e,t),this};var co=ho((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(go(e))return to?to.call(e):"";var t=e+"";return"0"==t&&1/e==-Sr?"-0":t}(t);var n=[];return _r.test(e)&&n.push(""),e.replace(Nr,(function(e,t,r,o){n.push(r?o.replace(Ar,"$1"):t||e)})),n}));function $o(e){if("string"==typeof e||go(e))return e;var t=e+"";return"0"==t&&1/e==-Sr?"-0":t}function ho(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],d=n.cache;if(d.has(o))return d.get(o);var i=e.apply(this,r);return n.cache=d.set(o,i),i};return n.cache=new(ho.Cache||oo),n}ho.Cache=oo;var fo=Array.isArray;function po(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function go(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&Vr.call(e)==Er}var vo=function(e,t,n){var r=null==e?void 0:ao(e,t);return void 0===r?n:r},mo=Pr(vo),yo="/v1/auth/accesskey/exchange",bo="/v1/auth/otp/verify",wo="/v1/auth/otp/signin",Oo="/v1/auth/otp/signup",Co={email:"/v1/auth/otp/update/email",phone:"/v1/auth/otp/update/phone"},ko="/v1/auth/otp/signup-in",Po="/v1/auth/magiclink/verify",Io="/v1/auth/magiclink/signin",So="/v1/auth/magiclink/signup",xo={email:"/v1/auth/magiclink/update/email",phone:"/v1/auth/magiclink/update/phone"},jo="/v1/auth/magiclink/signup-in",Eo="/v1/auth/enchantedlink/verify",Ro="/v1/auth/enchantedlink/signin",Mo="/v1/auth/enchantedlink/signup",_o="/v1/auth/enchantedlink/pending-session",No={email:"/v1/auth/enchantedlink/update/email"},Ao="/v1/auth/enchantedlink/signup-in",To="/v1/auth/oauth/authorize",Uo="/v1/auth/oauth/exchange",Lo="v1/auth/oauth/native/start",Do="v1/auth/oauth/native/finish",Wo="/v1/auth/saml/authorize",Fo="/v1/auth/saml/exchange",Bo="/v1/auth/totp/verify",qo="/v1/auth/totp/signup",Go="/v1/auth/totp/update",zo={start:"/v1/auth/webauthn/signup/start",finish:"/v1/auth/webauthn/signup/finish"},Ho={start:"/v1/auth/webauthn/signin/start",finish:"/v1/auth/webauthn/signin/finish"},Ko={start:"/v1/auth/webauthn/signup-in/start"},Vo={start:"v1/auth/webauthn/update/start",finish:"/v1/auth/webauthn/update/finish"},Jo="/v1/auth/password/signup",Zo="/v1/auth/password/signin",Yo="/v1/auth/password/reset",Xo="/v1/auth/password/update",Qo="/v1/auth/password/replace",ed="/v1/auth/password/policy",td="/v1/auth/refresh",nd="/v1/auth/tenant/select",rd="/v1/auth/logout",od="/v1/auth/logoutall",dd="/v1/auth/me",id="/v1/auth/me/history",ad="/v1/flow/start",sd="/v1/flow/next";const ld="<region>",ud=`https://api.${ld}descope.com`,cd=6e5,$d=()=>{const e={};return{headers(t){const n="function"==typeof t.entries?Object.fromEntries(t.entries()):t;return e.Headers=JSON.stringify(n),this},body(t){return e.Body=t,this},url(t){return e.Url=t.toString(),this},method(t){return e.Method=t,this},title(t){return e.Title=t,this},status(t){return e.Status=t,this},build:()=>Object.keys(e).flatMap((t=>e[t]?[`${"Title"!==t?`${t}: `:""}${e[t]}`]:[])).join("\n")}};var hd;!function(e){e.get="GET",e.delete="DELETE",e.post="POST",e.put="PUT"}(hd||(hd={}));const fd=(...e)=>new Headers(e.reduce(((e,t)=>{const n=(e=>Array.isArray(e)?e:e instanceof Headers?Array.from(e.entries()):e?Object.entries(e):[])(t);return n.reduce(((t,[n,r])=>(e[n]=r,e)),e),e}),{})),pd=e=>void 0===e?void 0:JSON.stringify(e),gd=(e,t="")=>{let n=e;return t&&(n=n+":"+t),{Authorization:`Bearer ${n}`}},vd=({baseUrl:e,projectId:t,baseConfig:n,logger:r,hooks:o,cookiePolicy:d,fetch:i})=>{const a=((e,t)=>{const n=(e=>async(...t)=>{const n=await e(...t),r=await n.text();return n.text=()=>Promise.resolve(r),n.json=()=>Promise.resolve(JSON.parse(r)),n.clone=()=>n,n})(t||fetch);return n||null==e||e.warn("Fetch is not defined, you will not be able to send http requests, if you are running in a test, make sure fetch is defined globally"),e?async(...t)=>{if(!n)throw Error("Cannot send http request, fetch is not defined, if you are running in a test, make sure fetch is defined globally");e.log((e=>$d().title("Request").url(e[0]).method(e[1].method).headers(e[1].headers).body(e[1].body).build())(t));const r=await n(...t);return e[r.ok?"log":"error"](await(async e=>{const t=await e.text();return $d().title("Response").url(e.url.toString()).status(`${e.status} ${e.statusText}`).headers(e.headers).body(t).build()})(r)),r}:n})(r,i),s=async r=>{const i=(null==o?void 0:o.beforeRequest)?o.beforeRequest(r):r,{path:s,body:l,headers:u,queryParams:c,method:$,token:h}=i,f={headers:fd(gd(t,h),{"x-descope-sdk-name":"core-js","x-descope-sdk-version":"2.11.3"},(null==n?void 0:n.baseHeaders)||{},u),method:$,body:pd(l)};null!==d&&(f.credentials=d||"include");const p=await a((({path:e,baseUrl:t,queryParams:n,projectId:r})=>{const o=r.slice(1,-27);t=t.replace(ld,o?o+".":"");const d=new URL(e,t);return n&&(d.search=new URLSearchParams(n).toString()),d})({path:s,baseUrl:e,queryParams:c,projectId:t}),f);return(null==o?void 0:o.afterRequest)&&await o.afterRequest(r,null==p?void 0:p.clone()),p};return{get:(e,{headers:t,queryParams:n,token:r}={})=>s({path:e,headers:t,queryParams:n,body:void 0,method:hd.get,token:r}),post:(e,t,{headers:n,queryParams:r,token:o}={})=>s({path:e,headers:n,queryParams:r,body:t,method:hd.post,token:o}),put:(e,t,{headers:n,queryParams:r,token:o}={})=>s({path:e,headers:n,queryParams:r,body:t,method:hd.put,token:o}),delete:(e,{headers:t,queryParams:n,token:r}={})=>s({path:e,headers:t,queryParams:n,body:void 0,method:hd.delete,token:r}),hooks:o}};var md=429;function yd(e,t,n){var r;let o=bd(e);t&&(o=null===(r=null==o?void 0:o.tenants)||void 0===r?void 0:r[t]);const d=null==o?void 0:o[n];return Array.isArray(d)?d:[]}function bd(e){if("string"!=typeof e||!e)throw new Error("Invalid token provided");return Cr(e)}function wd(e){const{exp:t}=bd(e);return(new Date).getTime()/1e3>t}function Od(e){let t=bd(e);const n=Object.keys(null==t?void 0:t.tenants);return Array.isArray(n)?n:[]}function Cd(e,t){return yd(e,t,"permissions")}function kd(e,t){return yd(e,t,"roles")}const Pd=(...e)=>e.join("/").replace(/\/{2,}/g,"/");async function Id(e,t){var n;const r=await e,o={code:r.status,ok:r.ok,response:r},d=await r.clone().json();return r.ok?o.data=t?t(d):d:(o.error=d,r.status===md&&Object.assign(o.error,{retryAfter:Number.parseInt(null===(n=r.headers)||void 0===n?void 0:n.get("retry-after"))||0})),o}const Sd=(e,t)=>(n=t)=>t=>!e(t)&&n.replace("{val}",t),xd=(...e)=>({validate:t=>(e.forEach((e=>{const n=e(t);if(n)throw new Error(n)})),!0)}),jd=e=>t=>e.test(t),Ed=jd(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/),Rd=jd(/^\+[1-9]{1}[0-9]{3,14}$/),Md=Sd(Ed,'"{val}" is not a valid email'),_d=Sd(Rd,'"{val}" is not a valid phone number'),Nd=Sd((1,e=>e.length>=1),"Minimum length is 1");const Ad=Sd((e=>"string"==typeof e),"Input is not a string"),Td=Sd((e=>void 0===e),"Input is defined"),Ud=(Ld=[Ad(),Td()],"Input is not a string or undefined",(e="Input is not a string or undefined")=>t=>{const n=Ld.filter((e=>e(t)));return!(n.length<Ld.length)&&(e?e.replace("{val}",t):n.join(" OR "))});var Ld;const Dd=(...e)=>t=>(...n)=>(e.forEach(((e,t)=>xd(...e).validate(n[t]))),t(...n)),Wd=e=>[Ad(`"${e}" must be a string`),Nd(`"${e}" must not be empty`)],Fd=e=>[Ad(`"${e}" must be a string`),Md()],Bd=e=>[Ad(`"${e}" must be a string`),_d()],qd=Dd(Wd("accessKey")),Gd=e=>({exchange:qd(((t,n)=>Id(e.post(yo,{loginOptions:n},{token:t}))))});var zd,Hd;!function(e){e.sms="sms",e.whatsapp="whatsapp"}(zd||(zd={})),function(e){e.email="email"}(Hd||(Hd={}));const Kd=Object.assign(Object.assign({},zd),Hd);var Vd;!function(e){e.waiting="waiting",e.running="running",e.completed="completed",e.failed="failed"}(Vd||(Vd={}));const Jd=Wd("loginId"),Zd=Dd(Wd("token")),Yd=Dd(Jd),Xd=Dd(Wd("pendingRef")),Qd=Dd(Jd,Fd("email")),ei=e=>({verify:Zd((t=>Id(e.post(Eo,{token:t})))),signIn:Yd(((t,n,r,o)=>Id(e.post(Pd(Ro,Kd.email),{loginId:t,URI:n,loginOptions:r},{token:o})))),signUpOrIn:Yd(((t,n,r)=>Id(e.post(Pd(Ao,Kd.email),{loginId:t,URI:n,loginOptions:r})))),signUp:Yd(((t,n,r,o)=>Id(e.post(Pd(Mo,Kd.email),{loginId:t,URI:n,user:r,loginOptions:o})))),waitForSession:Xd(((t,n)=>new Promise((r=>{const{pollingIntervalMs:o,timeoutMs:d}=(({pollingIntervalMs:e=1e3,timeoutMs:t=6e5}={})=>({pollingIntervalMs:Math.max(e||1e3,1e3),timeoutMs:Math.min(t||cd,cd)}))(n);let i;const a=setInterval((async()=>{const n=await e.post(_o,{pendingRef:t});n.ok&&(clearInterval(a),i&&clearTimeout(i),r(Id(Promise.resolve(n))))}),o);i=setTimeout((()=>{r({error:{errorDescription:`Session polling timeout exceeded: ${d}ms`,errorCode:"0"},ok:!1}),clearInterval(a)}),d)})))),update:{email:Qd(((t,n,r,o,d)=>Id(e.post(No.email,Object.assign({loginId:t,email:n,URI:r},d),{token:o}))))}}),ti=Dd(Wd("flowId")),ni=Dd(Wd("executionId"),Wd("stepId"),Wd("interactionId")),ri=e=>({start:ti(((t,n,r,o,d,i,a)=>Id(e.post(ad,{flowId:t,options:n,conditionInteractionId:r,interactionId:o,version:d,componentsVersion:i,input:a})))),next:ni(((t,n,r,o,d,i)=>Id(e.post(sd,{executionId:t,stepId:n,interactionId:r,version:o,componentsVersion:d,input:i}))))}),oi=Wd("loginId"),di=Dd(Wd("token")),ii=Dd(oi),ai=Dd(oi,Bd("phone")),si=Dd(oi,Fd("email")),li=e=>({verify:di((t=>Id(e.post(Po,{token:t})))),signIn:Object.keys(Kd).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:ii(((t,r,o,d)=>Id(e.post(Pd(Io,n),{loginId:t,URI:r,loginOptions:o},{token:d}))))})),{}),signUp:Object.keys(Kd).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:ii(((t,r,o,d)=>Id(e.post(Pd(So,n),{loginId:t,URI:r,user:o,loginOptions:d}))))})),{}),signUpOrIn:Object.keys(Kd).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:ii(((t,r,o)=>Id(e.post(Pd(jo,n),{loginId:t,URI:r,loginOptions:o}))))})),{}),update:{email:si(((t,n,r,o,d)=>Id(e.post(xo.email,Object.assign({loginId:t,email:n,URI:r},d),{token:o})))),phone:Object.keys(zd).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:ai(((t,r,o,d,i)=>Id(e.post(Pd(xo.phone,n),Object.assign({loginId:t,phone:r,URI:o},i),{token:d}))))})),{})}});var ui;!function(e){e.facebook="facebook",e.github="github",e.google="google",e.microsoft="microsoft",e.gitlab="gitlab",e.apple="apple",e.discord="discord",e.linkedin="linkedin",e.slack="slack"}(ui||(ui={}));const ci=Dd(Wd("code")),$i=e=>({start:Object.assign(((t,n,r,o)=>Id(e.post(To,r||{},{queryParams:Object.assign({provider:t},n&&{redirectURL:n}),token:o}))),Object.keys(ui).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:(t,r,o)=>Id(e.post(To,r||{},{queryParams:Object.assign({provider:n},t&&{redirectURL:t}),token:o}))})),{})),exchange:ci((t=>Id(e.post(Uo,{code:t})))),startNative:(t,n)=>Id(e.post(Lo,{provider:t,loginOptions:n})),finishNative:(t,n,r,o,d)=>Id(e.post(Do,{provider:t,stateId:n,user:r,code:o,idToken:d}))}),hi=Wd("loginId"),fi=Dd(hi,Wd("code")),pi=Dd(hi),gi=Dd(hi,Bd("phone")),vi=Dd(hi,Fd("email")),mi=e=>({verify:Object.keys(Kd).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:fi(((t,r)=>Id(e.post(Pd(bo,n),{code:r,loginId:t}))))})),{}),signIn:Object.keys(Kd).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:pi(((t,r,o)=>Id(e.post(Pd(wo,n),{loginId:t,loginOptions:r},{token:o}))))})),{}),signUp:Object.keys(Kd).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:pi(((t,r,o)=>Id(e.post(Pd(Oo,n),{loginId:t,user:r,loginOptions:o}))))})),{}),signUpOrIn:Object.keys(Kd).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:pi(((t,r)=>Id(e.post(Pd(ko,n),{loginId:t,loginOptions:r}))))})),{}),update:{email:vi(((t,n,r,o)=>Id(e.post(Co.email,Object.assign({loginId:t,email:n},o),{token:r})))),phone:Object.keys(zd).reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:gi(((t,r,o,d)=>Id(e.post(Pd(Co.phone,n),Object.assign({loginId:t,phone:r},d),{token:o}))))})),{})}}),yi=Dd(Wd("tenant")),bi=Dd(Wd("code")),wi=e=>({start:yi(((t,n,r,o)=>Id(e.post(Wo,r||{},{queryParams:{tenant:t,redirectURL:n},token:o})))),exchange:bi((t=>Id(e.post(Fo,{code:t}))))}),Oi=Wd("loginId"),Ci=Dd(Oi,Wd("code")),ki=Dd(Oi),Pi=Dd(Oi),Ii=e=>({signUp:ki(((t,n)=>Id(e.post(qo,{loginId:t,user:n})))),verify:Ci(((t,n,r,o)=>Id(e.post(Bo,{loginId:t,code:n,loginOptions:r},{token:o})))),update:Pi(((t,n)=>Id(e.post(Go,{loginId:t},{token:n}))))}),Si=Wd("loginId"),xi=Wd("newPassword"),ji=Dd(Si,Wd("password")),Ei=Dd(Si),Ri=Dd(Si,xi),Mi=Dd(Si,Wd("oldPassword"),xi),_i=e=>({signUp:ji(((t,n,r)=>Id(e.post(Jo,{loginId:t,password:n,user:r})))),signIn:ji(((t,n)=>Id(e.post(Zo,{loginId:t,password:n})))),sendReset:Ei(((t,n,r)=>Id(e.post(Yo,{loginId:t,redirectUrl:n,templateOptions:r})))),update:Ri(((t,n,r)=>Id(e.post(Xo,{loginId:t,newPassword:n},{token:r})))),replace:Mi(((t,n,r)=>Id(e.post(Qo,{loginId:t,oldPassword:n,newPassword:r})))),policy:()=>Id(e.get(ed))}),Ni=[Ad('"loginId" must be a string')],Ai=Wd("loginId"),Ti=Wd("origin"),Ui=Dd(Ai,Ti,Wd("name")),Li=Dd(Ai,Ti),Di=Dd(Ni,Ti),Wi=Dd(Ai,Ti,Wd("token")),Fi=Dd(Wd("transactionId"),Wd("response")),Bi=e=>({signUp:{start:Ui(((t,n,r)=>Id(e.post(zo.start,{user:{loginId:t,name:r},origin:n})))),finish:Fi(((t,n)=>Id(e.post(zo.finish,{transactionId:t,response:n}))))},signIn:{start:Di(((t,n,r,o)=>Id(e.post(Ho.start,{loginId:t,origin:n,loginOptions:r},{token:o})))),finish:Fi(((t,n)=>Id(e.post(Ho.finish,{transactionId:t,response:n}))))},signUpOrIn:{start:Li(((t,n)=>Id(e.post(Ko.start,{loginId:t,origin:n}))))},update:{start:Wi(((t,n,r)=>Id(e.post(Vo.start,{loginId:t,origin:n},{token:r})))),finish:Fi(((t,n)=>Id(e.post(Vo.finish,{transactionId:t,response:n}))))}}),qi=Dd(Wd("token")),Gi=Dd([Ud('"token" must be string or undefined')]);var zi,Hi=Dd([("projectId",zi=Wd("projectId"),Sd(((e,t)=>n=>xd(...t).validate(mo(n,e)))("projectId",zi))())])((e=>(({projectId:e,logger:t,baseUrl:n,hooks:r,cookiePolicy:o,baseHeaders:d={},fetch:i})=>{return a=vd({baseUrl:n||ud,projectId:e,logger:t,hooks:r,cookiePolicy:o,baseConfig:{baseHeaders:d},fetch:i}),{accessKey:Gd(a),otp:mi(a),magicLink:li(a),enchantedLink:ei(a),oauth:$i(a),saml:wi(a),totp:Ii(a),webauthn:Bi(a),password:_i(a),flow:ri(a),refresh:Gi((e=>Id(a.post(td,{},{token:e})))),selectTenant:Dd([Ad("tenantId")],[Ud('"token" must be string or undefined')])(((e,t)=>Id(a.post(nd,{tenant:e},{token:t})))),logout:Gi((e=>Id(a.post(rd,{},{token:e})))),logoutAll:Gi((e=>Id(a.post(od,{},{token:e})))),me:Gi((e=>Id(a.get(dd,{token:e})))),history:Gi((e=>Id(a.get(id,{token:e})))),isJwtExpired:qi(wd),getTenants:qi(Od),getJwtPermissions:qi(Cd),getJwtRoles:qi(kd),httpClient:a};var a})(Object.assign(Object.assign({},e),{hooks:{beforeRequest:t=>{var n;const r=[].concat((null===(n=e.hooks)||void 0===n?void 0:n.beforeRequest)||[]);return null==r?void 0:r.reduce(((e,t)=>t(e)),t)},afterRequest:async(t,n)=>{var r;const o=[].concat((null===(r=e.hooks)||void 0===r?void 0:r.afterRequest)||[]);(await Promise.allSettled(null==o?void 0:o.map((e=>e(t,null==n?void 0:n.clone()))))).forEach((t=>{var n;return"rejected"===t.status&&(null===(n=e.logger)||void 0===n?void 0:n.error(t.reason))}))}}}))));const Ki=(e,t,n)=>(t.forEach((t=>{const r=t.split(".");let o=r.shift(),d=e;for(;r.length>0;){if(d=d[o],!o||!d)throw Error(`Invalid path "${t}", "${o}" is missing or has no value`);o=r.shift()}if("function"!=typeof d[o])throw Error(`"${t}" is not a function`);const i=d[o];d[o]=n(i)})),e);var Vi=Object.assign(Hi,{DeliveryMethods:Kd});var Ji={default:"endpoint"},Zi="Blocked by CSP",Yi="9319";function Xi(e,t){var n=[];return function(e,t){var n,r,o=(r=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,d=t.length;o<d;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([],e,!0),{current:function(){return r[0]},postpone:function(){var e=r.shift();void 0!==e&&r.push(e)},exclude:function(){r.shift()}}),d=(100,3e3,n=0,function(){return Math.random()*Math.min(3e3,100*Math.pow(2,n++))}),i=o.current();if(void 0===i)return Promise.reject(new TypeError("The list of script URL patterns is empty"));var a=function(e,n){return t(e).catch((function(e){if(n+1>=5)throw e;!function(e){if(!(e instanceof Error))return!1;var t=e.message;return t===Zi||t===Yi}(e)?o.postpone():o.exclude();var t,r=o.current();if(void 0===r)throw e;return(t=d(),new Promise((function(e){return setTimeout(e,t)}))).then((function(){return a(r,n+1)}))}))};return a(i,0)}(e,(function(e){var r=new Date,o=function(t){return n.push({url:e,startedAt:r,finishedAt:new Date,error:t})},d=t(e);return d.then((function(){return o()}),o),d})).then((function(e){return[e,{attempts:n}]}))}var Qi="https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js",ea=Qi,ta="Failed to load the JS script of the agent";function na(n){var r;n.scriptUrlPattern;var o=n.token,d=n.apiKey,i=void 0===d?o:d,a=t(n,["scriptUrlPattern","token","apiKey"]),s=null!==(r=function(e,t){return function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(e,t)?e[t]:void 0}(n,"scriptUrlPattern"))&&void 0!==r?r:Qi;return Promise.resolve().then((function(){if(!i||"string"!=typeof i)throw new Error("API key required");var e=function(e,t){return(Array.isArray(e)?e:[e]).map((function(e){return function(e,t){var n=encodeURIComponent;return e.replace(/<[^<>]+>/g,(function(e){return"<version>"===e?"3":"<apiKey>"===e?n(t):"<loaderVersion>"===e?n("3.8.5"):e}))}(String(e),t)}))}(s,i);return Xi(e,ra).catch(da)})).then((function(t){var n=t[0],r=t[1];return n.load(e(e({},a),{ldi:r}))}))}function ra(e){return function(e,t,n,r){var o,d=document,i="securitypolicyviolation",a=function(t){var n=new URL(e,location.href),r=t.blockedURI;r!==n.href&&r!==n.protocol.slice(0,-1)&&r!==n.origin||(o=t,s())};d.addEventListener(i,a);var s=function(){return d.removeEventListener(i,a)};return Promise.resolve().then(t).then((function(e){return s(),e}),(function(e){return new Promise((function(e){return setTimeout(e)})).then((function(){if(s(),o)return function(){throw new Error(Zi)}();throw e}))}))}(e,(function(){return function(e){return new Promise((function(t,n){var r=document.createElement("script"),o=function(){var e;return null===(e=r.parentNode)||void 0===e?void 0:e.removeChild(r)},d=document.head||document.getElementsByTagName("head")[0];r.onload=function(){o(),t()},r.onerror=function(){o(),n(new Error(ta))},r.async=!0,r.src=e,d.appendChild(r)}))}(e)})).then(oa)}function oa(){var e=window,t="__fpjs_p_l_b",n=e[t];if(function(e,t){var n,r=null===(n=Object.getOwnPropertyDescriptor)||void 0===n?void 0:n.call(Object,e,t);(null==r?void 0:r.configurable)?delete e[t]:r&&!r.writable||(e[t]=void 0)}(e,t),"function"!=typeof(null==n?void 0:n.load))throw new Error(Yi);return n}function da(e){throw e instanceof Error&&e.message===Yi?new Error(ta):e}
6
+ /*! js-cookie v3.0.5 | MIT */function ia(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var aa=function e(t,n){function r(e,r,o){if("undefined"!=typeof document){"number"==typeof(o=ia({},n,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var d="";for(var i in o)o[i]&&(d+="; "+i,!0!==o[i]&&(d+="="+o[i].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+d}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},o=0;o<n.length;o++){var d=n[o].split("="),i=d.slice(1).join("=");try{var a=decodeURIComponent(d[0]);if(r[a]=t.read(i,a),e===a)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",ia({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,ia({},this.attributes,t))},withConverter:function(t){return e(ia({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});const sa=(e,t)=>{var n;return["beforeRequest","afterRequest"].reduce(((n,r)=>{var o;return n[r]=[].concat((null===(o=e.hooks)||void 0===o?void 0:o[r])||[]).concat((null==t?void 0:t[r])||[]),n}),null!==(n=e.hooks)&&void 0!==n?n:e.hooks={}),e},la=async e=>{if(!(null==e?void 0:e.ok))return{};const t=await(null==e?void 0:e.clone().json());return(null==t?void 0:t.authInfo)||t||{}},ua=async e=>{const t=await la(e);return(null==t?void 0:t.user)||((null==t?void 0:t.hasOwnProperty("userId"))?t:void 0)},ca="undefined"!=typeof localStorage,$a=(e,t)=>ca&&(null===localStorage||void 0===localStorage?void 0:localStorage.setItem(e,t)),ha=e=>ca&&(null===localStorage||void 0===localStorage?void 0:localStorage.getItem(e)),fa=e=>ca&&(null===localStorage||void 0===localStorage?void 0:localStorage.removeItem(e)),pa=(...e)=>{console.debug(...e)},ga="undefined"!=typeof window,va=Math.pow(2,31)-1,ma=ga&&(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("fingerprint.endpoint.url"))||"https://api.descope.com",ya=(e=!1)=>{const t=localStorage.getItem("fp");if(!t)return null;const n=JSON.parse(t);return(new Date).getTime()>n.expiry&&!e?null:n.value},ba=async(e,t=ma)=>{try{if(ya())return;const n=(Date.now().toString(36)+Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).substring(0,27),r=new URL(t);r.pathname="/fXj8gt3x8VulJBna/x96Emn69oZwcd7I6";const o=new URL(t);o.pathname="/fXj8gt3x8VulJBna/w78aRZnnDZ3Aqw0I";const d=o.toString()+"?apiKey=<apiKey>&version=<version>&loaderVersion=<loaderVersion>",i=na({apiKey:e,endpoint:[r.toString(),Ji],scriptUrlPattern:[d,ea]}),a=await i,{requestId:s}=await a.get({linkedId:n}),l=((e,t)=>({vsid:e,vrid:t}))(n,s);(e=>{const t={value:e,expiry:(new Date).getTime()+864e5};localStorage.setItem("fp",JSON.stringify(t))})(l)}catch(e){console.warn("Could not load fingerprint",e)}},wa=e=>{const t=ya(!0);return t&&e.body&&(e.body.fpData=t),e},Oa="dls_last_user_login_id",Ca="dls_last_user_display_name",ka=()=>ha(Oa),Pa=()=>ha(Ca),Ia=e=>async(...t)=>{var n;t[1]=t[1]||{};const[,r={}]=t,o=ka(),d=Pa();return o&&(null!==(n=r.lastAuth)&&void 0!==n||(r.lastAuth={}),r.lastAuth.loginId=o,r.lastAuth.name=d),await e(...t)},Sa=e=>async(...t)=>{const n=await e(...t);return fa(Oa),fa(Ca),n};function xa(){const e=[];return{pub:t=>{e.forEach((e=>e(t)))},sub:t=>{const n=e.push(t)-1;return()=>e.splice(n,1)}}}const ja="DS",Ea="DSR";function Ra(e=""){return ha(`${e}${Ea}`)||""}function Ma(e=""){fa(`${e}${Ea}`),fa(`${e}${ja}`),aa.remove(ja)}async function _a(e){const t=function(e){var t;const n=JSON.parse(e);return n.publicKey.challenge=Da(n.publicKey.challenge),n.publicKey.user.id=Da(n.publicKey.user.id),null===(t=n.publicKey.excludeCredentials)||void 0===t||t.forEach((e=>{e.id=Da(e.id)})),n}(e);return n=await navigator.credentials.create(t),JSON.stringify({id:n.id,rawId:Wa(n.rawId),type:n.type,response:{attestationObject:Wa(n.response.attestationObject),clientDataJSON:Wa(n.response.clientDataJSON)}});var n}async function Na(e){const t=Ua(e);return La(await navigator.credentials.get(t))}async function Aa(e,t){const n=Ua(e);return n.signal=t.signal,n.mediation="conditional",La(await navigator.credentials.get(n))}async function Ta(e=!1){if(!ga)return Promise.resolve(!1);const t=!!(window.PublicKeyCredential&&navigator.credentials&&navigator.credentials.create&&navigator.credentials.get);return t&&e&&PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable?PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable():t}function Ua(e){var t;const n=JSON.parse(e);return n.publicKey.challenge=Da(n.publicKey.challenge),null===(t=n.publicKey.allowCredentials)||void 0===t||t.forEach((e=>{e.id=Da(e.id)})),n}function La(e){return JSON.stringify({id:e.id,rawId:Wa(e.rawId),type:e.type,response:{authenticatorData:Wa(e.response.authenticatorData),clientDataJSON:Wa(e.response.clientDataJSON),signature:Wa(e.response.signature),userHandle:e.response.userHandle?Wa(e.response.userHandle):void 0}})}function Da(e){const t=e.replace(/_/g,"/").replace(/-/g,"+");return Uint8Array.from(atob(t),(e=>e.charCodeAt(0))).buffer}function Wa(e){return btoa(String.fromCharCode.apply(null,new Uint8Array(e))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}var Fa,Ba=(Fa=e=>({async signUp(t,n){const r=await e.webauthn.signUp.start(t,window.location.origin,n);if(!r.ok)return r;const o=await _a(r.data.options);return await e.webauthn.signUp.finish(r.data.transactionId,o)},async signIn(t){const n=await e.webauthn.signIn.start(t,window.location.origin);if(!n.ok)return n;const r=await Na(n.data.options);return await e.webauthn.signIn.finish(n.data.transactionId,r)},async signUpOrIn(t){var n;const r=await e.webauthn.signUpOrIn.start(t,window.location.origin);if(!r.ok)return r;if(null===(n=r.data)||void 0===n?void 0:n.create){const t=await _a(r.data.options);return await e.webauthn.signUp.finish(r.data.transactionId,t)}{const t=await Na(r.data.options);return await e.webauthn.signIn.finish(r.data.transactionId,t)}},async update(t,n){const r=await e.webauthn.update.start(t,window.location.origin,n);if(!r.ok)return r;const o=await _a(r.data.options);return await e.webauthn.update.finish(r.data.transactionId,o)},helpers:{create:_a,get:Na,isSupported:Ta,conditional:Aa}}),(...e)=>{const t=Fa(...e);return Object.assign(t.signUp,e[0].webauthn.signUp),Object.assign(t.signIn,e[0].webauthn.signIn),Object.assign(t.signUpOrIn,e[0].webauthn.signUpOrIn),Object.assign(t.update,e[0].webauthn.update),t});const qa=e=>({async oneTap(t,n,r,o){const d=null!=t?t:"google",i=await e.oauth.startNative(d,r);if(!i.ok)return i;const{clientId:a,stateId:s,nonce:l}=i.data,u=await async function(){return new Promise(((e,t)=>{if(window.google)return void e(window.google.accounts.id);let n=document.getElementById("google-gsi-client-script");n||(n=document.createElement("script"),document.head.appendChild(n),n.async=!0,n.defer=!0,n.id="google-gsi-client-script",n.src="https://accounts.google.com/gsi/client"),n.onload=function(){window.google?e(window.google.accounts.id):t("Failed to load Google GSI client script - not loaded properly")},n.onerror=function(){t("Failed to load Google GSI client script - failed to load")}}))}();return new Promise((t=>{var r,i;u.initialize(Object.assign(Object.assign({},n),{itp_support:null===(r=null==n?void 0:n.itp_support)||void 0===r||r,use_fedcm_for_prompt:null===(i=null==n?void 0:n.use_fedcm_for_prompt)||void 0===i||i,client_id:a,callback:n=>{t(e.oauth.finishNative(d,s,"","",n.credential))},nonce:l})),u.prompt((e=>{(null==e?void 0:e.isSkippedMoment())&&(null==o||o())}))}))}});var Ga=e=>Object.assign(Object.assign({},e.flow),{start:async(...t)=>{const n=await Ta(),r=Object.assign(Object.assign({location:window.location.href},t[1]),{deviceInfo:{webAuthnSupport:n},startOptionsVersion:1});return t[1]=r,e.flow.start(...t)}});const za=function(...e){return t=>e.reduce(((e,t)=>t(e)),t)}((e=>n=>{var{fpKey:r,fpLoad:o}=n,d=t(n,["fpKey","fpLoad"]);return ga?(r&&o&&ba(r).catch((()=>null)),e(sa(d,{beforeRequest:wa}))):(console.warn("Fingerprint is a client side only capability and will not work when running in the server"),e(d))}),(e=>n=>{var{autoRefresh:r}=n,o=t(n,["autoRefresh"]);if(!r)return e(o);const{clearAllTimers:d,setTimer:i}=(()=>{const e=[];return{clearAllTimers:()=>{for(;e.length;)clearTimeout(e.pop())},setTimer:(t,n)=>{e.push(setTimeout(t,n))}}})();let a,s;document.addEventListener("visibilitychange",(()=>{"visible"===document.visibilityState&&new Date>a&&(pa("Expiration time passed, refreshing session"),l.refresh(s))}));const l=e(sa(o,{afterRequest:async(e,t)=>{const{refreshJwt:n,sessionJwt:r}=await la(t);if(401===(null==t?void 0:t.status))pa("Received 401, canceling all timers"),d();else if(r){a=(e=>{const t=e.split(".");try{if(3===t.length){const e=JSON.parse(window.atob(t[1]));if(e.exp)return new Date(1e3*e.exp)}}catch(e){}return null})(r),s=n;let e=((o=a)?o.getTime()-(new Date).getTime():0)-2e4;e>va&&(pa(`Timeout is too large (${e}ms), setting it to ${va}ms`),e=va),d();const t=new Date(Date.now()+e).toLocaleTimeString("en-US",{hour12:!1});pa(`Setting refresh timer for ${t}. (${e}ms)`),i((()=>{pa("Refreshing session due to timer"),l.refresh(n)}),e)}var o}}));return Ki(l,["logout","logoutAll"],(e=>async(...t)=>{const n=await e(...t);return pa("Clearing all timers"),d(),n}))}),(e=>t=>e(Object.assign(Object.assign({},t),{baseHeaders:Object.assign({"x-descope-sdk-name":"web-js","x-descope-sdk-version":"1.10.6"},t.baseHeaders)}))),(e=>t=>{const n=xa(),r=xa(),o=e(sa(t,{afterRequest:async(e,t)=>{if(401===(null==t?void 0:t.status))n.pub(null),r.pub(null);else{const e=await ua(t);e&&r.pub(e);const{sessionJwt:o}=await la(t);o&&n.pub(o)}}})),d=Ki(o,["logout","logoutAll"],(e=>async(...t)=>{const o=await e(...t);return n.pub(null),r.pub(null),o}));return Object.assign(d,{onSessionTokenChange:n.sub,onUserChange:r.sub})}),(e=>t=>{const n=e(sa(t,{afterRequest:async(e,t)=>{var n;const r=await ua(t),o=null===(n=null==r?void 0:r.loginIds)||void 0===n?void 0:n[0],d=null==r?void 0:r.name;o&&((e=>{$a(Oa,e)})(o),(e=>{$a(Ca,e)})(d))}}));let r=Ki(n,["flow.start"],Ia);return r=Ki(r,["logout","logoutAll"],Sa),Object.assign(r,{getLastUserLoginId:ka,getLastUserDisplayName:Pa})}),(e=>n=>{var{persistTokens:r,sessionTokenViaCookie:o,storagePrefix:d}=n,i=t(n,["persistTokens","sessionTokenViaCookie","storagePrefix"]);if(!r||!ga)return r&&console.warn("Storing auth tokens in local storage and cookies are a client side only capabilities and will not be done when running in the server"),e(i);const a=e(sa(i,{beforeRequest:(s=d,e=>Object.assign(e,{token:e.token||Ra(s)})),afterRequest:async(e,n)=>{401===(null==n?void 0:n.status)?Ma(d):((e={},n,r)=>{var{refreshJwt:o,sessionJwt:d}=e,i=t(e,["refreshJwt","sessionJwt"]);void 0===n&&(n=!1),void 0===r&&(r=""),o&&$a(`${r}${Ea}`,o),d&&(n?function(e,t,{cookiePath:n,cookieDomain:r,cookieExpiration:o}){if(t){const d=new Date(1e3*o),i=function(e){const t=window.location.hostname.split("."),n=e.split(".");return t.slice(-n.length).join(".")===e}(r);aa.set(e,t,{path:n,domain:i?r:void 0,expires:d,sameSite:"Strict",secure:!0})}}(ja,d,i):$a(`${r}${ja}`,d))})(await la(n),o,d)}}));var s;const l=Ki(a,["logout","logoutAll"],(e=>t=>async(...n)=>{const r=await t(...n);return Ma(e),r})(d));return Object.assign(l,{getRefreshToken:()=>Ra(d),getSessionToken:()=>function(e=""){return aa.get(ja)||ha(`${e}${ja}`)||""}(d)})}))(((...e)=>{const t=Vi(...e);return Object.assign(Object.assign({},t),{flow:Ga(t),webauthn:Ba(t),fedcm:qa(t)})})),Ha={search:"/v1/mgmt/user/search",deleteBatch:"/v1/mgmt/user/delete/batch",create:"/v1/mgmt/user/create",update:"/v1/mgmt/user/update",status:"/v1/mgmt/user/update/status",setTempPassword:"/v1/mgmt/user/password/set/temporary",removePasskey:"/v1/mgmt/user/passkeys/delete",customAttributes:"/v1/mgmt/user/customattributes"},Ka={roles:"/v1/mgmt/role/all"},Va=e=>n(void 0,void 0,void 0,(function*(){const t=yield e.text(),n=JSON.parse(t);if(!e.ok){const t=`${n.errorDescription}${n.errorMessage?`: ${n.errorMessage}`:""}`;throw Error(t||`${e.status} ${e.statusText}`)}e.json=()=>Promise.resolve(n),e.text=()=>Promise.resolve(t)})),Ja=({text:e,sort:t})=>n(void 0,void 0,void 0,(function*(){return new Promise((n=>{const r=[];for(let e=1;e<9;e+=1)r.push({loginIds:[`user${e}@company.com`],externalIds:[`user${e}@company.com`],userId:`user-${e}`,name:`User ${e}`,email:`user${e}@company.com`,roleNames:[`Role ${e}`],phone:`+1-202-555-010${e}`,verifiedEmail:!0,verifiedPhone:!0,userTenants:[],status:"enabled",editable:!0,createdTime:(new Date).getTime(),customAttributes:{},familyName:"",givenName:"",middleName:"",picture:"",password:!0,SAML:!1,test:!1,TOTP:!1,webauthn:!1});t.forEach((e=>{r.sort(((t,n)=>{var r,o;return e.desc?null===(o=n[e.field])||void 0===o?void 0:o.localeCompare(t[e.field]):null===(r=t[e.field])||void 0===r?void 0:r.localeCompare(n[e.field])}))})),n(r.filter((t=>t.name.toLowerCase().includes(e.toLowerCase())||t.phone.toLowerCase().includes(e.toLowerCase())||t.status.toLowerCase().includes(e.toLowerCase())||t.familyName.toLowerCase().includes(e.toLowerCase())||t.givenName.toLowerCase().includes(e.toLowerCase())||t.middleName.toLowerCase().includes(e.toLowerCase())||t.email.toLowerCase().includes(e.toLowerCase()))))}))})),Za=({loginId:e,email:t,phone:r,displayName:o,roles:d,customAttributes:i,picture:a,verifiedEmail:s,verifiedPhone:l,givenName:u,middleName:c,familyName:$})=>n(void 0,void 0,void 0,(function*(){return new Promise((n=>{const h=Math.random().toString(10).substring(15);n({loginIds:[e],externalIds:[e],userId:`user-${h}`,email:t,phone:r,name:o,roleNames:d,customAttributes:i,picture:a,verifiedEmail:s,verifiedPhone:l,givenName:u,middleName:c,familyName:$,createdTime:(new Date).getTime(),editable:!0,password:!0,SAML:!1,status:"enabled",test:!1,TOTP:!1,userTenants:[],webauthn:!1})}))})),Ya=({loginId:e,email:t,phone:r,displayName:o,roles:d,customAttributes:i,picture:a,verifiedEmail:s,verifiedPhone:l,givenName:u,middleName:c,familyName:$})=>n(void 0,void 0,void 0,(function*(){return new Promise((n=>{n({loginIds:[e],externalIds:[e],userId:e,email:t,phone:r,name:o,roleNames:d,customAttributes:i,picture:a,verifiedEmail:s,verifiedPhone:l,givenName:u,middleName:c,familyName:$,createdTime:(new Date).getTime(),editable:!0,password:!0,SAML:!1,status:"enabled",test:!1,TOTP:!1,userTenants:[],webauthn:!1})}))})),Xa=()=>n(void 0,void 0,void 0,(function*(){})),Qa=()=>n(void 0,void 0,void 0,(function*(){return new Promise((e=>{e({cleartext:Math.random().toString(20).substring(2)})}))})),es=()=>n(void 0,void 0,void 0,(function*(){})),ts=()=>n(void 0,void 0,void 0,(function*(){})),ns=()=>n(void 0,void 0,void 0,(function*(){})),rs=()=>n(void 0,void 0,void 0,(function*(){return new Promise((e=>{e([])}))})),os=e=>new Promise((t=>{const n=[];for(let t=1;t<5;t+=1)n.push({name:`Role ${t}`,description:`Role description ${t}`,createdTime:new Date,permissionNames:[`Permission ${t}`],tenantId:e});t({roles:n})})),ds=({httpClient:e,tenant:t,mock:r})=>({search:({page:o,limit:d=1e4,customAttributes:i,statuses:a,emails:s,phones:l,text:u,sort:c}={})=>n(void 0,void 0,void 0,(function*(){if(r)return Ja({page:o,limit:d,customAttributes:i,statuses:a,emails:s,phones:l,text:u,sort:c});const n=yield e.post(Ha.search,{limit:d,page:o,withTestUser:!1,customAttributes:i,statuses:a,emails:s,phones:l,text:u,sort:c},{queryParams:{tenant:t}});yield Va(n);return(yield n.json()).users})),deleteBatch:o=>n(void 0,void 0,void 0,(function*(){if(r)return Xa();const n=yield e.post(Ha.deleteBatch,{userIds:o},{queryParams:{tenant:t}});return yield Va(n),n.json()})),create:({loginId:o,email:d,phone:i,displayName:a,roles:s,customAttributes:l,picture:u,verifiedEmail:c,verifiedPhone:$,givenName:h,middleName:f,familyName:p,additionalLoginIds:g,sendSMS:v,sendMail:m,inviteUrl:y,invite:b})=>n(void 0,void 0,void 0,(function*(){if(r)return Za({loginId:o,email:d,phone:i,displayName:a,roles:s,customAttributes:l,picture:u,verifiedEmail:c,verifiedPhone:$,givenName:h,middleName:f,familyName:p,additionalLoginIds:g,sendSMS:v,sendMail:m,inviteUrl:y,invite:b});const n=yield e.post(Ha.create,{loginId:o,email:d,phone:i,displayName:a,givenName:h,middleName:f,familyName:p,roleNames:s,userTenants:[{tenantId:t}],customAttributes:l,picture:u,verifiedEmail:c,verifiedPhone:$,additionalLoginIds:g,sendSMS:v,sendMail:m,inviteUrl:y,invite:b},{queryParams:{tenant:t}});yield Va(n);return(yield n.json()).user})),update:({loginId:o,email:d,phone:i,displayName:a,roles:s,customAttributes:l,picture:u,verifiedEmail:c,verifiedPhone:$,givenName:h,middleName:f,familyName:p,additionalLoginIds:g})=>n(void 0,void 0,void 0,(function*(){if(r)return Ya({loginId:o,email:d,phone:i,displayName:a,roles:s,customAttributes:l,picture:u,verifiedEmail:c,verifiedPhone:$,givenName:h,middleName:f,familyName:p,additionalLoginIds:g});const n=yield e.post(Ha.update,{loginId:o,email:d,phone:i,displayName:a,givenName:h,middleName:f,familyName:p,roleNames:s,customAttributes:l,picture:u,verifiedEmail:c,verifiedPhone:$,additionalLoginIds:g},{queryParams:{tenant:t}});yield Va(n);return(yield n.json()).user})),enable:o=>n(void 0,void 0,void 0,(function*(){if(r)return ts();const n=yield e.post(Ha.status,{loginId:o,status:"enabled"},{queryParams:{tenant:t}});return yield Va(n),n.json()})),disable:o=>n(void 0,void 0,void 0,(function*(){if(r)return ns();const n=yield e.post(Ha.status,{loginId:o,status:"disabled"},{queryParams:{tenant:t}});return yield Va(n),n.json()})),removePasskey:o=>n(void 0,void 0,void 0,(function*(){if(r)return es();const n=yield e.post(Ha.removePasskey,{loginId:o},{queryParams:{tenant:t}});return yield Va(n),n.json()})),setTempPassword:o=>n(void 0,void 0,void 0,(function*(){if(r)return Qa();const n=yield e.post(Ha.setTempPassword,{loginId:o},{queryParams:{tenant:t}});return yield Va(n),n.json()})),getCustomAttributes:()=>n(void 0,void 0,void 0,(function*(){if(r)return rs();const n=yield e.get(Ha.customAttributes,{queryParams:{tenant:t}});yield Va(n);return(yield n.json()).data}))}),is=({httpClient:e,tenant:t,mock:r})=>({getTenantRoles:()=>n(void 0,void 0,void 0,(function*(){if(r)return os(t);const n=yield e.get(Ka.roles,{queryParams:{tenant:t}});return yield Va(n),n.json()}))}),as=c((e=>{var t,i,a,s;const l=d(Ut,At,Et,Tt({tenant:Tt.missingAttrValidator}))(e);return s=class extends l{constructor(){super(...arguments),t.add(this),i.set(this,void 0)}get baseUrl(){return this.getAttribute("base-url")}get tenant(){return this.getAttribute("tenant")}get mock(){return this.getAttribute("mock")}get api(){return r(this,i,"f")||r(this,t,"m",a).call(this),r(this,i,"f")}init(){const e=Object.create(null,{init:{get:()=>super.init}});var o;return n(this,void 0,void 0,(function*(){yield null===(o=e.init)||void 0===o?void 0:o.call(this),this.observeAttributes(["project-id","base-url","tenant"],(()=>{r(this,i,"f")&&r(this,t,"m",a).call(this)}))}))}},i=new WeakMap,t=new WeakSet,a=function(){this.logger.debug("creating an sdk instance"),o(this,i,((e,t,n)=>{const r=za(Object.assign(Object.assign({},e),{persistTokens:!0}));return{user:ds({httpClient:r.httpClient,tenant:t,mock:n}),tenant:is({httpClient:r.httpClient,tenant:t,mock:n})}})({projectId:this.projectId,baseUrl:this.baseUrl},this.tenant,"true"===this.mock),"f")},s})),ss=c((e=>{const t=d(rn({name:"widget",initialState:yr,reducers:{setSelectedUsersIds:(e,{payload:t})=>{e.selectedUsersLoginIds=t},clearNotifications:e=>{e.notifications=[]}},extraReducers:e=>{Hn.reducer(e),ur.reducer(e),hr.reducer(e),gr.reducer(e),Jn.reducer(e),or.reducer(e),Xn.reducer(e),mr.reducer(e),tr.reducer(e),ar.reducer(e)},asyncActions:{searchUsers:or.action,createUser:Hn.action,updateUser:ur.action,enableUser:hr.action,disableUser:gr.action,deleteUsers:Jn.action,removePasskey:mr.action,getCustomAttributes:tr.action,getTenantRoles:ar.action,setTempUserPassword:Xn.action}}),Nt,Et,as)(e);return class extends t{constructor(...e){super(...e),this.state=yr,this.subscribe((e=>{this.logger.debug("State update:",e),this.state=e}))}}})),ls=c((e=>{const t=d(Lt,Tt({"widget-id":Tt.missingAttrValidator}))(e);return class extends t{get widgetId(){return this.getAttribute("widget-id")}fetchWidgetPage(e){return n(this,void 0,void 0,(function*(){return(yield this.fetchStaticResource(`user-management-widget/${this.widgetId}/${e}`,"text")).body}))}}})),us=c((e=>{var t,o,a;return a=class extends(d(Et,Nt,Kt,Zt,ls,ss)(e)){constructor(){super(...arguments),t.add(this)}onWidgetRootReady(){return n(this,void 0,void 0,(function*(){}))}init(){const e=Object.create(null,{init:{get:()=>super.init}});var d;return n(this,void 0,void 0,(function*(){yield null===(d=e.init)||void 0===d?void 0:d.call(this),yield Promise.all([r(this,t,"m",o).call(this),this.actions.searchUsers(),this.actions.getTenantRoles(),this.actions.getCustomAttributes()]),this.onWidgetRootReady()}))}},t=new WeakSet,o=function(){return n(this,void 0,void 0,(function*(){const e=i(yield this.fetchWidgetPage("root.html"));yield this.loadDescopeUiComponents(e),this.contentRootElement.append(e.content.cloneNode(!0))}))},a})),cs=c((e=>{var t,a,s,l,u;return u=class extends(d(ss,Xt,on,Et,us)(e)){constructor(){super(...arguments),t.add(this),a.set(this,void 0),l.set(this,(()=>n(this,void 0,void 0,(function*(){yield r(this,a,"f").setData(wn(this.state).map((({name:e})=>({value:e,label:e}))))}))))}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var o;return n(this,void 0,void 0,(function*(){yield null===(o=e.onWidgetRootReady)||void 0===o?void 0:o.call(this),r(this,t,"m",s).call(this)}))}},a=new WeakMap,l=new WeakMap,t=new WeakSet,s=function(){return n(this,void 0,void 0,(function*(){this.createUserModal=this.createModal(),this.createUserModal.setContent(i(yield this.fetchWidgetPage("create-user-modal.html")));const e=new C((()=>{var e;return null===(e=this.createUserModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-cancel"]')}),{logger:this.logger});e.onClick((()=>{this.createUserModal.close(),this.resetFormData(this.createUserModal.ele)}));const t=new C((()=>{var e;return null===(e=this.createUserModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-submit"]')}),{logger:this.logger});t.onClick((()=>n(this,void 0,void 0,(function*(){this.validateForm(this.createUserModal.ele)&&(this.actions.createUser(Object.assign(Object.assign({},this.getFormData(this.createUserModal.ele)),{invite:!0,verifiedEmail:!0,verifiedPhone:!0})),this.createUserModal.close(),this.resetFormData(this.createUserModal.ele))})))),o(this,a,new I((()=>{var e;return null===(e=this.createUserModal.ele)||void 0===e?void 0:e.querySelector('[data-id="roles-multiselect"]')}),{logger:this.logger}),"f"),r(this,l,"f").call(this)}))},u})),$s=c((e=>{var t,o,i;return i=class extends(d(Et,cs,us)(e)){constructor(){super(...arguments),t.add(this)}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var d;return n(this,void 0,void 0,(function*(){yield null===(d=e.onWidgetRootReady)||void 0===d?void 0:d.call(this),r(this,t,"m",o).call(this)}))}},t=new WeakSet,o=function(){var e;this.createButton=new C(null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector('[data-id="create-user"]'),{logger:this.logger}),this.createButton.onClick((()=>this.createUserModal.open()))},i})),hs=c((e=>{var t,o,a;return a=class extends(d(ss,Xt,Et,us)(e)){constructor(){super(...arguments),t.add(this)}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var d;return n(this,void 0,void 0,(function*(){yield null===(d=e.onWidgetRootReady)||void 0===d?void 0:d.call(this),yield r(this,t,"m",o).call(this)}))}},t=new WeakSet,o=function(){var e;return n(this,void 0,void 0,(function*(){this.deleteUsersModal=this.createModal(),this.deleteUsersModal.setContent(i(yield this.fetchWidgetPage("delete-users-modal.html")));const t=new C((()=>{var e;return null===(e=this.deleteUsersModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-cancel"]')}),{logger:this.logger});t.onClick((()=>this.deleteUsersModal.close()));const n=new C((()=>{var e;return null===(e=this.deleteUsersModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-submit"]')}),{logger:this.logger});n.onClick((()=>{const e=Sn(this.state);this.actions.deleteUsers(e),this.deleteUsersModal.close()}));const r=new x(null===(e=this.deleteUsersModal.ele)||void 0===e?void 0:e.querySelector('[data-id="body-text"]'),{logger:this.logger});this.deleteUsersModal.beforeOpen=()=>{const e=Nn(this.state);r.text=`Delete ${e}?`}}))},a})),fs=c((e=>{var t,o,i,a;return a=class extends(d(Et,us,ss,hs)(e)){constructor(){super(...arguments),t.add(this),i.set(this,s((e=>{e?this.deleteButton.enable():this.deleteButton.disable()})))}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var d;return n(this,void 0,void 0,(function*(){r(this,t,"m",o).call(this),yield null===(d=e.onWidgetRootReady)||void 0===d?void 0:d.call(this),this.subscribe(r(this,i,"f").bind(this),Wn)}))}},i=new WeakMap,t=new WeakSet,o=function(){var e;this.deleteButton=new C(null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector('[data-id="delete-users"]'),{logger:this.logger}),this.deleteButton.disable(),this.deleteButton.onClick((()=>{this.deleteUsersModal.open()}))},a})),ps=c((e=>{var t,o,a,s,l;return l=class extends(d(ss,Xt,Et,on,us)(e)){constructor(){super(...arguments),t.add(this)}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var o;return n(this,void 0,void 0,(function*(){yield null===(o=e.onWidgetRootReady)||void 0===o?void 0:o.call(this),yield r(this,t,"m",s).call(this)}))}},t=new WeakSet,o=function(){const e=new C((()=>{var e;return null===(e=this.disableUserModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-cancel"]')}),{logger:this.logger});e.onClick((()=>this.disableUserModal.close()))},a=function(){const e=new C((()=>{var e;return null===(e=this.disableUserModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-submit"]')}),{logger:this.logger});e.onClick((()=>{const e=Rn(this.state);this.actions.disableUser(e),this.disableUserModal.close()}))},s=function(){var e;return n(this,void 0,void 0,(function*(){this.disableUserModal=this.createModal(),this.disableUserModal.setContent(i(yield this.fetchWidgetPage("disable-user-modal.html"))),r(this,t,"m",o).call(this),r(this,t,"m",a).call(this);const d=new x(null===(e=this.disableUserModal.ele)||void 0===e?void 0:e.querySelector('[data-id="body-text"]'),{logger:this.logger});this.disableUserModal.beforeOpen=()=>n(this,void 0,void 0,(function*(){const e=Nn(this.state);d.text=`Disable ${e}?`}))}))},l})),gs=c((e=>{var t,o,i,a;return a=class extends(d(Et,us,ss,ps,on)(e)){constructor(){super(...arguments),t.add(this),i.set(this,s((e=>{e?this.disableButton.enable():this.disableButton.disable()})))}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var d;return n(this,void 0,void 0,(function*(){r(this,t,"m",o).call(this),yield null===(d=e.onWidgetRootReady)||void 0===d?void 0:d.call(this),this.subscribe(r(this,i,"f").bind(this),Tn)}))}},i=new WeakMap,t=new WeakSet,o=function(){var e;this.disableButton=new C(null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector('[data-id="disable-user"]'),{logger:this.logger}),this.disableButton.disable(),this.disableButton.onClick((()=>{this.disableUserModal.open()}))},a}));var vs={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|22"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","[24-689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]]],BL:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-467]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","(?:[2-8]\\d|90)\\d{8}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","[189]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\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{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"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],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","10(?:10|9[56])|2[0-57-9](?:100|9[56])"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}",[10,11],[["(\\d{3})(\\d{7})","$1 $2",["6"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","[27]\\d{6,7}|[34]\\d{5,7}|63\\d{6}|(?:5|8\\d\\d)\\d{7}",[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|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|31)"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:1[3-79]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0235])|4(?:[0-5]\\d\\d|69[7-9]|70[0-79])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-2]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","[56]94\\d{6}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[56]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","(?:[2-489]\\d|55)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["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]],0,0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0",0,"(000[259]\\d{6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[013-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(8-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"8 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(8-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(8-$1)",1]],"8",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","596\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","1(?:(?:22|44|7[27]|87|99)[1-9]|65[0-689])\\d{7}|(?:1(?:[01]\\d|2[13-9]|[35][1-9]|4[0-35-9]|6[0-46-9]|7[013-689]|8[1-69]|9[1-8])|[2-9]\\d)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"],0,1],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"],0,1],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"],0,1]],"01",0,"0(?:[12]|4[45])|1",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[047]"]]]],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","2[0-24-9]\\d{8}|[78]\\d{10,13}|[7-9]\\d{9}|[1-9]\\d{7}|[124-7]\\d{6}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-6]|7(?:0[0-689]|[1-79])|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|80\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[16]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-5]|76(?:2[27]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","(?:[1-6]|[7-9]\\d\\d)\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","800\\d{4}|(?:[249]\\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],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|77|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[69]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3[1-5]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","[1-6]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["6"],"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,[["(?:5056(?:[0-35-9]\\d|4[468])|7302[0-3]\\d)\\d{4}|(?:472[24]|505[2-57-9]|7306|983[237-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[6,7,8,9,10,11,12,13],[["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","810","(?:20|33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],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],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","[23]\\d{7,8}|(?:4\\d\\d|[89]00)\\d{5}",[8,9],[["(\\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",["[23]"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,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 ms(e){return ms="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ms(e)}function ys(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bs(e){var t=ks();return function(){var n,r=Is(e);if(t){var o=Is(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ms(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ws(e)}(this,n)}}function ws(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Os(e){var t="function"==typeof Map?new Map:void 0;return Os=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Cs(e,arguments,Is(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Ps(r,e)},Os(e)}function Cs(e,t,n){return Cs=ks()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Ps(o,n.prototype),o},Cs.apply(null,arguments)}function ks(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Ps(e,t){return Ps=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ps(e,t)}function Is(e){return Is=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Is(e)}var Ss=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ps(e,t)}(d,e);var t,n,r,o=bs(d);function d(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),t=o.call(this,e),Object.setPrototypeOf(ws(t),d.prototype),t.name=t.constructor.name,t}return t=d,n&&ys(t.prototype,n),r&&ys(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}(Os(Error)),xs=2,js=17,Es=3,Rs="0-90-9٠-٩۰-۹",Ms="".concat("-‐-―−ー-").concat("//").concat("..").concat("  ­​⁠ ").concat("()()[]\\[\\]").concat("~⁓∼~");function _s(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),o=0;o<3;o++){var d=Number(n[o]),i=Number(r[o]);if(d>i)return 1;if(i>d)return-1;if(!isNaN(d)&&isNaN(i))return 1;if(isNaN(d)&&!isNaN(i))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}var Ns={}.constructor;function As(e){return null!=e&&e.constructor===Ns}function Ts(e){return Ts="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ts(e)}function Us(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ls(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ds(e,t,n){return t&&Ls(e.prototype,t),n&&Ls(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ws=" ext. ",Fs=/^\d+$/,Bs=function(){function e(t){Us(this,e),function(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!As(e)||!As(e.countries))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(As(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+Vs(e)+": "+e,"."))}(t),this.metadata=t,Zs.call(this,t)}return Ds(e,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter((function(e){return"001"!==e}))}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){if(e&&Fs.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new qs(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new qs(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t){if(1===t.length&&3===t[0].length)return;return t}}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var n=this.nonGeographic()[e];if(n)return n}else{var r=this.countryCallingCodes()[e];if(r&&1===r.length&&"001"===r[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(e){return this.numberingPlan.type(e)}},{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(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}]),e}(),qs=function(){function e(t,n){Us(this,e),this.globalMetadataObject=n,this.metadata=t,Zs.call(this,n.metadata)}return Ds(e,[{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(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this,t=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return t.map((function(t){return new Gs(t,e)}))}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[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(e){if(this.hasTypes()&&Ks(this.types(),e))return new Hs(Ks(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?Ws:this.metadata[13]||Ws}}]),e}(),Gs=function(){function e(t,n){Us(this,e),this._format=t,this.metadata=n}return Ds(e,[{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()||zs.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),e}(),zs=/^\(?\$1\)?$/,Hs=function(){function e(t,n){Us(this,e),this.type=t,this.metadata=n}return Ds(e,[{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()}}]),e}();function Ks(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}var Vs=function(e){return Ts(e)};function Js(e,t){if((t=new Bs(t)).hasCountry(e))return t.country(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function Zs(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===_s(t,"1.2.0")?this.v2=!0:-1===_s(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}var Ys=function(e){return"([".concat(Rs,"]{1,").concat(e,"})")};function Xs(e){var t="[  \\t,]*",n="[:\\..]?[  \\t,-]*",r="#?",o="[  \\t]*";return";ext="+Ys("20")+"|"+(t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+n+Ys("20")+r)+"|"+(t+"(?:[xx##~~]|int|int)"+n+Ys("9")+r)+"|"+("[- ]+"+Ys("6")+"#")+"|"+(o+"(?:,{2}|;)"+n+Ys("15")+r)+"|"+(o+"(?:,)+"+n+Ys("9")+r)}var Qs="["+Rs+"]{"+xs+"}",el="[++]{0,1}(?:["+Ms+"]*["+Rs+"]){3,}["+Ms+Rs+"]*",tl=new RegExp("^[++]{0,1}(?:["+Ms+"]*["+Rs+"]){1,2}$","i"),nl=el+"(?:"+Xs()+")?",rl=new RegExp("^"+Qs+"$|^"+nl+"$","i");var ol=new RegExp("(?:"+Xs()+")$","i");var dl={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 il(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return al(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return al(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function al(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sl(e){for(var t,n="",r=il(e.split(""));!(t=r()).done;){n+=ll(t.value,n)||""}return n}function ll(e,t,n){return"+"===e?t?void("function"==typeof n&&n("end")):"+":function(e){return dl[e]}(e)}function ul(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return cl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cl(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function cl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $l(e,t){return hl(e,void 0,t)}function hl(e,t,n){var r=n.type(t),o=r&&r.possibleLengths()||n.possibleLengths();if(!o)return"IS_POSSIBLE";if("FIXED_LINE_OR_MOBILE"===t){if(!n.type("FIXED_LINE"))return hl(e,"MOBILE",n);var d=n.type("MOBILE");d&&(o=function(e,t){for(var n,r=e.slice(),o=ul(t);!(n=o()).done;){var d=n.value;e.indexOf(d)<0&&r.push(d)}return r.sort((function(e,t){return e-t}))}(o,d.possibleLengths()))}else if(t&&!r)return"INVALID_LENGTH";var i=e.length,a=o[0];return a===i?"IS_POSSIBLE":a>i?"TOO_SHORT":o[o.length-1]<i?"TOO_LONG":o.indexOf(i,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function fl(e,t){return"IS_POSSIBLE"===$l(e,t)}function pl(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function gl(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return vl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vl(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function vl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ml=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function yl(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new Bs(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(pl(r,n.nationalNumberPattern())){if(bl(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?bl(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var o,d=gl(ml);!(o=d()).done;){var i=o.value;if(bl(r,i,n))return i}}}}function bl(e,t,n){return!(!(t=n.type(t))||!t.pattern())&&(!(t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0)&&pl(e,t.pattern()))}function wl(e,t,n){var r=new Bs(n).getCountryCodesForCallingCode(e);return r?r.filter((function(e){return function(e,t,n){var r=new Bs(n);if(r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0)return!0;return!1}(t,e,n)})):[]}var Ol=/(\$\d)/;function Cl(e,t,n){var r=n.useInternationalFormat,o=n.withNationalPrefix;n.carrierCode,n.metadata;var d=e.replace(new RegExp(t.pattern()),r?t.internationalFormat():o&&t.nationalPrefixFormattingRule()?t.format().replace(Ol,t.nationalPrefixFormattingRule()):t.format());return r?function(e){return e.replace(new RegExp("[".concat(Ms,"]+"),"g")," ").trim()}(d):d}var kl=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function Pl(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Il(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Il(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Il(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Sl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sl(Object(n),!0).forEach((function(t){jl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var El={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function Rl(e,t,n,r){if(n=n?xl(xl({},El),n):El,r=new Bs(r),e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.country(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var o,d=r.countryCallingCode(),i=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return i?_l(o=Ml(i,e.carrierCode,"NATIONAL",r,n),e.ext,r,n.formatExtension):"";case"INTERNATIONAL":return i?(o=Ml(i,null,"INTERNATIONAL",r,n),_l(o="+".concat(d," ").concat(o),e.ext,r,n.formatExtension)):"+".concat(d);case"E.164":return"+".concat(d).concat(i);case"RFC3966":return function(e){var t=e.number,n=e.ext;if(!t)return"";if("+"!==t[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(n?";ext="+n:"")}({number:"+".concat(d).concat(i),ext:e.ext});case"IDD":if(!n.fromCountry)return;var a=function(e,t,n,r,o){var d=Js(r,o.metadata);if(d===n){var i=Ml(e,t,"NATIONAL",o);return"1"===n?n+" "+i:i}var a=function(e,t,n){var r=new Bs(n);return r.selectNumberingPlan(e,t),r.defaultIDDPrefix()?r.defaultIDDPrefix():kl.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,void 0,o.metadata);if(a)return"".concat(a," ").concat(n," ").concat(Ml(e,null,"INTERNATIONAL",o))}(i,e.carrierCode,d,n.fromCountry,r);return _l(a,e.ext,r,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function Ml(e,t,n,r,o){var d=function(e,t){for(var n,r=Pl(e);!(n=r()).done;){var o=n.value;if(o.leadingDigitsPatterns().length>0){var d=o.leadingDigitsPatterns()[o.leadingDigitsPatterns().length-1];if(0!==t.search(d))continue}if(pl(t,o.pattern()))return o}}(r.formats(),e);return d?Cl(e,d,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!d.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!o||!1!==o.nationalPrefix,carrierCode:t,metadata:r}):e}function _l(e,t,n,r){return t?r(e,t,n):e}function Nl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Al(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nl(Object(n),!0).forEach((function(t){Tl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Tl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ul(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ll=function(){function e(t,n,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new TypeError("`country` or `countryCallingCode` not passed");if(!n)throw new TypeError("`nationalNumber` not passed");if(!r)throw new TypeError("`metadata` not passed");var o=function(e,t){var n,r,o=new Bs(t);Dl(e)?(n=e,o.selectNumberingPlan(n),r=o.countryCallingCode()):r=e;return{country:n,countryCallingCode:r}}(t,r),d=o.country,i=o.countryCallingCode;this.country=d,this.countryCallingCode=i,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}}var t,n,r;return t=e,n=[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:wl(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,n){if(void 0===t&&(t={}),n=new Bs(n),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.country(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return fl(e.phone||e.nationalNumber,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new 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(e,t,n){return t=t||{},(n=new Bs(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==yl(e,t,n.metadata):pl(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern())}(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new Bs(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return yl(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return Rl(this,e,t?Al(Al({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}],n&&Ul(t.prototype,n),r&&Ul(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Dl=function(e){return/^[A-Z]{2}$/.test(e)};var Wl=new RegExp("(["+Rs+"])");function Fl(e,t){var n=function(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),r=n.exec(e);if(r){var o,d,i,a=r.length-1,s=a>0&&r[a];if(t.nationalPrefixTransformRule()&&s)o=e.replace(n,t.nationalPrefixTransformRule()),a>1&&(d=r[1]);else{var l=r[0];o=e.slice(l.length),s&&(d=r[1])}if(s){var u=e.indexOf(r[1]);e.slice(0,u)===t.numberingPlan.nationalPrefix()&&(i=t.numberingPlan.nationalPrefix())}else i=r[0];return{nationalNumber:o,nationalPrefix:i,carrierCode:d}}}return{nationalNumber:e}}(e,t),r=n.carrierCode,o=n.nationalNumber;if(o!==e){if(!function(e,t,n){if(pl(e,n.nationalNumberPattern())&&!pl(t,n.nationalNumberPattern()))return!1;return!0}(e,o,t))return{nationalNumber:e};if(t.possibleLengths()&&!function(e,t){switch($l(e,t)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(o,t))return{nationalNumber:e}}return{nationalNumber:o,carrierCode:r}}function Bl(e,t,n,r){if(!e)return{};var o;if("+"!==e[0]){var d=function(e,t,n,r){if(t){var o=new Bs(r);o.selectNumberingPlan(t,n);var d=new RegExp(o.IDDPrefix());if(0===e.search(d)){var i=(e=e.slice(e.match(d)[0].length)).match(Wl);if(!(i&&null!=i[1]&&i[1].length>0&&"0"===i[1]))return e}}}(e,t,n,r);if(!d||d===e){if(t||n){var i=function(e,t,n,r){var o=t?Js(t,r):n;if(0===e.indexOf(o)){(r=new Bs(r)).selectNumberingPlan(t,n);var d=e.slice(o.length),i=Fl(d,r).nationalNumber,a=Fl(e,r).nationalNumber;if(!pl(a,r.nationalNumberPattern())&&pl(i,r.nationalNumberPattern())||"TOO_LONG"===$l(a,r))return{countryCallingCode:o,number:d}}return{number:e}}(e,t,n,r),a=i.countryCallingCode,s=i.number;if(a)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:a,number:s}}return{number:e}}o=!0,e="+"+d}if("0"===e[1])return{};r=new Bs(r);for(var l=2;l-1<=Es&&l<=e.length;){var u=e.slice(1,l);if(r.hasCallingCode(u))return r.selectNumberingPlan(u),{countryCallingCodeSource:o?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:e.slice(l)};l++}return{}}function ql(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Gl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gl(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Gl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var zl=!1;function Hl(e,t){var n=t.nationalNumber,r=t.defaultCountry,o=t.metadata;if(zl&&o.isNonGeographicCallingCode(e))return"001";var d=o.getCountryCodesForCallingCode(e);return d?1===d.length?d[0]:function(e,t){var n=t.countries,r=t.defaultCountry,o=t.metadata;o=new Bs(o);for(var d,i=[],a=ql(n);!(d=a()).done;){var s=d.value;if(o.country(s),o.leadingDigits()){if(e&&0===e.search(o.leadingDigits()))return s}else if(yl({phone:e,country:s},void 0,o.metadata)){if(!r)return s;if(s===r)return s;i.push(s)}}if(i.length>0)return i[0]}(n,{countries:d,defaultCountry:r,metadata:o.metadata}):void 0}var Kl="+",Vl="(["+Rs+"]|[\\-\\.\\(\\)]?)",Jl=new RegExp("^\\"+Kl+Vl+"*["+Rs+"]"+Vl+"*$","g"),Zl=new RegExp("^("+("["+Rs+"]+((\\-)*["+Rs+"])*")+"\\.)*"+("[a-zA-Z]+((\\-)*["+Rs+"])*")+"\\.?$","g"),Yl="tel:",Xl=";phone-context=",Ql=";isub=";function eu(e,t){var n,r=t.extractFormattedPhoneNumber,o=function(e){var t=e.indexOf(Xl);if(t<0)return null;var n=t+Xl.length;if(n>=e.length)return"";var r=e.indexOf(";",n);return r>=0?e.substring(n,r):e.substring(n)}(e);if(!function(e){return null===e||0!==e.length&&(Jl.test(e)||Zl.test(e))}(o))throw new Ss("NOT_A_NUMBER");if(null===o)n=r(e)||"";else{n="",o.charAt(0)===Kl&&(n+=o);var d,i=e.indexOf(Yl);d=i>=0?i+Yl.length:0;var a=e.indexOf(Xl);n+=e.substring(d,a)}var s=n.indexOf(Ql);if(s>0&&(n=n.substring(0,s)),""!==n)return n}var tu=250,nu=new RegExp("[++"+Rs+"]"),ru=new RegExp("[^"+Rs+"#]+$");function ou(e,t,n){if(t=t||{},n=new Bs(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new Ss("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var r=function(e,t,n){var r=eu(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(!e)return;if(e.length>tu){if(n)throw new Ss("TOO_LONG");return}if(!1===t)return e;var r=e.search(nu);if(r<0)return;return e.slice(r).replace(ru,"")}(e,n,t)}});if(!r)return{};if(!function(e){return e.length>=xs&&rl.test(e)}(r))return function(e){return tl.test(e)}(r)?{error:"TOO_SHORT"}:{};var o=function(e){var t=e.search(ol);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(ol),o=1;o<r.length;){if(r[o])return{number:n,ext:r[o]};o++}}(r);if(o.ext)return o;return{number:r}}(e,t.v2,t.extract),o=r.number,d=r.ext,i=r.error;if(!o){if(t.v2){if("TOO_SHORT"===i)throw new Ss("TOO_SHORT");throw new Ss("NOT_A_NUMBER")}return{}}var a=function(e,t,n,r){var o,d=Bl(sl(e),t,n,r.metadata),i=d.countryCallingCodeSource,a=d.countryCallingCode,s=d.number;if(a)r.selectNumberingPlan(a);else{if(!s||!t&&!n)return{};r.selectNumberingPlan(t,n),t&&(o=t),a=n||Js(t,r.metadata)}if(!s)return{countryCallingCodeSource:i,countryCallingCode:a};var l=Fl(sl(s),r),u=l.nationalNumber,c=l.carrierCode,$=Hl(a,{nationalNumber:u,defaultCountry:t,metadata:r});$&&(o=$,"001"===$||r.country(o));return{country:o,countryCallingCode:a,countryCallingCodeSource:i,nationalNumber:u,carrierCode:c}}(o,t.defaultCountry,t.defaultCallingCode,n),s=a.country,l=a.nationalNumber,u=a.countryCallingCode,c=a.countryCallingCodeSource,$=a.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new Ss("INVALID_COUNTRY");return{}}if(!l||l.length<xs){if(t.v2)throw new Ss("TOO_SHORT");return{}}if(l.length>js){if(t.v2)throw new Ss("TOO_LONG");return{}}if(t.v2){var h=new Ll(u,l,n.metadata);return s&&(h.country=s),$&&(h.carrierCode=$),d&&(h.ext=d),h.__countryCallingCodeSource=c,h}var f=!!(t.extended?n.hasSelectedNumberingPlan():s)&&pl(l,n.nationalNumberPattern());return t.extended?{country:s,countryCallingCode:u,carrierCode:$,valid:f,possible:!!f||!(!0!==t.extended||!n.possibleLengths()||!fl(l,n)),phone:l,ext:d}:f?function(e,t,n){var r={country:e,phone:t};n&&(r.ext=n);return r}(s,l,d):{}}function du(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?du(Object(n),!0).forEach((function(t){au(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):du(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function au(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function su(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,d=[],i=!0,a=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(d.push(r.value),!t||d.length!==t);i=!0);}catch(e){a=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(a)throw o}}return d}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return cu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cu(e,t)}(e,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.")}()}function cu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $u(e){var t,n,r,o=uu(Array.prototype.slice.call(e),4),d=o[0],i=o[1],a=o[2],s=o[3];if("string"!=typeof d)throw new TypeError("A text for parsing must be a string.");if(t=d,i&&"string"!=typeof i){if(!As(i))throw new Error("Invalid second argument: ".concat(i));a?(n=i,r=a):r=i}else s?(n=a,r=s):(n=void 0,r=a),i&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?su(Object(n),!0).forEach((function(t){lu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):su(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({defaultCountry:i},n));return{text:t,options:n,metadata:r}}function hu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hu(Object(n),!0).forEach((function(t){pu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gu(e,t,n){t&&t.defaultCountry&&!function(e,t){return t.countries.hasOwnProperty(e)}(t.defaultCountry,n)&&(t=fu(fu({},t),{},{defaultCountry:void 0}));try{return function(e,t,n){return ou(e,iu(iu({},t),{},{v2:!0}),n)}(e,t,n)}catch(e){if(!(e instanceof Ss))throw e}}function vu(){var e=$u(arguments);return gu(e.text,e.options,e.metadata)}function mu(){return function(e,t){var n=Array.prototype.slice.call(t);return n.push(vs),e.apply(this,n)}(vu,arguments)}const yu=["customAttributes"],bu=e=>{if(!e)return e;const t=mu(e),n=new RegExp(`(\\+?${null==t?void 0:t.countryCallingCode})(.*)`);return t.number.replace(n,"$1-$2")},wu=c((e=>{var a,s,l,u,c,$,h,f,p,g;return g=class extends(d(ss,Xt,Et,on,us)(e)){constructor(){super(...arguments),a.add(this),s.set(this,void 0),l.set(this,void 0),$.set(this,(()=>n(this,void 0,void 0,(function*(){yield r(this,l,"f").setData(wn(this.state).map((({name:e})=>({value:e,label:e}))))})))),f.set(this,(()=>{var e,t;const n=null===(e=In(this.state))||void 0===e?void 0:e[0],r=Object.assign({loginId:null===(t=null==n?void 0:n.loginIds)||void 0===t?void 0:t.join(", "),displayName:null==n?void 0:n.name,email:null==n?void 0:n.email,phone:bu(null==n?void 0:n.phone),roles:null==n?void 0:n.roles},(o=n.customAttributes,d="customAttributes.",Object.fromEntries(Object.entries(o).map((([e,t])=>[`${d}${e}`,t])))));var o,d;this.setFormData(this.editUserModal.ele,r)}))}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var t;return n(this,void 0,void 0,(function*(){yield null===(t=e.onWidgetRootReady)||void 0===t?void 0:t.call(this),yield r(this,a,"m",p).call(this)}))}},s=new WeakMap,l=new WeakMap,$=new WeakMap,f=new WeakMap,a=new WeakSet,u=function(){const e=new C((()=>{var e;return null===(e=this.editUserModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-cancel"]')}),{logger:this.logger});e.onClick((()=>this.editUserModal.close()))},c=function(){const e=new C((()=>{var e;return null===(e=this.editUserModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-submit"]')}),{logger:this.logger});e.onClick((()=>{if(this.validateForm(this.editUserModal.ele)){const e=this.getFormData(this.editUserModal.ele),{loginId:n}=e,r=t(e,["loginId"]);this.actions.updateUser(Object.assign({loginId:n.split(", ")[0]},(e=>Object.entries(e).reduce(((e,[t,n])=>{const[r,...o]=t.split(".");return yu.includes(r)?(e[r]||(e[r]={}),e[r][o.join(".")]=n,e):Object.assign(e,{[t]:n})}),{}))(r))),this.editUserModal.close(),this.resetFormData(this.editUserModal.ele)}}))},h=function(){const e=kn(this.state);this.getFormFieldNames(this.editUserModal.ele).forEach((t=>{const[n,r]=t.split(".");if("customAttributes"!==n)return;const o=e.find((e=>e.name===r));o?o.editable||this.disableFormField(this.editUserModal.ele,t):this.removeFormField(this.editUserModal.ele,t)}))},p=function(){var e;return n(this,void 0,void 0,(function*(){this.editUserModal=this.createModal(),this.editUserModal.setContent(i(yield this.fetchWidgetPage("edit-user-modal.html"))),r(this,a,"m",u).call(this),r(this,a,"m",c).call(this),o(this,s,new j(null===(e=this.editUserModal.ele)||void 0===e?void 0:e.querySelector('[name="loginId"]'),{logger:this.logger}),"f"),o(this,l,new I((()=>{var e;return null===(e=this.editUserModal.ele)||void 0===e?void 0:e.querySelector('[data-id="roles-multiselect"]')}),{logger:this.logger}),"f"),this.editUserModal.beforeOpen=()=>n(this,void 0,void 0,(function*(){yield r(this,$,"f").call(this),r(this,s,"f").disable(),r(this,f,"f").call(this),r(this,a,"m",h).call(this)}))}))},g})),Ou=c((e=>{var t,o,i,a;return a=class extends(d(Et,us,ss,wu,on)(e)){constructor(){super(...arguments),t.add(this),i.set(this,s((e=>{e?this.editButton.enable():this.editButton.disable()})))}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var d;return n(this,void 0,void 0,(function*(){r(this,t,"m",o).call(this),yield null===(d=e.onWidgetRootReady)||void 0===d?void 0:d.call(this),this.subscribe(r(this,i,"f").bind(this),Un)}))}},i=new WeakMap,t=new WeakSet,o=function(){var e;this.editButton=new C(null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector('[data-id="edit-user"]'),{logger:this.logger}),this.editButton.disable(),this.editButton.onClick((()=>{this.editUserModal.open()}))},a})),Cu=c((e=>{var t,o,a,s,l;return l=class extends(d(ss,Xt,Et,on,us)(e)){constructor(){super(...arguments),t.add(this)}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var o;return n(this,void 0,void 0,(function*(){yield null===(o=e.onWidgetRootReady)||void 0===o?void 0:o.call(this),yield r(this,t,"m",s).call(this)}))}},t=new WeakSet,o=function(){const e=new C((()=>{var e;return null===(e=this.enableUserModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-cancel"]')}),{logger:this.logger});e.onClick((()=>this.enableUserModal.close()))},a=function(){const e=new C((()=>{var e;return null===(e=this.enableUserModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-submit"]')}),{logger:this.logger});e.onClick((()=>{const e=Rn(this.state);this.actions.enableUser(e),this.enableUserModal.close()}))},s=function(){var e;return n(this,void 0,void 0,(function*(){this.enableUserModal=this.createModal(),this.enableUserModal.setContent(i(yield this.fetchWidgetPage("enable-user-modal.html"))),r(this,t,"m",o).call(this),r(this,t,"m",a).call(this);const d=new x(null===(e=this.enableUserModal.ele)||void 0===e?void 0:e.querySelector('[data-id="body-text"]'),{logger:this.logger});this.enableUserModal.beforeOpen=()=>n(this,void 0,void 0,(function*(){const e=Nn(this.state);d.text=`Activate ${e}?`}))}))},l})),ku=c((e=>{var t,o,i,a;return a=class extends(d(Et,us,ss,Cu,on)(e)){constructor(){super(...arguments),t.add(this),i.set(this,s((e=>{e?this.enableButton.enable():this.enableButton.disable()})))}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var d;return n(this,void 0,void 0,(function*(){r(this,t,"m",o).call(this),yield null===(d=e.onWidgetRootReady)||void 0===d?void 0:d.call(this),this.subscribe(r(this,i,"f").bind(this),An)}))}},i=new WeakMap,t=new WeakSet,o=function(){var e;this.enableButton=new C(null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector('[data-id="enable-user"]'),{logger:this.logger}),this.enableButton.disable(),this.enableButton.onClick((()=>{this.enableUserModal.open()}))},a})),Pu=c((e=>{var t,o,i,a;return a=class extends(d(Et,us,ss)(e)){constructor(){super(...arguments),t.add(this),o.set(this,u((()=>{this.actions.searchUsers({text:this.searchInput.value})})))}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var o;return n(this,void 0,void 0,(function*(){yield null===(o=e.onWidgetRootReady)||void 0===o?void 0:o.call(this),r(this,t,"m",i).call(this)}))}},o=new WeakMap,t=new WeakSet,i=function(){var e;this.searchInput=new j(null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector('[data-id="search-input"]'),{logger:this.logger}),this.searchInput.onInput(r(this,o,"f"))},a}));const Iu={success:(new DOMParser).parseFromString('<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g id="Checkmark">\n<path id="Shape" d="M10.0485 15.6396C9.5799 15.171 8.8201 15.171 8.35147 15.6396C7.88284 16.1082 7.88284 16.868 8.35147 17.3367L12.7072 21.6924C13.1759 22.1611 13.9357 22.1611 14.4043 21.6924L24.7152 11.3815C25.1838 10.9129 25.1838 10.1531 24.7152 9.68448C24.2466 9.21585 23.4868 9.21585 23.0181 9.68448L13.5558 19.1469L10.0485 15.6396Z" fill="white"/>\n</g>\n</svg>\n',"image/svg+xml").firstChild,error:(new DOMParser).parseFromString('<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g id="Icon">\n<path id="Vector" d="M15.9998 26.6558C10.1118 26.6558 5.34375 21.8878 5.34375 15.9998C5.34375 10.1118 10.1118 5.34375 15.9998 5.34375C21.8878 5.34375 26.6558 10.1118 26.6558 15.9998C26.6558 21.8878 21.8878 26.6558 15.9998 26.6558ZM15.9998 24.4798C20.6718 24.4798 24.4798 20.7038 24.4798 15.9998C24.4798 11.3278 20.7038 7.51975 15.9998 7.51975C11.3278 7.51975 7.51975 11.2958 7.51975 15.9998C7.51975 20.6718 11.2958 24.4798 15.9998 24.4798ZM15.3278 9.34375H16.6718C17.0558 9.34375 17.3438 9.63175 17.3118 9.98375L16.9598 16.9278C16.9598 17.1838 16.7678 17.3438 16.5438 17.3438H15.4558C15.2318 17.3438 15.0398 17.1518 15.0398 16.9278L14.6878 9.98375C14.6878 9.63175 14.9758 9.34375 15.3278 9.34375ZM15.4558 19.4558H16.5438C16.9278 19.4558 17.2158 19.7438 17.1838 20.1278V21.1838C17.1838 21.5678 16.8958 21.8558 16.5438 21.8558H15.4558C15.0718 21.8558 14.7838 21.5678 14.7838 21.1838V20.1278C14.7838 19.7438 15.0718 19.4558 15.4558 19.4558Z" fill="#FFDFDD"/>\n</g>\n</svg>\n',"image/svg+xml").firstChild},Su=c((e=>{var t,o,i,a,l;return l=class extends(d(Et,ss,en,Nt)(e)){constructor(){super(...arguments),t.add(this),a.set(this,s((e=>{e.length&&(e.forEach((({type:e,msg:n})=>{const d=r(this,t,"m",i).call(this,e);d.setContent(r(this,t,"m",o).call(this,{type:e,msg:n})),d.show()})),setTimeout((()=>this.actions.clearNotifications())))})))}init(){const e=Object.create(null,{init:{get:()=>super.init}});var t;return n(this,void 0,void 0,(function*(){yield null===(t=e.init)||void 0===t?void 0:t.call(this),this.subscribe(r(this,a,"f").bind(this),Cn)}))}},a=new WeakMap,t=new WeakSet,o=function({type:e,msg:t}){const n=Iu[e],r=Object.assign((new DOMParser).parseFromString('<svg width="2em" height="2em" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g id="Icon">\n<path id="Shape" d="M10.6712 12L7.27521 8.60406C6.90826 8.23711 6.90826 7.64216 7.27521 7.27521C7.64216 6.90826 8.23711 6.90826 8.60406 7.27521L12 10.6712L15.3959 7.27521C15.7629 6.90826 16.3578 6.90826 16.7248 7.27521C17.0917 7.64216 17.0917 8.23711 16.7248 8.60406L13.3288 12L16.7248 15.3959C17.0917 15.7629 17.0917 16.3578 16.7248 16.7248C16.3578 17.0917 15.7629 17.0917 15.3959 16.7248L12 13.3288L8.60406 16.7248C8.23711 17.0917 7.64216 17.0917 7.27521 16.7248C6.90826 16.3578 6.90826 15.7629 7.27521 15.3959L10.6712 12Z" fill="white"/>\n</g>\n</svg>\n',"image/svg+xml").firstChild,{slot:"close"});return`${(null==n?void 0:n.outerHTML)||""}${t}${r.outerHTML}`},i=function(e){return this.createNotification({mode:e,duration:"error"===e?0:3e3,position:"bottom-start",size:"sm"})},l})),xu=c((e=>{var t,o,a,s,l;return l=class extends(d(ss,Xt,Et,on,us)(e)){constructor(){super(...arguments),t.add(this)}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var o;return n(this,void 0,void 0,(function*(){yield null===(o=e.onWidgetRootReady)||void 0===o?void 0:o.call(this),yield r(this,t,"m",s).call(this)}))}},t=new WeakSet,o=function(){const e=new C((()=>{var e;return null===(e=this.removePasskeyModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-cancel"]')}),{logger:this.logger});e.onClick((()=>this.removePasskeyModal.close()))},a=function(){const e=new C((()=>{var e;return null===(e=this.removePasskeyModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-submit"]')}),{logger:this.logger});e.onClick((()=>{const e=Rn(this.state);this.actions.removePasskey(e),this.removePasskeyModal.close()}))},s=function(){var e;return n(this,void 0,void 0,(function*(){this.removePasskeyModal=this.createModal(),this.removePasskeyModal.setContent(i(yield this.fetchWidgetPage("remove-passkey-modal.html"))),r(this,t,"m",o).call(this),r(this,t,"m",a).call(this);const d=new x(null===(e=this.removePasskeyModal.ele)||void 0===e?void 0:e.querySelector('[data-id="body-text"]'),{logger:this.logger});this.removePasskeyModal.beforeOpen=()=>n(this,void 0,void 0,(function*(){const e=Nn(this.state);d.text=`Remove passkey for ${e}?`}))}))},l})),ju=c((e=>{var t,o,i,a;return a=class extends(d(Et,us,ss,xu,on)(e)){constructor(){super(...arguments),t.add(this),i.set(this,s((e=>{e?this.removePasskeyButton.enable():this.removePasskeyButton.disable()})))}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var d;return n(this,void 0,void 0,(function*(){r(this,t,"m",o).call(this),yield null===(d=e.onWidgetRootReady)||void 0===d?void 0:d.call(this),this.subscribe(r(this,i,"f").bind(this),Ln)}))}},i=new WeakMap,t=new WeakSet,o=function(){var e;this.removePasskeyButton=new C(null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector('[data-id="remove-passkey"]'),{logger:this.logger}),this.removePasskeyButton.disable(),this.removePasskeyButton.onClick((()=>{this.removePasskeyModal.open()}))},a})),Eu=c((e=>{var t,o,i,a,l,c;return c=class extends(d(ss,Et,us)(e)){constructor(){super(...arguments),t.add(this),i.set(this,s((e=>{this.usersTable.data=e}))),a.set(this,u(((e,t)=>{const n=[],{value:r}=t;if(r){const t=e.path;n.push({field:t,desc:"desc"===r})}this.actions.searchUsers({sort:n})}))),l.set(this,s((e=>{this.usersTable.filterColumns((t=>{var n;const[r,o]=(null===(n=t.path)||void 0===n?void 0:n.split("."))||[];return"customAttributes"!==r||!!e.find((e=>e.name===o))}))})))}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var d;return n(this,void 0,void 0,(function*(){yield null===(d=e.onWidgetRootReady)||void 0===d?void 0:d.call(this),r(this,t,"m",o).call(this),this.usersTable.columns.forEach((e=>{e.onSortDirectionChange((e=>{r(this,a,"f").call(this,e.target,e.detail)}))})),r(this,i,"f").call(this,Pn(this.state)),r(this,l,"f").call(this,kn(this.state)),this.subscribe(r(this,l,"f").bind(this),kn),this.subscribe(r(this,i,"f").bind(this),Pn)}))}},i=new WeakMap,a=new WeakMap,l=new WeakMap,t=new WeakSet,o=function(){var e;this.usersTable=new O(null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector('[data-id="users-table"]'),{logger:this.logger}),this.usersTable.onSelectedItemsChange((e=>{this.actions.setSelectedUsersIds(e.detail.value.map((({loginIds:e})=>e)))}))},c})),Ru=c((e=>{var t,o,a;return a=class extends(d(ss,Xt,Et,on,us)(e)){constructor(){super(...arguments),t.add(this)}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var d;return n(this,void 0,void 0,(function*(){yield null===(d=e.onWidgetRootReady)||void 0===d?void 0:d.call(this),yield r(this,t,"m",o).call(this)}))}},t=new WeakSet,o=function(){return n(this,void 0,void 0,(function*(){this.generatedPasswordModal=this.createModal(),this.generatedPasswordModal.setContent(i(yield this.fetchWidgetPage("generated-password-modal.html")));const e=new C((()=>{var e;return null===(e=this.generatedPasswordModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-close"]')}),{logger:this.logger});e.onClick((()=>{navigator.clipboard.writeText(this.getFormData(this.generatedPasswordModal.ele)["generated-password"]),this.resetFormData(this.generatedPasswordModal.ele),this.generatedPasswordModal.close()}))}))},a})),Mu=c((e=>{var t,o,a,s,l;return l=class extends(d(ss,Xt,Et,on,us,Ru)(e)){constructor(){super(...arguments),t.add(this)}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var o;return n(this,void 0,void 0,(function*(){yield null===(o=e.onWidgetRootReady)||void 0===o?void 0:o.call(this),yield r(this,t,"m",s).call(this)}))}},t=new WeakSet,o=function(){const e=new C((()=>{var e;return null===(e=this.resetPasswordModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-cancel"]')}),{logger:this.logger});e.onClick((()=>this.resetPasswordModal.close()))},a=function(){const e=new C((()=>{var e;return null===(e=this.resetPasswordModal.ele)||void 0===e?void 0:e.querySelector('[data-id="modal-submit"]')}),{logger:this.logger});e.onClick((()=>n(this,void 0,void 0,(function*(){var e;const t=Rn(this.state),n=yield this.actions.setTempUserPassword(t);this.resetPasswordModal.close(),this.setFormData(this.generatedPasswordModal.ele,{"generated-password":null===(e=null==n?void 0:n.payload)||void 0===e?void 0:e.cleartext}),this.generatedPasswordModal.open()}))))},s=function(){var e;return n(this,void 0,void 0,(function*(){this.resetPasswordModal=this.createModal(),this.resetPasswordModal.setContent(i(yield this.fetchWidgetPage("reset-password-modal.html"))),r(this,t,"m",o).call(this),r(this,t,"m",a).call(this);const d=new x(null===(e=this.resetPasswordModal.ele)||void 0===e?void 0:e.querySelector('[data-id="body-text"]'),{logger:this.logger});this.resetPasswordModal.beforeOpen=()=>n(this,void 0,void 0,(function*(){const e=Nn(this.state);d.text=`Reset password for ${e}?`}))}))},l})),_u=c((e=>{var t,o,i,a;return a=class extends(d(Et,us,ss,Mu,on)(e)){constructor(){super(...arguments),t.add(this),i.set(this,s((e=>{e?this.resetPasswordButton.enable():this.resetPasswordButton.disable()})))}onWidgetRootReady(){const e=Object.create(null,{onWidgetRootReady:{get:()=>super.onWidgetRootReady}});var d;return n(this,void 0,void 0,(function*(){r(this,t,"m",o).call(this),yield null===(d=e.onWidgetRootReady)||void 0===d?void 0:d.call(this),this.subscribe(r(this,i,"f").bind(this),Dn)}))}},i=new WeakMap,t=new WeakSet,o=function(){var e;this.resetPasswordButton=new C(null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector('[data-id="reset-password"]'),{logger:this.logger}),this.resetPasswordButton.disable(),this.resetPasswordButton.onClick((()=>{this.resetPasswordModal.open()}))},a})),Nu=c((e=>class extends(d(Wt,nn,Eu,$s,fs,Ou,ku,gs,_u,ju,Pu,Su)(e)){init(){const e=Object.create(null,{init:{get:()=>super.init}});var t;return n(this,void 0,void 0,(function*(){yield null===(t=e.init)||void 0===t?void 0:t.call(this)}))}})),Au=d((e=>class extends(Nu(e)){}))(HTMLElement);return customElements.define("descope-user-management-widget",Au),Au}();
4
7
  //# sourceMappingURL=index.js.map