@thefittingroom/shop-ui 0.0.1

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.
@@ -0,0 +1,3171 @@
1
+ /*!
2
+ * thefittingroom v0.0.1 (2023-07-18T18:27:14.496Z)
3
+ * Copyright 2022-present, TheFittingRoom, Inc. All rights reserved.
4
+ */
5
+ /*!
6
+ * thefittingroom v0.0.3 (2023-07-18T18:14:19.719Z)
7
+ * Copyright 2022-present, TheFittingRoom, Inc. All rights reserved.
8
+ */
9
+ /**
10
+ * @license
11
+ * Copyright 2017 Google LLC
12
+ *
13
+ * Licensed under the Apache License, Version 2.0 (the "License");
14
+ * you may not use this file except in compliance with the License.
15
+ * You may obtain a copy of the License at
16
+ *
17
+ * http://www.apache.org/licenses/LICENSE-2.0
18
+ *
19
+ * Unless required by applicable law or agreed to in writing, software
20
+ * distributed under the License is distributed on an "AS IS" BASIS,
21
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
+ * See the License for the specific language governing permissions and
23
+ * limitations under the License.
24
+ */
25
+ /**
26
+ * @license
27
+ * Copyright 2017 Google LLC
28
+ *
29
+ * Licensed under the Apache License, Version 2.0 (the "License");
30
+ * you may not use this file except in compliance with the License.
31
+ * You may obtain a copy of the License at
32
+ *
33
+ * http://www.apache.org/licenses/LICENSE-2.0
34
+ *
35
+ * Unless required by applicable law or agreed to in writing, software
36
+ * distributed under the License is distributed on an "AS IS" BASIS,
37
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
38
+ * See the License for the specific language governing permissions and
39
+ * limitations under the License.
40
+ */
41
+ const e=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296==(64512&i)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},t={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let t=0;t<e.length;t+=3){const i=e[t],s=t+1<e.length,o=s?e[t+1]:0,d=t+2<e.length,a=d?e[t+2]:0,c=i>>2,l=(3&i)<<4|o>>4;let u=(15&o)<<2|a>>6,h=63&a;d||(h=64,s||(u=64)),r.push(n[c],n[l],n[u],n[h])}return r.join("")},encodeString(t,n){return this.HAS_NATIVE_SUPPORT&&!n?btoa(t):this.encodeByteArray(e(t),n)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let n=0,r=0;for(;n<e.length;){const i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){const s=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&s)}else if(i>239&&i<365){const s=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(s>>10)),t[r++]=String.fromCharCode(56320+(1023&s))}else{const s=e[n++],o=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&s)<<6|63&o)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let t=0;t<e.length;){const i=n[e.charAt(t++)],s=t<e.length?n[e.charAt(t)]:0;++t;const o=t<e.length?n[e.charAt(t)]:64;++t;const d=t<e.length?n[e.charAt(t)]:64;if(++t,null==i||null==s||null==o||null==d)throw Error();const a=i<<2|s>>4;if(r.push(a),64!==o){const e=s<<4&240|o>>2;if(r.push(e),64!==d){const e=o<<6&192|d;r.push(e)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},n=function(n){return function(n){const r=e(n);return t.encodeByteArray(r,!0)}(n).replace(/\./g,"")},r=function(e){try{return t.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};
42
+ /**
43
+ * @license
44
+ * Copyright 2017 Google LLC
45
+ *
46
+ * Licensed under the Apache License, Version 2.0 (the "License");
47
+ * you may not use this file except in compliance with the License.
48
+ * You may obtain a copy of the License at
49
+ *
50
+ * http://www.apache.org/licenses/LICENSE-2.0
51
+ *
52
+ * Unless required by applicable law or agreed to in writing, software
53
+ * distributed under the License is distributed on an "AS IS" BASIS,
54
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
55
+ * See the License for the specific language governing permissions and
56
+ * limitations under the License.
57
+ */
58
+ function i(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}
59
+ /**
60
+ * @license
61
+ * Copyright 2022 Google LLC
62
+ *
63
+ * Licensed under the Apache License, Version 2.0 (the "License");
64
+ * you may not use this file except in compliance with the License.
65
+ * You may obtain a copy of the License at
66
+ *
67
+ * http://www.apache.org/licenses/LICENSE-2.0
68
+ *
69
+ * Unless required by applicable law or agreed to in writing, software
70
+ * distributed under the License is distributed on an "AS IS" BASIS,
71
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
72
+ * See the License for the specific language governing permissions and
73
+ * limitations under the License.
74
+ */
75
+ const s=()=>function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__,o=()=>{try{return s()||(()=>{if("undefined"==typeof process||void 0===process.env)return;const e=process.env.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"==typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}const t=e&&r(e[1]);return t&&JSON.parse(t)})()}catch(e){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`)}},d=e=>{var t,n;return null===(n=null===(t=o())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]},a=e=>{var t;return null===(t=o())||void 0===t?void 0:t[`_${e}`]};
76
+ /**
77
+ * @license
78
+ * Copyright 2017 Google LLC
79
+ *
80
+ * Licensed under the Apache License, Version 2.0 (the "License");
81
+ * you may not use this file except in compliance with the License.
82
+ * You may obtain a copy of the License at
83
+ *
84
+ * http://www.apache.org/licenses/LICENSE-2.0
85
+ *
86
+ * Unless required by applicable law or agreed to in writing, software
87
+ * distributed under the License is distributed on an "AS IS" BASIS,
88
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
89
+ * See the License for the specific language governing permissions and
90
+ * limitations under the License.
91
+ */
92
+ class c{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"==typeof e&&(this.promise.catch((()=>{})),1===e.length?e(t):e(t,n))}}}
93
+ /**
94
+ * @license
95
+ * Copyright 2021 Google LLC
96
+ *
97
+ * Licensed under the Apache License, Version 2.0 (the "License");
98
+ * you may not use this file except in compliance with the License.
99
+ * You may obtain a copy of the License at
100
+ *
101
+ * http://www.apache.org/licenses/LICENSE-2.0
102
+ *
103
+ * Unless required by applicable law or agreed to in writing, software
104
+ * distributed under the License is distributed on an "AS IS" BASIS,
105
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
106
+ * See the License for the specific language governing permissions and
107
+ * limitations under the License.
108
+ */class l extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,l.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,u.prototype.create)}}class u{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){const n=t[0]||{},r=`${this.service}/${e}`,i=this.errors[e],s=i?function(e,t){return e.replace(h,((e,n)=>{const r=t[n];return null!=r?String(r):`<${n}?>`}))}(i,n):"Error",o=`${this.serviceName}: ${s} (${r}).`;return new l(r,o,n)}}const h=/\{\$([^}]+)}/g;function f(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const i of n){if(!r.includes(i))return!1;const n=e[i],s=t[i];if(A(n)&&A(s)){if(!f(n,s))return!1}else if(n!==s)return!1}for(const e of r)if(!n.includes(e))return!1;return!0}function A(e){return null!==e&&"object"==typeof e}
109
+ /**
110
+ * @license
111
+ * Copyright 2017 Google LLC
112
+ *
113
+ * Licensed under the Apache License, Version 2.0 (the "License");
114
+ * you may not use this file except in compliance with the License.
115
+ * You may obtain a copy of the License at
116
+ *
117
+ * http://www.apache.org/licenses/LICENSE-2.0
118
+ *
119
+ * Unless required by applicable law or agreed to in writing, software
120
+ * distributed under the License is distributed on an "AS IS" BASIS,
121
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
122
+ * See the License for the specific language governing permissions and
123
+ * limitations under the License.
124
+ */function N(e){const t=[];for(const[n,r]of Object.entries(e))Array.isArray(r)?r.forEach((e=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))})):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}function p(e){const t={};return e.replace(/^\?/,"").split("&").forEach((e=>{if(e){const[n,r]=e.split("=");t[decodeURIComponent(n)]=decodeURIComponent(r)}})),t}function m(e){const t=e.indexOf("?");if(!t)return"";const n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}class g{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then((()=>{e(this)})).catch((e=>{this.error(e)}))}next(e){this.forEachObserver((t=>{t.next(e)}))}error(e){this.forEachObserver((t=>{t.error(e)})),this.close(e)}complete(){this.forEachObserver((e=>{e.complete()})),this.close()}subscribe(e,t,n){let r;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");r=function(e,t){if("object"!=typeof e||null===e)return!1;for(const n of t)if(n in e&&"function"==typeof e[n])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n},void 0===r.next&&(r.next=$),void 0===r.error&&(r.error=$),void 0===r.complete&&(r.complete=$);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(e){}})),this.observers.push(r),i}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then((()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}}))}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((()=>{this.observers=void 0,this.onNoObservers=void 0})))}}function $(){}
125
+ /**
126
+ * @license
127
+ * Copyright 2021 Google LLC
128
+ *
129
+ * Licensed under the Apache License, Version 2.0 (the "License");
130
+ * you may not use this file except in compliance with the License.
131
+ * You may obtain a copy of the License at
132
+ *
133
+ * http://www.apache.org/licenses/LICENSE-2.0
134
+ *
135
+ * Unless required by applicable law or agreed to in writing, software
136
+ * distributed under the License is distributed on an "AS IS" BASIS,
137
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
138
+ * See the License for the specific language governing permissions and
139
+ * limitations under the License.
140
+ */function y(e){return e&&e._delegate?e._delegate:e}class v{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}
141
+ /**
142
+ * @license
143
+ * Copyright 2019 Google LLC
144
+ *
145
+ * Licensed under the Apache License, Version 2.0 (the "License");
146
+ * you may not use this file except in compliance with the License.
147
+ * You may obtain a copy of the License at
148
+ *
149
+ * http://www.apache.org/licenses/LICENSE-2.0
150
+ *
151
+ * Unless required by applicable law or agreed to in writing, software
152
+ * distributed under the License is distributed on an "AS IS" BASIS,
153
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
154
+ * See the License for the specific language governing permissions and
155
+ * limitations under the License.
156
+ */const w="[DEFAULT]";
157
+ /**
158
+ * @license
159
+ * Copyright 2019 Google LLC
160
+ *
161
+ * Licensed under the Apache License, Version 2.0 (the "License");
162
+ * you may not use this file except in compliance with the License.
163
+ * You may obtain a copy of the License at
164
+ *
165
+ * http://www.apache.org/licenses/LICENSE-2.0
166
+ *
167
+ * Unless required by applicable law or agreed to in writing, software
168
+ * distributed under the License is distributed on an "AS IS" BASIS,
169
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
170
+ * See the License for the specific language governing permissions and
171
+ * limitations under the License.
172
+ */class b{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new c;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const n=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),r=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(e){if(r)return null;throw e}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}
173
+ /**
174
+ * @license
175
+ * Copyright 2019 Google LLC
176
+ *
177
+ * Licensed under the Apache License, Version 2.0 (the "License");
178
+ * you may not use this file except in compliance with the License.
179
+ * You may obtain a copy of the License at
180
+ *
181
+ * http://www.apache.org/licenses/LICENSE-2.0
182
+ *
183
+ * Unless required by applicable law or agreed to in writing, software
184
+ * distributed under the License is distributed on an "AS IS" BASIS,
185
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
186
+ * See the License for the specific language governing permissions and
187
+ * limitations under the License.
188
+ */(e))try{this.getOrInitializeService({instanceIdentifier:w})}catch(e){}for(const[e,t]of this.instancesDeferred.entries()){const n=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(e){}}}}clearInstance(e=w){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter((e=>"INTERNAL"in e)).map((e=>e.INTERNAL.delete())),...e.filter((e=>"_delete"in e)).map((e=>e._delete()))])}isComponentSet(){return null!=this.component}isInitialized(e=w){return this.instances.has(e)}getOptions(e=w){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[e,t]of this.instancesDeferred.entries()){n===this.normalizeInstanceIdentifier(e)&&t.resolve(r)}return r}onInit(e,t){var n;const r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);const s=this.instances.get(r);return s&&e(s,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(n)for(const r of n)try{r(e,t)}catch(e){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:(r=e,r===w?void 0:r),options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch(e){}var r;return n||null}normalizeInstanceIdentifier(e=w){return this.component?this.component.multipleInstances?e:w:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class C{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new b(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}
189
+ /**
190
+ * @license
191
+ * Copyright 2017 Google LLC
192
+ *
193
+ * Licensed under the Apache License, Version 2.0 (the "License");
194
+ * you may not use this file except in compliance with the License.
195
+ * You may obtain a copy of the License at
196
+ *
197
+ * http://www.apache.org/licenses/LICENSE-2.0
198
+ *
199
+ * Unless required by applicable law or agreed to in writing, software
200
+ * distributed under the License is distributed on an "AS IS" BASIS,
201
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
+ * See the License for the specific language governing permissions and
203
+ * limitations under the License.
204
+ */var E;!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(E||(E={}));const I={debug:E.DEBUG,verbose:E.VERBOSE,info:E.INFO,warn:E.WARN,error:E.ERROR,silent:E.SILENT},T=E.INFO,S={[E.DEBUG]:"log",[E.VERBOSE]:"log",[E.INFO]:"info",[E.WARN]:"warn",[E.ERROR]:"error"},_=(e,t,...n)=>{if(t<e.logLevel)return;const r=(new Date).toISOString(),i=S[t];if(!i)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[i](`[${r}] ${e.name}:`,...n)};class k{constructor(e){this.name=e,this._logLevel=T,this._logHandler=_,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in E))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?I[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,E.DEBUG,...e),this._logHandler(this,E.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,E.VERBOSE,...e),this._logHandler(this,E.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,E.INFO,...e),this._logHandler(this,E.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,E.WARN,...e),this._logHandler(this,E.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,E.ERROR,...e),this._logHandler(this,E.ERROR,...e)}}let D,R;const L=new WeakMap,x=new WeakMap,O=new WeakMap,M=new WeakMap,P=new WeakMap;let U={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return x.get(e);if("objectStoreNames"===t)return e.objectStoreNames||O.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return B(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function F(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(R||(R=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(q(this),t),B(L.get(this))}:function(...t){return B(e.apply(q(this),t))}:function(t,...n){const r=e.call(q(this),t,...n);return O.set(r,t.sort?t.sort():[t]),B(r)}}function V(e){return"function"==typeof e?F(e):(e instanceof IDBTransaction&&function(e){if(x.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",s),e.removeEventListener("abort",s)},i=()=>{t(),r()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",s),e.addEventListener("abort",s)}));x.set(e,t)}(e),t=e,(D||(D=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((e=>t instanceof e))?new Proxy(e,U):e);var t}function B(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",s)},i=()=>{t(B(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",s)}));return t.then((t=>{t instanceof IDBCursor&&L.set(t,e)})).catch((()=>{})),P.set(t,e),t}(e);if(M.has(e))return M.get(e);const t=V(e);return t!==e&&(M.set(e,t),P.set(t,e)),t}const q=e=>P.get(e);const j=["get","getKey","getAll","getAllKeys","count"],G=["put","add","delete","clear"],z=new Map;function K(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(z.get(t))return z.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=G.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!j.includes(n))return;const s=async function(e,...t){const s=this.transaction(e,i?"readwrite":"readonly");let o=s.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),i&&s.done]))[0]};return z.set(t,s),s}U=(e=>({...e,get:(t,n,r)=>K(t,n)||e.get(t,n,r),has:(t,n)=>!!K(t,n)||e.has(t,n)}))(U);
205
+ /**
206
+ * @license
207
+ * Copyright 2019 Google LLC
208
+ *
209
+ * Licensed under the Apache License, Version 2.0 (the "License");
210
+ * you may not use this file except in compliance with the License.
211
+ * You may obtain a copy of the License at
212
+ *
213
+ * http://www.apache.org/licenses/LICENSE-2.0
214
+ *
215
+ * Unless required by applicable law or agreed to in writing, software
216
+ * distributed under the License is distributed on an "AS IS" BASIS,
217
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
218
+ * See the License for the specific language governing permissions and
219
+ * limitations under the License.
220
+ */
221
+ class H{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const W="@firebase/app",Q="0.9.0",Y=new k("@firebase/app"),J="[DEFAULT]",X={[W]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},Z=new Map,ee=new Map;function te(e,t){try{e.container.addComponent(t)}catch(n){Y.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function ne(e){const t=e.name;if(ee.has(t))return Y.debug(`There were multiple attempts to register component ${t}.`),!1;ee.set(t,e);for(const t of Z.values())te(t,e);return!0}function re(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}
222
+ /**
223
+ * @license
224
+ * Copyright 2019 Google LLC
225
+ *
226
+ * Licensed under the Apache License, Version 2.0 (the "License");
227
+ * you may not use this file except in compliance with the License.
228
+ * You may obtain a copy of the License at
229
+ *
230
+ * http://www.apache.org/licenses/LICENSE-2.0
231
+ *
232
+ * Unless required by applicable law or agreed to in writing, software
233
+ * distributed under the License is distributed on an "AS IS" BASIS,
234
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
235
+ * See the License for the specific language governing permissions and
236
+ * limitations under the License.
237
+ */const ie=new u("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."});
238
+ /**
239
+ * @license
240
+ * Copyright 2019 Google LLC
241
+ *
242
+ * Licensed under the Apache License, Version 2.0 (the "License");
243
+ * you may not use this file except in compliance with the License.
244
+ * You may obtain a copy of the License at
245
+ *
246
+ * http://www.apache.org/licenses/LICENSE-2.0
247
+ *
248
+ * Unless required by applicable law or agreed to in writing, software
249
+ * distributed under the License is distributed on an "AS IS" BASIS,
250
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
251
+ * See the License for the specific language governing permissions and
252
+ * limitations under the License.
253
+ */
254
+ class se{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new v("app",(()=>this),"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw ie.create("app-deleted",{appName:this._name})}}
255
+ /**
256
+ * @license
257
+ * Copyright 2019 Google LLC
258
+ *
259
+ * Licensed under the Apache License, Version 2.0 (the "License");
260
+ * you may not use this file except in compliance with the License.
261
+ * You may obtain a copy of the License at
262
+ *
263
+ * http://www.apache.org/licenses/LICENSE-2.0
264
+ *
265
+ * Unless required by applicable law or agreed to in writing, software
266
+ * distributed under the License is distributed on an "AS IS" BASIS,
267
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
268
+ * See the License for the specific language governing permissions and
269
+ * limitations under the License.
270
+ */const oe="9.15.0";function de(e,t={}){let n=e;if("object"!=typeof t){t={name:t}}const r=Object.assign({name:J,automaticDataCollectionEnabled:!1},t),i=r.name;if("string"!=typeof i||!i)throw ie.create("bad-app-name",{appName:String(i)});if(n||(n=(()=>{var e;return null===(e=o())||void 0===e?void 0:e.config})()),!n)throw ie.create("no-options");const s=Z.get(i);if(s){if(f(n,s.options)&&f(r,s.config))return s;throw ie.create("duplicate-app",{appName:i})}const d=new C(i);for(const e of ee.values())d.addComponent(e);const a=new se(n,r,d);return Z.set(i,a),a}function ae(e=J){const t=Z.get(e);if(!t&&e===J)return de();if(!t)throw ie.create("no-app",{appName:e});return t}function ce(e,t,n){var r;let i=null!==(r=X[e])&&void 0!==r?r:e;n&&(i+=`-${n}`);const s=i.match(/\s|\//),o=t.match(/\s|\//);if(s||o){const e=[`Unable to register library "${i}" with version "${t}":`];return s&&e.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&o&&e.push("and"),o&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void Y.warn(e.join(" "))}ne(new v(`${i}-version`,(()=>({library:i,version:t})),"VERSION"))}
271
+ /**
272
+ * @license
273
+ * Copyright 2021 Google LLC
274
+ *
275
+ * Licensed under the Apache License, Version 2.0 (the "License");
276
+ * you may not use this file except in compliance with the License.
277
+ * You may obtain a copy of the License at
278
+ *
279
+ * http://www.apache.org/licenses/LICENSE-2.0
280
+ *
281
+ * Unless required by applicable law or agreed to in writing, software
282
+ * distributed under the License is distributed on an "AS IS" BASIS,
283
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
284
+ * See the License for the specific language governing permissions and
285
+ * limitations under the License.
286
+ */const le="firebase-heartbeat-store";let ue=null;function he(){return ue||(ue=function(e,t,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){const o=indexedDB.open(e,t),d=B(o);return r&&o.addEventListener("upgradeneeded",(e=>{r(B(o.result),e.oldVersion,e.newVersion,B(o.transaction))})),n&&o.addEventListener("blocked",(()=>n())),d.then((e=>{s&&e.addEventListener("close",(()=>s())),i&&e.addEventListener("versionchange",(()=>i()))})).catch((()=>{})),d}("firebase-heartbeat-database",1,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(le)}}).catch((e=>{throw ie.create("idb-open",{originalErrorMessage:e.message})}))),ue}async function fe(e,t){try{const n=(await he()).transaction(le,"readwrite"),r=n.objectStore(le);return await r.put(t,Ae(e)),n.done}catch(e){if(e instanceof l)Y.warn(e.message);else{const t=ie.create("idb-set",{originalErrorMessage:null==e?void 0:e.message});Y.warn(t.message)}}}function Ae(e){return`${e.name}!${e.options.appId}`}
287
+ /**
288
+ * @license
289
+ * Copyright 2021 Google LLC
290
+ *
291
+ * Licensed under the Apache License, Version 2.0 (the "License");
292
+ * you may not use this file except in compliance with the License.
293
+ * You may obtain a copy of the License at
294
+ *
295
+ * http://www.apache.org/licenses/LICENSE-2.0
296
+ *
297
+ * Unless required by applicable law or agreed to in writing, software
298
+ * distributed under the License is distributed on an "AS IS" BASIS,
299
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
300
+ * See the License for the specific language governing permissions and
301
+ * limitations under the License.
302
+ */class Ne{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new me(t),this._heartbeatsCachePromise=this._storage.read().then((e=>(this._heartbeatsCache=e,e)))}async triggerHeartbeat(){const e=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),t=pe();if(null===this._heartbeatsCache&&(this._heartbeatsCache=await this._heartbeatsCachePromise),this._heartbeatsCache.lastSentHeartbeatDate!==t&&!this._heartbeatsCache.heartbeats.some((e=>e.date===t)))return this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter((e=>{const t=new Date(e.date).valueOf();return Date.now()-t<=2592e6})),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null===this._heartbeatsCache||0===this._heartbeatsCache.heartbeats.length)return"";const e=pe(),{heartbeatsToSend:t,unsentEntries:r}=function(e,t=1024){const n=[];let r=e.slice();for(const i of e){const e=n.find((e=>e.agent===i.agent));if(e){if(e.dates.push(i.date),ge(n)>t){e.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),ge(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),i=n(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}}function pe(){return(new Date).toISOString().substring(0,10)}class me{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!function(){try{return"object"==typeof indexedDB}catch(e){return!1}}()&&new Promise(((e,t)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(e){t(e)}})).then((()=>!0)).catch((()=>!1))}async read(){if(await this._canUseIndexedDBPromise){const e=await async function(e){try{return(await he()).transaction(le).objectStore(le).get(Ae(e))}catch(e){if(e instanceof l)Y.warn(e.message);else{const t=ie.create("idb-get",{originalErrorMessage:null==e?void 0:e.message});Y.warn(t.message)}}}(this.app);return e||{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const n=await this.read();return fe(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;if(await this._canUseIndexedDBPromise){const n=await this.read();return fe(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}}}function ge(e){return n(JSON.stringify({version:2,heartbeats:e})).length}
303
+ /**
304
+ * @license
305
+ * Copyright 2019 Google LLC
306
+ *
307
+ * Licensed under the Apache License, Version 2.0 (the "License");
308
+ * you may not use this file except in compliance with the License.
309
+ * You may obtain a copy of the License at
310
+ *
311
+ * http://www.apache.org/licenses/LICENSE-2.0
312
+ *
313
+ * Unless required by applicable law or agreed to in writing, software
314
+ * distributed under the License is distributed on an "AS IS" BASIS,
315
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
316
+ * See the License for the specific language governing permissions and
317
+ * limitations under the License.
318
+ */var $e;$e="",ne(new v("platform-logger",(e=>new H(e)),"PRIVATE")),ne(new v("heartbeat",(e=>new Ne(e)),"PRIVATE")),ce(W,Q,$e),ce(W,Q,"esm2017"),ce("fire-js","");var ye=function(e,t){return ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ye(e,t)};function ve(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function we(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,s=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return o}var be,Ce="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Ee=Ee||{},Ie=Ce||self;function Te(){}function Se(e){var t=typeof e;return"array"==(t="object"!=t?t:e?Array.isArray(e)?"array":t:"null")||"object"==t&&"number"==typeof e.length}function _e(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}var ke="closure_uid_"+(1e9*Math.random()>>>0),De=0;function Re(e,t,n){return e.call.apply(e.bind,arguments)}function Le(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function xe(e,t,n){return(xe=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?Re:Le).apply(null,arguments)}function Oe(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}function Me(e,t){function n(){}n.prototype=t.prototype,e.X=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Wb=function(e,n,r){for(var i=Array(arguments.length-2),s=2;s<arguments.length;s++)i[s-2]=arguments[s];return t.prototype[n].apply(e,i)}}function Pe(){this.s=this.s,this.o=this.o}Pe.prototype.s=!1,Pe.prototype.na=function(){var e;!this.s&&(this.s=!0,this.M(),0)&&(e=this,Object.prototype.hasOwnProperty.call(e,ke)&&e[ke]||(e[ke]=++De))},Pe.prototype.M=function(){if(this.o)for(;this.o.length;)this.o.shift()()};var Ue=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"==typeof e)return"string"!=typeof t||1!=t.length?-1:e.indexOf(t,0);for(var n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1};function Fe(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]}function Ve(e,t){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(Se(r)){var i=e.length||0,s=r.length||0;e.length=i+s;for(var o=0;o<s;o++)e[i+o]=r[o]}else e.push(r)}}function Be(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}Be.prototype.h=function(){this.defaultPrevented=!0};var qe=function(){if(!Ie.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{Ie.addEventListener("test",Te,t),Ie.removeEventListener("test",Te,t)}catch(e){}return e}();function je(e){return/^[\s\xa0]*$/.test(e)}var Ge=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]};function ze(e,t){return e<t?-1:e>t?1:0}function Ke(){var e=Ie.navigator;return e&&(e=e.userAgent)?e:""}function He(e){return-1!=Ke().indexOf(e)}function We(e){return We[" "](e),e}We[" "]=Te;var Qe,Ye,Je=He("Opera"),Xe=He("Trident")||He("MSIE"),Ze=He("Edge"),et=Ze||Xe,tt=He("Gecko")&&!(-1!=Ke().toLowerCase().indexOf("webkit")&&!He("Edge"))&&!(He("Trident")||He("MSIE"))&&!He("Edge"),nt=-1!=Ke().toLowerCase().indexOf("webkit")&&!He("Edge");function rt(){var e=Ie.document;return e?e.documentMode:void 0}e:{var it="",st=(Ye=Ke(),tt?/rv:([^\);]+)(\)|;)/.exec(Ye):Ze?/Edge\/([\d\.]+)/.exec(Ye):Xe?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(Ye):nt?/WebKit\/(\S+)/.exec(Ye):Je?/(?:Version)[ \/]?(\S+)/.exec(Ye):void 0);if(st&&(it=st?st[1]:""),Xe){var ot=rt();if(null!=ot&&ot>parseFloat(it)){Qe=String(ot);break e}}Qe=it}var dt,at={};function ct(){return function(e){var t=at;return Object.prototype.hasOwnProperty.call(t,9)?t[9]:t[9]=e(9)}((function(){for(var e=0,t=Ge(String(Qe)).split("."),n=Ge("9").split("."),r=Math.max(t.length,n.length),i=0;0==e&&i<r;i++){var s=t[i]||"",o=n[i]||"";do{if(s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],o=/(\d*)(\D*)(.*)/.exec(o)||["","","",""],0==s[0].length&&0==o[0].length)break;e=ze(0==s[1].length?0:parseInt(s[1],10),0==o[1].length?0:parseInt(o[1],10))||ze(0==s[2].length,0==o[2].length)||ze(s[2],o[2]),s=s[3],o=o[3]}while(0==e)}return 0<=e}))}if(Ie.document&&Xe){var lt=rt();dt=lt||(parseInt(Qe,10)||void 0)}else dt=void 0;var ut=dt;function ht(e,t){if(Be.call(this,e?e.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.g=t,t=e.relatedTarget){if(tt){e:{try{We(t.nodeName);var i=!0;break e}catch(e){}i=!1}i||(t=null)}}else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"==typeof e.pointerType?e.pointerType:ft[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&ht.X.h.call(this)}}Me(ht,Be);var ft={2:"touch",3:"pen",4:"mouse"};ht.prototype.h=function(){ht.X.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var At="closure_listenable_"+(1e6*Math.random()|0),Nt=0;function pt(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.ha=i,this.key=++Nt,this.ba=this.ea=!1}function mt(e){e.ba=!0,e.listener=null,e.proxy=null,e.src=null,e.ha=null}function gt(e,t,n){for(var r in e)t.call(n,e[r],r,e)}function $t(e){var t={};for(var n in e)t[n]=e[n];return t}var yt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function vt(e,t){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])e[n]=r[n];for(var s=0;s<yt.length;s++)n=yt[s],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function wt(e){this.src=e,this.g={},this.h=0}function bt(e,t){var n=t.type;if(n in e.g){var r,i=e.g[n],s=Ue(i,t);(r=0<=s)&&Array.prototype.splice.call(i,s,1),r&&(mt(t),0==e.g[n].length&&(delete e.g[n],e.h--))}}function Ct(e,t,n,r){for(var i=0;i<e.length;++i){var s=e[i];if(!s.ba&&s.listener==t&&s.capture==!!n&&s.ha==r)return i}return-1}wt.prototype.add=function(e,t,n,r,i){var s=e.toString();(e=this.g[s])||(e=this.g[s]=[],this.h++);var o=Ct(e,t,r,i);return-1<o?(t=e[o],n||(t.ea=!1)):((t=new pt(t,this.src,s,!!r,i)).ea=n,e.push(t)),t};var Et="closure_lm_"+(1e6*Math.random()|0),It={};function Tt(e,t,n,r,i){if(r&&r.once)return _t(e,t,n,r,i);if(Array.isArray(t)){for(var s=0;s<t.length;s++)Tt(e,t[s],n,r,i);return null}return n=Mt(n),e&&e[At]?e.N(t,n,_e(r)?!!r.capture:!!r,i):St(e,t,n,!1,r,i)}function St(e,t,n,r,i,s){if(!t)throw Error("Invalid event type");var o=_e(i)?!!i.capture:!!i,d=xt(e);if(d||(e[Et]=d=new wt(e)),(n=d.add(t,n,r,o,s)).proxy)return n;if(r=function(){function e(n){return t.call(e.src,e.listener,n)}var t=Lt;return e}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)qe||(i=o),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(Rt(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}return n}function _t(e,t,n,r,i){if(Array.isArray(t)){for(var s=0;s<t.length;s++)_t(e,t[s],n,r,i);return null}return n=Mt(n),e&&e[At]?e.O(t,n,_e(r)?!!r.capture:!!r,i):St(e,t,n,!0,r,i)}function kt(e,t,n,r,i){if(Array.isArray(t))for(var s=0;s<t.length;s++)kt(e,t[s],n,r,i);else r=_e(r)?!!r.capture:!!r,n=Mt(n),e&&e[At]?(e=e.i,(t=String(t).toString())in e.g&&(-1<(n=Ct(s=e.g[t],n,r,i))&&(mt(s[n]),Array.prototype.splice.call(s,n,1),0==s.length&&(delete e.g[t],e.h--)))):e&&(e=xt(e))&&(t=e.g[t.toString()],e=-1,t&&(e=Ct(t,n,r,i)),(n=-1<e?t[e]:null)&&Dt(n))}function Dt(e){if("number"!=typeof e&&e&&!e.ba){var t=e.src;if(t&&t[At])bt(t.i,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(Rt(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=xt(t))?(bt(n,e),0==n.h&&(n.src=null,t[Et]=null)):mt(e)}}}function Rt(e){return e in It?It[e]:It[e]="on"+e}function Lt(e,t){if(e.ba)e=!0;else{t=new ht(t,this);var n=e.listener,r=e.ha||e.src;e.ea&&Dt(e),e=n.call(r,t)}return e}function xt(e){return(e=e[Et])instanceof wt?e:null}var Ot="__closure_events_fn_"+(1e9*Math.random()>>>0);function Mt(e){return"function"==typeof e?e:(e[Ot]||(e[Ot]=function(t){return e.handleEvent(t)}),e[Ot])}function Pt(){Pe.call(this),this.i=new wt(this),this.P=this,this.I=null}function Ut(e,t){var n,r=e.I;if(r)for(n=[];r;r=r.I)n.push(r);if(e=e.P,r=t.type||t,"string"==typeof t)t=new Be(t,e);else if(t instanceof Be)t.target=t.target||e;else{var i=t;vt(t=new Be(r,e),i)}if(i=!0,n)for(var s=n.length-1;0<=s;s--){var o=t.g=n[s];i=Ft(o,r,!0,t)&&i}if(i=Ft(o=t.g=e,r,!0,t)&&i,i=Ft(o,r,!1,t)&&i,n)for(s=0;s<n.length;s++)i=Ft(o=t.g=n[s],r,!1,t)&&i}function Ft(e,t,n,r){if(!(t=e.i.g[String(t)]))return!0;t=t.concat();for(var i=!0,s=0;s<t.length;++s){var o=t[s];if(o&&!o.ba&&o.capture==n){var d=o.listener,a=o.ha||o.src;o.ea&&bt(e.i,o),i=!1!==d.call(a,r)&&i}}return i&&!r.defaultPrevented}Me(Pt,Pe),Pt.prototype[At]=!0,Pt.prototype.removeEventListener=function(e,t,n,r){kt(this,e,t,n,r)},Pt.prototype.M=function(){if(Pt.X.M.call(this),this.i){var e,t=this.i;for(e in t.g){for(var n=t.g[e],r=0;r<n.length;r++)mt(n[r]);delete t.g[e],t.h--}}this.I=null},Pt.prototype.N=function(e,t,n,r){return this.i.add(String(e),t,!1,n,r)},Pt.prototype.O=function(e,t,n,r){return this.i.add(String(e),t,!0,n,r)};var Vt=Ie.JSON.stringify;function Bt(){var e=Qt,t=null;return e.g&&(t=e.g,e.g=e.g.next,e.g||(e.h=null),t.next=null),t}var qt,jt=function(){function e(){this.h=this.g=null}return e.prototype.add=function(e,t){var n=Gt.get();n.set(e,t),this.h?this.h.next=n:this.g=n,this.h=n},e}(),Gt=new(function(){function e(e,t){this.i=e,this.j=t,this.h=0,this.g=null}return e.prototype.get=function(){var e;return 0<this.h?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e},e}())((function(){return new zt}),(function(e){return e.reset()})),zt=function(){function e(){this.next=this.g=this.h=null}return e.prototype.set=function(e,t){this.h=e,this.g=t,this.next=null},e.prototype.reset=function(){this.next=this.g=this.h=null},e}();function Kt(e){Ie.setTimeout((function(){throw e}),0)}function Ht(e,t){qt||function(){var e=Ie.Promise.resolve(void 0);qt=function(){e.then(Yt)}}(),Wt||(qt(),Wt=!0),Qt.add(e,t)}var Wt=!1,Qt=new jt;function Yt(){for(var e;e=Bt();){try{e.h.call(e.g)}catch(e){Kt(e)}var t=Gt;t.j(e),100>t.h&&(t.h++,e.next=t.g,t.g=e)}Wt=!1}function Jt(e,t){Pt.call(this),this.h=e||1,this.g=t||Ie,this.j=xe(this.lb,this),this.l=Date.now()}function Xt(e){e.ca=!1,e.R&&(e.g.clearTimeout(e.R),e.R=null)}function Zt(e,t,n){if("function"==typeof e)n&&(e=xe(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=xe(e.handleEvent,e)}return 2147483647<Number(t)?-1:Ie.setTimeout(e,t||0)}function en(e){e.g=Zt((function(){e.g=null,e.i&&(e.i=!1,en(e))}),e.j);var t=e.h;e.h=null,e.m.apply(null,t)}Me(Jt,Pt),(be=Jt.prototype).ca=!1,be.R=null,be.lb=function(){if(this.ca){var e=Date.now()-this.l;0<e&&e<.8*this.h?this.R=this.g.setTimeout(this.j,this.h-e):(this.R&&(this.g.clearTimeout(this.R),this.R=null),Ut(this,"tick"),this.ca&&(Xt(this),this.start()))}},be.start=function(){this.ca=!0,this.R||(this.R=this.g.setTimeout(this.j,this.h),this.l=Date.now())},be.M=function(){Jt.X.M.call(this),Xt(this),delete this.g};var tn=function(e){function t(t,n){var r=e.call(this)||this;return r.m=t,r.j=n,r.h=null,r.i=!1,r.g=null,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}ye(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.l=function(e){this.h=arguments,this.g?this.i=!0:en(this)},t.prototype.M=function(){e.prototype.M.call(this),this.g&&(Ie.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)},t}(Pe);function nn(e){Pe.call(this),this.h=e,this.g={}}Me(nn,Pe);var rn=[];function sn(e,t,n,r){Array.isArray(n)||(n&&(rn[0]=n.toString()),n=rn);for(var i=0;i<n.length;i++){var s=Tt(t,n[i],r||e.handleEvent,!1,e.h||e);if(!s)break;e.g[s.key]=s}}function on(e){gt(e.g,(function(e,t){this.g.hasOwnProperty(t)&&Dt(e)}),e),e.g={}}function dn(){this.g=!0}function an(e,t,n,r){e.info((function(){return"XMLHTTP TEXT ("+t+"): "+function(e,t){if(!e.g)return t;if(!t)return null;try{var n=JSON.parse(t);if(n)for(e=0;e<n.length;e++)if(Array.isArray(n[e])){var r=n[e];if(!(2>r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var s=i[0];if("noop"!=s&&"stop"!=s&&"close"!=s)for(var o=1;o<i.length;o++)i[o]=""}}}return Vt(n)}catch(e){return t}}(e,n)+(r?" "+r:"")}))}nn.prototype.M=function(){nn.X.M.call(this),on(this)},nn.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},dn.prototype.Aa=function(){this.g=!1},dn.prototype.info=function(){};var cn={},ln=null;function un(){return ln=ln||new Pt}function hn(e){Be.call(this,cn.Pa,e)}function fn(e){var t=un();Ut(t,new hn(t))}function An(e,t){Be.call(this,cn.STAT_EVENT,e),this.stat=t}function Nn(e){var t=un();Ut(t,new An(t,e))}function pn(e,t){Be.call(this,cn.Qa,e),this.size=t}function mn(e,t){if("function"!=typeof e)throw Error("Fn must not be null and must be a function");return Ie.setTimeout((function(){e()}),t)}cn.Pa="serverreachability",Me(hn,Be),cn.STAT_EVENT="statevent",Me(An,Be),cn.Qa="timingevent",Me(pn,Be);var gn={NO_ERROR:0,mb:1,zb:2,yb:3,tb:4,xb:5,Ab:6,Ma:7,TIMEOUT:8,Db:9},$n={rb:"complete",Nb:"success",Na:"error",Ma:"abort",Fb:"ready",Gb:"readystatechange",TIMEOUT:"timeout",Bb:"incrementaldata",Eb:"progress",ub:"downloadprogress",Vb:"uploadprogress"};function yn(){}function vn(e){return e.h||(e.h=e.i())}function wn(){}yn.prototype.h=null;var bn,Cn={OPEN:"a",qb:"b",Na:"c",Cb:"d"};function En(){Be.call(this,"d")}function In(){Be.call(this,"c")}function Tn(){}function Sn(e,t,n,r){this.l=e,this.j=t,this.m=n,this.U=r||1,this.S=new nn(this),this.O=kn,e=et?125:void 0,this.T=new Jt(e),this.H=null,this.i=!1,this.s=this.A=this.v=this.K=this.F=this.V=this.B=null,this.D=[],this.g=null,this.C=0,this.o=this.u=null,this.Y=-1,this.I=!1,this.N=0,this.L=null,this.$=this.J=this.Z=this.P=!1,this.h=new _n}function _n(){this.i=null,this.g="",this.h=!1}Me(En,Be),Me(In,Be),Me(Tn,yn),Tn.prototype.g=function(){return new XMLHttpRequest},Tn.prototype.i=function(){return{}},bn=new Tn;var kn=45e3,Dn={},Rn={};function Ln(e,t,n){e.K=1,e.v=Xn(Hn(t)),e.s=n,e.P=!0,xn(e,null)}function xn(e,t){e.F=Date.now(),Un(e),e.A=Hn(e.v);var n=e.A,r=e.U;Array.isArray(r)||(r=[String(r)]),ur(n.i,"t",r),e.C=0,n=e.l.H,e.h=new _n,e.g=ui(e.l,n?t:null,!e.s),0<e.N&&(e.L=new tn(xe(e.La,e,e.g),e.N)),sn(e.S,e.g,"readystatechange",e.ib),t=e.H?$t(e.H):{},e.s?(e.u||(e.u="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.g.da(e.A,e.u,e.s,t)):(e.u="GET",e.g.da(e.A,e.u,null,t)),fn(),function(e,t,n,r,i,s){e.info((function(){if(e.g)if(s)for(var o="",d=s.split("&"),a=0;a<d.length;a++){var c=d[a].split("=");if(1<c.length){var l=c[0];c=c[1];var u=l.split("_");o=2<=u.length&&"type"==u[1]?o+(l+"=")+c+"&":o+(l+"=redacted&")}}else o=null;else o=s;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+t+"\n"+n+"\n"+o}))}(e.j,e.u,e.A,e.m,e.U,e.s)}function On(e){return!!e.g&&("GET"==e.u&&2!=e.K&&e.l.Da)}function Mn(e,t,n){for(var r,i=!0;!e.I&&e.C<n.length;){if((r=Pn(e,n))==Rn){4==t&&(e.o=4,Nn(14),i=!1),an(e.j,e.m,null,"[Incomplete Response]");break}if(r==Dn){e.o=4,Nn(15),an(e.j,e.m,n,"[Invalid Chunk]"),i=!1;break}an(e.j,e.m,r,null),jn(e,r)}On(e)&&r!=Rn&&r!=Dn&&(e.h.g="",e.C=0),4!=t||0!=n.length||e.h.h||(e.o=1,Nn(16),i=!1),e.i=e.i&&i,i?0<n.length&&!e.$&&(e.$=!0,(t=e.l).g==e&&t.$&&!t.K&&(t.j.info("Great, no buffering proxy detected. Bytes received: "+n.length),ri(t),t.K=!0,Nn(11))):(an(e.j,e.m,n,"[Invalid Chunked Response]"),qn(e),Bn(e))}function Pn(e,t){var n=e.C,r=t.indexOf("\n",n);return-1==r?Rn:(n=Number(t.substring(n,r)),isNaN(n)?Dn:(r+=1)+n>t.length?Rn:(t=t.substr(r,n),e.C=r+n,t))}function Un(e){e.V=Date.now()+e.O,Fn(e,e.O)}function Fn(e,t){if(null!=e.B)throw Error("WatchDog timer not null");e.B=mn(xe(e.gb,e),t)}function Vn(e){e.B&&(Ie.clearTimeout(e.B),e.B=null)}function Bn(e){0==e.l.G||e.I||oi(e.l,e)}function qn(e){Vn(e);var t=e.L;t&&"function"==typeof t.na&&t.na(),e.L=null,Xt(e.T),on(e.S),e.g&&(t=e.g,e.g=null,t.abort(),t.na())}function jn(e,t){try{var n=e.l;if(0!=n.G&&(n.g==e||gr(n.h,e)))if(!e.J&&gr(n.h,e)&&3==n.G){try{var r=n.Fa.g.parse(t)}catch(s){r=null}if(Array.isArray(r)&&3==r.length){var i=r;if(0==i[0]){e:if(!n.u){if(n.g){if(!(n.g.F+3e3<e.F))break e;si(n),Qr(n)}ni(n),Nn(18)}}else n.Ba=i[1],0<n.Ba-n.T&&37500>i[2]&&n.L&&0==n.A&&!n.v&&(n.v=mn(xe(n.cb,n),6e3));if(1>=mr(n.h)&&n.ja){try{n.ja()}catch(s){}n.ja=void 0}}else ai(n,11)}else if((e.J||n.g==e)&&si(n),!je(t))for(i=n.Fa.g.parse(t),t=0;t<i.length;t++){var s=i[t];if(n.T=s[0],s=s[1],2==n.G)if("c"==s[0]){n.I=s[1],n.ka=s[2];var o=s[3];null!=o&&(n.ma=o,n.j.info("VER="+n.ma));var d=s[4];null!=d&&(n.Ca=d,n.j.info("SVER="+n.Ca));var a=s[5];null!=a&&"number"==typeof a&&0<a&&(r=1.5*a,n.J=r,n.j.info("backChannelRequestTimeoutMs_="+r)),r=n;var c=e.g;if(c){var l=c.g?c.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(l){var u=r.h;u.g||-1==l.indexOf("spdy")&&-1==l.indexOf("quic")&&-1==l.indexOf("h2")||(u.j=u.l,u.g=new Set,u.h&&($r(u,u.h),u.h=null))}if(r.D){var h=c.g?c.g.getResponseHeader("X-HTTP-Session-Id"):null;h&&(r.za=h,Jn(r.F,r.D,h))}}n.G=3,n.l&&n.l.xa(),n.$&&(n.P=Date.now()-e.F,n.j.info("Handshake RTT: "+n.P+"ms"));var f=e;if((r=n).sa=li(r,r.H?r.ka:null,r.V),f.J){yr(r.h,f);var A=f,N=r.J;N&&A.setTimeout(N),A.B&&(Vn(A),Un(A)),r.g=f}else ti(r);0<n.i.length&&Jr(n)}else"stop"!=s[0]&&"close"!=s[0]||ai(n,7);else 3==n.G&&("stop"==s[0]||"close"==s[0]?"stop"==s[0]?ai(n,7):Wr(n):"noop"!=s[0]&&n.l&&n.l.wa(s),n.A=0)}fn()}catch(s){}}function Gn(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(Se(e)||"string"==typeof e)Array.prototype.forEach.call(e,t,void 0);else for(var n=function(e){if(e.oa&&"function"==typeof e.oa)return e.oa();if(!e.W||"function"!=typeof e.W){if("undefined"!=typeof Map&&e instanceof Map)return Array.from(e.keys());if(!("undefined"!=typeof Set&&e instanceof Set)){if(Se(e)||"string"==typeof e){var t=[];e=e.length;for(var n=0;n<e;n++)t.push(n);return t}for(var r in t=[],n=0,e)t[n++]=r;return t}}}(e),r=function(e){if(e.W&&"function"==typeof e.W)return e.W();if("undefined"!=typeof Map&&e instanceof Map||"undefined"!=typeof Set&&e instanceof Set)return Array.from(e.values());if("string"==typeof e)return e.split("");if(Se(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}(e),i=r.length,s=0;s<i;s++)t.call(void 0,r[s],n&&n[s],e)}(be=Sn.prototype).setTimeout=function(e){this.O=e},be.ib=function(e){e=e.target;var t=this.L;t&&3==qr(e)?t.l():this.La(e)},be.La=function(e){try{if(e==this.g)e:{var t=qr(this.g),n=this.g.Ea();this.g.aa();if(!(3>t)&&(3!=t||et||this.g&&(this.h.h||this.g.fa()||jr(this.g)))){this.I||4!=t||7==n||fn(),Vn(this);var r=this.g.aa();this.Y=r;t:if(On(this)){var i=jr(this.g);e="";var s=i.length,o=4==qr(this.g);if(!this.h.i){if("undefined"==typeof TextDecoder){qn(this),Bn(this);var d="";break t}this.h.i=new Ie.TextDecoder}for(n=0;n<s;n++)this.h.h=!0,e+=this.h.i.decode(i[n],{stream:o&&n==s-1});i.splice(0,s),this.h.g+=e,this.C=0,d=this.h.g}else d=this.g.fa();if(this.i=200==r,function(e,t,n,r,i,s,o){e.info((function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+t+"\n"+n+"\n"+s+" "+o}))}(this.j,this.u,this.A,this.m,this.U,t,r),this.i){if(this.Z&&!this.J){t:{if(this.g){var a,c=this.g;if((a=c.g?c.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!je(a)){var l=a;break t}}l=null}if(!(r=l)){this.i=!1,this.o=3,Nn(12),qn(this),Bn(this);break e}an(this.j,this.m,r,"Initial handshake response via X-HTTP-Initial-Response"),this.J=!0,jn(this,r)}this.P?(Mn(this,t,d),et&&this.i&&3==t&&(sn(this.S,this.T,"tick",this.hb),this.T.start())):(an(this.j,this.m,d,null),jn(this,d)),4==t&&qn(this),this.i&&!this.I&&(4==t?oi(this.l,this):(this.i=!1,Un(this)))}else 400==r&&0<d.indexOf("Unknown SID")?(this.o=3,Nn(12)):(this.o=0,Nn(13)),qn(this),Bn(this)}}}catch(t){}},be.hb=function(){if(this.g){var e=qr(this.g),t=this.g.fa();this.C<t.length&&(Vn(this),Mn(this,e,t),this.i&&4!=e&&Un(this))}},be.cancel=function(){this.I=!0,qn(this)},be.gb=function(){this.B=null;var e=Date.now();0<=e-this.V?(function(e,t){e.info((function(){return"TIMEOUT: "+t}))}(this.j,this.A),2!=this.K&&(fn(),Nn(17)),qn(this),this.o=2,Bn(this)):Fn(this,this.V-e)};var zn=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function Kn(e,t){if(this.g=this.s=this.j="",this.m=null,this.o=this.l="",this.h=!1,e instanceof Kn){this.h=void 0!==t?t:e.h,Wn(this,e.j),this.s=e.s,this.g=e.g,Qn(this,e.m),this.l=e.l,t=e.i;var n=new dr;n.i=t.i,t.g&&(n.g=new Map(t.g),n.h=t.h),Yn(this,n),this.o=e.o}else e&&(n=String(e).match(zn))?(this.h=!!t,Wn(this,n[1]||"",!0),this.s=Zn(n[2]||""),this.g=Zn(n[3]||"",!0),Qn(this,n[4]),this.l=Zn(n[5]||"",!0),Yn(this,n[6]||"",!0),this.o=Zn(n[7]||"")):(this.h=!!t,this.i=new dr(null,this.h))}function Hn(e){return new Kn(e)}function Wn(e,t,n){e.j=n?Zn(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function Qn(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.m=t}else e.m=null}function Yn(e,t,n){t instanceof dr?(e.i=t,function(e,t){t&&!e.j&&(ar(e),e.i=null,e.g.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(cr(this,t),ur(this,n,e))}),e)),e.j=t}(e.i,e.h)):(n||(t=er(t,sr)),e.i=new dr(t,e.h))}function Jn(e,t,n){e.i.set(t,n)}function Xn(e){return Jn(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function Zn(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function er(e,t,n){return"string"==typeof e?(e=encodeURI(e).replace(t,tr),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function tr(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}Kn.prototype.toString=function(){var e=[],t=this.j;t&&e.push(er(t,nr,!0),":");var n=this.g;return(n||"file"==t)&&(e.push("//"),(t=this.s)&&e.push(er(t,nr,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.m)&&e.push(":",String(n))),(n=this.l)&&(this.g&&"/"!=n.charAt(0)&&e.push("/"),e.push(er(n,"/"==n.charAt(0)?ir:rr,!0))),(n=this.i.toString())&&e.push("?",n),(n=this.o)&&e.push("#",er(n,or)),e.join("")};var nr=/[#\/\?@]/g,rr=/[#\?:]/g,ir=/[#\?]/g,sr=/[#\?@]/g,or=/#/g;function dr(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function ar(e){e.g||(e.g=new Map,e.h=0,e.i&&function(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var s=e[n].substring(0,r);i=e[n].substring(r+1)}else s=e[n];t(s,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.i,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function cr(e,t){ar(e),t=hr(e,t),e.g.has(t)&&(e.i=null,e.h-=e.g.get(t).length,e.g.delete(t))}function lr(e,t){return ar(e),t=hr(e,t),e.g.has(t)}function ur(e,t,n){cr(e,t),0<n.length&&(e.i=null,e.g.set(hr(e,t),Fe(n)),e.h+=n.length)}function hr(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}(be=dr.prototype).add=function(e,t){ar(this),this.i=null,e=hr(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this},be.forEach=function(e,t){ar(this),this.g.forEach((function(n,r){n.forEach((function(n){e.call(t,n,r,this)}),this)}),this)},be.oa=function(){ar(this);for(var e=Array.from(this.g.values()),t=Array.from(this.g.keys()),n=[],r=0;r<t.length;r++)for(var i=e[r],s=0;s<i.length;s++)n.push(t[r]);return n},be.W=function(e){ar(this);var t=[];if("string"==typeof e)lr(this,e)&&(t=t.concat(this.g.get(hr(this,e))));else{e=Array.from(this.g.values());for(var n=0;n<e.length;n++)t=t.concat(e[n])}return t},be.set=function(e,t){return ar(this),this.i=null,lr(this,e=hr(this,e))&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},be.get=function(e,t){return e&&0<(e=this.W(e)).length?String(e[0]):t},be.toString=function(){if(this.i)return this.i;if(!this.g)return"";for(var e=[],t=Array.from(this.g.keys()),n=0;n<t.length;n++){var r=t[n],i=encodeURIComponent(String(r)),s=this.W(r);for(r=0;r<s.length;r++){var o=i;""!==s[r]&&(o+="="+encodeURIComponent(String(s[r]))),e.push(o)}}return this.i=e.join("&")};var fr=function(e,t){this.h=e,this.g=t};function Ar(e){this.l=e||Nr,Ie.PerformanceNavigationTiming?e=0<(e=Ie.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):e=!!(Ie.g&&Ie.g.Ga&&Ie.g.Ga()&&Ie.g.Ga().$b),this.j=e?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}var Nr=10;function pr(e){return!!e.h||!!e.g&&e.g.size>=e.j}function mr(e){return e.h?1:e.g?e.g.size:0}function gr(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function $r(e,t){e.g?e.g.add(t):e.h=t}function yr(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}function vr(e){var t,n;if(null!=e.h)return e.i.concat(e.h.D);if(null!=e.g&&0!==e.g.size){var r=e.i;try{for(var i=ve(e.g.values()),s=i.next();!s.done;s=i.next()){var o=s.value;r=r.concat(o.D)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}return Fe(e.i)}function wr(){}function br(){this.g=new wr}function Cr(e,t,n){var r=n||"";try{Gn(e,(function(e,n){var i=e;_e(e)&&(i=Vt(e)),t.push(r+n+"="+encodeURIComponent(i))}))}catch(e){throw t.push(r+"type="+encodeURIComponent("_badmap")),e}}function Er(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch(e){}}function Ir(e){this.l=e.ac||null,this.j=e.jb||!1}function Tr(e,t){Pt.call(this),this.D=e,this.u=t,this.m=void 0,this.readyState=Sr,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}Ar.prototype.cancel=function(){var e,t;if(this.i=vr(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){try{for(var n=ve(this.g.values()),r=n.next();!r.done;r=n.next()){r.value.cancel()}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.g.clear()}},wr.prototype.stringify=function(e){return Ie.JSON.stringify(e,void 0)},wr.prototype.parse=function(e){return Ie.JSON.parse(e,void 0)},Me(Ir,yn),Ir.prototype.g=function(){return new Tr(this.l,this.j)},Ir.prototype.i=function(e){return function(){return e}}({}),Me(Tr,Pt);var Sr=0;function _r(e){e.j.read().then(e.Ta.bind(e)).catch(e.ga.bind(e))}function kr(e){e.readyState=4,e.l=null,e.j=null,e.A=null,Dr(e)}function Dr(e){e.onreadystatechange&&e.onreadystatechange.call(e)}(be=Tr.prototype).open=function(e,t){if(this.readyState!=Sr)throw this.abort(),Error("Error reopening a connection");this.C=e,this.B=t,this.readyState=1,Dr(this)},be.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;var t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};e&&(t.body=e),(this.D||Ie).fetch(new Request(this.B,t)).then(this.Wa.bind(this),this.ga.bind(this))},be.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch((function(){})),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,kr(this)),this.readyState=Sr},be.Wa=function(e){if(this.g&&(this.l=e,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=e.headers,this.readyState=2,Dr(this)),this.g&&(this.readyState=3,Dr(this),this.g)))if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Ua.bind(this),this.ga.bind(this));else if(void 0!==Ie.ReadableStream&&"body"in e){if(this.j=e.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;_r(this)}else e.text().then(this.Va.bind(this),this.ga.bind(this))},be.Ta=function(e){if(this.g){if(this.u&&e.value)this.response.push(e.value);else if(!this.u){var t=e.value?e.value:new Uint8Array(0);(t=this.A.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?kr(this):Dr(this),3==this.readyState&&_r(this)}},be.Va=function(e){this.g&&(this.response=this.responseText=e,kr(this))},be.Ua=function(e){this.g&&(this.response=e,kr(this))},be.ga=function(){this.g&&kr(this)},be.setRequestHeader=function(e,t){this.v.append(e,t)},be.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},be.getAllResponseHeaders=function(){if(!this.h)return"";for(var e=[],t=this.h.entries(),n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},Object.defineProperty(Tr.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}});var Rr=Ie.JSON.parse;function Lr(e){Pt.call(this),this.headers=new Map,this.u=e||null,this.h=!1,this.C=this.g=null,this.H="",this.m=0,this.j="",this.l=this.F=this.v=this.D=!1,this.B=0,this.A=null,this.J=xr,this.K=this.L=!1}Me(Lr,Pt);var xr="",Or=/^https?$/i,Mr=["POST","PUT"];function Pr(e,t){e.h=!1,e.g&&(e.l=!0,e.g.abort(),e.l=!1),e.j=t,e.m=5,Ur(e),Vr(e)}function Ur(e){e.D||(e.D=!0,Ut(e,"complete"),Ut(e,"error"))}function Fr(e){if(e.h&&void 0!==Ee&&(!e.C[1]||4!=qr(e)||2!=e.aa()))if(e.v&&4==qr(e))Zt(e.Ha,0,e);else if(Ut(e,"readystatechange"),4==qr(e)){e.h=!1;try{var t,n=e.aa();e:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break e;default:r=!1}if(!(t=r)){var i;if(i=0===n){var s=String(e.H).match(zn)[1]||null;if(!s&&Ie.self&&Ie.self.location){var o=Ie.self.location.protocol;s=o.substr(0,o.length-1)}i=!Or.test(s?s.toLowerCase():"")}t=i}if(t)Ut(e,"complete"),Ut(e,"success");else{e.m=6;try{var d=2<qr(e)?e.g.statusText:""}catch(e){d=""}e.j=d+" ["+e.aa()+"]",Ur(e)}}finally{Vr(e)}}}function Vr(e,t){if(e.g){Br(e);var n=e.g,r=e.C[0]?Te:null;e.g=null,e.C=null,t||Ut(e,"ready");try{n.onreadystatechange=r}catch(e){}}}function Br(e){e.g&&e.K&&(e.g.ontimeout=null),e.A&&(Ie.clearTimeout(e.A),e.A=null)}function qr(e){return e.g?e.g.readyState:0}function jr(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.J){case xr:case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(e){return null}}function Gr(e){var t="";return gt(e,(function(e,n){t+=n,t+=":",t+=e,t+="\r\n"})),t}function zr(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=Gr(n),"string"==typeof e?null!=n&&encodeURIComponent(String(n)):Jn(e,t,n))}function Kr(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function Hr(e){this.Ca=0,this.i=[],this.j=new dn,this.ka=this.sa=this.F=this.V=this.g=this.za=this.D=this.ia=this.o=this.S=this.s=null,this.ab=this.U=0,this.Za=Kr("failFast",!1,e),this.L=this.v=this.u=this.m=this.l=null,this.Y=!0,this.pa=this.Ba=this.T=-1,this.Z=this.A=this.C=0,this.Xa=Kr("baseRetryDelayMs",5e3,e),this.bb=Kr("retryDelaySeedMs",1e4,e),this.$a=Kr("forwardChannelMaxRetries",2,e),this.ta=Kr("forwardChannelRequestTimeoutMs",2e4,e),this.ra=e&&e.xmlHttpFactory||void 0,this.Da=e&&e.Zb||!1,this.J=void 0,this.H=e&&e.supportsCrossDomainXhr||!1,this.I="",this.h=new Ar(e&&e.concurrentRequestLimit),this.Fa=new br,this.O=e&&e.fastHandshake||!1,this.N=e&&e.encodeInitMessageHeaders||!1,this.O&&this.N&&(this.N=!1),this.Ya=e&&e.Xb||!1,e&&e.Aa&&this.j.Aa(),e&&e.forceLongPolling&&(this.Y=!1),this.$=!this.O&&this.Y&&e&&e.detectBufferingProxy||!1,this.ja=void 0,this.P=0,this.K=!1,this.la=this.B=null}function Wr(e){if(Yr(e),3==e.G){var t=e.U++,n=Hn(e.F);Jn(n,"SID",e.I),Jn(n,"RID",t),Jn(n,"TYPE","terminate"),Zr(e,n),(t=new Sn(e,e.j,t,void 0)).K=2,t.v=Xn(Hn(n)),n=!1,Ie.navigator&&Ie.navigator.sendBeacon&&(n=Ie.navigator.sendBeacon(t.v.toString(),"")),!n&&Ie.Image&&((new Image).src=t.v,n=!0),n||(t.g=ui(t.l,null),t.g.da(t.v)),t.F=Date.now(),Un(t)}ci(e)}function Qr(e){e.g&&(ri(e),e.g.cancel(),e.g=null)}function Yr(e){Qr(e),e.u&&(Ie.clearTimeout(e.u),e.u=null),si(e),e.h.cancel(),e.m&&("number"==typeof e.m&&Ie.clearTimeout(e.m),e.m=null)}function Jr(e){pr(e.h)||e.m||(e.m=!0,Ht(e.Ja,e),e.C=0)}function Xr(e,t){var n;n=t?t.m:e.U++;var r=Hn(e.F);Jn(r,"SID",e.I),Jn(r,"RID",n),Jn(r,"AID",e.T),Zr(e,r),e.o&&e.s&&zr(r,e.o,e.s),n=new Sn(e,e.j,n,e.C+1),null===e.o&&(n.H=e.s),t&&(e.i=t.D.concat(e.i)),t=ei(e,n,1e3),n.setTimeout(Math.round(.5*e.ta)+Math.round(.5*e.ta*Math.random())),$r(e.h,n),Ln(n,r,t)}function Zr(e,t){e.ia&&gt(e.ia,(function(e,n){Jn(t,n,e)})),e.l&&Gn({},(function(e,n){Jn(t,n,e)}))}function ei(e,t,n){n=Math.min(e.i.length,n);var r=e.l?xe(e.l.Ra,e.l,e):null;e:for(var i=e.i,s=-1;;){var o=["count="+n];-1==s?0<n?(s=i[0].h,o.push("ofs="+s)):s=0:o.push("ofs="+s);for(var d=!0,a=0;a<n;a++){var c=i[a].h,l=i[a].g;if(0>(c-=s))s=Math.max(0,i[a].h-100),d=!1;else try{Cr(l,o,"req"+c+"_")}catch(e){r&&r(l)}}if(d){r=o.join("&");break e}}return e=e.i.splice(0,n),t.D=e,r}function ti(e){e.g||e.u||(e.Z=1,Ht(e.Ia,e),e.A=0)}function ni(e){return!(e.g||e.u||3<=e.A)&&(e.Z++,e.u=mn(xe(e.Ia,e),di(e,e.A)),e.A++,!0)}function ri(e){null!=e.B&&(Ie.clearTimeout(e.B),e.B=null)}function ii(e){e.g=new Sn(e,e.j,"rpc",e.Z),null===e.o&&(e.g.H=e.s),e.g.N=0;var t=Hn(e.sa);Jn(t,"RID","rpc"),Jn(t,"SID",e.I),Jn(t,"CI",e.L?"0":"1"),Jn(t,"AID",e.T),Jn(t,"TYPE","xmlhttp"),Zr(e,t),e.o&&e.s&&zr(t,e.o,e.s),e.J&&e.g.setTimeout(e.J);var n=e.g;e=e.ka,n.K=1,n.v=Xn(Hn(t)),n.s=null,n.P=!0,xn(n,e)}function si(e){null!=e.v&&(Ie.clearTimeout(e.v),e.v=null)}function oi(e,t){var n=null;if(e.g==t){si(e),ri(e),e.g=null;var r=2}else{if(!gr(e.h,t))return;n=t.D,yr(e.h,t),r=1}if(0!=e.G)if(e.pa=t.Y,t.i)if(1==r){n=t.s?t.s.length:0,t=Date.now()-t.F;var i=e.C;Ut(r=un(),new pn(r,n)),Jr(e)}else ti(e);else if(3==(i=t.o)||0==i&&0<e.pa||!(1==r&&function(e,t){return!(mr(e.h)>=e.h.j-(e.m?1:0)||(e.m?(e.i=t.D.concat(e.i),0):1==e.G||2==e.G||e.C>=(e.Za?0:e.$a)||(e.m=mn(xe(e.Ja,e,t),di(e,e.C)),e.C++,0)))}(e,t)||2==r&&ni(e)))switch(n&&0<n.length&&(t=e.h,t.i=t.i.concat(n)),i){case 1:ai(e,5);break;case 4:ai(e,10);break;case 3:ai(e,6);break;default:ai(e,2)}}function di(e,t){var n=e.Xa+Math.floor(Math.random()*e.bb);return e.l||(n*=2),n*t}function ai(e,t){if(e.j.info("Error code "+t),2==t){var n=null;e.l&&(n=null);var r=xe(e.kb,e);n||(n=new Kn("//www.google.com/images/cleardot.gif"),Ie.location&&"http"==Ie.location.protocol||Wn(n,"https"),Xn(n)),function(e,t){var n=new dn;if(Ie.Image){var r=new Image;r.onload=Oe(Er,n,r,"TestLoadImage: loaded",!0,t),r.onerror=Oe(Er,n,r,"TestLoadImage: error",!1,t),r.onabort=Oe(Er,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=Oe(Er,n,r,"TestLoadImage: timeout",!1,t),Ie.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=e}else t(!1)}(n.toString(),r)}else Nn(2);e.G=0,e.l&&e.l.va(t),ci(e),Yr(e)}function ci(e){if(e.G=0,e.la=[],e.l){var t=vr(e.h);0==t.length&&0==e.i.length||(Ve(e.la,t),Ve(e.la,e.i),e.h.i.length=0,Fe(e.i),e.i.length=0),e.l.ua()}}function li(e,t,n){var r=n instanceof Kn?Hn(n):new Kn(n,void 0);if(""!=r.g)t&&(r.g=t+"."+r.g),Qn(r,r.m);else{var i=Ie.location;r=i.protocol,t=t?t+"."+i.hostname:i.hostname,i=+i.port;var s=new Kn(null,void 0);r&&Wn(s,r),t&&(s.g=t),i&&Qn(s,i),n&&(s.l=n),r=s}return n=e.D,t=e.za,n&&t&&Jn(r,n,t),Jn(r,"VER",e.ma),Zr(e,r),r}function ui(e,t,n){if(t&&!e.H)throw Error("Can't create secondary domain capable XhrIo object.");return(t=n&&e.Da&&!e.ra?new Lr(new Ir({jb:!0})):new Lr(e.ra)).Ka(e.H),t}function hi(){}function fi(){if(Xe&&!(10<=Number(ut)))throw Error("Environmental error: no available transport.")}function Ai(e,t){Pt.call(this),this.g=new Hr(t),this.l=e,this.h=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.g.s=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.ya&&(e?e["X-WebChannel-Client-Profile"]=t.ya:e={"X-WebChannel-Client-Profile":t.ya}),this.g.S=e,(e=t&&t.Yb)&&!je(e)&&(this.g.o=e),this.A=t&&t.supportsCrossDomainXhr||!1,this.v=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!je(t)&&(this.g.D=t,null!==(e=this.h)&&t in e&&(t in(e=this.h)&&delete e[t])),this.j=new mi(this)}function Ni(e){En.call(this);var t=e.__sm__;if(t){e:{for(var n in t){e=n;break e}e=void 0}(this.i=e)&&(e=this.i,t=null!==t&&e in t?t[e]:void 0),this.data=t}else this.data=e}function pi(){In.call(this),this.status=1}function mi(e){this.g=e}(be=Lr.prototype).Ka=function(e){this.L=e},be.da=function(e,t,n,r){var i,s,o,d;if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.H+"; newUri="+e);t=t?t.toUpperCase():"GET",this.H=e,this.j="",this.m=0,this.D=!1,this.h=!0,this.g=this.u?this.u.g():bn.g(),this.C=this.u?vn(this.u):vn(bn),this.g.onreadystatechange=xe(this.Ha,this);try{this.F=!0,this.g.open(t,String(e),!0),this.F=!1}catch(u){return void Pr(this,u)}if(e=n||"",n=new Map(this.headers),r)if(Object.getPrototypeOf(r)===Object.prototype)for(var a in r)n.set(a,r[a]);else{if("function"!=typeof r.keys||"function"!=typeof r.get)throw Error("Unknown input type for opt_headers: "+String(r));try{for(var c=ve(r.keys()),l=c.next();!l.done;l=c.next()){var u=l.value;n.set(u,r.get(u))}}catch(e){i={error:e}}finally{try{l&&!l.done&&(s=c.return)&&s.call(c)}finally{if(i)throw i.error}}}r=Array.from(n.keys()).find((function(e){return"content-type"==e.toLowerCase()})),a=Ie.FormData&&e instanceof Ie.FormData,!(0<=Ue(Mr,t))||r||a||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");try{for(var h=ve(n),f=h.next();!f.done;f=h.next()){var A=we(f.value,2),N=(u=A[0],A[1]);this.g.setRequestHeader(u,N)}}catch(e){o={error:e}}finally{try{f&&!f.done&&(d=h.return)&&d.call(h)}finally{if(o)throw o.error}}this.J&&(this.g.responseType=this.J),"withCredentials"in this.g&&this.g.withCredentials!==this.L&&(this.g.withCredentials=this.L);try{Br(this),0<this.B&&((this.K=function(e){return Xe&&ct()&&"number"==typeof e.timeout&&void 0!==e.ontimeout}(this.g))?(this.g.timeout=this.B,this.g.ontimeout=xe(this.qa,this)):this.A=Zt(this.qa,this.B,this)),this.v=!0,this.g.send(e),this.v=!1}catch(u){Pr(this,u)}},be.qa=function(){void 0!==Ee&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,Ut(this,"timeout"),this.abort(8))},be.abort=function(e){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=e||7,Ut(this,"complete"),Ut(this,"abort"),Vr(this))},be.M=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),Vr(this,!0)),Lr.X.M.call(this)},be.Ha=function(){this.s||(this.F||this.v||this.l?Fr(this):this.fb())},be.fb=function(){Fr(this)},be.aa=function(){try{return 2<qr(this)?this.g.status:-1}catch(e){return-1}},be.fa=function(){try{return this.g?this.g.responseText:""}catch(e){return""}},be.Sa=function(e){if(this.g){var t=this.g.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),Rr(t)}},be.Ea=function(){return this.m},be.Oa=function(){return"string"==typeof this.j?this.j:String(this.j)},(be=Hr.prototype).ma=8,be.G=1,be.Ja=function(e){if(this.m)if(this.m=null,1==this.G){if(!e){this.U=Math.floor(1e5*Math.random()),e=this.U++;var t=new Sn(this,this.j,e,void 0),n=this.s;if(this.S&&(n?vt(n=$t(n),this.S):n=this.S),null!==this.o||this.N||(t.H=n,n=null),this.O)e:{for(var r=0,i=0;i<this.i.length;i++){var s=this.i[i];if(void 0===(s="__data__"in s.g&&"string"==typeof(s=s.g.__data__)?s.length:void 0))break;if(4096<(r+=s)){r=i;break e}if(4096===r||i===this.i.length-1){r=i+1;break e}}r=1e3}else r=1e3;r=ei(this,t,r),Jn(i=Hn(this.F),"RID",e),Jn(i,"CVER",22),this.D&&Jn(i,"X-HTTP-Session-Id",this.D),Zr(this,i),n&&(this.N?r="headers="+encodeURIComponent(String(Gr(n)))+"&"+r:this.o&&zr(i,this.o,n)),$r(this.h,t),this.Ya&&Jn(i,"TYPE","init"),this.O?(Jn(i,"$req",r),Jn(i,"SID","null"),t.Z=!0,Ln(t,i,null)):Ln(t,i,r),this.G=2}}else 3==this.G&&(e?Xr(this,e):0==this.i.length||pr(this.h)||Xr(this))},be.Ia=function(){if(this.u=null,ii(this),this.$&&!(this.K||null==this.g||0>=this.P)){var e=2*this.P;this.j.info("BP detection timer enabled: "+e),this.B=mn(xe(this.eb,this),e)}},be.eb=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.L=!1,this.K=!0,Nn(10),Qr(this),ii(this))},be.cb=function(){null!=this.v&&(this.v=null,Qr(this),ni(this),Nn(19))},be.kb=function(e){e?(this.j.info("Successfully pinged google.com"),Nn(2)):(this.j.info("Failed to ping google.com"),Nn(1))},(be=hi.prototype).xa=function(){},be.wa=function(){},be.va=function(){},be.ua=function(){},be.Ra=function(){},fi.prototype.g=function(e,t){return new Ai(e,t)},Me(Ai,Pt),Ai.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.H=!0);var e=this.g,t=this.l,n=this.h||void 0;Nn(0),e.V=t,e.ia=n||{},e.L=e.Y,e.F=li(e,null,e.V),Jr(e)},Ai.prototype.close=function(){Wr(this.g)},Ai.prototype.u=function(e){var t=this.g;if("string"==typeof e){var n={};n.__data__=e,e=n}else this.v&&((n={}).__data__=Vt(e),e=n);t.i.push(new fr(t.ab++,e)),3==t.G&&Jr(t)},Ai.prototype.M=function(){this.g.l=null,delete this.j,Wr(this.g),delete this.g,Ai.X.M.call(this)},Me(Ni,En),Me(pi,In),Me(mi,hi),mi.prototype.xa=function(){Ut(this.g,"a")},mi.prototype.wa=function(e){Ut(this.g,new Ni(e))},mi.prototype.va=function(e){Ut(this.g,new pi)},mi.prototype.ua=function(){Ut(this.g,"b")},fi.prototype.createWebChannel=fi.prototype.g,Ai.prototype.send=Ai.prototype.u,Ai.prototype.open=Ai.prototype.m,Ai.prototype.close=Ai.prototype.close,gn.NO_ERROR=0,gn.TIMEOUT=8,gn.HTTP_ERROR=6,$n.COMPLETE="complete",wn.EventType=Cn,Cn.OPEN="a",Cn.CLOSE="b",Cn.ERROR="c",Cn.MESSAGE="d",Pt.prototype.listen=Pt.prototype.N,Lr.prototype.listenOnce=Lr.prototype.O,Lr.prototype.getLastError=Lr.prototype.Oa,Lr.prototype.getLastErrorCode=Lr.prototype.Ea,Lr.prototype.getStatus=Lr.prototype.aa,Lr.prototype.getResponseJson=Lr.prototype.Sa,Lr.prototype.getResponseText=Lr.prototype.fa,Lr.prototype.send=Lr.prototype.da,Lr.prototype.setWithCredentials=Lr.prototype.Ka;var gi=gn,$i=$n,yi=cn,vi=10,wi=11,bi=Ir,Ci=wn,Ei=Lr;const Ii="@firebase/firestore";
319
+ /**
320
+ * @license
321
+ * Copyright 2017 Google LLC
322
+ *
323
+ * Licensed under the Apache License, Version 2.0 (the "License");
324
+ * you may not use this file except in compliance with the License.
325
+ * You may obtain a copy of the License at
326
+ *
327
+ * http://www.apache.org/licenses/LICENSE-2.0
328
+ *
329
+ * Unless required by applicable law or agreed to in writing, software
330
+ * distributed under the License is distributed on an "AS IS" BASIS,
331
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
332
+ * See the License for the specific language governing permissions and
333
+ * limitations under the License.
334
+ */class Ti{constructor(e){this.uid=e}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}Ti.UNAUTHENTICATED=new Ti(null),Ti.GOOGLE_CREDENTIALS=new Ti("google-credentials-uid"),Ti.FIRST_PARTY=new Ti("first-party-uid"),Ti.MOCK_USER=new Ti("mock-user");
335
+ /**
336
+ * @license
337
+ * Copyright 2017 Google LLC
338
+ *
339
+ * Licensed under the Apache License, Version 2.0 (the "License");
340
+ * you may not use this file except in compliance with the License.
341
+ * You may obtain a copy of the License at
342
+ *
343
+ * http://www.apache.org/licenses/LICENSE-2.0
344
+ *
345
+ * Unless required by applicable law or agreed to in writing, software
346
+ * distributed under the License is distributed on an "AS IS" BASIS,
347
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
348
+ * See the License for the specific language governing permissions and
349
+ * limitations under the License.
350
+ */
351
+ let Si="9.15.0";
352
+ /**
353
+ * @license
354
+ * Copyright 2017 Google LLC
355
+ *
356
+ * Licensed under the Apache License, Version 2.0 (the "License");
357
+ * you may not use this file except in compliance with the License.
358
+ * You may obtain a copy of the License at
359
+ *
360
+ * http://www.apache.org/licenses/LICENSE-2.0
361
+ *
362
+ * Unless required by applicable law or agreed to in writing, software
363
+ * distributed under the License is distributed on an "AS IS" BASIS,
364
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
365
+ * See the License for the specific language governing permissions and
366
+ * limitations under the License.
367
+ */const _i=new k("@firebase/firestore");function ki(){return _i.logLevel}function Di(e,...t){if(_i.logLevel<=E.DEBUG){const n=t.map(xi);_i.debug(`Firestore (${Si}): ${e}`,...n)}}function Ri(e,...t){if(_i.logLevel<=E.ERROR){const n=t.map(xi);_i.error(`Firestore (${Si}): ${e}`,...n)}}function Li(e,...t){if(_i.logLevel<=E.WARN){const n=t.map(xi);_i.warn(`Firestore (${Si}): ${e}`,...n)}}function xi(e){if("string"==typeof e)return e;try{return t=e,JSON.stringify(t)}catch(t){return e}
368
+ /**
369
+ * @license
370
+ * Copyright 2020 Google LLC
371
+ *
372
+ * Licensed under the Apache License, Version 2.0 (the "License");
373
+ * you may not use this file except in compliance with the License.
374
+ * You may obtain a copy of the License at
375
+ *
376
+ * http://www.apache.org/licenses/LICENSE-2.0
377
+ *
378
+ * Unless required by applicable law or agreed to in writing, software
379
+ * distributed under the License is distributed on an "AS IS" BASIS,
380
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
381
+ * See the License for the specific language governing permissions and
382
+ * limitations under the License.
383
+ */var t}
384
+ /**
385
+ * @license
386
+ * Copyright 2017 Google LLC
387
+ *
388
+ * Licensed under the Apache License, Version 2.0 (the "License");
389
+ * you may not use this file except in compliance with the License.
390
+ * You may obtain a copy of the License at
391
+ *
392
+ * http://www.apache.org/licenses/LICENSE-2.0
393
+ *
394
+ * Unless required by applicable law or agreed to in writing, software
395
+ * distributed under the License is distributed on an "AS IS" BASIS,
396
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
397
+ * See the License for the specific language governing permissions and
398
+ * limitations under the License.
399
+ */function Oi(e="Unexpected state"){const t=`FIRESTORE (${Si}) INTERNAL ASSERTION FAILED: `+e;throw Ri(t),new Error(t)}function Mi(e,t){e||Oi()}function Pi(e,t){return e}
400
+ /**
401
+ * @license
402
+ * Copyright 2017 Google LLC
403
+ *
404
+ * Licensed under the Apache License, Version 2.0 (the "License");
405
+ * you may not use this file except in compliance with the License.
406
+ * You may obtain a copy of the License at
407
+ *
408
+ * http://www.apache.org/licenses/LICENSE-2.0
409
+ *
410
+ * Unless required by applicable law or agreed to in writing, software
411
+ * distributed under the License is distributed on an "AS IS" BASIS,
412
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
413
+ * See the License for the specific language governing permissions and
414
+ * limitations under the License.
415
+ */const Ui={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class Fi extends l{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}
416
+ /**
417
+ * @license
418
+ * Copyright 2017 Google LLC
419
+ *
420
+ * Licensed under the Apache License, Version 2.0 (the "License");
421
+ * you may not use this file except in compliance with the License.
422
+ * You may obtain a copy of the License at
423
+ *
424
+ * http://www.apache.org/licenses/LICENSE-2.0
425
+ *
426
+ * Unless required by applicable law or agreed to in writing, software
427
+ * distributed under the License is distributed on an "AS IS" BASIS,
428
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
429
+ * See the License for the specific language governing permissions and
430
+ * limitations under the License.
431
+ */class Vi{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}
432
+ /**
433
+ * @license
434
+ * Copyright 2017 Google LLC
435
+ *
436
+ * Licensed under the Apache License, Version 2.0 (the "License");
437
+ * you may not use this file except in compliance with the License.
438
+ * You may obtain a copy of the License at
439
+ *
440
+ * http://www.apache.org/licenses/LICENSE-2.0
441
+ *
442
+ * Unless required by applicable law or agreed to in writing, software
443
+ * distributed under the License is distributed on an "AS IS" BASIS,
444
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
445
+ * See the License for the specific language governing permissions and
446
+ * limitations under the License.
447
+ */class Bi{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class qi{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable((()=>t(Ti.UNAUTHENTICATED)))}shutdown(){}}class ji{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,t){this.changeListener=t,e.enqueueRetryable((()=>t(this.token.user)))}shutdown(){this.changeListener=null}}class Gi{constructor(e){this.t=e,this.currentUser=Ti.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){let n=this.i;const r=e=>this.i!==n?(n=this.i,t(e)):Promise.resolve();let i=new Vi;this.o=()=>{this.i++,this.currentUser=this.u(),i.resolve(),i=new Vi,e.enqueueRetryable((()=>r(this.currentUser)))};const s=()=>{const t=i;e.enqueueRetryable((async()=>{await t.promise,await r(this.currentUser)}))},o=e=>{Di("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=e,this.auth.addAuthTokenListener(this.o),s()};this.t.onInit((e=>o(e))),setTimeout((()=>{if(!this.auth){const e=this.t.getImmediate({optional:!0});e?o(e):(Di("FirebaseAuthCredentialsProvider","Auth not yet detected"),i.resolve(),i=new Vi)}}),0),s()}getToken(){const e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then((t=>this.i!==e?(Di("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):t?(Mi("string"==typeof t.accessToken),new Bi(t.accessToken,this.currentUser)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const e=this.auth&&this.auth.getUid();return Mi(null===e||"string"==typeof e),new Ti(e)}}class zi{constructor(e,t,n,r){this.h=e,this.l=t,this.m=n,this.g=r,this.type="FirstParty",this.user=Ti.FIRST_PARTY,this.p=new Map}I(){return this.g?this.g():(Mi(!("object"!=typeof this.h||null===this.h||!this.h.auth||!this.h.auth.getAuthHeaderValueForFirstParty)),this.h.auth.getAuthHeaderValueForFirstParty([]))}get headers(){this.p.set("X-Goog-AuthUser",this.l);const e=this.I();return e&&this.p.set("Authorization",e),this.m&&this.p.set("X-Goog-Iam-Authorization-Token",this.m),this.p}}class Ki{constructor(e,t,n,r){this.h=e,this.l=t,this.m=n,this.g=r}getToken(){return Promise.resolve(new zi(this.h,this.l,this.m,this.g))}start(e,t){e.enqueueRetryable((()=>t(Ti.FIRST_PARTY)))}shutdown(){}invalidateToken(){}}class Hi{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class Wi{constructor(e){this.T=e,this.forceRefresh=!1,this.appCheck=null,this.A=null}start(e,t){const n=e=>{null!=e.error&&Di("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${e.error.message}`);const n=e.token!==this.A;return this.A=e.token,Di("FirebaseAppCheckTokenProvider",`Received ${n?"new":"existing"} token.`),n?t(e.token):Promise.resolve()};this.o=t=>{e.enqueueRetryable((()=>n(t)))};const r=e=>{Di("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=e,this.appCheck.addTokenListener(this.o)};this.T.onInit((e=>r(e))),setTimeout((()=>{if(!this.appCheck){const e=this.T.getImmediate({optional:!0});e?r(e):Di("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}}),0)}getToken(){const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then((e=>e?(Mi("string"==typeof e.token),this.A=e.token,new Hi(e.token)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}
448
+ /**
449
+ * @license
450
+ * Copyright 2020 Google LLC
451
+ *
452
+ * Licensed under the Apache License, Version 2.0 (the "License");
453
+ * you may not use this file except in compliance with the License.
454
+ * You may obtain a copy of the License at
455
+ *
456
+ * http://www.apache.org/licenses/LICENSE-2.0
457
+ *
458
+ * Unless required by applicable law or agreed to in writing, software
459
+ * distributed under the License is distributed on an "AS IS" BASIS,
460
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
461
+ * See the License for the specific language governing permissions and
462
+ * limitations under the License.
463
+ */function Qi(e){const t="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(n);else for(let t=0;t<e;t++)n[t]=Math.floor(256*Math.random());return n}
464
+ /**
465
+ * @license
466
+ * Copyright 2017 Google LLC
467
+ *
468
+ * Licensed under the Apache License, Version 2.0 (the "License");
469
+ * you may not use this file except in compliance with the License.
470
+ * You may obtain a copy of the License at
471
+ *
472
+ * http://www.apache.org/licenses/LICENSE-2.0
473
+ *
474
+ * Unless required by applicable law or agreed to in writing, software
475
+ * distributed under the License is distributed on an "AS IS" BASIS,
476
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
477
+ * See the License for the specific language governing permissions and
478
+ * limitations under the License.
479
+ */class Yi{static R(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=Math.floor(256/e.length)*e.length;let n="";for(;n.length<20;){const r=Qi(40);for(let i=0;i<r.length;++i)n.length<20&&r[i]<t&&(n+=e.charAt(r[i]%e.length))}return n}}function Ji(e,t){return e<t?-1:e>t?1:0}function Xi(e,t,n){return e.length===t.length&&e.every(((e,r)=>n(e,t[r])))}
480
+ /**
481
+ * @license
482
+ * Copyright 2017 Google LLC
483
+ *
484
+ * Licensed under the Apache License, Version 2.0 (the "License");
485
+ * you may not use this file except in compliance with the License.
486
+ * You may obtain a copy of the License at
487
+ *
488
+ * http://www.apache.org/licenses/LICENSE-2.0
489
+ *
490
+ * Unless required by applicable law or agreed to in writing, software
491
+ * distributed under the License is distributed on an "AS IS" BASIS,
492
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
493
+ * See the License for the specific language governing permissions and
494
+ * limitations under the License.
495
+ */class Zi{constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0)throw new Fi(Ui.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new Fi(Ui.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<-62135596800)throw new Fi(Ui.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new Fi(Ui.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return Zi.fromMillis(Date.now())}static fromDate(e){return Zi.fromMillis(e.getTime())}static fromMillis(e){const t=Math.floor(e/1e3),n=Math.floor(1e6*(e-1e3*t));return new Zi(t,n)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?Ji(this.nanoseconds,e.nanoseconds):Ji(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){const e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}
496
+ /**
497
+ * @license
498
+ * Copyright 2017 Google LLC
499
+ *
500
+ * Licensed under the Apache License, Version 2.0 (the "License");
501
+ * you may not use this file except in compliance with the License.
502
+ * You may obtain a copy of the License at
503
+ *
504
+ * http://www.apache.org/licenses/LICENSE-2.0
505
+ *
506
+ * Unless required by applicable law or agreed to in writing, software
507
+ * distributed under the License is distributed on an "AS IS" BASIS,
508
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
509
+ * See the License for the specific language governing permissions and
510
+ * limitations under the License.
511
+ */class es{constructor(e){this.timestamp=e}static fromTimestamp(e){return new es(e)}static min(){return new es(new Zi(0,0))}static max(){return new es(new Zi(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}
512
+ /**
513
+ * @license
514
+ * Copyright 2017 Google LLC
515
+ *
516
+ * Licensed under the Apache License, Version 2.0 (the "License");
517
+ * you may not use this file except in compliance with the License.
518
+ * You may obtain a copy of the License at
519
+ *
520
+ * http://www.apache.org/licenses/LICENSE-2.0
521
+ *
522
+ * Unless required by applicable law or agreed to in writing, software
523
+ * distributed under the License is distributed on an "AS IS" BASIS,
524
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
525
+ * See the License for the specific language governing permissions and
526
+ * limitations under the License.
527
+ */class ts{constructor(e,t,n){void 0===t?t=0:t>e.length&&Oi(),void 0===n?n=e.length-t:n>e.length-t&&Oi(),this.segments=e,this.offset=t,this.len=n}get length(){return this.len}isEqual(e){return 0===ts.comparator(this,e)}child(e){const t=this.segments.slice(this.offset,this.limit());return e instanceof ts?e.forEach((e=>{t.push(e)})):t.push(e),this.construct(t)}limit(){return this.offset+this.length}popFirst(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return 0===this.length}isPrefixOf(e){if(e.length<this.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}forEach(e){for(let t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,t){const n=Math.min(e.length,t.length);for(let r=0;r<n;r++){const n=e.get(r),i=t.get(r);if(n<i)return-1;if(n>i)return 1}return e.length<t.length?-1:e.length>t.length?1:0}}class ns extends ts{construct(e,t,n){return new ns(e,t,n)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}static fromString(...e){const t=[];for(const n of e){if(n.indexOf("//")>=0)throw new Fi(Ui.INVALID_ARGUMENT,`Invalid segment (${n}). Paths must not contain // in them.`);t.push(...n.split("/").filter((e=>e.length>0)))}return new ns(t)}static emptyPath(){return new ns([])}}const rs=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class is extends ts{construct(e,t,n){return new is(e,t,n)}static isValidIdentifier(e){return rs.test(e)}canonicalString(){return this.toArray().map((e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),is.isValidIdentifier(e)||(e="`"+e+"`"),e))).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new is(["__name__"])}static fromServerFormat(e){const t=[];let n="",r=0;const i=()=>{if(0===n.length)throw new Fi(Ui.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(n),n=""};let s=!1;for(;r<e.length;){const t=e[r];if("\\"===t){if(r+1===e.length)throw new Fi(Ui.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const t=e[r+1];if("\\"!==t&&"."!==t&&"`"!==t)throw new Fi(Ui.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);n+=t,r+=2}else"`"===t?(s=!s,r++):"."!==t||s?(n+=t,r++):(i(),r++)}if(i(),s)throw new Fi(Ui.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new is(t)}static emptyPath(){return new is([])}}
528
+ /**
529
+ * @license
530
+ * Copyright 2017 Google LLC
531
+ *
532
+ * Licensed under the Apache License, Version 2.0 (the "License");
533
+ * you may not use this file except in compliance with the License.
534
+ * You may obtain a copy of the License at
535
+ *
536
+ * http://www.apache.org/licenses/LICENSE-2.0
537
+ *
538
+ * Unless required by applicable law or agreed to in writing, software
539
+ * distributed under the License is distributed on an "AS IS" BASIS,
540
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
541
+ * See the License for the specific language governing permissions and
542
+ * limitations under the License.
543
+ */class ss{constructor(e){this.path=e}static fromPath(e){return new ss(ns.fromString(e))}static fromName(e){return new ss(ns.fromString(e).popFirst(5))}static empty(){return new ss(ns.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return null!==e&&0===ns.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,t){return ns.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new ss(new ns(e.slice()))}}function os(e){return new ds(e.readTime,e.key,-1)}class ds{constructor(e,t,n){this.readTime=e,this.documentKey=t,this.largestBatchId=n}static min(){return new ds(es.min(),ss.empty(),-1)}static max(){return new ds(es.max(),ss.empty(),-1)}}function as(e,t){let n=e.readTime.compareTo(t.readTime);return 0!==n?n:(n=ss.comparator(e.documentKey,t.documentKey),0!==n?n:Ji(e.largestBatchId,t.largestBatchId))}
544
+ /**
545
+ * @license
546
+ * Copyright 2020 Google LLC
547
+ *
548
+ * Licensed under the Apache License, Version 2.0 (the "License");
549
+ * you may not use this file except in compliance with the License.
550
+ * You may obtain a copy of the License at
551
+ *
552
+ * http://www.apache.org/licenses/LICENSE-2.0
553
+ *
554
+ * Unless required by applicable law or agreed to in writing, software
555
+ * distributed under the License is distributed on an "AS IS" BASIS,
556
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
557
+ * See the License for the specific language governing permissions and
558
+ * limitations under the License.
559
+ */class cs{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach((e=>e()))}}
560
+ /**
561
+ * @license
562
+ * Copyright 2017 Google LLC
563
+ *
564
+ * Licensed under the Apache License, Version 2.0 (the "License");
565
+ * you may not use this file except in compliance with the License.
566
+ * You may obtain a copy of the License at
567
+ *
568
+ * http://www.apache.org/licenses/LICENSE-2.0
569
+ *
570
+ * Unless required by applicable law or agreed to in writing, software
571
+ * distributed under the License is distributed on an "AS IS" BASIS,
572
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
573
+ * See the License for the specific language governing permissions and
574
+ * limitations under the License.
575
+ */async function ls(e){if(e.code!==Ui.FAILED_PRECONDITION||"The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab."!==e.message)throw e;Di("LocalStore","Unexpectedly lost primary lease")}
576
+ /**
577
+ * @license
578
+ * Copyright 2017 Google LLC
579
+ *
580
+ * Licensed under the Apache License, Version 2.0 (the "License");
581
+ * you may not use this file except in compliance with the License.
582
+ * You may obtain a copy of the License at
583
+ *
584
+ * http://www.apache.org/licenses/LICENSE-2.0
585
+ *
586
+ * Unless required by applicable law or agreed to in writing, software
587
+ * distributed under the License is distributed on an "AS IS" BASIS,
588
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
589
+ * See the License for the specific language governing permissions and
590
+ * limitations under the License.
591
+ */class us{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e((e=>{this.isDone=!0,this.result=e,this.nextCallback&&this.nextCallback(e)}),(e=>{this.isDone=!0,this.error=e,this.catchCallback&&this.catchCallback(e)}))}catch(e){return this.next(void 0,e)}next(e,t){return this.callbackAttached&&Oi(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(e,this.result):new us(((n,r)=>{this.nextCallback=t=>{this.wrapSuccess(e,t).next(n,r)},this.catchCallback=e=>{this.wrapFailure(t,e).next(n,r)}}))}toPromise(){return new Promise(((e,t)=>{this.next(e,t)}))}wrapUserFunction(e){try{const t=e();return t instanceof us?t:us.resolve(t)}catch(e){return us.reject(e)}}wrapSuccess(e,t){return e?this.wrapUserFunction((()=>e(t))):us.resolve(t)}wrapFailure(e,t){return e?this.wrapUserFunction((()=>e(t))):us.reject(t)}static resolve(e){return new us(((t,n)=>{t(e)}))}static reject(e){return new us(((t,n)=>{n(e)}))}static waitFor(e){return new us(((t,n)=>{let r=0,i=0,s=!1;e.forEach((e=>{++r,e.next((()=>{++i,s&&i===r&&t()}),(e=>n(e)))})),s=!0,i===r&&t()}))}static or(e){let t=us.resolve(!1);for(const n of e)t=t.next((e=>e?us.resolve(e):n()));return t}static forEach(e,t){const n=[];return e.forEach(((e,r)=>{n.push(t.call(this,e,r))})),this.waitFor(n)}static mapArray(e,t){return new us(((n,r)=>{const i=e.length,s=new Array(i);let o=0;for(let d=0;d<i;d++){const a=d;t(e[a]).next((e=>{s[a]=e,++o,o===i&&n(s)}),(e=>r(e)))}}))}static doWhile(e,t){return new us(((n,r)=>{const i=()=>{!0===e()?t().next((()=>{i()}),r):n()};i()}))}}function hs(e){return"IndexedDbTransactionError"===e.name}
592
+ /**
593
+ * @license
594
+ * Copyright 2018 Google LLC
595
+ *
596
+ * Licensed under the Apache License, Version 2.0 (the "License");
597
+ * you may not use this file except in compliance with the License.
598
+ * You may obtain a copy of the License at
599
+ *
600
+ * http://www.apache.org/licenses/LICENSE-2.0
601
+ *
602
+ * Unless required by applicable law or agreed to in writing, software
603
+ * distributed under the License is distributed on an "AS IS" BASIS,
604
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
605
+ * See the License for the specific language governing permissions and
606
+ * limitations under the License.
607
+ */class fs{constructor(e,t){this.previousValue=e,t&&(t.sequenceNumberHandler=e=>this.ut(e),this.ct=e=>t.writeSequenceNumber(e))}ut(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.ct&&this.ct(e),e}}fs.at=-1;
608
+ /**
609
+ * @license
610
+ * Copyright 2017 Google LLC
611
+ *
612
+ * Licensed under the Apache License, Version 2.0 (the "License");
613
+ * you may not use this file except in compliance with the License.
614
+ * You may obtain a copy of the License at
615
+ *
616
+ * http://www.apache.org/licenses/LICENSE-2.0
617
+ *
618
+ * Unless required by applicable law or agreed to in writing, software
619
+ * distributed under the License is distributed on an "AS IS" BASIS,
620
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
621
+ * See the License for the specific language governing permissions and
622
+ * limitations under the License.
623
+ */
624
+ class As{constructor(e,t,n,r,i,s,o,d){this.databaseId=e,this.appId=t,this.persistenceKey=n,this.host=r,this.ssl=i,this.forceLongPolling=s,this.autoDetectLongPolling=o,this.useFetchStreams=d}}class Ns{constructor(e,t){this.projectId=e,this.database=t||"(default)"}static empty(){return new Ns("","")}get isDefaultDatabase(){return"(default)"===this.database}isEqual(e){return e instanceof Ns&&e.projectId===this.projectId&&e.database===this.database}}
625
+ /**
626
+ * @license
627
+ * Copyright 2017 Google LLC
628
+ *
629
+ * Licensed under the Apache License, Version 2.0 (the "License");
630
+ * you may not use this file except in compliance with the License.
631
+ * You may obtain a copy of the License at
632
+ *
633
+ * http://www.apache.org/licenses/LICENSE-2.0
634
+ *
635
+ * Unless required by applicable law or agreed to in writing, software
636
+ * distributed under the License is distributed on an "AS IS" BASIS,
637
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
638
+ * See the License for the specific language governing permissions and
639
+ * limitations under the License.
640
+ */function ps(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function ms(e,t){for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function gs(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}
641
+ /**
642
+ * @license
643
+ * Copyright 2017 Google LLC
644
+ *
645
+ * Licensed under the Apache License, Version 2.0 (the "License");
646
+ * you may not use this file except in compliance with the License.
647
+ * You may obtain a copy of the License at
648
+ *
649
+ * http://www.apache.org/licenses/LICENSE-2.0
650
+ *
651
+ * Unless required by applicable law or agreed to in writing, software
652
+ * distributed under the License is distributed on an "AS IS" BASIS,
653
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
654
+ * See the License for the specific language governing permissions and
655
+ * limitations under the License.
656
+ */function $s(e){return null==e}function ys(e){return 0===e&&1/e==-1/0}
657
+ /**
658
+ * @license
659
+ * Copyright 2020 Google LLC
660
+ *
661
+ * Licensed under the Apache License, Version 2.0 (the "License");
662
+ * you may not use this file except in compliance with the License.
663
+ * You may obtain a copy of the License at
664
+ *
665
+ * http://www.apache.org/licenses/LICENSE-2.0
666
+ *
667
+ * Unless required by applicable law or agreed to in writing, software
668
+ * distributed under the License is distributed on an "AS IS" BASIS,
669
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
670
+ * See the License for the specific language governing permissions and
671
+ * limitations under the License.
672
+ */
673
+ class vs{constructor(e){this.binaryString=e}static fromBase64String(e){const t=atob(e);return new vs(t)}static fromUint8Array(e){const t=function(e){let t="";for(let n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}(e);return new vs(t)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return e=this.binaryString,btoa(e);var e}toUint8Array(){return function(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}
674
+ /**
675
+ * @license
676
+ * Copyright 2020 Google LLC
677
+ *
678
+ * Licensed under the Apache License, Version 2.0 (the "License");
679
+ * you may not use this file except in compliance with the License.
680
+ * You may obtain a copy of the License at
681
+ *
682
+ * http://www.apache.org/licenses/LICENSE-2.0
683
+ *
684
+ * Unless required by applicable law or agreed to in writing, software
685
+ * distributed under the License is distributed on an "AS IS" BASIS,
686
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
687
+ * See the License for the specific language governing permissions and
688
+ * limitations under the License.
689
+ */(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return Ji(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}vs.EMPTY_BYTE_STRING=new vs("");const ws=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function bs(e){if(Mi(!!e),"string"==typeof e){let t=0;const n=ws.exec(e);if(Mi(!!n),n[1]){let e=n[1];e=(e+"000000000").substr(0,9),t=Number(e)}const r=new Date(e);return{seconds:Math.floor(r.getTime()/1e3),nanos:t}}return{seconds:Cs(e.seconds),nanos:Cs(e.nanos)}}function Cs(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function Es(e){return"string"==typeof e?vs.fromBase64String(e):vs.fromUint8Array(e)}
690
+ /**
691
+ * @license
692
+ * Copyright 2020 Google LLC
693
+ *
694
+ * Licensed under the Apache License, Version 2.0 (the "License");
695
+ * you may not use this file except in compliance with the License.
696
+ * You may obtain a copy of the License at
697
+ *
698
+ * http://www.apache.org/licenses/LICENSE-2.0
699
+ *
700
+ * Unless required by applicable law or agreed to in writing, software
701
+ * distributed under the License is distributed on an "AS IS" BASIS,
702
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
703
+ * See the License for the specific language governing permissions and
704
+ * limitations under the License.
705
+ */function Is(e){var t,n;return"server_timestamp"===(null===(n=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function Ts(e){const t=e.mapValue.fields.__previous_value__;return Is(t)?Ts(t):t}function Ss(e){const t=bs(e.mapValue.fields.__local_write_time__.timestampValue);return new Zi(t.seconds,t.nanos)}
706
+ /**
707
+ * @license
708
+ * Copyright 2020 Google LLC
709
+ *
710
+ * Licensed under the Apache License, Version 2.0 (the "License");
711
+ * you may not use this file except in compliance with the License.
712
+ * You may obtain a copy of the License at
713
+ *
714
+ * http://www.apache.org/licenses/LICENSE-2.0
715
+ *
716
+ * Unless required by applicable law or agreed to in writing, software
717
+ * distributed under the License is distributed on an "AS IS" BASIS,
718
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
719
+ * See the License for the specific language governing permissions and
720
+ * limitations under the License.
721
+ */const _s={fields:{__type__:{stringValue:"__max__"}}};function ks(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?Is(e)?4:function(e){return"__max__"===(((e.mapValue||{}).fields||{}).__type__||{}).stringValue}
722
+ /**
723
+ * @license
724
+ * Copyright 2022 Google LLC
725
+ *
726
+ * Licensed under the Apache License, Version 2.0 (the "License");
727
+ * you may not use this file except in compliance with the License.
728
+ * You may obtain a copy of the License at
729
+ *
730
+ * http://www.apache.org/licenses/LICENSE-2.0
731
+ *
732
+ * Unless required by applicable law or agreed to in writing, software
733
+ * distributed under the License is distributed on an "AS IS" BASIS,
734
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
735
+ * See the License for the specific language governing permissions and
736
+ * limitations under the License.
737
+ */(e)?9007199254740991:10:Oi()}function Ds(e,t){if(e===t)return!0;const n=ks(e);if(n!==ks(t))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return Ss(e).isEqual(Ss(t));case 3:return function(e,t){if("string"==typeof e.timestampValue&&"string"==typeof t.timestampValue&&e.timestampValue.length===t.timestampValue.length)return e.timestampValue===t.timestampValue;const n=bs(e.timestampValue),r=bs(t.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return function(e,t){return Es(e.bytesValue).isEqual(Es(t.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(e,t){return Cs(e.geoPointValue.latitude)===Cs(t.geoPointValue.latitude)&&Cs(e.geoPointValue.longitude)===Cs(t.geoPointValue.longitude)}(e,t);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return Cs(e.integerValue)===Cs(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){const n=Cs(e.doubleValue),r=Cs(t.doubleValue);return n===r?ys(n)===ys(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return Xi(e.arrayValue.values||[],t.arrayValue.values||[],Ds);case 10:return function(e,t){const n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(ps(n)!==ps(r))return!1;for(const e in n)if(n.hasOwnProperty(e)&&(void 0===r[e]||!Ds(n[e],r[e])))return!1;return!0}(e,t);default:return Oi()}}function Rs(e,t){return void 0!==(e.values||[]).find((e=>Ds(e,t)))}function Ls(e,t){if(e===t)return 0;const n=ks(e),r=ks(t);if(n!==r)return Ji(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return Ji(e.booleanValue,t.booleanValue);case 2:return function(e,t){const n=Cs(e.integerValue||e.doubleValue),r=Cs(t.integerValue||t.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(e,t);case 3:return xs(e.timestampValue,t.timestampValue);case 4:return xs(Ss(e),Ss(t));case 5:return Ji(e.stringValue,t.stringValue);case 6:return function(e,t){const n=Es(e),r=Es(t);return n.compareTo(r)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){const n=e.split("/"),r=t.split("/");for(let e=0;e<n.length&&e<r.length;e++){const t=Ji(n[e],r[e]);if(0!==t)return t}return Ji(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){const n=Ji(Cs(e.latitude),Cs(t.latitude));return 0!==n?n:Ji(Cs(e.longitude),Cs(t.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return function(e,t){const n=e.values||[],r=t.values||[];for(let e=0;e<n.length&&e<r.length;++e){const t=Ls(n[e],r[e]);if(t)return t}return Ji(n.length,r.length)}(e.arrayValue,t.arrayValue);case 10:return function(e,t){if(e===_s&&t===_s)return 0;if(e===_s)return 1;if(t===_s)return-1;const n=e.fields||{},r=Object.keys(n),i=t.fields||{},s=Object.keys(i);r.sort(),s.sort();for(let e=0;e<r.length&&e<s.length;++e){const t=Ji(r[e],s[e]);if(0!==t)return t;const o=Ls(n[r[e]],i[s[e]]);if(0!==o)return o}return Ji(r.length,s.length)}(e.mapValue,t.mapValue);default:throw Oi()}}function xs(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return Ji(e,t);const n=bs(e),r=bs(t),i=Ji(n.seconds,r.seconds);return 0!==i?i:Ji(n.nanos,r.nanos)}function Os(e){return Ms(e)}function Ms(e){return"nullValue"in e?"null":"booleanValue"in e?""+e.booleanValue:"integerValue"in e?""+e.integerValue:"doubleValue"in e?""+e.doubleValue:"timestampValue"in e?function(e){const t=bs(e);return`time(${t.seconds},${t.nanos})`}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?Es(e.bytesValue).toBase64():"referenceValue"in e?(n=e.referenceValue,ss.fromName(n).toString()):"geoPointValue"in e?`geo(${(t=e.geoPointValue).latitude},${t.longitude})`:"arrayValue"in e?function(e){let t="[",n=!0;for(const r of e.values||[])n?n=!1:t+=",",t+=Ms(r);return t+"]"}(e.arrayValue):"mapValue"in e?function(e){const t=Object.keys(e.fields||{}).sort();let n="{",r=!0;for(const i of t)r?r=!1:n+=",",n+=`${i}:${Ms(e.fields[i])}`;return n+"}"}(e.mapValue):Oi();var t,n}function Ps(e,t){return{referenceValue:`projects/${e.projectId}/databases/${e.database}/documents/${t.path.canonicalString()}`}}function Us(e){return!!e&&"integerValue"in e}function Fs(e){return!!e&&"arrayValue"in e}function Vs(e){return!!e&&"nullValue"in e}function Bs(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function qs(e){return!!e&&"mapValue"in e}function js(e){if(e.geoPointValue)return{geoPointValue:Object.assign({},e.geoPointValue)};if(e.timestampValue&&"object"==typeof e.timestampValue)return{timestampValue:Object.assign({},e.timestampValue)};if(e.mapValue){const t={mapValue:{fields:{}}};return ms(e.mapValue.fields,((e,n)=>t.mapValue.fields[e]=js(n))),t}if(e.arrayValue){const t={arrayValue:{values:[]}};for(let n=0;n<(e.arrayValue.values||[]).length;++n)t.arrayValue.values[n]=js(e.arrayValue.values[n]);return t}return Object.assign({},e)}class Gs{constructor(e,t){this.position=e,this.inclusive=t}}function zs(e,t,n){let r=0;for(let i=0;i<e.position.length;i++){const s=t[i],o=e.position[i];if(r=s.field.isKeyField()?ss.comparator(ss.fromName(o.referenceValue),n.key):Ls(o,n.data.field(s.field)),"desc"===s.dir&&(r*=-1),0!==r)break}return r}function Ks(e,t){if(null===e)return null===t;if(null===t)return!1;if(e.inclusive!==t.inclusive||e.position.length!==t.position.length)return!1;for(let n=0;n<e.position.length;n++)if(!Ds(e.position[n],t.position[n]))return!1;return!0}
738
+ /**
739
+ * @license
740
+ * Copyright 2022 Google LLC
741
+ *
742
+ * Licensed under the Apache License, Version 2.0 (the "License");
743
+ * you may not use this file except in compliance with the License.
744
+ * You may obtain a copy of the License at
745
+ *
746
+ * http://www.apache.org/licenses/LICENSE-2.0
747
+ *
748
+ * Unless required by applicable law or agreed to in writing, software
749
+ * distributed under the License is distributed on an "AS IS" BASIS,
750
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
751
+ * See the License for the specific language governing permissions and
752
+ * limitations under the License.
753
+ */class Hs{}class Ws extends Hs{constructor(e,t,n){super(),this.field=e,this.op=t,this.value=n}static create(e,t,n){return e.isKeyField()?"in"===t||"not-in"===t?this.createKeyFieldInFilter(e,t,n):new to(e,t,n):"array-contains"===t?new so(e,n):"in"===t?new oo(e,n):"not-in"===t?new ao(e,n):"array-contains-any"===t?new co(e,n):new Ws(e,t,n)}static createKeyFieldInFilter(e,t,n){return"in"===t?new no(e,n):new ro(e,n)}matches(e){const t=e.data.field(this.field);return"!="===this.op?null!==t&&this.matchesComparison(Ls(t,this.value)):null!==t&&ks(this.value)===ks(t)&&this.matchesComparison(Ls(t,this.value))}matchesComparison(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return 0===e;case"!=":return 0!==e;case">":return e>0;case">=":return e>=0;default:return Oi()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}getFirstInequalityField(){return this.isInequality()?this.field:null}}class Qs extends Hs{constructor(e,t){super(),this.filters=e,this.op=t,this.ht=null}static create(e,t){return new Qs(e,t)}matches(e){return Ys(this)?void 0===this.filters.find((t=>!t.matches(e))):void 0!==this.filters.find((t=>t.matches(e)))}getFlattenedFilters(){return null!==this.ht||(this.ht=this.filters.reduce(((e,t)=>e.concat(t.getFlattenedFilters())),[])),this.ht}getFilters(){return Object.assign([],this.filters)}getFirstInequalityField(){const e=this.lt((e=>e.isInequality()));return null!==e?e.field:null}lt(e){for(const t of this.getFlattenedFilters())if(e(t))return t;return null}}function Ys(e){return"and"===e.op}function Js(e){return function(e){for(const t of e.filters)if(t instanceof Qs)return!1;return!0}(e)&&Ys(e)}function Xs(e){if(e instanceof Ws)return e.field.canonicalString()+e.op.toString()+Os(e.value);{const t=e.filters.map((e=>Xs(e))).join(",");return`${e.op}(${t})`}}function Zs(e,t){return e instanceof Ws?function(e,t){return t instanceof Ws&&e.op===t.op&&e.field.isEqual(t.field)&&Ds(e.value,t.value)}(e,t):e instanceof Qs?function(e,t){return t instanceof Qs&&e.op===t.op&&e.filters.length===t.filters.length&&e.filters.reduce(((e,n,r)=>e&&Zs(n,t.filters[r])),!0)}(e,t):void Oi()}function eo(e){return e instanceof Ws?function(e){return`${e.field.canonicalString()} ${e.op} ${Os(e.value)}`}(e):e instanceof Qs?function(e){return e.op.toString()+" {"+e.getFilters().map(eo).join(" ,")+"}"}(e):"Filter"}class to extends Ws{constructor(e,t,n){super(e,t,n),this.key=ss.fromName(n.referenceValue)}matches(e){const t=ss.comparator(e.key,this.key);return this.matchesComparison(t)}}class no extends Ws{constructor(e,t){super(e,"in",t),this.keys=io("in",t)}matches(e){return this.keys.some((t=>t.isEqual(e.key)))}}class ro extends Ws{constructor(e,t){super(e,"not-in",t),this.keys=io("not-in",t)}matches(e){return!this.keys.some((t=>t.isEqual(e.key)))}}function io(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map((e=>ss.fromName(e.referenceValue)))}class so extends Ws{constructor(e,t){super(e,"array-contains",t)}matches(e){const t=e.data.field(this.field);return Fs(t)&&Rs(t.arrayValue,this.value)}}class oo extends Ws{constructor(e,t){super(e,"in",t)}matches(e){const t=e.data.field(this.field);return null!==t&&Rs(this.value.arrayValue,t)}}class ao extends Ws{constructor(e,t){super(e,"not-in",t)}matches(e){if(Rs(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const t=e.data.field(this.field);return null!==t&&!Rs(this.value.arrayValue,t)}}class co extends Ws{constructor(e,t){super(e,"array-contains-any",t)}matches(e){const t=e.data.field(this.field);return!(!Fs(t)||!t.arrayValue.values)&&t.arrayValue.values.some((e=>Rs(this.value.arrayValue,e)))}}
754
+ /**
755
+ * @license
756
+ * Copyright 2022 Google LLC
757
+ *
758
+ * Licensed under the Apache License, Version 2.0 (the "License");
759
+ * you may not use this file except in compliance with the License.
760
+ * You may obtain a copy of the License at
761
+ *
762
+ * http://www.apache.org/licenses/LICENSE-2.0
763
+ *
764
+ * Unless required by applicable law or agreed to in writing, software
765
+ * distributed under the License is distributed on an "AS IS" BASIS,
766
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
767
+ * See the License for the specific language governing permissions and
768
+ * limitations under the License.
769
+ */class lo{constructor(e,t="asc"){this.field=e,this.dir=t}}function uo(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}
770
+ /**
771
+ * @license
772
+ * Copyright 2017 Google LLC
773
+ *
774
+ * Licensed under the Apache License, Version 2.0 (the "License");
775
+ * you may not use this file except in compliance with the License.
776
+ * You may obtain a copy of the License at
777
+ *
778
+ * http://www.apache.org/licenses/LICENSE-2.0
779
+ *
780
+ * Unless required by applicable law or agreed to in writing, software
781
+ * distributed under the License is distributed on an "AS IS" BASIS,
782
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
783
+ * See the License for the specific language governing permissions and
784
+ * limitations under the License.
785
+ */class ho{constructor(e,t){this.comparator=e,this.root=t||Ao.EMPTY}insert(e,t){return new ho(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,Ao.BLACK,null,null))}remove(e){return new ho(this.comparator,this.root.remove(e,this.comparator).copy(null,null,Ao.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){const n=this.comparator(e,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null}indexOf(e){let t=0,n=this.root;for(;!n.isEmpty();){const r=this.comparator(e,n.key);if(0===r)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal(((t,n)=>(e(t,n),!1)))}toString(){const e=[];return this.inorderTraversal(((t,n)=>(e.push(`${t}:${n}`),!1))),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new fo(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new fo(this.root,e,this.comparator,!1)}getReverseIterator(){return new fo(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new fo(this.root,e,this.comparator,!0)}}class fo{constructor(e,t,n,r){this.isReverse=r,this.nodeStack=[];let i=1;for(;!e.isEmpty();)if(i=t?n(e.key,t):1,t&&r&&(i*=-1),i<0)e=this.isReverse?e.left:e.right;else{if(0===i){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class Ao{constructor(e,t,n,r,i){this.key=e,this.value=t,this.color=null!=n?n:Ao.RED,this.left=null!=r?r:Ao.EMPTY,this.right=null!=i?i:Ao.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,n,r,i){return new Ao(null!=e?e:this.key,null!=t?t:this.value,null!=n?n:this.color,null!=r?r:this.left,null!=i?i:this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,n){let r=this;const i=n(e,r.key);return r=i<0?r.copy(null,null,null,r.left.insert(e,t,n),null):0===i?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,n)),r.fixUp()}removeMin(){if(this.left.isEmpty())return Ao.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,t){let n,r=this;if(t(e,r.key)<0)r.left.isEmpty()||r.left.isRed()||r.left.left.isRed()||(r=r.moveRedLeft()),r=r.copy(null,null,null,r.left.remove(e,t),null);else{if(r.left.isRed()&&(r=r.rotateRight()),r.right.isEmpty()||r.right.isRed()||r.right.left.isRed()||(r=r.moveRedRight()),0===t(e,r.key)){if(r.right.isEmpty())return Ao.EMPTY;n=r.right.min(),r=r.copy(n.key,n.value,null,null,r.right.removeMin())}r=r.copy(null,null,null,null,r.right.remove(e,t))}return r.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,Ao.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,Ao.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed())throw Oi();if(this.right.isRed())throw Oi();const e=this.left.check();if(e!==this.right.check())throw Oi();return e+(this.isRed()?0:1)}}Ao.EMPTY=null,Ao.RED=!0,Ao.BLACK=!1,Ao.EMPTY=new class{constructor(){this.size=0}get key(){throw Oi()}get value(){throw Oi()}get color(){throw Oi()}get left(){throw Oi()}get right(){throw Oi()}copy(e,t,n,r,i){return this}insert(e,t,n){return new Ao(e,t)}remove(e,t){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};
786
+ /**
787
+ * @license
788
+ * Copyright 2017 Google LLC
789
+ *
790
+ * Licensed under the Apache License, Version 2.0 (the "License");
791
+ * you may not use this file except in compliance with the License.
792
+ * You may obtain a copy of the License at
793
+ *
794
+ * http://www.apache.org/licenses/LICENSE-2.0
795
+ *
796
+ * Unless required by applicable law or agreed to in writing, software
797
+ * distributed under the License is distributed on an "AS IS" BASIS,
798
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
799
+ * See the License for the specific language governing permissions and
800
+ * limitations under the License.
801
+ */
802
+ class No{constructor(e){this.comparator=e,this.data=new ho(this.comparator)}has(e){return null!==this.data.get(e)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal(((t,n)=>(e(t),!1)))}forEachInRange(e,t){const n=this.data.getIteratorFrom(e[0]);for(;n.hasNext();){const r=n.getNext();if(this.comparator(r.key,e[1])>=0)return;t(r.key)}}forEachWhile(e,t){let n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();)if(!e(n.getNext().key))return}firstAfterOrEqual(e){const t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new po(this.data.getIterator())}getIteratorFrom(e){return new po(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let t=this;return t.size<e.size&&(t=e,e=this),e.forEach((e=>{t=t.add(e)})),t}isEqual(e){if(!(e instanceof No))return!1;if(this.size!==e.size)return!1;const t=this.data.getIterator(),n=e.data.getIterator();for(;t.hasNext();){const e=t.getNext().key,r=n.getNext().key;if(0!==this.comparator(e,r))return!1}return!0}toArray(){const e=[];return this.forEach((t=>{e.push(t)})),e}toString(){const e=[];return this.forEach((t=>e.push(t))),"SortedSet("+e.toString()+")"}copy(e){const t=new No(this.comparator);return t.data=e,t}}class po{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}
803
+ /**
804
+ * @license
805
+ * Copyright 2020 Google LLC
806
+ *
807
+ * Licensed under the Apache License, Version 2.0 (the "License");
808
+ * you may not use this file except in compliance with the License.
809
+ * You may obtain a copy of the License at
810
+ *
811
+ * http://www.apache.org/licenses/LICENSE-2.0
812
+ *
813
+ * Unless required by applicable law or agreed to in writing, software
814
+ * distributed under the License is distributed on an "AS IS" BASIS,
815
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
816
+ * See the License for the specific language governing permissions and
817
+ * limitations under the License.
818
+ */class mo{constructor(e){this.fields=e,e.sort(is.comparator)}static empty(){return new mo([])}unionWith(e){let t=new No(is.comparator);for(const e of this.fields)t=t.add(e);for(const n of e)t=t.add(n);return new mo(t.toArray())}covers(e){for(const t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return Xi(this.fields,e.fields,((e,t)=>e.isEqual(t)))}}
819
+ /**
820
+ * @license
821
+ * Copyright 2017 Google LLC
822
+ *
823
+ * Licensed under the Apache License, Version 2.0 (the "License");
824
+ * you may not use this file except in compliance with the License.
825
+ * You may obtain a copy of the License at
826
+ *
827
+ * http://www.apache.org/licenses/LICENSE-2.0
828
+ *
829
+ * Unless required by applicable law or agreed to in writing, software
830
+ * distributed under the License is distributed on an "AS IS" BASIS,
831
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
832
+ * See the License for the specific language governing permissions and
833
+ * limitations under the License.
834
+ */class go{constructor(e){this.value=e}static empty(){return new go({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let t=this.value;for(let n=0;n<e.length-1;++n)if(t=(t.mapValue.fields||{})[e.get(n)],!qs(t))return null;return t=(t.mapValue.fields||{})[e.lastSegment()],t||null}}set(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=js(t)}setAll(e){let t=is.emptyPath(),n={},r=[];e.forEach(((e,i)=>{if(!t.isImmediateParentOf(i)){const e=this.getFieldsMap(t);this.applyChanges(e,n,r),n={},r=[],t=i.popLast()}e?n[i.lastSegment()]=js(e):r.push(i.lastSegment())}));const i=this.getFieldsMap(t);this.applyChanges(i,n,r)}delete(e){const t=this.field(e.popLast());qs(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}isEqual(e){return Ds(this.value,e.value)}getFieldsMap(e){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let n=0;n<e.length;++n){let r=t.mapValue.fields[e.get(n)];qs(r)&&r.mapValue.fields||(r={mapValue:{fields:{}}},t.mapValue.fields[e.get(n)]=r),t=r}return t.mapValue.fields}applyChanges(e,t,n){ms(t,((t,n)=>e[t]=n));for(const t of n)delete e[t]}clone(){return new go(js(this.value))}}
835
+ /**
836
+ * @license
837
+ * Copyright 2017 Google LLC
838
+ *
839
+ * Licensed under the Apache License, Version 2.0 (the "License");
840
+ * you may not use this file except in compliance with the License.
841
+ * You may obtain a copy of the License at
842
+ *
843
+ * http://www.apache.org/licenses/LICENSE-2.0
844
+ *
845
+ * Unless required by applicable law or agreed to in writing, software
846
+ * distributed under the License is distributed on an "AS IS" BASIS,
847
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
848
+ * See the License for the specific language governing permissions and
849
+ * limitations under the License.
850
+ */class $o{constructor(e,t,n,r,i,s,o){this.key=e,this.documentType=t,this.version=n,this.readTime=r,this.createTime=i,this.data=s,this.documentState=o}static newInvalidDocument(e){return new $o(e,0,es.min(),es.min(),es.min(),go.empty(),0)}static newFoundDocument(e,t,n,r){return new $o(e,1,t,es.min(),n,r,0)}static newNoDocument(e,t){return new $o(e,2,t,es.min(),es.min(),go.empty(),0)}static newUnknownDocument(e,t){return new $o(e,3,t,es.min(),es.min(),go.empty(),2)}convertToFoundDocument(e,t){return!this.createTime.isEqual(es.min())||2!==this.documentType&&0!==this.documentType||(this.createTime=e),this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=go.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=go.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=es.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(e){return e instanceof $o&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new $o(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}
851
+ /**
852
+ * @license
853
+ * Copyright 2019 Google LLC
854
+ *
855
+ * Licensed under the Apache License, Version 2.0 (the "License");
856
+ * you may not use this file except in compliance with the License.
857
+ * You may obtain a copy of the License at
858
+ *
859
+ * http://www.apache.org/licenses/LICENSE-2.0
860
+ *
861
+ * Unless required by applicable law or agreed to in writing, software
862
+ * distributed under the License is distributed on an "AS IS" BASIS,
863
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
864
+ * See the License for the specific language governing permissions and
865
+ * limitations under the License.
866
+ */class yo{constructor(e,t=null,n=[],r=[],i=null,s=null,o=null){this.path=e,this.collectionGroup=t,this.orderBy=n,this.filters=r,this.limit=i,this.startAt=s,this.endAt=o,this.ft=null}}function vo(e,t=null,n=[],r=[],i=null,s=null,o=null){return new yo(e,t,n,r,i,s,o)}function wo(e){const t=Pi(e);if(null===t.ft){let e=t.path.canonicalString();null!==t.collectionGroup&&(e+="|cg:"+t.collectionGroup),e+="|f:",e+=t.filters.map((e=>Xs(e))).join(","),e+="|ob:",e+=t.orderBy.map((e=>function(e){return e.field.canonicalString()+e.dir}(e))).join(","),$s(t.limit)||(e+="|l:",e+=t.limit),t.startAt&&(e+="|lb:",e+=t.startAt.inclusive?"b:":"a:",e+=t.startAt.position.map((e=>Os(e))).join(",")),t.endAt&&(e+="|ub:",e+=t.endAt.inclusive?"a:":"b:",e+=t.endAt.position.map((e=>Os(e))).join(",")),t.ft=e}return t.ft}function bo(e,t){if(e.limit!==t.limit)return!1;if(e.orderBy.length!==t.orderBy.length)return!1;for(let n=0;n<e.orderBy.length;n++)if(!uo(e.orderBy[n],t.orderBy[n]))return!1;if(e.filters.length!==t.filters.length)return!1;for(let n=0;n<e.filters.length;n++)if(!Zs(e.filters[n],t.filters[n]))return!1;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!Ks(e.startAt,t.startAt)&&Ks(e.endAt,t.endAt)}function Co(e){return ss.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}
867
+ /**
868
+ * @license
869
+ * Copyright 2017 Google LLC
870
+ *
871
+ * Licensed under the Apache License, Version 2.0 (the "License");
872
+ * you may not use this file except in compliance with the License.
873
+ * You may obtain a copy of the License at
874
+ *
875
+ * http://www.apache.org/licenses/LICENSE-2.0
876
+ *
877
+ * Unless required by applicable law or agreed to in writing, software
878
+ * distributed under the License is distributed on an "AS IS" BASIS,
879
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
880
+ * See the License for the specific language governing permissions and
881
+ * limitations under the License.
882
+ */class Eo{constructor(e,t=null,n=[],r=[],i=null,s="F",o=null,d=null){this.path=e,this.collectionGroup=t,this.explicitOrderBy=n,this.filters=r,this.limit=i,this.limitType=s,this.startAt=o,this.endAt=d,this.dt=null,this._t=null,this.startAt,this.endAt}}function Io(e){return new Eo(e)}function To(e){return 0===e.filters.length&&null===e.limit&&null==e.startAt&&null==e.endAt&&(0===e.explicitOrderBy.length||1===e.explicitOrderBy.length&&e.explicitOrderBy[0].field.isKeyField())}function So(e){return e.explicitOrderBy.length>0?e.explicitOrderBy[0].field:null}function _o(e){for(const t of e.filters){const e=t.getFirstInequalityField();if(null!==e)return e}return null}function ko(e){return null!==e.collectionGroup}function Do(e){const t=Pi(e);if(null===t.dt){t.dt=[];const e=_o(t),n=So(t);if(null!==e&&null===n)e.isKeyField()||t.dt.push(new lo(e)),t.dt.push(new lo(is.keyField(),"asc"));else{let e=!1;for(const n of t.explicitOrderBy)t.dt.push(n),n.field.isKeyField()&&(e=!0);if(!e){const e=t.explicitOrderBy.length>0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";t.dt.push(new lo(is.keyField(),e))}}}return t.dt}function Ro(e){const t=Pi(e);if(!t._t)if("F"===t.limitType)t._t=vo(t.path,t.collectionGroup,Do(t),t.filters,t.limit,t.startAt,t.endAt);else{const e=[];for(const n of Do(t)){const t="desc"===n.dir?"asc":"desc";e.push(new lo(n.field,t))}const n=t.endAt?new Gs(t.endAt.position,t.endAt.inclusive):null,r=t.startAt?new Gs(t.startAt.position,t.startAt.inclusive):null;t._t=vo(t.path,t.collectionGroup,e,t.filters,t.limit,n,r)}return t._t}function Lo(e,t){t.getFirstInequalityField(),_o(e);const n=e.filters.concat([t]);return new Eo(e.path,e.collectionGroup,e.explicitOrderBy.slice(),n,e.limit,e.limitType,e.startAt,e.endAt)}function xo(e,t,n){return new Eo(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function Oo(e,t){return bo(Ro(e),Ro(t))&&e.limitType===t.limitType}function Mo(e){return`${wo(Ro(e))}|lt:${e.limitType}`}function Po(e){return`Query(target=${function(e){let t=e.path.canonicalString();return null!==e.collectionGroup&&(t+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(t+=`, filters: [${e.filters.map((e=>eo(e))).join(", ")}]`),$s(e.limit)||(t+=", limit: "+e.limit),e.orderBy.length>0&&(t+=`, orderBy: [${e.orderBy.map((e=>function(e){return`${e.field.canonicalString()} (${e.dir})`}(e))).join(", ")}]`),e.startAt&&(t+=", startAt: ",t+=e.startAt.inclusive?"b:":"a:",t+=e.startAt.position.map((e=>Os(e))).join(",")),e.endAt&&(t+=", endAt: ",t+=e.endAt.inclusive?"a:":"b:",t+=e.endAt.position.map((e=>Os(e))).join(",")),`Target(${t})`}(Ro(e))}; limitType=${e.limitType})`}function Uo(e,t){return t.isFoundDocument()&&function(e,t){const n=t.key.path;return null!==e.collectionGroup?t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(n):ss.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n)}(e,t)&&function(e,t){for(const n of Do(e))if(!n.field.isKeyField()&&null===t.data.field(n.field))return!1;return!0}(e,t)&&function(e,t){for(const n of e.filters)if(!n.matches(t))return!1;return!0}(e,t)&&function(e,t){return!(e.startAt&&!function(e,t,n){const r=zs(e,t,n);return e.inclusive?r<=0:r<0}(e.startAt,Do(e),t))&&!(e.endAt&&!function(e,t,n){const r=zs(e,t,n);return e.inclusive?r>=0:r>0}(e.endAt,Do(e),t))}(e,t)}function Fo(e){return(t,n)=>{let r=!1;for(const i of Do(e)){const e=Vo(i,t,n);if(0!==e)return e;r=r||i.field.isKeyField()}return 0}}function Vo(e,t,n){const r=e.field.isKeyField()?ss.comparator(t.key,n.key):function(e,t,n){const r=t.data.field(e),i=n.data.field(e);return null!==r&&null!==i?Ls(r,i):Oi()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return Oi()}}
883
+ /**
884
+ * @license
885
+ * Copyright 2020 Google LLC
886
+ *
887
+ * Licensed under the Apache License, Version 2.0 (the "License");
888
+ * you may not use this file except in compliance with the License.
889
+ * You may obtain a copy of the License at
890
+ *
891
+ * http://www.apache.org/licenses/LICENSE-2.0
892
+ *
893
+ * Unless required by applicable law or agreed to in writing, software
894
+ * distributed under the License is distributed on an "AS IS" BASIS,
895
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
896
+ * See the License for the specific language governing permissions and
897
+ * limitations under the License.
898
+ */function Bo(e,t){if(e.wt){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:ys(t)?"-0":t}}function qo(e){return{integerValue:""+e}}function jo(e,t){return function(e){return"number"==typeof e&&Number.isInteger(e)&&!ys(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}(t)?qo(t):Bo(e,t)}
899
+ /**
900
+ * @license
901
+ * Copyright 2018 Google LLC
902
+ *
903
+ * Licensed under the Apache License, Version 2.0 (the "License");
904
+ * you may not use this file except in compliance with the License.
905
+ * You may obtain a copy of the License at
906
+ *
907
+ * http://www.apache.org/licenses/LICENSE-2.0
908
+ *
909
+ * Unless required by applicable law or agreed to in writing, software
910
+ * distributed under the License is distributed on an "AS IS" BASIS,
911
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
912
+ * See the License for the specific language governing permissions and
913
+ * limitations under the License.
914
+ */class Go{constructor(){this._=void 0}}function zo(e,t,n){return e instanceof Ho?function(e,t){const n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&(n.fields.__previous_value__=t),{mapValue:n}}(n,t):e instanceof Wo?Qo(e,t):e instanceof Yo?Jo(e,t):function(e,t){const n=function(e,t){return e instanceof Xo?Us(n=t)||function(e){return!!e&&"doubleValue"in e}(n)?t:{integerValue:0}:null;var n}(e,t),r=Zo(n)+Zo(e.gt);return Us(n)&&Us(e.gt)?qo(r):Bo(e.yt,r)}(e,t)}function Ko(e,t,n){return e instanceof Wo?Qo(e,t):e instanceof Yo?Jo(e,t):n}class Ho extends Go{}class Wo extends Go{constructor(e){super(),this.elements=e}}function Qo(e,t){const n=ed(t);for(const t of e.elements)n.some((e=>Ds(e,t)))||n.push(t);return{arrayValue:{values:n}}}class Yo extends Go{constructor(e){super(),this.elements=e}}function Jo(e,t){let n=ed(t);for(const t of e.elements)n=n.filter((e=>!Ds(e,t)));return{arrayValue:{values:n}}}class Xo extends Go{constructor(e,t){super(),this.yt=e,this.gt=t}}function Zo(e){return Cs(e.integerValue||e.doubleValue)}function ed(e){return Fs(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}class td{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new td}static exists(e){return new td(void 0,e)}static updateTime(e){return new td(e)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function nd(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}class rd{}function id(e,t){if(!e.hasLocalMutations||t&&0===t.fields.length)return null;if(null===t)return e.isNoDocument()?new fd(e.key,td.none()):new ad(e.key,e.data,td.none());{const n=e.data,r=go.empty();let i=new No(is.comparator);for(let e of t.fields)if(!i.has(e)){let t=n.field(e);null===t&&e.length>1&&(e=e.popLast(),t=n.field(e)),null===t?r.delete(e):r.set(e,t),i=i.add(e)}return new cd(e.key,r,new mo(i.toArray()),td.none())}}function sd(e,t,n){e instanceof ad?function(e,t,n){const r=e.value.clone(),i=ud(e.fieldTransforms,t,n.transformResults);r.setAll(i),t.convertToFoundDocument(n.version,r).setHasCommittedMutations()}(e,t,n):e instanceof cd?function(e,t,n){if(!nd(e.precondition,t))return void t.convertToUnknownDocument(n.version);const r=ud(e.fieldTransforms,t,n.transformResults),i=t.data;i.setAll(ld(e)),i.setAll(r),t.convertToFoundDocument(n.version,i).setHasCommittedMutations()}(e,t,n):function(e,t,n){t.convertToNoDocument(n.version).setHasCommittedMutations()}(0,t,n)}function od(e,t,n,r){return e instanceof ad?function(e,t,n,r){if(!nd(e.precondition,t))return n;const i=e.value.clone(),s=hd(e.fieldTransforms,r,t);return i.setAll(s),t.convertToFoundDocument(t.version,i).setHasLocalMutations(),null}(e,t,n,r):e instanceof cd?function(e,t,n,r){if(!nd(e.precondition,t))return n;const i=hd(e.fieldTransforms,r,t),s=t.data;return s.setAll(ld(e)),s.setAll(i),t.convertToFoundDocument(t.version,s).setHasLocalMutations(),null===n?null:n.unionWith(e.fieldMask.fields).unionWith(e.fieldTransforms.map((e=>e.field)))}(e,t,n,r):function(e,t,n){return nd(e.precondition,t)?(t.convertToNoDocument(t.version).setHasLocalMutations(),null):n}(e,t,n)}function dd(e,t){return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&!!function(e,t){return void 0===e&&void 0===t||!(!e||!t)&&Xi(e,t,((e,t)=>function(e,t){return e.field.isEqual(t.field)&&function(e,t){return e instanceof Wo&&t instanceof Wo||e instanceof Yo&&t instanceof Yo?Xi(e.elements,t.elements,Ds):e instanceof Xo&&t instanceof Xo?Ds(e.gt,t.gt):e instanceof Ho&&t instanceof Ho}(e.transform,t.transform)}(e,t)))}(e.fieldTransforms,t.fieldTransforms)&&(0===e.type?e.value.isEqual(t.value):1!==e.type||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}class ad extends rd{constructor(e,t,n,r=[]){super(),this.key=e,this.value=t,this.precondition=n,this.fieldTransforms=r,this.type=0}getFieldMask(){return null}}class cd extends rd{constructor(e,t,n,r,i=[]){super(),this.key=e,this.data=t,this.fieldMask=n,this.precondition=r,this.fieldTransforms=i,this.type=1}getFieldMask(){return this.fieldMask}}function ld(e){const t=new Map;return e.fieldMask.fields.forEach((n=>{if(!n.isEmpty()){const r=e.data.field(n);t.set(n,r)}})),t}function ud(e,t,n){const r=new Map;Mi(e.length===n.length);for(let i=0;i<n.length;i++){const s=e[i],o=s.transform,d=t.data.field(s.field);r.set(s.field,Ko(o,d,n[i]))}return r}function hd(e,t,n){const r=new Map;for(const i of e){const e=i.transform,s=n.data.field(i.field);r.set(i.field,zo(e,s,t))}return r}class fd extends rd{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}
915
+ /**
916
+ * @license
917
+ * Copyright 2017 Google LLC
918
+ *
919
+ * Licensed under the Apache License, Version 2.0 (the "License");
920
+ * you may not use this file except in compliance with the License.
921
+ * You may obtain a copy of the License at
922
+ *
923
+ * http://www.apache.org/licenses/LICENSE-2.0
924
+ *
925
+ * Unless required by applicable law or agreed to in writing, software
926
+ * distributed under the License is distributed on an "AS IS" BASIS,
927
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
928
+ * See the License for the specific language governing permissions and
929
+ * limitations under the License.
930
+ */class Ad{constructor(e){this.count=e}}
931
+ /**
932
+ * @license
933
+ * Copyright 2017 Google LLC
934
+ *
935
+ * Licensed under the Apache License, Version 2.0 (the "License");
936
+ * you may not use this file except in compliance with the License.
937
+ * You may obtain a copy of the License at
938
+ *
939
+ * http://www.apache.org/licenses/LICENSE-2.0
940
+ *
941
+ * Unless required by applicable law or agreed to in writing, software
942
+ * distributed under the License is distributed on an "AS IS" BASIS,
943
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
944
+ * See the License for the specific language governing permissions and
945
+ * limitations under the License.
946
+ */var Nd,pd;function md(e){if(void 0===e)return Ri("GRPC error has no .code"),Ui.UNKNOWN;switch(e){case Nd.OK:return Ui.OK;case Nd.CANCELLED:return Ui.CANCELLED;case Nd.UNKNOWN:return Ui.UNKNOWN;case Nd.DEADLINE_EXCEEDED:return Ui.DEADLINE_EXCEEDED;case Nd.RESOURCE_EXHAUSTED:return Ui.RESOURCE_EXHAUSTED;case Nd.INTERNAL:return Ui.INTERNAL;case Nd.UNAVAILABLE:return Ui.UNAVAILABLE;case Nd.UNAUTHENTICATED:return Ui.UNAUTHENTICATED;case Nd.INVALID_ARGUMENT:return Ui.INVALID_ARGUMENT;case Nd.NOT_FOUND:return Ui.NOT_FOUND;case Nd.ALREADY_EXISTS:return Ui.ALREADY_EXISTS;case Nd.PERMISSION_DENIED:return Ui.PERMISSION_DENIED;case Nd.FAILED_PRECONDITION:return Ui.FAILED_PRECONDITION;case Nd.ABORTED:return Ui.ABORTED;case Nd.OUT_OF_RANGE:return Ui.OUT_OF_RANGE;case Nd.UNIMPLEMENTED:return Ui.UNIMPLEMENTED;case Nd.DATA_LOSS:return Ui.DATA_LOSS;default:return Oi()}}(pd=Nd||(Nd={}))[pd.OK=0]="OK",pd[pd.CANCELLED=1]="CANCELLED",pd[pd.UNKNOWN=2]="UNKNOWN",pd[pd.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",pd[pd.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",pd[pd.NOT_FOUND=5]="NOT_FOUND",pd[pd.ALREADY_EXISTS=6]="ALREADY_EXISTS",pd[pd.PERMISSION_DENIED=7]="PERMISSION_DENIED",pd[pd.UNAUTHENTICATED=16]="UNAUTHENTICATED",pd[pd.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",pd[pd.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",pd[pd.ABORTED=10]="ABORTED",pd[pd.OUT_OF_RANGE=11]="OUT_OF_RANGE",pd[pd.UNIMPLEMENTED=12]="UNIMPLEMENTED",pd[pd.INTERNAL=13]="INTERNAL",pd[pd.UNAVAILABLE=14]="UNAVAILABLE",pd[pd.DATA_LOSS=15]="DATA_LOSS";
947
+ /**
948
+ * @license
949
+ * Copyright 2017 Google LLC
950
+ *
951
+ * Licensed under the Apache License, Version 2.0 (the "License");
952
+ * you may not use this file except in compliance with the License.
953
+ * You may obtain a copy of the License at
954
+ *
955
+ * http://www.apache.org/licenses/LICENSE-2.0
956
+ *
957
+ * Unless required by applicable law or agreed to in writing, software
958
+ * distributed under the License is distributed on an "AS IS" BASIS,
959
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
960
+ * See the License for the specific language governing permissions and
961
+ * limitations under the License.
962
+ */
963
+ class gd{constructor(e,t){this.mapKeyFn=e,this.equalsFn=t,this.inner={},this.innerSize=0}get(e){const t=this.mapKeyFn(e),n=this.inner[t];if(void 0!==n)for(const[t,r]of n)if(this.equalsFn(t,e))return r}has(e){return void 0!==this.get(e)}set(e,t){const n=this.mapKeyFn(e),r=this.inner[n];if(void 0===r)return this.inner[n]=[[e,t]],void this.innerSize++;for(let n=0;n<r.length;n++)if(this.equalsFn(r[n][0],e))return void(r[n]=[e,t]);r.push([e,t]),this.innerSize++}delete(e){const t=this.mapKeyFn(e),n=this.inner[t];if(void 0===n)return!1;for(let r=0;r<n.length;r++)if(this.equalsFn(n[r][0],e))return 1===n.length?delete this.inner[t]:n.splice(r,1),this.innerSize--,!0;return!1}forEach(e){ms(this.inner,((t,n)=>{for(const[t,r]of n)e(t,r)}))}isEmpty(){return gs(this.inner)}size(){return this.innerSize}}
964
+ /**
965
+ * @license
966
+ * Copyright 2017 Google LLC
967
+ *
968
+ * Licensed under the Apache License, Version 2.0 (the "License");
969
+ * you may not use this file except in compliance with the License.
970
+ * You may obtain a copy of the License at
971
+ *
972
+ * http://www.apache.org/licenses/LICENSE-2.0
973
+ *
974
+ * Unless required by applicable law or agreed to in writing, software
975
+ * distributed under the License is distributed on an "AS IS" BASIS,
976
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
977
+ * See the License for the specific language governing permissions and
978
+ * limitations under the License.
979
+ */const $d=new ho(ss.comparator);function yd(){return $d}const vd=new ho(ss.comparator);function wd(...e){let t=vd;for(const n of e)t=t.insert(n.key,n);return t}function bd(e){let t=vd;return e.forEach(((e,n)=>t=t.insert(e,n.overlayedDocument))),t}function Cd(){return Id()}function Ed(){return Id()}function Id(){return new gd((e=>e.toString()),((e,t)=>e.isEqual(t)))}new ho(ss.comparator);const Td=new No(ss.comparator);function Sd(...e){let t=Td;for(const n of e)t=t.add(n);return t}const _d=new No(Ji);function kd(){return _d}
980
+ /**
981
+ * @license
982
+ * Copyright 2017 Google LLC
983
+ *
984
+ * Licensed under the Apache License, Version 2.0 (the "License");
985
+ * you may not use this file except in compliance with the License.
986
+ * You may obtain a copy of the License at
987
+ *
988
+ * http://www.apache.org/licenses/LICENSE-2.0
989
+ *
990
+ * Unless required by applicable law or agreed to in writing, software
991
+ * distributed under the License is distributed on an "AS IS" BASIS,
992
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
993
+ * See the License for the specific language governing permissions and
994
+ * limitations under the License.
995
+ */class Dd{constructor(e,t,n,r,i){this.snapshotVersion=e,this.targetChanges=t,this.targetMismatches=n,this.documentUpdates=r,this.resolvedLimboDocuments=i}static createSynthesizedRemoteEventForCurrentChange(e,t,n){const r=new Map;return r.set(e,Rd.createSynthesizedTargetChangeForCurrentChange(e,t,n)),new Dd(es.min(),r,kd(),yd(),Sd())}}class Rd{constructor(e,t,n,r,i){this.resumeToken=e,this.current=t,this.addedDocuments=n,this.modifiedDocuments=r,this.removedDocuments=i}static createSynthesizedTargetChangeForCurrentChange(e,t,n){return new Rd(n,t,Sd(),Sd(),Sd())}}
996
+ /**
997
+ * @license
998
+ * Copyright 2017 Google LLC
999
+ *
1000
+ * Licensed under the Apache License, Version 2.0 (the "License");
1001
+ * you may not use this file except in compliance with the License.
1002
+ * You may obtain a copy of the License at
1003
+ *
1004
+ * http://www.apache.org/licenses/LICENSE-2.0
1005
+ *
1006
+ * Unless required by applicable law or agreed to in writing, software
1007
+ * distributed under the License is distributed on an "AS IS" BASIS,
1008
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1009
+ * See the License for the specific language governing permissions and
1010
+ * limitations under the License.
1011
+ */class Ld{constructor(e,t,n,r){this.It=e,this.removedTargetIds=t,this.key=n,this.Tt=r}}class xd{constructor(e,t){this.targetId=e,this.Et=t}}class Od{constructor(e,t,n=vs.EMPTY_BYTE_STRING,r=null){this.state=e,this.targetIds=t,this.resumeToken=n,this.cause=r}}class Md{constructor(){this.At=0,this.Rt=Fd(),this.bt=vs.EMPTY_BYTE_STRING,this.Pt=!1,this.vt=!0}get current(){return this.Pt}get resumeToken(){return this.bt}get Vt(){return 0!==this.At}get St(){return this.vt}Dt(e){e.approximateByteSize()>0&&(this.vt=!0,this.bt=e)}Ct(){let e=Sd(),t=Sd(),n=Sd();return this.Rt.forEach(((r,i)=>{switch(i){case 0:e=e.add(r);break;case 2:t=t.add(r);break;case 1:n=n.add(r);break;default:Oi()}})),new Rd(this.bt,this.Pt,e,t,n)}xt(){this.vt=!1,this.Rt=Fd()}Nt(e,t){this.vt=!0,this.Rt=this.Rt.insert(e,t)}kt(e){this.vt=!0,this.Rt=this.Rt.remove(e)}Ot(){this.At+=1}Mt(){this.At-=1}Ft(){this.vt=!0,this.Pt=!0}}class Pd{constructor(e){this.$t=e,this.Bt=new Map,this.Lt=yd(),this.qt=Ud(),this.Ut=new No(Ji)}Kt(e){for(const t of e.It)e.Tt&&e.Tt.isFoundDocument()?this.Gt(t,e.Tt):this.Qt(t,e.key,e.Tt);for(const t of e.removedTargetIds)this.Qt(t,e.key,e.Tt)}jt(e){this.forEachTarget(e,(t=>{const n=this.Wt(t);switch(e.state){case 0:this.zt(t)&&n.Dt(e.resumeToken);break;case 1:n.Mt(),n.Vt||n.xt(),n.Dt(e.resumeToken);break;case 2:n.Mt(),n.Vt||this.removeTarget(t);break;case 3:this.zt(t)&&(n.Ft(),n.Dt(e.resumeToken));break;case 4:this.zt(t)&&(this.Ht(t),n.Dt(e.resumeToken));break;default:Oi()}}))}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.Bt.forEach(((e,n)=>{this.zt(n)&&t(n)}))}Jt(e){const t=e.targetId,n=e.Et.count,r=this.Yt(t);if(r){const e=r.target;if(Co(e))if(0===n){const n=new ss(e.path);this.Qt(t,n,$o.newNoDocument(n,es.min()))}else Mi(1===n);else this.Xt(t)!==n&&(this.Ht(t),this.Ut=this.Ut.add(t))}}Zt(e){const t=new Map;this.Bt.forEach(((n,r)=>{const i=this.Yt(r);if(i){if(n.current&&Co(i.target)){const t=new ss(i.target.path);null!==this.Lt.get(t)||this.te(r,t)||this.Qt(r,t,$o.newNoDocument(t,e))}n.St&&(t.set(r,n.Ct()),n.xt())}}));let n=Sd();this.qt.forEach(((e,t)=>{let r=!0;t.forEachWhile((e=>{const t=this.Yt(e);return!t||2===t.purpose||(r=!1,!1)})),r&&(n=n.add(e))})),this.Lt.forEach(((t,n)=>n.setReadTime(e)));const r=new Dd(e,t,this.Ut,this.Lt,n);return this.Lt=yd(),this.qt=Ud(),this.Ut=new No(Ji),r}Gt(e,t){if(!this.zt(e))return;const n=this.te(e,t.key)?2:0;this.Wt(e).Nt(t.key,n),this.Lt=this.Lt.insert(t.key,t),this.qt=this.qt.insert(t.key,this.ee(t.key).add(e))}Qt(e,t,n){if(!this.zt(e))return;const r=this.Wt(e);this.te(e,t)?r.Nt(t,1):r.kt(t),this.qt=this.qt.insert(t,this.ee(t).delete(e)),n&&(this.Lt=this.Lt.insert(t,n))}removeTarget(e){this.Bt.delete(e)}Xt(e){const t=this.Wt(e).Ct();return this.$t.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}Ot(e){this.Wt(e).Ot()}Wt(e){let t=this.Bt.get(e);return t||(t=new Md,this.Bt.set(e,t)),t}ee(e){let t=this.qt.get(e);return t||(t=new No(Ji),this.qt=this.qt.insert(e,t)),t}zt(e){const t=null!==this.Yt(e);return t||Di("WatchChangeAggregator","Detected inactive target",e),t}Yt(e){const t=this.Bt.get(e);return t&&t.Vt?null:this.$t.ne(e)}Ht(e){this.Bt.set(e,new Md),this.$t.getRemoteKeysForTarget(e).forEach((t=>{this.Qt(e,t,null)}))}te(e,t){return this.$t.getRemoteKeysForTarget(e).has(t)}}function Ud(){return new ho(ss.comparator)}function Fd(){return new ho(ss.comparator)}
1012
+ /**
1013
+ * @license
1014
+ * Copyright 2017 Google LLC
1015
+ *
1016
+ * Licensed under the Apache License, Version 2.0 (the "License");
1017
+ * you may not use this file except in compliance with the License.
1018
+ * You may obtain a copy of the License at
1019
+ *
1020
+ * http://www.apache.org/licenses/LICENSE-2.0
1021
+ *
1022
+ * Unless required by applicable law or agreed to in writing, software
1023
+ * distributed under the License is distributed on an "AS IS" BASIS,
1024
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1025
+ * See the License for the specific language governing permissions and
1026
+ * limitations under the License.
1027
+ */const Vd={asc:"ASCENDING",desc:"DESCENDING"},Bd={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},qd={and:"AND",or:"OR"};class jd{constructor(e,t){this.databaseId=e,this.wt=t}}function Gd(e,t){return e.wt?`${new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+t.nanoseconds).slice(-9)}Z`:{seconds:""+t.seconds,nanos:t.nanoseconds}}function zd(e,t){return e.wt?t.toBase64():t.toUint8Array()}function Kd(e){return Mi(!!e),es.fromTimestamp(function(e){const t=bs(e);return new Zi(t.seconds,t.nanos)}(e))}function Hd(e,t){return function(e){return new ns(["projects",e.projectId,"databases",e.database])}(e).child("documents").child(t).canonicalString()}function Wd(e){const t=ns.fromString(e);return Mi(ca(t)),t}function Qd(e,t){const n=Wd(t);if(n.get(1)!==e.databaseId.projectId)throw new Fi(Ui.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+e.databaseId.projectId);if(n.get(3)!==e.databaseId.database)throw new Fi(Ui.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new ss(Xd(n))}function Yd(e,t){return Hd(e.databaseId,t)}function Jd(e){return new ns(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function Xd(e){return Mi(e.length>4&&"documents"===e.get(4)),e.popFirst(5)}function Zd(e,t){return{documents:[Yd(e,t.path)]}}function ea(e,t){const n={structuredQuery:{}},r=t.path;null!==t.collectionGroup?(n.parent=Yd(e,r),n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(n.parent=Yd(e,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);const i=function(e){if(0!==e.length)return aa(Qs.create(e,"and"))}(t.filters);i&&(n.structuredQuery.where=i);const s=function(e){if(0!==e.length)return e.map((e=>function(e){return{field:oa(e.field),direction:ra(e.dir)}}(e)))}(t.orderBy);s&&(n.structuredQuery.orderBy=s);const o=function(e,t){return e.wt||$s(t)?t:{value:t}}(e,t.limit);var d;return null!==o&&(n.structuredQuery.limit=o),t.startAt&&(n.structuredQuery.startAt={before:(d=t.startAt).inclusive,values:d.position}),t.endAt&&(n.structuredQuery.endAt=function(e){return{before:!e.inclusive,values:e.position}}(t.endAt)),n}function ta(e){let t=function(e){const t=Wd(e);return 4===t.length?ns.emptyPath():Xd(t)}(e.parent);const n=e.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){Mi(1===r);const e=n.from[0];e.allDescendants?i=e.collectionId:t=t.child(e.collectionId)}let s=[];n.where&&(s=function(e){const t=na(e);return t instanceof Qs&&Js(t)?t.getFilters():[t]}(n.where));let o=[];n.orderBy&&(o=n.orderBy.map((e=>function(e){return new lo(da(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))}(e))));let d=null;n.limit&&(d=function(e){let t;return t="object"==typeof e?e.value:e,$s(t)?null:t}(n.limit));let a=null;n.startAt&&(a=function(e){const t=!!e.before,n=e.values||[];return new Gs(n,t)}(n.startAt));let c=null;return n.endAt&&(c=function(e){const t=!e.before,n=e.values||[];return new Gs(n,t)}(n.endAt)),function(e,t,n,r,i,s,o,d){return new Eo(e,t,n,r,i,s,o,d)}(t,i,o,s,d,"F",a,c)}function na(e){return void 0!==e.unaryFilter?function(e){switch(e.unaryFilter.op){case"IS_NAN":const t=da(e.unaryFilter.field);return Ws.create(t,"==",{doubleValue:NaN});case"IS_NULL":const n=da(e.unaryFilter.field);return Ws.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const r=da(e.unaryFilter.field);return Ws.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const i=da(e.unaryFilter.field);return Ws.create(i,"!=",{nullValue:"NULL_VALUE"});default:return Oi()}}(e):void 0!==e.fieldFilter?function(e){return Ws.create(da(e.fieldFilter.field),function(e){switch(e){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return Oi()}}(e.fieldFilter.op),e.fieldFilter.value)}(e):void 0!==e.compositeFilter?function(e){return Qs.create(e.compositeFilter.filters.map((e=>na(e))),function(e){switch(e){case"AND":return"and";case"OR":return"or";default:return Oi()}}(e.compositeFilter.op))}(e):Oi()}function ra(e){return Vd[e]}function ia(e){return Bd[e]}function sa(e){return qd[e]}function oa(e){return{fieldPath:e.canonicalString()}}function da(e){return is.fromServerFormat(e.fieldPath)}function aa(e){return e instanceof Ws?function(e){if("=="===e.op){if(Bs(e.value))return{unaryFilter:{field:oa(e.field),op:"IS_NAN"}};if(Vs(e.value))return{unaryFilter:{field:oa(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(Bs(e.value))return{unaryFilter:{field:oa(e.field),op:"IS_NOT_NAN"}};if(Vs(e.value))return{unaryFilter:{field:oa(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:oa(e.field),op:ia(e.op),value:e.value}}}(e):e instanceof Qs?function(e){const t=e.getFilters().map((e=>aa(e)));return 1===t.length?t[0]:{compositeFilter:{op:sa(e.op),filters:t}}}(e):Oi()}function ca(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}
1028
+ /**
1029
+ * @license
1030
+ * Copyright 2017 Google LLC
1031
+ *
1032
+ * Licensed under the Apache License, Version 2.0 (the "License");
1033
+ * you may not use this file except in compliance with the License.
1034
+ * You may obtain a copy of the License at
1035
+ *
1036
+ * http://www.apache.org/licenses/LICENSE-2.0
1037
+ *
1038
+ * Unless required by applicable law or agreed to in writing, software
1039
+ * distributed under the License is distributed on an "AS IS" BASIS,
1040
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1041
+ * See the License for the specific language governing permissions and
1042
+ * limitations under the License.
1043
+ */class la{constructor(e,t,n,r){this.batchId=e,this.localWriteTime=t,this.baseMutations=n,this.mutations=r}applyToRemoteDocument(e,t){const n=t.mutationResults;for(let t=0;t<this.mutations.length;t++){const r=this.mutations[t];r.key.isEqual(e.key)&&sd(r,e,n[t])}}applyToLocalView(e,t){for(const n of this.baseMutations)n.key.isEqual(e.key)&&(t=od(n,e,t,this.localWriteTime));for(const n of this.mutations)n.key.isEqual(e.key)&&(t=od(n,e,t,this.localWriteTime));return t}applyToLocalDocumentSet(e,t){const n=Ed();return this.mutations.forEach((r=>{const i=e.get(r.key),s=i.overlayedDocument;let o=this.applyToLocalView(s,i.mutatedFields);o=t.has(r.key)?null:o;const d=id(s,o);null!==d&&n.set(r.key,d),s.isValidDocument()||s.convertToNoDocument(es.min())})),n}keys(){return this.mutations.reduce(((e,t)=>e.add(t.key)),Sd())}isEqual(e){return this.batchId===e.batchId&&Xi(this.mutations,e.mutations,((e,t)=>dd(e,t)))&&Xi(this.baseMutations,e.baseMutations,((e,t)=>dd(e,t)))}}
1044
+ /**
1045
+ * @license
1046
+ * Copyright 2022 Google LLC
1047
+ *
1048
+ * Licensed under the Apache License, Version 2.0 (the "License");
1049
+ * you may not use this file except in compliance with the License.
1050
+ * You may obtain a copy of the License at
1051
+ *
1052
+ * http://www.apache.org/licenses/LICENSE-2.0
1053
+ *
1054
+ * Unless required by applicable law or agreed to in writing, software
1055
+ * distributed under the License is distributed on an "AS IS" BASIS,
1056
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1057
+ * See the License for the specific language governing permissions and
1058
+ * limitations under the License.
1059
+ */class ua{constructor(e,t){this.largestBatchId=e,this.mutation=t}getKey(){return this.mutation.key}isEqual(e){return null!==e&&this.mutation===e.mutation}toString(){return`Overlay{\n largestBatchId: ${this.largestBatchId},\n mutation: ${this.mutation.toString()}\n }`}}
1060
+ /**
1061
+ * @license
1062
+ * Copyright 2017 Google LLC
1063
+ *
1064
+ * Licensed under the Apache License, Version 2.0 (the "License");
1065
+ * you may not use this file except in compliance with the License.
1066
+ * You may obtain a copy of the License at
1067
+ *
1068
+ * http://www.apache.org/licenses/LICENSE-2.0
1069
+ *
1070
+ * Unless required by applicable law or agreed to in writing, software
1071
+ * distributed under the License is distributed on an "AS IS" BASIS,
1072
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1073
+ * See the License for the specific language governing permissions and
1074
+ * limitations under the License.
1075
+ */class ha{constructor(e,t,n,r,i=es.min(),s=es.min(),o=vs.EMPTY_BYTE_STRING){this.target=e,this.targetId=t,this.purpose=n,this.sequenceNumber=r,this.snapshotVersion=i,this.lastLimboFreeSnapshotVersion=s,this.resumeToken=o}withSequenceNumber(e){return new ha(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken)}withResumeToken(e,t){return new ha(this.target,this.targetId,this.purpose,this.sequenceNumber,t,this.lastLimboFreeSnapshotVersion,e)}withLastLimboFreeSnapshotVersion(e){return new ha(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken)}}
1076
+ /**
1077
+ * @license
1078
+ * Copyright 2017 Google LLC
1079
+ *
1080
+ * Licensed under the Apache License, Version 2.0 (the "License");
1081
+ * you may not use this file except in compliance with the License.
1082
+ * You may obtain a copy of the License at
1083
+ *
1084
+ * http://www.apache.org/licenses/LICENSE-2.0
1085
+ *
1086
+ * Unless required by applicable law or agreed to in writing, software
1087
+ * distributed under the License is distributed on an "AS IS" BASIS,
1088
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1089
+ * See the License for the specific language governing permissions and
1090
+ * limitations under the License.
1091
+ */class fa{constructor(e){this.ie=e}}function Aa(e){const t=ta({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?xo(t,t.limit,"L"):t}
1092
+ /**
1093
+ * @license
1094
+ * Copyright 2019 Google LLC
1095
+ *
1096
+ * Licensed under the Apache License, Version 2.0 (the "License");
1097
+ * you may not use this file except in compliance with the License.
1098
+ * You may obtain a copy of the License at
1099
+ *
1100
+ * http://www.apache.org/licenses/LICENSE-2.0
1101
+ *
1102
+ * Unless required by applicable law or agreed to in writing, software
1103
+ * distributed under the License is distributed on an "AS IS" BASIS,
1104
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1105
+ * See the License for the specific language governing permissions and
1106
+ * limitations under the License.
1107
+ */class Na{constructor(){this.Je=new pa}addToCollectionParentIndex(e,t){return this.Je.add(t),us.resolve()}getCollectionParents(e,t){return us.resolve(this.Je.getEntries(t))}addFieldIndex(e,t){return us.resolve()}deleteFieldIndex(e,t){return us.resolve()}getDocumentsMatchingTarget(e,t){return us.resolve(null)}getIndexType(e,t){return us.resolve(0)}getFieldIndexes(e,t){return us.resolve([])}getNextCollectionGroupToUpdate(e){return us.resolve(null)}getMinOffset(e,t){return us.resolve(ds.min())}getMinOffsetFromCollectionGroup(e,t){return us.resolve(ds.min())}updateCollectionGroup(e,t,n){return us.resolve()}updateIndexEntries(e,t){return us.resolve()}}class pa{constructor(){this.index={}}add(e){const t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new No(ns.comparator),i=!r.has(n);return this.index[t]=r.add(n),i}has(e){const t=e.lastSegment(),n=e.popLast(),r=this.index[t];return r&&r.has(n)}getEntries(e){return(this.index[e]||new No(ns.comparator)).toArray()}}
1108
+ /**
1109
+ * @license
1110
+ * Copyright 2017 Google LLC
1111
+ *
1112
+ * Licensed under the Apache License, Version 2.0 (the "License");
1113
+ * you may not use this file except in compliance with the License.
1114
+ * You may obtain a copy of the License at
1115
+ *
1116
+ * http://www.apache.org/licenses/LICENSE-2.0
1117
+ *
1118
+ * Unless required by applicable law or agreed to in writing, software
1119
+ * distributed under the License is distributed on an "AS IS" BASIS,
1120
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1121
+ * See the License for the specific language governing permissions and
1122
+ * limitations under the License.
1123
+ */class ma{constructor(e){this.bn=e}next(){return this.bn+=2,this.bn}static Pn(){return new ma(0)}static vn(){return new ma(-1)}}
1124
+ /**
1125
+ * @license
1126
+ * Copyright 2017 Google LLC
1127
+ *
1128
+ * Licensed under the Apache License, Version 2.0 (the "License");
1129
+ * you may not use this file except in compliance with the License.
1130
+ * You may obtain a copy of the License at
1131
+ *
1132
+ * http://www.apache.org/licenses/LICENSE-2.0
1133
+ *
1134
+ * Unless required by applicable law or agreed to in writing, software
1135
+ * distributed under the License is distributed on an "AS IS" BASIS,
1136
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1137
+ * See the License for the specific language governing permissions and
1138
+ * limitations under the License.
1139
+ */class ga{constructor(){this.changes=new gd((e=>e.toString()),((e,t)=>e.isEqual(t))),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,t){this.assertNotApplied(),this.changes.set(e,$o.newInvalidDocument(e).setReadTime(t))}getEntry(e,t){this.assertNotApplied();const n=this.changes.get(t);return void 0!==n?us.resolve(n):this.getFromCache(e,t)}getEntries(e,t){return this.getAllFromCache(e,t)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}
1140
+ /**
1141
+ * @license
1142
+ * Copyright 2017 Google LLC
1143
+ *
1144
+ * Licensed under the Apache License, Version 2.0 (the "License");
1145
+ * you may not use this file except in compliance with the License.
1146
+ * You may obtain a copy of the License at
1147
+ *
1148
+ * http://www.apache.org/licenses/LICENSE-2.0
1149
+ *
1150
+ * Unless required by applicable law or agreed to in writing, software
1151
+ * distributed under the License is distributed on an "AS IS" BASIS,
1152
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1153
+ * See the License for the specific language governing permissions and
1154
+ * limitations under the License.
1155
+ */
1156
+ /**
1157
+ * @license
1158
+ * Copyright 2022 Google LLC
1159
+ *
1160
+ * Licensed under the Apache License, Version 2.0 (the "License");
1161
+ * you may not use this file except in compliance with the License.
1162
+ * You may obtain a copy of the License at
1163
+ *
1164
+ * http://www.apache.org/licenses/LICENSE-2.0
1165
+ *
1166
+ * Unless required by applicable law or agreed to in writing, software
1167
+ * distributed under the License is distributed on an "AS IS" BASIS,
1168
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1169
+ * See the License for the specific language governing permissions and
1170
+ * limitations under the License.
1171
+ */class $a{constructor(e,t){this.overlayedDocument=e,this.mutatedFields=t}}
1172
+ /**
1173
+ * @license
1174
+ * Copyright 2017 Google LLC
1175
+ *
1176
+ * Licensed under the Apache License, Version 2.0 (the "License");
1177
+ * you may not use this file except in compliance with the License.
1178
+ * You may obtain a copy of the License at
1179
+ *
1180
+ * http://www.apache.org/licenses/LICENSE-2.0
1181
+ *
1182
+ * Unless required by applicable law or agreed to in writing, software
1183
+ * distributed under the License is distributed on an "AS IS" BASIS,
1184
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1185
+ * See the License for the specific language governing permissions and
1186
+ * limitations under the License.
1187
+ */class ya{constructor(e,t,n,r){this.remoteDocumentCache=e,this.mutationQueue=t,this.documentOverlayCache=n,this.indexManager=r}getDocument(e,t){let n=null;return this.documentOverlayCache.getOverlay(e,t).next((r=>(n=r,this.remoteDocumentCache.getEntry(e,t)))).next((e=>(null!==n&&od(n.mutation,e,mo.empty(),Zi.now()),e)))}getDocuments(e,t){return this.remoteDocumentCache.getEntries(e,t).next((t=>this.getLocalViewOfDocuments(e,t,Sd()).next((()=>t))))}getLocalViewOfDocuments(e,t,n=Sd()){const r=Cd();return this.populateOverlays(e,r,t).next((()=>this.computeViews(e,t,r,n).next((e=>{let t=wd();return e.forEach(((e,n)=>{t=t.insert(e,n.overlayedDocument)})),t}))))}getOverlayedDocuments(e,t){const n=Cd();return this.populateOverlays(e,n,t).next((()=>this.computeViews(e,t,n,Sd())))}populateOverlays(e,t,n){const r=[];return n.forEach((e=>{t.has(e)||r.push(e)})),this.documentOverlayCache.getOverlays(e,r).next((e=>{e.forEach(((e,n)=>{t.set(e,n)}))}))}computeViews(e,t,n,r){let i=yd();const s=Id(),o=Id();return t.forEach(((e,t)=>{const o=n.get(t.key);r.has(t.key)&&(void 0===o||o.mutation instanceof cd)?i=i.insert(t.key,t):void 0!==o&&(s.set(t.key,o.mutation.getFieldMask()),od(o.mutation,t,o.mutation.getFieldMask(),Zi.now()))})),this.recalculateAndSaveOverlays(e,i).next((e=>(e.forEach(((e,t)=>s.set(e,t))),t.forEach(((e,t)=>{var n;return o.set(e,new $a(t,null!==(n=s.get(e))&&void 0!==n?n:null))})),o)))}recalculateAndSaveOverlays(e,t){const n=Id();let r=new ho(((e,t)=>e-t)),i=Sd();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next((e=>{for(const i of e)i.keys().forEach((e=>{const s=t.get(e);if(null===s)return;let o=n.get(e)||mo.empty();o=i.applyToLocalView(s,o),n.set(e,o);const d=(r.get(i.batchId)||Sd()).add(e);r=r.insert(i.batchId,d)}))})).next((()=>{const s=[],o=r.getReverseIterator();for(;o.hasNext();){const r=o.getNext(),d=r.key,a=r.value,c=Ed();a.forEach((e=>{if(!i.has(e)){const r=id(t.get(e),n.get(e));null!==r&&c.set(e,r),i=i.add(e)}})),s.push(this.documentOverlayCache.saveOverlays(e,d,c))}return us.waitFor(s)})).next((()=>n))}recalculateAndSaveOverlaysForDocumentKeys(e,t){return this.remoteDocumentCache.getEntries(e,t).next((t=>this.recalculateAndSaveOverlays(e,t)))}getDocumentsMatchingQuery(e,t,n){return function(e){return ss.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}(t)?this.getDocumentsMatchingDocumentQuery(e,t.path):ko(t)?this.getDocumentsMatchingCollectionGroupQuery(e,t,n):this.getDocumentsMatchingCollectionQuery(e,t,n)}getNextDocuments(e,t,n,r){return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,n,r).next((i=>{const s=r-i.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,t,n.largestBatchId,r-i.size):us.resolve(Cd());let o=-1,d=i;return s.next((t=>us.forEach(t,((t,n)=>(o<n.largestBatchId&&(o=n.largestBatchId),i.get(t)?us.resolve():this.remoteDocumentCache.getEntry(e,t).next((e=>{d=d.insert(t,e)}))))).next((()=>this.populateOverlays(e,t,i))).next((()=>this.computeViews(e,d,t,Sd()))).next((e=>({batchId:o,changes:bd(e)})))))}))}getDocumentsMatchingDocumentQuery(e,t){return this.getDocument(e,new ss(t)).next((e=>{let t=wd();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t}))}getDocumentsMatchingCollectionGroupQuery(e,t,n){const r=t.collectionGroup;let i=wd();return this.indexManager.getCollectionParents(e,r).next((s=>us.forEach(s,(s=>{const o=function(e,t){return new Eo(t,null,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(t,s.child(r));return this.getDocumentsMatchingCollectionQuery(e,o,n).next((e=>{e.forEach(((e,t)=>{i=i.insert(e,t)}))}))})).next((()=>i))))}getDocumentsMatchingCollectionQuery(e,t,n){let r;return this.remoteDocumentCache.getAllFromCollection(e,t.path,n).next((i=>(r=i,this.documentOverlayCache.getOverlaysForCollection(e,t.path,n.largestBatchId)))).next((e=>{e.forEach(((e,t)=>{const n=t.getKey();null===r.get(n)&&(r=r.insert(n,$o.newInvalidDocument(n)))}));let n=wd();return r.forEach(((r,i)=>{const s=e.get(r);void 0!==s&&od(s.mutation,i,mo.empty(),Zi.now()),Uo(t,i)&&(n=n.insert(r,i))})),n}))}}
1188
+ /**
1189
+ * @license
1190
+ * Copyright 2020 Google LLC
1191
+ *
1192
+ * Licensed under the Apache License, Version 2.0 (the "License");
1193
+ * you may not use this file except in compliance with the License.
1194
+ * You may obtain a copy of the License at
1195
+ *
1196
+ * http://www.apache.org/licenses/LICENSE-2.0
1197
+ *
1198
+ * Unless required by applicable law or agreed to in writing, software
1199
+ * distributed under the License is distributed on an "AS IS" BASIS,
1200
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1201
+ * See the License for the specific language governing permissions and
1202
+ * limitations under the License.
1203
+ */class va{constructor(e){this.yt=e,this.Zn=new Map,this.ts=new Map}getBundleMetadata(e,t){return us.resolve(this.Zn.get(t))}saveBundleMetadata(e,t){var n;return this.Zn.set(t.id,{id:(n=t).id,version:n.version,createTime:Kd(n.createTime)}),us.resolve()}getNamedQuery(e,t){return us.resolve(this.ts.get(t))}saveNamedQuery(e,t){return this.ts.set(t.name,function(e){return{name:e.name,query:Aa(e.bundledQuery),readTime:Kd(e.readTime)}}(t)),us.resolve()}}
1204
+ /**
1205
+ * @license
1206
+ * Copyright 2022 Google LLC
1207
+ *
1208
+ * Licensed under the Apache License, Version 2.0 (the "License");
1209
+ * you may not use this file except in compliance with the License.
1210
+ * You may obtain a copy of the License at
1211
+ *
1212
+ * http://www.apache.org/licenses/LICENSE-2.0
1213
+ *
1214
+ * Unless required by applicable law or agreed to in writing, software
1215
+ * distributed under the License is distributed on an "AS IS" BASIS,
1216
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1217
+ * See the License for the specific language governing permissions and
1218
+ * limitations under the License.
1219
+ */class wa{constructor(){this.overlays=new ho(ss.comparator),this.es=new Map}getOverlay(e,t){return us.resolve(this.overlays.get(t))}getOverlays(e,t){const n=Cd();return us.forEach(t,(t=>this.getOverlay(e,t).next((e=>{null!==e&&n.set(t,e)})))).next((()=>n))}saveOverlays(e,t,n){return n.forEach(((n,r)=>{this.oe(e,t,r)})),us.resolve()}removeOverlaysForBatchId(e,t,n){const r=this.es.get(n);return void 0!==r&&(r.forEach((e=>this.overlays=this.overlays.remove(e))),this.es.delete(n)),us.resolve()}getOverlaysForCollection(e,t,n){const r=Cd(),i=t.length+1,s=new ss(t.child("")),o=this.overlays.getIteratorFrom(s);for(;o.hasNext();){const e=o.getNext().value,s=e.getKey();if(!t.isPrefixOf(s.path))break;s.path.length===i&&e.largestBatchId>n&&r.set(e.getKey(),e)}return us.resolve(r)}getOverlaysForCollectionGroup(e,t,n,r){let i=new ho(((e,t)=>e-t));const s=this.overlays.getIterator();for(;s.hasNext();){const e=s.getNext().value;if(e.getKey().getCollectionGroup()===t&&e.largestBatchId>n){let t=i.get(e.largestBatchId);null===t&&(t=Cd(),i=i.insert(e.largestBatchId,t)),t.set(e.getKey(),e)}}const o=Cd(),d=i.getIterator();for(;d.hasNext()&&(d.getNext().value.forEach(((e,t)=>o.set(e,t))),!(o.size()>=r)););return us.resolve(o)}oe(e,t,n){const r=this.overlays.get(n.key);if(null!==r){const e=this.es.get(r.largestBatchId).delete(n.key);this.es.set(r.largestBatchId,e)}this.overlays=this.overlays.insert(n.key,new ua(t,n));let i=this.es.get(t);void 0===i&&(i=Sd(),this.es.set(t,i)),this.es.set(t,i.add(n.key))}}
1220
+ /**
1221
+ * @license
1222
+ * Copyright 2017 Google LLC
1223
+ *
1224
+ * Licensed under the Apache License, Version 2.0 (the "License");
1225
+ * you may not use this file except in compliance with the License.
1226
+ * You may obtain a copy of the License at
1227
+ *
1228
+ * http://www.apache.org/licenses/LICENSE-2.0
1229
+ *
1230
+ * Unless required by applicable law or agreed to in writing, software
1231
+ * distributed under the License is distributed on an "AS IS" BASIS,
1232
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1233
+ * See the License for the specific language governing permissions and
1234
+ * limitations under the License.
1235
+ */class ba{constructor(){this.ns=new No(Ca.ss),this.rs=new No(Ca.os)}isEmpty(){return this.ns.isEmpty()}addReference(e,t){const n=new Ca(e,t);this.ns=this.ns.add(n),this.rs=this.rs.add(n)}us(e,t){e.forEach((e=>this.addReference(e,t)))}removeReference(e,t){this.cs(new Ca(e,t))}hs(e,t){e.forEach((e=>this.removeReference(e,t)))}ls(e){const t=new ss(new ns([])),n=new Ca(t,e),r=new Ca(t,e+1),i=[];return this.rs.forEachInRange([n,r],(e=>{this.cs(e),i.push(e.key)})),i}fs(){this.ns.forEach((e=>this.cs(e)))}cs(e){this.ns=this.ns.delete(e),this.rs=this.rs.delete(e)}ds(e){const t=new ss(new ns([])),n=new Ca(t,e),r=new Ca(t,e+1);let i=Sd();return this.rs.forEachInRange([n,r],(e=>{i=i.add(e.key)})),i}containsKey(e){const t=new Ca(e,0),n=this.ns.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)}}class Ca{constructor(e,t){this.key=e,this._s=t}static ss(e,t){return ss.comparator(e.key,t.key)||Ji(e._s,t._s)}static os(e,t){return Ji(e._s,t._s)||ss.comparator(e.key,t.key)}}
1236
+ /**
1237
+ * @license
1238
+ * Copyright 2017 Google LLC
1239
+ *
1240
+ * Licensed under the Apache License, Version 2.0 (the "License");
1241
+ * you may not use this file except in compliance with the License.
1242
+ * You may obtain a copy of the License at
1243
+ *
1244
+ * http://www.apache.org/licenses/LICENSE-2.0
1245
+ *
1246
+ * Unless required by applicable law or agreed to in writing, software
1247
+ * distributed under the License is distributed on an "AS IS" BASIS,
1248
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1249
+ * See the License for the specific language governing permissions and
1250
+ * limitations under the License.
1251
+ */class Ea{constructor(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutationQueue=[],this.ws=1,this.gs=new No(Ca.ss)}checkEmpty(e){return us.resolve(0===this.mutationQueue.length)}addMutationBatch(e,t,n,r){const i=this.ws;this.ws++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const s=new la(i,t,n,r);this.mutationQueue.push(s);for(const t of r)this.gs=this.gs.add(new Ca(t.key,i)),this.indexManager.addToCollectionParentIndex(e,t.key.path.popLast());return us.resolve(s)}lookupMutationBatch(e,t){return us.resolve(this.ys(t))}getNextMutationBatchAfterBatchId(e,t){const n=t+1,r=this.ps(n),i=r<0?0:r;return us.resolve(this.mutationQueue.length>i?this.mutationQueue[i]:null)}getHighestUnacknowledgedBatchId(){return us.resolve(0===this.mutationQueue.length?-1:this.ws-1)}getAllMutationBatches(e){return us.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){const n=new Ca(t,0),r=new Ca(t,Number.POSITIVE_INFINITY),i=[];return this.gs.forEachInRange([n,r],(e=>{const t=this.ys(e._s);i.push(t)})),us.resolve(i)}getAllMutationBatchesAffectingDocumentKeys(e,t){let n=new No(Ji);return t.forEach((e=>{const t=new Ca(e,0),r=new Ca(e,Number.POSITIVE_INFINITY);this.gs.forEachInRange([t,r],(e=>{n=n.add(e._s)}))})),us.resolve(this.Is(n))}getAllMutationBatchesAffectingQuery(e,t){const n=t.path,r=n.length+1;let i=n;ss.isDocumentKey(i)||(i=i.child(""));const s=new Ca(new ss(i),0);let o=new No(Ji);return this.gs.forEachWhile((e=>{const t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(o=o.add(e._s)),!0)}),s),us.resolve(this.Is(o))}Is(e){const t=[];return e.forEach((e=>{const n=this.ys(e);null!==n&&t.push(n)})),t}removeMutationBatch(e,t){Mi(0===this.Ts(t.batchId,"removed")),this.mutationQueue.shift();let n=this.gs;return us.forEach(t.mutations,(r=>{const i=new Ca(r.key,t.batchId);return n=n.delete(i),this.referenceDelegate.markPotentiallyOrphaned(e,r.key)})).next((()=>{this.gs=n}))}An(e){}containsKey(e,t){const n=new Ca(t,0),r=this.gs.firstAfterOrEqual(n);return us.resolve(t.isEqual(r&&r.key))}performConsistencyCheck(e){return this.mutationQueue.length,us.resolve()}Ts(e,t){return this.ps(e)}ps(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}ys(e){const t=this.ps(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}
1252
+ /**
1253
+ * @license
1254
+ * Copyright 2017 Google LLC
1255
+ *
1256
+ * Licensed under the Apache License, Version 2.0 (the "License");
1257
+ * you may not use this file except in compliance with the License.
1258
+ * You may obtain a copy of the License at
1259
+ *
1260
+ * http://www.apache.org/licenses/LICENSE-2.0
1261
+ *
1262
+ * Unless required by applicable law or agreed to in writing, software
1263
+ * distributed under the License is distributed on an "AS IS" BASIS,
1264
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1265
+ * See the License for the specific language governing permissions and
1266
+ * limitations under the License.
1267
+ */class Ia{constructor(e){this.Es=e,this.docs=new ho(ss.comparator),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,t){const n=t.key,r=this.docs.get(n),i=r?r.size:0,s=this.Es(t);return this.docs=this.docs.insert(n,{document:t.mutableCopy(),size:s}),this.size+=s-i,this.indexManager.addToCollectionParentIndex(e,n.path.popLast())}removeEntry(e){const t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}getEntry(e,t){const n=this.docs.get(t);return us.resolve(n?n.document.mutableCopy():$o.newInvalidDocument(t))}getEntries(e,t){let n=yd();return t.forEach((e=>{const t=this.docs.get(e);n=n.insert(e,t?t.document.mutableCopy():$o.newInvalidDocument(e))})),us.resolve(n)}getAllFromCollection(e,t,n){let r=yd();const i=new ss(t.child("")),s=this.docs.getIteratorFrom(i);for(;s.hasNext();){const{key:e,value:{document:i}}=s.getNext();if(!t.isPrefixOf(e.path))break;e.path.length>t.length+1||as(os(i),n)<=0||(r=r.insert(i.key,i.mutableCopy()))}return us.resolve(r)}getAllFromCollectionGroup(e,t,n,r){Oi()}As(e,t){return us.forEach(this.docs,(e=>t(e)))}newChangeBuffer(e){return new Ta(this)}getSize(e){return us.resolve(this.size)}}class Ta extends ga{constructor(e){super(),this.Yn=e}applyChanges(e){const t=[];return this.changes.forEach(((n,r)=>{r.isValidDocument()?t.push(this.Yn.addEntry(e,r)):this.Yn.removeEntry(n)})),us.waitFor(t)}getFromCache(e,t){return this.Yn.getEntry(e,t)}getAllFromCache(e,t){return this.Yn.getEntries(e,t)}}
1268
+ /**
1269
+ * @license
1270
+ * Copyright 2017 Google LLC
1271
+ *
1272
+ * Licensed under the Apache License, Version 2.0 (the "License");
1273
+ * you may not use this file except in compliance with the License.
1274
+ * You may obtain a copy of the License at
1275
+ *
1276
+ * http://www.apache.org/licenses/LICENSE-2.0
1277
+ *
1278
+ * Unless required by applicable law or agreed to in writing, software
1279
+ * distributed under the License is distributed on an "AS IS" BASIS,
1280
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1281
+ * See the License for the specific language governing permissions and
1282
+ * limitations under the License.
1283
+ */class Sa{constructor(e){this.persistence=e,this.Rs=new gd((e=>wo(e)),bo),this.lastRemoteSnapshotVersion=es.min(),this.highestTargetId=0,this.bs=0,this.Ps=new ba,this.targetCount=0,this.vs=ma.Pn()}forEachTarget(e,t){return this.Rs.forEach(((e,n)=>t(n))),us.resolve()}getLastRemoteSnapshotVersion(e){return us.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return us.resolve(this.bs)}allocateTargetId(e){return this.highestTargetId=this.vs.next(),us.resolve(this.highestTargetId)}setTargetsMetadata(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.bs&&(this.bs=t),us.resolve()}Dn(e){this.Rs.set(e.target,e);const t=e.targetId;t>this.highestTargetId&&(this.vs=new ma(t),this.highestTargetId=t),e.sequenceNumber>this.bs&&(this.bs=e.sequenceNumber)}addTargetData(e,t){return this.Dn(t),this.targetCount+=1,us.resolve()}updateTargetData(e,t){return this.Dn(t),us.resolve()}removeTargetData(e,t){return this.Rs.delete(t.target),this.Ps.ls(t.targetId),this.targetCount-=1,us.resolve()}removeTargets(e,t,n){let r=0;const i=[];return this.Rs.forEach(((s,o)=>{o.sequenceNumber<=t&&null===n.get(o.targetId)&&(this.Rs.delete(s),i.push(this.removeMatchingKeysForTargetId(e,o.targetId)),r++)})),us.waitFor(i).next((()=>r))}getTargetCount(e){return us.resolve(this.targetCount)}getTargetData(e,t){const n=this.Rs.get(t)||null;return us.resolve(n)}addMatchingKeys(e,t,n){return this.Ps.us(t,n),us.resolve()}removeMatchingKeys(e,t,n){this.Ps.hs(t,n);const r=this.persistence.referenceDelegate,i=[];return r&&t.forEach((t=>{i.push(r.markPotentiallyOrphaned(e,t))})),us.waitFor(i)}removeMatchingKeysForTargetId(e,t){return this.Ps.ls(t),us.resolve()}getMatchingKeysForTargetId(e,t){const n=this.Ps.ds(t);return us.resolve(n)}containsKey(e,t){return us.resolve(this.Ps.containsKey(t))}}
1284
+ /**
1285
+ * @license
1286
+ * Copyright 2017 Google LLC
1287
+ *
1288
+ * Licensed under the Apache License, Version 2.0 (the "License");
1289
+ * you may not use this file except in compliance with the License.
1290
+ * You may obtain a copy of the License at
1291
+ *
1292
+ * http://www.apache.org/licenses/LICENSE-2.0
1293
+ *
1294
+ * Unless required by applicable law or agreed to in writing, software
1295
+ * distributed under the License is distributed on an "AS IS" BASIS,
1296
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1297
+ * See the License for the specific language governing permissions and
1298
+ * limitations under the License.
1299
+ */class _a{constructor(e,t){this.Vs={},this.overlays={},this.Ss=new fs(0),this.Ds=!1,this.Ds=!0,this.referenceDelegate=e(this),this.Cs=new Sa(this),this.indexManager=new Na,this.remoteDocumentCache=function(e){return new Ia(e)}((e=>this.referenceDelegate.xs(e))),this.yt=new fa(t),this.Ns=new va(this.yt)}start(){return Promise.resolve()}shutdown(){return this.Ds=!1,Promise.resolve()}get started(){return this.Ds}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let t=this.overlays[e.toKey()];return t||(t=new wa,this.overlays[e.toKey()]=t),t}getMutationQueue(e,t){let n=this.Vs[e.toKey()];return n||(n=new Ea(t,this.referenceDelegate),this.Vs[e.toKey()]=n),n}getTargetCache(){return this.Cs}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Ns}runTransaction(e,t,n){Di("MemoryPersistence","Starting transaction:",e);const r=new ka(this.Ss.next());return this.referenceDelegate.ks(),n(r).next((e=>this.referenceDelegate.Os(r).next((()=>e)))).toPromise().then((e=>(r.raiseOnCommittedEvent(),e)))}Ms(e,t){return us.or(Object.values(this.Vs).map((n=>()=>n.containsKey(e,t))))}}class ka extends cs{constructor(e){super(),this.currentSequenceNumber=e}}class Da{constructor(e){this.persistence=e,this.Fs=new ba,this.$s=null}static Bs(e){return new Da(e)}get Ls(){if(this.$s)return this.$s;throw Oi()}addReference(e,t,n){return this.Fs.addReference(n,t),this.Ls.delete(n.toString()),us.resolve()}removeReference(e,t,n){return this.Fs.removeReference(n,t),this.Ls.add(n.toString()),us.resolve()}markPotentiallyOrphaned(e,t){return this.Ls.add(t.toString()),us.resolve()}removeTarget(e,t){this.Fs.ls(t.targetId).forEach((e=>this.Ls.add(e.toString())));const n=this.persistence.getTargetCache();return n.getMatchingKeysForTargetId(e,t.targetId).next((e=>{e.forEach((e=>this.Ls.add(e.toString())))})).next((()=>n.removeTargetData(e,t)))}ks(){this.$s=new Set}Os(e){const t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return us.forEach(this.Ls,(n=>{const r=ss.fromPath(n);return this.qs(e,r).next((e=>{e||t.removeEntry(r,es.min())}))})).next((()=>(this.$s=null,t.apply(e))))}updateLimboDocument(e,t){return this.qs(e,t).next((e=>{e?this.Ls.delete(t.toString()):this.Ls.add(t.toString())}))}xs(e){return 0}qs(e,t){return us.or([()=>us.resolve(this.Fs.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.Ms(e,t)])}}
1300
+ /**
1301
+ * @license
1302
+ * Copyright 2017 Google LLC
1303
+ *
1304
+ * Licensed under the Apache License, Version 2.0 (the "License");
1305
+ * you may not use this file except in compliance with the License.
1306
+ * You may obtain a copy of the License at
1307
+ *
1308
+ * http://www.apache.org/licenses/LICENSE-2.0
1309
+ *
1310
+ * Unless required by applicable law or agreed to in writing, software
1311
+ * distributed under the License is distributed on an "AS IS" BASIS,
1312
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
+ * See the License for the specific language governing permissions and
1314
+ * limitations under the License.
1315
+ */class Ra{constructor(e,t,n,r){this.targetId=e,this.fromCache=t,this.Si=n,this.Di=r}static Ci(e,t){let n=Sd(),r=Sd();for(const e of t.docChanges)switch(e.type){case 0:n=n.add(e.doc.key);break;case 1:r=r.add(e.doc.key)}return new Ra(e,t.fromCache,n,r)}}
1316
+ /**
1317
+ * @license
1318
+ * Copyright 2019 Google LLC
1319
+ *
1320
+ * Licensed under the Apache License, Version 2.0 (the "License");
1321
+ * you may not use this file except in compliance with the License.
1322
+ * You may obtain a copy of the License at
1323
+ *
1324
+ * http://www.apache.org/licenses/LICENSE-2.0
1325
+ *
1326
+ * Unless required by applicable law or agreed to in writing, software
1327
+ * distributed under the License is distributed on an "AS IS" BASIS,
1328
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1329
+ * See the License for the specific language governing permissions and
1330
+ * limitations under the License.
1331
+ */class La{constructor(){this.xi=!1}initialize(e,t){this.Ni=e,this.indexManager=t,this.xi=!0}getDocumentsMatchingQuery(e,t,n,r){return this.ki(e,t).next((i=>i||this.Oi(e,t,r,n))).next((n=>n||this.Mi(e,t)))}ki(e,t){if(To(t))return us.resolve(null);let n=Ro(t);return this.indexManager.getIndexType(e,n).next((r=>0===r?null:(null!==t.limit&&1===r&&(t=xo(t,null,"F"),n=Ro(t)),this.indexManager.getDocumentsMatchingTarget(e,n).next((r=>{const i=Sd(...r);return this.Ni.getDocuments(e,i).next((r=>this.indexManager.getMinOffset(e,n).next((n=>{const s=this.Fi(t,r);return this.$i(t,s,i,n.readTime)?this.ki(e,xo(t,null,"F")):this.Bi(e,s,t,n)}))))})))))}Oi(e,t,n,r){return To(t)||r.isEqual(es.min())?this.Mi(e,t):this.Ni.getDocuments(e,n).next((i=>{const s=this.Fi(t,i);return this.$i(t,s,n,r)?this.Mi(e,t):(ki()<=E.DEBUG&&Di("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),Po(t)),this.Bi(e,s,t,function(e,t){const n=e.toTimestamp().seconds,r=e.toTimestamp().nanoseconds+1,i=es.fromTimestamp(1e9===r?new Zi(n+1,0):new Zi(n,r));return new ds(i,ss.empty(),t)}(r,-1)))}))}Fi(e,t){let n=new No(Fo(e));return t.forEach(((t,r)=>{Uo(e,r)&&(n=n.add(r))})),n}$i(e,t,n,r){if(null===e.limit)return!1;if(n.size!==t.size)return!0;const i="F"===e.limitType?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(r)>0)}Mi(e,t){return ki()<=E.DEBUG&&Di("QueryEngine","Using full collection scan to execute query:",Po(t)),this.Ni.getDocumentsMatchingQuery(e,t,ds.min())}Bi(e,t,n,r){return this.Ni.getDocumentsMatchingQuery(e,n,r).next((e=>(t.forEach((t=>{e=e.insert(t.key,t)})),e)))}}
1332
+ /**
1333
+ * @license
1334
+ * Copyright 2020 Google LLC
1335
+ *
1336
+ * Licensed under the Apache License, Version 2.0 (the "License");
1337
+ * you may not use this file except in compliance with the License.
1338
+ * You may obtain a copy of the License at
1339
+ *
1340
+ * http://www.apache.org/licenses/LICENSE-2.0
1341
+ *
1342
+ * Unless required by applicable law or agreed to in writing, software
1343
+ * distributed under the License is distributed on an "AS IS" BASIS,
1344
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1345
+ * See the License for the specific language governing permissions and
1346
+ * limitations under the License.
1347
+ */class xa{constructor(e,t,n,r){this.persistence=e,this.Li=t,this.yt=r,this.qi=new ho(Ji),this.Ui=new gd((e=>wo(e)),bo),this.Ki=new Map,this.Gi=e.getRemoteDocumentCache(),this.Cs=e.getTargetCache(),this.Ns=e.getBundleCache(),this.Qi(n)}Qi(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new ya(this.Gi,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Gi.setIndexManager(this.indexManager),this.Li.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",(t=>e.collect(t,this.qi)))}}async function Oa(e,t){const n=Pi(e);return await n.persistence.runTransaction("Handle user change","readonly",(e=>{let r;return n.mutationQueue.getAllMutationBatches(e).next((i=>(r=i,n.Qi(t),n.mutationQueue.getAllMutationBatches(e)))).next((t=>{const i=[],s=[];let o=Sd();for(const e of r){i.push(e.batchId);for(const t of e.mutations)o=o.add(t.key)}for(const e of t){s.push(e.batchId);for(const t of e.mutations)o=o.add(t.key)}return n.localDocuments.getDocuments(e,o).next((e=>({ji:e,removedBatchIds:i,addedBatchIds:s})))}))}))}function Ma(e){const t=Pi(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",(e=>t.Cs.getLastRemoteSnapshotVersion(e)))}function Pa(e,t){const n=Pi(e),r=t.snapshotVersion;let i=n.qi;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(e=>{const s=n.Gi.newChangeBuffer({trackRemovals:!0});i=n.qi;const o=[];t.targetChanges.forEach(((s,d)=>{const a=i.get(d);if(!a)return;o.push(n.Cs.removeMatchingKeys(e,s.removedDocuments,d).next((()=>n.Cs.addMatchingKeys(e,s.addedDocuments,d))));let c=a.withSequenceNumber(e.currentSequenceNumber);t.targetMismatches.has(d)?c=c.withResumeToken(vs.EMPTY_BYTE_STRING,es.min()).withLastLimboFreeSnapshotVersion(es.min()):s.resumeToken.approximateByteSize()>0&&(c=c.withResumeToken(s.resumeToken,r)),i=i.insert(d,c),function(e,t,n){return 0===e.resumeToken.approximateByteSize()||(t.snapshotVersion.toMicroseconds()-e.snapshotVersion.toMicroseconds()>=3e8||n.addedDocuments.size+n.modifiedDocuments.size+n.removedDocuments.size>0)}(a,c,s)&&o.push(n.Cs.updateTargetData(e,c))}));let d=yd(),a=Sd();if(t.documentUpdates.forEach((r=>{t.resolvedLimboDocuments.has(r)&&o.push(n.persistence.referenceDelegate.updateLimboDocument(e,r))})),o.push(function(e,t,n){let r=Sd(),i=Sd();return n.forEach((e=>r=r.add(e))),t.getEntries(e,r).next((e=>{let r=yd();return n.forEach(((n,s)=>{const o=e.get(n);s.isFoundDocument()!==o.isFoundDocument()&&(i=i.add(n)),s.isNoDocument()&&s.version.isEqual(es.min())?(t.removeEntry(n,s.readTime),r=r.insert(n,s)):!o.isValidDocument()||s.version.compareTo(o.version)>0||0===s.version.compareTo(o.version)&&o.hasPendingWrites?(t.addEntry(s),r=r.insert(n,s)):Di("LocalStore","Ignoring outdated watch update for ",n,". Current version:",o.version," Watch version:",s.version)})),{Wi:r,zi:i}}))}(e,s,t.documentUpdates).next((e=>{d=e.Wi,a=e.zi}))),!r.isEqual(es.min())){const t=n.Cs.getLastRemoteSnapshotVersion(e).next((t=>n.Cs.setTargetsMetadata(e,e.currentSequenceNumber,r)));o.push(t)}return us.waitFor(o).next((()=>s.apply(e))).next((()=>n.localDocuments.getLocalViewOfDocuments(e,d,a))).next((()=>d))})).then((e=>(n.qi=i,e)))}async function Ua(e,t,n){const r=Pi(e),i=r.qi.get(t),s=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",s,(e=>r.persistence.referenceDelegate.removeTarget(e,i)))}catch(e){if(!hs(e))throw e;Di("LocalStore",`Failed to update sequence numbers for target ${t}: ${e}`)}r.qi=r.qi.remove(t),r.Ui.delete(i.target)}function Fa(e,t,n){const r=Pi(e);let i=es.min(),s=Sd();return r.persistence.runTransaction("Execute query","readonly",(e=>function(e,t,n){const r=Pi(e),i=r.Ui.get(n);return void 0!==i?us.resolve(r.qi.get(i)):r.Cs.getTargetData(t,n)}(r,e,Ro(t)).next((t=>{if(t)return i=t.lastLimboFreeSnapshotVersion,r.Cs.getMatchingKeysForTargetId(e,t.targetId).next((e=>{s=e}))})).next((()=>r.Li.getDocumentsMatchingQuery(e,t,n?i:es.min(),n?s:Sd()))).next((e=>(function(e,t,n){let r=e.Ki.get(t)||es.min();n.forEach(((e,t)=>{t.readTime.compareTo(r)>0&&(r=t.readTime)})),e.Ki.set(t,r)}(r,function(e){return e.collectionGroup||(e.path.length%2==1?e.path.lastSegment():e.path.get(e.path.length-2))}(t),e),{documents:e,Hi:s})))))}class Va{constructor(){this.activeTargetIds=kd()}er(e){this.activeTargetIds=this.activeTargetIds.add(e)}nr(e){this.activeTargetIds=this.activeTargetIds.delete(e)}tr(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class Ba{constructor(){this.Lr=new Va,this.qr={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,t,n){}addLocalQueryTarget(e){return this.Lr.er(e),this.qr[e]||"not-current"}updateQueryState(e,t,n){this.qr[e]=t}removeLocalQueryTarget(e){this.Lr.nr(e)}isLocalQueryTarget(e){return this.Lr.activeTargetIds.has(e)}clearQueryState(e){delete this.qr[e]}getAllActiveQueryTargets(){return this.Lr.activeTargetIds}isActiveQueryTarget(e){return this.Lr.activeTargetIds.has(e)}start(){return this.Lr=new Va,Promise.resolve()}handleUserChange(e,t,n){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}
1348
+ /**
1349
+ * @license
1350
+ * Copyright 2019 Google LLC
1351
+ *
1352
+ * Licensed under the Apache License, Version 2.0 (the "License");
1353
+ * you may not use this file except in compliance with the License.
1354
+ * You may obtain a copy of the License at
1355
+ *
1356
+ * http://www.apache.org/licenses/LICENSE-2.0
1357
+ *
1358
+ * Unless required by applicable law or agreed to in writing, software
1359
+ * distributed under the License is distributed on an "AS IS" BASIS,
1360
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1361
+ * See the License for the specific language governing permissions and
1362
+ * limitations under the License.
1363
+ */class qa{Ur(e){}shutdown(){}}
1364
+ /**
1365
+ * @license
1366
+ * Copyright 2019 Google LLC
1367
+ *
1368
+ * Licensed under the Apache License, Version 2.0 (the "License");
1369
+ * you may not use this file except in compliance with the License.
1370
+ * You may obtain a copy of the License at
1371
+ *
1372
+ * http://www.apache.org/licenses/LICENSE-2.0
1373
+ *
1374
+ * Unless required by applicable law or agreed to in writing, software
1375
+ * distributed under the License is distributed on an "AS IS" BASIS,
1376
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1377
+ * See the License for the specific language governing permissions and
1378
+ * limitations under the License.
1379
+ */class ja{constructor(){this.Kr=()=>this.Gr(),this.Qr=()=>this.jr(),this.Wr=[],this.zr()}Ur(e){this.Wr.push(e)}shutdown(){window.removeEventListener("online",this.Kr),window.removeEventListener("offline",this.Qr)}zr(){window.addEventListener("online",this.Kr),window.addEventListener("offline",this.Qr)}Gr(){Di("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const e of this.Wr)e(0)}jr(){Di("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const e of this.Wr)e(1)}static C(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}
1380
+ /**
1381
+ * @license
1382
+ * Copyright 2020 Google LLC
1383
+ *
1384
+ * Licensed under the Apache License, Version 2.0 (the "License");
1385
+ * you may not use this file except in compliance with the License.
1386
+ * You may obtain a copy of the License at
1387
+ *
1388
+ * http://www.apache.org/licenses/LICENSE-2.0
1389
+ *
1390
+ * Unless required by applicable law or agreed to in writing, software
1391
+ * distributed under the License is distributed on an "AS IS" BASIS,
1392
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1393
+ * See the License for the specific language governing permissions and
1394
+ * limitations under the License.
1395
+ */const Ga={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};
1396
+ /**
1397
+ * @license
1398
+ * Copyright 2017 Google LLC
1399
+ *
1400
+ * Licensed under the Apache License, Version 2.0 (the "License");
1401
+ * you may not use this file except in compliance with the License.
1402
+ * You may obtain a copy of the License at
1403
+ *
1404
+ * http://www.apache.org/licenses/LICENSE-2.0
1405
+ *
1406
+ * Unless required by applicable law or agreed to in writing, software
1407
+ * distributed under the License is distributed on an "AS IS" BASIS,
1408
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1409
+ * See the License for the specific language governing permissions and
1410
+ * limitations under the License.
1411
+ */class za{constructor(e){this.Hr=e.Hr,this.Jr=e.Jr}Yr(e){this.Xr=e}Zr(e){this.eo=e}onMessage(e){this.no=e}close(){this.Jr()}send(e){this.Hr(e)}so(){this.Xr()}io(e){this.eo(e)}ro(e){this.no(e)}}
1412
+ /**
1413
+ * @license
1414
+ * Copyright 2017 Google LLC
1415
+ *
1416
+ * Licensed under the Apache License, Version 2.0 (the "License");
1417
+ * you may not use this file except in compliance with the License.
1418
+ * You may obtain a copy of the License at
1419
+ *
1420
+ * http://www.apache.org/licenses/LICENSE-2.0
1421
+ *
1422
+ * Unless required by applicable law or agreed to in writing, software
1423
+ * distributed under the License is distributed on an "AS IS" BASIS,
1424
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1425
+ * See the License for the specific language governing permissions and
1426
+ * limitations under the License.
1427
+ */class Ka extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;const t=e.ssl?"https":"http";this.oo=t+"://"+e.host,this.uo="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}get co(){return!1}ao(e,t,n,r,i){const s=this.ho(e,t);Di("RestConnection","Sending: ",s,n);const o={};return this.lo(o,r,i),this.fo(e,s,o,n).then((e=>(Di("RestConnection","Received: ",e),e)),(t=>{throw Li("RestConnection",`${e} failed with error: `,t,"url: ",s,"request:",n),t}))}_o(e,t,n,r,i,s){return this.ao(e,t,n,r,i)}lo(e,t,n){e["X-Goog-Api-Client"]="gl-js/ fire/"+Si,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEach(((t,n)=>e[n]=t)),n&&n.headers.forEach(((t,n)=>e[n]=t))}ho(e,t){const n=Ga[e];return`${this.oo}/v1/${t}:${n}`}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams}fo(e,t,n,r){return new Promise(((i,s)=>{const o=new Ei;o.setWithCredentials(!0),o.listenOnce($i.COMPLETE,(()=>{try{switch(o.getLastErrorCode()){case gi.NO_ERROR:const t=o.getResponseJson();Di("Connection","XHR received:",JSON.stringify(t)),i(t);break;case gi.TIMEOUT:Di("Connection",'RPC "'+e+'" timed out'),s(new Fi(Ui.DEADLINE_EXCEEDED,"Request time out"));break;case gi.HTTP_ERROR:const n=o.getStatus();if(Di("Connection",'RPC "'+e+'" failed with status:',n,"response text:",o.getResponseText()),n>0){let e=o.getResponseJson();Array.isArray(e)&&(e=e[0]);const t=null==e?void 0:e.error;if(t&&t.status&&t.message){const e=function(e){const t=e.toLowerCase().replace(/_/g,"-");return Object.values(Ui).indexOf(t)>=0?t:Ui.UNKNOWN}(t.status);s(new Fi(e,t.message))}else s(new Fi(Ui.UNKNOWN,"Server responded with status "+o.getStatus()))}else s(new Fi(Ui.UNAVAILABLE,"Connection failed."));break;default:Oi()}}finally{Di("Connection",'RPC "'+e+'" completed.')}}));const d=JSON.stringify(r);o.send(t,"POST",d,n,15)}))}wo(e,t,n){const r=[this.oo,"/","google.firestore.v1.Firestore","/",e,"/channel"],i=new fi,s=un(),o={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.useFetchStreams&&(o.xmlHttpFactory=new bi({})),this.lo(o.initMessageHeaders,t,n),o.encodeInitMessageHeaders=!0;const d=r.join("");Di("Connection","Creating WebChannel: "+d,o);const a=i.createWebChannel(d,o);let c=!1,l=!1;const u=new za({Hr:e=>{l?Di("Connection","Not sending because WebChannel is closed:",e):(c||(Di("Connection","Opening WebChannel transport."),a.open(),c=!0),Di("Connection","WebChannel sending:",e),a.send(e))},Jr:()=>a.close()}),h=(e,t,n)=>{e.listen(t,(e=>{try{n(e)}catch(e){setTimeout((()=>{throw e}),0)}}))};return h(a,Ci.EventType.OPEN,(()=>{l||Di("Connection","WebChannel transport opened.")})),h(a,Ci.EventType.CLOSE,(()=>{l||(l=!0,Di("Connection","WebChannel transport closed"),u.io())})),h(a,Ci.EventType.ERROR,(e=>{l||(l=!0,Li("Connection","WebChannel transport errored:",e),u.io(new Fi(Ui.UNAVAILABLE,"The operation could not be completed")))})),h(a,Ci.EventType.MESSAGE,(e=>{var t;if(!l){const n=e.data[0];Mi(!!n);const r=n,i=r.error||(null===(t=r[0])||void 0===t?void 0:t.error);if(i){Di("Connection","WebChannel received error:",i);const e=i.status;let t=function(e){const t=Nd[e];if(void 0!==t)return md(t)}(e),n=i.message;void 0===t&&(t=Ui.INTERNAL,n="Unknown error status: "+e+" with message "+i.message),l=!0,u.io(new Fi(t,n)),a.close()}else Di("Connection","WebChannel received:",n),u.ro(n)}})),h(s,yi.STAT_EVENT,(e=>{e.stat===vi?Di("Connection","Detected buffering proxy"):e.stat===wi&&Di("Connection","Detected no buffering proxy")})),setTimeout((()=>{u.so()}),0),u}}function Ha(){return"undefined"!=typeof document?document:null}
1428
+ /**
1429
+ * @license
1430
+ * Copyright 2020 Google LLC
1431
+ *
1432
+ * Licensed under the Apache License, Version 2.0 (the "License");
1433
+ * you may not use this file except in compliance with the License.
1434
+ * You may obtain a copy of the License at
1435
+ *
1436
+ * http://www.apache.org/licenses/LICENSE-2.0
1437
+ *
1438
+ * Unless required by applicable law or agreed to in writing, software
1439
+ * distributed under the License is distributed on an "AS IS" BASIS,
1440
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1441
+ * See the License for the specific language governing permissions and
1442
+ * limitations under the License.
1443
+ */function Wa(e){return new jd(e,!0)}class Qa{constructor(e,t,n=1e3,r=1.5,i=6e4){this.Hs=e,this.timerId=t,this.mo=n,this.yo=r,this.po=i,this.Io=0,this.To=null,this.Eo=Date.now(),this.reset()}reset(){this.Io=0}Ao(){this.Io=this.po}Ro(e){this.cancel();const t=Math.floor(this.Io+this.bo()),n=Math.max(0,Date.now()-this.Eo),r=Math.max(0,t-n);r>0&&Di("ExponentialBackoff",`Backing off for ${r} ms (base delay: ${this.Io} ms, delay with jitter: ${t} ms, last attempt: ${n} ms ago)`),this.To=this.Hs.enqueueAfterDelay(this.timerId,r,(()=>(this.Eo=Date.now(),e()))),this.Io*=this.yo,this.Io<this.mo&&(this.Io=this.mo),this.Io>this.po&&(this.Io=this.po)}Po(){null!==this.To&&(this.To.skipDelay(),this.To=null)}cancel(){null!==this.To&&(this.To.cancel(),this.To=null)}bo(){return(Math.random()-.5)*this.Io}}
1444
+ /**
1445
+ * @license
1446
+ * Copyright 2017 Google LLC
1447
+ *
1448
+ * Licensed under the Apache License, Version 2.0 (the "License");
1449
+ * you may not use this file except in compliance with the License.
1450
+ * You may obtain a copy of the License at
1451
+ *
1452
+ * http://www.apache.org/licenses/LICENSE-2.0
1453
+ *
1454
+ * Unless required by applicable law or agreed to in writing, software
1455
+ * distributed under the License is distributed on an "AS IS" BASIS,
1456
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1457
+ * See the License for the specific language governing permissions and
1458
+ * limitations under the License.
1459
+ */class Ya{constructor(e,t,n,r,i,s,o,d){this.Hs=e,this.vo=n,this.Vo=r,this.connection=i,this.authCredentialsProvider=s,this.appCheckCredentialsProvider=o,this.listener=d,this.state=0,this.So=0,this.Do=null,this.Co=null,this.stream=null,this.xo=new Qa(e,t)}No(){return 1===this.state||5===this.state||this.ko()}ko(){return 2===this.state||3===this.state}start(){4!==this.state?this.auth():this.Oo()}async stop(){this.No()&&await this.close(0)}Mo(){this.state=0,this.xo.reset()}Fo(){this.ko()&&null===this.Do&&(this.Do=this.Hs.enqueueAfterDelay(this.vo,6e4,(()=>this.$o())))}Bo(e){this.Lo(),this.stream.send(e)}async $o(){if(this.ko())return this.close(0)}Lo(){this.Do&&(this.Do.cancel(),this.Do=null)}qo(){this.Co&&(this.Co.cancel(),this.Co=null)}async close(e,t){this.Lo(),this.qo(),this.xo.cancel(),this.So++,4!==e?this.xo.reset():t&&t.code===Ui.RESOURCE_EXHAUSTED?(Ri(t.toString()),Ri("Using maximum backoff delay to prevent overloading the backend."),this.xo.Ao()):t&&t.code===Ui.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.Uo(),this.stream.close(),this.stream=null),this.state=e,await this.listener.Zr(t)}Uo(){}auth(){this.state=1;const e=this.Ko(this.So),t=this.So;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then((([e,n])=>{this.So===t&&this.Go(e,n)}),(t=>{e((()=>{const e=new Fi(Ui.UNKNOWN,"Fetching auth token failed: "+t.message);return this.Qo(e)}))}))}Go(e,t){const n=this.Ko(this.So);this.stream=this.jo(e,t),this.stream.Yr((()=>{n((()=>(this.state=2,this.Co=this.Hs.enqueueAfterDelay(this.Vo,1e4,(()=>(this.ko()&&(this.state=3),Promise.resolve()))),this.listener.Yr())))})),this.stream.Zr((e=>{n((()=>this.Qo(e)))})),this.stream.onMessage((e=>{n((()=>this.onMessage(e)))}))}Oo(){this.state=5,this.xo.Ro((async()=>{this.state=0,this.start()}))}Qo(e){return Di("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}Ko(e){return t=>{this.Hs.enqueueAndForget((()=>this.So===e?t():(Di("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())))}}}class Ja extends Ya{constructor(e,t,n,r,i,s){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,n,r,s),this.yt=i}jo(e,t){return this.connection.wo("Listen",e,t)}onMessage(e){this.xo.reset();const t=function(e,t){let n;if("targetChange"in t){t.targetChange;const r=function(e){return"NO_CHANGE"===e?0:"ADD"===e?1:"REMOVE"===e?2:"CURRENT"===e?3:"RESET"===e?4:Oi()}(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],s=function(e,t){return e.wt?(Mi(void 0===t||"string"==typeof t),vs.fromBase64String(t||"")):(Mi(void 0===t||t instanceof Uint8Array),vs.fromUint8Array(t||new Uint8Array))}(e,t.targetChange.resumeToken),o=t.targetChange.cause,d=o&&function(e){const t=void 0===e.code?Ui.UNKNOWN:md(e.code);return new Fi(t,e.message||"")}(o);n=new Od(r,i,s,d||null)}else if("documentChange"in t){t.documentChange;const r=t.documentChange;r.document,r.document.name,r.document.updateTime;const i=Qd(e,r.document.name),s=Kd(r.document.updateTime),o=r.document.createTime?Kd(r.document.createTime):es.min(),d=new go({mapValue:{fields:r.document.fields}}),a=$o.newFoundDocument(i,s,o,d),c=r.targetIds||[],l=r.removedTargetIds||[];n=new Ld(c,l,a.key,a)}else if("documentDelete"in t){t.documentDelete;const r=t.documentDelete;r.document;const i=Qd(e,r.document),s=r.readTime?Kd(r.readTime):es.min(),o=$o.newNoDocument(i,s),d=r.removedTargetIds||[];n=new Ld([],d,o.key,o)}else if("documentRemove"in t){t.documentRemove;const r=t.documentRemove;r.document;const i=Qd(e,r.document),s=r.removedTargetIds||[];n=new Ld([],s,i,null)}else{if(!("filter"in t))return Oi();{t.filter;const e=t.filter;e.targetId;const r=e.count||0,i=new Ad(r),s=e.targetId;n=new xd(s,i)}}return n}(this.yt,e),n=function(e){if(!("targetChange"in e))return es.min();const t=e.targetChange;return t.targetIds&&t.targetIds.length?es.min():t.readTime?Kd(t.readTime):es.min()}(e);return this.listener.Wo(t,n)}zo(e){const t={};t.database=Jd(this.yt),t.addTarget=function(e,t){let n;const r=t.target;return n=Co(r)?{documents:Zd(e,r)}:{query:ea(e,r)},n.targetId=t.targetId,t.resumeToken.approximateByteSize()>0?n.resumeToken=zd(e,t.resumeToken):t.snapshotVersion.compareTo(es.min())>0&&(n.readTime=Gd(e,t.snapshotVersion.toTimestamp())),n}(this.yt,e);const n=function(e,t){const n=function(e,t){switch(t){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return Oi()}}(0,t.purpose);return null==n?null:{"goog-listen-tags":n}}(this.yt,e);n&&(t.labels=n),this.Bo(t)}Ho(e){const t={};t.database=Jd(this.yt),t.removeTarget=e,this.Bo(t)}}
1460
+ /**
1461
+ * @license
1462
+ * Copyright 2017 Google LLC
1463
+ *
1464
+ * Licensed under the Apache License, Version 2.0 (the "License");
1465
+ * you may not use this file except in compliance with the License.
1466
+ * You may obtain a copy of the License at
1467
+ *
1468
+ * http://www.apache.org/licenses/LICENSE-2.0
1469
+ *
1470
+ * Unless required by applicable law or agreed to in writing, software
1471
+ * distributed under the License is distributed on an "AS IS" BASIS,
1472
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1473
+ * See the License for the specific language governing permissions and
1474
+ * limitations under the License.
1475
+ */class Xa extends class{}{constructor(e,t,n,r){super(),this.authCredentials=e,this.appCheckCredentials=t,this.connection=n,this.yt=r,this.nu=!1}su(){if(this.nu)throw new Fi(Ui.FAILED_PRECONDITION,"The client has already been terminated.")}ao(e,t,n){return this.su(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((([r,i])=>this.connection.ao(e,t,n,r,i))).catch((e=>{throw"FirebaseError"===e.name?(e.code===Ui.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new Fi(Ui.UNKNOWN,e.toString())}))}_o(e,t,n,r){return this.su(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((([i,s])=>this.connection._o(e,t,n,i,s,r))).catch((e=>{throw"FirebaseError"===e.name?(e.code===Ui.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new Fi(Ui.UNKNOWN,e.toString())}))}terminate(){this.nu=!0}}class Za{constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.iu=0,this.ru=null,this.ou=!0}uu(){0===this.iu&&(this.cu("Unknown"),this.ru=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(()=>(this.ru=null,this.au("Backend didn't respond within 10 seconds."),this.cu("Offline"),Promise.resolve()))))}hu(e){"Online"===this.state?this.cu("Unknown"):(this.iu++,this.iu>=1&&(this.lu(),this.au(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.cu("Offline")))}set(e){this.lu(),this.iu=0,"Online"===e&&(this.ou=!1),this.cu(e)}cu(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}au(e){const t=`Could not reach Cloud Firestore backend. ${e}\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.ou?(Ri(t),this.ou=!1):Di("OnlineStateTracker",t)}lu(){null!==this.ru&&(this.ru.cancel(),this.ru=null)}}
1476
+ /**
1477
+ * @license
1478
+ * Copyright 2017 Google LLC
1479
+ *
1480
+ * Licensed under the Apache License, Version 2.0 (the "License");
1481
+ * you may not use this file except in compliance with the License.
1482
+ * You may obtain a copy of the License at
1483
+ *
1484
+ * http://www.apache.org/licenses/LICENSE-2.0
1485
+ *
1486
+ * Unless required by applicable law or agreed to in writing, software
1487
+ * distributed under the License is distributed on an "AS IS" BASIS,
1488
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1489
+ * See the License for the specific language governing permissions and
1490
+ * limitations under the License.
1491
+ */class ec{constructor(e,t,n,r,i){this.localStore=e,this.datastore=t,this.asyncQueue=n,this.remoteSyncer={},this.fu=[],this.du=new Map,this._u=new Set,this.wu=[],this.mu=i,this.mu.Ur((e=>{n.enqueueAndForget((async()=>{cc(this)&&(Di("RemoteStore","Restarting streams for network reachability change."),await async function(e){const t=Pi(e);t._u.add(4),await nc(t),t.gu.set("Unknown"),t._u.delete(4),await tc(t)}(this))}))})),this.gu=new Za(n,r)}}async function tc(e){if(cc(e))for(const t of e.wu)await t(!0)}async function nc(e){for(const t of e.wu)await t(!1)}function rc(e,t){const n=Pi(e);n.du.has(t.targetId)||(n.du.set(t.targetId,t),ac(n)?dc(n):pc(n).ko()&&sc(n,t))}function ic(e,t){const n=Pi(e),r=pc(n);n.du.delete(t),r.ko()&&oc(n,t),0===n.du.size&&(r.ko()?r.Fo():cc(n)&&n.gu.set("Unknown"))}function sc(e,t){e.yu.Ot(t.targetId),pc(e).zo(t)}function oc(e,t){e.yu.Ot(t),pc(e).Ho(t)}function dc(e){e.yu=new Pd({getRemoteKeysForTarget:t=>e.remoteSyncer.getRemoteKeysForTarget(t),ne:t=>e.du.get(t)||null}),pc(e).start(),e.gu.uu()}function ac(e){return cc(e)&&!pc(e).No()&&e.du.size>0}function cc(e){return 0===Pi(e)._u.size}function lc(e){e.yu=void 0}async function uc(e){e.du.forEach(((t,n)=>{sc(e,t)}))}async function hc(e,t){lc(e),ac(e)?(e.gu.hu(t),dc(e)):e.gu.set("Unknown")}async function fc(e,t,n){if(e.gu.set("Online"),t instanceof Od&&2===t.state&&t.cause)try{await async function(e,t){const n=t.cause;for(const r of t.targetIds)e.du.has(r)&&(await e.remoteSyncer.rejectListen(r,n),e.du.delete(r),e.yu.removeTarget(r))}(e,t)}catch(n){Di("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),n),await Ac(e,n)}else if(t instanceof Ld?e.yu.Kt(t):t instanceof xd?e.yu.Jt(t):e.yu.jt(t),!n.isEqual(es.min()))try{const t=await Ma(e.localStore);n.compareTo(t)>=0&&await function(e,t){const n=e.yu.Zt(t);return n.targetChanges.forEach(((n,r)=>{if(n.resumeToken.approximateByteSize()>0){const i=e.du.get(r);i&&e.du.set(r,i.withResumeToken(n.resumeToken,t))}})),n.targetMismatches.forEach((t=>{const n=e.du.get(t);if(!n)return;e.du.set(t,n.withResumeToken(vs.EMPTY_BYTE_STRING,n.snapshotVersion)),oc(e,t);const r=new ha(n.target,t,1,n.sequenceNumber);sc(e,r)})),e.remoteSyncer.applyRemoteEvent(n)}(e,n)}catch(t){Di("RemoteStore","Failed to raise snapshot:",t),await Ac(e,t)}}async function Ac(e,t,n){if(!hs(t))throw t;e._u.add(1),await nc(e),e.gu.set("Offline"),n||(n=()=>Ma(e.localStore)),e.asyncQueue.enqueueRetryable((async()=>{Di("RemoteStore","Retrying IndexedDB access"),await n(),e._u.delete(1),await tc(e)}))}async function Nc(e,t){const n=Pi(e);n.asyncQueue.verifyOperationInProgress(),Di("RemoteStore","RemoteStore received new credentials");const r=cc(n);n._u.add(3),await nc(n),r&&n.gu.set("Unknown"),await n.remoteSyncer.handleCredentialChange(t),n._u.delete(3),await tc(n)}function pc(e){return e.pu||(e.pu=function(e,t,n){const r=Pi(e);return r.su(),new Ja(t,r.connection,r.authCredentials,r.appCheckCredentials,r.yt,n)
1492
+ /**
1493
+ * @license
1494
+ * Copyright 2018 Google LLC
1495
+ *
1496
+ * Licensed under the Apache License, Version 2.0 (the "License");
1497
+ * you may not use this file except in compliance with the License.
1498
+ * You may obtain a copy of the License at
1499
+ *
1500
+ * http://www.apache.org/licenses/LICENSE-2.0
1501
+ *
1502
+ * Unless required by applicable law or agreed to in writing, software
1503
+ * distributed under the License is distributed on an "AS IS" BASIS,
1504
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1505
+ * See the License for the specific language governing permissions and
1506
+ * limitations under the License.
1507
+ */}(e.datastore,e.asyncQueue,{Yr:uc.bind(null,e),Zr:hc.bind(null,e),Wo:fc.bind(null,e)}),e.wu.push((async t=>{t?(e.pu.Mo(),ac(e)?dc(e):e.gu.set("Unknown")):(await e.pu.stop(),lc(e))}))),e.pu
1508
+ /**
1509
+ * @license
1510
+ * Copyright 2017 Google LLC
1511
+ *
1512
+ * Licensed under the Apache License, Version 2.0 (the "License");
1513
+ * you may not use this file except in compliance with the License.
1514
+ * You may obtain a copy of the License at
1515
+ *
1516
+ * http://www.apache.org/licenses/LICENSE-2.0
1517
+ *
1518
+ * Unless required by applicable law or agreed to in writing, software
1519
+ * distributed under the License is distributed on an "AS IS" BASIS,
1520
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1521
+ * See the License for the specific language governing permissions and
1522
+ * limitations under the License.
1523
+ */}class mc{constructor(e,t,n,r,i){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=n,this.op=r,this.removalCallback=i,this.deferred=new Vi,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((e=>{}))}static createAndSchedule(e,t,n,r,i){const s=Date.now()+n,o=new mc(e,t,s,r,i);return o.start(n),o}start(e){this.timerHandle=setTimeout((()=>this.handleDelayElapsed()),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new Fi(Ui.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget((()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then((e=>this.deferred.resolve(e)))):Promise.resolve()))}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function gc(e,t){if(Ri("AsyncQueue",`${t}: ${e}`),hs(e))return new Fi(Ui.UNAVAILABLE,`${t}: ${e}`);throw e}
1524
+ /**
1525
+ * @license
1526
+ * Copyright 2017 Google LLC
1527
+ *
1528
+ * Licensed under the Apache License, Version 2.0 (the "License");
1529
+ * you may not use this file except in compliance with the License.
1530
+ * You may obtain a copy of the License at
1531
+ *
1532
+ * http://www.apache.org/licenses/LICENSE-2.0
1533
+ *
1534
+ * Unless required by applicable law or agreed to in writing, software
1535
+ * distributed under the License is distributed on an "AS IS" BASIS,
1536
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1537
+ * See the License for the specific language governing permissions and
1538
+ * limitations under the License.
1539
+ */class $c{constructor(e){this.comparator=e?(t,n)=>e(t,n)||ss.comparator(t.key,n.key):(e,t)=>ss.comparator(e.key,t.key),this.keyedMap=wd(),this.sortedSet=new ho(this.comparator)}static emptySet(e){return new $c(e.comparator)}has(e){return null!=this.keyedMap.get(e)}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal(((t,n)=>(e(t),!1)))}add(e){const t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}delete(e){const t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}isEqual(e){if(!(e instanceof $c))return!1;if(this.size!==e.size)return!1;const t=this.sortedSet.getIterator(),n=e.sortedSet.getIterator();for(;t.hasNext();){const e=t.getNext().key,r=n.getNext().key;if(!e.isEqual(r))return!1}return!0}toString(){const e=[];return this.forEach((t=>{e.push(t.toString())})),0===e.length?"DocumentSet ()":"DocumentSet (\n "+e.join(" \n")+"\n)"}copy(e,t){const n=new $c;return n.comparator=this.comparator,n.keyedMap=e,n.sortedSet=t,n}}
1540
+ /**
1541
+ * @license
1542
+ * Copyright 2017 Google LLC
1543
+ *
1544
+ * Licensed under the Apache License, Version 2.0 (the "License");
1545
+ * you may not use this file except in compliance with the License.
1546
+ * You may obtain a copy of the License at
1547
+ *
1548
+ * http://www.apache.org/licenses/LICENSE-2.0
1549
+ *
1550
+ * Unless required by applicable law or agreed to in writing, software
1551
+ * distributed under the License is distributed on an "AS IS" BASIS,
1552
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1553
+ * See the License for the specific language governing permissions and
1554
+ * limitations under the License.
1555
+ */class yc{constructor(){this.Tu=new ho(ss.comparator)}track(e){const t=e.doc.key,n=this.Tu.get(t);n?0!==e.type&&3===n.type?this.Tu=this.Tu.insert(t,e):3===e.type&&1!==n.type?this.Tu=this.Tu.insert(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.Tu=this.Tu.insert(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.Tu=this.Tu.insert(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.Tu=this.Tu.remove(t):1===e.type&&2===n.type?this.Tu=this.Tu.insert(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.Tu=this.Tu.insert(t,{type:2,doc:e.doc}):Oi():this.Tu=this.Tu.insert(t,e)}Eu(){const e=[];return this.Tu.inorderTraversal(((t,n)=>{e.push(n)})),e}}class vc{constructor(e,t,n,r,i,s,o,d,a){this.query=e,this.docs=t,this.oldDocs=n,this.docChanges=r,this.mutatedKeys=i,this.fromCache=s,this.syncStateChanged=o,this.excludesMetadataChanges=d,this.hasCachedResults=a}static fromInitialDocuments(e,t,n,r,i){const s=[];return t.forEach((e=>{s.push({type:0,doc:e})})),new vc(e,t,$c.emptySet(t),s,n,r,!0,!1,i)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&Oo(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e].type!==n[e].type||!t[e].doc.isEqual(n[e].doc))return!1;return!0}}
1556
+ /**
1557
+ * @license
1558
+ * Copyright 2017 Google LLC
1559
+ *
1560
+ * Licensed under the Apache License, Version 2.0 (the "License");
1561
+ * you may not use this file except in compliance with the License.
1562
+ * You may obtain a copy of the License at
1563
+ *
1564
+ * http://www.apache.org/licenses/LICENSE-2.0
1565
+ *
1566
+ * Unless required by applicable law or agreed to in writing, software
1567
+ * distributed under the License is distributed on an "AS IS" BASIS,
1568
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1569
+ * See the License for the specific language governing permissions and
1570
+ * limitations under the License.
1571
+ */class wc{constructor(){this.Au=void 0,this.listeners=[]}}class bc{constructor(){this.queries=new gd((e=>Mo(e)),Oo),this.onlineState="Unknown",this.Ru=new Set}}async function Cc(e,t){const n=Pi(e),r=t.query;let i=!1,s=n.queries.get(r);if(s||(i=!0,s=new wc),i)try{s.Au=await n.onListen(r)}catch(e){const n=gc(e,`Initialization of query '${Po(t.query)}' failed`);return void t.onError(n)}n.queries.set(r,s),s.listeners.push(t),t.bu(n.onlineState),s.Au&&t.Pu(s.Au)&&Sc(n)}async function Ec(e,t){const n=Pi(e),r=t.query;let i=!1;const s=n.queries.get(r);if(s){const e=s.listeners.indexOf(t);e>=0&&(s.listeners.splice(e,1),i=0===s.listeners.length)}if(i)return n.queries.delete(r),n.onUnlisten(r)}function Ic(e,t){const n=Pi(e);let r=!1;for(const e of t){const t=e.query,i=n.queries.get(t);if(i){for(const t of i.listeners)t.Pu(e)&&(r=!0);i.Au=e}}r&&Sc(n)}function Tc(e,t,n){const r=Pi(e),i=r.queries.get(t);if(i)for(const e of i.listeners)e.onError(n);r.queries.delete(t)}function Sc(e){e.Ru.forEach((e=>{e.next()}))}class _c{constructor(e,t,n){this.query=e,this.vu=t,this.Vu=!1,this.Su=null,this.onlineState="Unknown",this.options=n||{}}Pu(e){if(!this.options.includeMetadataChanges){const t=[];for(const n of e.docChanges)3!==n.type&&t.push(n);e=new vc(e.query,e.docs,e.oldDocs,t,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let t=!1;return this.Vu?this.Du(e)&&(this.vu.next(e),t=!0):this.Cu(e,this.onlineState)&&(this.xu(e),t=!0),this.Su=e,t}onError(e){this.vu.error(e)}bu(e){this.onlineState=e;let t=!1;return this.Su&&!this.Vu&&this.Cu(this.Su,e)&&(this.xu(this.Su),t=!0),t}Cu(e,t){if(!e.fromCache)return!0;const n="Offline"!==t;return(!this.options.Nu||!n)&&(!e.docs.isEmpty()||e.hasCachedResults||"Offline"===t)}Du(e){if(e.docChanges.length>0)return!0;const t=this.Su&&this.Su.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}xu(e){e=vc.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.Vu=!0,this.vu.next(e)}}
1572
+ /**
1573
+ * @license
1574
+ * Copyright 2017 Google LLC
1575
+ *
1576
+ * Licensed under the Apache License, Version 2.0 (the "License");
1577
+ * you may not use this file except in compliance with the License.
1578
+ * You may obtain a copy of the License at
1579
+ *
1580
+ * http://www.apache.org/licenses/LICENSE-2.0
1581
+ *
1582
+ * Unless required by applicable law or agreed to in writing, software
1583
+ * distributed under the License is distributed on an "AS IS" BASIS,
1584
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1585
+ * See the License for the specific language governing permissions and
1586
+ * limitations under the License.
1587
+ */class kc{constructor(e){this.key=e}}class Dc{constructor(e){this.key=e}}class Rc{constructor(e,t){this.query=e,this.qu=t,this.Uu=null,this.hasCachedResults=!1,this.current=!1,this.Ku=Sd(),this.mutatedKeys=Sd(),this.Gu=Fo(e),this.Qu=new $c(this.Gu)}get ju(){return this.qu}Wu(e,t){const n=t?t.zu:new yc,r=t?t.Qu:this.Qu;let i=t?t.mutatedKeys:this.mutatedKeys,s=r,o=!1;const d="F"===this.query.limitType&&r.size===this.query.limit?r.last():null,a="L"===this.query.limitType&&r.size===this.query.limit?r.first():null;if(e.inorderTraversal(((e,t)=>{const c=r.get(e),l=Uo(this.query,t)?t:null,u=!!c&&this.mutatedKeys.has(c.key),h=!!l&&(l.hasLocalMutations||this.mutatedKeys.has(l.key)&&l.hasCommittedMutations);let f=!1;c&&l?c.data.isEqual(l.data)?u!==h&&(n.track({type:3,doc:l}),f=!0):this.Hu(c,l)||(n.track({type:2,doc:l}),f=!0,(d&&this.Gu(l,d)>0||a&&this.Gu(l,a)<0)&&(o=!0)):!c&&l?(n.track({type:0,doc:l}),f=!0):c&&!l&&(n.track({type:1,doc:c}),f=!0,(d||a)&&(o=!0)),f&&(l?(s=s.add(l),i=h?i.add(e):i.delete(e)):(s=s.delete(e),i=i.delete(e)))})),null!==this.query.limit)for(;s.size>this.query.limit;){const e="F"===this.query.limitType?s.last():s.first();s=s.delete(e.key),i=i.delete(e.key),n.track({type:1,doc:e})}return{Qu:s,zu:n,$i:o,mutatedKeys:i}}Hu(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(e,t,n){const r=this.Qu;this.Qu=e.Qu,this.mutatedKeys=e.mutatedKeys;const i=e.zu.Eu();i.sort(((e,t)=>function(e,t){const n=e=>{switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return Oi()}};return n(e)-n(t)}
1588
+ /**
1589
+ * @license
1590
+ * Copyright 2020 Google LLC
1591
+ *
1592
+ * Licensed under the Apache License, Version 2.0 (the "License");
1593
+ * you may not use this file except in compliance with the License.
1594
+ * You may obtain a copy of the License at
1595
+ *
1596
+ * http://www.apache.org/licenses/LICENSE-2.0
1597
+ *
1598
+ * Unless required by applicable law or agreed to in writing, software
1599
+ * distributed under the License is distributed on an "AS IS" BASIS,
1600
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1601
+ * See the License for the specific language governing permissions and
1602
+ * limitations under the License.
1603
+ */(e.type,t.type)||this.Gu(e.doc,t.doc))),this.Ju(n);const s=t?this.Yu():[],o=0===this.Ku.size&&this.current?1:0,d=o!==this.Uu;return this.Uu=o,0!==i.length||d?{snapshot:new vc(this.query,e.Qu,r,i,e.mutatedKeys,0===o,d,!1,!!n&&n.resumeToken.approximateByteSize()>0),Xu:s}:{Xu:s}}bu(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({Qu:this.Qu,zu:new yc,mutatedKeys:this.mutatedKeys,$i:!1},!1)):{Xu:[]}}Zu(e){return!this.qu.has(e)&&!!this.Qu.has(e)&&!this.Qu.get(e).hasLocalMutations}Ju(e){e&&(e.addedDocuments.forEach((e=>this.qu=this.qu.add(e))),e.modifiedDocuments.forEach((e=>{})),e.removedDocuments.forEach((e=>this.qu=this.qu.delete(e))),this.current=e.current)}Yu(){if(!this.current)return[];const e=this.Ku;this.Ku=Sd(),this.Qu.forEach((e=>{this.Zu(e.key)&&(this.Ku=this.Ku.add(e.key))}));const t=[];return e.forEach((e=>{this.Ku.has(e)||t.push(new Dc(e))})),this.Ku.forEach((n=>{e.has(n)||t.push(new kc(n))})),t}tc(e){this.qu=e.Hi,this.Ku=Sd();const t=this.Wu(e.documents);return this.applyChanges(t,!0)}ec(){return vc.fromInitialDocuments(this.query,this.Qu,this.mutatedKeys,0===this.Uu,this.hasCachedResults)}}class Lc{constructor(e,t,n){this.query=e,this.targetId=t,this.view=n}}class xc{constructor(e){this.key=e,this.nc=!1}}class Oc{constructor(e,t,n,r,i,s){this.localStore=e,this.remoteStore=t,this.eventManager=n,this.sharedClientState=r,this.currentUser=i,this.maxConcurrentLimboResolutions=s,this.sc={},this.ic=new gd((e=>Mo(e)),Oo),this.rc=new Map,this.oc=new Set,this.uc=new ho(ss.comparator),this.cc=new Map,this.ac=new ba,this.hc={},this.lc=new Map,this.fc=ma.vn(),this.onlineState="Unknown",this.dc=void 0}get isPrimaryClient(){return!0===this.dc}}async function Mc(e,t){const n=function(e){const t=Pi(e);return t.remoteStore.remoteSyncer.applyRemoteEvent=Uc.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=Wc.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=Vc.bind(null,t),t.sc.Wo=Ic.bind(null,t.eventManager),t.sc.wc=Tc.bind(null,t.eventManager),t}(e);let r,i;const s=n.ic.get(t);if(s)r=s.targetId,n.sharedClientState.addLocalQueryTarget(r),i=s.view.ec();else{const e=await function(e,t){const n=Pi(e);return n.persistence.runTransaction("Allocate target","readwrite",(e=>{let r;return n.Cs.getTargetData(e,t).next((i=>i?(r=i,us.resolve(r)):n.Cs.allocateTargetId(e).next((i=>(r=new ha(t,i,0,e.currentSequenceNumber),n.Cs.addTargetData(e,r).next((()=>r)))))))})).then((e=>{const r=n.qi.get(e.targetId);return(null===r||e.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(n.qi=n.qi.insert(e.targetId,e),n.Ui.set(t,e.targetId)),e}))}(n.localStore,Ro(t));n.isPrimaryClient&&rc(n.remoteStore,e);const s=n.sharedClientState.addLocalQueryTarget(e.targetId);r=e.targetId,i=await async function(e,t,n,r,i){e._c=(t,n,r)=>async function(e,t,n,r){let i=t.view.Wu(n);i.$i&&(i=await Fa(e.localStore,t.query,!1).then((({documents:e})=>t.view.Wu(e,i))));const s=r&&r.targetChanges.get(t.targetId),o=t.view.applyChanges(i,e.isPrimaryClient,s);return jc(e,t.targetId,o.Xu),o.snapshot}(e,t,n,r);const s=await Fa(e.localStore,t,!0),o=new Rc(t,s.Hi),d=o.Wu(s.documents),a=Rd.createSynthesizedTargetChangeForCurrentChange(n,r&&"Offline"!==e.onlineState,i),c=o.applyChanges(d,e.isPrimaryClient,a);jc(e,n,c.Xu);const l=new Lc(t,n,o);return e.ic.set(t,l),e.rc.has(n)?e.rc.get(n).push(t):e.rc.set(n,[t]),c.snapshot}(n,t,r,"current"===s,e.resumeToken)}return i}async function Pc(e,t){const n=Pi(e),r=n.ic.get(t),i=n.rc.get(r.targetId);if(i.length>1)return n.rc.set(r.targetId,i.filter((e=>!Oo(e,t)))),void n.ic.delete(t);n.isPrimaryClient?(n.sharedClientState.removeLocalQueryTarget(r.targetId),n.sharedClientState.isActiveQueryTarget(r.targetId)||await Ua(n.localStore,r.targetId,!1).then((()=>{n.sharedClientState.clearQueryState(r.targetId),ic(n.remoteStore,r.targetId),Bc(n,r.targetId)})).catch(ls)):(Bc(n,r.targetId),await Ua(n.localStore,r.targetId,!0))}async function Uc(e,t){const n=Pi(e);try{const e=await Pa(n.localStore,t);t.targetChanges.forEach(((e,t)=>{const r=n.cc.get(t);r&&(Mi(e.addedDocuments.size+e.modifiedDocuments.size+e.removedDocuments.size<=1),e.addedDocuments.size>0?r.nc=!0:e.modifiedDocuments.size>0?Mi(r.nc):e.removedDocuments.size>0&&(Mi(r.nc),r.nc=!1))})),await Kc(n,e,t)}catch(e){await ls(e)}}function Fc(e,t,n){const r=Pi(e);if(r.isPrimaryClient&&0===n||!r.isPrimaryClient&&1===n){const e=[];r.ic.forEach(((n,r)=>{const i=r.view.bu(t);i.snapshot&&e.push(i.snapshot)})),function(e,t){const n=Pi(e);n.onlineState=t;let r=!1;n.queries.forEach(((e,n)=>{for(const e of n.listeners)e.bu(t)&&(r=!0)})),r&&Sc(n)}(r.eventManager,t),e.length&&r.sc.Wo(e),r.onlineState=t,r.isPrimaryClient&&r.sharedClientState.setOnlineState(t)}}async function Vc(e,t,n){const r=Pi(e);r.sharedClientState.updateQueryState(t,"rejected",n);const i=r.cc.get(t),s=i&&i.key;if(s){let e=new ho(ss.comparator);e=e.insert(s,$o.newNoDocument(s,es.min()));const n=Sd().add(s),i=new Dd(es.min(),new Map,new No(Ji),e,n);await Uc(r,i),r.uc=r.uc.remove(s),r.cc.delete(t),zc(r)}else await Ua(r.localStore,t,!1).then((()=>Bc(r,t,n))).catch(ls)}function Bc(e,t,n=null){e.sharedClientState.removeLocalQueryTarget(t);for(const r of e.rc.get(t))e.ic.delete(r),n&&e.sc.wc(r,n);e.rc.delete(t),e.isPrimaryClient&&e.ac.ls(t).forEach((t=>{e.ac.containsKey(t)||qc(e,t)}))}function qc(e,t){e.oc.delete(t.path.canonicalString());const n=e.uc.get(t);null!==n&&(ic(e.remoteStore,n),e.uc=e.uc.remove(t),e.cc.delete(n),zc(e))}function jc(e,t,n){for(const r of n)r instanceof kc?(e.ac.addReference(r.key,t),Gc(e,r)):r instanceof Dc?(Di("SyncEngine","Document no longer in limbo: "+r.key),e.ac.removeReference(r.key,t),e.ac.containsKey(r.key)||qc(e,r.key)):Oi()}function Gc(e,t){const n=t.key,r=n.path.canonicalString();e.uc.get(n)||e.oc.has(r)||(Di("SyncEngine","New document in limbo: "+n),e.oc.add(r),zc(e))}function zc(e){for(;e.oc.size>0&&e.uc.size<e.maxConcurrentLimboResolutions;){const t=e.oc.values().next().value;e.oc.delete(t);const n=new ss(ns.fromString(t)),r=e.fc.next();e.cc.set(r,new xc(n)),e.uc=e.uc.insert(n,r),rc(e.remoteStore,new ha(Ro(Io(n.path)),r,2,fs.at))}}async function Kc(e,t,n){const r=Pi(e),i=[],s=[],o=[];r.ic.isEmpty()||(r.ic.forEach(((e,d)=>{o.push(r._c(d,t,n).then((e=>{if((e||n)&&r.isPrimaryClient&&r.sharedClientState.updateQueryState(d.targetId,(null==e?void 0:e.fromCache)?"not-current":"current"),e){i.push(e);const t=Ra.Ci(d.targetId,e);s.push(t)}})))})),await Promise.all(o),r.sc.Wo(i),await async function(e,t){const n=Pi(e);try{await n.persistence.runTransaction("notifyLocalViewChanges","readwrite",(e=>us.forEach(t,(t=>us.forEach(t.Si,(r=>n.persistence.referenceDelegate.addReference(e,t.targetId,r))).next((()=>us.forEach(t.Di,(r=>n.persistence.referenceDelegate.removeReference(e,t.targetId,r)))))))))}catch(e){if(!hs(e))throw e;Di("LocalStore","Failed to update sequence numbers: "+e)}for(const e of t){const t=e.targetId;if(!e.fromCache){const e=n.qi.get(t),r=e.snapshotVersion,i=e.withLastLimboFreeSnapshotVersion(r);n.qi=n.qi.insert(t,i)}}}(r.localStore,s))}async function Hc(e,t){const n=Pi(e);if(!n.currentUser.isEqual(t)){Di("SyncEngine","User change. New user:",t.toKey());const e=await Oa(n.localStore,t);n.currentUser=t,function(e,t){e.lc.forEach((e=>{e.forEach((e=>{e.reject(new Fi(Ui.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))}))})),e.lc.clear()}(n),n.sharedClientState.handleUserChange(t,e.removedBatchIds,e.addedBatchIds),await Kc(n,e.ji)}}function Wc(e,t){const n=Pi(e),r=n.cc.get(t);if(r&&r.nc)return Sd().add(r.key);{let e=Sd();const r=n.rc.get(t);if(!r)return e;for(const t of r){const r=n.ic.get(t);e=e.unionWith(r.view.ju)}return e}}class Qc{constructor(){this.synchronizeTabs=!1}async initialize(e){this.yt=Wa(e.databaseInfo.databaseId),this.sharedClientState=this.gc(e),this.persistence=this.yc(e),await this.persistence.start(),this.localStore=this.Ic(e),this.gcScheduler=this.Tc(e,this.localStore),this.indexBackfillerScheduler=this.Ec(e,this.localStore)}Tc(e,t){return null}Ec(e,t){return null}Ic(e){return function(e,t,n,r){return new xa(e,t,n,r)}(this.persistence,new La,e.initialUser,this.yt)}yc(e){return new _a(Da.Bs,this.yt)}gc(e){return new Ba}async terminate(){this.gcScheduler&&this.gcScheduler.stop(),await this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class Yc{async initialize(e,t){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(t),this.remoteStore=this.createRemoteStore(t),this.eventManager=this.createEventManager(t),this.syncEngine=this.createSyncEngine(t,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=e=>Fc(this.syncEngine,e,1),this.remoteStore.remoteSyncer.handleCredentialChange=Hc.bind(null,this.syncEngine),await async function(e,t){const n=Pi(e);t?(n._u.delete(2),await tc(n)):t||(n._u.add(2),await nc(n),n.gu.set("Unknown"))}(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return new bc}createDatastore(e){const t=Wa(e.databaseInfo.databaseId),n=(r=e.databaseInfo,new Ka(r));var r;return function(e,t,n,r){return new Xa(e,t,n,r)}(e.authCredentials,e.appCheckCredentials,n,t)}createRemoteStore(e){return t=this.localStore,n=this.datastore,r=e.asyncQueue,i=e=>Fc(this.syncEngine,e,0),s=ja.C()?new ja:new qa,new ec(t,n,r,i,s);var t,n,r,i,s}createSyncEngine(e,t){return function(e,t,n,r,i,s,o){const d=new Oc(e,t,n,r,i,s);return o&&(d.dc=!0),d}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}terminate(){return async function(e){const t=Pi(e);Di("RemoteStore","RemoteStore shutting down."),t._u.add(5),await nc(t),t.mu.shutdown(),t.gu.set("Unknown")}(this.remoteStore)}}
1604
+ /**
1605
+ * @license
1606
+ * Copyright 2017 Google LLC
1607
+ *
1608
+ * Licensed under the Apache License, Version 2.0 (the "License");
1609
+ * you may not use this file except in compliance with the License.
1610
+ * You may obtain a copy of the License at
1611
+ *
1612
+ * http://www.apache.org/licenses/LICENSE-2.0
1613
+ *
1614
+ * Unless required by applicable law or agreed to in writing, software
1615
+ * distributed under the License is distributed on an "AS IS" BASIS,
1616
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1617
+ * See the License for the specific language governing permissions and
1618
+ * limitations under the License.
1619
+ */function Jc(e,t,n){if(!n)throw new Fi(Ui.INVALID_ARGUMENT,`Function ${e}() cannot be called with an empty ${t}.`)}function Xc(e){if(!ss.isDocumentKey(e))throw new Fi(Ui.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`)}function Zc(e){if(ss.isDocumentKey(e))throw new Fi(Ui.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${e} has ${e.length}.`)}function el(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=`${e.substring(0,20)}...`),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";{const t=function(e){return e.constructor?e.constructor.name:null}(e);return t?`a custom ${t} object`:"an object"}}return"function"==typeof e?"a function":Oi()}function tl(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new Fi(Ui.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=el(e);throw new Fi(Ui.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${n}`)}}return e}
1620
+ /**
1621
+ * @license
1622
+ * Copyright 2020 Google LLC
1623
+ *
1624
+ * Licensed under the Apache License, Version 2.0 (the "License");
1625
+ * you may not use this file except in compliance with the License.
1626
+ * You may obtain a copy of the License at
1627
+ *
1628
+ * http://www.apache.org/licenses/LICENSE-2.0
1629
+ *
1630
+ * Unless required by applicable law or agreed to in writing, software
1631
+ * distributed under the License is distributed on an "AS IS" BASIS,
1632
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1633
+ * See the License for the specific language governing permissions and
1634
+ * limitations under the License.
1635
+ */const nl=new Map;class rl{constructor(e){var t;if(void 0===e.host){if(void 0!==e.ssl)throw new Fi(Ui.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=null===(t=e.ssl)||void 0===t||t;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,void 0===e.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new Fi(Ui.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.useFetchStreams=!!e.useFetchStreams,function(e,t,n,r){if(!0===t&&!0===r)throw new Fi(Ui.INVALID_ARGUMENT,`${e} and ${n} cannot be used together.`)}("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling)}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}
1636
+ /**
1637
+ * @license
1638
+ * Copyright 2020 Google LLC
1639
+ *
1640
+ * Licensed under the Apache License, Version 2.0 (the "License");
1641
+ * you may not use this file except in compliance with the License.
1642
+ * You may obtain a copy of the License at
1643
+ *
1644
+ * http://www.apache.org/licenses/LICENSE-2.0
1645
+ *
1646
+ * Unless required by applicable law or agreed to in writing, software
1647
+ * distributed under the License is distributed on an "AS IS" BASIS,
1648
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1649
+ * See the License for the specific language governing permissions and
1650
+ * limitations under the License.
1651
+ */class il{constructor(e,t,n,r){this._authCredentials=e,this._appCheckCredentials=t,this._databaseId=n,this._app=r,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new rl({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new Fi(Ui.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return void 0!==this._terminateTask}_setSettings(e){if(this._settingsFrozen)throw new Fi(Ui.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new rl(e),void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new qi;switch(e.type){case"gapi":const t=e.client;return new Ki(t,e.sessionIndex||"0",e.iamToken||null,e.authTokenFactory||null);case"provider":return e.client;default:throw new Fi(Ui.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(e){const t=nl.get(e);t&&(Di("ComponentProvider","Removing Datastore"),nl.delete(e),t.terminate())}(this),Promise.resolve()}}function sl(e,t,r,i={}){var s;const o=(e=tl(e,il))._getSettings();if("firestore.googleapis.com"!==o.host&&o.host!==t&&Li("Host has been set in both settings() and useEmulator(), emulator host will be used"),e._setSettings(Object.assign(Object.assign({},o),{host:`${t}:${r}`,ssl:!1})),i.mockUserToken){let t,r;if("string"==typeof i.mockUserToken)t=i.mockUserToken,r=Ti.MOCK_USER;else{t=function(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const r=t||"demo-project",i=e.iat||0,s=e.sub||e.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},e);return[n(JSON.stringify({alg:"none",type:"JWT"})),n(JSON.stringify(o)),""].join(".")}
1652
+ /**
1653
+ * @license
1654
+ * Copyright 2017 Google LLC
1655
+ *
1656
+ * Licensed under the Apache License, Version 2.0 (the "License");
1657
+ * you may not use this file except in compliance with the License.
1658
+ * You may obtain a copy of the License at
1659
+ *
1660
+ * http://www.apache.org/licenses/LICENSE-2.0
1661
+ *
1662
+ * Unless required by applicable law or agreed to in writing, software
1663
+ * distributed under the License is distributed on an "AS IS" BASIS,
1664
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1665
+ * See the License for the specific language governing permissions and
1666
+ * limitations under the License.
1667
+ */(i.mockUserToken,null===(s=e._app)||void 0===s?void 0:s.options.projectId);const o=i.mockUserToken.sub||i.mockUserToken.user_id;if(!o)throw new Fi(Ui.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");r=new Ti(o)}e._authCredentials=new ji(new Bi(t,r))}}
1668
+ /**
1669
+ * @license
1670
+ * Copyright 2020 Google LLC
1671
+ *
1672
+ * Licensed under the Apache License, Version 2.0 (the "License");
1673
+ * you may not use this file except in compliance with the License.
1674
+ * You may obtain a copy of the License at
1675
+ *
1676
+ * http://www.apache.org/licenses/LICENSE-2.0
1677
+ *
1678
+ * Unless required by applicable law or agreed to in writing, software
1679
+ * distributed under the License is distributed on an "AS IS" BASIS,
1680
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1681
+ * See the License for the specific language governing permissions and
1682
+ * limitations under the License.
1683
+ */class ol{constructor(e,t,n){this.converter=t,this._key=n,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new al(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new ol(this.firestore,e,this._key)}}class dl{constructor(e,t,n){this.converter=t,this._query=n,this.type="query",this.firestore=e}withConverter(e){return new dl(this.firestore,e,this._query)}}class al extends dl{constructor(e,t,n){super(e,t,Io(n)),this._path=n,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new ol(this.firestore,null,new ss(e))}withConverter(e){return new al(this.firestore,e,this._path)}}function cl(e,t,...n){if(e=y(e),Jc("collection","path",t),e instanceof il){const r=ns.fromString(t,...n);return Zc(r),new al(e,null,r)}{if(!(e instanceof ol||e instanceof al))throw new Fi(Ui.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=e._path.child(ns.fromString(t,...n));return Zc(r),new al(e.firestore,null,r)}}
1684
+ /**
1685
+ * @license
1686
+ * Copyright 2020 Google LLC
1687
+ *
1688
+ * Licensed under the Apache License, Version 2.0 (the "License");
1689
+ * you may not use this file except in compliance with the License.
1690
+ * You may obtain a copy of the License at
1691
+ *
1692
+ * http://www.apache.org/licenses/LICENSE-2.0
1693
+ *
1694
+ * Unless required by applicable law or agreed to in writing, software
1695
+ * distributed under the License is distributed on an "AS IS" BASIS,
1696
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1697
+ * See the License for the specific language governing permissions and
1698
+ * limitations under the License.
1699
+ */
1700
+ /**
1701
+ * @license
1702
+ * Copyright 2017 Google LLC
1703
+ *
1704
+ * Licensed under the Apache License, Version 2.0 (the "License");
1705
+ * you may not use this file except in compliance with the License.
1706
+ * You may obtain a copy of the License at
1707
+ *
1708
+ * http://www.apache.org/licenses/LICENSE-2.0
1709
+ *
1710
+ * Unless required by applicable law or agreed to in writing, software
1711
+ * distributed under the License is distributed on an "AS IS" BASIS,
1712
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1713
+ * See the License for the specific language governing permissions and
1714
+ * limitations under the License.
1715
+ */
1716
+ class ll{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.Rc(this.observer.next,e)}error(e){this.observer.error?this.Rc(this.observer.error,e):Ri("Uncaught Error in snapshot listener:",e.toString())}bc(){this.muted=!0}Rc(e,t){this.muted||setTimeout((()=>{this.muted||e(t)}),0)}}
1717
+ /**
1718
+ * @license
1719
+ * Copyright 2017 Google LLC
1720
+ *
1721
+ * Licensed under the Apache License, Version 2.0 (the "License");
1722
+ * you may not use this file except in compliance with the License.
1723
+ * You may obtain a copy of the License at
1724
+ *
1725
+ * http://www.apache.org/licenses/LICENSE-2.0
1726
+ *
1727
+ * Unless required by applicable law or agreed to in writing, software
1728
+ * distributed under the License is distributed on an "AS IS" BASIS,
1729
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1730
+ * See the License for the specific language governing permissions and
1731
+ * limitations under the License.
1732
+ */class ul{constructor(e,t,n,r){this.authCredentials=e,this.appCheckCredentials=t,this.asyncQueue=n,this.databaseInfo=r,this.user=Ti.UNAUTHENTICATED,this.clientId=Yi.R(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(n,(async e=>{Di("FirestoreClient","Received user=",e.uid),await this.authCredentialListener(e),this.user=e})),this.appCheckCredentials.start(n,(e=>(Di("FirestoreClient","Received new app check token=",e),this.appCheckCredentialListener(e,this.user))))}async getConfiguration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new Fi(Ui.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();const e=new Vi;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted((async()=>{try{this.onlineComponents&&await this.onlineComponents.terminate(),this.offlineComponents&&await this.offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(t){const n=gc(t,"Failed to shutdown persistence");e.reject(n)}})),e.promise}}async function hl(e,t){e.asyncQueue.verifyOperationInProgress();const n=await async function(e){return e.offlineComponents||(Di("FirestoreClient","Using default OfflineComponentProvider"),await async function(e,t){e.asyncQueue.verifyOperationInProgress(),Di("FirestoreClient","Initializing OfflineComponentProvider");const n=await e.getConfiguration();await t.initialize(n);let r=n.initialUser;e.setCredentialChangeListener((async e=>{r.isEqual(e)||(await Oa(t.localStore,e),r=e)})),t.persistence.setDatabaseDeletedListener((()=>e.terminate())),e.offlineComponents=t}(e,new Qc)),e.offlineComponents}(e);Di("FirestoreClient","Initializing OnlineComponentProvider");const r=await e.getConfiguration();await t.initialize(n,r),e.setCredentialChangeListener((e=>Nc(t.remoteStore,e))),e.setAppCheckTokenChangeListener(((e,n)=>Nc(t.remoteStore,n))),e.onlineComponents=t}async function fl(e){const t=await async function(e){return e.onlineComponents||(Di("FirestoreClient","Using default OnlineComponentProvider"),await hl(e,new Yc)),e.onlineComponents}(e),n=t.eventManager;return n.onListen=Mc.bind(null,t.syncEngine),n.onUnlisten=Pc.bind(null,t.syncEngine),n}class Al{constructor(){this.Bc=Promise.resolve(),this.Lc=[],this.qc=!1,this.Uc=[],this.Kc=null,this.Gc=!1,this.Qc=!1,this.jc=[],this.xo=new Qa(this,"async_queue_retry"),this.Wc=()=>{const e=Ha();e&&Di("AsyncQueue","Visibility state changed to "+e.visibilityState),this.xo.Po()};const e=Ha();e&&"function"==typeof e.addEventListener&&e.addEventListener("visibilitychange",this.Wc)}get isShuttingDown(){return this.qc}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.zc(),this.Hc(e)}enterRestrictedMode(e){if(!this.qc){this.qc=!0,this.Qc=e||!1;const t=Ha();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.Wc)}}enqueue(e){if(this.zc(),this.qc)return new Promise((()=>{}));const t=new Vi;return this.Hc((()=>this.qc&&this.Qc?Promise.resolve():(e().then(t.resolve,t.reject),t.promise))).then((()=>t.promise))}enqueueRetryable(e){this.enqueueAndForget((()=>(this.Lc.push(e),this.Jc())))}async Jc(){if(0!==this.Lc.length){try{await this.Lc[0](),this.Lc.shift(),this.xo.reset()}catch(e){if(!hs(e))throw e;Di("AsyncQueue","Operation failed with retryable error: "+e)}this.Lc.length>0&&this.xo.Ro((()=>this.Jc()))}}Hc(e){const t=this.Bc.then((()=>(this.Gc=!0,e().catch((e=>{this.Kc=e,this.Gc=!1;const t=function(e){let t=e.message||"";return e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t}
1733
+ /**
1734
+ * @license
1735
+ * Copyright 2017 Google LLC
1736
+ *
1737
+ * Licensed under the Apache License, Version 2.0 (the "License");
1738
+ * you may not use this file except in compliance with the License.
1739
+ * You may obtain a copy of the License at
1740
+ *
1741
+ * http://www.apache.org/licenses/LICENSE-2.0
1742
+ *
1743
+ * Unless required by applicable law or agreed to in writing, software
1744
+ * distributed under the License is distributed on an "AS IS" BASIS,
1745
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1746
+ * See the License for the specific language governing permissions and
1747
+ * limitations under the License.
1748
+ */(e);throw Ri("INTERNAL UNHANDLED ERROR: ",t),e})).then((e=>(this.Gc=!1,e))))));return this.Bc=t,t}enqueueAfterDelay(e,t,n){this.zc(),this.jc.indexOf(e)>-1&&(t=0);const r=mc.createAndSchedule(this,e,t,n,(e=>this.Yc(e)));return this.Uc.push(r),r}zc(){this.Kc&&Oi()}verifyOperationInProgress(){}async Xc(){let e;do{e=this.Bc,await e}while(e!==this.Bc)}Zc(e){for(const t of this.Uc)if(t.timerId===e)return!0;return!1}ta(e){return this.Xc().then((()=>{this.Uc.sort(((e,t)=>e.targetTimeMs-t.targetTimeMs));for(const t of this.Uc)if(t.skipDelay(),"all"!==e&&t.timerId===e)break;return this.Xc()}))}ea(e){this.jc.push(e)}Yc(e){const t=this.Uc.indexOf(e);this.Uc.splice(t,1)}}function Nl(e){return function(e,t){if("object"!=typeof e||null===e)return!1;const n=e;for(const e of["next","error","complete"])if(e in n&&"function"==typeof n[e])return!0;return!1}
1749
+ /**
1750
+ * @license
1751
+ * Copyright 2020 Google LLC
1752
+ *
1753
+ * Licensed under the Apache License, Version 2.0 (the "License");
1754
+ * you may not use this file except in compliance with the License.
1755
+ * You may obtain a copy of the License at
1756
+ *
1757
+ * http://www.apache.org/licenses/LICENSE-2.0
1758
+ *
1759
+ * Unless required by applicable law or agreed to in writing, software
1760
+ * distributed under the License is distributed on an "AS IS" BASIS,
1761
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1762
+ * See the License for the specific language governing permissions and
1763
+ * limitations under the License.
1764
+ */(e)}class pl extends il{constructor(e,t,n,r){super(e,t,n,r),this.type="firestore",this._queue=new Al,this._persistenceKey=(null==r?void 0:r.name)||"[DEFAULT]"}_terminate(){return this._firestoreClient||$l(this),this._firestoreClient.terminate()}}function ml(e,t){const n="string"==typeof e?e:t||"(default)",r=re("object"==typeof e?e:ae(),"firestore").getImmediate({identifier:n});if(!r._initialized){const e=(e=>{const t=d(e);if(!t)return;const n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw new Error(`Invalid host ${t} with no separate hostname and port!`);const r=parseInt(t.substring(n+1),10);return"["===t[0]?[t.substring(1,n-1),r]:[t.substring(0,n),r]})("firestore");e&&sl(r,...e)}return r}function gl(e){return e._firestoreClient||$l(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function $l(e){var t;const n=e._freezeSettings(),r=function(e,t,n,r){return new As(e,t,n,r.host,r.ssl,r.experimentalForceLongPolling,r.experimentalAutoDetectLongPolling,r.useFetchStreams)}
1765
+ /**
1766
+ * @license
1767
+ * Copyright 2020 Google LLC
1768
+ *
1769
+ * Licensed under the Apache License, Version 2.0 (the "License");
1770
+ * you may not use this file except in compliance with the License.
1771
+ * You may obtain a copy of the License at
1772
+ *
1773
+ * http://www.apache.org/licenses/LICENSE-2.0
1774
+ *
1775
+ * Unless required by applicable law or agreed to in writing, software
1776
+ * distributed under the License is distributed on an "AS IS" BASIS,
1777
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1778
+ * See the License for the specific language governing permissions and
1779
+ * limitations under the License.
1780
+ */(e._databaseId,(null===(t=e._app)||void 0===t?void 0:t.options.appId)||"",e._persistenceKey,n);e._firestoreClient=new ul(e._authCredentials,e._appCheckCredentials,e._queue,r)}
1781
+ /**
1782
+ * @license
1783
+ * Copyright 2020 Google LLC
1784
+ *
1785
+ * Licensed under the Apache License, Version 2.0 (the "License");
1786
+ * you may not use this file except in compliance with the License.
1787
+ * You may obtain a copy of the License at
1788
+ *
1789
+ * http://www.apache.org/licenses/LICENSE-2.0
1790
+ *
1791
+ * Unless required by applicable law or agreed to in writing, software
1792
+ * distributed under the License is distributed on an "AS IS" BASIS,
1793
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1794
+ * See the License for the specific language governing permissions and
1795
+ * limitations under the License.
1796
+ */
1797
+ /**
1798
+ * @license
1799
+ * Copyright 2020 Google LLC
1800
+ *
1801
+ * Licensed under the Apache License, Version 2.0 (the "License");
1802
+ * you may not use this file except in compliance with the License.
1803
+ * You may obtain a copy of the License at
1804
+ *
1805
+ * http://www.apache.org/licenses/LICENSE-2.0
1806
+ *
1807
+ * Unless required by applicable law or agreed to in writing, software
1808
+ * distributed under the License is distributed on an "AS IS" BASIS,
1809
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1810
+ * See the License for the specific language governing permissions and
1811
+ * limitations under the License.
1812
+ */class yl{constructor(e){this._byteString=e}static fromBase64String(e){try{return new yl(vs.fromBase64String(e))}catch(e){throw new Fi(Ui.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}}static fromUint8Array(e){return new yl(vs.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}}
1813
+ /**
1814
+ * @license
1815
+ * Copyright 2020 Google LLC
1816
+ *
1817
+ * Licensed under the Apache License, Version 2.0 (the "License");
1818
+ * you may not use this file except in compliance with the License.
1819
+ * You may obtain a copy of the License at
1820
+ *
1821
+ * http://www.apache.org/licenses/LICENSE-2.0
1822
+ *
1823
+ * Unless required by applicable law or agreed to in writing, software
1824
+ * distributed under the License is distributed on an "AS IS" BASIS,
1825
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1826
+ * See the License for the specific language governing permissions and
1827
+ * limitations under the License.
1828
+ */class vl{constructor(...e){for(let t=0;t<e.length;++t)if(0===e[t].length)throw new Fi(Ui.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new is(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}
1829
+ /**
1830
+ * @license
1831
+ * Copyright 2020 Google LLC
1832
+ *
1833
+ * Licensed under the Apache License, Version 2.0 (the "License");
1834
+ * you may not use this file except in compliance with the License.
1835
+ * You may obtain a copy of the License at
1836
+ *
1837
+ * http://www.apache.org/licenses/LICENSE-2.0
1838
+ *
1839
+ * Unless required by applicable law or agreed to in writing, software
1840
+ * distributed under the License is distributed on an "AS IS" BASIS,
1841
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1842
+ * See the License for the specific language governing permissions and
1843
+ * limitations under the License.
1844
+ */
1845
+ class wl{constructor(e){this._methodName=e}}
1846
+ /**
1847
+ * @license
1848
+ * Copyright 2017 Google LLC
1849
+ *
1850
+ * Licensed under the Apache License, Version 2.0 (the "License");
1851
+ * you may not use this file except in compliance with the License.
1852
+ * You may obtain a copy of the License at
1853
+ *
1854
+ * http://www.apache.org/licenses/LICENSE-2.0
1855
+ *
1856
+ * Unless required by applicable law or agreed to in writing, software
1857
+ * distributed under the License is distributed on an "AS IS" BASIS,
1858
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1859
+ * See the License for the specific language governing permissions and
1860
+ * limitations under the License.
1861
+ */class bl{constructor(e,t){if(!isFinite(e)||e<-90||e>90)throw new Fi(Ui.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new Fi(Ui.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return Ji(this._lat,e._lat)||Ji(this._long,e._long)}}
1862
+ /**
1863
+ * @license
1864
+ * Copyright 2017 Google LLC
1865
+ *
1866
+ * Licensed under the Apache License, Version 2.0 (the "License");
1867
+ * you may not use this file except in compliance with the License.
1868
+ * You may obtain a copy of the License at
1869
+ *
1870
+ * http://www.apache.org/licenses/LICENSE-2.0
1871
+ *
1872
+ * Unless required by applicable law or agreed to in writing, software
1873
+ * distributed under the License is distributed on an "AS IS" BASIS,
1874
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1875
+ * See the License for the specific language governing permissions and
1876
+ * limitations under the License.
1877
+ */const Cl=/^__.*__$/;function El(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw Oi()}}class Il{constructor(e,t,n,r,i,s){this.settings=e,this.databaseId=t,this.yt=n,this.ignoreUndefinedProperties=r,void 0===i&&this.na(),this.fieldTransforms=i||[],this.fieldMask=s||[]}get path(){return this.settings.path}get sa(){return this.settings.sa}ia(e){return new Il(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.yt,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}ra(e){var t;const n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.ia({path:n,oa:!1});return r.ua(e),r}ca(e){var t;const n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.ia({path:n,oa:!1});return r.na(),r}aa(e){return this.ia({path:void 0,oa:!0})}ha(e){return Dl(e,this.settings.methodName,this.settings.la||!1,this.path,this.settings.fa)}contains(e){return void 0!==this.fieldMask.find((t=>e.isPrefixOf(t)))||void 0!==this.fieldTransforms.find((t=>e.isPrefixOf(t.field)))}na(){if(this.path)for(let e=0;e<this.path.length;e++)this.ua(this.path.get(e))}ua(e){if(0===e.length)throw this.ha("Document fields must not be empty");if(El(this.sa)&&Cl.test(e))throw this.ha('Document fields cannot begin and end with "__"')}}class Tl{constructor(e,t,n){this.databaseId=e,this.ignoreUndefinedProperties=t,this.yt=n||Wa(e)}da(e,t,n,r=!1){return new Il({sa:e,methodName:t,fa:n,path:is.emptyPath(),oa:!1,la:r},this.databaseId,this.yt,this.ignoreUndefinedProperties)}}function Sl(e,t){if(_l(e=y(e)))return function(e,t,n){if(!_l(n)||!function(e){return"object"==typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}(n)){const r=el(n);throw"an object"===r?t.ha(e+" a custom object"):t.ha(e+" "+r)}}("Unsupported field value:",t,e),function(e,t){const n={};return gs(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):ms(e,((e,r)=>{const i=Sl(r,t.ra(e));null!=i&&(n[e]=i)})),{mapValue:{fields:n}}}(e,t);if(e instanceof wl)return function(e,t){if(!El(t.sa))throw t.ha(`${e._methodName}() can only be used with update() and set()`);if(!t.path)throw t.ha(`${e._methodName}() is not currently supported inside arrays`);const n=e._toFieldTransform(t);n&&t.fieldTransforms.push(n)}(e,t),null;if(void 0===e&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),e instanceof Array){if(t.settings.oa&&4!==t.sa)throw t.ha("Nested arrays are not supported");return function(e,t){const n=[];let r=0;for(const i of e){let e=Sl(i,t.aa(r));null==e&&(e={nullValue:"NULL_VALUE"}),n.push(e),r++}return{arrayValue:{values:n}}}(e,t)}return function(e,t){if(null===(e=y(e)))return{nullValue:"NULL_VALUE"};if("number"==typeof e)return jo(t.yt,e);if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){const n=Zi.fromDate(e);return{timestampValue:Gd(t.yt,n)}}if(e instanceof Zi){const n=new Zi(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:Gd(t.yt,n)}}if(e instanceof bl)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof yl)return{bytesValue:zd(t.yt,e._byteString)};if(e instanceof ol){const n=t.databaseId,r=e.firestore._databaseId;if(!r.isEqual(n))throw t.ha(`Document reference is for database ${r.projectId}/${r.database} but should be for database ${n.projectId}/${n.database}`);return{referenceValue:Hd(e.firestore._databaseId||t.databaseId,e._key.path)}}throw t.ha(`Unsupported field value: ${el(e)}`)}(e,t)}function _l(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof Zi||e instanceof bl||e instanceof yl||e instanceof ol||e instanceof wl)}const kl=new RegExp("[~\\*/\\[\\]]");function Dl(e,t,n,r,i){const s=r&&!r.isEmpty(),o=void 0!==i;let d=`Function ${t}() called with invalid data`;n&&(d+=" (via `toFirestore()`)"),d+=". ";let a="";return(s||o)&&(a+=" (found",s&&(a+=` in field ${r}`),o&&(a+=` in document ${i}`),a+=")"),new Fi(Ui.INVALID_ARGUMENT,d+e+a)
1878
+ /**
1879
+ * @license
1880
+ * Copyright 2020 Google LLC
1881
+ *
1882
+ * Licensed under the Apache License, Version 2.0 (the "License");
1883
+ * you may not use this file except in compliance with the License.
1884
+ * You may obtain a copy of the License at
1885
+ *
1886
+ * http://www.apache.org/licenses/LICENSE-2.0
1887
+ *
1888
+ * Unless required by applicable law or agreed to in writing, software
1889
+ * distributed under the License is distributed on an "AS IS" BASIS,
1890
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1891
+ * See the License for the specific language governing permissions and
1892
+ * limitations under the License.
1893
+ */}class Rl{constructor(e,t,n,r,i){this._firestore=e,this._userDataWriter=t,this._key=n,this._document=r,this._converter=i}get id(){return this._key.path.lastSegment()}get ref(){return new ol(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){const e=new Ll(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){const t=this._document.data.field(xl("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}class Ll extends Rl{data(){return super.data()}}function xl(e,t){return"string"==typeof t?function(e,t,n){if(t.search(kl)>=0)throw Dl(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,e,!1,void 0,n);try{return new vl(...t.split("."))._internalPath}catch(r){throw Dl(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e,!1,void 0,n)}}(e,t):t instanceof vl?t._internalPath:t._delegate._internalPath}
1894
+ /**
1895
+ * @license
1896
+ * Copyright 2020 Google LLC
1897
+ *
1898
+ * Licensed under the Apache License, Version 2.0 (the "License");
1899
+ * you may not use this file except in compliance with the License.
1900
+ * You may obtain a copy of the License at
1901
+ *
1902
+ * http://www.apache.org/licenses/LICENSE-2.0
1903
+ *
1904
+ * Unless required by applicable law or agreed to in writing, software
1905
+ * distributed under the License is distributed on an "AS IS" BASIS,
1906
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1907
+ * See the License for the specific language governing permissions and
1908
+ * limitations under the License.
1909
+ */function Ol(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new Fi(Ui.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class Ml{}class Pl extends Ml{}function Ul(e,t,...n){let r=[];t instanceof Ml&&r.push(t),r=r.concat(n),function(e){const t=e.filter((e=>e instanceof Bl)).length,n=e.filter((e=>e instanceof Fl)).length;if(t>1||t>0&&n>0)throw new Fi(Ui.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}
1910
+ /**
1911
+ * @license
1912
+ * Copyright 2020 Google LLC
1913
+ *
1914
+ * Licensed under the Apache License, Version 2.0 (the "License");
1915
+ * you may not use this file except in compliance with the License.
1916
+ * You may obtain a copy of the License at
1917
+ *
1918
+ * http://www.apache.org/licenses/LICENSE-2.0
1919
+ *
1920
+ * Unless required by applicable law or agreed to in writing, software
1921
+ * distributed under the License is distributed on an "AS IS" BASIS,
1922
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1923
+ * See the License for the specific language governing permissions and
1924
+ * limitations under the License.
1925
+ */(r);for(const t of r)e=t._apply(e);return e}class Fl extends Pl{constructor(e,t,n){super(),this._field=e,this._op=t,this._value=n,this.type="where"}static _create(e,t,n){return new Fl(e,t,n)}_apply(e){const t=this._parse(e);return Gl(e._query,t),new dl(e.firestore,e.converter,Lo(e._query,t))}_parse(e){const t=function(e){const t=e._freezeSettings(),n=Wa(e._databaseId);return new Tl(e._databaseId,!!t.ignoreUndefinedProperties,n)}(e.firestore),n=function(e,t,n,r,i,s,o){let d;if(i.isKeyField()){if("array-contains"===s||"array-contains-any"===s)throw new Fi(Ui.INVALID_ARGUMENT,`Invalid Query. You can't perform '${s}' queries on documentId().`);if("in"===s||"not-in"===s){jl(o,s);const t=[];for(const n of o)t.push(ql(r,e,n));d={arrayValue:{values:t}}}else d=ql(r,e,o)}else"in"!==s&&"not-in"!==s&&"array-contains-any"!==s||jl(o,s),d=function(e,t,n,r=!1){return Sl(n,e.da(r?4:3,t))}(n,"where",o,"in"===s||"not-in"===s);return Ws.create(i,s,d)}(e._query,0,t,e.firestore._databaseId,this._field,this._op,this._value);return n}}function Vl(e,t,n){const r=t,i=xl("where",e);return Fl._create(i,r,n)}class Bl extends Ml{constructor(e,t){super(),this.type=e,this._queryConstraints=t}static _create(e,t){return new Bl(e,t)}_parse(e){const t=this._queryConstraints.map((t=>t._parse(e))).filter((e=>e.getFilters().length>0));return 1===t.length?t[0]:Qs.create(t,this._getOperator())}_apply(e){const t=this._parse(e);return 0===t.getFilters().length?e:(function(e,t){let n=e;const r=t.getFlattenedFilters();for(const e of r)Gl(n,e),n=Lo(n,e)}(e._query,t),new dl(e.firestore,e.converter,Lo(e._query,t)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return"and"===this.type?"and":"or"}}function ql(e,t,n){if("string"==typeof(n=y(n))){if(""===n)throw new Fi(Ui.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!ko(t)&&-1!==n.indexOf("/"))throw new Fi(Ui.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);const r=t.path.child(ns.fromString(n));if(!ss.isDocumentKey(r))throw new Fi(Ui.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);return Ps(e,new ss(r))}if(n instanceof ol)return Ps(e,n._key);throw new Fi(Ui.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${el(n)}.`)}function jl(e,t){if(!Array.isArray(e)||0===e.length)throw new Fi(Ui.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${t.toString()}' filters.`);if(e.length>10)throw new Fi(Ui.INVALID_ARGUMENT,`Invalid Query. '${t.toString()}' filters support a maximum of 10 elements in the value array.`)}function Gl(e,t){if(t.isInequality()){const n=_o(e),r=t.field;if(null!==n&&!n.isEqual(r))throw new Fi(Ui.INVALID_ARGUMENT,`Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '${n.toString()}' and '${r.toString()}'`);const i=So(e);null!==i&&function(e,t,n){if(!n.isEqual(t))throw new Fi(Ui.INVALID_ARGUMENT,`Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '${t.toString()}' and so you must also use '${t.toString()}' as your first argument to orderBy(), but your first orderBy() is on field '${n.toString()}' instead.`)}(0,r,i)}const n=function(e,t){for(const n of e)for(const e of n.getFlattenedFilters())if(t.indexOf(e.op)>=0)return e.op;return null}(e.filters,function(e){switch(e){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","not-in"];case"in":return["array-contains-any","in","not-in"];case"array-contains-any":return["array-contains","array-contains-any","in","not-in"];case"not-in":return["array-contains","array-contains-any","in","not-in","!="];default:return[]}}(t.op));if(null!==n)throw n===t.op?new Fi(Ui.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${t.op.toString()}' filter.`):new Fi(Ui.INVALID_ARGUMENT,`Invalid query. You cannot use '${t.op.toString()}' filters with '${n.toString()}' filters.`)}class zl{convertValue(e,t="none"){switch(ks(e)){case 0:return null;case 1:return e.booleanValue;case 2:return Cs(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(Es(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 10:return this.convertObject(e.mapValue,t);default:throw Oi()}}convertObject(e,t){const n={};return ms(e.fields,((e,r)=>{n[e]=this.convertValue(r,t)})),n}convertGeoPoint(e){return new bl(Cs(e.latitude),Cs(e.longitude))}convertArray(e,t){return(e.values||[]).map((e=>this.convertValue(e,t)))}convertServerTimestamp(e,t){switch(t){case"previous":const n=Ts(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(Ss(e));default:return null}}convertTimestamp(e){const t=bs(e);return new Zi(t.seconds,t.nanos)}convertDocumentKey(e,t){const n=ns.fromString(e);Mi(ca(n));const r=new Ns(n.get(1),n.get(3)),i=new ss(n.popFirst(5));return r.isEqual(t)||Ri(`Document ${i} contains a document reference within a different database (${r.projectId}/${r.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),i}}
1926
+ /**
1927
+ * @license
1928
+ * Copyright 2020 Google LLC
1929
+ *
1930
+ * Licensed under the Apache License, Version 2.0 (the "License");
1931
+ * you may not use this file except in compliance with the License.
1932
+ * You may obtain a copy of the License at
1933
+ *
1934
+ * http://www.apache.org/licenses/LICENSE-2.0
1935
+ *
1936
+ * Unless required by applicable law or agreed to in writing, software
1937
+ * distributed under the License is distributed on an "AS IS" BASIS,
1938
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1939
+ * See the License for the specific language governing permissions and
1940
+ * limitations under the License.
1941
+ */class Kl{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class Hl extends Rl{constructor(e,t,n,r,i,s){super(e,t,n,r,s),this._firestore=e,this._firestoreImpl=e,this.metadata=i}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const t=new Wl(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,t={}){if(this._document){const n=this._document.data.field(xl("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}}class Wl extends Hl{data(e={}){return super.data(e)}}class Ql{constructor(e,t,n,r){this._firestore=e,this._userDataWriter=t,this._snapshot=r,this.metadata=new Kl(r.hasPendingWrites,r.fromCache),this.query=n}get docs(){const e=[];return this.forEach((t=>e.push(t))),e}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(e,t){this._snapshot.docs.forEach((n=>{e.call(t,new Wl(this._firestore,this._userDataWriter,n.key,n,new Kl(this._snapshot.mutatedKeys.has(n.key),this._snapshot.fromCache),this.query.converter))}))}docChanges(e={}){const t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new Fi(Ui.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){let t=0;return e._snapshot.docChanges.map((n=>{const r=new Wl(e._firestore,e._userDataWriter,n.doc.key,n.doc,new Kl(e._snapshot.mutatedKeys.has(n.doc.key),e._snapshot.fromCache),e.query.converter);return n.doc,{type:"added",doc:r,oldIndex:-1,newIndex:t++}}))}{let n=e._snapshot.oldDocs;return e._snapshot.docChanges.filter((e=>t||3!==e.type)).map((t=>{const r=new Wl(e._firestore,e._userDataWriter,t.doc.key,t.doc,new Kl(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter);let i=-1,s=-1;return 0!==t.type&&(i=n.indexOf(t.doc.key),n=n.delete(t.doc.key)),1!==t.type&&(n=n.add(t.doc),s=n.indexOf(t.doc.key)),{type:Yl(t.type),doc:r,oldIndex:i,newIndex:s}}))}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}function Yl(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return Oi()}}
1942
+ /**
1943
+ * @license
1944
+ * Copyright 2020 Google LLC
1945
+ *
1946
+ * Licensed under the Apache License, Version 2.0 (the "License");
1947
+ * you may not use this file except in compliance with the License.
1948
+ * You may obtain a copy of the License at
1949
+ *
1950
+ * http://www.apache.org/licenses/LICENSE-2.0
1951
+ *
1952
+ * Unless required by applicable law or agreed to in writing, software
1953
+ * distributed under the License is distributed on an "AS IS" BASIS,
1954
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1955
+ * See the License for the specific language governing permissions and
1956
+ * limitations under the License.
1957
+ */function Jl(e){e=tl(e,ol);const t=tl(e.firestore,pl);return function(e,t,n={}){const r=new Vi;return e.asyncQueue.enqueueAndForget((async()=>function(e,t,n,r,i){const s=new ll({next:s=>{t.enqueueAndForget((()=>Ec(e,o)));const d=s.docs.has(n);!d&&s.fromCache?i.reject(new Fi(Ui.UNAVAILABLE,"Failed to get document because the client is offline.")):d&&s.fromCache&&r&&"server"===r.source?i.reject(new Fi(Ui.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):i.resolve(s)},error:e=>i.reject(e)}),o=new _c(Io(n.path),s,{includeMetadataChanges:!0,Nu:!0});return Cc(e,o)}(await fl(e),e.asyncQueue,t,n,r))),r.promise}(gl(t),e._key).then((n=>eu(t,e,n)))}class Xl extends zl{constructor(e){super(),this.firestore=e}convertBytes(e){return new yl(e)}convertReference(e){const t=this.convertDocumentKey(e,this.firestore._databaseId);return new ol(this.firestore,null,t)}}function Zl(e){e=tl(e,dl);const t=tl(e.firestore,pl),n=gl(t),r=new Xl(t);return Ol(e._query),function(e,t,n={}){const r=new Vi;return e.asyncQueue.enqueueAndForget((async()=>function(e,t,n,r,i){const s=new ll({next:n=>{t.enqueueAndForget((()=>Ec(e,o))),n.fromCache&&"server"===r.source?i.reject(new Fi(Ui.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):i.resolve(n)},error:e=>i.reject(e)}),o=new _c(n,s,{includeMetadataChanges:!0,Nu:!0});return Cc(e,o)}(await fl(e),e.asyncQueue,t,n,r))),r.promise}(n,e._query).then((n=>new Ql(t,r,e,n)))}function eu(e,t,n){const r=n.docs.get(t._key),i=new Xl(e);return new Hl(e,i,t._key,r,new Kl(n.hasPendingWrites,n.fromCache),t.converter)}!function(e,t=!0){Si=oe,ne(new v("firestore",((e,{instanceIdentifier:n,options:r})=>{const i=e.getProvider("app").getImmediate(),s=new pl(new Gi(e.getProvider("auth-internal")),new Wi(e.getProvider("app-check-internal")),function(e,t){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new Fi(Ui.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Ns(e.options.projectId,t)}(i,n),i);return r=Object.assign({useFetchStreams:t},r),s._setSettings(r),s}),"PUBLIC").setMultipleInstances(!0)),ce(Ii,"3.8.0",e),ce(Ii,"3.8.0","esm2017")}();
1958
+ /**
1959
+ * @license
1960
+ * Copyright 2020 Google LLC
1961
+ *
1962
+ * Licensed under the Apache License, Version 2.0 (the "License");
1963
+ * you may not use this file except in compliance with the License.
1964
+ * You may obtain a copy of the License at
1965
+ *
1966
+ * http://www.apache.org/licenses/LICENSE-2.0
1967
+ *
1968
+ * Unless required by applicable law or agreed to in writing, software
1969
+ * distributed under the License is distributed on an "AS IS" BASIS,
1970
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1971
+ * See the License for the specific language governing permissions and
1972
+ * limitations under the License.
1973
+ */
1974
+ ce("firebase","9.15.0","app");class tu{constructor(){}static getInstance(){return tu.instance||(tu.instance=new tu),tu.instance}setEnv(e){switch(e){case"production":case"prod":this.env="prod";break;default:this.env="dev"}}get firebase(){return"prod"===this.env?ru.firebase:nu.firebase}get api(){return"prod"===this.env?ru.api:nu.api}get config(){return"prod"===this.env?ru.config:nu.config}}const nu={firebase:{apiKey:"AIzaSyDfjBWzpmzb-mhGN8VSURxzLg6nkzmKUD8",authDomain:"fittingroom-dev-5d248.firebaseapp.com",projectId:"fittingroom-dev-5d248",storageBucket:"fittingroom-dev-5d248.appspot.com",messagingSenderId:"2298664147",appId:"1:2298664147:web:340bda75cd5d25f3997026"},api:{url:"https://tfr.dev.thefittingroom.xyz"},config:{avatarTimeout:"120000",vtoTimeout:"120000"}},ru={firebase:{apiKey:"AIzaSyA3kQ6w1vkA9l9lgY0nNACVPXe-QmP5T1Y",authDomain:"fittingroom-prod.firebaseapp.com",projectId:"fittingroom-prod",storageBucket:"fittingroom-prod.appspot.com",messagingSenderId:"965656825574",appId:"1:965656825574:web:933493cddc73213bd43527"},api:{url:"https://tfr.p.thefittingroom.xyz"},config:{avatarTimeout:"120000",vtoTimeout:"120000"}};function iu(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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function su(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}const ou=su,du=new u("auth","Firebase",{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}),au="auth/user-disabled",cu=new k("@firebase/auth");function lu(e,...t){cu.logLevel<=E.ERROR&&cu.error(`Auth (${oe}): ${e}`,...t)}
1975
+ /**
1976
+ * @license
1977
+ * Copyright 2020 Google LLC
1978
+ *
1979
+ * Licensed under the Apache License, Version 2.0 (the "License");
1980
+ * you may not use this file except in compliance with the License.
1981
+ * You may obtain a copy of the License at
1982
+ *
1983
+ * http://www.apache.org/licenses/LICENSE-2.0
1984
+ *
1985
+ * Unless required by applicable law or agreed to in writing, software
1986
+ * distributed under the License is distributed on an "AS IS" BASIS,
1987
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1988
+ * See the License for the specific language governing permissions and
1989
+ * limitations under the License.
1990
+ */function uu(e,...t){throw fu(e,...t)}function hu(e,...t){return fu(e,...t)}function fu(e,...t){if("string"!=typeof e){const n=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(n,...r)}return du.create(e,...t)}function Au(e,t,...n){if(!e)throw fu(t,...n)}function Nu(e){const t="INTERNAL ASSERTION FAILED: "+e;throw lu(t),new Error(t)}function pu(e,t){e||Nu(t)}
1991
+ /**
1992
+ * @license
1993
+ * Copyright 2020 Google LLC
1994
+ *
1995
+ * Licensed under the Apache License, Version 2.0 (the "License");
1996
+ * you may not use this file except in compliance with the License.
1997
+ * You may obtain a copy of the License at
1998
+ *
1999
+ * http://www.apache.org/licenses/LICENSE-2.0
2000
+ *
2001
+ * Unless required by applicable law or agreed to in writing, software
2002
+ * distributed under the License is distributed on an "AS IS" BASIS,
2003
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2004
+ * See the License for the specific language governing permissions and
2005
+ * limitations under the License.
2006
+ */const mu=new Map;function gu(e){pu(e instanceof Function,"Expected a class definition");let t=mu.get(e);return t?(pu(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,mu.set(e,t),t)}
2007
+ /**
2008
+ * @license
2009
+ * Copyright 2020 Google LLC
2010
+ *
2011
+ * Licensed under the Apache License, Version 2.0 (the "License");
2012
+ * you may not use this file except in compliance with the License.
2013
+ * You may obtain a copy of the License at
2014
+ *
2015
+ * http://www.apache.org/licenses/LICENSE-2.0
2016
+ *
2017
+ * Unless required by applicable law or agreed to in writing, software
2018
+ * distributed under the License is distributed on an "AS IS" BASIS,
2019
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2020
+ * See the License for the specific language governing permissions and
2021
+ * limitations under the License.
2022
+ */
2023
+ /**
2024
+ * @license
2025
+ * Copyright 2020 Google LLC
2026
+ *
2027
+ * Licensed under the Apache License, Version 2.0 (the "License");
2028
+ * you may not use this file except in compliance with the License.
2029
+ * You may obtain a copy of the License at
2030
+ *
2031
+ * http://www.apache.org/licenses/LICENSE-2.0
2032
+ *
2033
+ * Unless required by applicable law or agreed to in writing, software
2034
+ * distributed under the License is distributed on an "AS IS" BASIS,
2035
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2036
+ * See the License for the specific language governing permissions and
2037
+ * limitations under the License.
2038
+ */
2039
+ function $u(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function yu(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}
2040
+ /**
2041
+ * @license
2042
+ * Copyright 2020 Google LLC
2043
+ *
2044
+ * Licensed under the Apache License, Version 2.0 (the "License");
2045
+ * you may not use this file except in compliance with the License.
2046
+ * You may obtain a copy of the License at
2047
+ *
2048
+ * http://www.apache.org/licenses/LICENSE-2.0
2049
+ *
2050
+ * Unless required by applicable law or agreed to in writing, software
2051
+ * distributed under the License is distributed on an "AS IS" BASIS,
2052
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2053
+ * See the License for the specific language governing permissions and
2054
+ * limitations under the License.
2055
+ */function vu(){return"undefined"==typeof navigator||!navigator||!("onLine"in navigator)||"boolean"!=typeof navigator.onLine||"http:"!==yu()&&"https:"!==yu()&&!function(){const e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}()&&!("connection"in navigator)||navigator.onLine}
2056
+ /**
2057
+ * @license
2058
+ * Copyright 2020 Google LLC
2059
+ *
2060
+ * Licensed under the Apache License, Version 2.0 (the "License");
2061
+ * you may not use this file except in compliance with the License.
2062
+ * You may obtain a copy of the License at
2063
+ *
2064
+ * http://www.apache.org/licenses/LICENSE-2.0
2065
+ *
2066
+ * Unless required by applicable law or agreed to in writing, software
2067
+ * distributed under the License is distributed on an "AS IS" BASIS,
2068
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2069
+ * See the License for the specific language governing permissions and
2070
+ * limitations under the License.
2071
+ */
2072
+ class wu{constructor(e,t){this.shortDelay=e,this.longDelay=t,pu(t>e,"Short delay should be less than long delay!"),this.isMobile="undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(i())||"object"==typeof navigator&&"ReactNative"===navigator.product}get(){return vu()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}
2073
+ /**
2074
+ * @license
2075
+ * Copyright 2020 Google LLC
2076
+ *
2077
+ * Licensed under the Apache License, Version 2.0 (the "License");
2078
+ * you may not use this file except in compliance with the License.
2079
+ * You may obtain a copy of the License at
2080
+ *
2081
+ * http://www.apache.org/licenses/LICENSE-2.0
2082
+ *
2083
+ * Unless required by applicable law or agreed to in writing, software
2084
+ * distributed under the License is distributed on an "AS IS" BASIS,
2085
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2086
+ * See the License for the specific language governing permissions and
2087
+ * limitations under the License.
2088
+ */function bu(e,t){pu(e.emulator,"Emulator should always be set here");const{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}
2089
+ /**
2090
+ * @license
2091
+ * Copyright 2020 Google LLC
2092
+ *
2093
+ * Licensed under the Apache License, Version 2.0 (the "License");
2094
+ * you may not use this file except in compliance with the License.
2095
+ * You may obtain a copy of the License at
2096
+ *
2097
+ * http://www.apache.org/licenses/LICENSE-2.0
2098
+ *
2099
+ * Unless required by applicable law or agreed to in writing, software
2100
+ * distributed under the License is distributed on an "AS IS" BASIS,
2101
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2102
+ * See the License for the specific language governing permissions and
2103
+ * limitations under the License.
2104
+ */class Cu{static initialize(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}static fetch(){return this.fetchImpl?this.fetchImpl:"undefined"!=typeof self&&"fetch"in self?self.fetch:void Nu("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"undefined"!=typeof self&&"Headers"in self?self.Headers:void Nu("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"undefined"!=typeof self&&"Response"in self?self.Response:void Nu("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}
2105
+ /**
2106
+ * @license
2107
+ * Copyright 2020 Google LLC
2108
+ *
2109
+ * Licensed under the Apache License, Version 2.0 (the "License");
2110
+ * you may not use this file except in compliance with the License.
2111
+ * You may obtain a copy of the License at
2112
+ *
2113
+ * http://www.apache.org/licenses/LICENSE-2.0
2114
+ *
2115
+ * Unless required by applicable law or agreed to in writing, software
2116
+ * distributed under the License is distributed on an "AS IS" BASIS,
2117
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2118
+ * See the License for the specific language governing permissions and
2119
+ * limitations under the License.
2120
+ */const Eu={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error"},Iu=new wu(3e4,6e4);
2121
+ /**
2122
+ * @license
2123
+ * Copyright 2020 Google LLC
2124
+ *
2125
+ * Licensed under the Apache License, Version 2.0 (the "License");
2126
+ * you may not use this file except in compliance with the License.
2127
+ * You may obtain a copy of the License at
2128
+ *
2129
+ * http://www.apache.org/licenses/LICENSE-2.0
2130
+ *
2131
+ * Unless required by applicable law or agreed to in writing, software
2132
+ * distributed under the License is distributed on an "AS IS" BASIS,
2133
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2134
+ * See the License for the specific language governing permissions and
2135
+ * limitations under the License.
2136
+ */function Tu(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function Su(e,t,n,r,i={}){return _u(e,i,(async()=>{let i={},s={};r&&("GET"===t?s=r:i={body:JSON.stringify(r)});const o=N(Object.assign({key:e.config.apiKey},s)).slice(1),d=await e._getAdditionalHeaders();return d["Content-Type"]="application/json",e.languageCode&&(d["X-Firebase-Locale"]=e.languageCode),Cu.fetch()(Du(e,e.config.apiHost,n,o),Object.assign({method:t,headers:d,referrerPolicy:"no-referrer"},i))}))}async function _u(e,t,n){e._canInitEmulator=!1;const r=Object.assign(Object.assign({},Eu),t);try{const t=new Ru(e),i=await Promise.race([n(),t.promise]);t.clearNetworkTimeout();const s=await i.json();if("needConfirmation"in s)throw Lu(e,"account-exists-with-different-credential",s);if(i.ok&&!("errorMessage"in s))return s;{const t=i.ok?s.errorMessage:s.error.message,[n,o]=t.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===n)throw Lu(e,"credential-already-in-use",s);if("EMAIL_EXISTS"===n)throw Lu(e,"email-already-in-use",s);if("USER_DISABLED"===n)throw Lu(e,"user-disabled",s);const d=r[n]||n.toLowerCase().replace(/[_\s]+/g,"-");if(o)throw function(e,t,n){const r=Object.assign(Object.assign({},ou()),{[t]:n});return new u("auth","Firebase",r).create(t,{appName:e.name})}(e,d,o);uu(e,d)}}catch(t){if(t instanceof l)throw t;uu(e,"network-request-failed")}}async function ku(e,t,n,r,i={}){const s=await Su(e,t,n,r,i);return"mfaPendingCredential"in s&&uu(e,"multi-factor-auth-required",{_serverResponse:s}),s}function Du(e,t,n,r){const i=`${t}${n}?${r}`;return e.config.emulator?bu(e.config,i):`${e.config.apiScheme}://${i}`}class Ru{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise(((e,t)=>{this.timer=setTimeout((()=>t(hu(this.auth,"network-request-failed"))),Iu.get())}))}clearNetworkTimeout(){clearTimeout(this.timer)}}function Lu(e,t,n){const r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=hu(e,t,r);return i.customData._tokenResponse=n,i}
2137
+ /**
2138
+ * @license
2139
+ * Copyright 2020 Google LLC
2140
+ *
2141
+ * Licensed under the Apache License, Version 2.0 (the "License");
2142
+ * you may not use this file except in compliance with the License.
2143
+ * You may obtain a copy of the License at
2144
+ *
2145
+ * http://www.apache.org/licenses/LICENSE-2.0
2146
+ *
2147
+ * Unless required by applicable law or agreed to in writing, software
2148
+ * distributed under the License is distributed on an "AS IS" BASIS,
2149
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2150
+ * See the License for the specific language governing permissions and
2151
+ * limitations under the License.
2152
+ */
2153
+ /**
2154
+ * @license
2155
+ * Copyright 2020 Google LLC
2156
+ *
2157
+ * Licensed under the Apache License, Version 2.0 (the "License");
2158
+ * you may not use this file except in compliance with the License.
2159
+ * You may obtain a copy of the License at
2160
+ *
2161
+ * http://www.apache.org/licenses/LICENSE-2.0
2162
+ *
2163
+ * Unless required by applicable law or agreed to in writing, software
2164
+ * distributed under the License is distributed on an "AS IS" BASIS,
2165
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2166
+ * See the License for the specific language governing permissions and
2167
+ * limitations under the License.
2168
+ */
2169
+ function xu(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(e){}}function Ou(e){return 1e3*Number(e)}function Mu(e){const[t,n,i]=e.split(".");if(void 0===t||void 0===n||void 0===i)return lu("JWT malformed, contained fewer than 3 sections"),null;try{const e=r(n);return e?JSON.parse(e):(lu("Failed to decode base64 JWT payload"),null)}catch(e){return lu("Caught error parsing JWT payload as JSON",null==e?void 0:e.toString()),null}}
2170
+ /**
2171
+ * @license
2172
+ * Copyright 2020 Google LLC
2173
+ *
2174
+ * Licensed under the Apache License, Version 2.0 (the "License");
2175
+ * you may not use this file except in compliance with the License.
2176
+ * You may obtain a copy of the License at
2177
+ *
2178
+ * http://www.apache.org/licenses/LICENSE-2.0
2179
+ *
2180
+ * Unless required by applicable law or agreed to in writing, software
2181
+ * distributed under the License is distributed on an "AS IS" BASIS,
2182
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2183
+ * See the License for the specific language governing permissions and
2184
+ * limitations under the License.
2185
+ */
2186
+ async function Pu(e,t,n=!1){if(n)return t;try{return await t}catch(t){throw t instanceof l&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}
2187
+ /**
2188
+ * @license
2189
+ * Copyright 2020 Google LLC
2190
+ *
2191
+ * Licensed under the Apache License, Version 2.0 (the "License");
2192
+ * you may not use this file except in compliance with the License.
2193
+ * You may obtain a copy of the License at
2194
+ *
2195
+ * http://www.apache.org/licenses/LICENSE-2.0
2196
+ *
2197
+ * Unless required by applicable law or agreed to in writing, software
2198
+ * distributed under the License is distributed on an "AS IS" BASIS,
2199
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2200
+ * See the License for the specific language governing permissions and
2201
+ * limitations under the License.
2202
+ */(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}class Uu{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(e){const e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}{this.errorBackoff=3e4;const e=(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5;return Math.max(0,e)}}schedule(e=!1){if(!this.isRunning)return;const t=this.getInterval(e);this.timerId=setTimeout((async()=>{await this.iteration()}),t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){return void("auth/network-request-failed"===(null==e?void 0:e.code)&&this.schedule(!0))}this.schedule()}}
2203
+ /**
2204
+ * @license
2205
+ * Copyright 2020 Google LLC
2206
+ *
2207
+ * Licensed under the Apache License, Version 2.0 (the "License");
2208
+ * you may not use this file except in compliance with the License.
2209
+ * You may obtain a copy of the License at
2210
+ *
2211
+ * http://www.apache.org/licenses/LICENSE-2.0
2212
+ *
2213
+ * Unless required by applicable law or agreed to in writing, software
2214
+ * distributed under the License is distributed on an "AS IS" BASIS,
2215
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2216
+ * See the License for the specific language governing permissions and
2217
+ * limitations under the License.
2218
+ */class Fu{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=xu(this.lastLoginAt),this.creationTime=xu(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}
2219
+ /**
2220
+ * @license
2221
+ * Copyright 2019 Google LLC
2222
+ *
2223
+ * Licensed under the Apache License, Version 2.0 (the "License");
2224
+ * you may not use this file except in compliance with the License.
2225
+ * You may obtain a copy of the License at
2226
+ *
2227
+ * http://www.apache.org/licenses/LICENSE-2.0
2228
+ *
2229
+ * Unless required by applicable law or agreed to in writing, software
2230
+ * distributed under the License is distributed on an "AS IS" BASIS,
2231
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2232
+ * See the License for the specific language governing permissions and
2233
+ * limitations under the License.
2234
+ */async function Vu(e){var t;const n=e.auth,r=await e.getIdToken(),i=await Pu(e,async function(e,t){return Su(e,"POST","/v1/accounts:lookup",t)}(n,{idToken:r}));Au(null==i?void 0:i.users.length,n,"internal-error");const s=i.users[0];e._notifyReloadListener(s);const o=(null===(t=s.providerUserInfo)||void 0===t?void 0:t.length)?s.providerUserInfo.map((e=>{var{providerId:t}=e,n=iu(e,["providerId"]);return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}})):[];const d=function(e,t){const n=e.filter((e=>!t.some((t=>t.providerId===e.providerId))));return[...n,...t]}(e.providerData,o),a=e.isAnonymous,c=!(e.email&&s.passwordHash||(null==d?void 0:d.length)),l=!!a&&c,u={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:d,metadata:new Fu(s.createdAt,s.lastLoginAt),isAnonymous:l};Object.assign(e,u)}
2235
+ /**
2236
+ * @license
2237
+ * Copyright 2020 Google LLC
2238
+ *
2239
+ * Licensed under the Apache License, Version 2.0 (the "License");
2240
+ * you may not use this file except in compliance with the License.
2241
+ * You may obtain a copy of the License at
2242
+ *
2243
+ * http://www.apache.org/licenses/LICENSE-2.0
2244
+ *
2245
+ * Unless required by applicable law or agreed to in writing, software
2246
+ * distributed under the License is distributed on an "AS IS" BASIS,
2247
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2248
+ * See the License for the specific language governing permissions and
2249
+ * limitations under the License.
2250
+ */
2251
+ class Bu{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){Au(e.idToken,"internal-error"),Au(void 0!==e.idToken,"internal-error"),Au(void 0!==e.refreshToken,"internal-error");const t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):function(e){const t=Mu(e);return Au(t,"internal-error"),Au(void 0!==t.exp,"internal-error"),Au(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}async getToken(e,t=!1){return Au(!this.accessToken||this.refreshToken,e,"user-token-expired"),t||!this.accessToken||this.isExpired?this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null:this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){const{accessToken:n,refreshToken:r,expiresIn:i}=await
2252
+ /**
2253
+ * @license
2254
+ * Copyright 2020 Google LLC
2255
+ *
2256
+ * Licensed under the Apache License, Version 2.0 (the "License");
2257
+ * you may not use this file except in compliance with the License.
2258
+ * You may obtain a copy of the License at
2259
+ *
2260
+ * http://www.apache.org/licenses/LICENSE-2.0
2261
+ *
2262
+ * Unless required by applicable law or agreed to in writing, software
2263
+ * distributed under the License is distributed on an "AS IS" BASIS,
2264
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2265
+ * See the License for the specific language governing permissions and
2266
+ * limitations under the License.
2267
+ */
2268
+ async function(e,t){const n=await _u(e,{},(async()=>{const n=N({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:i}=e.config,s=Du(e,r,"/v1/token",`key=${i}`),o=await e._getAdditionalHeaders();return o["Content-Type"]="application/x-www-form-urlencoded",Cu.fetch()(s,{method:"POST",headers:o,body:n})}));return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}(e,t);this.updateTokensAndExpiration(n,r,Number(i))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}static fromJSON(e,t){const{refreshToken:n,accessToken:r,expirationTime:i}=t,s=new Bu;return n&&(Au("string"==typeof n,"internal-error",{appName:e}),s.refreshToken=n),r&&(Au("string"==typeof r,"internal-error",{appName:e}),s.accessToken=r),i&&(Au("number"==typeof i,"internal-error",{appName:e}),s.expirationTime=i),s}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new Bu,this.toJSON())}_performRefresh(){return Nu("not implemented")}}
2269
+ /**
2270
+ * @license
2271
+ * Copyright 2020 Google LLC
2272
+ *
2273
+ * Licensed under the Apache License, Version 2.0 (the "License");
2274
+ * you may not use this file except in compliance with the License.
2275
+ * You may obtain a copy of the License at
2276
+ *
2277
+ * http://www.apache.org/licenses/LICENSE-2.0
2278
+ *
2279
+ * Unless required by applicable law or agreed to in writing, software
2280
+ * distributed under the License is distributed on an "AS IS" BASIS,
2281
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2282
+ * See the License for the specific language governing permissions and
2283
+ * limitations under the License.
2284
+ */function qu(e,t){Au("string"==typeof e||void 0===e,"internal-error",{appName:t})}class ju{constructor(e){var{uid:t,auth:n,stsTokenManager:r}=e,i=iu(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Uu(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new Fu(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){const t=await Pu(this,this.stsTokenManager.getToken(this.auth,e));return Au(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return async function(e,t=!1){const n=y(e),r=await n.getIdToken(t),i=Mu(r);Au(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const s="object"==typeof i.firebase?i.firebase:void 0,o=null==s?void 0:s.sign_in_provider;return{claims:i,token:r,authTime:xu(Ou(i.auth_time)),issuedAtTime:xu(Ou(i.iat)),expirationTime:xu(Ou(i.exp)),signInProvider:o||null,signInSecondFactor:(null==s?void 0:s.sign_in_second_factor)||null}}(this,e)}reload(){return async function(e){const t=y(e);await Vu(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}(this)}_assign(e){this!==e&&(Au(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map((e=>Object.assign({},e))),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){return new ju(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}))}_onReload(e){Au(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,t=!1){let n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&await Vu(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){const e=await this.getIdToken();return await Pu(this,async function(e,t){return Su(e,"POST","/v1/accounts:delete",t)}(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map((e=>Object.assign({},e))),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){var n,r,i,s,o,d,a,c;const l=null!==(n=t.displayName)&&void 0!==n?n:void 0,u=null!==(r=t.email)&&void 0!==r?r:void 0,h=null!==(i=t.phoneNumber)&&void 0!==i?i:void 0,f=null!==(s=t.photoURL)&&void 0!==s?s:void 0,A=null!==(o=t.tenantId)&&void 0!==o?o:void 0,N=null!==(d=t._redirectEventId)&&void 0!==d?d:void 0,p=null!==(a=t.createdAt)&&void 0!==a?a:void 0,m=null!==(c=t.lastLoginAt)&&void 0!==c?c:void 0,{uid:g,emailVerified:$,isAnonymous:y,providerData:v,stsTokenManager:w}=t;Au(g&&w,e,"internal-error");const b=Bu.fromJSON(this.name,w);Au("string"==typeof g,e,"internal-error"),qu(l,e.name),qu(u,e.name),Au("boolean"==typeof $,e,"internal-error"),Au("boolean"==typeof y,e,"internal-error"),qu(h,e.name),qu(f,e.name),qu(A,e.name),qu(N,e.name),qu(p,e.name),qu(m,e.name);const C=new ju({uid:g,auth:e,email:u,emailVerified:$,displayName:l,isAnonymous:y,photoURL:f,phoneNumber:h,tenantId:A,stsTokenManager:b,createdAt:p,lastLoginAt:m});return v&&Array.isArray(v)&&(C.providerData=v.map((e=>Object.assign({},e)))),N&&(C._redirectEventId=N),C}static async _fromIdTokenResponse(e,t,n=!1){const r=new Bu;r.updateFromServerResponse(t);const i=new ju({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:n});return await Vu(i),i}}
2285
+ /**
2286
+ * @license
2287
+ * Copyright 2019 Google LLC
2288
+ *
2289
+ * Licensed under the Apache License, Version 2.0 (the "License");
2290
+ * you may not use this file except in compliance with the License.
2291
+ * You may obtain a copy of the License at
2292
+ *
2293
+ * http://www.apache.org/licenses/LICENSE-2.0
2294
+ *
2295
+ * Unless required by applicable law or agreed to in writing, software
2296
+ * distributed under the License is distributed on an "AS IS" BASIS,
2297
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2298
+ * See the License for the specific language governing permissions and
2299
+ * limitations under the License.
2300
+ */class Gu{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){const t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}Gu.type="NONE";const zu=Gu;
2301
+ /**
2302
+ * @license
2303
+ * Copyright 2019 Google LLC
2304
+ *
2305
+ * Licensed under the Apache License, Version 2.0 (the "License");
2306
+ * you may not use this file except in compliance with the License.
2307
+ * You may obtain a copy of the License at
2308
+ *
2309
+ * http://www.apache.org/licenses/LICENSE-2.0
2310
+ *
2311
+ * Unless required by applicable law or agreed to in writing, software
2312
+ * distributed under the License is distributed on an "AS IS" BASIS,
2313
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2314
+ * See the License for the specific language governing permissions and
2315
+ * limitations under the License.
2316
+ */function Ku(e,t,n){return`firebase:${e}:${t}:${n}`}class Hu{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;const{config:r,name:i}=this.auth;this.fullUserKey=Ku(this.userKey,r.apiKey,i),this.fullPersistenceKey=Ku("persistence",r.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?ju._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const t=await this.getCurrentUser();return await this.removeCurrentUser(),this.persistence=e,t?this.setCurrentUser(t):void 0}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,n="authUser"){if(!t.length)return new Hu(gu(zu),e,n);const r=(await Promise.all(t.map((async e=>{if(await e._isAvailable())return e})))).filter((e=>e));let i=r[0]||gu(zu);const s=Ku(n,e.config.apiKey,e.name);let o=null;for(const n of t)try{const t=await n._get(s);if(t){const r=ju._fromJSON(e,t);n!==i&&(o=r),i=n;break}}catch(e){}const d=r.filter((e=>e._shouldAllowMigration));return i._shouldAllowMigration&&d.length?(i=d[0],o&&await i._set(s,o.toJSON()),await Promise.all(t.map((async e=>{if(e!==i)try{await e._remove(s)}catch(e){}}))),new Hu(i,e,n)):new Hu(i,e,n)}}
2317
+ /**
2318
+ * @license
2319
+ * Copyright 2020 Google LLC
2320
+ *
2321
+ * Licensed under the Apache License, Version 2.0 (the "License");
2322
+ * you may not use this file except in compliance with the License.
2323
+ * You may obtain a copy of the License at
2324
+ *
2325
+ * http://www.apache.org/licenses/LICENSE-2.0
2326
+ *
2327
+ * Unless required by applicable law or agreed to in writing, software
2328
+ * distributed under the License is distributed on an "AS IS" BASIS,
2329
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2330
+ * See the License for the specific language governing permissions and
2331
+ * limitations under the License.
2332
+ */function Wu(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(Xu(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(Qu(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(eh(t))return"Blackberry";if(th(t))return"Webos";if(Yu(t))return"Safari";if((t.includes("chrome/")||Ju(t))&&!t.includes("edge/"))return"Chrome";if(Zu(t))return"Android";{const t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=e.match(t);if(2===(null==n?void 0:n.length))return n[1]}return"Other"}function Qu(e=i()){return/firefox\//i.test(e)}function Yu(e=i()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function Ju(e=i()){return/crios\//i.test(e)}function Xu(e=i()){return/iemobile/i.test(e)}function Zu(e=i()){return/android/i.test(e)}function eh(e=i()){return/blackberry/i.test(e)}function th(e=i()){return/webos/i.test(e)}function nh(e=i()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function rh(){return function(){const e=i();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}()&&10===document.documentMode}function ih(e=i()){return nh(e)||Zu(e)||th(e)||eh(e)||/windows phone/i.test(e)||Xu(e)}
2333
+ /**
2334
+ * @license
2335
+ * Copyright 2020 Google LLC
2336
+ *
2337
+ * Licensed under the Apache License, Version 2.0 (the "License");
2338
+ * you may not use this file except in compliance with the License.
2339
+ * You may obtain a copy of the License at
2340
+ *
2341
+ * http://www.apache.org/licenses/LICENSE-2.0
2342
+ *
2343
+ * Unless required by applicable law or agreed to in writing, software
2344
+ * distributed under the License is distributed on an "AS IS" BASIS,
2345
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2346
+ * See the License for the specific language governing permissions and
2347
+ * limitations under the License.
2348
+ */
2349
+ function sh(e,t=[]){let n;switch(e){case"Browser":n=Wu(i());break;case"Worker":n=`${Wu(i())}-${e}`;break;default:n=e}const r=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${oe}/${r}`}
2350
+ /**
2351
+ * @license
2352
+ * Copyright 2022 Google LLC
2353
+ *
2354
+ * Licensed under the Apache License, Version 2.0 (the "License");
2355
+ * you may not use this file except in compliance with the License.
2356
+ * You may obtain a copy of the License at
2357
+ *
2358
+ * http://www.apache.org/licenses/LICENSE-2.0
2359
+ *
2360
+ * Unless required by applicable law or agreed to in writing, software
2361
+ * distributed under the License is distributed on an "AS IS" BASIS,
2362
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2363
+ * See the License for the specific language governing permissions and
2364
+ * limitations under the License.
2365
+ */class oh{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const n=t=>new Promise(((n,r)=>{try{n(e(t))}catch(e){r(e)}}));n.onAbort=t,this.queue.push(n);const r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const t=[];try{for(const n of this.queue)await n(e),n.onAbort&&t.push(n.onAbort)}catch(e){t.reverse();for(const e of t)try{e()}catch(e){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null==e?void 0:e.message})}}}
2366
+ /**
2367
+ * @license
2368
+ * Copyright 2020 Google LLC
2369
+ *
2370
+ * Licensed under the Apache License, Version 2.0 (the "License");
2371
+ * you may not use this file except in compliance with the License.
2372
+ * You may obtain a copy of the License at
2373
+ *
2374
+ * http://www.apache.org/licenses/LICENSE-2.0
2375
+ *
2376
+ * Unless required by applicable law or agreed to in writing, software
2377
+ * distributed under the License is distributed on an "AS IS" BASIS,
2378
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2379
+ * See the License for the specific language governing permissions and
2380
+ * limitations under the License.
2381
+ */class dh{constructor(e,t,n){this.app=e,this.heartbeatServiceProvider=t,this.config=n,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new ch(this),this.idTokenSubscription=new ch(this),this.beforeStateQueue=new oh(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=du,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=n.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=gu(t)),this._initializationPromise=this.queue((async()=>{var n,r;if(!this._deleted&&(this.persistenceManager=await Hu.create(this,e),!this._deleted)){if(null===(n=this._popupRedirectResolver)||void 0===n?void 0:n._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(e){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(r=this.currentUser)||void 0===r?void 0:r.uid)||null,this._deleted||(this._isInitialized=!0)}})),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();return this.currentUser||e?this.currentUser&&e&&this.currentUser.uid===e.uid?(this._currentUser._assign(e),void await this.currentUser.getIdToken()):void await this._updateCurrentUser(e,!0):void 0}async initializeCurrentUser(e){var t;const n=await this.assertedPersistence.getCurrentUser();let r=n,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const n=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,s=null==r?void 0:r._redirectEventId,o=await this.tryRedirectSignIn(e);n&&n!==s||!(null==o?void 0:o.user)||(r=o.user,i=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(r)}catch(e){r=n,this._popupRedirectResolver._overrideRedirectResult(this,(()=>Promise.reject(e)))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return Au(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(e){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await Vu(e)}catch(e){if("auth/network-request-failed"!==(null==e?void 0:e.code))return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){const t=e?y(e):null;return t&&Au(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&Au(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue((async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()}))}async signOut(){return await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0)}setPersistence(e){return this.queue((async()=>{await this.assertedPersistence.setPersistence(gu(e))}))}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new u("auth","Firebase",e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}async _setRedirectUser(e,t){const n=await this.getOrInitRedirectPersistenceManager(t);return null===e?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const t=e&&gu(e)||this._popupRedirectResolver;Au(t,this,"argument-error"),this.redirectPersistenceManager=await Hu.create(this,[gu(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,n;return this._isInitialized&&await this.queue((async()=>{})),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e?this._currentUser:(null===(n=this.redirectUser)||void 0===n?void 0:n._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue((async()=>this.directlySetCurrentUser(e)))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const n=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,r){if(this._deleted)return()=>{};const i="function"==typeof t?t:t.next.bind(t),s=this._isInitialized?Promise.resolve():this._initializationPromise;return Au(s,this,"internal-error"),s.then((()=>i(this.currentUser))),"function"==typeof t?e.addObserver(t,n,r):e.addObserver(t)}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return Au(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=sh(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;const t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);const n=await(null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());return n&&(t["X-Firebase-Client"]=n),t}}function ah(e){return y(e)}class ch{constructor(e){this.auth=e,this.observer=null,this.addObserver=function(e,t){const n=new g(e,t);return n.subscribe.bind(n)}((e=>this.observer=e))}get next(){return Au(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}function lh(e,t,n){const r=ah(e);Au(r._canInitEmulator,r,"emulator-config-failed"),Au(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");const i=!!(null==n?void 0:n.disableWarnings),s=uh(t),{host:o,port:d}=function(e){const t=uh(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){const e=i[1];return{host:e,port:hh(r.substr(e.length+1))}}{const[e,t]=r.split(":");return{host:e,port:hh(t)}}}(t),a=null===d?"":`:${d}`;r.config.emulator={url:`${s}//${o}${a}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:o,port:d,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||function(){function e(){const e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!=typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials.");"undefined"!=typeof window&&"undefined"!=typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}
2382
+ /**
2383
+ * @license
2384
+ * Copyright 2020 Google LLC
2385
+ *
2386
+ * Licensed under the Apache License, Version 2.0 (the "License");
2387
+ * you may not use this file except in compliance with the License.
2388
+ * You may obtain a copy of the License at
2389
+ *
2390
+ * http://www.apache.org/licenses/LICENSE-2.0
2391
+ *
2392
+ * Unless required by applicable law or agreed to in writing, software
2393
+ * distributed under the License is distributed on an "AS IS" BASIS,
2394
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2395
+ * See the License for the specific language governing permissions and
2396
+ * limitations under the License.
2397
+ */()}function uh(e){const t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function hh(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}class fh{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return Nu("not implemented")}_getIdTokenResponse(e){return Nu("not implemented")}_linkToIdToken(e,t){return Nu("not implemented")}_getReauthenticationResolver(e){return Nu("not implemented")}}
2398
+ /**
2399
+ * @license
2400
+ * Copyright 2020 Google LLC
2401
+ *
2402
+ * Licensed under the Apache License, Version 2.0 (the "License");
2403
+ * you may not use this file except in compliance with the License.
2404
+ * You may obtain a copy of the License at
2405
+ *
2406
+ * http://www.apache.org/licenses/LICENSE-2.0
2407
+ *
2408
+ * Unless required by applicable law or agreed to in writing, software
2409
+ * distributed under the License is distributed on an "AS IS" BASIS,
2410
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2411
+ * See the License for the specific language governing permissions and
2412
+ * limitations under the License.
2413
+ */async function Ah(e,t){return async function(e,t){return Su(e,"POST","/v1/accounts:sendOobCode",Tu(e,t))}(e,t)}
2414
+ /**
2415
+ * @license
2416
+ * Copyright 2020 Google LLC
2417
+ *
2418
+ * Licensed under the Apache License, Version 2.0 (the "License");
2419
+ * you may not use this file except in compliance with the License.
2420
+ * You may obtain a copy of the License at
2421
+ *
2422
+ * http://www.apache.org/licenses/LICENSE-2.0
2423
+ *
2424
+ * Unless required by applicable law or agreed to in writing, software
2425
+ * distributed under the License is distributed on an "AS IS" BASIS,
2426
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2427
+ * See the License for the specific language governing permissions and
2428
+ * limitations under the License.
2429
+ */
2430
+ /**
2431
+ * @license
2432
+ * Copyright 2020 Google LLC
2433
+ *
2434
+ * Licensed under the Apache License, Version 2.0 (the "License");
2435
+ * you may not use this file except in compliance with the License.
2436
+ * You may obtain a copy of the License at
2437
+ *
2438
+ * http://www.apache.org/licenses/LICENSE-2.0
2439
+ *
2440
+ * Unless required by applicable law or agreed to in writing, software
2441
+ * distributed under the License is distributed on an "AS IS" BASIS,
2442
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2443
+ * See the License for the specific language governing permissions and
2444
+ * limitations under the License.
2445
+ */
2446
+ class Nh extends fh{constructor(e,t,n,r=null){super("password",n),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(e,t){return new Nh(e,t,"password")}static _fromEmailAndCode(e,t,n=null){return new Nh(e,t,"emailLink",n)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){const t="string"==typeof e?JSON.parse(e):e;if((null==t?void 0:t.email)&&(null==t?void 0:t.password)){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":
2447
+ /**
2448
+ * @license
2449
+ * Copyright 2020 Google LLC
2450
+ *
2451
+ * Licensed under the Apache License, Version 2.0 (the "License");
2452
+ * you may not use this file except in compliance with the License.
2453
+ * You may obtain a copy of the License at
2454
+ *
2455
+ * http://www.apache.org/licenses/LICENSE-2.0
2456
+ *
2457
+ * Unless required by applicable law or agreed to in writing, software
2458
+ * distributed under the License is distributed on an "AS IS" BASIS,
2459
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2460
+ * See the License for the specific language governing permissions and
2461
+ * limitations under the License.
2462
+ */
2463
+ return async function(e,t){return ku(e,"POST","/v1/accounts:signInWithPassword",Tu(e,t))}(e,{returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return async function(e,t){return ku(e,"POST","/v1/accounts:signInWithEmailLink",Tu(e,t))}(e,{email:this._email,oobCode:this._password});default:uu(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return async function(e,t){return Su(e,"POST","/v1/accounts:update",t)}(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return async function(e,t){return ku(e,"POST","/v1/accounts:signInWithEmailLink",Tu(e,t))}(e,{idToken:t,email:this._email,oobCode:this._password});default:uu(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}
2464
+ /**
2465
+ * @license
2466
+ * Copyright 2020 Google LLC
2467
+ *
2468
+ * Licensed under the Apache License, Version 2.0 (the "License");
2469
+ * you may not use this file except in compliance with the License.
2470
+ * You may obtain a copy of the License at
2471
+ *
2472
+ * http://www.apache.org/licenses/LICENSE-2.0
2473
+ *
2474
+ * Unless required by applicable law or agreed to in writing, software
2475
+ * distributed under the License is distributed on an "AS IS" BASIS,
2476
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2477
+ * See the License for the specific language governing permissions and
2478
+ * limitations under the License.
2479
+ */async function ph(e,t){return ku(e,"POST","/v1/accounts:signInWithIdp",Tu(e,t))}
2480
+ /**
2481
+ * @license
2482
+ * Copyright 2020 Google LLC
2483
+ *
2484
+ * Licensed under the Apache License, Version 2.0 (the "License");
2485
+ * you may not use this file except in compliance with the License.
2486
+ * You may obtain a copy of the License at
2487
+ *
2488
+ * http://www.apache.org/licenses/LICENSE-2.0
2489
+ *
2490
+ * Unless required by applicable law or agreed to in writing, software
2491
+ * distributed under the License is distributed on an "AS IS" BASIS,
2492
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2493
+ * See the License for the specific language governing permissions and
2494
+ * limitations under the License.
2495
+ */class mh extends fh{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const t=new mh(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):uu("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const t="string"==typeof e?JSON.parse(e):e,{providerId:n,signInMethod:r}=t,i=iu(t,["providerId","signInMethod"]);if(!n||!r)return null;const s=new mh(n,r);return s.idToken=i.idToken||void 0,s.accessToken=i.accessToken||void 0,s.secret=i.secret,s.nonce=i.nonce,s.pendingToken=i.pendingToken||null,s}_getIdTokenResponse(e){return ph(e,this.buildRequest())}_linkToIdToken(e,t){const n=this.buildRequest();return n.idToken=t,ph(e,n)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,ph(e,t)}buildRequest(){const e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=N(t)}return e}}
2496
+ /**
2497
+ * @license
2498
+ * Copyright 2020 Google LLC
2499
+ *
2500
+ * Licensed under the Apache License, Version 2.0 (the "License");
2501
+ * you may not use this file except in compliance with the License.
2502
+ * You may obtain a copy of the License at
2503
+ *
2504
+ * http://www.apache.org/licenses/LICENSE-2.0
2505
+ *
2506
+ * Unless required by applicable law or agreed to in writing, software
2507
+ * distributed under the License is distributed on an "AS IS" BASIS,
2508
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2509
+ * See the License for the specific language governing permissions and
2510
+ * limitations under the License.
2511
+ */class gh{constructor(e){var t,n,r,i,s,o;const d=p(m(e)),a=null!==(t=d.apiKey)&&void 0!==t?t:null,c=null!==(n=d.oobCode)&&void 0!==n?n:null,l=function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(null!==(r=d.mode)&&void 0!==r?r:null);Au(a&&c&&l,"argument-error"),this.apiKey=a,this.operation=l,this.code=c,this.continueUrl=null!==(i=d.continueUrl)&&void 0!==i?i:null,this.languageCode=null!==(s=d.languageCode)&&void 0!==s?s:null,this.tenantId=null!==(o=d.tenantId)&&void 0!==o?o:null}static parseLink(e){const t=function(e){const t=p(m(e)).link,n=t?p(m(t)).deep_link_id:null,r=p(m(e)).deep_link_id;return(r?p(m(r)).link:null)||r||n||t||e}(e);try{return new gh(t)}catch(e){return null}}}
2512
+ /**
2513
+ * @license
2514
+ * Copyright 2020 Google LLC
2515
+ *
2516
+ * Licensed under the Apache License, Version 2.0 (the "License");
2517
+ * you may not use this file except in compliance with the License.
2518
+ * You may obtain a copy of the License at
2519
+ *
2520
+ * http://www.apache.org/licenses/LICENSE-2.0
2521
+ *
2522
+ * Unless required by applicable law or agreed to in writing, software
2523
+ * distributed under the License is distributed on an "AS IS" BASIS,
2524
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2525
+ * See the License for the specific language governing permissions and
2526
+ * limitations under the License.
2527
+ */class $h{constructor(){this.providerId=$h.PROVIDER_ID}static credential(e,t){return Nh._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){const n=gh.parseLink(t);return Au(n,"argument-error"),Nh._fromEmailAndCode(e,n.code,n.tenantId)}}$h.PROVIDER_ID="password",$h.EMAIL_PASSWORD_SIGN_IN_METHOD="password",$h.EMAIL_LINK_SIGN_IN_METHOD="emailLink";
2528
+ /**
2529
+ * @license
2530
+ * Copyright 2020 Google LLC
2531
+ *
2532
+ * Licensed under the Apache License, Version 2.0 (the "License");
2533
+ * you may not use this file except in compliance with the License.
2534
+ * You may obtain a copy of the License at
2535
+ *
2536
+ * http://www.apache.org/licenses/LICENSE-2.0
2537
+ *
2538
+ * Unless required by applicable law or agreed to in writing, software
2539
+ * distributed under the License is distributed on an "AS IS" BASIS,
2540
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2541
+ * See the License for the specific language governing permissions and
2542
+ * limitations under the License.
2543
+ */
2544
+ class yh{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}
2545
+ /**
2546
+ * @license
2547
+ * Copyright 2019 Google LLC
2548
+ *
2549
+ * Licensed under the Apache License, Version 2.0 (the "License");
2550
+ * you may not use this file except in compliance with the License.
2551
+ * You may obtain a copy of the License at
2552
+ *
2553
+ * http://www.apache.org/licenses/LICENSE-2.0
2554
+ *
2555
+ * Unless required by applicable law or agreed to in writing, software
2556
+ * distributed under the License is distributed on an "AS IS" BASIS,
2557
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2558
+ * See the License for the specific language governing permissions and
2559
+ * limitations under the License.
2560
+ */class vh extends yh{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}
2561
+ /**
2562
+ * @license
2563
+ * Copyright 2020 Google LLC
2564
+ *
2565
+ * Licensed under the Apache License, Version 2.0 (the "License");
2566
+ * you may not use this file except in compliance with the License.
2567
+ * You may obtain a copy of the License at
2568
+ *
2569
+ * http://www.apache.org/licenses/LICENSE-2.0
2570
+ *
2571
+ * Unless required by applicable law or agreed to in writing, software
2572
+ * distributed under the License is distributed on an "AS IS" BASIS,
2573
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2574
+ * See the License for the specific language governing permissions and
2575
+ * limitations under the License.
2576
+ */class wh extends vh{constructor(){super("facebook.com")}static credential(e){return mh._fromParams({providerId:wh.PROVIDER_ID,signInMethod:wh.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return wh.credentialFromTaggedObject(e)}static credentialFromError(e){return wh.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e))return null;if(!e.oauthAccessToken)return null;try{return wh.credential(e.oauthAccessToken)}catch(e){return null}}}wh.FACEBOOK_SIGN_IN_METHOD="facebook.com",wh.PROVIDER_ID="facebook.com";
2577
+ /**
2578
+ * @license
2579
+ * Copyright 2020 Google LLC
2580
+ *
2581
+ * Licensed under the Apache License, Version 2.0 (the "License");
2582
+ * you may not use this file except in compliance with the License.
2583
+ * You may obtain a copy of the License at
2584
+ *
2585
+ * http://www.apache.org/licenses/LICENSE-2.0
2586
+ *
2587
+ * Unless required by applicable law or agreed to in writing, software
2588
+ * distributed under the License is distributed on an "AS IS" BASIS,
2589
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2590
+ * See the License for the specific language governing permissions and
2591
+ * limitations under the License.
2592
+ */
2593
+ class bh extends vh{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return mh._fromParams({providerId:bh.PROVIDER_ID,signInMethod:bh.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return bh.credentialFromTaggedObject(e)}static credentialFromError(e){return bh.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:t,oauthAccessToken:n}=e;if(!t&&!n)return null;try{return bh.credential(t,n)}catch(e){return null}}}bh.GOOGLE_SIGN_IN_METHOD="google.com",bh.PROVIDER_ID="google.com";
2594
+ /**
2595
+ * @license
2596
+ * Copyright 2020 Google LLC
2597
+ *
2598
+ * Licensed under the Apache License, Version 2.0 (the "License");
2599
+ * you may not use this file except in compliance with the License.
2600
+ * You may obtain a copy of the License at
2601
+ *
2602
+ * http://www.apache.org/licenses/LICENSE-2.0
2603
+ *
2604
+ * Unless required by applicable law or agreed to in writing, software
2605
+ * distributed under the License is distributed on an "AS IS" BASIS,
2606
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2607
+ * See the License for the specific language governing permissions and
2608
+ * limitations under the License.
2609
+ */
2610
+ class Ch extends vh{constructor(){super("github.com")}static credential(e){return mh._fromParams({providerId:Ch.PROVIDER_ID,signInMethod:Ch.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Ch.credentialFromTaggedObject(e)}static credentialFromError(e){return Ch.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e))return null;if(!e.oauthAccessToken)return null;try{return Ch.credential(e.oauthAccessToken)}catch(e){return null}}}Ch.GITHUB_SIGN_IN_METHOD="github.com",Ch.PROVIDER_ID="github.com";
2611
+ /**
2612
+ * @license
2613
+ * Copyright 2020 Google LLC
2614
+ *
2615
+ * Licensed under the Apache License, Version 2.0 (the "License");
2616
+ * you may not use this file except in compliance with the License.
2617
+ * You may obtain a copy of the License at
2618
+ *
2619
+ * http://www.apache.org/licenses/LICENSE-2.0
2620
+ *
2621
+ * Unless required by applicable law or agreed to in writing, software
2622
+ * distributed under the License is distributed on an "AS IS" BASIS,
2623
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2624
+ * See the License for the specific language governing permissions and
2625
+ * limitations under the License.
2626
+ */
2627
+ class Eh extends vh{constructor(){super("twitter.com")}static credential(e,t){return mh._fromParams({providerId:Eh.PROVIDER_ID,signInMethod:Eh.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return Eh.credentialFromTaggedObject(e)}static credentialFromError(e){return Eh.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:t,oauthTokenSecret:n}=e;if(!t||!n)return null;try{return Eh.credential(t,n)}catch(e){return null}}}Eh.TWITTER_SIGN_IN_METHOD="twitter.com",Eh.PROVIDER_ID="twitter.com";
2628
+ /**
2629
+ * @license
2630
+ * Copyright 2020 Google LLC
2631
+ *
2632
+ * Licensed under the Apache License, Version 2.0 (the "License");
2633
+ * you may not use this file except in compliance with the License.
2634
+ * You may obtain a copy of the License at
2635
+ *
2636
+ * http://www.apache.org/licenses/LICENSE-2.0
2637
+ *
2638
+ * Unless required by applicable law or agreed to in writing, software
2639
+ * distributed under the License is distributed on an "AS IS" BASIS,
2640
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2641
+ * See the License for the specific language governing permissions and
2642
+ * limitations under the License.
2643
+ */
2644
+ class Ih{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,n,r=!1){const i=await ju._fromIdTokenResponse(e,n,r),s=Th(n);return new Ih({user:i,providerId:s,_tokenResponse:n,operationType:t})}static async _forOperation(e,t,n){await e._updateTokensIfNecessary(n,!0);const r=Th(n);return new Ih({user:e,providerId:r,_tokenResponse:n,operationType:t})}}function Th(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}
2645
+ /**
2646
+ * @license
2647
+ * Copyright 2020 Google LLC
2648
+ *
2649
+ * Licensed under the Apache License, Version 2.0 (the "License");
2650
+ * you may not use this file except in compliance with the License.
2651
+ * You may obtain a copy of the License at
2652
+ *
2653
+ * http://www.apache.org/licenses/LICENSE-2.0
2654
+ *
2655
+ * Unless required by applicable law or agreed to in writing, software
2656
+ * distributed under the License is distributed on an "AS IS" BASIS,
2657
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2658
+ * See the License for the specific language governing permissions and
2659
+ * limitations under the License.
2660
+ */class Sh extends l{constructor(e,t,n,r){var i;super(t.code,t.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,Sh.prototype),this.customData={appName:e.name,tenantId:null!==(i=e.tenantId)&&void 0!==i?i:void 0,_serverResponse:t.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(e,t,n,r){return new Sh(e,t,n,r)}}function _h(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch((n=>{if("auth/multi-factor-auth-required"===n.code)throw Sh._fromErrorAndOperation(e,n,t,r);throw n}))}
2661
+ /**
2662
+ * @license
2663
+ * Copyright 2020 Google LLC
2664
+ *
2665
+ * Licensed under the Apache License, Version 2.0 (the "License");
2666
+ * you may not use this file except in compliance with the License.
2667
+ * You may obtain a copy of the License at
2668
+ *
2669
+ * http://www.apache.org/licenses/LICENSE-2.0
2670
+ *
2671
+ * Unless required by applicable law or agreed to in writing, software
2672
+ * distributed under the License is distributed on an "AS IS" BASIS,
2673
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2674
+ * See the License for the specific language governing permissions and
2675
+ * limitations under the License.
2676
+ */
2677
+ async function kh(e,t,n=!1){const r="signIn",i=await _h(e,r,t),s=await Ih._fromIdTokenResponse(e,r,i);return n||await e._updateCurrentUser(s.user),s}
2678
+ /**
2679
+ * @license
2680
+ * Copyright 2020 Google LLC
2681
+ *
2682
+ * Licensed under the Apache License, Version 2.0 (the "License");
2683
+ * you may not use this file except in compliance with the License.
2684
+ * You may obtain a copy of the License at
2685
+ *
2686
+ * http://www.apache.org/licenses/LICENSE-2.0
2687
+ *
2688
+ * Unless required by applicable law or agreed to in writing, software
2689
+ * distributed under the License is distributed on an "AS IS" BASIS,
2690
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2691
+ * See the License for the specific language governing permissions and
2692
+ * limitations under the License.
2693
+ */
2694
+ async function Dh(e,t,n){const r=y(e),i={requestType:"PASSWORD_RESET",email:t};n&&
2695
+ /**
2696
+ * @license
2697
+ * Copyright 2020 Google LLC
2698
+ *
2699
+ * Licensed under the Apache License, Version 2.0 (the "License");
2700
+ * you may not use this file except in compliance with the License.
2701
+ * You may obtain a copy of the License at
2702
+ *
2703
+ * http://www.apache.org/licenses/LICENSE-2.0
2704
+ *
2705
+ * Unless required by applicable law or agreed to in writing, software
2706
+ * distributed under the License is distributed on an "AS IS" BASIS,
2707
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2708
+ * See the License for the specific language governing permissions and
2709
+ * limitations under the License.
2710
+ */
2711
+ function(e,t,n){var r;Au((null===(r=n.url)||void 0===r?void 0:r.length)>0,e,"invalid-continue-uri"),Au(void 0===n.dynamicLinkDomain||n.dynamicLinkDomain.length>0,e,"invalid-dynamic-link-domain"),t.continueUrl=n.url,t.dynamicLinkDomain=n.dynamicLinkDomain,t.canHandleCodeInApp=n.handleCodeInApp,n.iOS&&(Au(n.iOS.bundleId.length>0,e,"missing-ios-bundle-id"),t.iOSBundleId=n.iOS.bundleId),n.android&&(Au(n.android.packageName.length>0,e,"missing-android-pkg-name"),t.androidInstallApp=n.android.installApp,t.androidMinimumVersionCode=n.android.minimumVersion,t.androidPackageName=n.android.packageName)}(r,i,n),await Ah(r,i)}async function Rh(e,t,n){await async function(e,t){return Su(e,"POST","/v1/accounts:resetPassword",Tu(e,t))}(y(e),{oobCode:t,newPassword:n})}function Lh(e,t,n){return async function(e,t){return kh(ah(e),t)}(y(e),$h.credential(t,n))}const xh="__sak";
2712
+ /**
2713
+ * @license
2714
+ * Copyright 2019 Google LLC
2715
+ *
2716
+ * Licensed under the Apache License, Version 2.0 (the "License");
2717
+ * you may not use this file except in compliance with the License.
2718
+ * You may obtain a copy of the License at
2719
+ *
2720
+ * http://www.apache.org/licenses/LICENSE-2.0
2721
+ *
2722
+ * Unless required by applicable law or agreed to in writing, software
2723
+ * distributed under the License is distributed on an "AS IS" BASIS,
2724
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2725
+ * See the License for the specific language governing permissions and
2726
+ * limitations under the License.
2727
+ */class Oh{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(xh,"1"),this.storage.removeItem(xh),Promise.resolve(!0)):Promise.resolve(!1)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){const t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}
2728
+ /**
2729
+ * @license
2730
+ * Copyright 2020 Google LLC
2731
+ *
2732
+ * Licensed under the Apache License, Version 2.0 (the "License");
2733
+ * you may not use this file except in compliance with the License.
2734
+ * You may obtain a copy of the License at
2735
+ *
2736
+ * http://www.apache.org/licenses/LICENSE-2.0
2737
+ *
2738
+ * Unless required by applicable law or agreed to in writing, software
2739
+ * distributed under the License is distributed on an "AS IS" BASIS,
2740
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2741
+ * See the License for the specific language governing permissions and
2742
+ * limitations under the License.
2743
+ */class Mh extends Oh{constructor(){super((()=>window.localStorage),"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=function(){const e=i();return Yu(e)||nh(e)}()&&function(){try{return!(!window||window===window.top)}catch(e){return!1}}(),this.fallbackToPolling=ih(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const t of Object.keys(this.listeners)){const n=this.storage.getItem(t),r=this.localCache[t];n!==r&&e(t,r,n)}}onStorageEvent(e,t=!1){if(!e.key)return void this.forAllChangedKeys(((e,t,n)=>{this.notifyListeners(e,n)}));const n=e.key;if(t?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const r=this.storage.getItem(n);if(e.newValue!==r)null!==e.newValue?this.storage.setItem(n,e.newValue):this.storage.removeItem(n);else if(this.localCache[n]===e.newValue&&!t)return}const r=()=>{const e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},i=this.storage.getItem(n);rh()&&i!==e.newValue&&e.newValue!==e.oldValue?setTimeout(r,10):r()}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const e of Array.from(n))e(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((()=>{this.forAllChangedKeys(((e,t,n)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:n}),!0)}))}),1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){const t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}Mh.type="LOCAL";const Ph=Mh;
2744
+ /**
2745
+ * @license
2746
+ * Copyright 2020 Google LLC
2747
+ *
2748
+ * Licensed under the Apache License, Version 2.0 (the "License");
2749
+ * you may not use this file except in compliance with the License.
2750
+ * You may obtain a copy of the License at
2751
+ *
2752
+ * http://www.apache.org/licenses/LICENSE-2.0
2753
+ *
2754
+ * Unless required by applicable law or agreed to in writing, software
2755
+ * distributed under the License is distributed on an "AS IS" BASIS,
2756
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2757
+ * See the License for the specific language governing permissions and
2758
+ * limitations under the License.
2759
+ */class Uh extends Oh{constructor(){super((()=>window.sessionStorage),"SESSION")}_addListener(e,t){}_removeListener(e,t){}}Uh.type="SESSION";const Fh=Uh;
2760
+ /**
2761
+ * @license
2762
+ * Copyright 2019 Google LLC
2763
+ *
2764
+ * Licensed under the Apache License, Version 2.0 (the "License");
2765
+ * you may not use this file except in compliance with the License.
2766
+ * You may obtain a copy of the License at
2767
+ *
2768
+ * http://www.apache.org/licenses/LICENSE-2.0
2769
+ *
2770
+ * Unless required by applicable law or agreed to in writing, software
2771
+ * distributed under the License is distributed on an "AS IS" BASIS,
2772
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2773
+ * See the License for the specific language governing permissions and
2774
+ * limitations under the License.
2775
+ */
2776
+ /**
2777
+ * @license
2778
+ * Copyright 2019 Google LLC
2779
+ *
2780
+ * Licensed under the Apache License, Version 2.0 (the "License");
2781
+ * you may not use this file except in compliance with the License.
2782
+ * You may obtain a copy of the License at
2783
+ *
2784
+ * http://www.apache.org/licenses/LICENSE-2.0
2785
+ *
2786
+ * Unless required by applicable law or agreed to in writing, software
2787
+ * distributed under the License is distributed on an "AS IS" BASIS,
2788
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2789
+ * See the License for the specific language governing permissions and
2790
+ * limitations under the License.
2791
+ */
2792
+ class Vh{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const t=this.receivers.find((t=>t.isListeningto(e)));if(t)return t;const n=new Vh(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const t=e,{eventId:n,eventType:r,data:i}=t.data,s=this.handlersMap[r];if(!(null==s?void 0:s.size))return;t.ports[0].postMessage({status:"ack",eventId:n,eventType:r});const o=Array.from(s).map((async e=>e(t.origin,i))),d=await function(e){return Promise.all(e.map((async e=>{try{return{fulfilled:!0,value:await e}}catch(e){return{fulfilled:!1,reason:e}}})))}(o);t.ports[0].postMessage({status:"done",eventId:n,eventType:r,response:d})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}
2793
+ /**
2794
+ * @license
2795
+ * Copyright 2020 Google LLC
2796
+ *
2797
+ * Licensed under the Apache License, Version 2.0 (the "License");
2798
+ * you may not use this file except in compliance with the License.
2799
+ * You may obtain a copy of the License at
2800
+ *
2801
+ * http://www.apache.org/licenses/LICENSE-2.0
2802
+ *
2803
+ * Unless required by applicable law or agreed to in writing, software
2804
+ * distributed under the License is distributed on an "AS IS" BASIS,
2805
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2806
+ * See the License for the specific language governing permissions and
2807
+ * limitations under the License.
2808
+ */
2809
+ function Bh(e="",t=10){let n="";for(let e=0;e<t;e++)n+=Math.floor(10*Math.random());return e+n}
2810
+ /**
2811
+ * @license
2812
+ * Copyright 2019 Google LLC
2813
+ *
2814
+ * Licensed under the Apache License, Version 2.0 (the "License");
2815
+ * you may not use this file except in compliance with the License.
2816
+ * You may obtain a copy of the License at
2817
+ *
2818
+ * http://www.apache.org/licenses/LICENSE-2.0
2819
+ *
2820
+ * Unless required by applicable law or agreed to in writing, software
2821
+ * distributed under the License is distributed on an "AS IS" BASIS,
2822
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2823
+ * See the License for the specific language governing permissions and
2824
+ * limitations under the License.
2825
+ */Vh.receivers=[];class qh{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,t,n=50){const r="undefined"!=typeof MessageChannel?new MessageChannel:null;if(!r)throw new Error("connection_unavailable");let i,s;return new Promise(((o,d)=>{const a=Bh("",20);r.port1.start();const c=setTimeout((()=>{d(new Error("unsupported_event"))}),n);s={messageChannel:r,onMessage(e){const t=e;if(t.data.eventId===a)switch(t.data.status){case"ack":clearTimeout(c),i=setTimeout((()=>{d(new Error("timeout"))}),3e3);break;case"done":clearTimeout(i),o(t.data.response);break;default:clearTimeout(c),clearTimeout(i),d(new Error("invalid_response"))}}},this.handlers.add(s),r.port1.addEventListener("message",s.onMessage),this.target.postMessage({eventType:e,eventId:a,data:t},[r.port2])})).finally((()=>{s&&this.removeMessageHandler(s)}))}}
2826
+ /**
2827
+ * @license
2828
+ * Copyright 2020 Google LLC
2829
+ *
2830
+ * Licensed under the Apache License, Version 2.0 (the "License");
2831
+ * you may not use this file except in compliance with the License.
2832
+ * You may obtain a copy of the License at
2833
+ *
2834
+ * http://www.apache.org/licenses/LICENSE-2.0
2835
+ *
2836
+ * Unless required by applicable law or agreed to in writing, software
2837
+ * distributed under the License is distributed on an "AS IS" BASIS,
2838
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2839
+ * See the License for the specific language governing permissions and
2840
+ * limitations under the License.
2841
+ */function jh(){return window}
2842
+ /**
2843
+ * @license
2844
+ * Copyright 2020 Google LLC.
2845
+ *
2846
+ * Licensed under the Apache License, Version 2.0 (the "License");
2847
+ * you may not use this file except in compliance with the License.
2848
+ * You may obtain a copy of the License at
2849
+ *
2850
+ * http://www.apache.org/licenses/LICENSE-2.0
2851
+ *
2852
+ * Unless required by applicable law or agreed to in writing, software
2853
+ * distributed under the License is distributed on an "AS IS" BASIS,
2854
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2855
+ * See the License for the specific language governing permissions and
2856
+ * limitations under the License.
2857
+ */
2858
+ function Gh(){return void 0!==jh().WorkerGlobalScope&&"function"==typeof jh().importScripts}
2859
+ /**
2860
+ * @license
2861
+ * Copyright 2019 Google LLC
2862
+ *
2863
+ * Licensed under the Apache License, Version 2.0 (the "License");
2864
+ * you may not use this file except in compliance with the License.
2865
+ * You may obtain a copy of the License at
2866
+ *
2867
+ * http://www.apache.org/licenses/LICENSE-2.0
2868
+ *
2869
+ * Unless required by applicable law or agreed to in writing, software
2870
+ * distributed under the License is distributed on an "AS IS" BASIS,
2871
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2872
+ * See the License for the specific language governing permissions and
2873
+ * limitations under the License.
2874
+ */
2875
+ const zh="firebaseLocalStorageDb",Kh="firebaseLocalStorage",Hh="fbase_key";class Wh{constructor(e){this.request=e}toPromise(){return new Promise(((e,t)=>{this.request.addEventListener("success",(()=>{e(this.request.result)})),this.request.addEventListener("error",(()=>{t(this.request.error)}))}))}}function Qh(e,t){return e.transaction([Kh],t?"readwrite":"readonly").objectStore(Kh)}function Yh(){const e=indexedDB.open(zh,1);return new Promise(((t,n)=>{e.addEventListener("error",(()=>{n(e.error)})),e.addEventListener("upgradeneeded",(()=>{const t=e.result;try{t.createObjectStore(Kh,{keyPath:Hh})}catch(e){n(e)}})),e.addEventListener("success",(async()=>{const n=e.result;n.objectStoreNames.contains(Kh)?t(n):(n.close(),await function(){const e=indexedDB.deleteDatabase(zh);return new Wh(e).toPromise()}(),t(await Yh()))}))}))}async function Jh(e,t,n){const r=Qh(e,!0).put({[Hh]:t,value:n});return new Wh(r).toPromise()}function Xh(e,t){const n=Qh(e,!0).delete(t);return new Wh(n).toPromise()}class Zh{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then((()=>{}),(()=>{}))}async _openDb(){return this.db||(this.db=await Yh()),this.db}async _withRetries(e){let t=0;for(;;)try{const t=await this._openDb();return await e(t)}catch(e){if(t++>3)throw e;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return Gh()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Vh._getInstance(Gh()?self:null),this.receiver._subscribe("keyChanged",(async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)}))),this.receiver._subscribe("ping",(async(e,t)=>["keyChanged"]))}async initializeSender(){var e,t;if(this.activeServiceWorker=await async function(){if(!(null===navigator||void 0===navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}(),!this.activeServiceWorker)return;this.sender=new qh(this.activeServiceWorker);const n=await this.sender._send("ping",{},800);n&&(null===(e=n[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=n[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(this.sender&&this.activeServiceWorker&&function(){var e;return(null===(e=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===e?void 0:e.controller)||null}()===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(e){}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await Yh();return await Jh(e,xh,"1"),await Xh(e,xh),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite((async()=>(await this._withRetries((n=>Jh(n,e,t))),this.localCache[e]=t,this.notifyServiceWorker(e))))}async _get(e){const t=await this._withRetries((t=>async function(e,t){const n=Qh(e,!1).get(t),r=await new Wh(n).toPromise();return void 0===r?null:r.value}(t,e)));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite((async()=>(await this._withRetries((t=>Xh(t,e))),delete this.localCache[e],this.notifyServiceWorker(e))))}async _poll(){const e=await this._withRetries((e=>{const t=Qh(e,!1).getAll();return new Wh(t).toPromise()}));if(!e)return[];if(0!==this.pendingWrites)return[];const t=[],n=new Set;for(const{fbase_key:r,value:i}of e)n.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(i)&&(this.notifyListeners(r,i),t.push(r));for(const e of Object.keys(this.localCache))this.localCache[e]&&!n.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const e of Array.from(n))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((async()=>this._poll()),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}Zh.type="LOCAL";const ef=Zh;
2876
+ /**
2877
+ * @license
2878
+ * Copyright 2020 Google LLC
2879
+ *
2880
+ * Licensed under the Apache License, Version 2.0 (the "License");
2881
+ * you may not use this file except in compliance with the License.
2882
+ * You may obtain a copy of the License at
2883
+ *
2884
+ * http://www.apache.org/licenses/LICENSE-2.0
2885
+ *
2886
+ * Unless required by applicable law or agreed to in writing, software
2887
+ * distributed under the License is distributed on an "AS IS" BASIS,
2888
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2889
+ * See the License for the specific language governing permissions and
2890
+ * limitations under the License.
2891
+ */function tf(e){return new Promise(((t,n)=>{const r=document.createElement("script");r.setAttribute("src",e),r.onload=t,r.onerror=e=>{const t=hu("internal-error");t.customData=e,n(t)},r.type="text/javascript",r.charset="UTF-8",function(){var e,t;return null!==(t=null===(e=document.getElementsByTagName("head"))||void 0===e?void 0:e[0])&&void 0!==t?t:document}().appendChild(r)}))}new wu(3e4,6e4);
2892
+ /**
2893
+ * @license
2894
+ * Copyright 2019 Google LLC
2895
+ *
2896
+ * Licensed under the Apache License, Version 2.0 (the "License");
2897
+ * you may not use this file except in compliance with the License.
2898
+ * You may obtain a copy of the License at
2899
+ *
2900
+ * http://www.apache.org/licenses/LICENSE-2.0
2901
+ *
2902
+ * Unless required by applicable law or agreed to in writing, software
2903
+ * distributed under the License is distributed on an "AS IS" BASIS,
2904
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2905
+ * See the License for the specific language governing permissions and
2906
+ * limitations under the License.
2907
+ */
2908
+ class nf extends fh{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return ph(e,this._buildIdpRequest())}_linkToIdToken(e,t){return ph(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return ph(e,this._buildIdpRequest())}_buildIdpRequest(e){const t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function rf(e){return kh(e.auth,new nf(e),e.bypassAuthState)}function sf(e){const{auth:t,user:n}=e;return Au(n,t,"internal-error"),
2909
+ /**
2910
+ * @license
2911
+ * Copyright 2019 Google LLC
2912
+ *
2913
+ * Licensed under the Apache License, Version 2.0 (the "License");
2914
+ * you may not use this file except in compliance with the License.
2915
+ * You may obtain a copy of the License at
2916
+ *
2917
+ * http://www.apache.org/licenses/LICENSE-2.0
2918
+ *
2919
+ * Unless required by applicable law or agreed to in writing, software
2920
+ * distributed under the License is distributed on an "AS IS" BASIS,
2921
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2922
+ * See the License for the specific language governing permissions and
2923
+ * limitations under the License.
2924
+ */
2925
+ async function(e,t,n=!1){const{auth:r}=e,i="reauthenticate";try{const s=await Pu(e,_h(r,i,t,e),n);Au(s.idToken,r,"internal-error");const o=Mu(s.idToken);Au(o,r,"internal-error");const{sub:d}=o;return Au(e.uid===d,r,"user-mismatch"),Ih._forOperation(e,i,s)}catch(e){throw"auth/user-not-found"===(null==e?void 0:e.code)&&uu(r,"user-mismatch"),e}}(n,new nf(e),e.bypassAuthState)}async function of(e){const{auth:t,user:n}=e;return Au(n,t,"internal-error"),async function(e,t,n=!1){const r=await Pu(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return Ih._forOperation(e,"link",r)}(n,new nf(e),e.bypassAuthState)}
2926
+ /**
2927
+ * @license
2928
+ * Copyright 2020 Google LLC
2929
+ *
2930
+ * Licensed under the Apache License, Version 2.0 (the "License");
2931
+ * you may not use this file except in compliance with the License.
2932
+ * You may obtain a copy of the License at
2933
+ *
2934
+ * http://www.apache.org/licenses/LICENSE-2.0
2935
+ *
2936
+ * Unless required by applicable law or agreed to in writing, software
2937
+ * distributed under the License is distributed on an "AS IS" BASIS,
2938
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2939
+ * See the License for the specific language governing permissions and
2940
+ * limitations under the License.
2941
+ */class df{constructor(e,t,n,r,i=!1){this.auth=e,this.resolver=n,this.user=r,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise((async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(e){this.reject(e)}}))}async onAuthEvent(e){const{urlResponse:t,sessionId:n,postBody:r,tenantId:i,error:s,type:o}=e;if(s)return void this.reject(s);const d={auth:this.auth,requestUri:t,sessionId:n,tenantId:i||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(o)(d))}catch(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return rf;case"linkViaPopup":case"linkViaRedirect":return of;case"reauthViaPopup":case"reauthViaRedirect":return sf;default:uu(this.auth,"internal-error")}}resolve(e){pu(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){pu(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}
2942
+ /**
2943
+ * @license
2944
+ * Copyright 2020 Google LLC
2945
+ *
2946
+ * Licensed under the Apache License, Version 2.0 (the "License");
2947
+ * you may not use this file except in compliance with the License.
2948
+ * You may obtain a copy of the License at
2949
+ *
2950
+ * http://www.apache.org/licenses/LICENSE-2.0
2951
+ *
2952
+ * Unless required by applicable law or agreed to in writing, software
2953
+ * distributed under the License is distributed on an "AS IS" BASIS,
2954
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2955
+ * See the License for the specific language governing permissions and
2956
+ * limitations under the License.
2957
+ */const af=new wu(2e3,1e4);class cf extends df{constructor(e,t,n,r,i){super(e,t,r,i),this.provider=n,this.authWindow=null,this.pollId=null,cf.currentPopupAction&&cf.currentPopupAction.cancel(),cf.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return Au(e,this.auth,"internal-error"),e}async onExecution(){pu(1===this.filter.length,"Popup operations only handle one event");const e=Bh();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch((e=>{this.reject(e)})),this.resolver._isIframeWebStorageSupported(this.auth,(e=>{e||this.reject(hu(this.auth,"web-storage-unsupported"))})),this.pollUserCancellation()}get eventId(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}cancel(){this.reject(hu(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,cf.currentPopupAction=null}pollUserCancellation(){const e=()=>{var t,n;(null===(n=null===(t=this.authWindow)||void 0===t?void 0:t.window)||void 0===n?void 0:n.closed)?this.pollId=window.setTimeout((()=>{this.pollId=null,this.reject(hu(this.auth,"popup-closed-by-user"))}),2e3):this.pollId=window.setTimeout(e,af.get())};e()}}cf.currentPopupAction=null;
2958
+ /**
2959
+ * @license
2960
+ * Copyright 2020 Google LLC
2961
+ *
2962
+ * Licensed under the Apache License, Version 2.0 (the "License");
2963
+ * you may not use this file except in compliance with the License.
2964
+ * You may obtain a copy of the License at
2965
+ *
2966
+ * http://www.apache.org/licenses/LICENSE-2.0
2967
+ *
2968
+ * Unless required by applicable law or agreed to in writing, software
2969
+ * distributed under the License is distributed on an "AS IS" BASIS,
2970
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2971
+ * See the License for the specific language governing permissions and
2972
+ * limitations under the License.
2973
+ */
2974
+ const lf="pendingRedirect",uf=new Map;class hf extends df{constructor(e,t,n=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,n),this.eventId=null}async execute(){let e=uf.get(this.auth._key());if(!e){try{const t=await async function(e,t){const n=function(e){return Ku(lf,e.config.apiKey,e.name)}(t),r=function(e){return gu(e._redirectPersistence)}(e);if(!await r._isAvailable())return!1;const i="true"===await r._get(n);return await r._remove(n),i}(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}uf.set(this.auth._key(),e)}return this.bypassAuthState||uf.set(this.auth._key(),(()=>Promise.resolve(null))),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"!==e.type){if(e.eventId){const t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}else this.resolve(null)}async onExecution(){}cleanUp(){}}function ff(e,t){uf.set(e._key(),t)}async function Af(e,t,n=!1){const r=ah(e),i=
2975
+ /**
2976
+ * @license
2977
+ * Copyright 2021 Google LLC
2978
+ *
2979
+ * Licensed under the Apache License, Version 2.0 (the "License");
2980
+ * you may not use this file except in compliance with the License.
2981
+ * You may obtain a copy of the License at
2982
+ *
2983
+ * http://www.apache.org/licenses/LICENSE-2.0
2984
+ *
2985
+ * Unless required by applicable law or agreed to in writing, software
2986
+ * distributed under the License is distributed on an "AS IS" BASIS,
2987
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2988
+ * See the License for the specific language governing permissions and
2989
+ * limitations under the License.
2990
+ */
2991
+ function(e,t){return t?gu(t):(Au(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}(r,t),s=new hf(r,i,n),o=await s.execute();return o&&!n&&(delete o.user._redirectEventId,await r._persistUserIfCurrent(o.user),await r._setRedirectUser(null,t)),o}
2992
+ /**
2993
+ * @license
2994
+ * Copyright 2020 Google LLC
2995
+ *
2996
+ * Licensed under the Apache License, Version 2.0 (the "License");
2997
+ * you may not use this file except in compliance with the License.
2998
+ * You may obtain a copy of the License at
2999
+ *
3000
+ * http://www.apache.org/licenses/LICENSE-2.0
3001
+ *
3002
+ * Unless required by applicable law or agreed to in writing, software
3003
+ * distributed under the License is distributed on an "AS IS" BASIS,
3004
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3005
+ * See the License for the specific language governing permissions and
3006
+ * limitations under the License.
3007
+ */class Nf{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach((n=>{this.isEventForConsumer(e,n)&&(t=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))})),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return mf(e);default:return!1}}
3008
+ /**
3009
+ * @license
3010
+ * Copyright 2020 Google LLC
3011
+ *
3012
+ * Licensed under the Apache License, Version 2.0 (the "License");
3013
+ * you may not use this file except in compliance with the License.
3014
+ * You may obtain a copy of the License at
3015
+ *
3016
+ * http://www.apache.org/licenses/LICENSE-2.0
3017
+ *
3018
+ * Unless required by applicable law or agreed to in writing, software
3019
+ * distributed under the License is distributed on an "AS IS" BASIS,
3020
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3021
+ * See the License for the specific language governing permissions and
3022
+ * limitations under the License.
3023
+ */(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var n;if(e.error&&!mf(e)){const r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(hu(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){const n=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(pf(e))}saveEventToCache(e){this.cachedEventUids.add(pf(e)),this.lastProcessedEventTime=Date.now()}}function pf(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter((e=>e)).join("-")}function mf({type:e,error:t}){return"unknown"===e&&"auth/no-auth-event"===(null==t?void 0:t.code)}
3024
+ /**
3025
+ * @license
3026
+ * Copyright 2020 Google LLC
3027
+ *
3028
+ * Licensed under the Apache License, Version 2.0 (the "License");
3029
+ * you may not use this file except in compliance with the License.
3030
+ * You may obtain a copy of the License at
3031
+ *
3032
+ * http://www.apache.org/licenses/LICENSE-2.0
3033
+ *
3034
+ * Unless required by applicable law or agreed to in writing, software
3035
+ * distributed under the License is distributed on an "AS IS" BASIS,
3036
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3037
+ * See the License for the specific language governing permissions and
3038
+ * limitations under the License.
3039
+ */
3040
+ const gf=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,$f=/^https?/;async function yf(e){if(e.config.emulator)return;const{authorizedDomains:t}=await async function(e,t={}){return Su(e,"GET","/v1/projects",t)}(e);for(const e of t)try{if(vf(e))return}catch(e){}uu(e,"unauthorized-domain")}function vf(e){const t=$u(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){const i=new URL(e);return""===i.hostname&&""===r?"chrome-extension:"===n&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===n&&i.hostname===r}if(!$f.test(n))return!1;if(gf.test(e))return r===e;const i=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}
3041
+ /**
3042
+ * @license
3043
+ * Copyright 2020 Google LLC.
3044
+ *
3045
+ * Licensed under the Apache License, Version 2.0 (the "License");
3046
+ * you may not use this file except in compliance with the License.
3047
+ * You may obtain a copy of the License at
3048
+ *
3049
+ * http://www.apache.org/licenses/LICENSE-2.0
3050
+ *
3051
+ * Unless required by applicable law or agreed to in writing, software
3052
+ * distributed under the License is distributed on an "AS IS" BASIS,
3053
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3054
+ * See the License for the specific language governing permissions and
3055
+ * limitations under the License.
3056
+ */const wf=new wu(3e4,6e4);function bf(){const e=jh().___jsl;if(null==e?void 0:e.H)for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let t=0;t<e.CP.length;t++)e.CP[t]=null}function Cf(e){return new Promise(((t,n)=>{var r,i,s;function o(){bf(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{bf(),n(hu(e,"network-request-failed"))},timeout:wf.get()})}if(null===(i=null===(r=jh().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else{if(!(null===(s=jh().gapi)||void 0===s?void 0:s.load)){const t=`__${"iframefcb"}${Math.floor(1e6*Math.random())}`;return jh()[t]=()=>{gapi.load?o():n(hu(e,"network-request-failed"))},tf(`https://apis.google.com/js/api.js?onload=${t}`).catch((e=>n(e)))}o()}})).catch((e=>{throw Ef=null,e}))}let Ef=null;
3057
+ /**
3058
+ * @license
3059
+ * Copyright 2020 Google LLC.
3060
+ *
3061
+ * Licensed under the Apache License, Version 2.0 (the "License");
3062
+ * you may not use this file except in compliance with the License.
3063
+ * You may obtain a copy of the License at
3064
+ *
3065
+ * http://www.apache.org/licenses/LICENSE-2.0
3066
+ *
3067
+ * Unless required by applicable law or agreed to in writing, software
3068
+ * distributed under the License is distributed on an "AS IS" BASIS,
3069
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3070
+ * See the License for the specific language governing permissions and
3071
+ * limitations under the License.
3072
+ */
3073
+ const If=new wu(5e3,15e3),Tf={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},Sf=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function _f(e){const t=e.config;Au(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?bu(t,"emulator/auth/iframe"):`https://${e.config.authDomain}/__/auth/iframe`,r={apiKey:t.apiKey,appName:e.name,v:oe},i=Sf.get(e.config.apiHost);i&&(r.eid=i);const s=e._getFrameworks();return s.length&&(r.fw=s.join(",")),`${n}?${N(r).slice(1)}`}async function kf(e){const t=await function(e){return Ef=Ef||Cf(e),Ef}(e),n=jh().gapi;return Au(n,e,"internal-error"),t.open({where:document.body,url:_f(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:Tf,dontclear:!0},(t=>new Promise((async(n,r)=>{await t.restyle({setHideOnLeave:!1});const i=hu(e,"network-request-failed"),s=jh().setTimeout((()=>{r(i)}),If.get());function o(){jh().clearTimeout(s),n(t)}t.ping(o).then(o,(()=>{r(i)}))}))))}
3074
+ /**
3075
+ * @license
3076
+ * Copyright 2020 Google LLC.
3077
+ *
3078
+ * Licensed under the Apache License, Version 2.0 (the "License");
3079
+ * you may not use this file except in compliance with the License.
3080
+ * You may obtain a copy of the License at
3081
+ *
3082
+ * http://www.apache.org/licenses/LICENSE-2.0
3083
+ *
3084
+ * Unless required by applicable law or agreed to in writing, software
3085
+ * distributed under the License is distributed on an "AS IS" BASIS,
3086
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3087
+ * See the License for the specific language governing permissions and
3088
+ * limitations under the License.
3089
+ */const Df={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class Rf{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}function Lf(e,t,n,r=500,s=600){const o=Math.max((window.screen.availHeight-s)/2,0).toString(),d=Math.max((window.screen.availWidth-r)/2,0).toString();let a="";const c=Object.assign(Object.assign({},Df),{width:r.toString(),height:s.toString(),top:o,left:d}),l=i().toLowerCase();n&&(a=Ju(l)?"_blank":n),Qu(l)&&(t=t||"http://localhost",c.scrollbars="yes");const u=Object.entries(c).reduce(((e,[t,n])=>`${e}${t}=${n},`),"");if(function(e=i()){var t;return nh(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(l)&&"_self"!==a)return function(e,t){const n=document.createElement("a");n.href=e,n.target=t;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}
3090
+ /**
3091
+ * @license
3092
+ * Copyright 2021 Google LLC
3093
+ *
3094
+ * Licensed under the Apache License, Version 2.0 (the "License");
3095
+ * you may not use this file except in compliance with the License.
3096
+ * You may obtain a copy of the License at
3097
+ *
3098
+ * http://www.apache.org/licenses/LICENSE-2.0
3099
+ *
3100
+ * Unless required by applicable law or agreed to in writing, software
3101
+ * distributed under the License is distributed on an "AS IS" BASIS,
3102
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3103
+ * See the License for the specific language governing permissions and
3104
+ * limitations under the License.
3105
+ */(t||"",a),new Rf(null);const h=window.open(t||"",a,u);Au(h,e,"popup-blocked");try{h.focus()}catch(e){}return new Rf(h)}const xf="__/auth/handler",Of="emulator/auth/handler";function Mf(e,t,n,r,i,s){Au(e.config.authDomain,e,"auth-domain-config-required"),Au(e.config.apiKey,e,"invalid-api-key");const o={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:oe,eventId:i};if(t instanceof yh){t.setDefaultLanguage(e.languageCode),o.providerId=t.providerId||"",function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(t.getCustomParameters())||(o.customParameters=JSON.stringify(t.getCustomParameters()));for(const[e,t]of Object.entries(s||{}))o[e]=t}if(t instanceof vh){const e=t.getScopes().filter((e=>""!==e));e.length>0&&(o.scopes=e.join(","))}e.tenantId&&(o.tid=e.tenantId);const d=o;for(const e of Object.keys(d))void 0===d[e]&&delete d[e];return`${function({config:e}){if(!e.emulator)return`https://${e.authDomain}/${xf}`;return bu(e,Of)}
3106
+ /**
3107
+ * @license
3108
+ * Copyright 2020 Google LLC
3109
+ *
3110
+ * Licensed under the Apache License, Version 2.0 (the "License");
3111
+ * you may not use this file except in compliance with the License.
3112
+ * You may obtain a copy of the License at
3113
+ *
3114
+ * http://www.apache.org/licenses/LICENSE-2.0
3115
+ *
3116
+ * Unless required by applicable law or agreed to in writing, software
3117
+ * distributed under the License is distributed on an "AS IS" BASIS,
3118
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3119
+ * See the License for the specific language governing permissions and
3120
+ * limitations under the License.
3121
+ */(e)}?${N(d).slice(1)}`}const Pf="webStorageSupport";const Uf=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Fh,this._completeRedirectFn=Af,this._overrideRedirectResult=ff}async _openPopup(e,t,n,r){var i;pu(null===(i=this.eventManagers[e._key()])||void 0===i?void 0:i.manager,"_initialize() not called before _openPopup()");return Lf(e,Mf(e,t,n,$u(),r),Bh())}async _openRedirect(e,t,n,r){var i;return await this._originValidation(e),i=Mf(e,t,n,$u(),r),jh().location.href=i,new Promise((()=>{}))}_initialize(e){const t=e._key();if(this.eventManagers[t]){const{manager:e,promise:n}=this.eventManagers[t];return e?Promise.resolve(e):(pu(n,"If manager is not set, promise should be"),n)}const n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch((()=>{delete this.eventManagers[t]})),n}async initAndGetManager(e){const t=await kf(e),n=new Nf(e);return t.register("authEvent",(t=>{Au(null==t?void 0:t.authEvent,e,"invalid-auth-event");return{status:n.onEvent(t.authEvent)?"ACK":"ERROR"}}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:n},this.iframes[e._key()]=t,n}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(Pf,{type:Pf},(n=>{var r;const i=null===(r=null==n?void 0:n[0])||void 0===r?void 0:r[Pf];void 0!==i&&t(!!i),uu(e,"internal-error")}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=yf(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return ih()||Yu()||nh()}};var Ff="@firebase/auth",Vf="0.21.0";
3122
+ /**
3123
+ * @license
3124
+ * Copyright 2020 Google LLC
3125
+ *
3126
+ * Licensed under the Apache License, Version 2.0 (the "License");
3127
+ * you may not use this file except in compliance with the License.
3128
+ * You may obtain a copy of the License at
3129
+ *
3130
+ * http://www.apache.org/licenses/LICENSE-2.0
3131
+ *
3132
+ * Unless required by applicable law or agreed to in writing, software
3133
+ * distributed under the License is distributed on an "AS IS" BASIS,
3134
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3135
+ * See the License for the specific language governing permissions and
3136
+ * limitations under the License.
3137
+ */
3138
+ class Bf{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){if(this.assertAuthConfigured(),await this.auth._initializationPromise,!this.auth.currentUser)return null;return{accessToken:await this.auth.currentUser.getIdToken(e)}}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const t=this.auth.onIdTokenChanged((t=>{e((null==t?void 0:t.stsTokenManager.accessToken)||null)}));this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){Au(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}
3139
+ /**
3140
+ * @license
3141
+ * Copyright 2020 Google LLC
3142
+ *
3143
+ * Licensed under the Apache License, Version 2.0 (the "License");
3144
+ * you may not use this file except in compliance with the License.
3145
+ * You may obtain a copy of the License at
3146
+ *
3147
+ * http://www.apache.org/licenses/LICENSE-2.0
3148
+ *
3149
+ * Unless required by applicable law or agreed to in writing, software
3150
+ * distributed under the License is distributed on an "AS IS" BASIS,
3151
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3152
+ * See the License for the specific language governing permissions and
3153
+ * limitations under the License.
3154
+ */
3155
+ /**
3156
+ * @license
3157
+ * Copyright 2021 Google LLC
3158
+ *
3159
+ * Licensed under the Apache License, Version 2.0 (the "License");
3160
+ * you may not use this file except in compliance with the License.
3161
+ * You may obtain a copy of the License at
3162
+ *
3163
+ * http://www.apache.org/licenses/LICENSE-2.0
3164
+ *
3165
+ * Unless required by applicable law or agreed to in writing, software
3166
+ * distributed under the License is distributed on an "AS IS" BASIS,
3167
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3168
+ * See the License for the specific language governing permissions and
3169
+ * limitations under the License.
3170
+ */
3171
+ const qf=a("authIdTokenMaxAge")||300;let jf=null;function Gf(e=ae()){const t=re(e,"auth");if(t.isInitialized())return t.getImmediate();const n=function(e,t){const n=re(e,"auth");if(n.isInitialized()){const e=n.getImmediate();if(f(n.getOptions(),null!=t?t:{}))return e;uu(e,"already-initialized")}return n.initialize({options:t})}(e,{popupRedirectResolver:Uf,persistence:[ef,Ph,Fh]}),r=a("authTokenSyncURL");if(r){const e=(i=r,async e=>{const t=e&&await e.getIdTokenResult(),n=t&&((new Date).getTime()-Date.parse(t.issuedAtTime))/1e3;if(n&&n>qf)return;const r=null==t?void 0:t.token;jf!==r&&(jf=r,await fetch(i,{method:r?"POST":"DELETE",headers:r?{Authorization:`Bearer ${r}`}:{}}))});!function(e,t,n){y(e).beforeAuthStateChanged(t,n)}(n,e,(()=>e(n.currentUser))),function(e,t,n,r){y(e).onIdTokenChanged(t,n,r)}(n,(t=>e(t)))}var i;const s=d("auth");return s&&lh(n,`http://${s}`),n}var zf;zf="Browser",ne(new v("auth",((e,{options:t})=>{const n=e.getProvider("app").getImmediate(),r=e.getProvider("heartbeat"),{apiKey:i,authDomain:s}=n.options;return((e,n)=>{Au(i&&!i.includes(":"),"invalid-api-key",{appName:e.name}),Au(!(null==s?void 0:s.includes(":")),"argument-error",{appName:e.name});const r={apiKey:i,authDomain:s,clientPlatform:zf,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:sh(zf)},o=new dh(e,n,r);return function(e,t){const n=(null==t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(gu);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null==t?void 0:t.popupRedirectResolver)}(o,t),o})(n,r)}),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback(((e,t,n)=>{e.getProvider("auth-internal").initialize()}))),ne(new v("auth-internal",(e=>(e=>new Bf(e))(ah(e.getProvider("auth").getImmediate()))),"PRIVATE").setInstantiationMode("EXPLICIT")),ce(Ff,Vf,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(zf)),ce(Ff,Vf,"esm2017");class Kf extends Error{constructor(){super("no frames found"),this.name="NoFramesFoundError"}}class Hf extends Error{constructor(){super("request timeout"),this.name="RequestTimeoutError"}}class Wf extends Error{constructor(){super("user not logged in"),this.name="UserNotLoggedInError"}}class Qf extends Error{constructor(){super("no colorway size assets found"),this.name="NoColorwaySizeAssetsFoundError"}}class Yf extends Error{constructor(){super("no styles found"),this.name="NoStylesFoundError"}}class Jf extends Error{constructor(e,t){super("recommended available sizes error"),this.name="RecommendedAvailableSizesError",this.recommended_size=e,this.available_sizes=t}}var Xf=Object.freeze({__proto__:null,NoFramesFoundError:Kf,RequestTimeoutError:Hf,UserNotLoggedInError:Wf,NoColorwaySizeAssetsFoundError:Qf,NoStylesFoundError:Yf,RecommendedAvailableSizesError:Jf});class Zf{constructor(e,t){this.firestore=e,this.auth=Gf(t),this.auth.setPersistence(Ph)}get id(){var e;return null===(e=this.user)||void 0===e?void 0:e.uid}onInit(){return new Promise((e=>{const t=this.auth.onAuthStateChanged((n=>{this.setUser(n),e(Boolean(n)),t()}))}))}setUser(e){this.user=e}async getToken(){var e;if(!(null===(e=this.user)||void 0===e?void 0:e.uid))throw new Wf;return await this.user.getIdToken()}async getUserProfile(){var e;if(!(null===(e=this.user)||void 0===e?void 0:e.uid))throw new Wf;const t=await Jl(function(e,t,...n){if(e=y(e),1===arguments.length&&(t=Yi.R()),Jc("doc","path",t),e instanceof il){const r=ns.fromString(t,...n);return Xc(r),new ol(e,null,new ss(r))}{if(!(e instanceof ol||e instanceof al))throw new Fi(Ui.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=e._path.child(ns.fromString(t,...n));return Xc(r),new ol(e.firestore,e instanceof al?e.converter:null,new ss(r))}}(this.firestore,"users",this.id));return t.data()}async login(e,t){this.auth.currentUser&&await this.auth.signOut();const n=await Lh(this.auth,e,t);this.setUser(n.user)}async logout(){await this.auth.signOut(),this.setUser(null)}async sendPasswordResetEmail(e){await Dh(this.auth,e)}async confirmPasswordReset(e,t){await Rh(this.auth,e,t)}}class eA{constructor(){this.promisefyOnSnapshot=e=>{let t;const n=new Promise((n=>t=function(e,...t){var n,r,i;e=y(e);let s={includeMetadataChanges:!1},o=0;"object"!=typeof t[o]||Nl(t[o])||(s=t[o],o++);const d={includeMetadataChanges:s.includeMetadataChanges};if(Nl(t[o])){const e=t[o];t[o]=null===(n=e.next)||void 0===n?void 0:n.bind(e),t[o+1]=null===(r=e.error)||void 0===r?void 0:r.bind(e),t[o+2]=null===(i=e.complete)||void 0===i?void 0:i.bind(e)}let a,c,l;if(e instanceof ol)c=tl(e.firestore,pl),l=Io(e._key.path),a={next:n=>{t[o]&&t[o](eu(c,e,n))},error:t[o+1],complete:t[o+2]};else{const n=tl(e,dl);c=tl(n.firestore,pl),l=n._query;const r=new Xl(c);a={next:e=>{t[o]&&t[o](new Ql(c,r,n,e))},error:t[o+1],complete:t[o+2]},Ol(e._query)}return function(e,t,n,r){const i=new ll(r),s=new _c(t,i,n);return e.asyncQueue.enqueueAndForget((async()=>Cc(await fl(e),s))),()=>{i.bc(),e.asyncQueue.enqueueAndForget((async()=>Ec(await fl(e),s)))}}(gl(c),l,d,a)}(e,(e=>n(e)))));return{promise:n,unsubscribe:()=>t()}};const e=de(tu.getInstance().firebase);this.firestore=ml(e),this.user=new Zf(this.firestore,e)}onInit(){return this.user.onInit()}query(e,t){const n=Ul(cl(this.firestore,e),t);return this.promisefyOnSnapshot(n)}getDocs(e,t){return Zl(Ul(cl(this.firestore,e),...t))}}const tA=e=>{if(e.code===au)throw new Error("account has been disabled");throw new Error(e.message)};class nA{static endpoint(){return tu.getInstance().api.url}static async Fetch({user:e,endpointPath:t,method:n,body:r,useToken:i=!0}){const s=this.getUrl(t,i),o={method:n,headers:await this.getHeaders(e,i),credentials:"include"};r&&(o.body=JSON.stringify(r));const d=await fetch(s,o);if(d.ok)return d;if(500===d.status)throw new Error(d.statusText);const a=await d.json();return Promise.reject(a)}static getUrl(e,t){return t?`${this.endpoint}/v1${e}`:this.endpoint+e}static async getHeaders(e,t){if(!t)return{"Content-Type":"application/json"};return{"Content-Type":"application/json",Authorization:`Bearer ${await e.getToken()}`}}static Get(e,t,n){return this.Fetch({user:e,endpointPath:t,method:"GET",body:null,useToken:n})}static Post(e,t,n=null,r){return this.Fetch({user:e,endpointPath:t,method:"POST",body:n,useToken:r})}static Put(e,t,n,r){return this.Fetch({user:e,endpointPath:t,method:"PUT",body:n,useToken:r})}static Patch(e,t,n,r){return this.Fetch({user:e,endpointPath:t,method:"PATCH",body:n,useToken:r})}static Delete(e,t,n,r){return this.Fetch({user:e,endpointPath:t,method:"DELETE",body:n,useToken:r})}}class rA{constructor(e,t){this.brandId=e,this.firebase=t;const n=tu.getInstance().config;rA.avatarTimeout=n.avatarTimeout?Number(n.avatarTimeout):12e4,rA.vtoTimeout=n.vtoTimeout?Number(n.vtoTimeout):12e4}get user(){return this.firebase.user}get isLoggedIn(){return!this.firebase||Boolean(this.user.id)}onInit(){return this.firebase.onInit()}async tryOn(e){if(!this.isLoggedIn)throw new Wf;try{return await this.getColorwaySizeAssetFrames(e)}catch(t){if(!(t instanceof Kf))throw t;return this.requestThenGetColorwaySizeAssetFrames(e)}}async awaitAvatarCreated(){if(!this.isLoggedIn)throw new Wf;const{promise:e,unsubscribe:t}=this.firebase.query("users",Vl(new vl("__name__"),"==",this.user.id)),n=setTimeout((()=>{throw t(),new Hf}),rA.avatarTimeout),r=await e;clearTimeout(n);return"CREATED"===r.docs[0].data().avatar_status}async getRecommendedSizes(e){if(!this.isLoggedIn)throw new Wf;const t=await nA.Get(this.user,`/styles/${e}/recommendation`);return await t.json()}async getStyles(e,t){const n=[Vl("brand_id","==",this.brandId)];(null==e?void 0:e.length)>0&&n.push(Vl("id","in",e)),(null==t?void 0:t.length)>0&&n.push(Vl("brand_style_id","in",t));try{const e=await this.firebase.getDocs("styles",n),t=new Map;return e.forEach((e=>{const n=e.data();t.set(n.id,n)})),t}catch(e){return tA(e)}}async submitTelephoneNumber(e){const t=e.replace(/[^\+0-9]/g,""),n=await nA.Post(this.user,"/ios-app-link",{phone_number:t},!1);console.log(n)}awaitColorwaySizeAssetFrames(e){if(!this.isLoggedIn)throw new Wf;return this.getColorwaySizeAssetFrames(e)}async requestThenGetColorwaySizeAssetFrames(e){var t,n;const[r,i]=await(s=this.getColorwaySizeAssetFromSku(e),s.then((e=>[null,e])).catch((e=>[e])));var s;if(r)throw r;try{return await this.requestColorwaySizeAssetFrames(i.id),this.awaitColorwaySizeAssetFrames(e)}catch(r){if(!r.recommended_size_id)throw new Error(r);const e=r,s=(await this.getStyles([i.style_id],null)).get(i.style_id);if(!(null==s?void 0:s.sizes))throw new Yf;const o=(null===(t=s.sizes[e.recommended_size_id])||void 0===t?void 0:t.label)||(null===(n=s.sizes[e.recommended_size_id])||void 0===n?void 0:n.size),d=e.available_size_ids.filter((e=>{var t;return(null===(t=s.sizes[e])||void 0===t?void 0:t.size)!==o})).map((e=>{var t,n;return(null===(t=s.sizes[e])||void 0===t?void 0:t.label)||(null===(n=s.sizes[e])||void 0===n?void 0:n.size)}));throw new Jf(o,d)}}async getColorwaySizeAssetFromSku(e){const t=await this.getColorwaySizeAssets(null,[e]);if(!(null==t?void 0:t.size))throw new Qf;return Array.from(t.values())[0]}async getColorwaySizeAssets(e,t){const n=[Vl("brand_id","==",this.brandId)];e&&n.push(Vl("style_id","==",e)),(null==t?void 0:t.length)>0&&n.push(Vl("sku","in",t));try{const e=await this.firebase.getDocs("colorway_size_assets",n),t=new Map;return e.forEach((e=>{const n=e.data();t.set(n.id,n)})),t}catch(e){return tA(e)}}async requestColorwaySizeAssetFrames(e){if(!this.isLoggedIn)throw new Wf;await nA.Post(this.user,`/colorway-size-assets/${e}/frames`)}async getColorwaySizeAssetFrames(e){var t,n,r;const i=await this.user.getUserProfile(),s=(null===(r=null===(n=null===(t=null==i?void 0:i.vto)||void 0===t?void 0:t[this.brandId])||void 0===n?void 0:n[e])||void 0===r?void 0:r.frames)||[];if(!s.length)throw new Kf;if(!await(e=>{const t=new Image;return t.src=e,new Promise((e=>{t.onerror=()=>e(!1),t.onload=()=>e(!0)}))})(s[0]))throw new Kf;return s}}var iA;!function(e){e.NOT_CREATED="NOT_CREATED",e.CREATED="CREATED",e.PENDING="PENDING"}(iA||(iA={}));const sA=rA.vtoTimeout;var oA="Back to sign in",dA="Don't have an account?",aA="Whoops! Looks like you don't have an avatar yet.",cA="Email address",lA="Please enter a valid email address.",uA="Enter your email address, we will send you a link to reset your password.",hA="Enter your phone number to be texted a link to download The Fitting Room app.",fA="Forgot password?",AA="Have an account? Sign in",NA="Your avatar is loading...",pA="Unfortunately, that size is not available for try on.",mA="or",gA="Password",$A="Please enter a valid password (at least 7 characters).",yA="Phone number",vA="Return to Catalog Page",wA="Return to Product Page",bA="Return to site",CA="Please return to The Fitting Room app to create your avatar.",EA="Send",IA="Sign back in",TA="Sign in",SA="Something went wrong. Try again!",_A="You have successfully logged out!",kA="The Fitting Room",DA="You can try on a size",RA="Username or password is empty.",LA="Virtual try on with";var xA=[],OA=[];function MA(e,t){if(e&&"undefined"!=typeof document){var n,r=!0===t.prepend?"prepend":"append",i=!0===t.singleTag,s="string"==typeof t.container?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(i){var o=xA.indexOf(s);-1===o&&(o=xA.push(s)-1,OA[o]={}),n=OA[o]&&OA[o][r]?OA[o][r]:OA[o][r]=d()}else n=d();65279===e.charCodeAt(0)&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function d(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),t.attributes)for(var n=Object.keys(t.attributes),i=0;i<n.length;i++)e.setAttribute(n[i],t.attributes[n[i]]);var o="prepend"===r?"afterbegin":"beforeend";return s.insertAdjacentElement(o,e),e}}MA(".tfr-bg-aquamarina-strong{background-color:#209da7}.tfr-c-white{color:#fff}.tfr-c-brand{color:#209da7}.tfr-c-dark{color:#000}.tfr-c-dark-o5{color:rgba(0,0,0,.5)}.tfr-c-red{color:red}",{});MA(".tfr-home-button-container{display:flex;flex-wrap:wrap;margin:20px}.tfr-home-button-container>button{border:0;cursor:pointer;height:60px;margin:20px;width:200px}.tfr-home-button-container>button:hover{background-color:#e6e6e6}[data-tfr=hidden]{display:none}.tfr-modal{align-items:center;background-color:rgba(0,0,0,.53);display:flex;height:100%;justify-content:center;left:0;overflow:auto;position:fixed;top:0;width:100%;z-index:10000}.tfr-modal-content{margin-left:auto;margin-right:auto;text-align:center;width:90%}.tfr-modal-content-container{background-color:#fff;border:1px solid #434343;border-radius:10px;box-shadow:0 6px 6px #00000029;line-height:normal;margin:auto;max-width:709px;width:100%}.tfr-close-container{text-align:end}.tfr-close{color:#aaa;font-size:28px;font-weight:700;height:50px;width:50px}.tfr-close:focus,.tfr-close:hover{color:#000;text-decoration:none}.tfr-cursor:hover{cursor:pointer}.tfr-underline{text-decoration:underline}.tfr-standard-button{border:0;border-radius:3px;color:#fff;height:43px;width:138px}.tfr-modal-title-logo-container{align-items:center;display:flex;justify-content:center}.tfr-girl-clothes{display:inline-block;height:316px;width:253px}.tfr-t-a-center{text-align:center}.tfr-w-70-p{width:70%}.tfr-w-80-p{width:80%}.tfr-w-85-p{width:85%}.tfr-w-150{width:150px}.tfr-h-150{height:150px}.tfr-d-none{display:none}.tfr-d-block{display:block}.tfr-d-flex{display:flex}.tfr-how-it-works-item{align-items:center;display:flex;justify-items:center}.tfr-try-on-content{margin-left:60px}#tfr-tryon-image{max-width:30vw}.progress-bar{background-color:#fff;border:1px solid #bdbdbd;height:10px;margin:15px auto 0;width:55%}.progress-bar-fill{animation-duration:120s;animation-name:progress;background-color:#209da7;color:#fff;display:block;font-size:16px;height:100%;text-align:center;transition:width .6s linear}.tfr-logo-box{background-color:#209da7;height:380px;margin:40px auto;width:430px}.tfr-flex,.tfr-logo-box{align-items:center;display:flex;justify-content:center}",{});MA("input{border:none;box-shadow:none!important;width:100%}input:focus,select:focus,textarea:focus{border:none;outline:none}.tfr-fieldset{margin-left:auto;margin-right:auto;width:65%}.tfr-fieldset,.tfr-fieldset-inline{border-color:rgba(0,0,0,.5);border-radius:10px;border-width:1px;padding:5px 10px 10px;text-align:left}.tfr-fieldset-inline{margin-right:10px;width:250px}.tfr-fieldset-err{border-color:red}",{});MA("@media screen and (max-width:702px){.tfr-modal-title-logo-container{display:flex;flex-direction:column-reverse}}@media screen and (max-width:500px){.tfr-fieldset{width:90%}.tfr-how-it-works-item{flex-direction:column}.tfr-try-on-content{margin-left:0;margin-top:20px}}",{});MA(".tfr-mt-10{margin-top:10px}.tfr-mt-20{margin-top:20px}.tfr-mt-15{margin-top:15px}.tfr-mt-30{margin-top:30px}.mt-40{margin-top:40px}.tfr-mb-40{margin-bottom:40px}.tfr-mb-20{margin-bottom:20px}.tfr-mr-10{margin-right:10px}.tfr-mr-15{margin-right:15px}.tfr-mt-50{margin-top:50px}.tfr-mt-60{margin-top:60px}.tfr-mb-60{margin-bottom:60px}.tfr-mr-20{margin-right:20px}.tfr-mt-15-p{margin-top:15%}.tfr-mb-13-p{margin-bottom:13%}.tfr-m-h-auto{margin-left:auto;margin-right:auto}.tfr-pt-20{padding-top:20px}.tfr-pb-50{padding-bottom:50px}.tfr-p-20{padding:20px}.tfr-pr-20{padding-right:20px}.tfr-pl-20{padding-left:20px}.tfr-pb-7-p{padding-bottom:7%}",{});MA(".flag-container{bottom:0;left:0;padding:1px;right:0;right:auto;top:0}.flag-container:hover{cursor:pointer}.selected-flag{align-items:center;display:flex;height:100%;padding:0 6px 0 8px;position:relative;z-index:1}.flag.bd{background-position:-418px 0;height:12px}.arrow{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #555;height:0;margin-left:6px;width:0}.arrow-up{border-bottom:6px solid #555;border-top:none}.country-list{-webkit-overflow-scrolling:touch;background-color:#fff;border-radius:5px;box-shadow:0 8px 10px 1px rgba(57,64,78,.7),0 3px 14px 2px rgba(57,64,78,.7),0 5px 5px -3px rgba(57,64,78,.7);cursor:pointer;display:none;font-size:16px;line-height:18px;list-style:none;margin:0 0 0 -1px;max-height:500px;overflow:auto;padding:0;position:absolute;text-align:left;top:50%;transform:translateY(-50%);white-space:nowrap;width:100%;width:auto;z-index:2}.country-list.active{display:inline-block}.country{outline:0;padding:5px 26px 5px 15px}.country-list .divider{border-bottom:1px solid rgba(0,0,0,.12);margin-bottom:5px;padding-bottom:5px}.country.highlight{background-color:#c7cace}.flag-box{display:inline-block;width:20px}.country-name,.flag-box{margin-right:6px}.country-name,.dial-code,.flag-box{vertical-align:middle}",{});MA(".tfr-title-font{font-family:Poppins,sans-serif}.tfr-body-font{font-family:Roboto,sans-serif}.tfr-light-24-300{font-size:24px;font-weight:300}.tfr-light-24-500{font-size:24px;font-weight:500}.tfr-light-22-300{font-size:22px;font-weight:300}.tfr-light-16-300{font-size:16px;font-weight:300}.tfr-medium-16-default{font-size:16px}.tfr-12-default{font-size:12px}.tfr-14-default{font-size:14px}.tfr-16-default{font-size:16px}",{});const PA=e=>({Hook:()=>{const t=document.querySelector(".progress-bar-fill");!function(e,t){let n=0;const r=e/200;t.style.width=n+"%";const i=setInterval((()=>{n>=100?clearInterval(i):(n+=.5,t.style.width=n+"%")}),r)}(e.timeoutMS,t)},Unhook:()=>{},Body:()=>`\n <div tfr-element="true" class="tfr-title-font tfr-light-22-300 tfr-c-dark tfr-mt-60" > ${NA} </div>\n <div class="progress-bar">\n <span class="progress-bar-fill"></span>\n </div>\n `}),UA=e=>{const t=document.getElementById(e);if(!t)throw new Error(`element with id ${e} not found`);let n;const r=()=>{n&&(n.Unhook(),d()),t.style.display="none"},i=e=>{"Escape"===e.key&&r()},s=e=>{const n=t.querySelector("#tfr-modal-background");e.target===n&&(console.debug("container close"),r())},o=()=>{t.querySelector("#tfr-close-container").addEventListener("click",r),document.addEventListener("keydown",i),document.addEventListener("click",s)},d=()=>{var n;const o=t.querySelector("#tfr-close-container");o?o.removeEventListener("click",r):(console.error("#tfr-close-container not found on unhook"),console.debug(null===(n=document.getElementById(e))||void 0===n?void 0:n.innerHTML)),document.removeEventListener("keydown",i),document.removeEventListener("click",s)};return{open:e=>{var r;n&&n.Unhook(),t.innerHTML=(r=e.Body(),`\n <div class="tfr-modal" id="tfr-modal-background">\n <div class="tfr-modal-content-container tfr-p-20">\n <div class="tfr-close-container">\n <span id="tfr-close-container" class="tfr-close tfr-cursor">&times;</span>\n </div>\n\n <div class="tfr-modal-content tfr-pt-20 tfr-pb-50">\n <div class="tfr-modal-title-logo-container">\n <div tfr-element="true" class="tfr-title-font tfr-light-24-300 tfr-c-dark tfr-mr-10">${LA}</div>\n <div class="tfr-mr-15">\n <svg width="26" height="47" viewBox="0 0 68 124" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.911938 0L67.4819 17.09V106.49L0.911938 123.51V0Z" fill="#209DA7">\n </path>\n <path d="M52.8019 64.44C54.7791 64.44 56.3819 62.4387 56.3819 59.97C56.3819 57.5013 54.7791 55.5 52.8019 55.5C50.8248 55.5 49.2219 57.5013 49.2219 59.97C49.2219 62.4387 50.8248 64.44 52.8019 64.44Z" fill="white">\n </path>\n </svg>\n </div>\n <div tfr-element="true" class="tfr-title-font tfr-light-24-500 tfr-c-dark tfr-mr-10">${kA}</div>\n </div>\n\t\t\t\t\t\t\t\t\t\t${r}\n </div>\n </div>\n </div>\n `),o(),e.Hook(),t.style.display="block",n=e},close:r,Content:()=>n}},FA=e=>{!function(e){var t=[];void 0===VA.preferredCountries&&null!==VA.preferredCountries||VA.preferredCountries.length&&VA.preferredCountries.forEach((function(e){var n=h(e.toUpperCase());n[1]&&t.push(n[1])}));var n=VA.preferredCountries.length?t.concat(VA.countries):VA.countries,r=` <div class="flag-container">\n <div class="selected-flag">\n <div class="flag ${n[0].cca2}"></div>\n <div class="arrow"></div>\n </div>\n </div>`;e.insertAdjacentHTML("beforebegin",r);r='<ul class="country-list"></ul>';e.insertAdjacentHTML("beforebegin",r);var i=e.previousElementSibling;if(t.length){p(i,t,"preferred");r='<li class="divider"></li>';i.insertAdjacentHTML("beforeend",r)}VA.countries.length&&p(i,VA.countries,"standard");e.value="+"+n[0].dialCode;var s,o=i.querySelector("li.country");o&&o.classList.add("active");function d(e,n){for(var r=h(n),i=t.length+r[0],s=0;s<t.length;s++)t[s].cca2==n&&(i=s);A(e,i),e.previousElementSibling.querySelector(".selected-flag .flag").setAttribute("class",`flag ${n.toLowerCase()}`)}function a(e,t){var r=e.parentElement;A(r,t),r.previousElementSibling.querySelector(".selected-flag .flag").setAttribute("class",`flag ${n[t].cca2.toLowerCase()}`);var i=r.nextElementSibling,s=f(i.value,n[t].dialCode);i.value=s,l()}function c(e,t=!0){if("undefined"!==e&&void 0!==e){var n=e.parentElement,r=n.querySelectorAll("li.country"),i=Array.from(r).indexOf(e),s=n.offsetHeight,o=e.offsetHeight,d=n.scrollTop,a=o*i;t?((a+o<d||a+o>d+s)&&n.scrollTo({top:a+o-s/2}),u(n)):n.scrollTo({top:a+o-s/2}),e.classList.add("highlight")}}function l(){u(e.previousElementSibling),e.previousElementSibling.classList.remove("active"),e.previousElementSibling.previousElementSibling.querySelector(".arrow").classList.remove("arrow-up")}function u(e){var t=e.querySelectorAll("li.country.highlight");t&&t.forEach((function(e){e.classList.remove("highlight")}))}function h(e){for(var t=0;t<VA.countries.length;t++)if(VA.countries[t].cca2.toUpperCase()==e)return[t,VA.countries[t]];return null}function f(e,t){var n,r="+"+GA(e).dialCode,i="+"+t;return r.length>1?(n=e.replace(r,i),e==r&&(n+=" ")):n=e.length&&"+"!=e.substr(0,1)?i+" "+e.trim():i+" ",n}function A(e,n){if(e.innerHTML="",t.length){p(e,t,"preferred");var r='<li class="divider"></li>';e.insertAdjacentHTML("beforeend",r)}VA.countries.length&&p(e,VA.countries,"standard"),e.querySelectorAll("li.country")[n].classList.add("active"),N(e)}function N(e){var t=!1,n=e.querySelectorAll("li.country"),r=e.previousElementSibling.querySelector(".selected-flag");r.addEventListener("click",(function(n){n.stopPropagation(),n.preventDefault(),t=!1,e.classList.add("active"),r.querySelector(".arrow").classList.toggle("arrow-up");var i=e.querySelector("li.active");if(i){function s(e){e.stopPropagation(),e.preventDefault()}function o(e){return e.stopPropagation(),e.preventDefault(),!{38:1,40:1}[e.keyCode]}c(i,!1);var d=!1;try{var a=Object.defineProperty({},"passive",{get:function(){d=!0}});window.addEventListener("testPassive",null,a),window.removeEventListener("testPassive",null,a)}catch(n){}function l(e){e.addEventListener("scroll",s,!1),e.addEventListener(h,s,!!d&&{passive:!1}),e.addEventListener("touchmove",s,!!d&&{passive:!1}),e.addEventListener("keydown",o,!1)}function u(e){e.removeEventListener("scroll",s,!1),e.removeEventListener(h,s,!!d&&{passive:!0}),e.removeEventListener("touchmove",s,!!d&&{passive:!0}),e.removeEventListener("keydown",o,!1)}var h="onwheel"in document.createElement("div")?"wheel":"DOMMouseScroll";e.addEventListener(h,(function(t){Math.sign(t.deltaY)<0?e.scrollTop<=0?l(e):u(e):Math.sign(t.deltaY)>0&&(e.scrollHeight-e.offsetHeight<=e.scrollTop?l(e):u(e))}),!!d&&{passive:!0})}})),n.forEach((function(e,n){e.addEventListener("click",(function(t){t.stopPropagation(),t.preventDefault(),a(e,n),l()})),e.addEventListener("mouseenter",(function(n){n.stopPropagation(),n.preventDefault(),t&&(t=!0,u(e.parentElement),e.classList.add("highlight"))})),e.addEventListener("mousemove",(function(n){n.stopPropagation(),n.preventDefault(),t||(t=!0,u(e.parentElement),e.classList.add("highlight"))}))}))}function p(e,t,n){var r="";t.forEach((function(e){r+=`<li class="country ${n}">\n <div class="flag-box">\n <div class="flag ${e.cca2}"></div>\n </div>\n <span class="country-name">${e.name}</span>\n <span class="dial-code">+${e.dialCode}</span>\n </li>`})),e.insertAdjacentHTML("beforeend",r)}N(i),e.addEventListener("keyup",(function(){var t=e.previousElementSibling,n=GA(e.value);if(n.prefixesDialCode){var r=t.previousElementSibling.querySelector(".selected-flag .flag"),i=function(e,t){var n,r=function(e,t){var n=e.replace(/\D/g,""),r={dialCode:n.substr(0,t.length),prefixes:n.substr(t.length,n.length),phoneNumber:e};return r}(e,t),i=BA[r.dialCode];if(null==i)n=null;else if(1==i.length)n=i[0];else for(var s=0;s<i.length;s++){if(null!=VA.phoneNumberValidator[i[s]][23]){if(0==r.prefixes.search(VA.phoneNumberValidator[i[s]][23])){n=i[s];break}}else if(-1!=zA(r.prefixes,VA.phoneNumberValidator[i[s]])){n=i[s];break}n=i[0]}return n}(e.value,n.prefixesDialCode);r.classList.contains(i)||d(t,i)}})),document.addEventListener("click",(function(){l()})),document.addEventListener("keydown",(function(e){var t=document.querySelector("ul.country-list.active");if(t){e.stopPropagation(),e.preventDefault();var n=t.querySelectorAll("li.country"),r=t.querySelector("li.active"),i=t.querySelector("li.highlight");s=i?Array.from(n).indexOf(i):Array.from(n).indexOf(r);n=t.querySelectorAll("li.country");"ArrowUp"===e.key&&c(n[s-1]),"ArrowDown"===e.key&&c(n[s+1]),"Enter"===e.key&&a(n[s],s),"Escape"!==e.key&&"Tab"!==e.key||l()}}))}(document.querySelector(e)),document.querySelector(e).addEventListener("keyup",(function(){var e=function(e){for(var t=e.getElementsByTagName("input"),n=[],r=0;r<t.length;r++)n.push({name:t[r].name,value:t[r].value});return n}(document.querySelector("form"));e.forEach((function(e){var t=e.name,n=e.value;switch(t){case"name":n=n.replace(/\s\s+|\t/g," ")||!1;break;case"email":n=n.replace(/\s+|\t/g,"").toLowerCase()||!1;break;case"phone":n=n.replace(/\s+|\t/g,"")||!1;break;default:n=n||!1}}))}))};for(var VA={preferredCountries:["us","gb","ca"],countries:[{name:"Afghanistan",cca2:"af",dialCode:"93"},{name:"Aland Islands",cca2:"ax",dialCode:"358"},{name:"Albania",cca2:"al",dialCode:"355"},{name:"Algeria",cca2:"dz",dialCode:"213"},{name:"American Samoa",cca2:"as",dialCode:"1",prefixes:["684"]},{name:"Andorra",cca2:"ad",dialCode:"376"},{name:"Angola",cca2:"ao",dialCode:"244"},{name:"Anguilla",cca2:"ai",dialCode:"1",prefixes:["264"]},{name:"Antigua and Barbuda",cca2:"ag",dialCode:"1",prefixes:["268"]},{name:"Argentina",cca2:"ar",dialCode:"54"},{name:"Armenia",cca2:"am",dialCode:"374"},{name:"Aruba",cca2:"aw",dialCode:"297"},{name:"Ascension Island",cca2:"ac",dialCode:"247"},{name:"Australia",cca2:"au",dialCode:"61"},{name:"Austria",cca2:"at",dialCode:"43"},{name:"Azerbaijan",cca2:"az",dialCode:"994"},{name:"Bahamas",cca2:"bs",dialCode:"1",prefixes:["242"]},{name:"Bahrain",cca2:"bh",dialCode:"973"},{name:"Bangladesh",cca2:"bd",dialCode:"880"},{name:"Barbados",cca2:"bb",dialCode:"1",prefixes:["246"]},{name:"Belarus",cca2:"by",dialCode:"375"},{name:"Belgium",cca2:"be",dialCode:"32"},{name:"Belize",cca2:"bz",dialCode:"501"},{name:"Benin",cca2:"bj",dialCode:"229"},{name:"Bermuda",cca2:"bm",dialCode:"1",prefixes:["441"]},{name:"Bhutan",cca2:"bt",dialCode:"975"},{name:"Bolivia",cca2:"bo",dialCode:"591"},{name:"Bosnia and Herzegovina",cca2:"ba",dialCode:"387"},{name:"Botswana",cca2:"bw",dialCode:"267"},{name:"Brazil",cca2:"br",dialCode:"55"},{name:"British Indian Ocean Territory",cca2:"io",dialCode:"246"},{name:"Brunei Darussalam",cca2:"bn",dialCode:"673"},{name:"Bulgaria",cca2:"bg",dialCode:"359"},{name:"Burkina Faso",cca2:"bf",dialCode:"226"},{name:"Burundi",cca2:"bi",dialCode:"257"},{name:"Cambodia",cca2:"kh",dialCode:"855"},{name:"Cameroon",cca2:"cm",dialCode:"237"},{name:"Canada",cca2:"ca",dialCode:"1",prefixes:["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]},{name:"Cape Verde",cca2:"cv",dialCode:"238"},{name:"Caribbean Netherlands",cca2:"bq",dialCode:"599"},{name:"Cayman Islands",cca2:"ky",dialCode:"1",prefixes:["345"]},{name:"Central African Republic",cca2:"cf",dialCode:"236"},{name:"Chad",cca2:"td",dialCode:"235"},{name:"Chile",cca2:"cl",dialCode:"56"},{name:"China",cca2:"cn",dialCode:"86"},{name:"Christmas Island",cca2:"cx",dialCode:"61"},{name:"Cocos (Keeling) Islands",cca2:"cc",dialCode:"61"},{name:"Colombia",cca2:"co",dialCode:"57"},{name:"Comoros",cca2:"km",dialCode:"269"},{name:"Congo (DRC)",cca2:"cd",dialCode:"243"},{name:"Congo (Republic)",cca2:"cg",dialCode:"242"},{name:"Cook Islands",cca2:"ck",dialCode:"682"},{name:"Costa Rica",cca2:"cr",dialCode:"506"},{name:"Côte d'Ivoire",cca2:"ci",dialCode:"225"},{name:"Croatia",cca2:"hr",dialCode:"385"},{name:"Cuba",cca2:"cu",dialCode:"53"},{name:"Curaçao",cca2:"cw",dialCode:"599"},{name:"Cyprus",cca2:"cy",dialCode:"357"},{name:"Czech Republic",cca2:"cz",dialCode:"420"},{name:"Denmark",cca2:"dk",dialCode:"45"},{name:"Djibouti",cca2:"dj",dialCode:"253"},{name:"Dominica",cca2:"dm",dialCode:"1",prefixes:["767"]},{name:"Dominican Republic",cca2:"do",dialCode:"1",prefixes:["809","829","849"]},{name:"Ecuador",cca2:"ec",dialCode:"593"},{name:"Egypt",cca2:"eg",dialCode:"20"},{name:"El Salvador",cca2:"sv",dialCode:"503"},{name:"Equatorial Guinea",cca2:"gq",dialCode:"240"},{name:"Eritrea",cca2:"er",dialCode:"291"},{name:"Estonia",cca2:"ee",dialCode:"372"},{name:"Ethiopia",cca2:"et",dialCode:"251"},{name:"Falkland Islands (Islas Malvinas)",cca2:"fk",dialCode:"500"},{name:"Faroe Islands",cca2:"fo",dialCode:"298"},{name:"Fiji",cca2:"fj",dialCode:"679"},{name:"Finland",cca2:"fi",dialCode:"358"},{name:"France",cca2:"fr",dialCode:"33"},{name:"French Guiana",cca2:"gf",dialCode:"594"},{name:"French Polynesia",cca2:"pf",dialCode:"689"},{name:"Gabon",cca2:"ga",dialCode:"241"},{name:"Gambia",cca2:"gm",dialCode:"220"},{name:"Georgia",cca2:"ge",dialCode:"995"},{name:"Germany",cca2:"de",dialCode:"49"},{name:"Ghana",cca2:"gh",dialCode:"233"},{name:"Gibraltar",cca2:"gi",dialCode:"350"},{name:"Greece",cca2:"gr",dialCode:"30"},{name:"Greenland",cca2:"gl",dialCode:"299"},{name:"Grenada",cca2:"gd",dialCode:"1",prefixes:["473"]},{name:"Guadeloupe",cca2:"gp",dialCode:"590"},{name:"Saint Pierre and Miquelon",cca2:"pm",dialCode:"508"},{name:"Saint Helena, Ascension and Tristan Da Cunha",cca2:"sh",dialCode:"290"},{name:"Guam",cca2:"gu",dialCode:"1",prefixes:["671"]},{name:"Guatemala",cca2:"gt",dialCode:"502"},{name:"Guernsey",cca2:"gg",dialCode:"44"},{name:"Guinea",cca2:"gn",dialCode:"224"},{name:"Guinea-Bissau",cca2:"gw",dialCode:"245"},{name:"Guyana",cca2:"gy",dialCode:"592"},{name:"Haiti",cca2:"ht",dialCode:"509"},{name:"Honduras",cca2:"hn",dialCode:"504"},{name:"Hong Kong",cca2:"hk",dialCode:"852"},{name:"Hungary",cca2:"hu",dialCode:"36"},{name:"Iceland",cca2:"is",dialCode:"354"},{name:"India",cca2:"in",dialCode:"91"},{name:"Indonesia",cca2:"id",dialCode:"62"},{name:"Iran",cca2:"ir",dialCode:"98"},{name:"Iraq",cca2:"iq",dialCode:"964"},{name:"Ireland",cca2:"ie",dialCode:"353"},{name:"Isle of Man",cca2:"im",dialCode:"44"},{name:"Israel",cca2:"il",dialCode:"972"},{name:"Italy",cca2:"it",dialCode:"39"},{name:"Jamaica",cca2:"jm",dialCode:"1",prefixes:["876"]},{name:"Japan",cca2:"jp",dialCode:"81"},{name:"Jersey",cca2:"je",dialCode:"44"},{name:"Jordan",cca2:"jo",dialCode:"962"},{name:"Kazakhstan",cca2:"kz",dialCode:"7"},{name:"Kenya",cca2:"ke",dialCode:"254"},{name:"Kiribati",cca2:"ki",dialCode:"686"},{name:"Kuwait",cca2:"kw",dialCode:"965"},{name:"Kyrgyzstan",cca2:"kg",dialCode:"996"},{name:"Laos",cca2:"la",dialCode:"856"},{name:"Latvia",cca2:"lv",dialCode:"371"},{name:"Lebanon",cca2:"lb",dialCode:"961"},{name:"Lesotho",cca2:"ls",dialCode:"266"},{name:"Liberia",cca2:"lr",dialCode:"231"},{name:"Libya",cca2:"ly",dialCode:"218"},{name:"Liechtenstein",cca2:"li",dialCode:"423"},{name:"Lithuania",cca2:"lt",dialCode:"370"},{name:"Luxembourg",cca2:"lu",dialCode:"352"},{name:"Macao",cca2:"mo",dialCode:"853"},{name:"Macedonia",cca2:"mk",dialCode:"389"},{name:"Madagascar",cca2:"mg",dialCode:"261"},{name:"Malawi",cca2:"mw",dialCode:"265"},{name:"Malaysia",cca2:"my",dialCode:"60"},{name:"Maldives",cca2:"mv",dialCode:"960"},{name:"Mali",cca2:"ml",dialCode:"223"},{name:"Malta",cca2:"mt",dialCode:"356"},{name:"Marshall Islands",cca2:"mh",dialCode:"692"},{name:"Martinique",cca2:"mq",dialCode:"596"},{name:"Mauritania",cca2:"mr",dialCode:"222"},{name:"Mauritius",cca2:"mu",dialCode:"230"},{name:"Mayotte",cca2:"yt",dialCode:"262"},{name:"Mexico",cca2:"mx",dialCode:"52"},{name:"Micronesia",cca2:"fm",dialCode:"691"},{name:"Moldova",cca2:"md",dialCode:"373"},{name:"Monaco",cca2:"mc",dialCode:"377"},{name:"Mongolia",cca2:"mn",dialCode:"976"},{name:"Montenegro",cca2:"me",dialCode:"382"},{name:"Montserrat",cca2:"ms",dialCode:"1",prefixes:["664"]},{name:"Morocco",cca2:"ma",dialCode:"212"},{name:"Mozambique",cca2:"mz",dialCode:"258"},{name:"Myanmar (Burma)",cca2:"mm",dialCode:"95"},{name:"Namibia",cca2:"na",dialCode:"264"},{name:"Nauru",cca2:"nr",dialCode:"674"},{name:"Nepal",cca2:"np",dialCode:"977"},{name:"Netherlands",cca2:"nl",dialCode:"31"},{name:"New Caledonia",cca2:"nc",dialCode:"687"},{name:"New Zealand",cca2:"nz",dialCode:"64"},{name:"Nicaragua",cca2:"ni",dialCode:"505"},{name:"Niger",cca2:"ne",dialCode:"227"},{name:"Nigeria",cca2:"ng",dialCode:"234"},{name:"Niue",cca2:"NU",dialCode:"683"},{name:"Norfolk Island",cca2:"NF",dialCode:"672"},{name:"North Korea",cca2:"kp",dialCode:"850"},{name:"Norway",cca2:"no",dialCode:"47"},{name:"Oman",cca2:"om",dialCode:"968"},{name:"Pakistan",cca2:"pk",dialCode:"92"},{name:"Palau",cca2:"pw",dialCode:"680"},{name:"Palestinian Territory",cca2:"ps",dialCode:"970"},{name:"Panama",cca2:"pa",dialCode:"507"},{name:"Papua New Guinea",cca2:"pg",dialCode:"675"},{name:"Paraguay",cca2:"py",dialCode:"595"},{name:"Peru",cca2:"pe",dialCode:"51"},{name:"Philippines",cca2:"ph",dialCode:"63"},{name:"Poland",cca2:"pl",dialCode:"48"},{name:"Portugal",cca2:"pt",dialCode:"351"},{name:"Puerto Rico",cca2:"pr",dialCode:"1",prefixes:["787","939"]},{name:"Qatar",cca2:"qa",dialCode:"974"},{name:"Réunion",cca2:"re",dialCode:"262"},{name:"Saint Barthelemy",cca2:"bl",dialCode:"590"},{name:"Romania",cca2:"ro",dialCode:"40"},{name:"Russian Federation",cca2:"ru",dialCode:"7"},{name:"Rwanda",cca2:"rw",dialCode:"250"},{name:"Saint Kitts and Nevis",cca2:"kn",dialCode:"1",prefixes:["869"]},{name:"Saint Lucia",cca2:"lc",dialCode:"1",prefixes:["758"]},{name:"Saint Martin (Saint-Martin",cca2:"mf",dialCode:"590"},{name:"Saint Vincent and the Grenadines",cca2:"vc",dialCode:"1",prefixes:["784"]},{name:"Samoa",cca2:"ws",dialCode:"685"},{name:"San Marino",cca2:"sm",dialCode:"378"},{name:"São Tomé and Príncipe",cca2:"st",dialCode:"239"},{name:"Saudi Arabia",cca2:"sa",dialCode:"966"},{name:"Senegal",cca2:"sn",dialCode:"221"},{name:"Serbia",cca2:"rs",dialCode:"381"},{name:"Seychelles",cca2:"sc",dialCode:"248"},{name:"Sierra Leone",cca2:"sl",dialCode:"232"},{name:"Singapore",cca2:"sg",dialCode:"65"},{name:"Slovakia",cca2:"sk",dialCode:"421"},{name:"Slovenia",cca2:"si",dialCode:"386"},{name:"Solomon Islands",cca2:"sb",dialCode:"677"},{name:"Somalia",cca2:"so",dialCode:"252"},{name:"South Africa",cca2:"za",dialCode:"27"},{name:"South Korea",cca2:"kr",dialCode:"82"},{name:"South Sudan",cca2:"ss",dialCode:"211"},{name:"Spain",cca2:"es",dialCode:"34"},{name:"Sri Lanka",cca2:"lk",dialCode:"94"},{name:"Sudan",cca2:"sd",dialCode:"249"},{name:"Suriname",cca2:"sr",dialCode:"597"},{name:"Swaziland",cca2:"sz",dialCode:"268"},{name:"Sweden",cca2:"se",dialCode:"46"},{name:"Switzerland",cca2:"ch",dialCode:"41"},{name:"Syrian Arab Republic",cca2:"sy",dialCode:"963"},{name:"Taiwan, Province of China",cca2:"tw",dialCode:"886"},{name:"Tajikistan",cca2:"tj",dialCode:"992"},{name:"Tanzania",cca2:"tz",dialCode:"255"},{name:"Thailand",cca2:"th",dialCode:"66"},{name:"Timor-Leste",cca2:"tl",dialCode:"670"},{name:"Togo",cca2:"tg",dialCode:"228"},{name:"Tokelau",cca2:"tk",dialCode:"690"},{name:"Tonga",cca2:"to",dialCode:"676"},{name:"Trinidad and Tobago",cca2:"tt",dialCode:"1",prefixes:["868"]},{name:"Tristan da Cunha",cca2:"ta",dialCode:"290"},{name:"Tunisia",cca2:"tn",dialCode:"216"},{name:"Turkey",cca2:"tr",dialCode:"90"},{name:"Turkmenistan",cca2:"tm",dialCode:"993"},{name:"Turks and Caicos Islands",cca2:"tc",dialCode:"1",prefixes:["649"]},{name:"Tuvalu",cca2:"tv",dialCode:"688"},{name:"Uganda",cca2:"ug",dialCode:"256"},{name:"Ukraine",cca2:"ua",dialCode:"380"},{name:"United Arab Emirates",cca2:"ae",dialCode:"971"},{name:"United Kingdom",cca2:"gb",dialCode:"44"},{name:"United States",cca2:"us",dialCode:"1"},{name:"Uruguay",cca2:"uy",dialCode:"598"},{name:"Uzbekistan",cca2:"uz",dialCode:"998"},{name:"Vanuatu",cca2:"vu",dialCode:"678"},{name:"Vatican City",cca2:"va",dialCode:"379"},{name:"Venezuela",cca2:"ve",dialCode:"58"},{name:"Viet Nam",cca2:"vn",dialCode:"84"},{name:"Virgin Islands (British)",cca2:"vg",dialCode:"1",prefixes:["284"]},{name:"Virgin Islands (U.S.)",cca2:"vi",dialCode:"1",prefixes:["340"]},{name:"Wallis and Futuna",cca2:"wf",dialCode:"681"},{name:"Western Sahara",cca2:"eh",dialCode:"212"},{name:"Yemen",cca2:"ye",dialCode:"967"},{name:"Zambia",cca2:"zm",dialCode:"260"},{name:"Zimbabwe",cca2:"zw",dialCode:"263"}],countryCodes:{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"],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"],379:["VA"],380:["UA"],381:["RS"],382:["ME"],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"]},phoneNumberValidator:{AC:[,[,,"[46]\\d{4}|[01589]\\d{5}","\\d{5,6}"],[,,"6[2-467]\\d{3}","\\d{5}",,,"62889"],[,,"4\\d{4}","\\d{5}",,,"40123"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"AC",247,"00",,,,,,,,,,[,,"NA","NA"],,,[,,"NA","NA"],[,,"[01589]\\d{5}","\\d{6}",,,"542011"],,,[,,"NA","NA"]],AD:[,[,,"(?:[346-9]|180)\\d{5}","\\d{6,8}"],[,,"[78]\\d{5}","\\d{6}",,,"712345"],[,,"[346]\\d{5}","\\d{6}",,,"312345"],[,,"180[02]\\d{4}","\\d{8}",,,"18001234"],[,,"9\\d{5}","\\d{6}",,,"912345"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"AD",376,"00",,,,,,,,[[,"(\\d{3})(\\d{3})","$1 $2",["[346-9]"],"","",0],[,"(180[02])(\\d{4})","$1 $2",["1"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],AE:[,[,,"[2-79]\\d{7,8}|800\\d{2,9}","\\d{5,12}"],[,,"[2-4679][2-8]\\d{6}","\\d{7,8}",,,"22345678"],[,,"5[0256]\\d{7}","\\d{9}",,,"501234567"],[,,"400\\d{6}|800\\d{2,9}","\\d{5,12}",,,"800123456"],[,,"900[02]\\d{5}","\\d{9}",,,"900234567"],[,,"700[05]\\d{5}","\\d{9}",,,"700012345"],[,,"NA","NA"],[,,"NA","NA"],"AE",971,"00","0",,,"0",,,,[[,"([2-4679])(\\d{3})(\\d{4})","$1 $2 $3",["[2-4679][2-8]"],"0$1","",0],[,"(5[0256])(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1","",0],[,"([479]00)(\\d)(\\d{5})","$1 $2 $3",["[479]0"],"$1","",0],[,"([68]00)(\\d{2,9})","$1 $2",["60|8"],"$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"600[25]\\d{5}","\\d{9}",,,"600212345"],,,[,,"NA","NA"]],AF:[,[,,"[2-7]\\d{8}","\\d{7,9}"],[,,"(?:[25][0-8]|[34][0-4]|6[0-5])[2-9]\\d{6}","\\d{7,9}",,,"234567890"],[,,"7(?:[014-9]\\d{7}|2[89]\\d{6})","\\d{9}",,,"701234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"AF",93,"00","0",,,"0",,,,[[,"([2-7]\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],AG:[,[,,"[2589]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"268(?:4(?:6[0-38]|84)|56[0-2])\\d{4}","\\d{7}(?:\\d{3})?",,,"2684601234"],[,,"268(?:464|7(?:2[0-9]|64|7[0-689]|8[02-68]))\\d{4}","\\d{10}",,,"2684641234"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002123456"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002123456"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"26848[01]\\d{4}","\\d{10}",,,"2684801234"],"AG",1,"011","1",,,"1",,,,,,[,,"26840[69]\\d{4}","\\d{10}",,,"2684061234"],,"268",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],AI:[,[,,"[2589]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"2644(?:6[12]|9[78])\\d{4}","\\d{7}(?:\\d{3})?",,,"2644612345"],[,,"264(?:235|476|5(?:3[6-9]|8[1-4])|7(?:29|72))\\d{4}","\\d{10}",,,"2642351234"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002123456"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002123456"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"AI",1,"011","1",,,"1",,,,,,[,,"NA","NA"],,"264",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],AL:[,[,,"[2-57]\\d{7}|6\\d{8}|8\\d{5,7}|9\\d{5}","\\d{5,9}"],[,,"(?:2(?:[168][1-9]|[247]\\d|9[1-7])|3(?:1[1-3]|[2-6]\\d|[79][1-8]|8[1-9])|4\\d{2}|5(?:1[1-4]|[2-578]\\d|6[1-5]|9[1-7])|8(?:[19][1-5]|[2-6]\\d|[78][1-7]))\\d{5}","\\d{5,8}",,,"22345678"],[,,"6[6-9]\\d{7}","\\d{9}",,,"661234567"],[,,"800\\d{4}","\\d{7}",,,"8001234"],[,,"900\\d{3}","\\d{6}",,,"900123"],[,,"808\\d{3}","\\d{6}",,,"808123"],[,,"700\\d{5}","\\d{8}",,,"70012345"],[,,"NA","NA"],"AL",355,"00","0",,,"0",,,,[[,"(4)(\\d{3})(\\d{4})","$1 $2 $3",["4[0-6]"],"0$1","",0],[,"(6[6-9])(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1","",0],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4[7-9]"],"0$1","",0],[,"(\\d{3})(\\d{3,5})","$1 $2",["[235][16-9]|8[016-9]|[79]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],AM:[,[,,"[1-9]\\d{7}","\\d{5,8}"],[,,"(?:1[01]\\d|2(?:2[2-46]|3[1-8]|4[2-69]|5[2-7]|6[1-9]|8[1-7])|3[12]2|47\\d)\\d{5}","\\d{5,8}",,,"10123456"],[,,"(?:4[139]|55|77|9[1-9])\\d{6}","\\d{8}",,,"77123456"],[,,"800\\d{5}","\\d{8}",,,"80012345"],[,,"90[016]\\d{5}","\\d{8}",,,"90012345"],[,,"80[1-4]\\d{5}","\\d{8}",,,"80112345"],[,,"NA","NA"],[,,"60[2-6]\\d{5}","\\d{8}",,,"60271234"],"AM",374,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)","",0],[,"(\\d{2})(\\d{6})","$1 $2",["4[139]|[5-7]|9[1-9]"],"0$1","",0],[,"(\\d{3})(\\d{5})","$1 $2",["[23]"],"(0$1)","",0],[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8|90"],"0 $1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],AO:[,[,,"[29]\\d{8}","\\d{9}"],[,,"2\\d(?:[26-9]\\d|\\d[26-9])\\d{5}","\\d{9}",,,"222123456"],[,,"9[1-49]\\d{7}","\\d{9}",,,"923123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"AO",244,"00",,,,,,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],AR:[,[,,"11\\d{8}|[2368]\\d{9}|9\\d{10}","\\d{6,11}"],[,,"11\\d{8}|(?:2(?:2(?:[013]\\d|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[067]\\d)|4(?:7[3-8]|9\\d)|6(?:[01346]\\d|2[24-6]|5[15-8])|80\\d|9(?:[0124789]\\d|3[1-6]|5[234]|6[2-46]))|3(?:3(?:2[79]|6\\d|8[2578])|4(?:[78]\\d|0[0124-9]|[1-35]\\d|4[24-7]|6[02-9]|9[123678])|5(?:[138]\\d|2[1245]|4[1-9]|6[2-4]|7[1-6])|6[24]\\d|7(?:[0469]\\d|1[1568]|2[013-9]|3[145]|5[14-8]|7[2-57]|8[0-24-9])|8(?:[013578]\\d|2[15-7]|4[13-6]|6[1-357-9]|9[124]))|670\\d)\\d{6}","\\d{6,10}",,,"1123456789"],[,,"675\\d{7}|9(?:11[2-9]\\d{7}|(?:2(?:2[013]|3[067]|49|6[01346]|80|9[147-9])|3(?:36|4[12358]|5[138]|6[24]|7[069]|8[013578]))[2-9]\\d{6}|\\d{4}[2-9]\\d{5})","\\d{6,11}",,,"91123456789"],[,,"800\\d{7}","\\d{10}",,,"8001234567"],[,,"60[04579]\\d{7}","\\d{10}",,,"6001234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"AR",54,"00","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",,,[[,"([68]\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1","",0],[,"(\\d{2})(\\d{4})","$1-$2",["[2-9]"],"$1","",0],[,"(\\d{3})(\\d{4})","$1-$2",["[2-9]"],"$1","",0],[,"(\\d{4})(\\d{4})","$1-$2",["[2-9]"],"$1","",0],[,"(9)(11)(\\d{4})(\\d{4})","$2 15-$3-$4",["911"],"0$1","",0],[,"(9)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9(?:2[234689]|3[3-8])","9(?:2(?:2[013]|3[067]|49|6[01346]|80|9[147-9])|3(?:36|4[1-358]|5[138]|6[24]|7[069]|8[013578]))","9(?:2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|[358]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45])))"],"0$1","",0],[,"(9)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9[23]"],"0$1","",0],[,"(11)(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1","",1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["2(?:2[013]|3[067]|49|6[01346]|80|9[147-9])|3(?:36|4[1-358]|5[138]|6[24]|7[069]|8[013578])","2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|[358]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45]))"],"0$1","",1],[,"(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["[23]"],"0$1","",1],[,"(\\d{3})","$1",["1[012]|911"],"$1","",0]],[[,"([68]\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1","",0],[,"(9)(11)(\\d{4})(\\d{4})","$1 $2 $3-$4",["911"]],[,"(9)(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3-$4",["9(?:2[234689]|3[3-8])","9(?:2(?:2[013]|3[067]|49|6[01346]|80|9[147-9])|3(?:36|4[1-358]|5[138]|6[24]|7[069]|8[013578]))","9(?:2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|[358]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45])))"]],[,"(9)(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3-$4",["9[23]"]],[,"(11)(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1","",1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["2(?:2[013]|3[067]|49|6[01346]|80|9[147-9])|3(?:36|4[1-358]|5[138]|6[24]|7[069]|8[013578])","2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|[358]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45]))"],"0$1","",1],[,"(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["[23]"],"0$1","",1]],[,,"NA","NA"],,,[,,"810\\d{7}","\\d{10}",,,"8101234567"],[,,"810\\d{7}","\\d{10}",,,"8101234567"],,,[,,"NA","NA"]],AS:[,[,,"[5689]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"6846(?:22|33|44|55|77|88|9[19])\\d{4}","\\d{7}(?:\\d{3})?",,,"6846221234"],[,,"684(?:2(?:5[2468]|72)|7(?:3[13]|70))\\d{4}","\\d{10}",,,"6847331234"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002123456"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002123456"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"AS",1,"011","1",,,"1",,,,,,[,,"NA","NA"],,"684",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],AT:[,[,,"[1-9]\\d{3,12}","\\d{3,13}"],[,,"1\\d{3,12}|(?:2(?:1[467]|2[13-8]|5[2357]|6[1-46-8]|7[1-8]|8[124-7]|9[1458])|3(?:1[1-8]|3[23568]|4[5-7]|5[1378]|6[1-38]|8[3-68])|4(?:2[1-8]|35|63|7[1368]|8[2457])|5(?:12|2[1-8]|3[357]|4[147]|5[12578]|6[37])|6(?:13|2[1-47]|4[1-35-8]|5[468]|62)|7(?:2[1-8]|3[25]|4[13478]|5[68]|6[16-8]|7[1-6]|9[45]))\\d{3,10}","\\d{3,13}",,,"1234567890"],[,,"6(?:44|5[0-3579]|6[013-9]|[7-9]\\d)\\d{4,10}","\\d{7,13}",,,"644123456"],[,,"80[02]\\d{6,10}","\\d{9,13}",,,"800123456"],[,,"(?:711|9(?:0[01]|3[019]))\\d{6,10}","\\d{9,13}",,,"900123456"],[,,"8(?:10|2[018])\\d{6,10}","\\d{9,13}",,,"810123456"],[,,"NA","NA"],[,,"780\\d{6,10}","\\d{9,13}",,,"780123456"],"AT",43,"00","0",,,"0",,,,[[,"(1)(\\d{3,12})","$1 $2",["1"],"0$1","",0],[,"(5\\d)(\\d{3,5})","$1 $2",["5[079]"],"0$1","",0],[,"(5\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["5[079]"],"0$1","",0],[,"(5\\d)(\\d{4})(\\d{4,7})","$1 $2 $3",["5[079]"],"0$1","",0],[,"(\\d{3})(\\d{3,10})","$1 $2",["316|46|51|732|6(?:44|5[0-3579]|[6-9])|7(?:1|[28]0)|[89]"],"0$1","",0],[,"(\\d{4})(\\d{3,9})","$1 $2",["2|3(?:1[1-578]|[3-8])|4[2378]|5[2-6]|6(?:[12]|4[1-35-9]|5[468])|7(?:2[1-8]|35|4[1-8]|[5-79])"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"5(?:(?:0[1-9]|17)\\d{2,10}|[79]\\d{3,11})|720\\d{6,10}","\\d{5,13}",,,"50123"],,,[,,"NA","NA"]],AU:[,[,,"[1-578]\\d{5,9}","\\d{6,10}"],[,,"[237]\\d{8}|8(?:[68]\\d{3}|7[0-69]\\d{2}|9(?:[02-9]\\d{2}|1(?:[0-57-9]\\d|6[0135-9])))\\d{4}","\\d{8,9}",,,"212345678"],[,,"14(?:5\\d|71)\\d{5}|4(?:[0-2]\\d|3[0-57-9]|4[47-9]|5[0-25-9]|6[6-9]|7[03-9]|8[17-9]|9[017-9])\\d{6}","\\d{9}",,,"412345678"],[,,"180(?:0\\d{3}|2)\\d{3}","\\d{7,10}",,,"1800123456"],[,,"190[0126]\\d{6}","\\d{10}",,,"1900123456"],[,,"13(?:00\\d{2})?\\d{4}","\\d{6,10}",,,"1300123456"],[,,"500\\d{6}","\\d{9}",,,"500123456"],[,,"550\\d{6}","\\d{9}",,,"550123456"],"AU",61,"(?:14(?:1[14]|34|4[17]|[56]6|7[47]|88))?001[14-689]","0",,,"0",,"0011",,[[,"([2378])(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)","",0],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[45]|14"],"0$1","",0],[,"(16)(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1","",0],[,"(1[389]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[38]0|90)","1(?:[38]00|90)"],"$1","",0],[,"(180)(2\\d{3})","$1 $2",["180","1802"],"$1","",0],[,"(19\\d)(\\d{3})","$1 $2",["19[13]"],"$1","",0],[,"(19\\d{2})(\\d{4})","$1 $2",["19[67]"],"$1","",0],[,"(13)(\\d{2})(\\d{2})","$1 $2 $3",["13[1-9]"],"$1","",0]],,[,,"16\\d{3,7}","\\d{5,9}",,,"1612345"],1,,[,,"1(?:3(?:\\d{4}|00\\d{6})|80(?:0\\d{6}|2\\d{3}))","\\d{6,10}",,,"1300123456"],[,,"NA","NA"],,,[,,"NA","NA"]],AW:[,[,,"[25-9]\\d{6}","\\d{7}"],[,,"5(?:2\\d|8[1-9])\\d{4}","\\d{7}",,,"5212345"],[,,"(?:5(?:6\\d|9[2-478])|6(?:[039]0|22|4[01]|6[0-2])|7[34]\\d|9(?:6[45]|9[4-8]))\\d{4}","\\d{7}",,,"5601234"],[,,"800\\d{4}","\\d{7}",,,"8001234"],[,,"900\\d{4}","\\d{7}",,,"9001234"],[,,"NA","NA"],[,,"NA","NA"],[,,"28\\d{5}|501\\d{4}","\\d{7}",,,"5011234"],"AW",297,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],AX:[,[,,"[135]\\d{5,9}|[27]\\d{4,9}|4\\d{5,10}|6\\d{7,8}|8\\d{6,9}","\\d{5,12}"],[,,"18[1-8]\\d{3,9}","\\d{6,12}",,,"1812345678"],[,,"4\\d{5,10}|50\\d{4,8}","\\d{6,11}",,,"412345678"],[,,"800\\d{4,7}","\\d{7,10}",,,"8001234567"],[,,"[67]00\\d{5,6}","\\d{8,9}",,,"600123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"AX",358,"00|99[049]","0",,,"0",,,,,,[,,"NA","NA"],,,[,,"[13]00\\d{3,7}|2(?:0(?:0\\d{3,7}|2[023]\\d{1,6}|9[89]\\d{1,6}))|60(?:[12]\\d{5,6}|6\\d{7})|7(?:1\\d{7}|3\\d{8}|5[03-9]\\d{2,7})","\\d{5,10}",,,"100123"],[,,"[13]0\\d{4,8}|2(?:0(?:[016-8]\\d{3,7}|[2-59]\\d{2,7})|9\\d{4,8})|60(?:[12]\\d{5,6}|6\\d{7})|7(?:1\\d{7}|3\\d{8}|5[03-9]\\d{2,7})","\\d{5,10}",,,"10112345"],,,[,,"NA","NA"]],AZ:[,[,,"[1-9]\\d{8}","\\d{7,9}"],[,,"(?:1[28]\\d|2(?:02|1[24]|2[2-4]|33|[45]2|6[23])|365)\\d{6}","\\d{7,9}",,,"123123456"],[,,"(?:4[04]|5[015]|60|7[07])\\d{7}","\\d{9}",,,"401234567"],[,,"88\\d{7}","\\d{9}",,,"881234567"],[,,"900200\\d{3}","\\d{9}",,,"900200123"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"AZ",994,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["(?:1[28]|2(?:[45]2|[0-36])|365)"],"(0$1)","",0],[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[4-8]"],"0$1","",0],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],BA:[,[,,"[3-9]\\d{7,8}","\\d{6,9}"],[,,"(?:[35]\\d|49)\\d{6}","\\d{6,8}",,,"30123456"],[,,"6(?:03|44|71|[1-356])\\d{6}","\\d{8,9}",,,"61123456"],[,,"8[08]\\d{6}","\\d{8}",,,"80123456"],[,,"9[0246]\\d{6}","\\d{8}",,,"90123456"],[,,"8[12]\\d{6}","\\d{8}",,,"82123456"],[,,"NA","NA"],[,,"NA","NA"],"BA",387,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]"],"0$1","",0],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-356]|[7-9]"],"0$1","",0],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6[047]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"70[23]\\d{5}","\\d{8}",,,"70223456"],,,[,,"NA","NA"]],BB:[,[,,"[2589]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"246[2-9]\\d{6}","\\d{7}(?:\\d{3})?",,,"2462345678"],[,,"246(?:(?:2[346]|45|82)\\d|25[0-46])\\d{4}","\\d{10}",,,"2462501234"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002123456"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002123456"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"BB",1,"011","1",,,"1",,,,,,[,,"NA","NA"],,"246",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],BD:[,[,,"[2-79]\\d{5,9}|1\\d{9}|8[0-7]\\d{4,8}","\\d{6,10}"],[,,"2(?:7(?:1[0-267]|2[0-289]|3[0-29]|[46][01]|5[1-3]|7[017]|91)|8(?:0[125]|[139][1-6]|2[0157-9]|6[1-35]|7[1-5]|8[1-8])|9(?:0[0-2]|1[0-4]|2[568]|3[3-6]|5[5-7]|6[0167]|7[15]|8[0146-8]))\\d{4}|3(?:12?[5-7]\\d{2}|0(?:2(?:[025-79]\\d|[348]\\d{1,2})|3(?:[2-4]\\d|[56]\\d?))|2(?:1\\d{2}|2(?:[12]\\d|[35]\\d{1,2}|4\\d?))|3(?:1\\d{2}|2(?:[2356]\\d|4\\d{1,2}))|4(?:1\\d{2}|2(?:2\\d{1,2}|[47]|5\\d{2}))|5(?:1\\d{2}|29)|[67]1\\d{2}|8(?:1\\d{2}|2(?:2\\d{2}|3|4\\d)))\\d{3}|4(?:0(?:2(?:[09]\\d|7)|33\\d{2})|1\\d{3}|2(?:1\\d{2}|2(?:[25]\\d?|[348]\\d|[67]\\d{1,2}))|3(?:1\\d{2}(?:\\d{2})?|2(?:[045]\\d|[236-9]\\d{1,2})|32\\d{2})|4(?:[18]\\d{2}|2(?:[2-46]\\d{2}|3)|5[25]\\d{2})|5(?:1\\d{2}|2(?:3\\d|5))|6(?:[18]\\d{2}|2(?:3(?:\\d{2})?|[46]\\d{1,2}|5\\d{2}|7\\d)|5(?:3\\d?|4\\d|[57]\\d{1,2}|6\\d{2}|8))|71\\d{2}|8(?:[18]\\d{2}|23\\d{2}|54\\d{2})|9(?:[18]\\d{2}|2[2-5]\\d{2}|53\\d{1,2}))\\d{3}|5(?:02[03489]\\d{2}|1\\d{2}|2(?:1\\d{2}|2(?:2(?:\\d{2})?|[457]\\d{2}))|3(?:1\\d{2}|2(?:[37](?:\\d{2})?|[569]\\d{2}))|4(?:1\\d{2}|2[46]\\d{2})|5(?:1\\d{2}|26\\d{1,2})|6(?:[18]\\d{2}|2|53\\d{2})|7(?:1|24)\\d{2}|8(?:1|26)\\d{2}|91\\d{2})\\d{3}|6(?:0(?:1\\d{2}|2(?:3\\d{2}|4\\d{1,2}))|2(?:2[2-5]\\d{2}|5(?:[3-5]\\d{2}|7)|8\\d{2})|3(?:1|2[3478])\\d{2}|4(?:1|2[34])\\d{2}|5(?:1|2[47])\\d{2}|6(?:[18]\\d{2}|6(?:2(?:2\\d|[34]\\d{2})|5(?:[24]\\d{2}|3\\d|5\\d{1,2})))|72[2-5]\\d{2}|8(?:1\\d{2}|2[2-5]\\d{2})|9(?:1\\d{2}|2[2-6]\\d{2}))\\d{3}|7(?:(?:02|[3-589]1|6[12]|72[24])\\d{2}|21\\d{3}|32)\\d{3}|8(?:(?:4[12]|[5-7]2|1\\d?)|(?:0|3[12]|[5-7]1|217)\\d)\\d{4}|9(?:[35]1|(?:[024]2|81)\\d|(?:1|[24]1)\\d{2})\\d{3}","\\d{6,9}",,,"27111234"],[,,"(?:1[13-9]\\d|(?:3[78]|44)[02-9]|6(?:44|6[02-9]))\\d{7}","\\d{10}",,,"1812345678"],[,,"80[03]\\d{7}","\\d{10}",,,"8001234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"96(?:0[49]|1[0-4]|6[69])\\d{6}","\\d{10}",,,"9604123456"],"BD",880,"00[12]?","0",,,"0",,"00",,[[,"(2)(\\d{7})","$1-$2",["2"],"0$1","",0],[,"(\\d{2})(\\d{4,6})","$1-$2",["[3-79]1"],"0$1","",0],[,"(\\d{4})(\\d{3,6})","$1-$2",["1|3(?:0|[2-58]2)|4(?:0|[25]2|3[23]|[4689][25])|5(?:[02-578]2|6[25])|6(?:[0347-9]2|[26][25])|7[02-9]2|8(?:[023][23]|[4-7]2)|9(?:[02][23]|[458]2|6[016])"],"0$1","",0],[,"(\\d{3})(\\d{3,7})","$1-$2",["[3-79][2-9]|8"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],BE:[,[,,"[1-9]\\d{7,8}","\\d{8,9}"],[,,"(?:1[0-69]|[23][2-8]|4[23]|5\\d|6[013-57-9]|71|8[1-79]|9[2-4])\\d{6}|80[2-8]\\d{5}","\\d{8}",,,"12345678"],[,,"4(?:6[0135-8]|[79]\\d|8[3-9])\\d{6}","\\d{9}",,,"470123456"],[,,"800\\d{5}","\\d{8}",,,"80012345"],[,,"(?:70[2-467]|90[0-79])\\d{5}","\\d{8}",,,"90123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"BE",32,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4[6-9]"],"0$1","",0],[,"(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[23]|4[23]|9[2-4]"],"0$1","",0],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[156]|7[018]|8(?:0[1-9]|[1-79])"],"0$1","",0],[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"78\\d{6}","\\d{8}",,,"78123456"],,,[,,"NA","NA"]],BF:[,[,,"[267]\\d{7}","\\d{8}"],[,,"2(?:0(?:49|5[23]|9[016-9])|4(?:4[569]|5[4-6]|7[0179])|5(?:[34]\\d|50))\\d{4}","\\d{8}",,,"20491234"],[,,"6(?:[0-689]\\d|7[0-5])\\d{5}|7\\d{7}","\\d{8}",,,"70123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"BF",226,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],BG:[,[,,"[23567]\\d{5,7}|[489]\\d{6,8}","\\d{5,9}"],[,,"2(?:[0-8]\\d{5,6}|9\\d{4,6})|(?:[36]\\d|5[1-9]|8[1-6]|9[1-7])\\d{5,6}|(?:4(?:[124-7]\\d|3[1-6])|7(?:0[1-9]|[1-9]\\d))\\d{4,5}","\\d{5,8}",,,"2123456"],[,,"(?:8[7-9]\\d|9(?:8\\d|99))\\d{6}|4(?:3[0789]|8\\d)\\d{5}","\\d{8,9}",,,"48123456"],[,,"800\\d{5}","\\d{8}",,,"80012345"],[,,"90\\d{6}","\\d{8}",,,"90123456"],[,,"NA","NA"],[,,"700\\d{5}","\\d{5,9}",,,"70012345"],[,,"NA","NA"],"BG",359,"00","0",,,"0",,,,[[,"(2)(\\d{5})","$1 $2",["29"],"0$1","",0],[,"(2)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1","",0],[,"(\\d{3})(\\d{4})","$1 $2",["43[124-7]|70[1-9]"],"0$1","",0],[,"(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[124-7]|70[1-9]"],"0$1","",0],[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[78]00"],"0$1","",0],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["999"],"0$1","",0],[,"(\\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","",0],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["48|8[7-9]|9[08]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],BH:[,[,,"[136-9]\\d{7}","\\d{8}"],[,,"(?:1(?:3[1356]|6[0156]|7\\d)\\d|6(?:1[16]\\d|500|6(?:0\\d|3[12]|44|7[7-9])|9[69][69])|7(?:1(?:11|78)|7\\d{2}))\\d{4}","\\d{8}",,,"17001234"],[,,"(?:3(?:[1-4679]\\d|5[013569]|8[0-47-9])\\d|6(?:3(?:00|33|6[16])|6(?:[69]\\d|3[03-9]|7[0-6])))\\d{4}","\\d{8}",,,"36001234"],[,,"80\\d{6}","\\d{8}",,,"80123456"],[,,"(?:87|9[014578])\\d{6}","\\d{8}",,,"90123456"],[,,"84\\d{6}","\\d{8}",,,"84123456"],[,,"NA","NA"],[,,"NA","NA"],"BH",973,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],BI:[,[,,"[267]\\d{7}","\\d{8}"],[,,"22(?:2[0-7]|[3-5]0)\\d{4}","\\d{8}",,,"22201234"],[,,"(?:[26]9|7[14-9])\\d{6}","\\d{8}",,,"79561234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"BI",257,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],BJ:[,[,,"[2689]\\d{7}|7\\d{3}","\\d{4,8}"],[,,"2(?:02|1[037]|2[45]|3[68])\\d{5}","\\d{8}",,,"20211234"],[,,"(?:6[146-8]|9[03-9])\\d{6}","\\d{8}",,,"90011234"],[,,"7[3-5]\\d{2}","\\d{4}",,,"7312"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"857[58]\\d{4}","\\d{8}",,,"85751234"],"BJ",229,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"81\\d{6}","\\d{8}",,,"81123456"],,,[,,"NA","NA"]],BL:[,[,,"[56]\\d{8}","\\d{9}"],[,,"590(?:2[7-9]|5[12]|87)\\d{4}","\\d{9}",,,"590271234"],[,,"690(?:0[0-7]|[1-9]\\d)\\d{4}","\\d{9}",,,"690301234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"BL",590,"00","0",,,"0",,,,,,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],BM:[,[,,"[4589]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"441(?:2(?:02|23|61|[3479]\\d)|[46]\\d{2}|5(?:4\\d|60|89)|824)\\d{4}","\\d{7}(?:\\d{3})?",,,"4412345678"],[,,"441(?:[37]\\d|5[0-39])\\d{5}","\\d{10}",,,"4413701234"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002123456"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002123456"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"BM",1,"011","1",,,"1",,,,,,[,,"NA","NA"],,"441",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],BN:[,[,,"[2-578]\\d{6}","\\d{7}"],[,,"2(?:[013-9]\\d|2[0-7])\\d{4}|[3-5]\\d{6}","\\d{7}",,,"2345678"],[,,"22[89]\\d{4}|[78]\\d{6}","\\d{7}",,,"7123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"BN",673,"00",,,,,,,,[[,"([2-578]\\d{2})(\\d{4})","$1 $2",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],BO:[,[,,"[23467]\\d{7}","\\d{7,8}"],[,,"(?:2(?:2\\d{2}|5(?:11|[258]\\d|9[67])|6(?:12|2\\d|9[34])|8(?:2[34]|39|62))|3(?:3\\d{2}|4(?:6\\d|8[24])|8(?:25|42|5[257]|86|9[25])|9(?:2\\d|3[234]|4[248]|5[24]|6[2-6]|7\\d))|4(?:4\\d{2}|6(?:11|[24689]\\d|72)))\\d{4}","\\d{7,8}",,,"22123456"],[,,"[67]\\d{7}","\\d{8}",,,"71234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"BO",591,"00(1\\d)?","0",,,"0(1\\d)?",,,,[[,"([234])(\\d{7})","$1 $2",["[234]"],"","0$CC $1",0],[,"([67]\\d{7})","$1",["[67]"],"","0$CC $1",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],BQ:[,[,,"[347]\\d{6}","\\d{7}"],[,,"(?:318[023]|416[023]|7(?:1[578]|50)\\d)\\d{3}","\\d{7}",,,"7151234"],[,,"(?:318[14-68]|416[15-9]|7(?:0[01]|7[07]|[89]\\d)\\d)\\d{3}","\\d{7}",,,"3181234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"BQ",599,"00",,,,,,,,,,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],BR:[,[,,"[1-46-9]\\d{7,10}|5\\d{8,9}","\\d{8,11}"],[,,"1[1-9][2-5]\\d{7}|(?:[4689][1-9]|2[12478]|3[1-578]|5[1-5]|7[13-579])[2-5]\\d{7}","\\d{8,11}",,,"1123456789"],[,,"1[1-9](?:7|9\\d)\\d{7}|(?:2[12478]|[89][1-9])9?[6-9]\\d{7}|(?:3[1-578]|[46][1-9]|5[1-5]|7[13-579])[6-9]\\d{7}","\\d{10,11}",,,"11961234567"],[,,"800\\d{6,7}","\\d{8,11}",,,"800123456"],[,,"[359]00\\d{6,7}","\\d{8,11}",,,"300123456"],[,,"[34]00\\d{5}","\\d{8}",,,"40041234"],[,,"NA","NA"],[,,"NA","NA"],"BR",55,"00(?:1[45]|2[135]|31|4[13])","0",,,"0(?:(1[245]|2[135]|31|4[13])(\\d{10,11}))?","$2",,,[[,"(\\d{4})(\\d{4})","$1-$2",["[2-9](?:[1-9]|0[1-9])"],"$1","",0],[,"(\\d{5})(\\d{4})","$1-$2",["9(?:[1-9]|0[1-9])"],"$1","",0],[,"(\\d{3,5})","$1",["1[125689]"],"$1","",0],[,"(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["(?:[189][1-9]|2[12478])9"],"($1)","0 $CC ($1)",0],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["[1-9][1-9]"],"($1)","0 $CC ($1)",0],[,"([34]00\\d)(\\d{4})","$1-$2",["[34]00"],"","",0],[,"([3589]00)(\\d{2,3})(\\d{4})","$1 $2 $3",["[3589]00"],"0$1","",0]],[[,"(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["(?:[189][1-9]|2[12478])9"],"($1)","0 $CC ($1)",0],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["[1-9][1-9]"],"($1)","0 $CC ($1)",0],[,"([34]00\\d)(\\d{4})","$1-$2",["[34]00"],"","",0],[,"([3589]00)(\\d{2,3})(\\d{4})","$1 $2 $3",["[3589]00"],"0$1","",0]],[,,"NA","NA"],,,[,,"[34]00\\d{5}","\\d{8}",,,"40041234"],[,,"NA","NA"],,,[,,"NA","NA"]],BS:[,[,,"[2589]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"242(?:3(?:02|[236][1-9]|4[0-24-9]|5[0-68]|7[3467]|8[0-4]|9[2-467])|461|502|6(?:0[12]|12|7[67]|8[78]|9[89])|7(?:02|88))\\d{4}","\\d{7}(?:\\d{3})?",,,"2423456789"],[,,"242(?:3(?:5[79]|[79]5)|4(?:[2-4][1-9]|5[1-8]|6[2-8]|7\\d|81)|5(?:2[45]|3[35]|44|5[1-9]|65|77)|6[34]6|727)\\d{4}","\\d{10}",,,"2423591234"],[,,"242300\\d{4}|8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002123456"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002123456"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"BS",1,"011","1",,,"1",,,,,,[,,"NA","NA"],,"242",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],BT:[,[,,"[1-8]\\d{6,7}","\\d{6,8}"],[,,"(?:2[3-6]|[34][5-7]|5[236]|6[2-46]|7[246]|8[2-4])\\d{5}","\\d{6,7}",,,"2345678"],[,,"[17]7\\d{6}","\\d{8}",,,"17123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"BT",975,"00",,,,,,,,[[,"([17]7)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1|77"],"","",0],[,"([2-8])(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],BW:[,[,,"[2-79]\\d{6,7}","\\d{7,8}"],[,,"(?:2(?:4[0-48]|6[0-24]|9[0578])|3(?:1[0235-9]|55|6\\d|7[01]|9[0-57])|4(?:6[03]|7[1267]|9[0-5])|5(?:3[0389]|4[0489]|7[1-47]|88|9[0-49])|6(?:2[1-35]|5[149]|8[067]))\\d{4}","\\d{7}",,,"2401234"],[,,"7(?:[1-6]\\d|7[014-8])\\d{5}","\\d{8}",,,"71123456"],[,,"NA","NA"],[,,"90\\d{5}","\\d{7}",,,"9012345"],[,,"NA","NA"],[,,"NA","NA"],[,,"79[12][01]\\d{4}","\\d{8}",,,"79101234"],"BW",267,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[2-6]"],"","",0],[,"(7\\d)(\\d{3})(\\d{3})","$1 $2 $3",["7"],"","",0],[,"(90)(\\d{5})","$1 $2",["9"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],BY:[,[,,"[1-4]\\d{8}|[89]\\d{9,10}","\\d{7,11}"],[,,"(?:1(?:5(?:1[1-5]|[24]\\d|6[2-4]|9[1-7])|6(?:[235]\\d|4[1-7])|7\\d{2})|2(?:1(?:[246]\\d|3[0-35-9]|5[1-9])|2(?:[235]\\d|4[0-8])|3(?:[26]\\d|3[02-79]|4[024-7]|5[03-7])))\\d{5}","\\d{7,9}",,,"152450911"],[,,"(?:2(?:5[5679]|9[1-9])|33\\d|44\\d)\\d{6}","\\d{9}",,,"294911911"],[,,"8(?:0[13]|20\\d)\\d{7}","\\d{10,11}",,,"8011234567"],[,,"(?:810|902)\\d{7}","\\d{10}",,,"9021234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"249\\d{6}","\\d{9}",,,"249123456"],"BY",375,"810","8",,,"8?0?",,"8~10",,[[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["17[0-3589]|2[4-9]|[34]","17(?:[02358]|1[0-2]|9[0189])|2[4-9]|[34]"],"8 0$1","",0],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:5[24]|6[235]|7[467])|2(?:1[246]|2[25]|3[26])","1(?:5[24]|6(?:2|3[04-9]|5[0346-9])|7(?:[46]|7[37-9]))|2(?:1[246]|2[25]|3[26])"],"8 0$1","",0],[,"(\\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","",0],[,"([89]\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8[01]|9"],"8 $1","",0],[,"(8\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["82"],"8 $1","",0]],,[,,"NA","NA"],,,[,,"8(?:[013]|[12]0)\\d{8}|902\\d{7}","\\d{10,11}",,,"82012345678"],[,,"NA","NA"],,,[,,"NA","NA"]],BZ:[,[,,"[2-8]\\d{6}|0\\d{10}","\\d{7}(?:\\d{4})?"],[,,"[234578][02]\\d{5}","\\d{7}",,,"2221234"],[,,"6[0-367]\\d{5}","\\d{7}",,,"6221234"],[,,"0800\\d{7}","\\d{11}",,,"08001234123"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"BZ",501,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1-$2",["[2-8]"],"","",0],[,"(0)(800)(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],1,,[,,"NA","NA"]],CA:[,[,,"[2-9]\\d{9}|3\\d{6}","\\d{7}(?:\\d{3})?"],[,,"(?:2(?:04|[23]6|[48]9|50)|3(?:06|43|65)|4(?:03|1[68]|3[178]|50)|5(?:06|1[49]|48|79|8[17])|6(?:0[04]|13|22|39|47)|7(?:0[59]|78|8[02])|8(?:[06]7|19|73)|90[25])[2-9]\\d{6}|310\\d{4}","\\d{7}(?:\\d{3})?",,,"2042345678"],[,,"(?:2(?:04|[23]6|[48]9|50)|3(?:06|43|65)|4(?:03|1[68]|3[178]|50)|5(?:06|1[49]|48|79|8[17])|6(?:0[04]|13|22|39|47)|7(?:0[59]|78|8[02])|8(?:[06]7|19|73)|90[25])[2-9]\\d{6}","\\d{7}(?:\\d{3})?",,,"2042345678"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}|310\\d{4}","\\d{7}(?:\\d{3})?",,,"8002123456"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002123456"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"CA",1,"011","1",,,"1",,,,,,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],CC:[,[,,"[1458]\\d{5,9}","\\d{6,10}"],[,,"89162\\d{4}","\\d{8,9}",,,"891621234"],[,,"14(?:5\\d|71)\\d{5}|4(?:[0-2]\\d|3[0-57-9]|4[47-9]|5[0-25-9]|6[6-9]|7[03-9]|8[17-9]|9[017-9])\\d{6}","\\d{9}",,,"412345678"],[,,"1(?:80(?:0\\d{2})?|3(?:00\\d{2})?)\\d{4}","\\d{6,10}",,,"1800123456"],[,,"190[0126]\\d{6}","\\d{10}",,,"1900123456"],[,,"NA","NA"],[,,"500\\d{6}","\\d{9}",,,"500123456"],[,,"550\\d{6}","\\d{9}",,,"550123456"],"CC",61,"(?:14(?:1[14]|34|4[17]|[56]6|7[47]|88))?001[14-689]","0",,,"0",,"0011",,,,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],CD:[,[,,"[2-6]\\d{6}|[18]\\d{6,8}|9\\d{8}","\\d{7,9}"],[,,"1(?:2\\d{7}|\\d{6})|[2-6]\\d{6}","\\d{7,9}",,,"1234567"],[,,"8(?:[0-2459]\\d{2}|8)\\d{5}|9[7-9]\\d{7}","\\d{7,9}",,,"991234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"CD",243,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["12"],"0$1","",0],[,"([89]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8[0-2459]|9"],"0$1","",0],[,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1","",0],[,"(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],CF:[,[,,"[278]\\d{7}","\\d{8}"],[,,"2[12]\\d{6}","\\d{8}",,,"21612345"],[,,"7[0257]\\d{6}","\\d{8}",,,"70012345"],[,,"NA","NA"],[,,"8776\\d{4}","\\d{8}",,,"87761234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"CF",236,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],CG:[,[,,"[028]\\d{8}","\\d{9}"],[,,"222[1-589]\\d{5}","\\d{9}",,,"222123456"],[,,"0[14-6]\\d{7}","\\d{9}",,,"061234567"],[,,"NA","NA"],[,,"800\\d{6}","\\d{9}",,,"800123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"CG",242,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"],"","",0],[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],1,,[,,"NA","NA"]],CH:[,[,,"[2-9]\\d{8}|860\\d{9}","\\d{9}(?:\\d{3})?"],[,,"(?:2[12467]|3[1-4]|4[134]|5[256]|6[12]|[7-9]1)\\d{7}","\\d{9}",,,"212345678"],[,,"7[5-9]\\d{7}","\\d{9}",,,"781234567"],[,,"800\\d{6}","\\d{9}",,,"800123456"],[,,"90[016]\\d{6}","\\d{9}",,,"900123456"],[,,"84[0248]\\d{6}","\\d{9}",,,"840123456"],[,,"878\\d{6}","\\d{9}",,,"878123456"],[,,"NA","NA"],"CH",41,"00","0",,,"0",,,,[[,"([2-9]\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]|[89]1"],"0$1","",0],[,"([89]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1","",0],[,"(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["860"],"0$1","",0]],,[,,"74[0248]\\d{6}","\\d{9}",,,"740123456"],,,[,,"NA","NA"],[,,"5[18]\\d{7}","\\d{9}",,,"581234567"],,,[,,"860\\d{9}","\\d{12}",,,"860123456789"]],CI:[,[,,"[02-7]\\d{7}","\\d{8}"],[,,"(?:2(?:0[023]|1[02357]|[23][045]|4[03-5])|3(?:0[06]|1[069]|[2-4][07]|5[09]|6[08]))\\d{5}","\\d{8}",,,"21234567"],[,,"(?:0[1-9]|4\\d|5[4-9]|6[015-79]|7[578])\\d{6}","\\d{8}",,,"01234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"CI",225,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],1,,[,,"NA","NA"]],CK:[,[,,"[2-57]\\d{4}","\\d{5}"],[,,"(?:2\\d|3[13-7]|4[1-5])\\d{3}","\\d{5}",,,"21234"],[,,"(?:5[0-68]|7\\d)\\d{3}","\\d{5}",,,"71234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"CK",682,"00",,,,,,,,[[,"(\\d{2})(\\d{3})","$1 $2",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],CL:[,[,,"(?:[2-9]|600|123)\\d{7,8}","\\d{7,11}"],[,,"2(?:2\\d{7}|3(?:20|22)\\d{5}|1962\\d{4})|(?:3[2-5]|[47][1-35]|5[1-3578]|6[13-57])\\d{7}","\\d{7,9}",,,"221234567"],[,,"9[4-9]\\d{7}","\\d{8,9}",,,"961234567"],[,,"800\\d{6}|1230\\d{7}","\\d{9,11}",,,"800123456"],[,,"NA","NA"],[,,"600\\d{7,8}","\\d{10,11}",,,"6001234567"],[,,"NA","NA"],[,,"44\\d{7}","\\d{9}",,,"441234567"],"CL",56,"(?:0|1(?:1[0-69]|2[0-57]|5[13-58]|69|7[0167]|8[018]))0","0",,,"0|(1(?:1[0-69]|2[0-57]|5[13-58]|69|7[0167]|8[018]))",,,,[[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[23]"],"($1)","$CC ($1)",0],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[357]|4[1-35]|6[13-57]"],"($1)","$CC ($1)",0],[,"(9)(\\d{4})(\\d{4})","$1 $2 $3",["9"],"0$1","",0],[,"(44)(\\d{3})(\\d{4})","$1 $2 $3",["44"],"0$1","",0],[,"([68]00)(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"],"$1","",0],[,"(600)(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"],"$1","",0],[,"(1230)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"$1","",0],[,"(\\d{5})(\\d{4})","$1 $2",["219"],"($1)","$CC ($1)",0],[,"(\\d{4,5})","$1",["[1-9]"],"$1","",0]],[[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[23]"],"($1)","$CC ($1)",0],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[357]|4[1-35]|6[13-57]"],"($1)","$CC ($1)",0],[,"(9)(\\d{4})(\\d{4})","$1 $2 $3",["9"],"0$1","",0],[,"(44)(\\d{3})(\\d{4})","$1 $2 $3",["44"],"0$1","",0],[,"([68]00)(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"],"$1","",0],[,"(600)(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"],"$1","",0],[,"(1230)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"$1","",0],[,"(\\d{5})(\\d{4})","$1 $2",["219"],"($1)","$CC ($1)",0]],[,,"NA","NA"],,,[,,"600\\d{7,8}","\\d{10,11}",,,"6001234567"],[,,"NA","NA"],,,[,,"NA","NA"]],CM:[,[,,"[2368]\\d{7,8}","\\d{8,9}"],[,,"2(?:22|33|4[23])\\d{6}","\\d{9}",,,"222123456"],[,,"6[5-9]\\d{7}","\\d{9}",,,"671234567"],[,,"800\\d{5}","\\d{8}",,,"80012345"],[,,"88\\d{6}","\\d{8}",,,"88012345"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"CM",237,"00",,,,,,,,[[,"([26])(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]"],"","",0],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[23]|88"],"","",0],[,"(800)(\\d{2})(\\d{3})","$1 $2 $3",["80"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],CN:[,[,,"[1-7]\\d{6,11}|8[0-357-9]\\d{6,9}|9\\d{7,10}","\\d{4,12}"],[,,"21(?:100\\d{2}|95\\d{3,4}|\\d{8,10})|(?:10|2[02-57-9]|3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1\\d|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|8(?:[57]1|98))(?:100\\d{2}|95\\d{3,4}|\\d{8})|(?:3(?:1[02-9]|35|49|5\\d|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|3[3-9]|5[2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[17]\\d|2[248]|3[04-9]|4[3-6]|5[0-3689]|6[2368]|9[02-9])|8(?:1[236-8]|2[5-7]|3\\d|5[4-9]|7[02-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100\\d{2}|95\\d{3,4}|\\d{7})|80(?:29|6[03578]|7[018]|81)\\d{4}","\\d{4,12}",,,"1012345678"],[,,"1(?:[38]\\d|4[57]|5[0-35-9]|7[06-8])\\d{8}","\\d{11}",,,"13123456789"],[,,"(?:10)?800\\d{7}","\\d{10,12}",,,"8001234567"],[,,"16[08]\\d{5}","\\d{8}",,,"16812345"],[,,"400\\d{7}|950\\d{7,8}|(?:10|2[0-57-9]|3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[4789]|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[3678]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))96\\d{3,4}","\\d{7,11}",,,"4001234567"],[,,"NA","NA"],[,,"NA","NA"],"CN",86,"(1(?:[129]\\d{3}|79\\d{2}))?00","0",,,"(1(?:[129]\\d{3}|79\\d{2}))|0",,"00",,[[,"(80\\d{2})(\\d{4})","$1 $2",["80[2678]"],"0$1","$CC $1",1],[,"([48]00)(\\d{3})(\\d{4})","$1 $2 $3",["[48]00"],"","",0],[,"(\\d{5,6})","$1",["100|95"],"","",0],[,"(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2\\d)[19]","(?:10|2\\d)(?:10|9[56])","(?:10|2\\d)(?:100|9[56])"],"0$1","$CC $1",0],[,"(\\d{3})(\\d{5,6})","$1 $2",["[3-9]","[3-9]\\d{2}[19]","[3-9]\\d{2}(?:10|9[56])"],"0$1","$CC $1",0],[,"(\\d{3,4})(\\d{4})","$1 $2",["[2-9]"],"","",0],[,"(21)(\\d{4})(\\d{4,6})","$1 $2 $3",["21"],"0$1","$CC $1",1],[,"([12]\\d)(\\d{4})(\\d{4})","$1 $2 $3",["10[1-9]|2[02-9]","10[1-9]|2[02-9]","10(?:[1-79]|8(?:[1-9]|0[1-9]))|2[02-9]"],"0$1","$CC $1",1],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|8(?:[57]1|98)"],"0$1","$CC $1",1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|3|5[4-9]|7[02-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])"],"0$1","$CC $1",1],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-578]"],"","$CC $1",0],[,"(10800)(\\d{3})(\\d{4})","$1 $2 $3",["108","1080","10800"],"","",0],[,"(\\d{3})(\\d{7,8})","$1 $2",["950"],"","",0]],[[,"(80\\d{2})(\\d{4})","$1 $2",["80[2678]"],"0$1","$CC $1",1],[,"([48]00)(\\d{3})(\\d{4})","$1 $2 $3",["[48]00"],"","",0],[,"(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2\\d)[19]","(?:10|2\\d)(?:10|9[56])","(?:10|2\\d)(?:100|9[56])"],"0$1","$CC $1",0],[,"(\\d{3})(\\d{5,6})","$1 $2",["[3-9]","[3-9]\\d{2}[19]","[3-9]\\d{2}(?:10|9[56])"],"0$1","$CC $1",0],[,"(21)(\\d{4})(\\d{4,6})","$1 $2 $3",["21"],"0$1","$CC $1",1],[,"([12]\\d)(\\d{4})(\\d{4})","$1 $2 $3",["10[1-9]|2[02-9]","10[1-9]|2[02-9]","10(?:[1-79]|8(?:[1-9]|0[1-9]))|2[02-9]"],"0$1","$CC $1",1],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|8(?:[57]1|98)"],"0$1","$CC $1",1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|3|5[4-9]|7[02-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])"],"0$1","$CC $1",1],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-578]"],"","$CC $1",0],[,"(10800)(\\d{3})(\\d{4})","$1 $2 $3",["108","1080","10800"],"","",0],[,"(\\d{3})(\\d{7,8})","$1 $2",["950"],"","",0]],[,,"NA","NA"],,,[,,"(?:4|(?:10)?8)00\\d{7}|950\\d{7,8}","\\d{10,12}",,,"4001234567"],[,,"NA","NA"],,,[,,"NA","NA"]],CO:[,[,,"(?:[13]\\d{0,3}|[24-8])\\d{7}","\\d{7,11}"],[,,"[124-8][2-9]\\d{6}","\\d{8}",,,"12345678"],[,,"3(?:0[0-5]|1\\d|2[0-2]|5[01])\\d{7}","\\d{10}",,,"3211234567"],[,,"1800\\d{7}","\\d{11}",,,"18001234567"],[,,"19(?:0[01]|4[78])\\d{7}","\\d{11}",,,"19001234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"CO",57,"00(?:4(?:[14]4|56)|[579])","0",,,"0([3579]|4(?:44|56))?",,,,[[,"(\\d)(\\d{7})","$1 $2",["1(?:8[2-9]|9[0-3]|[2-7])|[24-8]","1(?:8[2-9]|9(?:09|[1-3])|[2-7])|[24-8]"],"($1)","0$CC $1",0],[,"(\\d{3})(\\d{7})","$1 $2",["3"],"","0$CC $1",0],[,"(1)(\\d{3})(\\d{7})","$1-$2-$3",["1(?:80|9[04])","1(?:800|9(?:0[01]|4[78]))"],"0$1","",0]],[[,"(\\d)(\\d{7})","$1 $2",["1(?:8[2-9]|9[0-3]|[2-7])|[24-8]","1(?:8[2-9]|9(?:09|[1-3])|[2-7])|[24-8]"],"($1)","0$CC $1",0],[,"(\\d{3})(\\d{7})","$1 $2",["3"],"","0$CC $1",0],[,"(1)(\\d{3})(\\d{7})","$1 $2 $3",["1(?:80|9[04])","1(?:800|9(?:0[01]|4[78]))"]]],[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],CR:[,[,,"[24-9]\\d{7,9}","\\d{8,10}"],[,,"2[24-7]\\d{6}","\\d{8}",,,"22123456"],[,,"5(?:0[01]|7[0-3])\\d{5}|6(?:[0-2]\\d|30)\\d{5}|7[0-3]\\d{6}|8[3-9]\\d{6}","\\d{8}",,,"83123456"],[,,"800\\d{7}","\\d{10}",,,"8001234567"],[,,"90[059]\\d{7}","\\d{10}",,,"9001234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"210[0-6]\\d{4}|4\\d{7}|5100\\d{4}","\\d{8}",,,"40001234"],"CR",506,"00",,,,"(19(?:0[012468]|1[09]|20|66|77|99))",,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[24-7]|8[3-9]"],"","$CC $1",0],[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]0"],"","$CC $1",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],CU:[,[,,"[2-57]\\d{5,7}","\\d{4,8}"],[,,"2[1-4]\\d{5,6}|3(?:1\\d{6}|[23]\\d{4,6})|4(?:[125]\\d{5,6}|[36]\\d{6}|[78]\\d{4,6})|7\\d{6,7}","\\d{4,8}",,,"71234567"],[,,"5\\d{7}","\\d{8}",,,"51234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"CU",53,"119","0",,,"0",,,,[[,"(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)","",0],[,"(\\d{2})(\\d{4,6})","$1 $2",["[2-4]"],"(0$1)","",0],[,"(\\d)(\\d{7})","$1 $2",["5"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],CV:[,[,,"[259]\\d{6}","\\d{7}"],[,,"2(?:2[1-7]|3[0-8]|4[12]|5[1256]|6\\d|7[1-3]|8[1-5])\\d{4}","\\d{7}",,,"2211234"],[,,"(?:9\\d|59)\\d{5}","\\d{7}",,,"9911234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"CV",238,"0",,,,,,,,[[,"(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],CW:[,[,,"[169]\\d{6,7}","\\d{7,8}"],[,,"9(?:[48]\\d{2}|50\\d|7(?:2[0-24]|[34]\\d|6[35-7]|77|8[7-9]))\\d{4}","\\d{7,8}",,,"94151234"],[,,"9(?:5(?:[1246]\\d|3[01])|6(?:[16-9]\\d|3[01]))\\d{4}","\\d{7,8}",,,"95181234"],[,,"NA","NA"],[,,"NA","NA"],[,,"(?:10|69)\\d{5}","\\d{7}",,,"1011234"],[,,"NA","NA"],[,,"NA","NA"],"CW",599,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[13-7]"],"","",0],[,"(9)(\\d{3})(\\d{4})","$1 $2 $3",["9"],"","",0]],,[,,"955\\d{5}","\\d{7,8}",,,"95581234"],1,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],CX:[,[,,"[1458]\\d{5,9}","\\d{6,10}"],[,,"89164\\d{4}","\\d{8,9}",,,"891641234"],[,,"14(?:5\\d|71)\\d{5}|4(?:[0-2]\\d|3[0-57-9]|4[47-9]|5[0-25-9]|6[6-9]|7[03-9]|8[17-9]|9[017-9])\\d{6}","\\d{9}",,,"412345678"],[,,"1(?:80(?:0\\d{2})?|3(?:00\\d{2})?)\\d{4}","\\d{6,10}",,,"1800123456"],[,,"190[0126]\\d{6}","\\d{10}",,,"1900123456"],[,,"NA","NA"],[,,"500\\d{6}","\\d{9}",,,"500123456"],[,,"550\\d{6}","\\d{9}",,,"550123456"],"CX",61,"(?:14(?:1[14]|34|4[17]|[56]6|7[47]|88))?001[14-689]","0",,,"0",,"0011",,,,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],CY:[,[,,"[257-9]\\d{7}","\\d{8}"],[,,"2[2-6]\\d{6}","\\d{8}",,,"22345678"],[,,"9[5-79]\\d{6}","\\d{8}",,,"96123456"],[,,"800\\d{5}","\\d{8}",,,"80001234"],[,,"90[09]\\d{5}","\\d{8}",,,"90012345"],[,,"80[1-9]\\d{5}","\\d{8}",,,"80112345"],[,,"700\\d{5}","\\d{8}",,,"70012345"],[,,"NA","NA"],"CY",357,"00",,,,,,,,[[,"(\\d{2})(\\d{6})","$1 $2",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"(?:50|77)\\d{6}","\\d{8}",,,"77123456"],,,[,,"NA","NA"]],CZ:[,[,,"[2-8]\\d{8}|9\\d{8,11}","\\d{9,12}"],[,,"2\\d{8}|(?:3[1257-9]|4[16-9]|5[13-9])\\d{7}","\\d{9,12}",,,"212345678"],[,,"(?:60[1-8]|7(?:0[2-5]|[2379]\\d))\\d{6}","\\d{9,12}",,,"601123456"],[,,"800\\d{6}","\\d{9,12}",,,"800123456"],[,,"9(?:0[05689]|76)\\d{6}","\\d{9,12}",,,"900123456"],[,,"8[134]\\d{7}","\\d{9,12}",,,"811234567"],[,,"70[01]\\d{6}","\\d{9,12}",,,"700123456"],[,,"9[17]0\\d{6}","\\d{9,12}",,,"910123456"],"CZ",420,"00",,,,,,,,[[,"([2-9]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"],"","",0],[,"(96\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["96"],"","",0],[,"(9\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9[36]"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"9(?:5\\d|7[234])\\d{6}","\\d{9,12}",,,"972123456"],,,[,,"9(?:3\\d{9}|6\\d{7,10})","\\d{9,12}",,,"93123456789"]],DE:[,[,,"[1-35-9]\\d{3,14}|4(?:[0-8]\\d{4,12}|9(?:[0-37]\\d|4(?:[1-35-8]|4\\d?)|5\\d{1,2}|6[1-8]\\d?)\\d{2,8})","\\d{2,15}"],[,,"[246]\\d{5,13}|3(?:0\\d{3,13}|2\\d{9}|[3-9]\\d{4,13})|5(?:0[2-8]|[1256]\\d|[38][0-8]|4\\d{0,2}|[79][0-7])\\d{3,11}|7(?:0[2-8]|[1-9]\\d)\\d{3,10}|8(?:0[2-9]|[1-9]\\d)\\d{3,10}|9(?:0[6-9]\\d{3,10}|1\\d{4,12}|[2-9]\\d{4,11})","\\d{2,15}",,,"30123456"],[,,"1(?:5[0-25-9]\\d{8}|6[023]\\d{7,8}|7(?:[0-57-9]\\d?|6\\d)\\d{7})","\\d{10,11}",,,"15123456789"],[,,"800\\d{7,12}","\\d{10,15}",,,"8001234567890"],[,,"137[7-9]\\d{6}|900(?:[135]\\d{6}|9\\d{7})","\\d{10,11}",,,"9001234567"],[,,"1(?:3(?:7[1-6]\\d{6}|8\\d{4})|80\\d{5,11})","\\d{7,14}",,,"18012345"],[,,"700\\d{8}","\\d{11}",,,"70012345678"],[,,"NA","NA"],"DE",49,"00","0",,,"0",,,,[[,"(1\\d{2})(\\d{7,8})","$1 $2",["1[67]"],"0$1","",0],[,"(15\\d{3})(\\d{6})","$1 $2",["15[0568]"],"0$1","",0],[,"(1\\d{3})(\\d{7})","$1 $2",["15"],"0$1","",0],[,"(\\d{2})(\\d{3,11})","$1 $2",["3[02]|40|[68]9"],"0$1","",0],[,"(\\d{3})(\\d{3,11})","$1 $2",["2(?:\\d1|0[2389]|1[24]|28|34)|3(?:[3-9][15]|40)|[4-8][1-9]1|9(?:06|[1-9]1)"],"0$1","",0],[,"(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|[7-9](?:\\d[1-9]|[1-9]\\d)|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])","[24-6]|[7-9](?:\\d[1-9]|[1-9]\\d)|3(?:3(?:0[1-467]|2[127-9]|3[124578]|[46][1246]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|3[1357]|4[13578]|6[1246]|7[1356]|9[1346])|5(?:0[14]|2[1-3589]|3[1357]|4[1246]|6[1-4]|7[1346]|8[13568]|9[1246])|6(?:0[356]|2[1-489]|3[124-6]|4[1347]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|3[1357]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|4[1347]|6[0135-9]|7[1467]|8[136])|9(?:0[12479]|2[1358]|3[1357]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))"],"0$1","",0],[,"(3\\d{4})(\\d{1,10})","$1 $2",["3"],"0$1","",0],[,"(800)(\\d{7,12})","$1 $2",["800"],"0$1","",0],[,"(177)(99)(\\d{7,8})","$1 $2 $3",["177","1779","17799"],"0$1","",0],[,"(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["(?:18|90)0|137","1(?:37|80)|900[1359]"],"0$1","",0],[,"(1\\d{2})(\\d{5,11})","$1 $2",["181"],"0$1","",0],[,"(18\\d{3})(\\d{6})","$1 $2",["185","1850","18500"],"0$1","",0],[,"(18\\d{2})(\\d{7})","$1 $2",["18[68]"],"0$1","",0],[,"(18\\d)(\\d{8})","$1 $2",["18[2-579]"],"0$1","",0],[,"(700)(\\d{4})(\\d{4})","$1 $2 $3",["700"],"0$1","",0],[,"(138)(\\d{4})","$1 $2",["138"],"0$1","",0]],,[,,"16(?:4\\d{1,10}|[89]\\d{1,11})","\\d{4,14}",,,"16412345"],,,[,,"NA","NA"],[,,"18(?:1\\d{5,11}|[2-9]\\d{8})","\\d{8,14}",,,"18500123456"],,,[,,"17799\\d{7,8}","\\d{12,13}",,,"177991234567"]],DJ:[,[,,"[27]\\d{7}","\\d{8}"],[,,"2(?:1[2-5]|7[45])\\d{5}","\\d{8}",,,"21360003"],[,,"77[6-8]\\d{5}","\\d{8}",,,"77831001"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"DJ",253,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],DK:[,[,,"[2-9]\\d{7}","\\d{8}"],[,,"(?:[2-7]\\d|8[126-9]|9[1-36-9])\\d{6}","\\d{8}",,,"32123456"],[,,"(?:[2-7]\\d|8[126-9]|9[1-36-9])\\d{6}","\\d{8}",,,"20123456"],[,,"80\\d{6}","\\d{8}",,,"80123456"],[,,"90\\d{6}","\\d{8}",,,"90123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"DK",45,"00",,,,,,,1,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],DM:[,[,,"[57-9]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"767(?:2(?:55|66)|4(?:2[01]|4[0-25-9])|50[0-4]|70[1-3])\\d{4}","\\d{7}(?:\\d{3})?",,,"7674201234"],[,,"767(?:2(?:[234689]5|7[5-7])|31[5-7]|61[2-7])\\d{4}","\\d{10}",,,"7672251234"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002123456"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002123456"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"DM",1,"011","1",,,"1",,,,,,[,,"NA","NA"],,"767",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],DO:[,[,,"[589]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"8(?:[04]9[2-9]\\d{6}|29(?:2(?:[0-59]\\d|6[04-9]|7[0-27]|8[0237-9])|3(?:[0-35-9]\\d|4[7-9])|[45]\\d{2}|6(?:[0-27-9]\\d|[3-5][1-9]|6[0135-8])|7(?:0[013-9]|[1-37]\\d|4[1-35689]|5[1-4689]|6[1-57-9]|8[1-79]|9[1-8])|8(?:0[146-9]|1[0-48]|[248]\\d|3[1-79]|5[01589]|6[013-68]|7[124-8]|9[0-8])|9(?:[0-24]\\d|3[02-46-9]|5[0-79]|60|7[0169]|8[57-9]|9[02-9]))\\d{4})","\\d{7}(?:\\d{3})?",,,"8092345678"],[,,"8[024]9[2-9]\\d{6}","\\d{7}(?:\\d{3})?",,,"8092345678"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002123456"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002123456"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"DO",1,"011","1",,,"1",,,,,,[,,"NA","NA"],,"8[024]9",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],DZ:[,[,,"(?:[1-4]|[5-9]\\d)\\d{7}","\\d{8,9}"],[,,"(?:1\\d|2[014-79]|3[0-8]|4[0135689])\\d{6}|9619\\d{5}","\\d{8,9}",,,"12345678"],[,,"(?:5[4-6]|7[7-9])\\d{7}|6(?:[569]\\d|7[0-6])\\d{6}","\\d{9}",,,"551234567"],[,,"800\\d{6}","\\d{9}",,,"800123456"],[,,"80[3-689]1\\d{5}","\\d{9}",,,"808123456"],[,,"80[12]1\\d{5}","\\d{9}",,,"801123456"],[,,"NA","NA"],[,,"98[23]\\d{6}","\\d{9}",,,"983123456"],"DZ",213,"00","0",,,"0",,,,[[,"([1-4]\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1","",0],[,"([5-8]\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1","",0],[,"(9\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],EC:[,[,,"1\\d{9,10}|[2-8]\\d{7}|9\\d{8}","\\d{7,11}"],[,,"[2-7][2-7]\\d{6}","\\d{7,8}",,,"22123456"],[,,"9(?:39|[45][89]|[67][7-9]|[89]\\d)\\d{6}","\\d{9}",,,"991234567"],[,,"1800\\d{6,7}","\\d{10,11}",,,"18001234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"[2-7]890\\d{4}","\\d{8}",,,"28901234"],"EC",593,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[247]|[356][2-8]"],"(0$1)","",0],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1","",0],[,"(1800)(\\d{3})(\\d{3,4})","$1 $2 $3",["1"],"$1","",0]],[[,"(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[247]|[356][2-8]"]],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1","",0],[,"(1800)(\\d{3})(\\d{3,4})","$1 $2 $3",["1"],"$1","",0]],[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],EE:[,[,,"1\\d{3,4}|[3-9]\\d{6,7}|800\\d{6,7}","\\d{4,10}"],[,,"(?:3[23589]|4[3-8]|6\\d|7[1-9]|88)\\d{5}","\\d{7}",,,"3212345"],[,,"(?:5\\d|8[1-5])\\d{6}|5(?:[02]\\d{2}|1(?:[0-8]\\d|95)|5[0-478]\\d|64[0-4]|65[1-589])\\d{3}","\\d{7,8}",,,"51234567"],[,,"800(?:0\\d{3}|1\\d|[2-9])\\d{3}","\\d{7,10}",,,"80012345"],[,,"(?:40\\d{2}|900)\\d{4}","\\d{7,8}",,,"9001234"],[,,"NA","NA"],[,,"70[0-2]\\d{5}","\\d{8}",,,"70012345"],[,,"NA","NA"],"EE",372,"00",,,,,,,,[[,"([3-79]\\d{2})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]"],"","",0],[,"(70)(\\d{2})(\\d{4})","$1 $2 $3",["70"],"","",0],[,"(8000)(\\d{3})(\\d{3})","$1 $2 $3",["800","8000"],"","",0],[,"([458]\\d{3})(\\d{3,4})","$1 $2",["40|5|8(?:00|[1-5])","40|5|8(?:00[1-9]|[1-5])"],"","",0]],,[,,"NA","NA"],,,[,,"1\\d{3,4}|800[2-9]\\d{3}","\\d{4,7}",,,"8002123"],[,,"1(?:2[01245]|3[0-6]|4[1-489]|5[0-59]|6[1-46-9]|7[0-27-9]|8[189]|9[012])\\d{1,2}","\\d{4,5}",,,"12123"],,,[,,"NA","NA"]],EG:[,[,,"1\\d{4,9}|[2456]\\d{8}|3\\d{7}|[89]\\d{8,9}","\\d{5,10}"],[,,"(?:1(?:3[23]\\d|5(?:[23]|9\\d))|2[2-4]\\d{2}|3\\d{2}|4(?:0[2-5]|[578][23]|64)\\d|5(?:0[2-7]|[57][23])\\d|6[24-689]3\\d|8(?:2[2-57]|4[26]|6[237]|8[2-4])\\d|9(?:2[27]|3[24]|52|6[2356]|7[2-4])\\d)\\d{5}|1[69]\\d{3}","\\d{5,9}",,,"234567890"],[,,"1(?:0[0-269]|1[0-245]|2[0-278])\\d{7}","\\d{10}",,,"1001234567"],[,,"800\\d{7}","\\d{10}",,,"8001234567"],[,,"900\\d{7}","\\d{10}",,,"9001234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"EG",20,"00","0",,,"0",,,,[[,"(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1","",0],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1[012]|[89]00"],"0$1","",0],[,"(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|[89][2-9]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],EH:[,[,,"[5689]\\d{8}","\\d{9}"],[,,"528[89]\\d{5}","\\d{9}",,,"528812345"],[,,"6(?:0[0-8]|[12-79]\\d|8[01])\\d{6}","\\d{9}",,,"650123456"],[,,"80\\d{7}","\\d{9}",,,"801234567"],[,,"89\\d{7}","\\d{9}",,,"891234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"EH",212,"00","0",,,"0",,,,,,[,,"NA","NA"],,"528[89]",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],ER:[,[,,"[178]\\d{6}","\\d{6,7}"],[,,"1(?:1[12568]|20|40|55|6[146])\\d{4}|8\\d{6}","\\d{6,7}",,,"8370362"],[,,"17[1-3]\\d{4}|7\\d{6}","\\d{7}",,,"7123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"ER",291,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",,"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],ES:[,[,,"[5-9]\\d{8}","\\d{9}"],[,,"8(?:[13]0|[28][0-8]|[47][1-9]|5[01346-9]|6[0457-9])\\d{6}|9(?:[1238][0-8]\\d{6}|4[1-9]\\d{6}|5\\d{7}|6(?:[0-8]\\d{6}|9(?:0(?:[0-57-9]\\d{4}|6(?:0[0-8]|1[1-9]|[2-9]\\d)\\d{2})|[1-9]\\d{5}))|7(?:[124-9]\\d{2}|3(?:[0-8]\\d|9[1-9]))\\d{4})","\\d{9}",,,"810123456"],[,,"(?:6\\d{6}|7[1-4]\\d{5}|9(?:6906(?:09|10)|7390\\d{2}))\\d{2}","\\d{9}",,,"612345678"],[,,"[89]00\\d{6}","\\d{9}",,,"800123456"],[,,"80[367]\\d{6}","\\d{9}",,,"803123456"],[,,"90[12]\\d{6}","\\d{9}",,,"901123456"],[,,"70\\d{7}","\\d{9}",,,"701234567"],[,,"NA","NA"],"ES",34,"00",,,,,,,,[[,"([5-9]\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[568]|[79][0-8]"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"51\\d{7}","\\d{9}",,,"511234567"],,,[,,"NA","NA"]],ET:[,[,,"[1-59]\\d{8}","\\d{7,9}"],[,,"(?:11(?:1(?:1[124]|2[2-57]|3[1-5]|5[5-8]|8[6-8])|2(?:13|3[6-8]|5[89]|7[05-9]|8[2-6])|3(?:2[01]|3[0-289]|4[1289]|7[1-4]|87)|4(?:1[69]|3[2-49]|4[0-3]|6[5-8])|5(?:1[57]|44|5[0-4])|6(?:18|2[69]|4[5-7]|5[1-5]|6[0-59]|8[015-8]))|2(?:2(?:11[1-9]|22[0-7]|33\\d|44[1467]|66[1-68])|5(?:11[124-6]|33[2-8]|44[1467]|55[14]|66[1-3679]|77[124-79]|880))|3(?:3(?:11[0-46-8]|22[0-6]|33[0134689]|44[04]|55[0-6]|66[01467])|4(?:44[0-8]|55[0-69]|66[0-3]|77[1-5]))|4(?:6(?:22[0-24-7]|33[1-5]|44[13-69]|55[14-689]|660|88[1-4])|7(?:11[1-9]|22[1-9]|33[13-7]|44[13-6]|55[1-689]))|5(?:7(?:227|55[05]|(?:66|77)[14-8])|8(?:11[149]|22[013-79]|33[0-68]|44[013-8]|550|66[1-5]|77\\d)))\\d{4}","\\d{7,9}",,,"111112345"],[,,"9(?:[1-3]\\d|5[89])\\d{6}","\\d{9}",,,"911234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"ET",251,"00","0",,,"0",,,,[[,"([1-59]\\d)(\\d{3})(\\d{4})","$1 $2 $3",,"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],FI:[,[,,"1\\d{4,11}|[2-9]\\d{4,10}","\\d{5,12}"],[,,"1(?:[3569][1-8]\\d{3,9}|[47]\\d{5,10})|2[1-8]\\d{3,9}|3(?:[1-8]\\d{3,9}|9\\d{4,8})|[5689][1-8]\\d{3,9}","\\d{5,12}",,,"1312345678"],[,,"4\\d{5,10}|50\\d{4,8}","\\d{6,11}",,,"412345678"],[,,"800\\d{4,7}","\\d{7,10}",,,"8001234567"],[,,"[67]00\\d{5,6}","\\d{8,9}",,,"600123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"FI",358,"00|99[049]","0",,,"0",,,,[[,"(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]00|[6-8]0)"],"0$1","",0],[,"(\\d{2})(\\d{4,10})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1","",0],[,"(\\d)(\\d{4,11})","$1 $2",["[25689][1-8]|3"],"0$1","",0]],,[,,"NA","NA"],1,,[,,"[13]00\\d{3,7}|2(?:0(?:0\\d{3,7}|2[023]\\d{1,6}|9[89]\\d{1,6}))|60(?:[12]\\d{5,6}|6\\d{7})|7(?:1\\d{7}|3\\d{8}|5[03-9]\\d{2,7})","\\d{5,10}",,,"100123"],[,,"[13]0\\d{4,8}|2(?:0(?:[016-8]\\d{3,7}|[2-59]\\d{2,7})|9\\d{4,8})|60(?:[12]\\d{5,6}|6\\d{7})|7(?:1\\d{7}|3\\d{8}|5[03-9]\\d{2,7})","\\d{5,10}",,,"10112345"],,,[,,"NA","NA"]],FJ:[,[,,"[36-9]\\d{6}|0\\d{10}","\\d{7}(?:\\d{4})?"],[,,"(?:3[0-5]|6[25-7]|8[58])\\d{5}","\\d{7}",,,"3212345"],[,,"(?:7[0-8]|8[034679]|9\\d)\\d{5}","\\d{7}",,,"7012345"],[,,"0800\\d{7}","\\d{11}",,,"08001234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"FJ",679,"0(?:0|52)",,,,,,"00",,[[,"(\\d{3})(\\d{4})","$1 $2",["[36-9]"],"","",0],[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],1,,[,,"NA","NA"]],FK:[,[,,"[2-7]\\d{4}","\\d{5}"],[,,"[2-47]\\d{4}","\\d{5}",,,"31234"],[,,"[56]\\d{4}","\\d{5}",,,"51234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"FK",500,"00",,,,,,,,,,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],FM:[,[,,"[39]\\d{6}","\\d{7}"],[,,"3[2357]0[1-9]\\d{3}|9[2-6]\\d{5}","\\d{7}",,,"3201234"],[,,"3[2357]0[1-9]\\d{3}|9[2-7]\\d{5}","\\d{7}",,,"3501234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"FM",691,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],FO:[,[,,"[2-9]\\d{5}","\\d{6}"],[,,"(?:20|[3-4]\\d|8[19])\\d{4}","\\d{6}",,,"201234"],[,,"(?:2[1-9]|5\\d|7[1-79])\\d{4}","\\d{6}",,,"211234"],[,,"80[257-9]\\d{3}","\\d{6}",,,"802123"],[,,"90(?:[1345][15-7]|2[125-7]|99)\\d{2}","\\d{6}",,,"901123"],[,,"NA","NA"],[,,"NA","NA"],[,,"(?:6[0-36]|88)\\d{4}","\\d{6}",,,"601234"],"FO",298,"00",,,,"(10(?:01|[12]0|88))",,,,[[,"(\\d{6})","$1",,"","$CC $1",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],FR:[,[,,"[1-9]\\d{8}","\\d{9}"],[,,"[1-5]\\d{8}","\\d{9}",,,"123456789"],[,,"6\\d{8}|7(?:00\\d{6}|[3-9]\\d{7})","\\d{9}",,,"612345678"],[,,"80\\d{7}","\\d{9}",,,"801234567"],[,,"89[1-37-9]\\d{6}","\\d{9}",,,"891123456"],[,,"8(?:1[019]|2[0156]|84|90)\\d{6}","\\d{9}",,,"810123456"],[,,"NA","NA"],[,,"9\\d{8}","\\d{9}",,,"912345678"],"FR",33,"00","0",,,"0",,,,[[,"([1-79])(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1","",0],[,"(1\\d{2})(\\d{3})","$1 $2",["11"],"$1","",0],[,"(8\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1","",0]],[[,"([1-79])(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1","",0],[,"(8\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1","",0]],[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],GA:[,[,,"0?\\d{7}","\\d{7,8}"],[,,"01\\d{6}","\\d{8}",,,"01441234"],[,,"0?[2-7]\\d{6}","\\d{7,8}",,,"06031234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"GA",241,"00",,,,,,,,[[,"(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1","",0],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],1,,[,,"NA","NA"]],GB:[,[,,"\\d{7,10}","\\d{4,10}"],[,,"2(?:0[01378]|3[0189]|4[017]|8[0-46-9]|9[012])\\d{7}|1(?:(?:1(?:3[0-48]|[46][0-4]|5[012789]|7[0-49]|8[01349])|21[0-7]|31[0-8]|[459]1\\d|61[0-46-9]))\\d{6}|1(?:2(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-4789]|7[013-9]|9\\d)|3(?:0\\d|[25][02-9]|3[02-579]|[468][0-46-9]|7[1235679]|9[24578])|4(?:0[03-9]|[28][02-5789]|[37]\\d|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1235-9]|2[024-9]|3[015689]|4[02-9]|5[03-9]|6\\d|7[0-35-9]|8[0-468]|9[0-5789])|6(?:0[034689]|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0124578])|7(?:0[0246-9]|2\\d|3[023678]|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-5789]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|2[02-689]|3[1-5789]|4[2-9]|5[0-579]|6[234789]|7[0124578]|8\\d|9[2-57]))\\d{6}|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-4789]|8[345])))|3(?:638[2-5]|647[23]|8(?:47[04-9]|64[015789]))|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[123]))|5(?:24(?:3[2-79]|6\\d)|276\\d|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[567]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|955[0-4])|7(?:26(?:6[13-9]|7[0-7])|442\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|84(?:3[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}|176888[234678]\\d{2}|16977[23]\\d{3}","\\d{4,10}",,,"1212345678"],[,,"7(?:[1-4]\\d\\d|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(?:[04-9]\\d|1[02-9]|2[0-35-9]|3[0-689]))\\d{6}","\\d{10}",,,"7400123456"],[,,"80(?:0(?:1111|\\d{6,7})|8\\d{7})|500\\d{6}","\\d{7}(?:\\d{2,3})?",,,"8001234567"],[,,"(?:87[123]|9(?:[01]\\d|8[2349]))\\d{7}","\\d{10}",,,"9012345678"],[,,"8(?:4(?:5464\\d|[2-5]\\d{7})|70\\d{7})","\\d{7}(?:\\d{3})?",,,"8431234567"],[,,"70\\d{8}","\\d{10}",,,"7012345678"],[,,"56\\d{8}","\\d{10}",,,"5612345678"],"GB",44,"00","0"," x",,"0",,,,[[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2|5[56]|7(?:0|6[013-9])","2|5[56]|7(?:0|6(?:[013-9]|2[0-35-9]))"],"0$1","",0],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:1|\\d1)|3|9[018]"],"0$1","",0],[,"(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:387|5(?:24|39)|697|768|946)","1(?:3873|5(?:242|39[456])|697[347]|768[347]|9467)"],"0$1","",0],[,"(1\\d{3})(\\d{5,6})","$1 $2",["1"],"0$1","",0],[,"(7\\d{3})(\\d{6})","$1 $2",["7(?:[1-5789]|62)","7(?:[1-5789]|624)"],"0$1","",0],[,"(800)(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1","",0],[,"(845)(46)(4\\d)","$1 $2 $3",["845","8454","84546","845464"],"0$1","",0],[,"(8\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8(?:4[2-5]|7[0-3])"],"0$1","",0],[,"(80\\d)(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1","",0],[,"([58]00)(\\d{6})","$1 $2",["[58]00"],"0$1","",0]],,[,,"76(?:0[012]|2[356]|4[0134]|5[49]|6[0-369]|77|81|9[39])\\d{6}","\\d{10}",,,"7640123456"],1,,[,,"NA","NA"],[,,"(?:3[0347]|55)\\d{8}","\\d{10}",,,"5512345678"],,,[,,"NA","NA"]],GD:[,[,,"[4589]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"473(?:2(?:3[0-2]|69)|3(?:2[89]|86)|4(?:[06]8|3[5-9]|4[0-49]|5[5-79]|68|73|90)|63[68]|7(?:58|84)|800|938)\\d{4}","\\d{7}(?:\\d{3})?",,,"4732691234"],[,,"473(?:4(?:0[2-79]|1[04-9]|20|58)|5(?:2[01]|3[3-8])|901)\\d{4}","\\d{10}",,,"4734031234"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002123456"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002123456"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"GD",1,"011","1",,,"1",,,,,,[,,"NA","NA"],,"473",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],GE:[,[,,"[34578]\\d{8}","\\d{6,9}"],[,,"(?:3(?:[256]\\d|4[124-9]|7[0-4])|4(?:1\\d|2[2-7]|3[1-79]|4[2-8]|7[239]|9[1-7]))\\d{6}","\\d{6,9}",,,"322123456"],[,,"5(?:14|5[01578]|68|7[0147-9]|9[0-35-9])\\d{6}","\\d{9}",,,"555123456"],[,,"800\\d{6}","\\d{9}",,,"800123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"706\\d{6}","\\d{9}",,,"706123456"],"GE",995,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1","",0],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1","",0],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5"],"$1","",0]],,[,,"NA","NA"],,,[,,"706\\d{6}","\\d{9}",,,"706123456"],[,,"NA","NA"],,,[,,"NA","NA"]],GF:[,[,,"[56]\\d{8}","\\d{9}"],[,,"594(?:10|2[012457-9]|3[0-57-9]|4[3-9]|5[7-9]|6[0-3]|9[014])\\d{4}","\\d{9}",,,"594101234"],[,,"694(?:[04][0-7]|1[0-5]|3[018]|[29]\\d)\\d{4}","\\d{9}",,,"694201234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"GF",594,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],GG:[,[,,"[135789]\\d{6,9}","\\d{6,10}"],[,,"1481\\d{6}","\\d{6,10}",,,"1481456789"],[,,"7(?:781|839|911)\\d{6}","\\d{10}",,,"7781123456"],[,,"80(?:0(?:1111|\\d{6,7})|8\\d{7})|500\\d{6}","\\d{7}(?:\\d{2,3})?",,,"8001234567"],[,,"(?:87[123]|9(?:[01]\\d|8[0-3]))\\d{7}","\\d{10}",,,"9012345678"],[,,"8(?:4(?:5464\\d|[2-5]\\d{7})|70\\d{7})","\\d{7}(?:\\d{3})?",,,"8431234567"],[,,"70\\d{8}","\\d{10}",,,"7012345678"],[,,"56\\d{8}","\\d{10}",,,"5612345678"],"GG",44,"00","0"," x",,"0",,,,,,[,,"76(?:0[012]|2[356]|4[0134]|5[49]|6[0-369]|77|81|9[39])\\d{6}","\\d{10}",,,"7640123456"],,,[,,"NA","NA"],[,,"(?:3[0347]|55)\\d{8}","\\d{10}",,,"5512345678"],,,[,,"NA","NA"]],GH:[,[,,"[235]\\d{8}|8\\d{7}","\\d{7,9}"],[,,"3(?:0[237]\\d|[167](?:2[0-6]|7\\d)|2(?:2[0-5]|7\\d)|3(?:2[0-3]|7\\d)|4(?:2[013-9]|3[01]|7\\d)|5(?:2[0-7]|7\\d)|8(?:2[0-2]|7\\d)|9(?:20|7\\d))\\d{5}","\\d{7,9}",,,"302345678"],[,,"(?:2[034678]\\d|5(?:[047]\\d|5[3-6]|6[01]))\\d{6}","\\d{9}",,,"231234567"],[,,"800\\d{5}","\\d{8}",,,"80012345"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"GH",233,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1","",0],[,"(\\d{3})(\\d{5})","$1 $2",["8"],"0$1","",0]],,[,,"NA","NA"],,,[,,"800\\d{5}","\\d{8}",,,"80012345"],[,,"NA","NA"],,,[,,"NA","NA"]],GI:[,[,,"[2568]\\d{7}","\\d{8}"],[,,"2(?:00\\d|1(?:6[24-7]|9\\d)|2(?:00|2[2457]))\\d{4}","\\d{8}",,,"20012345"],[,,"(?:5[46-8]|62)\\d{6}","\\d{8}",,,"57123456"],[,,"80\\d{6}","\\d{8}",,,"80123456"],[,,"8[1-689]\\d{6}","\\d{8}",,,"88123456"],[,,"87\\d{6}","\\d{8}",,,"87123456"],[,,"NA","NA"],[,,"NA","NA"],"GI",350,"00",,,,,,,,[[,"(\\d{3})(\\d{5})","$1 $2",["2"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],GL:[,[,,"[1-689]\\d{5}","\\d{6}"],[,,"(?:19|3[1-6]|6[14689]|8[14-79]|9\\d)\\d{4}","\\d{6}",,,"321000"],[,,"[245][2-9]\\d{4}","\\d{6}",,,"221234"],[,,"80\\d{4}","\\d{6}",,,"801234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"3[89]\\d{4}","\\d{6}",,,"381234"],"GL",299,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],GM:[,[,,"[2-9]\\d{6}","\\d{7}"],[,,"(?:4(?:[23]\\d{2}|4(?:1[024679]|[6-9]\\d))|5(?:54[0-7]|6(?:[67]\\d)|7(?:1[04]|2[035]|3[58]|48))|8\\d{3})\\d{3}","\\d{7}",,,"5661234"],[,,"(?:2[0-6]|[3679]\\d)\\d{5}","\\d{7}",,,"3012345"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"GM",220,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],GN:[,[,,"[367]\\d{7,8}","\\d{8,9}"],[,,"30(?:24|3[12]|4[1-35-7]|5[13]|6[189]|[78]1|9[1478])\\d{4}","\\d{8}",,,"30241234"],[,,"6[02356]\\d{7}","\\d{9}",,,"601123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"722\\d{6}","\\d{9}",,,"722123456"],"GN",224,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"],"","",0],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],GP:[,[,,"[56]\\d{8}","\\d{9}"],[,,"590(?:0[13468]|1[012]|2[0-68]|3[28]|4[0-8]|5[579]|6[0189]|70|8[0-689]|9\\d)\\d{4}","\\d{9}",,,"590201234"],[,,"690(?:0[0-7]|[1-9]\\d)\\d{4}","\\d{9}",,,"690301234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"GP",590,"00","0",,,"0",,,,[[,"([56]90)(\\d{2})(\\d{4})","$1 $2-$3",,"0$1","",0]],,[,,"NA","NA"],1,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],GQ:[,[,,"[23589]\\d{8}","\\d{9}"],[,,"3(?:3(?:3\\d[7-9]|[0-24-9]\\d[46])|5\\d{2}[7-9])\\d{4}","\\d{9}",,,"333091234"],[,,"(?:222|551)\\d{6}","\\d{9}",,,"222123456"],[,,"80\\d[1-9]\\d{5}","\\d{9}",,,"800123456"],[,,"90\\d[1-9]\\d{5}","\\d{9}",,,"900123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"GQ",240,"00",,,,,,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"],"","",0],[,"(\\d{3})(\\d{6})","$1 $2",["[89]"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],GR:[,[,,"[26-9]\\d{9}","\\d{10}"],[,,"2(?:1\\d{2}|2(?:2[1-46-9]|3[1-8]|4[1-7]|5[1-4]|6[1-8]|7[1-5]|[89][1-9])|3(?:1\\d|2[1-57]|[35][1-3]|4[13]|7[1-7]|8[124-6]|9[1-79])|4(?:1\\d|2[1-8]|3[1-4]|4[13-5]|6[1-578]|9[1-5])|5(?:1\\d|[29][1-4]|3[1-5]|4[124]|5[1-6])|6(?:1\\d|3[1245]|4[1-7]|5[13-9]|[269][1-6]|7[14]|8[1-5])|7(?:1\\d|2[1-5]|3[1-6]|4[1-7]|5[1-57]|6[135]|9[125-7])|8(?:1\\d|2[1-5]|[34][1-4]|9[1-57]))\\d{6}","\\d{10}",,,"2123456789"],[,,"69\\d{8}","\\d{10}",,,"6912345678"],[,,"800\\d{7}","\\d{10}",,,"8001234567"],[,,"90[19]\\d{7}","\\d{10}",,,"9091234567"],[,,"8(?:0[16]|12|25)\\d{7}","\\d{10}",,,"8011234567"],[,,"70\\d{8}","\\d{10}",,,"7012345678"],[,,"NA","NA"],"GR",30,"00",,,,,,,,[[,"([27]\\d)(\\d{4})(\\d{4})","$1 $2 $3",["21|7"],"","",0],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["2[2-9]1|[689]"],"","",0],[,"(2\\d{3})(\\d{6})","$1 $2",["2[2-9][02-9]"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],GT:[,[,,"[2-7]\\d{7}|1[89]\\d{9}","\\d{8}(?:\\d{3})?"],[,,"[267][2-9]\\d{6}","\\d{8}",,,"22456789"],[,,"[345]\\d{7}","\\d{8}",,,"51234567"],[,,"18[01]\\d{8}","\\d{11}",,,"18001112222"],[,,"19\\d{9}","\\d{11}",,,"19001112222"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"GT",502,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[2-7]"],"","",0],[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],GU:[,[,,"[5689]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"671(?:3(?:00|3[39]|4[349]|55|6[26])|4(?:56|7[1-9]|8[236-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[5-9])|7(?:[079]7|2[0167]|3[45]|8[789])|8(?:[2-5789]8|6[48])|9(?:2[29]|6[79]|7[179]|8[789]|9[78]))\\d{4}","\\d{7}(?:\\d{3})?",,,"6713001234"],[,,"671(?:3(?:00|3[39]|4[349]|55|6[26])|4(?:56|7[1-9]|8[236-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[5-9])|7(?:[079]7|2[0167]|3[45]|8[789])|8(?:[2-5789]8|6[48])|9(?:2[29]|6[79]|7[179]|8[789]|9[78]))\\d{4}","\\d{7}(?:\\d{3})?",,,"6713001234"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002123456"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002123456"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"GU",1,"011","1",,,"1",,,1,,,[,,"NA","NA"],,"671",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],GW:[,[,,"[3-79]\\d{6}","\\d{7}"],[,,"3(?:2[0125]|3[1245]|4[12]|5[1-4]|70|9[1-467])\\d{4}","\\d{7}",,,"3201234"],[,,"(?:[5-7]\\d|9[012])\\d{5}","\\d{7}",,,"5012345"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"40\\d{5}","\\d{7}",,,"4012345"],"GW",245,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],GY:[,[,,"[2-4679]\\d{6}","\\d{7}"],[,,"(?:2(?:1[6-9]|2[0-35-9]|3[1-4]|5[3-9]|6\\d|7[0-24-79])|3(?:2[25-9]|3\\d)|4(?:4[0-24]|5[56])|77[1-57])\\d{4}","\\d{7}",,,"2201234"],[,,"6\\d{6}","\\d{7}",,,"6091234"],[,,"(?:289|862)\\d{4}","\\d{7}",,,"2891234"],[,,"9008\\d{3}","\\d{7}",,,"9008123"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"GY",592,"001",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],HK:[,[,,"[235-7]\\d{7}|8\\d{7,8}|9\\d{4,10}","\\d{5,11}"],[,,"(?:[23]\\d|5[78])\\d{6}","\\d{8}",,,"21234567"],[,,"(?:5[1-69]\\d|6\\d{2}|9(?:0[1-9]|[1-8]\\d))\\d{5}","\\d{8}",,,"51234567"],[,,"800\\d{6}","\\d{9}",,,"800123456"],[,,"900(?:[0-24-9]\\d{7}|3\\d{1,4})","\\d{5,11}",,,"90012345678"],[,,"NA","NA"],[,,"8[1-3]\\d{6}","\\d{8}",,,"81123456"],[,,"NA","NA"],"HK",852,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[235-7]|[89](?:0[1-9]|[1-9])"],"","",0],[,"(800)(\\d{3})(\\d{3})","$1 $2 $3",["800"],"","",0],[,"(900)(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["900"],"","",0],[,"(900)(\\d{2,5})","$1 $2",["900"],"","",0]],,[,,"7\\d{7}","\\d{8}",,,"71234567"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],HN:[,[,,"[237-9]\\d{7}","\\d{8}"],[,,"2(?:2(?:0[019]|1[1-36]|[23]\\d|4[056]|5[57]|7[01389]|8[0146-9]|9[012])|4(?:2[3-59]|3[13-689]|4[0-68]|5[1-35])|5(?:4[3-5]|5\\d|6[56]|74)|6(?:[056]\\d|34|4[0-378]|[78][0-8]|9[01])|7(?:6[46-9]|7[02-9]|8[34])|8(?:79|8[0-35789]|9[1-57-9]))\\d{4}","\\d{8}",,,"22123456"],[,,"[37-9]\\d{7}","\\d{8}",,,"91234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"HN",504,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1-$2",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],HR:[,[,,"[1-7]\\d{5,8}|[89]\\d{6,11}","\\d{6,12}"],[,,"1\\d{7}|(?:2[0-3]|3[1-5]|4[02-47-9]|5[1-3])\\d{6,7}","\\d{6,9}",,,"12345678"],[,,"9(?:[1-9]\\d{6,10}|01\\d{6,9})","\\d{8,12}",,,"912345678"],[,,"80[01]\\d{4,7}","\\d{7,10}",,,"8001234567"],[,,"6(?:[01459]\\d{4,7})","\\d{6,9}",,,"611234"],[,,"NA","NA"],[,,"7[45]\\d{4,7}","\\d{6,9}",,,"741234567"],[,,"NA","NA"],"HR",385,"00","0",,,"0",,,,[[,"(1)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1","",0],[,"(6[09])(\\d{4})(\\d{3})","$1 $2 $3",["6[09]"],"0$1","",0],[,"([67]2)(\\d{3})(\\d{3,4})","$1 $2 $3",["[67]2"],"0$1","",0],[,"([2-5]\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-5]"],"0$1","",0],[,"(9\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1","",0],[,"(9\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9"],"0$1","",0],[,"(9\\d)(\\d{3,4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"],"0$1","",0],[,"(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[0145]|7"],"0$1","",0],[,"(\\d{2})(\\d{3,4})(\\d{3})","$1 $2 $3",["6[0145]|7"],"0$1","",0],[,"(80[01])(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1","",0],[,"(80[01])(\\d{3,4})(\\d{3})","$1 $2 $3",["8"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"[76]2\\d{6,7}","\\d{8,9}",,,"62123456"],,,[,,"NA","NA"]],HT:[,[,,"[2-489]\\d{7}","\\d{8}"],[,,"2(?:[24]\\d|5[1-5]|94)\\d{5}","\\d{8}",,,"22453300"],[,,"(?:3[1-9]|4\\d)\\d{6}","\\d{8}",,,"34101234"],[,,"8\\d{7}","\\d{8}",,,"80012345"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"98[89]\\d{5}","\\d{8}",,,"98901234"],"HT",509,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],HU:[,[,,"[1-9]\\d{7,8}","\\d{6,9}"],[,,"(?:1\\d|2(?:1\\d|[2-9])|3(?:[2-7]|8\\d)|4[24-9]|5[2-79]|6[23689]|7(?:1\\d|[2-9])|8[2-57-9]|9[2-69])\\d{6}","\\d{6,9}",,,"12345678"],[,,"(?:[257]0|3[01])\\d{7}","\\d{9}",,,"201234567"],[,,"80\\d{6}","\\d{8}",,,"80123456"],[,,"9[01]\\d{6}","\\d{8}",,,"90123456"],[,,"40\\d{6}","\\d{8}",,,"40123456"],[,,"NA","NA"],[,,"NA","NA"],"HU",36,"00","06",,,"06",,,,[[,"(1)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"($1)","",0],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"($1)","",0]],,[,,"NA","NA"],,,[,,"[48]0\\d{6}","\\d{8}",,,"80123456"],[,,"NA","NA"],,,[,,"NA","NA"]],ID:[,[,,"[1-9]\\d{6,10}","\\d{5,11}"],[,,"2(?:1(?:14\\d{3}|[0-8]\\d{6,7}|500\\d{3}|9\\d{6})|2\\d{6,8}|4\\d{7,8})|(?:2(?:[35][1-4]|6[0-8]|7[1-6]|8\\d|9[1-8])|3(?:1|[25][1-8]|3[1-68]|4[1-3]|6[1-3568]|7[0-469]|8\\d)|4(?:0[1-589]|1[01347-9]|2[0-36-8]|3[0-24-68]|43|5[1-378]|6[1-5]|7[134]|8[1245])|5(?:1[1-35-9]|2[25-8]|3[124-9]|4[1-3589]|5[1-46]|6[1-8])|6(?:19?|[25]\\d|3[1-69]|4[1-6])|7(?:02|[125][1-9]|[36]\\d|4[1-8]|7[0-36-9])|9(?:0[12]|1[013-8]|2[0-479]|5[125-8]|6[23679]|7[159]|8[01346]))\\d{5,8}","\\d{5,11}",,,"612345678"],[,,"(?:2(?:1(?:3[145]|4[01]|5[1-469]|60|8[0359]|9\\d)|2(?:88|9[1256])|3[1-4]9|4(?:36|91)|5(?:1[349]|[2-4]9)|6[0-7]9|7(?:[1-36]9|4[39])|8[1-5]9|9[1-48]9)|3(?:19[1-3]|2[12]9|3[13]9|4(?:1[69]|39)|5[14]9|6(?:1[69]|2[89])|709)|4[13]19|5(?:1(?:19|8[39])|4[129]9|6[12]9)|6(?:19[12]|2(?:[23]9|77))|7(?:1[13]9|2[15]9|419|5(?:1[89]|29)|6[15]9|7[178]9))\\d{5,6}|8[1-35-9]\\d{7,9}","\\d{9,11}",,,"812345678"],[,,"177\\d{6,8}|800\\d{5,7}","\\d{8,11}",,,"8001234567"],[,,"809\\d{7}","\\d{10}",,,"8091234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"ID",62,"0(?:0[1789]|10(?:00|1[67]))","0",,,"0",,,,[[,"(\\d{2})(\\d{5,8})","$1 $2",["2[124]|[36]1"],"(0$1)","",0],[,"(\\d{3})(\\d{5,8})","$1 $2",["[4579]|2[035-9]|[36][02-9]"],"(0$1)","",0],[,"(8\\d{2})(\\d{3,4})(\\d{3,4})","$1-$2-$3",["8[1-35-9]"],"0$1","",0],[,"(177)(\\d{6,8})","$1 $2",["1"],"0$1","",0],[,"(800)(\\d{5,7})","$1 $2",["800"],"0$1","",0],[,"(80\\d)(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80[79]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"8071\\d{6}","\\d{10}",,,"8071123456"],[,,"8071\\d{6}","\\d{10}",,,"8071123456"],,,[,,"NA","NA"]],IE:[,[,,"[124-9]\\d{6,9}","\\d{5,10}"],[,,"1\\d{7,8}|2(?:1\\d{6,7}|3\\d{7}|[24-9]\\d{5})|4(?:0[24]\\d{5}|[1-469]\\d{7}|5\\d{6}|7\\d{5}|8[0-46-9]\\d{7})|5(?:0[45]\\d{5}|1\\d{6}|[23679]\\d{7}|8\\d{5})|6(?:1\\d{6}|[237-9]\\d{5}|[4-6]\\d{7})|7[14]\\d{7}|9(?:1\\d{6}|[04]\\d{7}|[35-9]\\d{5})","\\d{5,10}",,,"2212345"],[,,"8(?:22\\d{6}|[35-9]\\d{7})","\\d{9}",,,"850123456"],[,,"1800\\d{6}","\\d{10}",,,"1800123456"],[,,"15(?:1[2-8]|[2-8]0|9[089])\\d{6}","\\d{10}",,,"1520123456"],[,,"18[59]0\\d{6}","\\d{10}",,,"1850123456"],[,,"700\\d{6}","\\d{9}",,,"700123456"],[,,"76\\d{7}","\\d{9}",,,"761234567"],"IE",353,"00","0",,,"0",,,,[[,"(1)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)","",0],[,"(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)","",0],[,"(\\d{3})(\\d{5})","$1 $2",["40[24]|50[45]"],"(0$1)","",0],[,"(48)(\\d{4})(\\d{4})","$1 $2 $3",["48"],"(0$1)","",0],[,"(818)(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)","",0],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[24-69]|7[14]"],"(0$1)","",0],[,"([78]\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["76|8[35-9]"],"0$1","",0],[,"(700)(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1","",0],[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:8[059]|5)","1(?:8[059]0|5)"],"$1","",0]],,[,,"NA","NA"],,,[,,"18[59]0\\d{6}","\\d{10}",,,"1850123456"],[,,"818\\d{6}","\\d{9}",,,"818123456"],,,[,,"8[35-9]\\d{8}","\\d{10}",,,"8501234567"]],IL:[,[,,"[17]\\d{6,9}|[2-589]\\d{3}(?:\\d{3,6})?|6\\d{3}","\\d{4,10}"],[,,"[2-489]\\d{7}","\\d{7,8}",,,"21234567"],[,,"5(?:[02-47-9]\\d{2}|5(?:01|2[23]|3[34]|4[45]|5[5689]|6[67]|7[0178]|[89][6-9])|6[2-9]\\d)\\d{5}","\\d{9}",,,"501234567"],[,,"1(?:80[019]\\d{3}|255)\\d{3}","\\d{7,10}",,,"1800123456"],[,,"1(?:212|(?:9(?:0[01]|19)|200)\\d{2})\\d{4}","\\d{8,10}",,,"1919123456"],[,,"1700\\d{6}","\\d{10}",,,"1700123456"],[,,"NA","NA"],[,,"7(?:18\\d|2[23]\\d|3[237]\\d|47\\d|6(?:5\\d|8[0168])|7\\d{2}|8(?:2\\d|33|55|77|81)|99\\d)\\d{5}","\\d{9}",,,"771234567"],"IL",972,"0(?:0|1[2-9])","0",,,"0",,,,[[,"([2-489])(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1","",0],[,"([57]\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1","",0],[,"(1)([7-9]\\d{2})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"],"$1","",0],[,"(1255)(\\d{3})","$1-$2",["125"],"$1","",0],[,"(1200)(\\d{3})(\\d{3})","$1-$2-$3",["120"],"$1","",0],[,"(1212)(\\d{2})(\\d{2})","$1-$2-$3",["121"],"$1","",0],[,"(1599)(\\d{6})","$1-$2",["15"],"$1","",0],[,"(\\d{4})","*$1",["[2-689]"],"$1","",0]],,[,,"NA","NA"],,,[,,"1700\\d{6}|[2-689]\\d{3}","\\d{4,10}",,,"1700123456"],[,,"[2-689]\\d{3}|1599\\d{6}","\\d{4}(?:\\d{6})?",,,"1599123456"],,,[,,"NA","NA"]],IM:[,[,,"[135789]\\d{6,9}","\\d{6,10}"],[,,"1624\\d{6}","\\d{6,10}",,,"1624456789"],[,,"7[569]24\\d{6}","\\d{10}",,,"7924123456"],[,,"808162\\d{4}","\\d{10}",,,"8081624567"],[,,"(?:872299|90[0167]624)\\d{4}","\\d{10}",,,"9016247890"],[,,"8(?:4(?:40[49]06|5624\\d)|70624\\d)\\d{3}","\\d{10}",,,"8456247890"],[,,"70\\d{8}","\\d{10}",,,"7012345678"],[,,"56\\d{8}","\\d{10}",,,"5612345678"],"IM",44,"00","0"," x",,"0",,,,,,[,,"NA","NA"],,,[,,"NA","NA"],[,,"3(?:08162\\d|3\\d{5}|4(?:40[49]06|5624\\d)|7(?:0624\\d|2299\\d))\\d{3}|55\\d{8}","\\d{10}",,,"5512345678"],,,[,,"NA","NA"]],IN:[,[,,"1\\d{7,12}|[2-9]\\d{9,10}","\\d{6,13}"],[,,"(?:11|2[02]|33|4[04]|79)[2-7]\\d{7}|80[2-467]\\d{7}|(?:1(?:2[0-249]|3[0-25]|4[145]|[59][14]|6[014]|7[1257]|8[01346])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|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]|[36][25]|22|4[28]|5[12]|[78]1|9[15])|6(?:12|[2345]1|57|6[13]|7[14]|80)|7(?:12|2[14]|3[134]|4[47]|5[15]|[67]1|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91))[2-7]\\d{6}|(?:(?:1(?:2[35-8]|3[346-9]|4[236-9]|[59][0235-9]|6[235-9]|7[34689]|8[257-9])|2(?:1[134689]|3[24-8]|4[2-8]|5[25689]|6[2-4679]|7[13-79]|8[2-479]|9[235-9])|3(?:01|1[79]|2[1-5]|4[25-8]|5[125689]|6[235-7]|7[157-9]|8[2-467])|4(?:1[14578]|2[5689]|3[2-467]|5[4-7]|6[35]|73|8[2689]|9[2389])|5(?:[16][146-9]|2[14-8]|3[1346]|4[14-69]|5[46]|7[2-4]|8[2-8]|9[246])|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|[57][2-689]|6[24-578]|8[1-6])|8(?:1[1357-9]|2[235-8]|3[03-57-9]|4[0-24-9]|5\\d|6[2457-9]|7[1-6]|8[1256]|9[2-4]))\\d|7(?:(?:1[013-9]|2[0235-9]|3[2679]|4[1-35689]|5[2-46-9]|[67][02-9]|9\\d)\\d|8(?:2[0-6]|[013-8]\\d)))[2-7]\\d{5}","\\d{6,10}",,,"1123456789"],[,,"(?:7(?:0(?:2[2-9]|[3-8]\\d|9[0-8])|2(?:0[024-9]|19|2[012]|5[09]|7[5-8]|9[389])|3(?:0[1-9]|[58]\\d|7[3679]|9[689])|4(?:0[1-9]|1[15-9]|[29][89]|39|8[389])|5(?:[034678]\\d|2[03-9]|5[017-9]|9[7-9])|6(?:0[0127]|1[0-257-9]|2[0-4]|3[19]|5[4589]|[6-9]\\d)|7(?:0[2-9]|[1-79]\\d|8[1-9])|8(?:[0-7]\\d|9[013-9]))|8(?:0(?:[01589]\\d|6[67])|1(?:[02-589]\\d|1[0135-9]|7[0-79])|2(?:[236-9]\\d|5[1-9])|3(?:[0357-9]\\d|4[1-9])|[45]\\d{2}|6[02457-9]\\d|7[1-69]\\d|8(?:[0-26-9]\\d|44|5[2-9])|9(?:[035-9]\\d|2[2-9]|4[0-8]))|9\\d{3})\\d{6}","\\d{10}",,,"9123456789"],[,,"1(?:600\\d{6}|80(?:0\\d{4,9}|3\\d{9}))","\\d{8,13}",,,"1800123456"],[,,"186[12]\\d{9}","\\d{13}",,,"1861123456789"],[,,"1860\\d{7}","\\d{11}",,,"18603451234"],[,,"NA","NA"],[,,"NA","NA"],"IN",91,"00","0",,,"0",,,,[[,"(\\d{5})(\\d{5})","$1 $2",["7(?:0[2-9]|2[012579]|3[057-9]|4[0-389]|6[0-35-9]|[57]|8[0-79])|8(?:0[015689]|1[0-57-9]|2[2356-9]|3[0-57-9]|[45]|6[02457-9]|7[1-69]|8[0124-9]|9[02-9])|9","7(?:0(?:2[2-9]|[3-8]|9[0-8])|2(?:0[024-9]|19|2[012]|5[09]|7[5-8]|9[389])|3(?:0[1-9]|[58]|7[3679]|9[689])|4(?:0[1-9]|1[15-9]|[29][89]|39|8[389])|5(?:[034678]|2[03-9]|5[017-9]|9[7-9])|6(?:0[0-27]|1[0-257-9]|2[0-4]|3[19]|5[4589]|[6-9])|7(?:0[2-9]|[1-79]|8[1-9])|8(?:[0-7]|9[013-9]))|8(?:0(?:[01589]|6[67])|1(?:[02-589]|1[0135-9]|7[0-79])|2(?:[236-9]|5[1-9])|3(?:[0357-9]|4[1-9])|[45]|6[02457-9]|7[1-69]|8(?:[0-26-9]|44|5[2-9])|9(?:[035-9]|2[2-9]|4[0-8]))|9"],"0$1","",1],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79|80[2-46]"],"0$1","",1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[569][14]|7[1257]|8[1346]|[68][1-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|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]|[36][25]|22|4[28]|5[12]|[78]1|9[15])|6(?:12|[2345]1|57|6[13]|7[14]|80)"],"0$1","",1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7(?:12|2[14]|3[134]|4[47]|5[15]|[67]1|88)","7(?:12|2[14]|3[134]|4[47]|5(?:1|5[2-6])|[67]1|88)"],"0$1","",1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)"],"0$1","",1],[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[23579]|[468][1-9])|[2-8]"],"0$1","",1],[,"(1600)(\\d{2})(\\d{4})","$1 $2 $3",["160","1600"],"$1","",1],[,"(1800)(\\d{4,5})","$1 $2",["180","1800"],"$1","",1],[,"(18[06]0)(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],"$1","",1],[,"(140)(\\d{3})(\\d{4})","$1 $2 $3",["140"],"$1","",1],[,"(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18[06]","18(?:0[03]|6[12])"],"$1","",1]],,[,,"NA","NA"],,,[,,"1(?:600\\d{6}|8(?:0(?:0\\d{4,9}|3\\d{9})|6(?:0\\d{7}|[12]\\d{9})))","\\d{8,13}",,,"1800123456"],[,,"140\\d{7}","\\d{10}",,,"1409305260"],,,[,,"NA","NA"]],IO:[,[,,"3\\d{6}","\\d{7}"],[,,"37\\d{5}","\\d{7}",,,"3709100"],[,,"38\\d{5}","\\d{7}",,,"3801234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"IO",246,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],IQ:[,[,,"[1-7]\\d{7,9}","\\d{6,10}"],[,,"1\\d{7}|(?:2[13-5]|3[02367]|4[023]|5[03]|6[026])\\d{6,7}","\\d{6,9}",,,"12345678"],[,,"7[3-9]\\d{8}","\\d{10}",,,"7912345678"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"IQ",964,"00","0",,,"0",,,,[[,"(1)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1","",0],[,"([2-6]\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1","",0],[,"(7\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],IR:[,[,,"[1-8]\\d{9}|9(?:[0-4]\\d{8}|9\\d{2,8})","\\d{4,10}"],[,,"(?:1[137]|2[13-68]|3[1458]|4[145]|5[146-8]|6[146]|7[1467]|8[13467])\\d{8}","\\d{10}",,,"2123456789"],[,,"9(?:0[12]|[1-3]\\d)\\d{7}","\\d{10}",,,"9123456789"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"(?:[2-6]0\\d|993)\\d{7}","\\d{10}",,,"9932123456"],"IR",98,"00","0",,,"0",,,,[[,"(21)(\\d{3,5})","$1 $2",["21"],"0$1","",0],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1","",0],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1","",0],[,"(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["9"],"0$1","",0],[,"(\\d{3})(\\d{3})","$1 $2",["9"],"0$1","",0]],,[,,"943\\d{7}","\\d{10}",,,"9432123456"],,,[,,"NA","NA"],[,,"9990\\d{0,6}","\\d{4,10}",,,"9990123456"],,,[,,"NA","NA"]],IS:[,[,,"[4-9]\\d{6}|38\\d{7}","\\d{7,9}"],[,,"(?:4(?:1[0-24-6]|2[0-7]|[37][0-8]|4[0-245]|5[0-3568]|6\\d|8[0-36-8])|5(?:05|[156]\\d|2[02578]|3[013-7]|4[03-7]|7[0-2578]|8[0-35-9]|9[013-689])|87[23])\\d{4}","\\d{7}",,,"4101234"],[,,"38[589]\\d{6}|(?:6(?:1[1-8]|3[089]|4[0167]|5[019]|[67][0-69]|9\\d)|7(?:5[057]|7\\d|8[0-36-8])|8(?:2[0-5]|3[0-4]|[469]\\d|5[1-9]))\\d{4}","\\d{7,9}",,,"6111234"],[,,"800\\d{4}","\\d{7}",,,"8001234"],[,,"90\\d{5}","\\d{7}",,,"9011234"],[,,"NA","NA"],[,,"NA","NA"],[,,"49\\d{5}","\\d{7}",,,"4921234"],"IS",354,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[4-9]"],"","",0],[,"(3\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["3"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"(?:6(?:2[0-8]|49|8\\d)|87[0189]|95[48])\\d{4}","\\d{7}",,,"6201234"]],IT:[,[,,"[01589]\\d{5,10}|3(?:[12457-9]\\d{8}|[36]\\d{7,9})","\\d{6,11}"],[,,"0(?:[26]\\d{4,9}|(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|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])|7(?:[0159]\\d|2[12]|3[1-7]|4[2346]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[34578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7})","\\d{6,11}",,,"0212345678"],[,,"3(?:[12457-9]\\d{8}|6\\d{7,8}|3\\d{7,9})","\\d{9,11}",,,"3123456789"],[,,"80(?:0\\d{6}|3\\d{3})","\\d{6,9}",,,"800123456"],[,,"0878\\d{5}|1(?:44|6[346])\\d{6}|89(?:2\\d{3}|4(?:[0-4]\\d{2}|[5-9]\\d{4})|5(?:[0-4]\\d{2}|[5-9]\\d{6})|9\\d{6})","\\d{6,10}",,,"899123456"],[,,"84(?:[08]\\d{6}|[17]\\d{3})","\\d{6,9}",,,"848123456"],[,,"1(?:78\\d|99)\\d{6}","\\d{9,10}",,,"1781234567"],[,,"55\\d{8}","\\d{10}",,,"5512345678"],"IT",39,"00",,,,,,,,[[,"(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|55"],"","",0],[,"(0[26])(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"],"","",0],[,"(0[26])(\\d{4,6})","$1 $2",["0[26]"],"","",0],[,"(0\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]"],"","",0],[,"(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[245])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|[45][0-4]))"],"","",0],[,"(0\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["0[13-57-9][2-46-8]"],"","",0],[,"(0\\d{3})(\\d{2,6})","$1 $2",["0[13-57-9][2-46-8]"],"","",0],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13]|8(?:00|4[08]|9[59])","[13]|8(?:00|4[08]|9(?:5[5-9]|9))"],"","",0],[,"(\\d{4})(\\d{4})","$1 $2",["894","894[5-9]"],"","",0],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["3"],"","",0]],,[,,"NA","NA"],1,,[,,"848\\d{6}","\\d{9}",,,"848123456"],[,,"NA","NA"],1,,[,,"NA","NA"]],JE:[,[,,"[135789]\\d{6,9}","\\d{6,10}"],[,,"1534\\d{6}","\\d{6,10}",,,"1534456789"],[,,"7(?:509|7(?:00|97)|829|937)\\d{6}","\\d{10}",,,"7797123456"],[,,"80(?:07(?:35|81)|8901)\\d{4}","\\d{10}",,,"8007354567"],[,,"(?:871206|90(?:066[59]|1810|71(?:07|55)))\\d{4}","\\d{10}",,,"9018105678"],[,,"8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|70002)\\d{4}","\\d{10}",,,"8447034567"],[,,"701511\\d{4}","\\d{10}",,,"7015115678"],[,,"56\\d{8}","\\d{10}",,,"5612345678"],"JE",44,"00","0"," x",,"0",,,,,,[,,"76(?:0[012]|2[356]|4[0134]|5[49]|6[0-369]|77|81|9[39])\\d{6}","\\d{10}",,,"7640123456"],,,[,,"NA","NA"],[,,"3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))\\d{4}|55\\d{8}","\\d{10}",,,"5512345678"],,,[,,"NA","NA"]],JM:[,[,,"[589]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"876(?:5(?:0[12]|1[0-468]|2[35]|63)|6(?:0[1-3579]|1[027-9]|[23]\\d|40|5[06]|6[2-589]|7[05]|8[04]|9[4-9])|7(?:0[2-689]|[1-6]\\d|8[056]|9[45])|9(?:0[1-8]|1[02378]|[2-8]\\d|9[2-468]))\\d{4}","\\d{7}(?:\\d{3})?",,,"8765123456"],[,,"876(?:2[16-9]\\d|[348]\\d{2}|5(?:0[3-9]|27|6[0-24-9]|[3-578]\\d)|7(?:0[07]|7\\d|8[1-47-9]|9[0-36-9])|9(?:[01]9|9[0579]))\\d{4}","\\d{10}",,,"8762101234"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002123456"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002123456"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"JM",1,"011","1",,,"1",,,,,,[,,"NA","NA"],,"876",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],JO:[,[,,"[235-9]\\d{7,8}","\\d{8,9}"],[,,"(?:2(?:6(?:2[0-35-9]|3[0-57-8]|4[24-7]|5[0-24-8]|[6-8][023]|9[0-3])|7(?:0[1-79]|10|2[014-7]|3[0-689]|4[019]|5[0-3578]))|32(?:0[1-69]|1[1-35-7]|2[024-7]|3\\d|4[0-3]|[57][023]|6[03])|53(?:0[0-3]|[13][023]|2[0-59]|49|5[0-35-9]|6[15]|7[45]|8[1-6]|9[0-36-9])|6(?:2[50]0|3(?:00|33)|4(?:0[0125]|1[2-7]|2[0569]|[38][07-9]|4[025689]|6[0-589]|7\\d|9[0-2])|5(?:[01][056]|2[034]|3[0-57-9]|4[17-8]|5[0-69]|6[0-35-9]|7[1-379]|8[0-68]|9[02-39]))|87(?:[02]0|7[08]|90))\\d{4}","\\d{8}",,,"62001234"],[,,"7(?:55|7[025-9]|8[05-9]|9[0-25-9])\\d{6}","\\d{9}",,,"790123456"],[,,"80\\d{6}","\\d{8}",,,"80012345"],[,,"900\\d{5}","\\d{8}",,,"90012345"],[,,"85\\d{6}","\\d{8}",,,"85012345"],[,,"70\\d{7}","\\d{9}",,,"700123456"],[,,"NA","NA"],"JO",962,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)","",0],[,"(7)(\\d{4})(\\d{4})","$1 $2 $3",["7[457-9]"],"0$1","",0],[,"(\\d{3})(\\d{5,6})","$1 $2",["70|8[0158]|9"],"0$1","",0]],,[,,"74(?:66|77)\\d{5}","\\d{9}",,,"746612345"],,,[,,"NA","NA"],[,,"8(?:10|8\\d)\\d{5}","\\d{8}",,,"88101234"],,,[,,"NA","NA"]],JP:[,[,,"[1-9]\\d{8,9}|00(?:[36]\\d{7,14}|7\\d{5,7}|8\\d{7})","\\d{8,17}"],[,,"(?:1(?:1[235-8]|2[3-6]|3[3-9]|4[2-6]|[58][2-8]|6[2-7]|7[2-9]|9[1-9])|2[2-9]\\d|[36][1-9]\\d|4(?:6[02-8]|[2-578]\\d|9[2-59])|5(?:6[1-9]|7[2-8]|[2-589]\\d)|7(?:3[4-9]|4[02-9]|[25-9]\\d)|8(?:3[2-9]|4[5-9]|5[1-9]|8[03-9]|[2679]\\d)|9(?:[679][1-9]|[2-58]\\d))\\d{6}","\\d{9}",,,"312345678"],[,,"[7-9]0[1-9]\\d{7}","\\d{10}",,,"9012345678"],[,,"120\\d{6}|800\\d{7}|00(?:37\\d{6,13}|66\\d{6,13}|777(?:[01]\\d{2}|5\\d{3}|8\\d{4})|882[1245]\\d{4})","\\d{8,17}",,,"120123456"],[,,"990\\d{6}","\\d{9}",,,"990123456"],[,,"NA","NA"],[,,"60\\d{7}","\\d{9}",,,"601234567"],[,,"50[1-9]\\d{7}","\\d{10}",,,"5012345678"],"JP",81,"010","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1","",0],[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1","",0],[,"(\\d{4})(\\d{4})","$1-$2",["0077"],"$1","",0],[,"(\\d{4})(\\d{2})(\\d{3,4})","$1-$2-$3",["0077"],"$1","",0],[,"(\\d{4})(\\d{2})(\\d{4})","$1-$2-$3",["0088"],"$1","",0],[,"(\\d{4})(\\d{3})(\\d{3,4})","$1-$2-$3",["00(?:37|66)"],"$1","",0],[,"(\\d{4})(\\d{4})(\\d{4,5})","$1-$2-$3",["00(?:37|66)"],"$1","",0],[,"(\\d{4})(\\d{5})(\\d{5,6})","$1-$2-$3",["00(?:37|66)"],"$1","",0],[,"(\\d{4})(\\d{6})(\\d{6,7})","$1-$2-$3",["00(?:37|66)"],"$1","",0],[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[2579]0|80[1-9]"],"0$1","",0],[,"(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|5(?:76|97)|499|746|8(?:3[89]|63|47|51)|9(?:49|80|9[16])","1(?:267|3(?:7[247]|9[278])|4(?:5[67]|66)|5(?:47|58|64|8[67])|6(?:3[245]|48|5[4-68]))|5(?:76|97)9|499[2468]|7468|8(?:3(?:8[78]|96)|636|477|51[24])|9(?:496|802|9(?:1[23]|69))","1(?:267|3(?:7[247]|9[278])|4(?:5[67]|66)|5(?:47|58|64|8[67])|6(?:3[245]|48|5[4-68]))|5(?:769|979[2-69])|499[2468]|7468|8(?:3(?:8[78]|96[2457-9])|636[2-57-9]|477|51[24])|9(?:496|802|9(?:1[23]|69))"],"0$1","",0],[,"(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["1(?:2[3-6]|3[3-9]|4[2-6]|5[2-8]|[68][2-7]|7[2-689]|9[1-578])|2(?:2[03-689]|3[3-58]|4[0-468]|5[04-8]|6[013-8]|7[06-9]|8[02-57-9]|9[13])|4(?:2[28]|3[689]|6[035-7]|7[05689]|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9[4-9])|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9[014-9])|8(?:2[49]|3[3-8]|4[5-8]|5[2-9]|6[35-9]|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9[3-7])","1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:5[78]|7[2-4]|[0468][2-9])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[89][2-8]|[4-7]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9[2-8])|3(?:7[2-6]|[3-6][2-9]|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5[4-7]|6[2-9]|8[2-8]|9[236-9])|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3[34]|[4-7]))","1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:5[78]|7[2-4]|[0468][2-9])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[89][2-8]|[4-7]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9(?:[3578]|20|4[04-9]|6[56]))|3(?:7(?:[2-5]|6[0-59])|[3-6][2-9]|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5(?:[467]|5[014-9])|6(?:[2-8]|9[02-69])|8[2-8]|9(?:[236-8]|9[23]))|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3(?:3[02-9]|4[0-24689])|4[2-69]|[5-7]))","1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:5[78]|7[2-4]|[0468][2-9])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[89][2-8]|[4-7]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9(?:[3578]|20|4[04-9]|6(?:5[25]|60)))|3(?:7(?:[2-5]|6[0-59])|[3-6][2-9]|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5(?:[467]|5[014-9])|6(?:[2-8]|9[02-69])|8[2-8]|9(?:[236-8]|9[23]))|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3(?:3[02-9]|4[0-24689])|4[2-69]|[5-7]))"],"0$1","",0],[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1|2(?:2[37]|5[5-9]|64|78|8[39]|91)|4(?:2[2689]|64|7[347])|5(?:[2-589]|39)|60|8(?:[46-9]|3[279]|2[124589])|9(?:[235-8]|93)","1|2(?:2[37]|5(?:[57]|[68]0|9[19])|64|78|8[39]|917)|4(?:2(?:[68]|20|9[178])|64|7[347])|5(?:[2-589]|39[67])|60|8(?:[46-9]|3[279]|2[124589])|9(?:[235-8]|93[34])","1|2(?:2[37]|5(?:[57]|[68]0|9(?:17|99))|64|78|8[39]|917)|4(?:2(?:[68]|20|9[178])|64|7[347])|5(?:[2-589]|39[67])|60|8(?:[46-9]|3[279]|2[124589])|9(?:[235-8]|93(?:31|4))"],"0$1","",0],[,"(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["2(?:9[14-79]|74|[34]7|[56]9)|82|993"],"0$1","",0],[,"(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]"],"0$1","",0],[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[2479][1-9]"],"0$1","",0]],[[,"(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1","",0],[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1","",0],[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[2579]0|80[1-9]"],"0$1","",0],[,"(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|5(?:76|97)|499|746|8(?:3[89]|63|47|51)|9(?:49|80|9[16])","1(?:267|3(?:7[247]|9[278])|4(?:5[67]|66)|5(?:47|58|64|8[67])|6(?:3[245]|48|5[4-68]))|5(?:76|97)9|499[2468]|7468|8(?:3(?:8[78]|96)|636|477|51[24])|9(?:496|802|9(?:1[23]|69))","1(?:267|3(?:7[247]|9[278])|4(?:5[67]|66)|5(?:47|58|64|8[67])|6(?:3[245]|48|5[4-68]))|5(?:769|979[2-69])|499[2468]|7468|8(?:3(?:8[78]|96[2457-9])|636[2-57-9]|477|51[24])|9(?:496|802|9(?:1[23]|69))"],"0$1","",0],[,"(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["1(?:2[3-6]|3[3-9]|4[2-6]|5[2-8]|[68][2-7]|7[2-689]|9[1-578])|2(?:2[03-689]|3[3-58]|4[0-468]|5[04-8]|6[013-8]|7[06-9]|8[02-57-9]|9[13])|4(?:2[28]|3[689]|6[035-7]|7[05689]|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9[4-9])|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9[014-9])|8(?:2[49]|3[3-8]|4[5-8]|5[2-9]|6[35-9]|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9[3-7])","1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:5[78]|7[2-4]|[0468][2-9])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[89][2-8]|[4-7]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9[2-8])|3(?:7[2-6]|[3-6][2-9]|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5[4-7]|6[2-9]|8[2-8]|9[236-9])|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3[34]|[4-7]))","1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:5[78]|7[2-4]|[0468][2-9])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[89][2-8]|[4-7]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9(?:[3578]|20|4[04-9]|6[56]))|3(?:7(?:[2-5]|6[0-59])|[3-6][2-9]|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5(?:[467]|5[014-9])|6(?:[2-8]|9[02-69])|8[2-8]|9(?:[236-8]|9[23]))|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3(?:3[02-9]|4[0-24689])|4[2-69]|[5-7]))","1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:5[78]|7[2-4]|[0468][2-9])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[89][2-8]|[4-7]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9(?:[3578]|20|4[04-9]|6(?:5[25]|60)))|3(?:7(?:[2-5]|6[0-59])|[3-6][2-9]|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5(?:[467]|5[014-9])|6(?:[2-8]|9[02-69])|8[2-8]|9(?:[236-8]|9[23]))|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3(?:3[02-9]|4[0-24689])|4[2-69]|[5-7]))"],"0$1","",0],[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1|2(?:2[37]|5[5-9]|64|78|8[39]|91)|4(?:2[2689]|64|7[347])|5(?:[2-589]|39)|60|8(?:[46-9]|3[279]|2[124589])|9(?:[235-8]|93)","1|2(?:2[37]|5(?:[57]|[68]0|9[19])|64|78|8[39]|917)|4(?:2(?:[68]|20|9[178])|64|7[347])|5(?:[2-589]|39[67])|60|8(?:[46-9]|3[279]|2[124589])|9(?:[235-8]|93[34])","1|2(?:2[37]|5(?:[57]|[68]0|9(?:17|99))|64|78|8[39]|917)|4(?:2(?:[68]|20|9[178])|64|7[347])|5(?:[2-589]|39[67])|60|8(?:[46-9]|3[279]|2[124589])|9(?:[235-8]|93(?:31|4))"],"0$1","",0],[,"(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["2(?:9[14-79]|74|[34]7|[56]9)|82|993"],"0$1","",0],[,"(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]"],"0$1","",0],[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[2479][1-9]"],"0$1","",0]],[,,"20\\d{8}","\\d{10}",,,"2012345678"],,,[,,"00(?:37\\d{6,13}|66\\d{6,13}|777(?:[01]\\d{2}|5\\d{3}|8\\d{4})|882[1245]\\d{4})","\\d{8,17}",,,"00777012"],[,,"570\\d{6}","\\d{9}",,,"570123456"],1,,[,,"NA","NA"]],KE:[,[,,"20\\d{6,7}|[4-9]\\d{6,9}","\\d{7,10}"],[,,"20\\d{6,7}|4(?:[0136]\\d{7}|[245]\\d{5,7})|5(?:[08]\\d{7}|[1-79]\\d{5,7})|6(?:[01457-9]\\d{5,7}|[26]\\d{7})","\\d{7,9}",,,"202012345"],[,,"7(?:[0-36]\\d|5[0-6]|7[0-5]|8[0-25-9])\\d{6}","\\d{9}",,,"712123456"],[,,"800[24-8]\\d{5,6}","\\d{9,10}",,,"800223456"],[,,"900[02-9]\\d{5}","\\d{9}",,,"900223456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"KE",254,"000","0",,,"0",,,,[[,"(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1","",0],[,"(\\d{3})(\\d{6,7})","$1 $2",["7"],"0$1","",0],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],KG:[,[,,"[235-8]\\d{8,9}","\\d{5,10}"],[,,"(?:3(?:1(?:[256]\\d|3[1-9]|47)|2(?:22|3[0-479]|6[0-7])|4(?:22|5[6-9]|6\\d)|5(?:22|3[4-7]|59|6\\d)|6(?:22|5[35-7]|6\\d)|7(?:22|3[468]|4[1-9]|59|[67]\\d)|9(?:22|4[1-8]|6\\d))|6(?:09|12|2[2-4])\\d)\\d{5}","\\d{5,10}",,,"312123456"],[,,"(?:20[0-35]|5[124-7]\\d|7[07]\\d)\\d{6}","\\d{9}",,,"700123456"],[,,"800\\d{6,7}","\\d{9,10}",,,"800123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"KG",996,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[25-7]|31[25]"],"0$1","",0],[,"(\\d{4})(\\d{5})","$1 $2",["3(?:1[36]|[2-9])"],"0$1","",0],[,"(\\d{3})(\\d{3})(\\d)(\\d{3})","$1 $2 $3 $4",["8"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],KH:[,[,,"[1-9]\\d{7,9}","\\d{6,10}"],[,,"(?:2[3-6]|3[2-6]|4[2-4]|[5-7][2-5])(?:[237-9]|4[56]|5\\d|6\\d?)\\d{5}|23(?:4[234]|8\\d{2})\\d{4}","\\d{6,9}",,,"23756789"],[,,"(?:1(?:[013-9]|2\\d?)|3[18]\\d|6[016-9]|7(?:[07-9]|[16]\\d)|8(?:[013-79]|8\\d)|9(?:6\\d|7\\d?|[0-589]))\\d{6}","\\d{8,9}",,,"91234567"],[,,"1800(?:1\\d|2[019])\\d{4}","\\d{10}",,,"1800123456"],[,,"1900(?:1\\d|2[09])\\d{4}","\\d{10}",,,"1900123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"KH",855,"00[14-9]","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["1\\d[1-9]|[2-9]"],"0$1","",0],[,"(1[89]00)(\\d{3})(\\d{3})","$1 $2 $3",["1[89]0"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],KI:[,[,,"[2458]\\d{4}|3\\d{4,7}|7\\d{7}","\\d{5,8}"],[,,"(?:[24]\\d|3[1-9]|50|8[0-5])\\d{3}","\\d{5}",,,"31234"],[,,"7(?:[24]\\d|3[1-9]|8[0-5])\\d{5}","\\d{8}",,,"72012345"],[,,"NA","NA"],[,,"3001\\d{4}","\\d{5,8}",,,"30010000"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"KI",686,"00",,,,"0",,,,,,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],KM:[,[,,"[379]\\d{6}","\\d{7}"],[,,"7(?:6[0-37-9]|7[0-57-9])\\d{4}","\\d{7}",,,"7712345"],[,,"3[234]\\d{5}","\\d{7}",,,"3212345"],[,,"NA","NA"],[,,"(?:39[01]|9[01]0)\\d{4}","\\d{7}",,,"9001234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"KM",269,"00",,,,,,,,[[,"(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],KN:[,[,,"[589]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"869(?:2(?:29|36)|302|4(?:6[015-9]|70))\\d{4}","\\d{7}(?:\\d{3})?",,,"8692361234"],[,,"869(?:5(?:5[6-8]|6[5-7])|66\\d|76[02-6])\\d{4}","\\d{10}",,,"8697652917"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002123456"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002123456"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"KN",1,"011","1",,,"1",,,,,,[,,"NA","NA"],,"869",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],KP:[,[,,"1\\d{9}|[28]\\d{7}","\\d{6,8}|\\d{10}"],[,,"2\\d{7}|85\\d{6}","\\d{6,8}",,,"21234567"],[,,"19[123]\\d{7}","\\d{10}",,,"1921234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"KP",850,"00|99","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1","",0],[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1","",0],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1","",0]],,[,,"NA","NA"],,,[,,"2(?:[0-24-9]\\d{2}|3(?:[0-79]\\d|8[02-9]))\\d{4}","\\d{8}",,,"23821234"],[,,"NA","NA"],,,[,,"NA","NA"]],KR:[,[,,"[1-7]\\d{3,9}|8\\d{8}","\\d{4,10}"],[,,"(?:2|3[1-3]|[46][1-4]|5[1-5])(?:1\\d{2,3}|[1-9]\\d{6,7})","\\d{4,10}",,,"22123456"],[,,"1[0-26-9]\\d{7,8}","\\d{9,10}",,,"1000000000"],[,,"80\\d{7}","\\d{9}",,,"801234567"],[,,"60[2-9]\\d{6}","\\d{9}",,,"602345678"],[,,"NA","NA"],[,,"50\\d{8}","\\d{10}",,,"5012345678"],[,,"70\\d{8}","\\d{10}",,,"7012345678"],"KR",82,"00(?:[124-68]|[37]\\d{2})","0",,,"0(8[1-46-8]|85\\d{2})?",,,,[[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["1(?:0|1[19]|[69]9|5[458])|[57]0","1(?:0|1[19]|[69]9|5(?:44|59|8))|[57]0"],"0$1","0$CC-$1",0],[,"(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["1(?:[169][2-8]|[78]|5[1-4])|[68]0|[3-6][1-9][1-9]","1(?:[169][2-8]|[78]|5(?:[1-3]|4[56]))|[68]0|[3-6][1-9][1-9]"],"0$1","0$CC-$1",0],[,"(\\d{3})(\\d)(\\d{4})","$1-$2-$3",["131","1312"],"0$1","0$CC-$1",0],[,"(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["131","131[13-9]"],"0$1","0$CC-$1",0],[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["13[2-9]"],"0$1","0$CC-$1",0],[,"(\\d{2})(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3-$4",["30"],"0$1","0$CC-$1",0],[,"(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2[1-9]"],"0$1","0$CC-$1",0],[,"(\\d)(\\d{3,4})","$1-$2",["21[0-46-9]"],"0$1","0$CC-$1",0],[,"(\\d{2})(\\d{3,4})","$1-$2",["[3-6][1-9]1","[3-6][1-9]1(?:[0-46-9])"],"0$1","0$CC-$1",0],[,"(\\d{4})(\\d{4})","$1-$2",["1(?:5[46-9]|6[04678]|8[0579])","1(?:5(?:44|66|77|88|99)|6(?:00|44|6[16]|70|88)|8(?:00|55|77|99))"],"$1","0$CC-$1",0]],,[,,"15\\d{7,8}","\\d{9,10}",,,"1523456789"],,,[,,"NA","NA"],[,,"1(?:5(?:44|66|77|88|99)|6(?:00|44|6[16]|70|88)|8(?:00|55|77|99))\\d{4}","\\d{8}",,,"15441234"],,,[,,"NA","NA"]],KW:[,[,,"[12569]\\d{6,7}","\\d{7,8}"],[,,"(?:18\\d|2(?:[23]\\d{2}|4(?:[1-35-9]\\d|44)|5(?:0[034]|[2-46]\\d|5[1-3]|7[1-7])))\\d{4}","\\d{7,8}",,,"22345678"],[,,"(?:5(?:[05]\\d|1[0-7])|6(?:0[034679]|5[015-9]|6\\d|7[067]|9[0369])|9(?:0[09]|22|4[01479]|55|6[0679]|[79]\\d|8[057-9]))\\d{5}","\\d{8}",,,"50012345"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"KW",965,"00",,,,,,,,[[,"(\\d{4})(\\d{3,4})","$1 $2",["[126]|9[04-9]"],"","",0],[,"(\\d{3})(\\d{5})","$1 $2",["5[015]|92"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],KY:[,[,,"[3589]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"345(?:2(?:22|44)|444|6(?:23|38|40)|7(?:4[35-79]|6[6-9]|77)|8(?:00|1[45]|25|[48]8)|9(?:14|4[035-9]))\\d{4}","\\d{7}(?:\\d{3})?",,,"3452221234"],[,,"345(?:32[1-9]|5(?:1[67]|2[5-7]|4[6-8]|76)|9(?:1[67]|2[2-9]|3[689]))\\d{4}","\\d{10}",,,"3453231234"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002345678"],[,,"900[2-9]\\d{6}|345976\\d{4}","\\d{10}",,,"9002345678"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"KY",1,"011","1",,,"1",,,,,,[,,"345849\\d{4}","\\d{10}",,,"3458491234"],,"345",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],KZ:[,[,,"(?:33\\d|7\\d{2}|80[09])\\d{7}","\\d{10}"],[,,"33622\\d{5}|7(?:1(?:0(?:[23]\\d|4[023]|59|63)|1(?:[23]\\d|4[0-79]|59)|2(?:[23]\\d|59)|3(?:2\\d|3[1-79]|4[0-35-9]|59)|4(?:2\\d|3[013-79]|4[0-8]|5[1-79])|5(?:2\\d|3[1-8]|4[1-7]|59)|6(?:[234]\\d|5[19]|61)|72\\d|8(?:[27]\\d|3[1-46-9]|4[0-5]))|2(?:1(?:[23]\\d|4[46-9]|5[3469])|2(?:2\\d|3[0679]|46|5[12679])|3(?:[234]\\d|5[139])|4(?:2\\d|3[1235-9]|59)|5(?:[23]\\d|4[01246-8]|59|61)|6(?:2\\d|3[1-9]|4[0-4]|59)|7(?:[237]\\d|40|5[279])|8(?:[23]\\d|4[0-3]|59)|9(?:2\\d|3[124578]|59)))\\d{5}","\\d{10}",,,"7123456789"],[,,"7(?:0[012578]|47|6[02-4]|7[15-8]|85)\\d{7}","\\d{10}",,,"7710009998"],[,,"800\\d{7}","\\d{10}",,,"8001234567"],[,,"809\\d{7}","\\d{10}",,,"8091234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"751\\d{7}","\\d{10}",,,"7511234567"],"KZ",7,"810","8",,,"8",,"8~10",,,,[,,"NA","NA"],,,[,,"751\\d{7}","\\d{10}",,,"7511234567"],[,,"NA","NA"],,,[,,"NA","NA"]],LA:[,[,,"[2-8]\\d{7,9}","\\d{6,10}"],[,,"(?:2[13]|3(?:0\\d|[14])|[5-7][14]|41|8[1468])\\d{6}","\\d{6,9}",,,"21212862"],[,,"20(?:2[2389]|5[4-689]|7[6-8]|9[15-9])\\d{6}","\\d{10}",,,"2023123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"LA",856,"00","0",,,"0",,,,[[,"(20)(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["20"],"0$1","",0],[,"([2-8]\\d)(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1","",0],[,"(30)(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],LB:[,[,,"[13-9]\\d{6,7}","\\d{7,8}"],[,,"(?:[14-6]\\d{2}|7(?:[2-57]\\d|62|8[0-7]|9[04-9])|8[02-9]\\d|9\\d{2})\\d{4}","\\d{7}",,,"1123456"],[,,"(?:3\\d|7(?:[01]\\d|6[013-9]|8[89]|9[1-3])|81\\d)\\d{5}","\\d{7,8}",,,"71123456"],[,,"NA","NA"],[,,"9[01]\\d{6}","\\d{8}",,,"90123456"],[,,"80\\d{6}","\\d{8}",,,"80123456"],[,,"NA","NA"],[,,"NA","NA"],"LB",961,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-6]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]|9"],"0$1","",0],[,"([7-9]\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[89][01]|7(?:[01]|6[013-9]|8[89]|9[1-3])"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],LC:[,[,,"[5789]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"758(?:4(?:30|5[0-9]|6[2-9]|8[0-2])|57[0-2]|638)\\d{4}","\\d{7}(?:\\d{3})?",,,"7584305678"],[,,"758(?:28[4-7]|384|4(?:6[01]|8[4-9])|5(?:1[89]|20|84)|7(?:1[2-9]|2[0-8]))\\d{4}","\\d{10}",,,"7582845678"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002123456"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002123456"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"LC",1,"011","1",,,"1",,,,,,[,,"NA","NA"],,"758",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],LI:[,[,,"6\\d{8}|[23789]\\d{6}","\\d{7,9}"],[,,"(?:2(?:01|1[27]|3\\d|6[02-578]|96)|3(?:7[0135-7]|8[048]|9[0269]))\\d{4}","\\d{7}",,,"2345678"],[,,"6(?:51[01]|6(?:0[0-6]|2[016-9]|39))\\d{5}|7(?:[37-9]\\d|42|56)\\d{4}","\\d{7,9}",,,"660234567"],[,,"80(?:02[28]|9\\d{2})\\d{2}","\\d{7}",,,"8002222"],[,,"90(?:02[258]|1(?:23|3[14])|66[136])\\d{2}","\\d{7}",,,"9002222"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"LI",423,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[23789]"],"","",0],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[56]"],"","",0],[,"(69)(7\\d{2})(\\d{4})","$1 $2 $3",["697"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"870(?:28|87)\\d{2}","\\d{7}",,,"8702812"],,,[,,"697(?:42|56|[7-9]\\d)\\d{4}","\\d{9}",,,"697861234"]],LK:[,[,,"[1-9]\\d{8}","\\d{7,9}"],[,,"(?:[189]1|2[13-7]|3[1-8]|4[157]|5[12457]|6[35-7])[2-57]\\d{6}","\\d{7,9}",,,"112345678"],[,,"7[0125-8]\\d{7}","\\d{9}",,,"712345678"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"LK",94,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{1})(\\d{6})","$1 $2 $3",["[1-689]"],"0$1","",0],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],LR:[,[,,"2\\d{7}|[37-9]\\d{8}|[45]\\d{6}","\\d{7,9}"],[,,"2\\d{7}","\\d{8}",,,"21234567"],[,,"(?:330\\d|4[67]|5\\d|77\\d{2}|88\\d{2}|994\\d)\\d{5}","\\d{7,9}",,,"770123456"],[,,"NA","NA"],[,,"90[03]\\d{6}","\\d{9}",,,"900123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"332(?:0[02]|5\\d)\\d{4}","\\d{9}",,,"332001234"],"LR",231,"00","0",,,"0",,,,[[,"(2\\d)(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1","",0],[,"([79]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[79]"],"0$1","",0],[,"([4-6])(\\d{3})(\\d{3})","$1 $2 $3",["[4-6]"],"0$1","",0],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[38]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],LS:[,[,,"[2568]\\d{7}","\\d{8}"],[,,"2\\d{7}","\\d{8}",,,"22123456"],[,,"[56]\\d{7}","\\d{8}",,,"50123456"],[,,"800[256]\\d{4}","\\d{8}",,,"80021234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"LS",266,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],LT:[,[,,"[3-9]\\d{7}","\\d{8}"],[,,"(?:3[1478]|4[124-6]|52)\\d{6}","\\d{8}",,,"31234567"],[,,"6\\d{7}","\\d{8}",,,"61234567"],[,,"800\\d{5}","\\d{8}",,,"80012345"],[,,"9(?:0[0239]|10)\\d{5}","\\d{8}",,,"90012345"],[,,"808\\d{5}","\\d{8}",,,"80812345"],[,,"700\\d{5}","\\d{8}",,,"70012345"],[,,"NA","NA"],"LT",370,"00","8",,,"[08]",,,,[[,"([34]\\d)(\\d{6})","$1 $2",["37|4(?:1|5[45]|6[2-4])"],"(8-$1)","",1],[,"([3-6]\\d{2})(\\d{5})","$1 $2",["3[148]|4(?:[24]|6[09])|528|6"],"(8-$1)","",1],[,"([7-9]\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"8 $1","",1],[,"(5)(2\\d{2})(\\d{4})","$1 $2 $3",["52[0-79]"],"(8-$1)","",1]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"70[67]\\d{5}","\\d{8}",,,"70712345"],,,[,,"NA","NA"]],LU:[,[,,"[24-9]\\d{3,10}|3(?:[0-46-9]\\d{2,9}|5[013-9]\\d{1,8})","\\d{4,11}"],[,,"(?:2[2-9]\\d{2,9}|(?:[3457]\\d{2}|8(?:0[2-9]|[13-9]\\d)|9(?:0[89]|[2-579]\\d))\\d{1,8})","\\d{4,11}",,,"27123456"],[,,"6[2679][18]\\d{6}","\\d{9}",,,"628123456"],[,,"800\\d{5}","\\d{8}",,,"80012345"],[,,"90[015]\\d{5}","\\d{8}",,,"90012345"],[,,"801\\d{5}","\\d{8}",,,"80112345"],[,,"70\\d{6}","\\d{8}",,,"70123456"],[,,"20(?:1\\d{5}|[2-689]\\d{1,7})","\\d{4,10}",,,"20201234"],"LU",352,"00",,,,"(15(?:0[06]|1[12]|35|4[04]|55|6[26]|77|88|99)\\d)",,,,[[,"(\\d{2})(\\d{3})","$1 $2",["[2-5]|7[1-9]|[89](?:[1-9]|0[2-9])"],"","$CC $1",0],[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-5]|7[1-9]|[89](?:[1-9]|0[2-9])"],"","$CC $1",0],[,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20"],"","$CC $1",0],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"],"","$CC $1",0],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"],"","$CC $1",0],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"],"","$CC $1",0],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{1,4})","$1 $2 $3 $4",["2(?:[12589]|4[12])|[3-5]|7[1-9]|8(?:[1-9]|0[2-9])|9(?:[1-9]|0[2-46-9])"],"","$CC $1",0],[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["70|80[01]|90[015]"],"","$CC $1",0],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"],"","$CC $1",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],LV:[,[,,"[2689]\\d{7}","\\d{8}"],[,,"6[3-8]\\d{6}","\\d{8}",,,"63123456"],[,,"2\\d{7}","\\d{8}",,,"21234567"],[,,"80\\d{6}","\\d{8}",,,"80123456"],[,,"90\\d{6}","\\d{8}",,,"90123456"],[,,"81\\d{6}","\\d{8}",,,"81123456"],[,,"NA","NA"],[,,"NA","NA"],"LV",371,"00",,,,,,,,[[,"([2689]\\d)(\\d{3})(\\d{3})","$1 $2 $3",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],LY:[,[,,"[25679]\\d{8}","\\d{7,9}"],[,,"(?:2[1345]|5[1347]|6[123479]|71)\\d{7}","\\d{7,9}",,,"212345678"],[,,"9[1-6]\\d{7}","\\d{9}",,,"912345678"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"LY",218,"00","0",,,"0",,,,[[,"([25679]\\d)(\\d{7})","$1-$2",,"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],MA:[,[,,"[5689]\\d{8}","\\d{9}"],[,,"5(?:2(?:(?:[015-7]\\d|2[2-9]|3[2-57]|4[2-8]|8[235-7])\\d|9(?:0\\d|[89]0))|3(?:(?:[0-4]\\d|[57][2-9]|6[235-8]|9[3-9])\\d|8(?:0\\d|[89]0)))\\d{4}","\\d{9}",,,"520123456"],[,,"6(?:0[0-8]|[12-79]\\d|8[017])\\d{6}","\\d{9}",,,"650123456"],[,,"80\\d{7}","\\d{9}",,,"801234567"],[,,"89\\d{7}","\\d{9}",,,"891234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"MA",212,"00","0",,,"0",,,,[[,"([56]\\d{2})(\\d{6})","$1-$2",["5(?:2[015-7]|3[0-4])|6"],"0$1","",0],[,"([58]\\d{3})(\\d{5})","$1-$2",["5(?:2[2-489]|3[5-9])|892","5(?:2(?:[2-48]|90)|3(?:[5-79]|80))|892"],"0$1","",0],[,"(5\\d{4})(\\d{4})","$1-$2",["5(?:29|38)","5(?:29|38)[89]"],"0$1","",0],[,"(8[09])(\\d{7})","$1-$2",["8(?:0|9[013-9])"],"0$1","",0]],,[,,"NA","NA"],1,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],MC:[,[,,"[4689]\\d{7,8}","\\d{8,9}"],[,,"870\\d{5}|9[2-47-9]\\d{6}","\\d{8}",,,"99123456"],[,,"6\\d{8}|4(?:4\\d|5[2-9])\\d{5}","\\d{8,9}",,,"612345678"],[,,"90\\d{6}","\\d{8}",,,"90123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"MC",377,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"$1","",0],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1","",0],[,"(6)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1","",0],[,"(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["8"],"$1","",0]],,[,,"NA","NA"],,,[,,"8\\d{7}","\\d{8}"],[,,"NA","NA"],,,[,,"NA","NA"]],MD:[,[,,"[235-9]\\d{7}","\\d{8}"],[,,"(?:2(?:1[0569]|2\\d|3[015-7]|4[1-46-9]|5[0-24689]|6[2-589]|7[1-37]|9[1347-9])|5(?:33|5[257]))\\d{5}","\\d{8}",,,"22212345"],[,,"(?:562\\d|6(?:[089]\\d{2}|1[01]\\d|21\\d|7(?:[1-6]\\d|7[0-4]))|7(?:6[07]|7[457-9]|[89]\\d)\\d)\\d{4}","\\d{8}",,,"62112345"],[,,"800\\d{5}","\\d{8}",,,"80012345"],[,,"90[056]\\d{5}","\\d{8}",,,"90012345"],[,,"808\\d{5}","\\d{8}",,,"80812345"],[,,"NA","NA"],[,,"3[08]\\d{6}","\\d{8}",,,"30123456"],"MD",373,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1","",0],[,"([25-7]\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["2[13-79]|[5-7]"],"0$1","",0],[,"([89]\\d{2})(\\d{5})","$1 $2",["[89]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"8(?:03|14)\\d{5}","\\d{8}",,,"80312345"],,,[,,"NA","NA"]],ME:[,[,,"[2-9]\\d{7,8}","\\d{6,9}"],[,,"(?:20[2-8]|3(?:0[2-7]|[12][35-7]|3[4-7])|4(?:0[2367]|1[267])|5(?:0[467]|1[267]|2[367]))\\d{5}","\\d{6,8}",,,"30234567"],[,,"6(?:00\\d|32\\d|[89]\\d{2}|61\\d|7(?:[0-8]\\d|9(?:[3-9]|[0-2]\\d)))\\d{4}","\\d{8,9}",,,"67622901"],[,,"80\\d{6}","\\d{8}",,,"80080002"],[,,"(?:9(?:4[1568]|5[178]))\\d{5}","\\d{8}",,,"94515151"],[,,"NA","NA"],[,,"NA","NA"],[,,"78[1-9]\\d{5}","\\d{8}",,,"78108780"],"ME",382,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]|6[036-9]","[2-57-9]|6(?:[03689]|7(?:[0-8]|9[3-9]))"],"0$1","",0],[,"(67)(9)(\\d{3})(\\d{3})","$1 $2 $3 $4",["679","679[0-2]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"77\\d{6}","\\d{8}",,,"77273012"],,,[,,"NA","NA"]],MF:[,[,,"[56]\\d{8}","\\d{9}"],[,,"590(?:[02][79]|13|5[0-268]|[78]7)\\d{4}","\\d{9}",,,"590271234"],[,,"690(?:0[0-7]|[1-9]\\d)\\d{4}","\\d{9}",,,"690301234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"MF",590,"00","0",,,"0",,,,,,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],MG:[,[,,"[23]\\d{8}","\\d{7,9}"],[,,"20(?:2\\d{2}|4[47]\\d|5[3467]\\d|6[279]\\d|7(?:2[29]|[35]\\d)|8[268]\\d|9[245]\\d)\\d{4}","\\d{7,9}",,,"202123456"],[,,"3[2-49]\\d{7}","\\d{9}",,,"321234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"22\\d{7}","\\d{9}",,,"221234567"],"MG",261,"00","0",,,"0",,,,[[,"([23]\\d)(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",,"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],MH:[,[,,"[2-6]\\d{6}","\\d{7}"],[,,"(?:247|528|625)\\d{4}","\\d{7}",,,"2471234"],[,,"(?:235|329|45[56]|545)\\d{4}","\\d{7}",,,"2351234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"635\\d{4}","\\d{7}",,,"6351234"],"MH",692,"011","1",,,"1",,,,[[,"(\\d{3})(\\d{4})","$1-$2",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],MK:[,[,,"[2-578]\\d{7}","\\d{8}"],[,,"(?:2(?:[23]\\d|5[124578]|6[01])|3(?:1[3-6]|[23][2-6]|4[2356])|4(?:[23][2-6]|4[3-6]|5[256]|6[25-8]|7[24-6]|8[4-6]))\\d{5}","\\d{6,8}",,,"22212345"],[,,"7(?:[0-25-8]\\d{2}|32\\d|421)\\d{4}","\\d{8}",,,"72345678"],[,,"800\\d{5}","\\d{8}",,,"80012345"],[,,"5[02-9]\\d{6}","\\d{8}",,,"50012345"],[,,"8(?:0[1-9]|[1-9]\\d)\\d{5}","\\d{8}",,,"80123456"],[,,"NA","NA"],[,,"NA","NA"],"MK",389,"00","0",,,"0",,,,[[,"(2)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1","",0],[,"([347]\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1","",0],[,"([58]\\d{2})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],ML:[,[,,"[246-9]\\d{7}","\\d{8}"],[,,"(?:2(?:0(?:2[0-589]|7\\d)|1(?:2[5-7]|[3-689]\\d|7[2-4689]))|44[239]\\d)\\d{4}","\\d{8}",,,"20212345"],[,,"[67]\\d{7}|9[0-25-9]\\d{6}","\\d{8}",,,"65012345"],[,,"800\\d{5}","\\d{8}",,,"80012345"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"ML",223,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[246-9]"],"","",0],[,"(\\d{4})","$1",["67|74"],"","",0]],[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[246-9]"],"","",0]],[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],MM:[,[,,"[14578]\\d{5,7}|[26]\\d{5,8}|9(?:2\\d{0,2}|[58]|3\\d|4\\d{1,2}|6\\d?|[79]\\d{0,2})\\d{6}","\\d{5,10}"],[,,"1(?:2\\d{1,2}|[3-5]\\d|6\\d?|[89][0-6]\\d)\\d{4}|2(?:[236-9]\\d{4}|4(?:0\\d{5}|\\d{4})|5(?:1\\d{3,6}|[02-9]\\d{3,5}))|4(?:2[245-8]|[346][2-6]|5[3-5])\\d{4}|5(?:2(?:20?|[3-8])|3[2-68]|4(?:21?|[4-8])|5[23]|6[2-4]|7[2-8]|8[24-7]|9[2-7])\\d{4}|6(?:0[23]|1[2356]|[24][2-6]|3[24-6]|5[2-4]|6[2-8]|7(?:[2367]|4\\d|5\\d?|8[145]\\d)|8[245]|9[24])\\d{4}|7(?:[04][24-8]|[15][2-7]|22|3[2-4])\\d{4}|8(?:1(?:2\\d?|[3-689])|2[2-8]|3[24]|4[24-7]|5[245]|6[23])\\d{4}","\\d{5,9}",,,"1234567"],[,,"17[01]\\d{4}|9(?:2(?:[0-4]|5\\d{2})|3[136]\\d|4(?:0[0-4]\\d|[1379]\\d|[24][0-589]\\d|5\\d{2}|88)|5[0-6]|61?\\d|7(?:3\\d|[89]\\d{2})|8\\d|9(?:1\\d|7\\d{2}|[089]))\\d{5}","\\d{7,10}",,,"92123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"1333\\d{4}","\\d{8}",,,"13331234"],"MM",95,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["1|2[45]"],"0$1","",0],[,"(2)(\\d{4})(\\d{4})","$1 $2 $3",["251"],"0$1","",0],[,"(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1","",0],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["67|81"],"0$1","",0],[,"(\\d{2})(\\d{2})(\\d{3,4})","$1 $2 $3",["[4-8]"],"0$1","",0],[,"(9)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[13789])"],"0$1","",0],[,"(9)(4\\d{4})(\\d{4})","$1 $2 $3",["94[0245]"],"0$1","",0],[,"(9)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["925"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],MN:[,[,,"[12]\\d{7,9}|[57-9]\\d{7}","\\d{6,10}"],[,,"[12](?:1\\d|2(?:[1-3]\\d?|7\\d)|3[2-8]\\d{1,2}|4[2-68]\\d{1,2}|5[1-4689]\\d{1,2})\\d{5}|5[0568]\\d{6}","\\d{6,10}",,,"50123456"],[,,"(?:8[689]|9[013-9])\\d{6}","\\d{8}",,,"88123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"7[05-8]\\d{6}","\\d{8}",,,"75123456"],"MN",976,"001","0",,,"0",,,,[[,"([12]\\d)(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1","",0],[,"([12]2\\d)(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1","",0],[,"([12]\\d{3})(\\d{5})","$1 $2",["[12](?:27|[3-5])","[12](?:27|[3-5]\\d)2"],"0$1","",0],[,"(\\d{4})(\\d{4})","$1 $2",["[57-9]"],"$1","",0],[,"([12]\\d{4})(\\d{4,5})","$1 $2",["[12](?:27|[3-5])","[12](?:27|[3-5]\\d)[4-9]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],MO:[,[,,"[268]\\d{7}","\\d{8}"],[,,"(?:28[2-57-9]|8[2-57-9]\\d)\\d{5}","\\d{8}",,,"28212345"],[,,"6[236]\\d{6}","\\d{8}",,,"66123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"MO",853,"00",,,,,,,,[[,"([268]\\d{3})(\\d{4})","$1 $2",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],MP:[,[,,"[5689]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"670(?:2(?:3[3-7]|56|8[5-8])|32[1238]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[589]|8[3-9]8|989)\\d{4}","\\d{7}(?:\\d{3})?",,,"6702345678"],[,,"670(?:2(?:3[3-7]|56|8[5-8])|32[1238]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[589]|8[3-9]8|989)\\d{4}","\\d{7}(?:\\d{3})?",,,"6702345678"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002123456"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002123456"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"MP",1,"011","1",,,"1",,,1,,,[,,"NA","NA"],,"670",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],MQ:[,[,,"[56]\\d{8}","\\d{9}"],[,,"596(?:0[2-5]|[12]0|3[05-9]|4[024-8]|[5-7]\\d|89|9[4-8])\\d{4}","\\d{9}",,,"596301234"],[,,"696(?:[0-479]\\d|5[01]|8[0-689])\\d{4}","\\d{9}",,,"696201234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"MQ",596,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],MR:[,[,,"[2-48]\\d{7}","\\d{8}"],[,,"25[08]\\d{5}|35\\d{6}|45[1-7]\\d{5}","\\d{8}",,,"35123456"],[,,"(?:2(?:2\\d|70)|3(?:3\\d|6[1-36]|7[1-3])|4(?:[49]\\d|6[0457-9]|7[4-9]|8[01346-8]))\\d{5}","\\d{8}",,,"22123456"],[,,"800\\d{5}","\\d{8}",,,"80012345"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"MR",222,"00",,,,,,,,[[,"([2-48]\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],MS:[,[,,"[5689]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"664491\\d{4}","\\d{7}(?:\\d{3})?",,,"6644912345"],[,,"66449[2-6]\\d{4}","\\d{10}",,,"6644923456"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002123456"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002123456"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"MS",1,"011","1",,,"1",,,,,,[,,"NA","NA"],,"664",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],MT:[,[,,"[2357-9]\\d{7}","\\d{8}"],[,,"2(?:0(?:1[0-6]|3[1-4]|[69]\\d)|[1-357]\\d{2})\\d{4}","\\d{8}",,,"21001234"],[,,"(?:7(?:210|[79]\\d{2})|9(?:2(?:1[01]|31)|696|8(?:1[1-3]|89|97)|9\\d{2}))\\d{4}","\\d{8}",,,"96961234"],[,,"800[3467]\\d{4}","\\d{8}",,,"80071234"],[,,"5(?:0(?:0(?:37|43)|6\\d{2}|70\\d|9[0168])|[12]\\d0[1-5])\\d{3}","\\d{8}",,,"50037123"],[,,"NA","NA"],[,,"NA","NA"],[,,"3550\\d{4}","\\d{8}",,,"35501234"],"MT",356,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",,"","",0]],,[,,"7117\\d{4}","\\d{8}",,,"71171234"],,,[,,"NA","NA"],[,,"501\\d{5}","\\d{8}",,,"50112345"],,,[,,"NA","NA"]],MU:[,[,,"[2-9]\\d{6,7}","\\d{7,8}"],[,,"(?:2(?:[03478]\\d|1[0-7]|6[1-69])|4(?:[013568]\\d|2[4-7])|5(?:44\\d|471)|6\\d{2}|8(?:14|3[129]))\\d{4}","\\d{7,8}",,,"2012345"],[,,"5(?:2[59]\\d|4(?:2[1-389]|4\\d|7[1-9]|9\\d)|7\\d{2}|8(?:[2568]\\d|7[15-8])|9[0-8]\\d)\\d{4}","\\d{8}",,,"52512345"],[,,"80[012]\\d{4}","\\d{7}",,,"8001234"],[,,"30\\d{5}","\\d{7}",,,"3012345"],[,,"NA","NA"],[,,"NA","NA"],[,,"3(?:20|9\\d)\\d{4}","\\d{7}",,,"3201234"],"MU",230,"0(?:0|[2-7]0|33)",,,,,,"020",,[[,"([2-46-9]\\d{2})(\\d{4})","$1 $2",["[2-46-9]"],"","",0],[,"(5\\d{3})(\\d{4})","$1 $2",["5"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],MV:[,[,,"[3467]\\d{6}|9(?:00\\d{7}|\\d{6})","\\d{7,10}"],[,,"(?:3(?:0[01]|3[0-59])|6(?:[567][02468]|8[024689]|90))\\d{4}","\\d{7}",,,"6701234"],[,,"(?:46[46]|7[3-9]\\d|9[15-9]\\d)\\d{4}","\\d{7}",,,"7712345"],[,,"NA","NA"],[,,"900\\d{7}","\\d{10}",,,"9001234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"MV",960,"0(?:0|19)",,,,,,"00",,[[,"(\\d{3})(\\d{4})","$1-$2",["[3467]|9(?:[1-9]|0[1-9])"],"","",0],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["900"],"","",0]],,[,,"781\\d{4}","\\d{7}",,,"7812345"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],MW:[,[,,"(?:1(?:\\d{2})?|[2789]\\d{2})\\d{6}","\\d{7,9}"],[,,"(?:1[2-9]|21\\d{2})\\d{5}","\\d{7,9}",,,"1234567"],[,,"(?:111|77\\d|88\\d|99\\d)\\d{6}","\\d{9}",,,"991234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"MW",265,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1"],"0$1","",0],[,"(2\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1","",0],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1789]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],MX:[,[,,"[1-9]\\d{9,10}","\\d{7,11}"],[,,"(?:33|55|81)\\d{8}|(?:2(?:2[2-9]|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|7[1-8]|9[1-5])|4(?:1[1-57-9]|[24-6][1-9]|[37][1-8]|8[1-35-9]|9[2-689])|5(?:88|9[1-79])|6(?:1[2-68]|[234][1-9]|5[1-3689]|6[12457-9]|7[1-7]|8[67]|9[4-8])|7(?:[13467][1-9]|2[1-8]|5[13-9]|8[1-69]|9[17])|8(?:2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[1-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69][1-9]|7[12]|8[1-8]))\\d{7}","\\d{7,10}",,,"2221234567"],[,,"1(?:(?:33|55|81)\\d{8}|(?:2(?:2[2-9]|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|7[1-8]|9[1-5])|4(?:1[1-57-9]|[24-6][1-9]|[37][1-8]|8[1-35-9]|9[2-689])|5(?:88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-3689]|6[12457-9]|7[1-7]|8[67]|9[4-8])|7(?:[13467][1-9]|2[1-8]|5[13-9]|8[1-69]|9[17])|8(?:2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[1-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69][1-9]|7[12]|8[1-8]))\\d{7})","\\d{11}",,,"12221234567"],[,,"800\\d{7}","\\d{10}",,,"8001234567"],[,,"900\\d{7}","\\d{10}",,,"9001234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"MX",52,"0[09]","01",,,"0[12]|04[45](\\d{10})","1$1",,,[[,"([358]\\d)(\\d{4})(\\d{4})","$1 $2 $3",["33|55|81"],"01 $1","",1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2467]|3[12457-9]|5[89]|8[02-9]|9[0-35-9]"],"01 $1","",1],[,"(1)([358]\\d)(\\d{4})(\\d{4})","044 $2 $3 $4",["1(?:33|55|81)"],"$1","",1],[,"(1)(\\d{3})(\\d{3})(\\d{4})","044 $2 $3 $4",["1(?:[2467]|3[12457-9]|5[89]|8[2-9]|9[1-35-9])"],"$1","",1]],[[,"([358]\\d)(\\d{4})(\\d{4})","$1 $2 $3",["33|55|81"],"01 $1","",1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2467]|3[12457-9]|5[89]|8[02-9]|9[0-35-9]"],"01 $1","",1],[,"(1)([358]\\d)(\\d{4})(\\d{4})","$1 $2 $3 $4",["1(?:33|55|81)"]],[,"(1)(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1(?:[2467]|3[12457-9]|5[89]|8[2-9]|9[1-35-9])"]]],[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],1,,[,,"NA","NA"]],MY:[,[,,"[13-9]\\d{7,9}","\\d{6,10}"],[,,"(?:3[2-9]\\d|[4-9][2-9])\\d{6}","\\d{6,9}",,,"323456789"],[,,"1(?:1[1-5]\\d{2}|[02-4679][2-9]\\d|59\\d{2}|8(?:1[23]|[2-9]\\d))\\d{5}","\\d{9,10}",,,"123456789"],[,,"1[378]00\\d{6}","\\d{10}",,,"1300123456"],[,,"1600\\d{6}","\\d{10}",,,"1600123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"154\\d{7}","\\d{10}",,,"1541234567"],"MY",60,"00","0",,,"0",,,,[[,"([4-79])(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1","",0],[,"(3)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1","",0],[,"([18]\\d)(\\d{3})(\\d{3,4})","$1-$2 $3",["1[02-46-9][1-9]|8"],"0$1","",0],[,"(1)([36-8]00)(\\d{2})(\\d{4})","$1-$2-$3-$4",["1[36-8]0"],"","",0],[,"(11)(\\d{4})(\\d{4})","$1-$2 $3",["11"],"0$1","",0],[,"(15[49])(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],MZ:[,[,,"[28]\\d{7,8}","\\d{8,9}"],[,,"2(?:[1346]\\d|5[0-2]|[78][12]|93)\\d{5}","\\d{8}",,,"21123456"],[,,"8[23467]\\d{7}","\\d{9}",,,"821234567"],[,,"800\\d{6}","\\d{9}",,,"800123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"MZ",258,"00",,,,,,,,[[,"([28]\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-7]"],"","",0],[,"(80\\d)(\\d{3})(\\d{3})","$1 $2 $3",["80"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],NA:[,[,,"[68]\\d{7,8}","\\d{8,9}"],[,,"6(?:1(?:17|2(?:[0189]\\d|[2-6]|7\\d?)|3(?:[01378]|2\\d)|4[01]|69|7[014])|2(?:17|5(?:[0-36-8]|4\\d?)|69|70)|3(?:17|2(?:[0237]\\d?|[14-689])|34|6[29]|7[01]|81)|4(?:17|2(?:[012]|7?)|4(?:[06]|1\\d)|5(?:[01357]|[25]\\d?)|69|7[01])|5(?:17|2(?:[0459]|[23678]\\d?)|69|7[01])|6(?:17|2(?:5|6\\d?)|38|42|69|7[01])|7(?:17|2(?:[569]|[234]\\d?)|3(?:0\\d?|[13])|69|7[01]))\\d{4}","\\d{8,9}",,,"61221234"],[,,"(?:60|8[125])\\d{7}","\\d{9}",,,"811234567"],[,,"NA","NA"],[,,"8701\\d{5}","\\d{9}",,,"870123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"8(?:3\\d{2}|86)\\d{5}","\\d{8,9}",,,"88612345"],"NA",264,"00","0",,,"0",,,,[[,"(8\\d)(\\d{3})(\\d{4})","$1 $2 $3",["8[1235]"],"0$1","",0],[,"(6\\d)(\\d{2,3})(\\d{4})","$1 $2 $3",["6"],"0$1","",0],[,"(88)(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1","",0],[,"(870)(\\d{3})(\\d{3})","$1 $2 $3",["870"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],NC:[,[,,"[2-57-9]\\d{5}","\\d{6}"],[,,"(?:2[03-9]|3[0-5]|4[1-7]|88)\\d{4}","\\d{6}",,,"201234"],[,,"(?:5[0-4]|[79]\\d|8[0-79])\\d{4}","\\d{6}",,,"751234"],[,,"NA","NA"],[,,"36\\d{4}","\\d{6}",,,"366711"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"NC",687,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[2-46-9]|5[0-4]"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],NE:[,[,,"[0289]\\d{7}","\\d{8}"],[,,"2(?:0(?:20|3[1-7]|4[134]|5[14]|6[14578]|7[1-578])|1(?:4[145]|5[14]|6[14-68]|7[169]|88))\\d{4}","\\d{8}",,,"20201234"],[,,"(?:8[89]|9\\d)\\d{6}","\\d{8}",,,"93123456"],[,,"08\\d{6}","\\d{8}",,,"08123456"],[,,"09\\d{6}","\\d{8}",,,"09123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"NE",227,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[289]|09"],"","",0],[,"(08)(\\d{3})(\\d{3})","$1 $2 $3",["08"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],1,,[,,"NA","NA"]],NF:[,[,,"[13]\\d{5}","\\d{5,6}"],[,,"(?:1(?:06|17|28|39)|3[012]\\d)\\d{3}","\\d{5,6}",,,"106609"],[,,"3[58]\\d{4}","\\d{5,6}",,,"381234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"NF",672,"00",,,,,,,,[[,"(\\d{2})(\\d{4})","$1 $2",["1"],"","",0],[,"(\\d)(\\d{5})","$1 $2",["3"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],NG:[,[,,"[1-6]\\d{5,8}|9\\d{5,9}|[78]\\d{5,13}","\\d{5,14}"],[,,"[12]\\d{6,7}|9(?:0[3-9]|[1-9]\\d)\\d{5}|(?:3\\d|4[023568]|5[02368]|6[02-469]|7[4-69]|8[2-9])\\d{6}|(?:4[47]|5[14579]|6[1578]|7[0-357])\\d{5,6}|(?:78|41)\\d{5}","\\d{5,9}",,,"12345678"],[,,"(?:1(?:7[34]\\d|8(?:04|[124579]\\d|8[0-3])|95\\d)|287[0-7]|3(?:18[1-8]|88[0-7]|9(?:8[5-9]|6[1-5]))|4(?:28[0-2]|6(?:7[1-9]|8[02-47])|88[0-2])|5(?:2(?:7[7-9]|8\\d)|38[1-79]|48[0-7]|68[4-7])|6(?:2(?:7[7-9]|8\\d)|4(?:3[7-9]|[68][129]|7[04-69]|9[1-8])|58[0-2]|98[7-9])|7(?:38[0-7]|69[1-8]|78[2-4])|8(?:28[3-9]|38[0-2]|4(?:2[12]|3[147-9]|5[346]|7[4-9]|8[014-689]|90)|58[1-8]|78[2-9]|88[5-7])|98[07]\\d)\\d{4}|(?:70(?:[13-9]\\d|2[1-9])|8(?:0[2-9]|1\\d)\\d|90[2359]\\d)\\d{6}","\\d{8,10}",,,"8021234567"],[,,"800\\d{7,11}","\\d{10,14}",,,"80017591759"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"NG",234,"009","0",,,"0",,,,[[,"([129])(\\d{3})(\\d{3,4})","$1 $2 $3",["[129]"],"0$1","",0],[,"(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-6]|7(?:[1-79]|0[1-9])|8[2-9]"],"0$1","",0],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["70|8[01]|90[2359]"],"0$1","",0],[,"([78]00)(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]00"],"0$1","",0],[,"([78]00)(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]00"],"0$1","",0],[,"(78)(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"700\\d{7,11}","\\d{10,14}",,,"7001234567"],,,[,,"NA","NA"]],NI:[,[,,"[12578]\\d{7}","\\d{8}"],[,,"2\\d{7}","\\d{8}",,,"21234567"],[,,"5(?:5[0-7]\\d{5}|[78]\\d{6})|7[5-8]\\d{6}|8\\d{7}","\\d{8}",,,"81234567"],[,,"1800\\d{4}","\\d{8}",,,"18001234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"NI",505,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],NL:[,[,,"1\\d{4,8}|[2-7]\\d{8}|[89]\\d{6,9}","\\d{5,10}"],[,,"(?:1[0135-8]|2[02-69]|3[0-68]|4[0135-9]|[57]\\d|8[478])\\d{7}","\\d{9}",,,"101234567"],[,,"6[1-58]\\d{7}","\\d{9}",,,"612345678"],[,,"800\\d{4,7}","\\d{7,10}",,,"8001234"],[,,"90[069]\\d{4,7}","\\d{7,10}",,,"9061234"],[,,"NA","NA"],[,,"NA","NA"],[,,"85\\d{7}","\\d{9}",,,"851234567"],"NL",31,"00","0",,,"0",,,,[[,"([1-578]\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1[035]|2[0346]|3[03568]|4[0356]|5[0358]|7|8[4578]"],"0$1","",0],[,"([1-5]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1","",0],[,"(6)(\\d{8})","$1 $2",["6[0-57-9]"],"0$1","",0],[,"(66)(\\d{7})","$1 $2",["66"],"0$1","",0],[,"(14)(\\d{3,4})","$1 $2",["14"],"$1","",0],[,"([89]0\\d)(\\d{4,7})","$1 $2",["80|9"],"0$1","",0]],,[,,"66\\d{7}","\\d{9}",,,"662345678"],,,[,,"14\\d{3,4}","\\d{5,6}"],[,,"140(?:1(?:[035]|[16-8]\\d)|2(?:[0346]|[259]\\d)|3(?:[03568]|[124]\\d)|4(?:[0356]|[17-9]\\d)|5(?:[0358]|[124679]\\d)|7\\d|8[458])","\\d{5,6}",,,"14020"],,,[,,"NA","NA"]],NO:[,[,,"0\\d{4}|[2-9]\\d{7}","\\d{5}(?:\\d{3})?"],[,,"(?:2[1-4]|3[1-3578]|5[1-35-7]|6[1-4679]|7[0-8])\\d{6}","\\d{8}",,,"21234567"],[,,"(?:4[015-8]|5[89]|9\\d)\\d{6}","\\d{8}",,,"40612345"],[,,"80[01]\\d{5}","\\d{8}",,,"80012345"],[,,"82[09]\\d{5}","\\d{8}",,,"82012345"],[,,"810(?:0[0-6]|[2-8]\\d)\\d{3}","\\d{8}",,,"81021234"],[,,"880\\d{5}","\\d{8}",,,"88012345"],[,,"85[0-5]\\d{5}","\\d{8}",,,"85012345"],"NO",47,"00",,,,,,,,[[,"([489]\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[489]"],"","",0],[,"([235-7]\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-7]"],"","",0]],,[,,"NA","NA"],1,,[,,"NA","NA"],[,,"0\\d{4}|81(?:0(?:0[7-9]|1\\d)|5\\d{2})\\d{3}","\\d{5}(?:\\d{3})?",,,"01234"],1,,[,,"81[23]\\d{5}","\\d{8}",,,"81212345"]],NP:[,[,,"[1-8]\\d{7}|9(?:[1-69]\\d{6,8}|7[2-6]\\d{5,7}|8\\d{8})","\\d{6,10}"],[,,"(?:1[0-6]\\d|2[13-79][2-6]|3[135-8][2-6]|4[146-9][2-6]|5[135-7][2-6]|6[13-9][2-6]|7[15-9][2-6]|8[1-46-9][2-6]|9[1-79][2-6])\\d{5}","\\d{6,8}",,,"14567890"],[,,"9(?:6[013]|7[245]|8[0-24-6])\\d{7}","\\d{10}",,,"9841234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"NP",977,"00","0",,,"0",,,,[[,"(1)(\\d{7})","$1-$2",["1[2-6]"],"0$1","",0],[,"(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-69]|7[15-9])"],"0$1","",0],[,"(9\\d{2})(\\d{7})","$1-$2",["9(?:6[013]|7[245]|8)"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],NR:[,[,,"[458]\\d{6}","\\d{7}"],[,,"(?:444|888)\\d{4}","\\d{7}",,,"4441234"],[,,"55[5-9]\\d{4}","\\d{7}",,,"5551234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"NR",674,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],NU:[,[,,"[1-5]\\d{3}","\\d{4}"],[,,"[34]\\d{3}","\\d{4}",,,"4002"],[,,"[125]\\d{3}","\\d{4}",,,"1234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"NU",683,"00",,,,,,,,,,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],NZ:[,[,,"6[235-9]\\d{6}|[2-57-9]\\d{7,10}","\\d{7,11}"],[,,"(?:3[2-79]|[49][2-9]|6[235-9]|7[2-57-9])\\d{6}|24099\\d{3}","\\d{7,8}",,,"32345678"],[,,"2(?:[028]\\d{7,8}|1(?:[03]\\d{5,7}|[12457]\\d{5,6}|[689]\\d{5})|[79]\\d{7})","\\d{8,10}",,,"211234567"],[,,"508\\d{6,7}|80\\d{6,8}","\\d{8,10}",,,"800123456"],[,,"90\\d{7,9}","\\d{9,11}",,,"900123456"],[,,"NA","NA"],[,,"70\\d{7}","\\d{9}",,,"701234567"],[,,"NA","NA"],"NZ",64,"0(?:0|161)","0",,,"0",,"00",,[[,"([34679])(\\d{3})(\\d{4})","$1-$2 $3",["[346]|7[2-57-9]|9[1-9]"],"0$1","",0],[,"(24099)(\\d{3})","$1 $2",["240","2409","24099"],"0$1","",0],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["21"],"0$1","",0],[,"(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:1[1-9]|[69]|7[0-35-9])|70|86"],"0$1","",0],[,"(2\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["2[028]"],"0$1","",0],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|5|[89]0"],"0$1","",0]],,[,,"[28]6\\d{6,7}","\\d{8,9}",,,"26123456"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],OM:[,[,,"(?:2[2-6]|5|9[1-9])\\d{6}|800\\d{5,6}","\\d{7,9}"],[,,"2[2-6]\\d{6}","\\d{8}",,,"23123456"],[,,"9[1-9]\\d{6}","\\d{8}",,,"92123456"],[,,"8007\\d{4,5}|500\\d{4}","\\d{7,9}",,,"80071234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"OM",968,"00",,,,,,,,[[,"(2\\d)(\\d{6})","$1 $2",["2"],"","",0],[,"(9\\d{3})(\\d{4})","$1 $2",["9"],"","",0],[,"([58]00)(\\d{4,6})","$1 $2",["[58]"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],PA:[,[,,"[1-9]\\d{6,7}","\\d{7,8}"],[,,"(?:1(?:0[02-579]|19|2[37]|3[03]|4[479]|57|65|7[016-8]|8[58]|9[1349])|2(?:[0235679]\\d|1[0-7]|4[04-9]|8[028])|3(?:[09]\\d|1[14-7]|2[0-3]|3[03]|4[0457]|5[56]|6[068]|7[06-8]|8[089])|4(?:3[013-69]|4\\d|7[0-689])|5(?:[01]\\d|2[0-7]|[56]0|79)|7(?:0[09]|2[0-267]|3[06]|[49]0|5[06-9]|7[0-24-7]|8[89])|8(?:[34]\\d|5[0-4]|8[02])|9(?:0[6-8]|1[016-8]|2[036-8]|3[3679]|40|5[0489]|6[06-9]|7[046-9]|8[36-8]|9[1-9]))\\d{4}","\\d{7}",,,"2001234"],[,,"(?:1[16]1|21[89]|8(?:1[01]|7[23]))\\d{4}|6(?:[024-9]\\d|1[0-5]|3[0-24-9])\\d{5}","\\d{7,8}",,,"60012345"],[,,"80[09]\\d{4}","\\d{7}",,,"8001234"],[,,"(?:779|8(?:2[235]|55|60|7[578]|86|95)|9(?:0[0-2]|81))\\d{4}","\\d{7}",,,"8601234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"PA",507,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"],"","",0],[,"(\\d{4})(\\d{4})","$1-$2",["6"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],PE:[,[,,"[14-9]\\d{7,8}","\\d{6,9}"],[,,"(?:1\\d|4[1-4]|5[1-46]|6[1-7]|7[2-46]|8[2-4])\\d{6}","\\d{6,8}",,,"11234567"],[,,"9\\d{8}","\\d{9}",,,"912345678"],[,,"800\\d{5}","\\d{8}",,,"80012345"],[,,"805\\d{5}","\\d{8}",,,"80512345"],[,,"801\\d{5}","\\d{8}",,,"80112345"],[,,"80[24]\\d{5}","\\d{8}",,,"80212345"],[,,"NA","NA"],"PE",51,"19(?:1[124]|77|90)00","0"," Anexo ",,"0",,,,[[,"(1)(\\d{7})","$1 $2",["1"],"(0$1)","",0],[,"([4-8]\\d)(\\d{6})","$1 $2",["[4-7]|8[2-4]"],"(0$1)","",0],[,"(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)","",0],[,"(9\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],PF:[,[,,"4\\d{5,7}|8\\d{7}","\\d{6}(?:\\d{2})?"],[,,"4(?:[09][45689]\\d|4)\\d{4}","\\d{6}(?:\\d{2})?",,,"40412345"],[,,"8[79]\\d{6}","\\d{8}",,,"87123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"PF",689,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4[09]|8[79]"],"","",0],[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"],"","",0]],,[,,"NA","NA"],,,[,,"44\\d{4}","\\d{6}",,,"441234"],[,,"NA","NA"],,,[,,"NA","NA"]],PG:[,[,,"[1-9]\\d{6,7}","\\d{7,8}"],[,,"(?:3[0-2]\\d|4[25]\\d|5[34]\\d|64[1-9]|77(?:[0-24]\\d|30)|85[02-46-9]|9[78]\\d)\\d{4}","\\d{7}",,,"3123456"],[,,"(?:20150|68\\d{2}|7(?:[0-369]\\d|75)\\d{2})\\d{3}","\\d{7,8}",,,"6812345"],[,,"180\\d{4}","\\d{7}",,,"1801234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"275\\d{4}","\\d{7}",,,"2751234"],"PG",675,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[13-689]|27"],"","",0],[,"(\\d{4})(\\d{4})","$1 $2",["20|7"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],PH:[,[,,"2\\d{5,7}|[3-9]\\d{7,9}|1800\\d{7,9}","\\d{5,13}"],[,,"2\\d{5}(?:\\d{2})?|(?:3[2-68]|4[2-9]|5[2-6]|6[2-58]|7[24578]|8[2-8])\\d{7}|88(?:22\\d{6}|42\\d{4})","\\d{5,10}",,,"21234567"],[,,"(?:81[37]|9(?:0[5-9]|1[024-9]|2[0-35-9]|3[02-9]|4[236-9]|50|7[34-79]|89|9[4-9]))\\d{7}","\\d{10}",,,"9051234567"],[,,"1800\\d{7,9}","\\d{11,13}",,,"180012345678"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"PH",63,"00","0",,,"0",,,,[[,"(2)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"(0$1)","",0],[,"(2)(\\d{5})","$1 $2",["2"],"(0$1)","",0],[,"(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|5(?:22|44)|642|8(?:62|8[245])","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)","",0],[,"(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)","",0],[,"([3-8]\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[3-8]"],"(0$1)","",0],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["81|9"],"0$1","",0],[,"(1800)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"","",0],[,"(1800)(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],PK:[,[,,"1\\d{8}|[2-8]\\d{5,11}|9(?:[013-9]\\d{4,9}|2\\d(?:111\\d{6}|\\d{3,7}))","\\d{6,12}"],[,,"(?:21|42)[2-9]\\d{7}|(?:2[25]|4[0146-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]\\d{6}|(?: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(?:1|2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8]))[2-9]\\d{5,6}|58[126]\\d{7}","\\d{6,10}",,,"2123456789"],[,,"3(?:0\\d|1[0-6]|2[0-5]|3[0-7]|4[0-8]|55|64)\\d{7}","\\d{10}",,,"3012345678"],[,,"800\\d{5}","\\d{8}",,,"80012345"],[,,"900\\d{5}","\\d{8}",,,"90012345"],[,,"NA","NA"],[,,"122\\d{6}","\\d{9}",,,"122044444"],[,,"NA","NA"],"PK",92,"00","0",,,"0",,,,[[,"(\\d{2})(111)(\\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)1","(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)11","(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)111"],"(0$1)","",0],[,"(\\d{3})(111)(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[349]|45|54|60|72|8[2-5]|9[2-9]","(?:2[349]|45|54|60|72|8[2-5]|9[2-9])\\d1","(?:2[349]|45|54|60|72|8[2-5]|9[2-9])\\d11","(?:2[349]|45|54|60|72|8[2-5]|9[2-9])\\d111"],"(0$1)","",0],[,"(\\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)","",0],[,"(\\d{3})(\\d{6,7})","$1 $2",["2[349]|45|54|60|72|8[2-5]|9[2-9]","(?:2[349]|45|54|60|72|8[2-5]|9[2-9])\\d[2-9]"],"(0$1)","",0],[,"(3\\d{2})(\\d{7})","$1 $2",["3"],"0$1","",0],[,"([15]\\d{3})(\\d{5,6})","$1 $2",["58[12]|1"],"(0$1)","",0],[,"(586\\d{2})(\\d{5})","$1 $2",["586"],"(0$1)","",0],[,"([89]00)(\\d{3})(\\d{2})","$1 $2 $3",["[89]00"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"(?:2(?:[125]|3[2358]|4[2-4]|9[2-8])|4(?:[0-246-9]|5[3479])|5(?:[1-35-7]|4[2-467])|6(?:[1-8]|0[468])|7(?:[14]|2[236])|8(?:[16]|2[2-689]|3[23578]|4[3478]|5[2356])|9(?:1|22|3[27-9]|4[2-6]|6[3569]|9[2-7]))111\\d{6}","\\d{11,12}",,,"21111825888"],,,[,,"NA","NA"]],PL:[,[,,"[12]\\d{6,8}|[3-57-9]\\d{8}|6\\d{5,8}","\\d{6,9}"],[,,"(?: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])\\d{7}|[12]2\\d{5}|","\\d{6,9}",,,"123456789"],[,,"(?:5[0137]|6[069]|7[2389]|88)\\d{7}","\\d{9}",,,"512345678"],[,,"800\\d{6}","\\d{9}",,,"800123456"],[,,"70\\d{7}","\\d{9}",,,"701234567"],[,,"801\\d{6}","\\d{9}",,,"801234567"],[,,"NA","NA"],[,,"39\\d{7}","\\d{9}",,,"391234567"],"PL",48,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[14]|2[0-57-9]|3[2-4]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145]"],"","",0],[,"(\\d{2})(\\d{1})(\\d{4})","$1 $2 $3",["[12]2"],"","",0],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["26|39|5[0137]|6[0469]|7[02389]|8[08]"],"","",0],[,"(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"],"","",0],[,"(\\d{3})(\\d{3})","$1 $2",["64"],"","",0]],,[,,"64\\d{4,7}","\\d{6,9}",,,"641234567"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],PM:[,[,,"[45]\\d{5}","\\d{6}"],[,,"41\\d{4}","\\d{6}",,,"411234"],[,,"55\\d{4}","\\d{6}",,,"551234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"PM",508,"00","0",,,"0",,,,[[,"([45]\\d)(\\d{2})(\\d{2})","$1 $2 $3",,"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],PR:[,[,,"[5789]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"(?:787|939)[2-9]\\d{6}","\\d{7}(?:\\d{3})?",,,"7872345678"],[,,"(?:787|939)[2-9]\\d{6}","\\d{7}(?:\\d{3})?",,,"7872345678"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002345678"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002345678"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"PR",1,"011","1",,,"1",,,1,,,[,,"NA","NA"],,"787|939",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],PS:[,[,,"[24589]\\d{7,8}|1(?:[78]\\d{8}|[49]\\d{2,3})","\\d{4,10}"],[,,"(?:22[234789]|42[45]|82[01458]|92[369])\\d{5}","\\d{7,8}",,,"22234567"],[,,"5[69]\\d{7}","\\d{9}",,,"599123456"],[,,"1800\\d{6}","\\d{10}",,,"1800123456"],[,,"1(?:4|9\\d)\\d{2}","\\d{4,5}",,,"19123"],[,,"1700\\d{6}","\\d{10}",,,"1700123456"],[,,"NA","NA"],[,,"NA","NA"],"PS",970,"00","0",,,"0",,,,[[,"([2489])(2\\d{2})(\\d{4})","$1 $2 $3",["[2489]"],"0$1","",0],[,"(5[69]\\d)(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1","",0],[,"(1[78]00)(\\d{3})(\\d{3})","$1 $2 $3",["1[78]"],"$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],PT:[,[,,"[2-46-9]\\d{8}","\\d{9}"],[,,"2(?:[12]\\d|[35][1-689]|4[1-59]|6[1-35689]|7[1-9]|8[1-69]|9[1256])\\d{6}","\\d{9}",,,"212345678"],[,,"9(?:[136]\\d{2}|2[0-79]\\d|480)\\d{5}","\\d{9}",,,"912345678"],[,,"80[02]\\d{6}","\\d{9}",,,"800123456"],[,,"76(?:0[1-57]|1[2-47]|2[237])\\d{5}","\\d{9}",,,"760123456"],[,,"80(?:8\\d|9[1579])\\d{5}","\\d{9}",,,"808123456"],[,,"884[128]\\d{5}","\\d{9}",,,"884123456"],[,,"30\\d{7}","\\d{9}",,,"301234567"],"PT",351,"00",,,,,,,,[[,"(2\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"],"","",0],[,"([2-46-9]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[3-9]|[346-9]"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"70(?:7\\d|8[17])\\d{5}","\\d{9}",,,"707123456"],,,[,,"NA","NA"]],PW:[,[,,"[2-8]\\d{6}","\\d{7}"],[,,"2552255|(?:277|345|488|5(?:35|44|87)|6(?:22|54|79)|7(?:33|47)|8(?:24|55|76))\\d{4}","\\d{7}",,,"2771234"],[,,"(?:6[234689]0|77[45789])\\d{4}","\\d{7}",,,"6201234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"PW",680,"01[12]",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],PY:[,[,,"5[0-5]\\d{4,7}|[2-46-9]\\d{5,8}","\\d{5,9}"],[,,"(?:[26]1|3[289]|4[124678]|7[123]|8[1236])\\d{5,7}|(?:2(?:2[4568]|7[15]|9[1-5])|3(?:18|3[167]|4[2357]|51)|4(?:18|2[45]|3[12]|5[13]|64|71|9[1-47])|5(?:[1-4]\\d|5[0234])|6(?:3[1-3]|44|7[1-4678])|7(?:17|4[0-4]|6[1-578]|75|8[0-8])|858)\\d{5,6}","\\d{5,9}",,,"212345678"],[,,"9(?:6[12]|[78][1-6]|9[1-5])\\d{6}","\\d{9}",,,"961456789"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"8700[0-4]\\d{4}","\\d{9}",,,"870012345"],"PY",595,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{5,7})","$1 $2",["(?:[26]1|3[289]|4[124678]|7[123]|8[1236])"],"($1)","",0],[,"(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1","",0],[,"(\\d{3})(\\d{6})","$1 $2",["9[1-9]"],"0$1","",0],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8700"],"","",0],[,"(\\d{3})(\\d{4,6})","$1 $2",["[2-8][1-9]"],"($1)","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"[2-9]0\\d{4,7}","\\d{6,9}",,,"201234567"],,,[,,"NA","NA"]],QA:[,[,,"[2-8]\\d{6,7}","\\d{7,8}"],[,,"4[04]\\d{6}","\\d{7,8}",,,"44123456"],[,,"[3567]\\d{7}","\\d{7,8}",,,"33123456"],[,,"800\\d{4}","\\d{7,8}",,,"8001234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"QA",974,"00",,,,,,,,[[,"([28]\\d{2})(\\d{4})","$1 $2",["[28]"],"","",0],[,"([3-7]\\d{3})(\\d{4})","$1 $2",["[3-7]"],"","",0]],,[,,"2(?:[12]\\d|61)\\d{4}","\\d{7}",,,"2123456"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],RE:[,[,,"[268]\\d{8}","\\d{9}"],[,,"262\\d{6}","\\d{9}",,,"262161234"],[,,"6(?:9[23]|47)\\d{6}","\\d{9}",,,"692123456"],[,,"80\\d{7}","\\d{9}",,,"801234567"],[,,"89[1-37-9]\\d{6}","\\d{9}",,,"891123456"],[,,"8(?:1[019]|2[0156]|84|90)\\d{6}","\\d{9}",,,"810123456"],[,,"NA","NA"],[,,"NA","NA"],"RE",262,"00","0",,,"0",,,,[[,"([268]\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,"0$1","",0]],,[,,"NA","NA"],1,"262|6[49]|8",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],RO:[,[,,"2\\d{5,8}|[37-9]\\d{8}","\\d{6,9}"],[,,"2(?:1(?:\\d{7}|9\\d{3})|[3-6](?:\\d{7}|\\d9\\d{2}))|3[13-6]\\d{7}","\\d{6,9}",,,"211234567"],[,,"7(?:000|[1-8]\\d{2}|99\\d)\\d{5}","\\d{9}",,,"712345678"],[,,"800\\d{6}","\\d{9}",,,"800123456"],[,,"90[036]\\d{6}","\\d{9}",,,"900123456"],[,,"801\\d{6}","\\d{9}",,,"801123456"],[,,"802\\d{6}","\\d{9}",,,"802123456"],[,,"NA","NA"],"RO",40,"00","0"," int ",,"0",,,,[[,"([237]\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1","",0],[,"(21)(\\d{4})","$1 $2",["21"],"0$1","",0],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[23][3-7]|[7-9]"],"0$1","",0],[,"(2\\d{2})(\\d{3})","$1 $2",["2[3-6]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"37\\d{7}","\\d{9}",,,"372123456"],,,[,,"NA","NA"]],RS:[,[,,"[126-9]\\d{4,11}|3(?:[0-79]\\d{3,10}|8[2-9]\\d{2,9})","\\d{5,12}"],[,,"(?:1(?:[02-9][2-9]|1[1-9])\\d|2(?:[0-24-7][2-9]\\d|[389](?:0[2-9]|[2-9]\\d))|3(?:[0-8][2-9]\\d|9(?:[2-9]\\d|0[2-9])))\\d{3,8}","\\d{5,12}",,,"10234567"],[,,"6(?:[0-689]|7\\d)\\d{6,7}","\\d{8,10}",,,"601234567"],[,,"800\\d{3,9}","\\d{6,12}",,,"80012345"],[,,"(?:90[0169]|78\\d)\\d{3,7}","\\d{6,12}",,,"90012345"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"RS",381,"00","0",,,"0",,,,[[,"([23]\\d{2})(\\d{4,9})","$1 $2",["(?:2[389]|39)0"],"0$1","",0],[,"([1-3]\\d)(\\d{5,10})","$1 $2",["1|2(?:[0-24-7]|[389][1-9])|3(?:[0-8]|9[1-9])"],"0$1","",0],[,"(6\\d)(\\d{6,8})","$1 $2",["6"],"0$1","",0],[,"([89]\\d{2})(\\d{3,9})","$1 $2",["[89]"],"0$1","",0],[,"(7[26])(\\d{4,9})","$1 $2",["7[26]"],"0$1","",0],[,"(7[08]\\d)(\\d{4,9})","$1 $2",["7[08]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"7[06]\\d{4,10}","\\d{6,12}",,,"700123456"],,,[,,"NA","NA"]],RU:[,[,,"[3489]\\d{9}","\\d{10}"],[,,"(?:3(?:0[12]|4[1-35-79]|5[1-3]|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15]|6[1-35-7]|7[1-37-9]))\\d{7}","\\d{10}",,,"3011234567"],[,,"9\\d{9}","\\d{10}",,,"9123456789"],[,,"80[04]\\d{7}","\\d{10}",,,"8001234567"],[,,"80[39]\\d{7}","\\d{10}",,,"8091234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"RU",7,"810","8",,,"8",,"8~10",,[[,"(\\d{3})(\\d{2})(\\d{2})","$1-$2-$3",["[1-79]"],"$1","",1],[,"([3489]\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[34689]"],"8 ($1)","",1],[,"(7\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)","",1]],[[,"([3489]\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[34689]"],"8 ($1)","",1],[,"(7\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)","",1]],[,,"NA","NA"],1,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],RW:[,[,,"[027-9]\\d{7,8}","\\d{8,9}"],[,,"2[258]\\d{7}|06\\d{6}","\\d{8,9}",,,"250123456"],[,,"7[238]\\d{7}","\\d{9}",,,"720123456"],[,,"800\\d{6}","\\d{9}",,,"800123456"],[,,"900\\d{6}","\\d{9}",,,"900123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"RW",250,"00","0",,,"0",,,,[[,"(2\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"$1","",0],[,"([7-9]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1","",0],[,"(0\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],1,,[,,"NA","NA"]],SA:[,[,,"1\\d{7,8}|(?:[2-467]|92)\\d{7}|5\\d{8}|8\\d{9}","\\d{7,10}"],[,,"11\\d{7}|1?(?:2[24-8]|3[35-8]|4[3-68]|6[2-5]|7[235-7])\\d{6}","\\d{7,9}",,,"112345678"],[,,"(?:5(?:[013-689]\\d|7[0-26-8])|811\\d)\\d{6}","\\d{9,10}",,,"512345678"],[,,"800\\d{7}","\\d{10}",,,"8001234567"],[,,"NA","NA"],[,,"92[05]\\d{6}","\\d{9}",,,"920012345"],[,,"NA","NA"],[,,"NA","NA"],"SA",966,"00","0",,,"0",,,,[[,"([1-467])(\\d{3})(\\d{4})","$1 $2 $3",["[1-467]"],"0$1","",0],[,"(1\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1[1-467]"],"0$1","",0],[,"(5\\d)(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1","",0],[,"(92\\d{2})(\\d{5})","$1 $2",["92"],"$1","",0],[,"(800)(\\d{3})(\\d{4})","$1 $2 $3",["80"],"$1","",0],[,"(811)(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],SB:[,[,,"[1-9]\\d{4,6}","\\d{5,7}"],[,,"(?:1[4-79]|[23]\\d|4[0-2]|5[03]|6[0-37])\\d{3}","\\d{5}",,,"40123"],[,,"48\\d{3}|7(?:30|[46-8]\\d|5[025-9]|9[0-5])\\d{4}|8[4-8]\\d{5}|9(?:1[2-9]|2[013-9]|3[0-2]|[46]\\d|5[0-46-9]|7[0-689]|8[0-79]|9[0-8])\\d{4}","\\d{5,7}",,,"7421234"],[,,"1[38]\\d{3}","\\d{5}",,,"18123"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"5[12]\\d{3}","\\d{5}",,,"51123"],"SB",677,"0[01]",,,,,,,,[[,"(\\d{2})(\\d{5})","$1 $2",["[7-9]"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],SC:[,[,,"[2468]\\d{5,6}","\\d{6,7}"],[,,"4[2-46]\\d{5}","\\d{7}",,,"4217123"],[,,"2[5-8]\\d{5}","\\d{7}",,,"2510123"],[,,"8000\\d{2}","\\d{6}",,,"800000"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"64\\d{5}","\\d{7}",,,"6412345"],"SC",248,"0[0-2]",,,,,,"00",,[[,"(\\d{3})(\\d{3})","$1 $2",["8"],"","",0],[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],SD:[,[,,"[19]\\d{8}","\\d{9}"],[,,"1(?:[125]\\d|8[3567])\\d{6}","\\d{9}",,,"121231234"],[,,"9[0-3569]\\d{7}","\\d{9}",,,"911231234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"SD",249,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",,"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],SE:[,[,,"[1-9]\\d{5,9}","\\d{5,10}"],[,,"1(?:0[1-8]\\d{6}|[136]\\d{5,7}|(?:2[0-35]|4[0-4]|5[0-25-9]|7[13-6]|[89]\\d)\\d{5,6})|2(?:[136]\\d{5,7}|(?:2[0-7]|4[0136-8]|5[0138]|7[018]|8[01]|9[0-57])\\d{5,6})|3(?:[356]\\d{5,7}|(?:0[0-4]|1\\d|2[0-25]|4[056]|7[0-2]|8[0-3]|9[023])\\d{5,6})|4(?:0[1-9]\\d{4,6}|[246]\\d{5,7}|(?:1[013-8]|3[0135]|5[14-79]|7[0-246-9]|8[0156]|9[0-689])\\d{5,6})|5(?:0[0-6]|[15][0-5]|2[0-68]|3[0-4]|4\\d|6[03-5]|7[013]|8[0-79]|9[01])\\d{5,6}|6(?:0[1-9]\\d{4,6}|3\\d{5,7}|(?:1[1-3]|2[0-4]|4[02-57]|5[0-37]|6[0-3]|7[0-2]|8[0247]|9[0-356])\\d{5,6})|8[1-9]\\d{5,7}|9(?:0[1-9]\\d{4,6}|(?:1[0-68]|2\\d|3[02-5]|4[0-3]|5[0-4]|[68][01]|7[0135-8])\\d{5,6})","\\d{5,9}",,,"8123456"],[,,"7[02369]\\d{7}","\\d{9}",,,"701234567"],[,,"20(?:0(?:0\\d{2}|[1-9](?:0\\d{1,4}|[1-9]\\d{4}))|1(?:0\\d{4}|[1-9]\\d{4,5})|[2-9]\\d{5})","\\d{6,9}",,,"20123456"],[,,"9(?:00|39|44)(?:1(?:[0-26]\\d{5}|[3-57-9]\\d{2})|2(?:[0-2]\\d{5}|[3-9]\\d{2})|3(?:[0139]\\d{5}|[24-8]\\d{2})|4(?:[045]\\d{5}|[1-36-9]\\d{2})|5(?:5\\d{5}|[0-46-9]\\d{2})|6(?:[679]\\d{5}|[0-58]\\d{2})|7(?:[078]\\d{5}|[1-69]\\d{2})|8(?:[578]\\d{5}|[0-469]\\d{2}))","\\d{7}(?:\\d{3})?",,,"9001234567"],[,,"77(?:0(?:0\\d{2}|[1-9](?:0\\d|[1-9]\\d{4}))|[1-6][1-9]\\d{5})","\\d{6}(?:\\d{3})?",,,"771234567"],[,,"75[1-8]\\d{6}","\\d{9}",,,"751234567"],[,,"NA","NA"],"SE",46,"00","0",,,"0",,,,[[,"(8)(\\d{2,3})(\\d{2,3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1","",0],[,"([1-69]\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[013689]|2[0136]|3[1356]|4[0246]|54|6[03]|90"],"0$1","",0],[,"([1-69]\\d)(\\d{3})(\\d{2})","$1-$2 $3",["1[13689]|2[136]|3[1356]|4[0246]|54|6[03]|90"],"0$1","",0],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[2457]|2[2457-9]|3[0247-9]|4[1357-9]|5[0-35-9]|6[124-9]|9(?:[125-8]|3[0-5]|4[0-3])"],"0$1","",0],[,"(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2[2457-9]|3[0247-9]|4[1357-9]|5[0-35-9]|6[124-9]|9(?:[125-8]|3[0-5]|4[0-3])"],"0$1","",0],[,"(7\\d)(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["7"],"0$1","",0],[,"(77)(\\d{2})(\\d{2})","$1-$2$3",["7"],"0$1","",0],[,"(20)(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1","",0],[,"(9[034]\\d)(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9[034]"],"0$1","",0],[,"(9[034]\\d)(\\d{4})","$1-$2",["9[034]"],"0$1","",0]],[[,"(8)(\\d{2,3})(\\d{2,3})(\\d{2})","$1 $2 $3 $4",["8"]],[,"([1-69]\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[013689]|2[0136]|3[1356]|4[0246]|54|6[03]|90"]],[,"([1-69]\\d)(\\d{3})(\\d{2})","$1 $2 $3",["1[13689]|2[136]|3[1356]|4[0246]|54|6[03]|90"]],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2457]|2[2457-9]|3[0247-9]|4[1357-9]|5[0-35-9]|6[124-9]|9(?:[125-8]|3[0-5]|4[0-3])"]],[,"(\\d{3})(\\d{2,3})(\\d{2})","$1 $2 $3",["1[2457]|2[2457-9]|3[0247-9]|4[1357-9]|5[0-35-9]|6[124-9]|9(?:[125-8]|3[0-5]|4[0-3])"]],[,"(7\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7"]],[,"(77)(\\d{2})(\\d{2})","$1 $2 $3",["7"]],[,"(20)(\\d{2,3})(\\d{2})","$1 $2 $3",["20"]],[,"(9[034]\\d)(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["9[034]"]],[,"(9[034]\\d)(\\d{4})","$1 $2",["9[034]"]]],[,,"74[02-9]\\d{6}","\\d{9}",,,"740123456"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],SG:[,[,,"[36]\\d{7}|[17-9]\\d{7,10}","\\d{8,11}"],[,,"6[1-9]\\d{6}","\\d{8}",,,"61234567"],[,,"(?:8[1-8]|9[0-8])\\d{6}","\\d{8}",,,"81234567"],[,,"1?800\\d{7}","\\d{10,11}",,,"18001234567"],[,,"1900\\d{7}","\\d{11}",,,"19001234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"3[12]\\d{6}","\\d{8}",,,"31234567"],"SG",65,"0[0-3]\\d",,,,,,,,[[,"([3689]\\d{3})(\\d{4})","$1 $2",["[369]|8[1-9]"],"","",0],[,"(1[89]00)(\\d{3})(\\d{4})","$1 $2 $3",["1[89]"],"","",0],[,"(7000)(\\d{4})(\\d{3})","$1 $2 $3",["70"],"","",0],[,"(800)(\\d{3})(\\d{4})","$1 $2 $3",["80"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"7000\\d{7}","\\d{11}",,,"70001234567"],,,[,,"NA","NA"]],SH:[,[,,"[256]\\d{4}","\\d{4,5}"],[,,"2(?:[0-57-9]\\d|6[4-9])\\d{2}","\\d{5}",,,"22158"],[,,"[56]\\d{4}","\\d{5}"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"262\\d{2}","\\d{5}"],"SH",290,"00",,,,,,,,,,[,,"NA","NA"],1,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],SI:[,[,,"[1-7]\\d{6,7}|[89]\\d{4,7}","\\d{5,8}"],[,,"(?:1\\d|[25][2-8]|3[4-8]|4[24-8]|7[3-8])\\d{6}","\\d{7,8}",,,"11234567"],[,,"(?:[37][01]|4[0139]|51|6[48])\\d{6}","\\d{8}",,,"31234567"],[,,"80\\d{4,6}","\\d{6,8}",,,"80123456"],[,,"90\\d{4,6}|89[1-3]\\d{2,5}","\\d{5,8}",,,"90123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"(?:59|8[1-3])\\d{6}","\\d{8}",,,"59012345"],"SI",386,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[12]|3[4-8]|4[24-8]|5[2-8]|7[3-8]"],"(0$1)","",0],[,"([3-7]\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1","",0],[,"([89][09])(\\d{3,6})","$1 $2",["[89][09]"],"0$1","",0],[,"([58]\\d{2})(\\d{5})","$1 $2",["59|8[1-3]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],SJ:[,[,,"0\\d{4}|[4789]\\d{7}","\\d{5}(?:\\d{3})?"],[,,"79\\d{6}","\\d{8}",,,"79123456"],[,,"(?:4[015-8]|5[89]|9\\d)\\d{6}","\\d{8}",,,"41234567"],[,,"80[01]\\d{5}","\\d{8}",,,"80012345"],[,,"82[09]\\d{5}","\\d{8}",,,"82012345"],[,,"810(?:0[0-6]|[2-8]\\d)\\d{3}","\\d{8}",,,"81021234"],[,,"880\\d{5}","\\d{8}",,,"88012345"],[,,"85[0-5]\\d{5}","\\d{8}",,,"85012345"],"SJ",47,"00",,,,,,,,,,[,,"NA","NA"],,,[,,"NA","NA"],[,,"0\\d{4}|81(?:0(?:0[7-9]|1\\d)|5\\d{2})\\d{3}","\\d{5}(?:\\d{3})?",,,"01234"],1,,[,,"81[23]\\d{5}","\\d{8}",,,"81212345"]],SK:[,[,,"[2-689]\\d{8}","\\d{9}"],[,,"[2-5]\\d{8}","\\d{9}",,,"212345678"],[,,"9(?:0[1-8]|1[0-24-9]|4[0489])\\d{6}","\\d{9}",,,"912123456"],[,,"800\\d{6}","\\d{9}",,,"800123456"],[,,"9(?:[78]\\d{7}|00\\d{6})","\\d{9}",,,"900123456"],[,,"8[5-9]\\d{7}","\\d{9}",,,"850123456"],[,,"NA","NA"],[,,"6(?:5[0-4]|9[0-6])\\d{6}","\\d{9}",,,"690123456"],"SK",421,"00","0",,,"0",,,,[[,"(2)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1","",0],[,"([3-5]\\d)(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1","",0],[,"([689]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"(?:8(?:00|[5-9]\\d)|9(?:00|[78]\\d))\\d{6}","\\d{9}",,,"800123456"],[,,"96\\d{7}","\\d{9}",,,"961234567"],,,[,,"NA","NA"]],SL:[,[,,"[2-9]\\d{7}","\\d{6,8}"],[,,"[235]2[2-4][2-9]\\d{4}","\\d{6,8}",,,"22221234"],[,,"(?:2[15]|3[03-5]|4[04]|5[05]|66|7[6-9]|88|99)\\d{6}","\\d{6,8}",,,"25123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"SL",232,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{6})","$1 $2",,"(0$1)","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],SM:[,[,,"[05-7]\\d{7,9}","\\d{6,10}"],[,,"0549(?:8[0157-9]|9\\d)\\d{4}","\\d{6,10}",,,"0549886377"],[,,"6[16]\\d{6}","\\d{8}",,,"66661212"],[,,"NA","NA"],[,,"7[178]\\d{6}","\\d{8}",,,"71123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"5[158]\\d{6}","\\d{8}",,,"58001110"],"SM",378,"00",,,,"(?:0549)?([89]\\d{5})","0549$1",,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"],"","",0],[,"(0549)(\\d{6})","$1 $2",["0"],"","",0],[,"(\\d{6})","0549 $1",["[89]"],"","",0]],[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"],"","",0],[,"(0549)(\\d{6})","($1) $2",["0"]],[,"(\\d{6})","(0549) $1",["[89]"]]],[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],1,,[,,"NA","NA"]],SN:[,[,,"[3789]\\d{8}","\\d{9}"],[,,"3(?:0(?:1[0-2]|80)|282|3(?:8[1-9]|9[3-9])|611|90[1-5])\\d{5}","\\d{9}",,,"301012345"],[,,"7(?:[067]\\d|21|8[0-26]|90)\\d{6}","\\d{9}",,,"701234567"],[,,"800\\d{6}","\\d{9}",,,"800123456"],[,,"88[4689]\\d{6}","\\d{9}",,,"884123456"],[,,"81[02468]\\d{6}","\\d{9}",,,"810123456"],[,,"NA","NA"],[,,"3392\\d{5}|93330\\d{4}","\\d{9}",,,"933301234"],"SN",221,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"],"","",0],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],SO:[,[,,"[1-79]\\d{6,8}","\\d{7,9}"],[,,"(?:1\\d|2[0-79]|3[0-46-8]|4[0-7]|59)\\d{5}","\\d{7}",,,"4012345"],[,,"(?:15\\d|2(?:4\\d|8)|6[137-9]?\\d{2}|7[1-9]\\d|907\\d)\\d{5}","\\d{7,9}",,,"71123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"SO",252,"00","0",,,"0",,,,[[,"(\\d)(\\d{6})","$1 $2",["2[0-79]|[13-5]"],"","",0],[,"(\\d)(\\d{7})","$1 $2",["24|[67]"],"","",0],[,"(\\d{2})(\\d{5,7})","$1 $2",["15|28|6[1378]"],"","",0],[,"(69\\d)(\\d{6})","$1 $2",["69"],"","",0],[,"(90\\d)(\\d{3})(\\d{3})","$1 $2 $3",["90"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],SR:[,[,,"[2-8]\\d{5,6}","\\d{6,7}"],[,,"(?:2[1-3]|3[0-7]|4\\d|5[2-58]|68\\d)\\d{4}","\\d{6,7}",,,"211234"],[,,"(?:7[124-7]|8[1-9])\\d{5}","\\d{7}",,,"7412345"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"5(?:6\\d{4}|90[0-4]\\d{3})","\\d{6,7}",,,"561234"],"SR",597,"00",,,,,,,,[[,"(\\d{3})(\\d{3})","$1-$2",["[2-4]|5[2-58]"],"","",0],[,"(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"],"","",0],[,"(\\d{3})(\\d{4})","$1-$2",["59|[6-8]"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],SS:[,[,,"[19]\\d{8}","\\d{9}"],[,,"18\\d{7}","\\d{9}",,,"181234567"],[,,"(?:12|9[1257])\\d{7}","\\d{9}",,,"977123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"SS",211,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",,"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],ST:[,[,,"[29]\\d{6}","\\d{7}"],[,,"22\\d{5}","\\d{7}",,,"2221234"],[,,"9[89]\\d{5}","\\d{7}",,,"9812345"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"ST",239,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],SV:[,[,,"[267]\\d{7}|[89]\\d{6}(?:\\d{4})?","\\d{7,8}|\\d{11}"],[,,"2[1-6]\\d{6}","\\d{8}",,,"21234567"],[,,"[67]\\d{7}","\\d{8}",,,"70123456"],[,,"800\\d{4}(?:\\d{4})?","\\d{7}(?:\\d{4})?",,,"8001234"],[,,"900\\d{4}(?:\\d{4})?","\\d{7}(?:\\d{4})?",,,"9001234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"SV",503,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[267]"],"","",0],[,"(\\d{3})(\\d{4})","$1 $2",["[89]"],"","",0],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],SX:[,[,,"[5789]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"7215(?:4[2-8]|8[239]|9[056])\\d{4}","\\d{7}(?:\\d{3})?",,,"7215425678"],[,,"7215(?:1[02]|2\\d|5[034679]|8[014-8])\\d{4}","\\d{10}",,,"7215205678"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002123456"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002123456"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"SX",1,"011","1",,,"1",,,,,,[,,"NA","NA"],,"721",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],SY:[,[,,"[1-59]\\d{7,8}","\\d{6,9}"],[,,"(?:1(?:1\\d?|4\\d|[2356])|2(?:1\\d?|[235])|3(?:[13]\\d|4)|4[13]|5[1-3])\\d{6}","\\d{6,9}",,,"112345678"],[,,"9(?:22|[35][0-8]|4\\d|6[024-9]|88|9[0-489])\\d{6}","\\d{9}",,,"944567890"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"SY",963,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1","",1],[,"(9\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1","",1]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],SZ:[,[,,"[027]\\d{7}","\\d{8}"],[,,"2(?:2(?:0[07]|[13]7|2[57])|3(?:0[34]|[1278]3|3[23]|[46][34])|(?:40[4-69]|67)|5(?:0[5-7]|1[6-9]|[23][78]|48|5[01]))\\d{4}","\\d{8}",,,"22171234"],[,,"7[6-8]\\d{6}","\\d{8}",,,"76123456"],[,,"0800\\d{4}","\\d{8}",,,"08001234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"SZ",268,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[027]"],"","",0]],,[,,"NA","NA"],,,[,,"0800\\d{4}","\\d{8}",,,"08001234"],[,,"NA","NA"],1,,[,,"NA","NA"]],TA:[,[,,"8\\d{3}","\\d{4}"],[,,"8\\d{3}","\\d{4}",,,"8999"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"TA",290,"00",,,,,,,,,,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],TC:[,[,,"[5689]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"649(?:712|9(?:4\\d|50))\\d{4}","\\d{7}(?:\\d{3})?",,,"6497121234"],[,,"649(?:2(?:3[129]|4[1-7])|3(?:3[1-389]|4[1-7])|4[34][1-3])\\d{4}","\\d{10}",,,"6492311234"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002345678"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002345678"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"64971[01]\\d{4}","\\d{10}",,,"6497101234"],"TC",1,"011","1",,,"1",,,,,,[,,"NA","NA"],,"649",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],TD:[,[,,"[2679]\\d{7}","\\d{8}"],[,,"22(?:[3789]0|5[0-5]|6[89])\\d{4}","\\d{8}",,,"22501234"],[,,"(?:6[02368]\\d|77\\d|9(?:5[0-4]|9\\d))\\d{5}","\\d{8}",,,"63012345"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"TD",235,"00|16",,,,,,"00",,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],TG:[,[,,"[29]\\d{7}","\\d{8}"],[,,"2(?:2[2-7]|3[23]|44|55|66|77)\\d{5}","\\d{8}",,,"22212345"],[,,"9[0-389]\\d{6}","\\d{8}",,,"90112345"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"TG",228,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],TH:[,[,,"[2-9]\\d{7,8}|1\\d{3}(?:\\d{5,6})?","\\d{4}|\\d{8,10}"],[,,"(?:2\\d|3[2-9]|4[2-5]|5[2-6]|7[3-7])\\d{6}","\\d{8}",,,"21234567"],[,,"(?:14|6[1-3]|[89]\\d)\\d{7}","\\d{9}",,,"812345678"],[,,"1800\\d{6}","\\d{10}",,,"1800123456"],[,,"1900\\d{6}","\\d{10}",,,"1900123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"6[08]\\d{7}","\\d{9}",,,"601234567"],"TH",66,"00","0",,,"0",,,,[[,"(2)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1","",0],[,"([13-9]\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["14|[3-9]"],"0$1","",0],[,"(1[89]00)(\\d{3})(\\d{3})","$1 $2 $3",["1"],"$1","",0]],,[,,"NA","NA"],,,[,,"1\\d{3}","\\d{4}",,,"1100"],[,,"1\\d{3}","\\d{4}",,,"1100"],,,[,,"NA","NA"]],TJ:[,[,,"[3-59]\\d{8}","\\d{3,9}"],[,,"(?:3(?:1[3-5]|2[245]|3[12]|4[24-7]|5[25]|72)|4(?:46|74|87))\\d{6}","\\d{3,9}",,,"372123456"],[,,"(?:50[125]|9[0-35-9]\\d)\\d{6}","\\d{9}",,,"917123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"TJ",992,"810","8",,,"8",,"8~10",,[[,"([349]\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[34]7|91[78]"],"(8) $1","",1],[,"([459]\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[48]|5|9(?:1[59]|[0235-9])"],"(8) $1","",1],[,"(331700)(\\d)(\\d{2})","$1 $2 $3",["331","3317","33170","331700"],"(8) $1","",1],[,"(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3[1-5]","3(?:[1245]|3(?:[02-9]|1[0-589]))"],"(8) $1","",1]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],TK:[,[,,"[2-9]\\d{3}","\\d{4}"],[,,"[2-4]\\d{3}","\\d{4}",,,"3010"],[,,"[5-9]\\d{3}","\\d{4}",,,"5190"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"TK",690,"00",,,,,,,,,,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],TL:[,[,,"[2-489]\\d{6}|7\\d{6,7}","\\d{7,8}"],[,,"(?:2[1-5]|3[1-9]|4[1-4])\\d{5}","\\d{7}",,,"2112345"],[,,"7[3-8]\\d{6}","\\d{8}",,,"77212345"],[,,"80\\d{5}","\\d{7}",,,"8012345"],[,,"90\\d{5}","\\d{7}",,,"9012345"],[,,"NA","NA"],[,,"70\\d{5}","\\d{7}",,,"7012345"],[,,"NA","NA"],"TL",670,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[2-489]"],"","",0],[,"(\\d{4})(\\d{4})","$1 $2",["7"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],TM:[,[,,"[1-6]\\d{7}","\\d{8}"],[,,"(?:1(?:2\\d|3[1-9])|2(?:22|4[0-35-8])|3(?:22|4[03-9])|4(?:22|3[128]|4\\d|6[15])|5(?:22|5[7-9]|6[014-689]))\\d{5}","\\d{8}",,,"12345678"],[,,"6[2-9]\\d{6}","\\d{8}",,,"66123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"TM",993,"810","8",,,"8",,"8~10",,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)","",0],[,"(\\d{2})(\\d{6})","$1 $2",["6"],"8 $1","",0],[,"(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["13|[2-5]"],"(8 $1)","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],TN:[,[,,"[2-57-9]\\d{7}","\\d{8}"],[,,"3[012]\\d{6}|7\\d{7}|81200\\d{3}","\\d{8}",,,"71234567"],[,,"(?:[259]\\d|4[0-24])\\d{6}","\\d{8}",,,"20123456"],[,,"8010\\d{4}","\\d{8}",,,"80101234"],[,,"88\\d{6}","\\d{8}",,,"88123456"],[,,"8[12]10\\d{4}","\\d{8}",,,"81101234"],[,,"NA","NA"],[,,"NA","NA"],"TN",216,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],TO:[,[,,"[02-8]\\d{4,6}","\\d{5,7}"],[,,"(?:2\\d|3[1-8]|4[1-4]|[56]0|7[0149]|8[05])\\d{3}","\\d{5}",,,"20123"],[,,"(?:7[578]|8[47-9])\\d{5}","\\d{7}",,,"7715123"],[,,"0800\\d{3}","\\d{7}",,,"0800222"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"TO",676,"00",,,,,,,,[[,"(\\d{2})(\\d{3})","$1-$2",["[1-6]|7[0-4]|8[05]"],"","",0],[,"(\\d{3})(\\d{4})","$1 $2",["7[5-9]|8[47-9]"],"","",0],[,"(\\d{4})(\\d{3})","$1 $2",["0"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],1,,[,,"NA","NA"]],TR:[,[,,"[2-589]\\d{9}|444\\d{4}","\\d{7,10}"],[,,"(?:2(?:[13][26]|[28][2468]|[45][268]|[67][246])|3(?:[13][28]|[24-6][2468]|[78][02468]|92)|4(?:[16][246]|[23578][2468]|4[26]))\\d{7}","\\d{10}",,,"2123456789"],[,,"5(?:0[1-7]|22|[34]\\d|5[1-59]|9[246])\\d{7}","\\d{10}",,,"5012345678"],[,,"800\\d{7}","\\d{10}",,,"8001234567"],[,,"900\\d{7}","\\d{10}",,,"9001234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"TR",90,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[23]|4(?:[0-35-9]|4[0-35-9])"],"(0$1)","",1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[589]"],"0$1","",1],[,"(444)(\\d{1})(\\d{3})","$1 $2 $3",["444"],"","",0]],,[,,"512\\d{7}","\\d{10}",,,"5123456789"],,,[,,"444\\d{4}","\\d{7}",,,"4441444"],[,,"444\\d{4}|850\\d{7}","\\d{7,10}",,,"4441444"],,,[,,"NA","NA"]],TT:[,[,,"[589]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"868(?:2(?:[03]1|2[1-5])|6(?:0[79]|1[02-8]|2[1-9]|[3-69]\\d|7[0-79])|82[124])\\d{4}","\\d{7}(?:\\d{3})?",,,"8682211234"],[,,"868(?:2(?:[789]\\d)|3(?:0[1-9]|1[02-9]|[2-9]\\d)|4[6-9]\\d|6(?:20|78|8\\d)|7(?:0[1-9]|1[02-9]|[2-9]\\d))\\d{4}","\\d{10}",,,"8682911234"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002345678"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002345678"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"TT",1,"011","1",,,"1",,,,,,[,,"NA","NA"],,"868",[,,"NA","NA"],[,,"NA","NA"],,,[,,"868619\\d{4}","\\d{10}"]],TV:[,[,,"[29]\\d{4,5}","\\d{5,6}"],[,,"2[02-9]\\d{3}","\\d{5}",,,"20123"],[,,"90\\d{4}","\\d{6}",,,"901234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"TV",688,"00",,,,,,,,,,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],TW:[,[,,"[2-689]\\d{7,8}|7\\d{7,9}","\\d{8,10}"],[,,"[2-8]\\d{7,8}","\\d{8,9}",,,"21234567"],[,,"9\\d{8}","\\d{9}",,,"912345678"],[,,"800\\d{6}","\\d{9}",,,"800123456"],[,,"900\\d{6}","\\d{9}",,,"900123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"70\\d{8}","\\d{10}",,,"7012345678"],"TW",886,"0(?:0[25679]|19)","0","#",,"0",,,,[[,"([2-8])(\\d{3,4})(\\d{4})","$1 $2 $3",["[2-6]|[78][1-9]"],"0$1","",0],[,"([89]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["80|9"],"0$1","",0],[,"(70)(\\d{4})(\\d{4})","$1 $2 $3",["70"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],TZ:[,[,,"\\d{9}","\\d{7,9}"],[,,"2[2-8]\\d{7}","\\d{7,9}",,,"222345678"],[,,"(?:6[1578]|7[1-9])\\d{7}","\\d{9}",,,"612345678"],[,,"80[08]\\d{6}","\\d{9}",,,"800123456"],[,,"90\\d{7}","\\d{9}",,,"900123456"],[,,"8(?:40|6[01])\\d{6}","\\d{9}",,,"840123456"],[,,"NA","NA"],[,,"41\\d{7}","\\d{9}",,,"412345678"],"TZ",255,"00[056]","0",,,"0",,,,[[,"([24]\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1","",0],[,"([67]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1","",0],[,"([89]\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],UA:[,[,,"[3-9]\\d{8}","\\d{5,9}"],[,,"(?:3[1-8]|4[13-8]|5[1-7]|6[12459])\\d{7}","\\d{5,9}",,,"311234567"],[,,"(?:39|50|6[36-8]|73|9[1-9])\\d{7}","\\d{9}",,,"391234567"],[,,"800\\d{6}","\\d{9}",,,"800123456"],[,,"900\\d{6}","\\d{9}",,,"900123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"89\\d{7}","\\d{9}",,,"891234567"],"UA",380,"00","0",,,"0",,"0~0",,[[,"([3-9]\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[38]9|4(?:[45][0-5]|87)|5(?:0|6[37]|7[37])|6[36-8]|73|9[1-9]","[38]9|4(?:[45][0-5]|87)|5(?:0|6(?:3[14-7]|7)|7[37])|6[36-8]|73|9[1-9]"],"0$1","",0],[,"([3-689]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["3[1-8]2|4[13678]2|5(?:[12457]2|6[24])|6(?:[49]2|[12][29]|5[24])|8[0-8]|90","3(?:[1-46-8]2[013-9]|52)|4(?:[1378]2|62[013-9])|5(?:[12457]2|6[24])|6(?:[49]2|[12][29]|5[24])|8[0-8]|90"],"0$1","",0],[,"([3-6]\\d{3})(\\d{5})","$1 $2",["3(?:5[013-9]|[1-46-8])|4(?:[137][013-9]|6|[45][6-9]|8[4-6])|5(?:[1245][013-9]|6[0135-9]|3|7[4-6])|6(?:[49][013-9]|5[0135-9]|[12][13-8])","3(?:5[013-9]|[1-46-8](?:22|[013-9]))|4(?:[137][013-9]|6(?:[013-9]|22)|[45][6-9]|8[4-6])|5(?:[1245][013-9]|6(?:3[02389]|[015689])|3|7[4-6])|6(?:[49][013-9]|5[0135-9]|[12][13-8])"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],UG:[,[,,"\\d{9}","\\d{5,9}"],[,,"20(?:[0147]\\d{2}|2(?:40|[5-9]\\d)|3[23]\\d|5[0-4]\\d|6[03]\\d|8[0-2]\\d)\\d{4}|[34]\\d{8}","\\d{5,9}",,,"312345678"],[,,"2030\\d{5}|7(?:0[0-7]|[15789]\\d|2[03]|30|[46][0-4])\\d{6}","\\d{9}",,,"712345678"],[,,"800[123]\\d{5}","\\d{9}",,,"800123456"],[,,"90[123]\\d{6}","\\d{9}",,,"901123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"UG",256,"00[057]","0",,,"0",,,,[[,"(\\d{3})(\\d{6})","$1 $2",["[7-9]|20(?:[013-8]|2[5-9])|4(?:6[45]|[7-9])"],"0$1","",0],[,"(\\d{2})(\\d{7})","$1 $2",["3|4(?:[1-5]|6[0-36-9])"],"0$1","",0],[,"(2024)(\\d{5})","$1 $2",["2024"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],US:[,[,,"[2-9]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"(?:2(?:0[1-35-9]|1[02-9]|2[04589]|3[149]|4[08]|5[1-46]|6[0279]|7[026]|8[13])|3(?:0[1-57-9]|1[02-9]|2[0135]|3[014679]|4[67]|5[12]|6[014]|8[56])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[0235]|58|69|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[19]|6[1-37]|7[013-5]|8[056])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[16]|5[017]|6[0-279]|78|8[12])|7(?:0[1-46-8]|1[02-9]|2[0457]|3[1247]|4[07]|5[47]|6[02359]|7[02-59]|8[156])|8(?:0[1-68]|1[02-8]|28|3[0-25]|4[3578]|5[06-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[01678]|4[0179]|5[12469]|7[0-3589]|8[0459]))[2-9]\\d{6}","\\d{7}(?:\\d{3})?",,,"2015555555"],[,,"(?:2(?:0[1-35-9]|1[02-9]|2[04589]|3[149]|4[08]|5[1-46]|6[0279]|7[026]|8[13])|3(?:0[1-57-9]|1[02-9]|2[0135]|3[014679]|4[67]|5[12]|6[014]|8[56])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[0235]|58|69|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[19]|6[1-37]|7[013-5]|8[056])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[16]|5[017]|6[0-279]|78|8[12])|7(?:0[1-46-8]|1[02-9]|2[0457]|3[1247]|4[07]|5[47]|6[02359]|7[02-59]|8[156])|8(?:0[1-68]|1[02-8]|28|3[0-25]|4[3578]|5[06-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[01678]|4[0179]|5[12469]|7[0-3589]|8[0459]))[2-9]\\d{6}","\\d{7}(?:\\d{3})?",,,"2015555555"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002345678"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002345678"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"US",1,"011","1",,,"1",,,1,[[,"(\\d{3})(\\d{4})","$1-$2",,"","",1],[,"(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",,"","",1]],[[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3"]],[,,"NA","NA"],1,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],UY:[,[,,"[2489]\\d{6,7}","\\d{7,8}"],[,,"2\\d{7}|4[2-7]\\d{6}","\\d{7,8}",,,"21231234"],[,,"9[1-9]\\d{6}","\\d{8}",,,"94231234"],[,,"80[05]\\d{4}","\\d{7}",,,"8001234"],[,,"90[0-8]\\d{4}","\\d{7}",,,"9001234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"UY",598,"0(?:1[3-9]\\d|0)","0"," int. ",,"0",,"00",,[[,"(\\d{4})(\\d{4})","$1 $2",["[24]"],"","",0],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9[1-9]"],"0$1","",0],[,"(\\d{3})(\\d{4})","$1 $2",["[89]0"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],UZ:[,[,,"[679]\\d{8}","\\d{7,9}"],[,,"(?:6(?:1(?:22|3[124]|4[1-4]|5[123578]|64)|2(?:22|3[0-57-9]|41)|5(?:22|3[3-7]|5[024-8])|6\\d{2}|7(?:[23]\\d|7[69])|9(?:22|4[1-8]|6[135]))|7(?:0(?:5[4-9]|6[0146]|7[12456]|9[135-8])|1[12]\\d|2(?:22|3[1345789]|4[123579]|5[14])|3(?:2\\d|3[1578]|4[1-35-7]|5[1-57]|61)|4(?:2\\d|3[1-579]|7[1-79])|5(?:22|5[1-9]|6[1457])|6(?:22|3[12457]|4[13-8])|9(?:22|5[1-9])))\\d{5}","\\d{7,9}",,,"662345678"],[,,"6(?:1(?:2(?:98|2[01])|35[0-4]|50\\d|61[23]|7(?:[01][017]|4\\d|55|9[5-9]))|2(?:11\\d|2(?:[12]1|9[01379])|5(?:[126]\\d|3[0-4])|7\\d{2})|5(?:19[01]|2(?:27|9[26])|30\\d|59\\d|7\\d{2})|6(?:2(?:1[5-9]|2[0367]|38|41|52|60)|3[79]\\d|4(?:56|83)|7(?:[07]\\d|1[017]|3[07]|4[047]|5[057]|67|8[0178]|9[79])|9[0-3]\\d)|7(?:2(?:24|3[237]|4[5-9]|7[15-8])|5(?:7[12]|8[0589])|7(?:0\\d|[39][07])|9(?:0\\d|7[079]))|9(?:2(?:1[1267]|5\\d|3[01]|7[0-4])|5[67]\\d|6(?:2[0-26]|8\\d)|7\\d{2}))\\d{4}|7(?:0\\d{3}|1(?:13[01]|6(?:0[47]|1[67]|66)|71[3-69]|98\\d)|2(?:2(?:2[79]|95)|3(?:2[5-9]|6[0-6])|57\\d|7(?:0\\d|1[17]|2[27]|3[37]|44|5[057]|66|88))|3(?:2(?:1[0-6]|21|3[469]|7[159])|33\\d|5(?:0[0-4]|5[579]|9\\d)|7(?:[0-3579]\\d|4[0467]|6[67]|8[078])|9[4-6]\\d)|4(?:2(?:29|5[0257]|6[0-7]|7[1-57])|5(?:1[0-4]|8\\d|9[5-9])|7(?:0\\d|1[024589]|2[0127]|3[0137]|[46][07]|5[01]|7[5-9]|9[079])|9(?:7[015-9]|[89]\\d))|5(?:112|2(?:0\\d|2[29]|[49]4)|3[1568]\\d|52[6-9]|7(?:0[01578]|1[017]|[23]7|4[047]|[5-7]\\d|8[78]|9[079]))|6(?:2(?:2[1245]|4[2-4])|39\\d|41[179]|5(?:[349]\\d|5[0-2])|7(?:0[017]|[13]\\d|22|44|55|67|88))|9(?:22[128]|3(?:2[0-4]|7\\d)|57[05629]|7(?:2[05-9]|3[37]|4\\d|60|7[2579]|87|9[07])))\\d{4}|9[0-57-9]\\d{7}","\\d{7,9}",,,"912345678"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"UZ",998,"810","8",,,"8",,"8~10",,[[,"([679]\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",,"8 $1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],VA:[,[,,"(?:0(?:878\\d{5}|6698\\d{5})|[1589]\\d{5,10}|3(?:[12457-9]\\d{8}|[36]\\d{7,9}))","\\d{6,11}"],[,,"06698\\d{5}","\\d{10}",,,"0669812345"],[,,"3(?:[12457-9]\\d{8}|6\\d{7,8}|3\\d{7,9})","\\d{9,11}",,,"3123456789"],[,,"80(?:0\\d{6}|3\\d{3})","\\d{6,9}",,,"800123456"],[,,"0878\\d{5}|1(?:44|6[346])\\d{6}|89(?:2\\d{3}|4(?:[0-4]\\d{2}|[5-9]\\d{4})|5(?:[0-4]\\d{2}|[5-9]\\d{6})|9\\d{6})","\\d{6,10}",,,"899123456"],[,,"84(?:[08]\\d{6}|[17]\\d{3})","\\d{6,9}",,,"848123456"],[,,"1(?:78\\d|99)\\d{6}","\\d{9,10}",,,"1781234567"],[,,"55\\d{8}","\\d{10}",,,"5512345678"],"VA",39,"00",,,,,,,,,,[,,"NA","NA"],,,[,,"848\\d{6}","\\d{9}",,,"848123456"],[,,"NA","NA"],1,,[,,"NA","NA"]],VC:[,[,,"[5789]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"784(?:266|3(?:6[6-9]|7\\d|8[0-24-6])|4(?:38|5[0-36-8]|8[0-8])|5(?:55|7[0-2]|93)|638|784)\\d{4}","\\d{7}(?:\\d{3})?",,,"7842661234"],[,,"784(?:4(?:3[0-4]|5[45]|89|9[0-5])|5(?:2[6-9]|3[0-4]))\\d{4}","\\d{10}",,,"7844301234"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002345678"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002345678"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"VC",1,"011","1",,,"1",,,,,,[,,"NA","NA"],,"784",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],VE:[,[,,"[24589]\\d{9}","\\d{7,10}"],[,,"(?:2(?:12|3[457-9]|[58][1-9]|[467]\\d|9[1-6])|50[01])\\d{7}","\\d{7,10}",,,"2121234567"],[,,"4(?:1[24-8]|2[46])\\d{7}","\\d{10}",,,"4121234567"],[,,"800\\d{7}","\\d{10}",,,"8001234567"],[,,"900\\d{7}","\\d{10}",,,"9001234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"VE",58,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{7})","$1-$2",,"0$1","$CC $1",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],VG:[,[,,"[2589]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"284(?:(?:229|4(?:22|9[45])|774|8(?:52|6[459]))\\d{4}|496[0-5]\\d{3})","\\d{7}(?:\\d{3})?",,,"2842291234"],[,,"284(?:(?:3(?:0[0-3]|4[0-367])|4(?:4[0-6]|68|99)|54[0-57])\\d{4}|496[6-9]\\d{3})","\\d{10}",,,"2843001234"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002345678"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002345678"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"VG",1,"011","1",,,"1",,,,,,[,,"NA","NA"],,"284",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],VI:[,[,,"[3589]\\d{9}","\\d{7}(?:\\d{3})?"],[,,"340(?:2(?:01|2[0678]|44|77)|3(?:32|44)|4(?:22|7[34])|5(?:1[34]|55)|6(?:26|4[23]|77|9[023])|7(?:1[2-589]|27|7\\d)|884|998)\\d{4}","\\d{7}(?:\\d{3})?",,,"3406421234"],[,,"340(?:2(?:01|2[0678]|44|77)|3(?:32|44)|4(?:22|7[34])|5(?:1[34]|55)|6(?:26|4[23]|77|9[023])|7(?:1[2-589]|27|7\\d)|884|998)\\d{4}","\\d{7}(?:\\d{3})?",,,"3406421234"],[,,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",,,"8002345678"],[,,"900[2-9]\\d{6}","\\d{10}",,,"9002345678"],[,,"NA","NA"],[,,"5(?:00|33|44|66|77)[2-9]\\d{6}","\\d{10}",,,"5002345678"],[,,"NA","NA"],"VI",1,"011","1",,,"1",,,1,,,[,,"NA","NA"],,"340",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],VN:[,[,,"[17]\\d{6,9}|[2-69]\\d{7,9}|8\\d{6,8}","\\d{7,10}"],[,,"(?:2(?:[025-79]|1[0189]|[348][01])|3(?:[0136-9]|[25][01])|4\\d|5(?:[01][01]|[2-9])|6(?:[0-46-8]|5[01])|7(?:[02-79]|[18][01])|8[1-9])\\d{7}","\\d{9,10}",,,"2101234567"],[,,"(?:9\\d|1(?:2\\d|6[2-9]|8[68]|99))\\d{7}","\\d{9,10}",,,"912345678"],[,,"1800\\d{4,6}","\\d{8,10}",,,"1800123456"],[,,"1900\\d{4,6}","\\d{8,10}",,,"1900123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"VN",84,"00","0",,,"0",,,,[[,"([17]99)(\\d{4})","$1 $2",["[17]99"],"0$1","",1],[,"([48])(\\d{4})(\\d{4})","$1 $2 $3",["[48]"],"0$1","",1],[,"([235-7]\\d)(\\d{4})(\\d{3})","$1 $2 $3",["2[025-79]|3[0136-9]|5[2-9]|6[0-46-8]|7[02-79]"],"0$1","",1],[,"(80)(\\d{5})","$1 $2",["80"],"0$1","",1],[,"(69\\d)(\\d{4,5})","$1 $2",["69"],"0$1","",1],[,"([235-7]\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["2[1348]|3[25]|5[01]|65|7[18]"],"0$1","",1],[,"(9\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1","",1],[,"(1[2689]\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1(?:[26]|8[68]|99)"],"0$1","",1],[,"(1[89]00)(\\d{4,6})","$1 $2",["1[89]0"],"$1","",1]],,[,,"NA","NA"],,,[,,"[17]99\\d{4}|69\\d{5,6}","\\d{7,8}",,,"1992000"],[,,"[17]99\\d{4}|69\\d{5,6}|80\\d{5}","\\d{7,8}",,,"1992000"],,,[,,"NA","NA"]],VU:[,[,,"[2-57-9]\\d{4,6}","\\d{5,7}"],[,,"(?:2[02-9]\\d|3(?:[5-7]\\d|8[0-8])|48[4-9]|88\\d)\\d{2}","\\d{5}",,,"22123"],[,,"(?:5(?:7[2-5]|[3-69]\\d)|7[013-7]\\d)\\d{4}","\\d{7}",,,"5912345"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"VU",678,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[579]"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"3[03]\\d{3}|900\\d{4}","\\d{5,7}",,,"30123"],,,[,,"NA","NA"]],WF:[,[,,"[5-7]\\d{5}","\\d{6}"],[,,"(?:50|68|72)\\d{4}","\\d{6}",,,"501234"],[,,"(?:50|68|72)\\d{4}","\\d{6}",,,"501234"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"WF",681,"00",,,,,,,1,[[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],WS:[,[,,"[2-8]\\d{4,6}","\\d{5,7}"],[,,"(?:[2-5]\\d|6[1-9]|84\\d{2})\\d{3}","\\d{5,7}",,,"22123"],[,,"(?:60|7[25-7]\\d)\\d{4}","\\d{6,7}",,,"601234"],[,,"800\\d{3}","\\d{6}",,,"800123"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"WS",685,"0",,,,,,,,[[,"(8\\d{2})(\\d{3,4})","$1 $2",["8"],"","",0],[,"(7\\d)(\\d{5})","$1 $2",["7"],"","",0],[,"(\\d{5})","$1",["[2-6]"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],YE:[,[,,"[1-7]\\d{6,8}","\\d{6,9}"],[,,"(?:1(?:7\\d|[2-68])|2[2-68]|3[2358]|4[2-58]|5[2-6]|6[3-58]|7[24-68])\\d{5}","\\d{6,8}",,,"1234567"],[,,"7[0137]\\d{7}","\\d{9}",,,"712345678"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"YE",967,"00","0",,,"0",,,,[[,"([1-7])(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7[24-68]"],"0$1","",0],[,"(7\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["7[0137]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],YT:[,[,,"[268]\\d{8}","\\d{9}"],[,,"2696[0-4]\\d{4}","\\d{9}",,,"269601234"],[,,"639\\d{6}","\\d{9}",,,"639123456"],[,,"80\\d{7}","\\d{9}",,,"801234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"YT",262,"00","0",,,"0",,,,,,[,,"NA","NA"],,"269|63",[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],ZA:[,[,,"[1-79]\\d{8}|8(?:[067]\\d{7}|[1-4]\\d{3,7})","\\d{5,9}"],[,,"(?:1[0-8]|2[0-378]|3[1-69]|4\\d|5[1346-8])\\d{7}","\\d{9}",,,"101234567"],[,,"(?:6[0-5]|7[0-46-9])\\d{7}|8[1-4]\\d{3,7}","\\d{5,9}",,,"711234567"],[,,"80\\d{7}","\\d{9}",,,"801234567"],[,,"86[2-9]\\d{6}|90\\d{7}","\\d{9}",,,"862345678"],[,,"860\\d{6}","\\d{9}",,,"860123456"],[,,"NA","NA"],[,,"87\\d{7}","\\d{9}",,,"871234567"],"ZA",27,"00","0",,,"0",,,,[[,"(860)(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1","",0],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-79]|8(?:[0-47]|6[1-9])"],"0$1","",0],[,"(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1","",0],[,"(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"861\\d{6}","\\d{9}",,,"861123456"],,,[,,"NA","NA"]],ZM:[,[,,"[289]\\d{8}","\\d{9}"],[,,"21[1-8]\\d{6}","\\d{9}",,,"211234567"],[,,"9(?:5[05]|6\\d|7[1-9])\\d{6}","\\d{9}",,,"955123456"],[,,"800\\d{6}","\\d{9}",,,"800123456"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"ZM",260,"00","0",,,"0",,,,[[,"([29]\\d)(\\d{7})","$1 $2",["[29]"],"0$1","",0],[,"(800)(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],ZW:[,[,,"2(?:[012457-9]\\d{3,8}|6\\d{3,6})|[13-79]\\d{4,8}|8[06]\\d{8}","\\d{3,10}"],[,,"(?:1[3-9]|2(?:0[45]|[16]|2[28]|[49]8?|58[23]|7[246]|8[1346-9])|3(?:08?|17?|3[78]|[2456]|7[1569]|8[379])|5(?:[07-9]|1[78]|483|5(?:7?|8))|6(?:0|28|37?|[45][68][78]|98?)|848)\\d{3,6}|(?:2(?:27|5|7[135789]|8[25])|3[39]|5[1-46]|6[126-8])\\d{4,6}|2(?:(?:0|70)\\d{5,6}|2[05]\\d{7})|(?:4\\d|9[2-8])\\d{4,7}","\\d{3,10}",,,"1312345"],[,,"7[1378]\\d{7}|86(?:22|44)\\d{6}","\\d{9,10}",,,"711234567"],[,,"800\\d{7}","\\d{10}",,,"8001234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"86(?:1[12]|30|55|77|8[367]|99)\\d{6}","\\d{10}",,,"8686123456"],"ZW",263,"00","0",,,"0",,,,[[,"([49])(\\d{3})(\\d{2,5})","$1 $2 $3",["4|9[2-9]"],"0$1","",0],[,"([179]\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[19]1|7"],"0$1","",0],[,"(86\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["86[24]"],"0$1","",0],[,"([2356]\\d{2})(\\d{3,5})","$1 $2",["2(?:[278]|0[45]|[49]8)|3(?:08|17|3[78]|[78])|5[15][78]|6(?:[29]8|37|[68][78])"],"0$1","",0],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:[278]|0[45]|48)|3(?:08|17|3[78]|[78])|5[15][78]|6(?:[29]8|37|[68][78])|80"],"0$1","",0],[,"([1-356]\\d)(\\d{3,5})","$1 $2",["1[3-9]|2(?:[1-469]|0[0-35-9]|[45][0-79])|3(?:0[0-79]|1[0-689]|[24-69]|3[0-69])|5(?:[02-46-9]|[15][0-69])|6(?:[0145]|[29][0-79]|3[0-689]|[68][0-69])"],"0$1","",0],[,"([1-356]\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[3-9]|2(?:[1-469]|0[0-35-9]|[45][0-79])|3(?:0[0-79]|1[0-689]|[24-69]|3[0-69])|5(?:[02-46-9]|[15][0-69])|6(?:[0145]|[29][0-79]|3[0-689]|[68][0-69])"],"0$1","",0],[,"([25]\\d{3})(\\d{3,5})","$1 $2",["(?:25|54)8","258[23]|5483"],"0$1","",0],[,"([25]\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["(?:25|54)8","258[23]|5483"],"0$1","",0],[,"(8\\d{3})(\\d{6})","$1 $2",["86"],"0$1","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],800:[,[,,"\\d{8}","\\d{8}",,,"12345678"],[,,"NA","NA",,,"12345678"],[,,"NA","NA",,,"12345678"],[,,"\\d{8}","\\d{8}",,,"12345678"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"001",800,"",,,,,,,1,[[,"(\\d{4})(\\d{4})","$1 $2",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],1,,[,,"NA","NA"]],808:[,[,,"\\d{8}","\\d{8}",,,"12345678"],[,,"NA","NA",,,"12345678"],[,,"NA","NA",,,"12345678"],[,,"NA","NA"],[,,"NA","NA"],[,,"\\d{8}","\\d{8}",,,"12345678"],[,,"NA","NA"],[,,"NA","NA"],"001",808,"",,,,,,,1,[[,"(\\d{4})(\\d{4})","$1 $2",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],1,,[,,"NA","NA"]],870:[,[,,"[35-7]\\d{8}","\\d{9}",,,"301234567"],[,,"NA","NA",,,"301234567"],[,,"(?:[356]\\d|7[6-8])\\d{7}","\\d{9}",,,"301234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"001",870,"",,,,,,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],878:[,[,,"1\\d{11}","\\d{12}",,,"101234567890"],[,,"NA","NA",,,"101234567890"],[,,"NA","NA",,,"101234567890"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"10\\d{10}","\\d{12}",,,"101234567890"],"001",878,"",,,,,,,1,[[,"(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],881:[,[,,"[67]\\d{8}","\\d{9}",,,"612345678"],[,,"NA","NA",,,"612345678"],[,,"[67]\\d{8}","\\d{9}",,,"612345678"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"001",881,"",,,,,,,,[[,"(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[67]"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],882:[,[,,"[13]\\d{6,11}","\\d{7,12}",,,"3451234567"],[,,"NA","NA",,,"3451234567"],[,,"3(?:2\\d{3}|37\\d{2}|4(?:2|7\\d{3}))\\d{4}","\\d{7,10}",,,"3451234567"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15678]|9[0689])\\d{4}|6\\d{5,10})|345\\d{7}","\\d{7,12}",,,"3451234567"],"001",882,"",,,,,,,,[[,"(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"],"","",0],[,"(\\d{2})(\\d{5})","$1 $2",["16|342"],"","",0],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["34[57]"],"","",0],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["348"],"","",0],[,"(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1"],"","",0],[,"(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"],"","",0],[,"(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["16"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"348[57]\\d{7}","\\d{11}",,,"3451234567"]],883:[,[,,"51\\d{7}(?:\\d{3})?","\\d{9}(?:\\d{3})?",,,"510012345"],[,,"NA","NA",,,"510012345"],[,,"NA","NA",,,"510012345"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"51(?:00\\d{5}(?:\\d{3})?|[13]0\\d{8})","\\d{9}(?:\\d{3})?",,,"510012345"],"001",883,"",,,,,,,1,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"],"","",0],[,"(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["510"],"","",0],[,"(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"],"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],,,[,,"NA","NA"]],888:[,[,,"\\d{11}","\\d{11}",,,"12345678901"],[,,"NA","NA",,,"12345678901"],[,,"NA","NA",,,"12345678901"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"001",888,"",,,,,,,1,[[,"(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"\\d{11}","\\d{11}",,,"12345678901"],1,,[,,"NA","NA"]],979:[,[,,"\\d{9}","\\d{9}",,,"123456789"],[,,"NA","NA",,,"123456789"],[,,"NA","NA",,,"123456789"],[,,"NA","NA"],[,,"\\d{9}","\\d{9}",,,"123456789"],[,,"NA","NA"],[,,"NA","NA"],[,,"NA","NA"],"001",979,"",,,,,,,1,[[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",,"","",0]],,[,,"NA","NA"],,,[,,"NA","NA"],[,,"NA","NA"],1,,[,,"NA","NA"]]}},BA={},qA=0;qA<VA.countries.length;qA++){const e=VA.countries[qA];if(e.prefixes)if(e.prefixes.length)for(var jA=0;jA<e.prefixes.length;jA++)BA[e.dialCode+e.prefixes[jA]]=[e.cca2.toUpperCase()];else BA[e.dialCode]=VA.countryCodes[e.dialCode];else BA[e.dialCode]=VA.countryCodes[e.dialCode]}function GA(e){var t="",n="";if("+"==e.charAt(0))for(var r="",i="",s=0;s<e.length&&(isNaN(parseFloat(e.charAt(s)))||(r+=e.charAt(s),BA[r]&&(t=e.substr(0,s+1)),4!=i.length))&&(isNaN(parseFloat(e.charAt(s)))||(i+=e.charAt(s),BA[i]&&(n=e.substr(0,s+1)),4!=i.length));s++);return{dialCode:n.replace(/\D/g,""),prefixesDialCode:t.replace(/\D/g,"")}}function zA(e,t){return KA(e,t[1])?KA(e,t[5])?4:KA(e,t[4])?3:KA(e,t[6])?5:KA(e,t[8])?6:KA(e,t[7])?7:KA(e,t[21])?8:KA(e,t[25])?9:KA(e,t[28])?10:KA(e,t[2])?t[18]||KA(e,t[3])?2:0:!t[18]&&KA(e,t[3])?1:-1:-1}function KA(e,t){return HA(e,t[3])&&HA(e,t[2])}function HA(e,t){var n="string"==typeof t?e.match("^(?:"+t+")$"):e.match(t);return!(!n||n[0].length!=e.length)}function WA(e,t){let n=function(){0!==t.length&&WA(t.slice(-1),t.slice(0,-1))};var r=new Image;r.onload=n,r.onerror=n,r.src=e}function QA(e){WA(e.slice(-1),e.slice(0,-1))}const YA=e=>{let t=()=>{};const n=()=>{e.onNavBack()},r=()=>{e.onClose()};return{Hook:()=>{const i=document.getElementById("tfr-tryon-image"),s=((e,t)=>{const n=document.getElementById(e);if(!n)throw new Error(`Slider with id ${e} not found`);return{Load(e){if(!Array.isArray(e)||!e.length)return console.debug("slider has no images to load"),new Error("slider has no images to load");QA(e);const r=(null==e?void 0:e.length)-2;n.value=r.toString(),n.max=(e.length-1).toString();const i=()=>{const r=parseInt(n.value);t(n,e[r])};return t(n,e[r]),n.removeEventListener("input",i),n.addEventListener("input",i),()=>{n.removeEventListener("input",i)}}}})("tfr-slider",((e,t)=>{console.debug("slider change",e,t),i.src=t}));if(Array.isArray(e.frames)&&e.frames.length>0){const n=s.Load(e.frames);if(n instanceof Error)return void console.error(n);t=n}document.getElementById("tfr-back").addEventListener("click",n),document.getElementById("tfr-close").addEventListener("click",r)},Unhook:()=>{t(),document.getElementById("tfr-back").removeEventListener("click",n),document.getElementById("tfr-close").removeEventListener("click",r)},Body:()=>`\n <div class="tfr-slider-wrapper">\n\t\t\t\t<img id="tfr-tryon-image" src="" />\n\t\t\t\t<input type="range" id="tfr-slider" />\n\t\t\t\t</div>\n\t\t\t\t<div class="tfr-t-a-center">\n <span id="tfr-back" tfr-element="true" class="tfr-body-font tfr-16-default tfr-c-dark-o5 tfr-underline tfr-cursor tfr-mr-20">${vA}</span>\n <span id="tfr-close" tfr-element="true" class="tfr-body-font tfr-16-default tfr-c-dark-o5 tfr-underline tfr-cursor" id="returnToSite">${wA}</span>\n </div>\n `}};class JA{constructor(e,t,n,r){this.signIn=t,this.forgotPassword=n,this.submitTel=r,this.manager=UA(e)}get sku(){return this._sku}setSku(e){this._sku=e}close(){this.manager.close()}onSignOut(){this.manager.open((e=>{const t=()=>{e.onNavSignIn("")},n=()=>{e.onClose()};return{Hook:()=>{document.getElementById("tfr-sign-in").addEventListener("click",t),document.getElementById("tfr-close").addEventListener("click",n)},Unhook:()=>{document.getElementById("tfr-sign-in").removeEventListener("click",t),document.getElementById("tfr-close").removeEventListener("click",n)},Body:()=>`\n <div tfr-element="true" class="tfr-title-font tfr-light-22-300 tfr-mt-15-p tfr-mb-13-p">${_A}</div>\n <div class="tfr-t-a-center">\n <span id="tfr-sign-in" tfr-element="true" class="tfr-body-font tfr-16-default tfr-c-dark-o5 tfr-underline tfr-cursor tfr-mr-20">${IA}</span>\n <span id="tfr-close" tfr-element="true" class="tfr-body-font tfr-16-default tfr-c-dark-o5 tfr-underline tfr-cursor" >${bA}</span>\n </div>\n `}})({onNavSignIn:()=>this.toSignIn(),onClose:()=>this.close()}))}onNotCreated(){this.manager.open({Body:()=>`\n <div tfr-element="true" class="tfr-title-font tfr-light-22-300 tfr-c-dark tfr-mt-60">${aA}</div>\n <div tfr-element="true" class="tfr-title-font tfr-light-22-300 tfr-c-dark tfr-mb-60">${CA}</div>\n `,Hook:()=>{},Unhook:()=>{}})}onLoading(){this.manager.open(PA({timeoutMS:1e4}))}toScan(){this.manager.open((e=>{const t=()=>{e.onSignInNav()},n=()=>{const t=document.getElementById("tel-input").value;e.onTelSubmit(t)};return{Hook:()=>{FA("#tel-input"),document.getElementById("tel-button").addEventListener("click",n),document.getElementById("tfr-sign-in-nav").addEventListener("click",t)},Unhook:()=>{document.getElementById("tel-button").removeEventListener("click",n),document.getElementById("tfr-sign-in-nav").removeEventListener("click",t)},Body:()=>`\n <div tfr-element="true" class="tfr-logo-box">\n <div class="tfr-mr-15">\n <svg width="26" height="47" viewBox="0 0 68 124" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.911938 0L67.4819 17.09V106.49L0.911938 123.51V0Z" fill="white">\n </path>\n <path d="M52.8019 64.44C54.7791 64.44 56.3819 62.4387 56.3819 59.97C56.3819 57.5013 54.7791 55.5 52.8019 55.5C50.8248 55.5 49.2219 57.5013 49.2219 59.97C49.2219 62.4387 50.8248 64.44 52.8019 64.44Z" fill="#209DA7">\n </path>\n </svg>\n </div>\n <div tfr-element="true" class="tfr-title-font tfr-light-24-300 tfr-mr-10 tfr-c-white">${kA}</div>\n </div>\n\n <div tfr-element="true" class="tfr-title-font tfr-light-16-300 tfr-mt-10">${hA}</div>\n\n <div tfr-element="true" class="tfr-flex">\n <fieldset class="tfr-fieldset-element tfr-fieldset-inline tfr-mt-20">\n <legend tfr-element="true" class="tfr-label-element tfr-body-font tfr-14-default tfr-c-dark-o5">${yA}</legend>\n <div tfr-element="true" class="tfr-flex">\n <input tfr-element="true" type="tel" id="tel-input" />\n </div>\n </fieldset>\n <button tfr-element="true" class="tfr-standard-button tfr-bg-aquamarina-strong tfr-c-whitetfr-title-font tfr-medium-16-default tfr-cursor tfr-mt-30" id="tel-button">\n ${EA}\n </button>\n </div>\n\n <div id="tfr-sign-in-nav" tfr-element="true" class="tfr-body-font tfr-mt-20 tfr-16-default tfr-c-dark-o5 tfr-underline tfr-cursor">${AA}</div>\n `}})({onSignInNav:()=>this.toSignIn(),onTelSubmit:e=>this.submitTel(e)}))}toSignIn(){this.manager.open((e=>{const{email:t}=e,n=()=>{const t=document.getElementById("email-input").value,n=document.getElementById("password-input").value;s(),e.onSignIn(t,n,o)},r=()=>{const t=document.getElementById("email-input").value;e.onNavForgotPassword(t)},i=()=>{e.onNavScanCode()},s=()=>{document.querySelectorAll(".tfr-fieldset-element").forEach((e=>{e.classList.remove("tfr-fieldset-err")})),document.querySelectorAll(".tfr-label-element").forEach((e=>{e.classList.remove("tfr-c-red")}));const e=document.querySelector("#tfr-form-error");e.classList.remove("tfr-d-block"),e.innerHTML=""},o=e=>{document.querySelectorAll(".tfr-fieldset-element").forEach((e=>{e.classList.add("tfr-fieldset-err")})),document.querySelectorAll(".tfr-label-element").forEach((e=>{e.classList.add("tfr-c-red")}));const t=document.querySelector("#tfr-form-error");t.innerHTML=e||"Something went wrong",t.classList.add("tfr-d-block")};return{Hook:()=>{document.getElementById("tfr-sign-in").addEventListener("click",n),document.getElementById("tfr-forgot-password").addEventListener("click",r),document.getElementById("tfr-scan-code").addEventListener("click",i)},Unhook:()=>{document.getElementById("tfr-sign-in").removeEventListener("click",n),document.getElementById("tfr-forgot-password").removeEventListener("click",r),document.getElementById("tfr-scan-code").removeEventListener("click",i)},Body:()=>`\n <div class="tfr-title-font tfr-light-22-300 tfr-mt-10">${TA}</div>\n\n <fieldset class="tfr-fieldset-element tfr-fieldset tfr-mt-20">\n <legend tfr-element="true" class="tfr-label-element tfr-body-font tfr-14-default tfr-c-dark-o5">${cA}</legend>\n <input tfr-element="true" type="email" id="email-input" value="${t||""}" />\n </fieldset>\n\n <fieldset class="tfr-fieldset-element tfr-fieldset tfr-mt-20">\n <legend tfr-element="true" class="tfr-label-element tfr-body-font tfr-14-default tfr-c-dark-o5">${gA}</legend>\n <input tfr-element="true" type="password" id="password-input" />\n </fieldset>\n\n <div tfr-element="true" class="tfr-body-font tfr-12-default tfr-c-red tfr-mt-10 tfr-d-none" id="tfr-form-error"></div>\n\n <div class="tfr-mt-20">\n <span id="tfr-forgot-password" tfr-element="true" class="tfr-body-font tfr-14-default tfr-c-dark-o5 tfr-underline tfr-cursor tfr-mr-15">${fA}</span>\n <span id="tfr-scan-code" tfr-element="true" class="tfr-body-font tfr-14-default tfr-c-dark-o5 tfr-underline tfr-cursor">${dA}</span>\n </div>\n\n <button id="tfr-sign-in" tfr-element="true" class="tfr-standard-button tfr-bg-aquamarina-strong tfr-c-whitetfr-title-font tfr-medium-16-default tfr-cursor tfr-mt-30" id="sign-in-button">\n ${TA}\n </button>\n `}})({onSignIn:this.signIn,onNavForgotPassword:()=>this.toForgotPassword(),onNavScanCode:()=>this.toScan()}))}toForgotPassword(){this.manager.open((e=>{const t=()=>{const t=document.getElementById("tfr-email").value;e.onNavSignIn(t)},n=()=>{const t=document.getElementById("tfr-email").value;e.onPasswordReset(t)};return{Hook:()=>{document.getElementById("tfr-send-password-reset").addEventListener("click",n),document.getElementById("tfr-back-to-signin").addEventListener("click",t)},Unhook:()=>{document.getElementById("tfr-send-password-reset").removeEventListener("click",n),document.getElementById("tfr-back-to-signin").removeEventListener("click",t)},Body:()=>`\n <div tfr-element="true" class="tfr-title-font tfr-light-16-300 tfr-mt-20 tfr-w-70-p tfr-m-h-auto">${uA}</div>\n <fieldset class="tfr-fieldset-element tfr-fieldset tfr-mt-30">\n <legend tfr-element="true" class="tfr-label-element tfr-body-font tfr-14-default tfr-c-dark-o5">${cA}</legend>\n <input tfr-element="true" type="email" id="tfr-email" />\n </fieldset>\n <div tfr-element="true" class="tfr-body-font tfr-12-default tfr-c-red tfr-mt-10 tfr-d-none" id="error-msg"></div>\n <div id="tfr-back-to-signin" tfr-element="true" class="tfr-body-font tfr-12-default tfr-c-dark-o5 tfr-underline tfr-cursor tfr-mt-30">${oA}</div>\n <button id="tfr-send-password-reset" tfr-element="true" class="tfr-standard-button tfr-bg-aquamarina-strong tfr-c-whitetfr-title-font tfr-medium-16-default tfr-cursor tfr-mt-30">\n ${EA}\n </button>\n `}})({onNavSignIn:()=>this.toSignIn(),onPasswordReset:this.forgotPassword}))}toPasswordReset(){}onTryOn(e){this.manager.open(YA({frames:e,onClose:()=>this.close(),onNavBack:()=>this.navBack()}))}onError(e){this.manager.open((e=>{const{error:t}=e,n=()=>{e.onNavBack()},r=()=>{e.onClose()};return{Hook:()=>{document.getElementById("tfr-back").addEventListener("click",n),document.getElementById("tfr-close").addEventListener("click",r)},Unhook:()=>{document.getElementById("tfr-back").removeEventListener("click",n),document.getElementById("tfr-close").removeEventListener("click",r)},Body:()=>(t||console.error("ErrorModal: No error provided"),`\n <div class="tfr-mt-15-p tfr-mb-13-p">\n <div tfr-element="true" class="tfr-title-font tfr-light-22-300 tfr-c-dark">${t||SA}</div>\n </div>\n\n <div class="tfr-t-a-center">\n <span id="tfr-back" tfr-element="true" class="tfr-body-font tfr-16-default tfr-c-dark-o5 tfr-underline tfr-cursor tfr-mr-20">${vA}</span>\n <span id="tfr-close" tfr-element="true" class="tfr-body-font tfr-16-default tfr-c-dark-o5 tfr-underline tfr-cursor" id="returnToSite">${wA}</span>\n </div>\n `)}})({error:e,onClose:()=>this.close(),onNavBack:()=>this.navBack()}))}onSizeError(e,t){this.manager.open((e=>{const t=()=>{e.onNavBack()},n=()=>{e.onClose()};return{Hook:()=>{document.getElementById("tfr-back").addEventListener("click",t),document.getElementById("tfr-close").addEventListener("click",n)},Unhook:()=>{document.getElementById("tfr-back").removeEventListener("click",t),document.getElementById("tfr-close").removeEventListener("click",n)},Body:()=>{var t,n,r;return console.debug("rendering size error modal",e),`\n <div class="tfr-mt-15-p tfr-mb-13-p">\n <div tfr-element="true" class="tfr-title-font tfr-light-22-300 tfr-c-dark">\n\t\t\t\t\t\t\t${pA} ${DA} ${null===(t=e.sizes)||void 0===t?void 0:t.recommended} ${mA} ${null===(r=null===(n=e.sizes)||void 0===n?void 0:n.available)||void 0===r?void 0:r.join(" or ")}\n\t\t\t\t\t\t</div>\n </div>\n\n <div class="tfr-t-a-center">\n <span id="tfr-back" tfr-element="true" class="tfr-body-font tfr-16-default tfr-c-dark-o5 tfr-underline tfr-cursor tfr-mr-20">${vA}</span>\n <span id="tfr-close" tfr-element="true" class="tfr-body-font tfr-16-default tfr-c-dark-o5 tfr-underline tfr-cursor">${wA}</span>\n </div>\n `}}})({sizes:{recommended:e,available:t},onClose:()=>this.close(),onNavBack:()=>this.navBack()}))}navBack(){window.history.back()}}var XA;!function(e){e.NOT_CREATED="NOT_CREATED",e.CREATED="CREATED",e.PENDING="PENDING"}(XA||(XA={}));class ZA{constructor(e,t,n={}){this.shopId=e,this.hooks=n,this.nav=new JA(t,this.signIn.bind(this),this.forgotPassword.bind(this),this.submitTel.bind(this)),this.tfrShop=((e,t="dev")=>("dev"!==t&&"development"!==t||console.warn("TfrShop is in development mode"),tu.getInstance().setEnv(t),new rA(e,new eA)))(Number(this.shopId),"dev")}get sku(){return this.nav.sku}get shop(){return this.tfrShop}async onInit(){const e=await this.tfrShop.onInit();return e&&this.hooks.onLogin&&this.hooks.onLogin(),!e&&this.hooks.onLogout&&this.hooks.onLogout(),e}setSku(e){this.nav.setSku(e)}close(){this.nav.close()}async signOut(){await this.tfrShop.user.logout(),this.hooks.onLogout&&this.hooks.onLogout()}async signIn(e,t,n){if(0==e.length||0==t.length)return n(RA);if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/.test(e))return n(lA);if(!(e=>!!e.match(/^.{7,}$/))(t))return n($A);await this.tfrShop.user.login(e,t),this.hooks.onLogin&&this.hooks.onLogin();try{switch((await this.tfrShop.user.getUserProfile()).avatar_status){case XA.NOT_CREATED:this.nav.onNotCreated();break;case XA.PENDING:this.nav.onLoading();break;case XA.CREATED:console.debug("avatar_state: created"),this.tryOn();break;default:this.nav.onError(SA)}}catch(e){this.nav.onError(SA)}}async submitTel(e){try{await this.tfrShop.submitTelephoneNumber(e),this.nav.toSignIn()}catch(e){this.nav.onError(SA)}}async forgotPassword(e){await this.tfrShop.user.sendPasswordResetEmail(e),this.nav.toSignIn()}async passwordReset(e,t){await this.tfrShop.user.confirmPasswordReset(e,t),this.nav.toPasswordReset()}async tryOn(){try{this.hooks.onLoading&&this.hooks.onLoading(),this.nav.onLoading();const e=await this.tfrShop.tryOn(this.sku);this.nav.close(),this.hooks.onAvatarReady&&this.hooks.onAvatarReady(e)}catch(e){if(e instanceof Xf.RecommendedAvailableSizesError)return this.nav.onSizeError(e.recommended_size,e.available_sizes);if(e instanceof Xf.UserNotLoggedInError)return this.nav.toScan();console.error(e.message),this.nav.onError(SA)}finally{this.hooks.onLoadingComplete&&this.hooks.onLoadingComplete()}}}const eN=(e,t,n)=>new ZA(e,t,n);export{sA as VTO_TIMEOUT_MS,eN as initFittingRoom};