plevinjs 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -13
- package/dist/cli.d.ts +4 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +16 -0
- package/dist/cli.js.map +1 -0
- package/dist/compress.d.ts +5 -0
- package/dist/compress.d.ts.map +1 -0
- package/dist/compress.js +954 -0
- package/dist/compress.js.map +1 -0
- package/dist/countries.d.ts +1 -1
- package/dist/countries.d.ts.map +1 -1
- package/dist/countries.js +251 -250
- package/dist/countries.js.map +1 -1
- package/dist/derive.d.ts +1 -0
- package/dist/derive.d.ts.map +1 -1
- package/dist/derive.js +12 -6
- package/dist/derive.js.map +1 -1
- package/dist/estimate.d.ts +38 -0
- package/dist/estimate.d.ts.map +1 -0
- package/dist/estimate.js +263 -0
- package/dist/estimate.js.map +1 -0
- package/dist/extra.d.ts.map +1 -1
- package/dist/extra.js +12 -12
- package/dist/extra.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +51 -6
- package/dist/index.js.map +1 -1
- package/dist/leaves.d.ts +30 -0
- package/dist/leaves.d.ts.map +1 -0
- package/dist/leaves.js +183 -0
- package/dist/leaves.js.map +1 -0
- package/dist/lzma.d.ts +18 -0
- package/dist/lzma.d.ts.map +1 -1
- package/dist/lzma.js +18 -18
- package/dist/lzma.js.map +1 -1
- package/dist/matcher.d.ts +25 -0
- package/dist/matcher.d.ts.map +1 -0
- package/dist/matcher.js +198 -0
- package/dist/matcher.js.map +1 -0
- package/dist/models.d.ts +7 -0
- package/dist/models.d.ts.map +1 -1
- package/dist/plevin.min.js +258 -257
- package/dist/reader.d.ts.map +1 -1
- package/dist/reader.js +12 -1
- package/dist/reader.js.map +1 -1
- package/dist/selection.d.ts +34 -0
- package/dist/selection.d.ts.map +1 -0
- package/dist/selection.js +338 -0
- package/dist/selection.js.map +1 -0
- package/dist/slim.d.ts +21 -0
- package/dist/slim.d.ts.map +1 -0
- package/dist/slim.js +639 -0
- package/dist/slim.js.map +1 -0
- package/dist/slim.min.js +1 -0
- package/dist/stats.d.ts +61 -0
- package/dist/stats.d.ts.map +1 -0
- package/dist/stats.js +368 -0
- package/dist/stats.js.map +1 -0
- package/dist/writer.d.ts +32 -0
- package/dist/writer.d.ts.map +1 -0
- package/dist/writer.js +325 -0
- package/dist/writer.js.map +1 -0
- package/package.json +7 -2
package/dist/plevin.min.js
CHANGED
|
@@ -1,258 +1,259 @@
|
|
|
1
|
-
var
|
|
2
|
-
`);return[
|
|
3
|
-
${e}`),
|
|
4
|
-
${e}`),
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
1
|
+
var X="ipv4-mapped",Q="6to4",q="teredo",sn="nat64";var ln=(1n<<128n)-1n,cn=[["0.0.0.0/8",8],["10.0.0.0/8",1],["100.64.0.0/10",129],["127.0.0.0/8",3],["169.254.0.0/16",17],["172.16.0.0/12",1],["192.0.0.0/24",8],["192.0.2.0/24",72],["192.88.99.0/24",8],["192.168.0.0/16",1],["198.18.0.0/15",264],["198.51.100.0/24",72],["203.0.113.0/24",72],["224.0.0.0/4",4],["240.0.0.0/4",8]],un=[["::/128",8],["::1/128",3],["::ffff:0:0/96",8],["64:ff9b::/96",8],["64:ff9b:1::/48",8],["100::/64",8],["2001::/23",8],["2001:db8::/32",72],["2002::/16",8],["3fff::/20",72],["fc00::/7",33],["fe80::/10",17],["ff00::/8",4]],dn=/^(0|[1-9][0-9]{0,2})$/,pn=/^[0-9a-fA-F]{1,4}$/,ge=t=>{let e=t.split(".");if(e.length!==4)return null;let n=0;for(let r of e){if(!dn.test(r))return null;let a=Number(r);if(a>255)return null;n=n*256+a}return n},Se=(t,e)=>{if(t==="")return[];let n=t.split(":"),r=[];for(let a=0;a<n.length;a+=1){let i=n[a];if(a===n.length-1&&i.includes(".")){let o=ge(i);if(o===null)return null;r.push(o>>>16,o&65535);continue}if(!pn.test(i))return null;r.push(Number.parseInt(i,16))}return r.length<=e?r:null},fn=t=>{let e=t.split("::");if(e.length>2)return null;let n=Se(e[0],8),r=e.length===2?Se(e[1],8):[];if(n===null||r===null)return null;let a=n.length+r.length;if(e.length===1?a!==8:a>7)return null;let i=[...n,...Array(8-a).fill(0),...r],o=0n;for(let s of i)o=o<<16n|BigInt(s);return o},g=t=>{if(typeof t=="string"){if(t.includes(":")){let r=fn(t);if(r===null)throw new Error(`${t} is not an address`);return[r,!0]}let n=ge(t);if(n===null)throw new Error(`${t} is not an address`);return[n,!1]}if(t instanceof Uint8Array){if(t.length===4)return[(t[0]<<24>>>0)+(t[1]<<16)+(t[2]<<8)+t[3],!1];if(t.length!==16)throw new Error("packed addresses are 4 or 16 bytes");let n=0n;for(let r of t)n=n<<8n|BigInt(r);return[n,!0]}if(typeof t!="bigint"&&!Number.isInteger(t))throw new Error(`${String(t)} is not an address`);let e=typeof t=="bigint"?t:BigInt(t);if(e<0n||e>ln)throw new Error(`${t} is not an address`);return e>BigInt(4294967295)?[e,!0]:[Number(e),!1]},mn=t=>Array.from({length:8},(e,n)=>Number(t>>BigInt(112-n*16)&0xffffn)),M=t=>[24,16,8,0].map(e=>t>>>e&255).join("."),hn=(t,e)=>{let n=-1,r=1,a=-1;for(let s=0;s<=e.length;s+=1)e[s]===0&&a<0&&(a=s),(e[s]!==0||s===e.length)&&a>=0&&(s-a>r&&([n,r]=[a,s-a]),a=-1);if(n<0)return t.join(":");let i=t.slice(0,n).join(":"),o=t.slice(n+r).join(":");return`${i}::${o}`},I=(t,e)=>{if(!e){let u=M(t),d=u.split(".");return[u,u,`${[...d].reverse().join(".")}.in-addr.arpa`]}let n=mn(t),a=`${[...t.toString(16).padStart(32,"0")].reverse().join(".")}.ip6.arpa`,i=n.slice(0,5).every(u=>u===0)&&n[5]===65535,o=i?n.slice(0,6):n,s=i?`:${M(Number(t&0xffffffffn))}`:"",l=o.map(u=>u.toString(16)),c=o.map(u=>u.toString(16).padStart(4,"0"));return[hn(l,o)+s,c.join(":")+s,a]},S=(t,e)=>I(t,e)[0],Ae=(t,e)=>t.map(([n,r])=>{let[a,i]=n.split("/"),o=BigInt(g(a)[0]),s=BigInt((e?128:32)-Number(i));return[o,o+((1n<<s)-1n),r]}).sort((n,r)=>n[0]<r[0]?-1:1),Tn=[Ae(cn,!1),Ae(un,!0)],Ee=(t,e)=>{let n=Tn[e?1:0],r=BigInt(t),a=0,i=n.length;for(;a<i;){let s=a+i>>1;n[s][0]<=r?a=s+1:i=s}let o=n[a-1];return o&&r<=o[1]?o[2]:e&&r>>125n!==1n?8:0},N=(t,e)=>{if(!e)return[null,null];let n=t,r=Number(n&0xffffffffn);return n>>32n===0xffffn?[X,M(r)]:n>>112n===0x2002n?[Q,M(Number(n>>80n&0xffffffffn))]:n>>96n===0x20010000n?[q,M(~r>>>0)]:n>>32n===0x0064ff9bn<<64n?[sn,M(r)]:[null,null]},Re=(t,e)=>{if(!e||N(t,e)[0]!==null)return null;let n=t,r=[48n,32n,16n,0n].map(i=>Number(n>>i&0xffffn).toString(16));return r.every(i=>/^[0-9]+$/.test(i)&&Number(i)>0&&Number(i)<256)?r.join("."):null},Ce=(t,e)=>{if(e)return[null,null,null];let n=BigInt(t);return[S(0xffff00000000n|n,!0),S(0x2002n<<112n|n<<80n,!0),S(0x0064ff9bn<<96n|n,!0)]},ee=(t,e,n)=>{let r=BigInt((e?128:32)-n),a=BigInt(t),i=a>>r<<r,o=a|(1n<<r)-1n,s=S(e?i:Number(i),e);return[`${s}/${n}`,s,S(e?o:Number(o),e)]};var ne=t=>new Set(t.split(" ")),bn=ne("inc incorporated llc ltd ltda limited gmbh mbh ag kgaa ohg ev eg sa sab saa sau sal saog sac sas sarl srl spa nv bv cv asa aps oyj kft zrt nyrt doo sro ooo zao pao pjsc jsc ojsc llp plc pte pteltd pty corp corporation company holding holdings group uab sia tov oao pt sdn bhd coltd coltda eireli ead ood eood sti ltdsti spzoo anonim sirketi tbk"),Sn=ne("de me epp co as ab ad dd bt lc lp se sl slu sp z oo zoo oy ao esp kg network networks net telecom telecoms telecommunication telecommunications telecomunicaciones comunicaciones communication communications hosting solutions services service technologies technology tech systems system data datacenter datacentre cloud internet online isp international global enterprises enterprise backbone provider providers of and"),An=ne("the llc ltd gmbh sarl ooo zao pao ao oao jsc ojsc pjsc uab sia tov pt pp ps ip spolka"),gn=new Set([...bn,""]),En=[".com",".net",".org",".io"],Rn=/^.*\b(?:trading as|d\/b\/a|dba)\b\s*/i,Cn=/\(.*?\)|,.*|\s+-\s+.*/g,ye=/[^0-9a-z]/g,yn=/^AS\d+$/i,Dn=/-(AS|AP|US|UK|DE|FR|IN|CN|JP|EU|NET|COM|ORG)$/,Mn=/(NET|COM|TEL|WEB|LINE)$/,In=/[/?#]/,Nn=/^["']+|["']+$/g,De=new Set(["hosting","cdn","content"]),Un=new Set(["residential","cellular"]),Me=new Set(["public_proxy","residential_proxy"]),Ie="search_engine_spider",wn={"national capital":"country","regional capital":"region","district capital":"district"},Pn=8192,Ne=t=>{let e=new Map;return n=>{let r=e.get(n);if(r!==void 0)return r;e.size>=Pn&&e.clear();let a=t(n);return e.set(n,a),a}},Bn=/^\p{L}+$/u,Ue=t=>{let e=t.indexOf(`
|
|
2
|
+
`);return[t.slice(0,e),t.slice(e+1)]},vn=t=>t.length>4&&Bn.test(t)&&t===t.toUpperCase()&&t!==t.toLowerCase(),Ln=t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase(),we=t=>t.split(" ").map(e=>vn(e)?Ln(e):e).join(" "),kn=t=>{let e=(t[t.length-1]??"").toLowerCase().replace(ye,"");return t.length>1&&gn.has(e)||t.length>2&&Sn.has(e)},Gn=t=>{let n=t.replace(Rn,"").replace(Cn,"").split(/\s+/).map(i=>i.replace(Nn,"")).filter(Boolean);for(;kn(n);)n.pop();for(;n.length&&An.has(n[0].toLowerCase().replace(ye,""));)n.shift();let r=n.join(" "),a=En.find(i=>r.toLowerCase().endsWith(i));return we(a?r.slice(0,r.length-a.length):r)},_n=t=>{let e=t.split(/\s+/).filter(Boolean),r=(e.length===1?e[0]:"").replace(Dn,"");return yn.test(r)?"":(r.length>4&&r===r.toUpperCase()&&(r=r.replace(Mn,"")),we(r))},Kn=Ne(t=>{let[e,n]=Ue(t),r=Gn(n),a=_n(e);return n.toLowerCase()===e.toLowerCase()?a||r:!r||!a?r||a:r.toLowerCase()===a.toLowerCase()?a===a.toUpperCase()?r:a:r.toLowerCase().startsWith(`${a.toLowerCase()} `)?a:r}),Pe=(t,e)=>Kn(`${t}
|
|
3
|
+
${e}`),xn=Ne(t=>{let[e,n]=Ue(t),a=((e.split("//").pop()??"").split(In)[0].split("@").pop()??"").split(":")[0],i=(n.split("@")[1]??"").toLowerCase(),o=(a||i).toLowerCase().replace(/^www\./,""),s=o.split(".").pop()??"";return s.length>2&&i.split(".")[0]===s&&o!==i?i:o}),Be=(t,e)=>xn(`${t}
|
|
4
|
+
${e}`),ve=(t,e)=>t==="public_proxy"&&Un.has(e)?["residential_proxy","inferred"]:[t,""],Le=t=>wn[t]??"";var ke=`
|
|
5
|
+
AD|AND|020|Andorra|Principality of Andorra||EUR|Euro|+376|ca
|
|
6
|
+
AE|ARE|784|United Arab Emirates|||AED|United Arab Emirates Dirham|+971|ar
|
|
7
|
+
AF|AFG|004|Afghanistan|Islamic Republic of Afghanistan||AFN|Afghan Afghani|+93|fa,ps
|
|
8
|
+
AG|ATG|028|Antigua and Barbuda|||XCD|East Caribbean Dollar|+1|en
|
|
9
|
+
AI|AIA|660|Anguilla|||XCD|East Caribbean Dollar|+1|en
|
|
10
|
+
AL|ALB|008|Albania|Republic of Albania||ALL|Albanian Lek|+355|sq
|
|
11
|
+
AM|ARM|051|Armenia|Republic of Armenia||AMD|Armenian Dram|+374|hy
|
|
12
|
+
AO|AGO|024|Angola|Republic of Angola||AOA|Angolan Kwanza|+244|pt
|
|
13
|
+
AQ|ATA|010|Antarctica||||||
|
|
14
|
+
AR|ARG|032|Argentina|Argentine Republic||ARS|Argentine Peso|+54|es
|
|
15
|
+
AS|ASM|016|American Samoa|||USD|US Dollar|+1|sm,en
|
|
16
|
+
AT|AUT|040|Austria|Republic of Austria||EUR|Euro|+43|de
|
|
17
|
+
AU|AUS|036|Australia|||AUD|Australian Dollar|+61|en
|
|
18
|
+
AW|ABW|533|Aruba|||AWG|Aruban Florin|+297|nl,pap
|
|
19
|
+
AX|ALA|248|\xC5land Islands|||EUR|Euro|+358|sv
|
|
20
|
+
AZ|AZE|031|Azerbaijan|Republic of Azerbaijan||AZN|Azerbaijani Manat|+994|az,az_Cyrl
|
|
21
|
+
BA|BIH|070|Bosnia and Herzegovina|Republic of Bosnia and Herzegovina||BAM|Bosnia-Herzegovina Convertible Mark|+387|bs_Cyrl,bs,hr,sr_Latn,sr
|
|
22
|
+
BB|BRB|052|Barbados|||BBD|Barbadian Dollar|+1|en
|
|
23
|
+
BD|BGD|050|Bangladesh|People's Republic of Bangladesh||BDT|Bangladeshi Taka|+880|bn
|
|
24
|
+
BE|BEL|056|Belgium|Kingdom of Belgium||EUR|Euro|+32|nl,fr,de
|
|
25
|
+
BF|BFA|854|Burkina Faso|||XOF|West African CFA Franc|+226|fr
|
|
26
|
+
BG|BGR|100|Bulgaria|Republic of Bulgaria||BGN|Bulgarian Lev|+359|bg
|
|
27
|
+
BH|BHR|048|Bahrain|Kingdom of Bahrain||BHD|Bahraini Dinar|+973|ar
|
|
28
|
+
BI|BDI|108|Burundi|Republic of Burundi||BIF|Burundian Franc|+257|rn,fr,en
|
|
29
|
+
BJ|BEN|204|Benin|Republic of Benin||XOF|West African CFA Franc|+229|fr
|
|
30
|
+
BL|BLM|652|Saint Barth\xE9lemy|||EUR|Euro|+590|fr
|
|
31
|
+
BM|BMU|060|Bermuda|||BMD|Bermudan Dollar|+1|en
|
|
32
|
+
BN|BRN|096|Brunei Darussalam|||BND|Brunei Dollar|+673|ms,ms_Arab
|
|
33
|
+
BO|BOL|068|Bolivia, Plurinational State of|Plurinational State of Bolivia|Bolivia|BOB|Bolivian Boliviano|+591|es,qu,ay
|
|
34
|
+
BQ|BES|535|Bonaire, Sint Eustatius and Saba|Bonaire, Sint Eustatius and Saba||USD|US Dollar|+599|nl
|
|
35
|
+
BR|BRA|076|Brazil|Federative Republic of Brazil||BRL|Brazilian Real|+55|pt
|
|
36
|
+
BS|BHS|044|Bahamas|Commonwealth of the Bahamas||BSD|Bahamian Dollar|+1|en
|
|
37
|
+
BT|BTN|064|Bhutan|Kingdom of Bhutan||INR|Indian Rupee|+975|dz
|
|
38
|
+
BV|BVT|074|Bouvet Island|||NOK|Norwegian Krone||
|
|
39
|
+
BW|BWA|072|Botswana|Republic of Botswana||BWP|Botswanan Pula|+267|en,tn
|
|
40
|
+
BY|BLR|112|Belarus|Republic of Belarus||BYN|Belarusian Ruble|+375|be,ru
|
|
41
|
+
BZ|BLZ|084|Belize|||BZD|Belize Dollar|+501|en
|
|
42
|
+
CA|CAN|124|Canada|||CAD|Canadian Dollar|+1|en,fr
|
|
43
|
+
CC|CCK|166|Cocos (Keeling) Islands|||AUD|Australian Dollar|+61|en
|
|
44
|
+
CD|COD|180|Congo, The Democratic Republic of the|||CDF|Congolese Franc|+243|fr
|
|
45
|
+
CF|CAF|140|Central African Republic|||XAF|Central African CFA Franc|+236|sg,fr
|
|
46
|
+
CG|COG|178|Congo|Republic of the Congo||XAF|Central African CFA Franc|+242|fr
|
|
47
|
+
CH|CHE|756|Switzerland|Swiss Confederation||CHF|Swiss Franc|+41|de,gsw,fr,it
|
|
48
|
+
CI|CIV|384|C\xF4te d'Ivoire|Republic of C\xF4te d'Ivoire||XOF|West African CFA Franc|+225|fr
|
|
49
|
+
CK|COK|184|Cook Islands|||NZD|New Zealand Dollar|+682|en
|
|
50
|
+
CL|CHL|152|Chile|Republic of Chile||CLP|Chilean Peso|+56|es
|
|
51
|
+
CM|CMR|120|Cameroon|Republic of Cameroon||XAF|Central African CFA Franc|+237|fr,en
|
|
52
|
+
CN|CHN|156|China|People's Republic of China||CNY|Chinese Yuan|+86|zh
|
|
53
|
+
CO|COL|170|Colombia|Republic of Colombia||COP|Colombian Peso|+57|es
|
|
54
|
+
CR|CRI|188|Costa Rica|Republic of Costa Rica||CRC|Costa Rican Col\xF3n|+506|es
|
|
55
|
+
CU|CUB|192|Cuba|Republic of Cuba||CUP|Cuban Peso|+53|es
|
|
56
|
+
CV|CPV|132|Cabo Verde|Republic of Cabo Verde||CVE|Cape Verdean Escudo|+238|pt
|
|
57
|
+
CW|CUW|531|Cura\xE7ao|Cura\xE7ao||XCG|Caribbean guilder|+599|pap,nl
|
|
58
|
+
CX|CXR|162|Christmas Island|||AUD|Australian Dollar|+61|en
|
|
59
|
+
CY|CYP|196|Cyprus|Republic of Cyprus||EUR|Euro|+357|el,tr
|
|
60
|
+
CZ|CZE|203|Czechia|Czech Republic||CZK|Czech Koruna|+420|cs
|
|
61
|
+
DE|DEU|276|Germany|Federal Republic of Germany||EUR|Euro|+49|de
|
|
62
|
+
DJ|DJI|262|Djibouti|Republic of Djibouti||DJF|Djiboutian Franc|+253|fr,ar
|
|
63
|
+
DK|DNK|208|Denmark|Kingdom of Denmark||DKK|Danish Krone|+45|da
|
|
64
|
+
DM|DMA|212|Dominica|Commonwealth of Dominica||XCD|East Caribbean Dollar|+1|en
|
|
65
|
+
DO|DOM|214|Dominican Republic|||DOP|Dominican Peso|+1|es
|
|
66
|
+
DZ|DZA|012|Algeria|People's Democratic Republic of Algeria||DZD|Algerian Dinar|+213|ar,fr
|
|
67
|
+
EC|ECU|218|Ecuador|Republic of Ecuador||USD|US Dollar|+593|es,qu
|
|
68
|
+
EE|EST|233|Estonia|Republic of Estonia||EUR|Euro|+372|et
|
|
69
|
+
EG|EGY|818|Egypt|Arab Republic of Egypt||EGP|Egyptian Pound|+20|ar
|
|
70
|
+
EH|ESH|732|Western Sahara|||MAD|Moroccan Dirham|+212|ar
|
|
71
|
+
ER|ERI|232|Eritrea|the State of Eritrea||ERN|Eritrean Nakfa|+291|ti,en,ar
|
|
72
|
+
ES|ESP|724|Spain|Kingdom of Spain||EUR|Euro|+34|es
|
|
73
|
+
ET|ETH|231|Ethiopia|Federal Democratic Republic of Ethiopia||ETB|Ethiopian Birr|+251|am
|
|
74
|
+
FI|FIN|246|Finland|Republic of Finland||EUR|Euro|+358|fi,sv
|
|
75
|
+
FJ|FJI|242|Fiji|Republic of Fiji||FJD|Fijian Dollar|+679|en,hif,fj
|
|
76
|
+
FK|FLK|238|Falkland Islands (Malvinas)|||FKP|Falkland Islands Pound|+500|en
|
|
77
|
+
FM|FSM|583|Micronesia, Federated States of|Federated States of Micronesia||USD|US Dollar|+691|en
|
|
78
|
+
FO|FRO|234|Faroe Islands|||DKK|Danish Krone|+298|fo
|
|
79
|
+
FR|FRA|250|France|French Republic||EUR|Euro|+33|fr
|
|
80
|
+
GA|GAB|266|Gabon|Gabonese Republic||XAF|Central African CFA Franc|+241|fr
|
|
81
|
+
GB|GBR|826|United Kingdom|United Kingdom of Great Britain and Northern Ireland||GBP|British Pound|+44|en
|
|
82
|
+
GD|GRD|308|Grenada|||XCD|East Caribbean Dollar|+1|en
|
|
83
|
+
GE|GEO|268|Georgia|||GEL|Georgian Lari|+995|ka
|
|
84
|
+
GF|GUF|254|French Guiana|||EUR|Euro|+594|fr
|
|
85
|
+
GG|GGY|831|Guernsey|||GBP|British Pound|+44|en
|
|
86
|
+
GH|GHA|288|Ghana|Republic of Ghana||GHS|Ghanaian Cedi|+233|en
|
|
87
|
+
GI|GIB|292|Gibraltar|||GIP|Gibraltar Pound|+350|en
|
|
88
|
+
GL|GRL|304|Greenland|||DKK|Danish Krone|+299|kl
|
|
89
|
+
GM|GMB|270|Gambia|Republic of the Gambia||GMD|Gambian Dalasi|+220|en
|
|
90
|
+
GN|GIN|324|Guinea|Republic of Guinea||GNF|Guinean Franc|+224|fr
|
|
91
|
+
GP|GLP|312|Guadeloupe|||EUR|Euro|+590|fr
|
|
92
|
+
GQ|GNQ|226|Equatorial Guinea|Republic of Equatorial Guinea||XAF|Central African CFA Franc|+240|es,fr,pt
|
|
93
|
+
GR|GRC|300|Greece|Hellenic Republic||EUR|Euro|+30|el
|
|
94
|
+
GS|SGS|239|South Georgia and the South Sandwich Islands|||GBP|British Pound||en
|
|
95
|
+
GT|GTM|320|Guatemala|Republic of Guatemala||GTQ|Guatemalan Quetzal|+502|es
|
|
96
|
+
GU|GUM|316|Guam|||USD|US Dollar|+1|en,ch
|
|
97
|
+
GW|GNB|624|Guinea-Bissau|Republic of Guinea-Bissau||XOF|West African CFA Franc|+245|pt
|
|
98
|
+
GY|GUY|328|Guyana|Republic of Guyana||GYD|Guyanaese Dollar|+592|en
|
|
99
|
+
HK|HKG|344|Hong Kong|Hong Kong Special Administrative Region of China||HKD|Hong Kong Dollar|+852|zh_Hant,en
|
|
100
|
+
HM|HMD|334|Heard Island and McDonald Islands|||AUD|Australian Dollar||
|
|
101
|
+
HN|HND|340|Honduras|Republic of Honduras||HNL|Honduran Lempira|+504|es
|
|
102
|
+
HR|HRV|191|Croatia|Republic of Croatia||EUR|Euro|+385|hr
|
|
103
|
+
HT|HTI|332|Haiti|Republic of Haiti||HTG|Haitian Gourde|+509|ht,fr
|
|
104
|
+
HU|HUN|348|Hungary|Hungary||HUF|Hungarian Forint|+36|hu
|
|
105
|
+
ID|IDN|360|Indonesia|Republic of Indonesia||IDR|Indonesian Rupiah|+62|id
|
|
106
|
+
IE|IRL|372|Ireland|||EUR|Euro|+353|en,ga
|
|
107
|
+
IL|ISR|376|Israel|State of Israel||ILS|Israeli New Shekel|+972|he,ar
|
|
108
|
+
IM|IMN|833|Isle of Man|||GBP|British Pound|+44|en,gv
|
|
109
|
+
IN|IND|356|India|Republic of India||INR|Indian Rupee|+91|hi,en
|
|
110
|
+
IO|IOT|086|British Indian Ocean Territory|||USD|US Dollar|+246|en
|
|
111
|
+
IQ|IRQ|368|Iraq|Republic of Iraq||IQD|Iraqi Dinar|+964|ar
|
|
112
|
+
IR|IRN|364|Iran, Islamic Republic of|Islamic Republic of Iran|Iran|IRR|Iranian Rial|+98|fa
|
|
113
|
+
IS|ISL|352|Iceland|Republic of Iceland||ISK|Icelandic Kr\xF3na|+354|is
|
|
114
|
+
IT|ITA|380|Italy|Italian Republic||EUR|Euro|+39|it
|
|
115
|
+
JE|JEY|832|Jersey|||GBP|British Pound|+44|en
|
|
116
|
+
JM|JAM|388|Jamaica|||JMD|Jamaican Dollar|+1|en
|
|
117
|
+
JO|JOR|400|Jordan|Hashemite Kingdom of Jordan||JOD|Jordanian Dinar|+962|ar
|
|
118
|
+
JP|JPN|392|Japan|||JPY|Japanese Yen|+81|ja
|
|
119
|
+
KE|KEN|404|Kenya|Republic of Kenya||KES|Kenyan Shilling|+254|sw,en
|
|
120
|
+
KG|KGZ|417|Kyrgyzstan|Kyrgyz Republic||KGS|Kyrgystani Som|+996|ky,ru
|
|
121
|
+
KH|KHM|116|Cambodia|Kingdom of Cambodia||KHR|Cambodian Riel|+855|km
|
|
122
|
+
KI|KIR|296|Kiribati|Republic of Kiribati||AUD|Australian Dollar|+686|en,gil
|
|
123
|
+
KM|COM|174|Comoros|Union of the Comoros||KMF|Comorian Franc|+269|ar,zdj,wni,fr
|
|
124
|
+
KN|KNA|659|Saint Kitts and Nevis|||XCD|East Caribbean Dollar|+1|en
|
|
125
|
+
KP|PRK|408|Korea, Democratic People's Republic of|Democratic People's Republic of Korea|North Korea|KPW|North Korean Won|+850|ko
|
|
126
|
+
KR|KOR|410|Korea, Republic of||South Korea|KRW|South Korean Won|+82|ko
|
|
127
|
+
KW|KWT|414|Kuwait|State of Kuwait||KWD|Kuwaiti Dinar|+965|ar
|
|
128
|
+
KY|CYM|136|Cayman Islands|||KYD|Cayman Islands Dollar|+1|en
|
|
129
|
+
KZ|KAZ|398|Kazakhstan|Republic of Kazakhstan||KZT|Kazakhstani Tenge|+7|ru,kk
|
|
130
|
+
LA|LAO|418|Lao People's Democratic Republic||Laos|LAK|Laotian Kip|+856|lo
|
|
131
|
+
LB|LBN|422|Lebanon|Lebanese Republic||LBP|Lebanese Pound|+961|ar
|
|
132
|
+
LC|LCA|662|Saint Lucia|||XCD|East Caribbean Dollar|+1|en
|
|
133
|
+
LI|LIE|438|Liechtenstein|Principality of Liechtenstein||CHF|Swiss Franc|+423|de,gsw
|
|
134
|
+
LK|LKA|144|Sri Lanka|Democratic Socialist Republic of Sri Lanka||LKR|Sri Lankan Rupee|+94|si,ta
|
|
135
|
+
LR|LBR|430|Liberia|Republic of Liberia||LRD|Liberian Dollar|+231|en
|
|
136
|
+
LS|LSO|426|Lesotho|Kingdom of Lesotho||ZAR|South African Rand|+266|st,en
|
|
137
|
+
LT|LTU|440|Lithuania|Republic of Lithuania||EUR|Euro|+370|lt
|
|
138
|
+
LU|LUX|442|Luxembourg|Grand Duchy of Luxembourg||EUR|Euro|+352|fr,lb,de
|
|
139
|
+
LV|LVA|428|Latvia|Republic of Latvia||EUR|Euro|+371|lv
|
|
140
|
+
LY|LBY|434|Libya|Libya||LYD|Libyan Dinar|+218|ar
|
|
141
|
+
MA|MAR|504|Morocco|Kingdom of Morocco||MAD|Moroccan Dirham|+212|ar,fr,tzm
|
|
142
|
+
MC|MCO|492|Monaco|Principality of Monaco||EUR|Euro|+377|fr
|
|
143
|
+
MD|MDA|498|Moldova, Republic of|Republic of Moldova|Moldova|MDL|Moldovan Leu|+373|ro
|
|
144
|
+
ME|MNE|499|Montenegro|Montenegro||EUR|Euro|+382|sr_Latn
|
|
145
|
+
MF|MAF|663|Saint Martin (French part)|||EUR|Euro|+590|fr
|
|
146
|
+
MG|MDG|450|Madagascar|Republic of Madagascar||MGA|Malagasy Ariary|+261|mg,fr,en
|
|
147
|
+
MH|MHL|584|Marshall Islands|Republic of the Marshall Islands||USD|US Dollar|+692|en,mh
|
|
148
|
+
MK|MKD|807|North Macedonia|Republic of North Macedonia||MKD|Macedonian Denar|+389|mk
|
|
149
|
+
ML|MLI|466|Mali|Republic of Mali||XOF|West African CFA Franc|+223|fr
|
|
150
|
+
MM|MMR|104|Myanmar|Republic of Myanmar||MMK|Myanmar Kyat|+95|my
|
|
151
|
+
MN|MNG|496|Mongolia|||MNT|Mongolian Tugrik|+976|mn
|
|
152
|
+
MO|MAC|446|Macao|Macao Special Administrative Region of China||MOP|Macanese Pataca|+853|zh_Hant,yue,pt
|
|
153
|
+
MP|MNP|580|Northern Mariana Islands|Commonwealth of the Northern Mariana Islands||USD|US Dollar|+1|en
|
|
154
|
+
MQ|MTQ|474|Martinique|||EUR|Euro|+596|fr
|
|
155
|
+
MR|MRT|478|Mauritania|Islamic Republic of Mauritania||MRU|Mauritanian Ouguiya|+222|ar
|
|
156
|
+
MS|MSR|500|Montserrat|||XCD|East Caribbean Dollar|+1|en
|
|
157
|
+
MT|MLT|470|Malta|Republic of Malta||EUR|Euro|+356|mt,en
|
|
158
|
+
MU|MUS|480|Mauritius|Republic of Mauritius||MUR|Mauritian Rupee|+230|fr,en
|
|
159
|
+
MV|MDV|462|Maldives|Republic of Maldives||MVR|Maldivian Rufiyaa|+960|dv
|
|
160
|
+
MW|MWI|454|Malawi|Republic of Malawi||MWK|Malawian Kwacha|+265|ny,en
|
|
161
|
+
MX|MEX|484|Mexico|United Mexican States||MXN|Mexican Peso|+52|es
|
|
162
|
+
MY|MYS|458|Malaysia|||MYR|Malaysian Ringgit|+60|ms
|
|
163
|
+
MZ|MOZ|508|Mozambique|Republic of Mozambique||MZN|Mozambican Metical|+258|pt
|
|
164
|
+
NA|NAM|516|Namibia|Republic of Namibia||ZAR|South African Rand|+264|en
|
|
165
|
+
NC|NCL|540|New Caledonia|||XPF|CFP Franc|+687|fr
|
|
166
|
+
NE|NER|562|Niger|Republic of the Niger||XOF|West African CFA Franc|+227|fr
|
|
167
|
+
NF|NFK|574|Norfolk Island|||AUD|Australian Dollar|+672|en
|
|
168
|
+
NG|NGA|566|Nigeria|Federal Republic of Nigeria||NGN|Nigerian Naira|+234|en,yo
|
|
169
|
+
NI|NIC|558|Nicaragua|Republic of Nicaragua||NIO|Nicaraguan C\xF3rdoba|+505|es
|
|
170
|
+
NL|NLD|528|Netherlands|Kingdom of the Netherlands||EUR|Euro|+31|nl
|
|
171
|
+
NO|NOR|578|Norway|Kingdom of Norway||NOK|Norwegian Krone|+47|no,nb,nn
|
|
172
|
+
NP|NPL|524|Nepal|Federal Democratic Republic of Nepal||NPR|Nepalese Rupee|+977|ne
|
|
173
|
+
NR|NRU|520|Nauru|Republic of Nauru||AUD|Australian Dollar|+674|en,na
|
|
174
|
+
NU|NIU|570|Niue|Niue||NZD|New Zealand Dollar|+683|niu,en
|
|
175
|
+
NZ|NZL|554|New Zealand|||NZD|New Zealand Dollar|+64|en,mi
|
|
176
|
+
OM|OMN|512|Oman|Sultanate of Oman||OMR|Omani Rial|+968|ar
|
|
177
|
+
PA|PAN|591|Panama|Republic of Panama||PAB|Panamanian Balboa|+507|es
|
|
178
|
+
PE|PER|604|Peru|Republic of Peru||PEN|Peruvian Sol|+51|es,qu
|
|
179
|
+
PF|PYF|258|French Polynesia|||XPF|CFP Franc|+689|fr,ty
|
|
180
|
+
PG|PNG|598|Papua New Guinea|Independent State of Papua New Guinea||PGK|Papua New Guinean Kina|+675|tpi,en,ho
|
|
181
|
+
PH|PHL|608|Philippines|Republic of the Philippines||PHP|Philippine Peso|+63|en,fil
|
|
182
|
+
PK|PAK|586|Pakistan|Islamic Republic of Pakistan||PKR|Pakistani Rupee|+92|ur,en
|
|
183
|
+
PL|POL|616|Poland|Republic of Poland||PLN|Polish Zloty|+48|pl
|
|
184
|
+
PM|SPM|666|Saint Pierre and Miquelon|||EUR|Euro|+508|fr
|
|
185
|
+
PN|PCN|612|Pitcairn|||NZD|New Zealand Dollar||en
|
|
186
|
+
PR|PRI|630|Puerto Rico|||USD|US Dollar|+1|es,en
|
|
187
|
+
PS|PSE|275|Palestine, State of|the State of Palestine||ILS|Israeli New Shekel|+970|ar
|
|
188
|
+
PT|PRT|620|Portugal|Portuguese Republic||EUR|Euro|+351|pt
|
|
189
|
+
PW|PLW|585|Palau|Republic of Palau||USD|US Dollar|+680|pau,en
|
|
190
|
+
PY|PRY|600|Paraguay|Republic of Paraguay||PYG|Paraguayan Guarani|+595|gn,es
|
|
191
|
+
QA|QAT|634|Qatar|State of Qatar||QAR|Qatari Riyal|+974|ar
|
|
192
|
+
RE|REU|638|R\xE9union|||EUR|Euro|+262|fr
|
|
193
|
+
RO|ROU|642|Romania|||RON|Romanian Leu|+40|ro
|
|
194
|
+
RS|SRB|688|Serbia|Republic of Serbia||RSD|Serbian Dinar|+381|sr_Latn,sr
|
|
195
|
+
RU|RUS|643|Russian Federation|||RUB|Russian Ruble|+7|ru
|
|
196
|
+
RW|RWA|646|Rwanda|Rwandese Republic||RWF|Rwandan Franc|+250|rw,en,fr
|
|
197
|
+
SA|SAU|682|Saudi Arabia|Kingdom of Saudi Arabia||SAR|Saudi Riyal|+966|ar
|
|
198
|
+
SB|SLB|090|Solomon Islands|||SBD|Solomon Islands Dollar|+677|en
|
|
199
|
+
SC|SYC|690|Seychelles|Republic of Seychelles||SCR|Seychellois Rupee|+248|fr,en
|
|
200
|
+
SD|SDN|729|Sudan|Republic of the Sudan||SDG|Sudanese Pound|+249|en,ar
|
|
201
|
+
SE|SWE|752|Sweden|Kingdom of Sweden||SEK|Swedish Krona|+46|sv
|
|
202
|
+
SG|SGP|702|Singapore|Republic of Singapore||SGD|Singapore Dollar|+65|en,zh,ms,ta
|
|
203
|
+
SH|SHN|654|Saint Helena, Ascension and Tristan da Cunha|||SHP|St. Helena Pound|+290|en
|
|
204
|
+
SI|SVN|705|Slovenia|Republic of Slovenia||EUR|Euro|+386|sl
|
|
205
|
+
SJ|SJM|744|Svalbard and Jan Mayen|||NOK|Norwegian Krone|+47|nb
|
|
206
|
+
SK|SVK|703|Slovakia|Slovak Republic||EUR|Euro|+421|sk
|
|
207
|
+
SL|SLE|694|Sierra Leone|Republic of Sierra Leone||SLE|Sierra Leonean Leone|+232|en
|
|
208
|
+
SM|SMR|674|San Marino|Republic of San Marino||EUR|Euro|+378|it
|
|
209
|
+
SN|SEN|686|Senegal|Republic of Senegal||XOF|West African CFA Franc|+221|wo,fr
|
|
210
|
+
SO|SOM|706|Somalia|Federal Republic of Somalia||SOS|Somali Shilling|+252|so,ar
|
|
211
|
+
SR|SUR|740|Suriname|Republic of Suriname||SRD|Surinamese Dollar|+597|nl
|
|
212
|
+
SS|SSD|728|South Sudan|Republic of South Sudan||SSP|South Sudanese Pound|+211|en
|
|
213
|
+
ST|STP|678|Sao Tome and Principe|Democratic Republic of Sao Tome and Principe||STN|S\xE3o Tom\xE9 & Pr\xEDncipe Dobra|+239|pt
|
|
214
|
+
SV|SLV|222|El Salvador|Republic of El Salvador||USD|US Dollar|+503|es
|
|
215
|
+
SX|SXM|534|Sint Maarten (Dutch part)|Sint Maarten (Dutch part)||XCG|Caribbean guilder|+1|en,nl
|
|
216
|
+
SY|SYR|760|Syrian Arab Republic||Syria|SYP|Syrian Pound|+963|ar
|
|
217
|
+
SZ|SWZ|748|Eswatini|Kingdom of Eswatini||SZL|Swazi Lilangeni|+268|en,ss
|
|
218
|
+
TC|TCA|796|Turks and Caicos Islands|||USD|US Dollar|+1|en
|
|
219
|
+
TD|TCD|148|Chad|Republic of Chad||XAF|Central African CFA Franc|+235|ar,fr
|
|
220
|
+
TF|ATF|260|French Southern Territories|||EUR|Euro||
|
|
221
|
+
TG|TGO|768|Togo|Togolese Republic||XOF|West African CFA Franc|+228|fr
|
|
222
|
+
TH|THA|764|Thailand|Kingdom of Thailand||THB|Thai Baht|+66|th
|
|
223
|
+
TJ|TJK|762|Tajikistan|Republic of Tajikistan||TJS|Tajikistani Somoni|+992|tg
|
|
224
|
+
TK|TKL|772|Tokelau|||NZD|New Zealand Dollar|+690|tkl,en
|
|
225
|
+
TL|TLS|626|Timor-Leste|Democratic Republic of Timor-Leste||USD|US Dollar|+670|tet,pt
|
|
226
|
+
TM|TKM|795|Turkmenistan|||TMT|Turkmenistani Manat|+993|tk
|
|
227
|
+
TN|TUN|788|Tunisia|Republic of Tunisia||TND|Tunisian Dinar|+216|ar,fr
|
|
228
|
+
TO|TON|776|Tonga|Kingdom of Tonga||TOP|Tongan Pa\u02BBanga|+676|to,en
|
|
229
|
+
TR|TUR|792|T\xFCrkiye|Republic of T\xFCrkiye||TRY|Turkish Lira|+90|tr
|
|
230
|
+
TT|TTO|780|Trinidad and Tobago|Republic of Trinidad and Tobago||TTD|Trinidad & Tobago Dollar|+1|en
|
|
231
|
+
TV|TUV|798|Tuvalu|||AUD|Australian Dollar|+688|tvl,en
|
|
232
|
+
TW|TWN|158|Taiwan, Province of China|Taiwan, Province of China|Taiwan|TWD|New Taiwan Dollar|+886|zh_Hant,nan_Hant,hak_Hant
|
|
233
|
+
TZ|TZA|834|Tanzania, United Republic of|United Republic of Tanzania|Tanzania|TZS|Tanzanian Shilling|+255|sw,en
|
|
234
|
+
UA|UKR|804|Ukraine|||UAH|Ukrainian Hryvnia|+380|uk,ru
|
|
235
|
+
UG|UGA|800|Uganda|Republic of Uganda||UGX|Ugandan Shilling|+256|sw,en
|
|
236
|
+
UM|UMI|581|United States Minor Outlying Islands|||USD|US Dollar||en
|
|
237
|
+
US|USA|840|United States|United States of America||USD|US Dollar|+1|en
|
|
238
|
+
UY|URY|858|Uruguay|Eastern Republic of Uruguay||UYU|Uruguayan Peso|+598|es
|
|
239
|
+
UZ|UZB|860|Uzbekistan|Republic of Uzbekistan||UZS|Uzbekistani Som|+998|uz,uz_Cyrl
|
|
240
|
+
VA|VAT|336|Holy See (Vatican City State)|||EUR|Euro|+39|it
|
|
241
|
+
VC|VCT|670|Saint Vincent and the Grenadines|||XCD|East Caribbean Dollar|+1|en
|
|
242
|
+
VE|VEN|862|Venezuela, Bolivarian Republic of|Bolivarian Republic of Venezuela|Venezuela|VES|Venezuelan Bol\xEDvar|+58|es
|
|
243
|
+
VG|VGB|092|Virgin Islands, British|British Virgin Islands||USD|US Dollar|+1|en
|
|
244
|
+
VI|VIR|850|Virgin Islands, U.S.|Virgin Islands of the United States||USD|US Dollar|+1|en
|
|
245
|
+
VN|VNM|704|Viet Nam|Socialist Republic of Viet Nam|Vietnam|VND|Vietnamese Dong|+84|vi
|
|
246
|
+
VU|VUT|548|Vanuatu|Republic of Vanuatu||VUV|Vanuatu Vatu|+678|bi,en,fr
|
|
247
|
+
WF|WLF|876|Wallis and Futuna|||XPF|CFP Franc|+681|fr
|
|
248
|
+
WS|WSM|882|Samoa|Independent State of Samoa||WST|Samoan Tala|+685|sm,en
|
|
249
|
+
XK||||||EUR|Euro|+383|sq,sr_Latn,sr
|
|
250
|
+
YE|YEM|887|Yemen|Republic of Yemen||YER|Yemeni Rial|+967|ar
|
|
251
|
+
YT|MYT|175|Mayotte|||EUR|Euro|+262|fr
|
|
252
|
+
ZA|ZAF|710|South Africa|Republic of South Africa||ZAR|South African Rand|+27|en
|
|
253
|
+
ZM|ZMB|894|Zambia|Republic of Zambia||ZMW|Zambian Kwacha|+260|en
|
|
254
|
+
ZW|ZWE|716|Zimbabwe|Republic of Zimbabwe||USD|US Dollar|+263|sn,en,nd
|
|
254
255
|
`.trim().split(`
|
|
255
|
-
`);var
|
|
256
|
+
`);var Ge=`
|
|
256
257
|
Africa/Abidjan|GMT
|
|
257
258
|
Africa/Accra|GMT
|
|
258
259
|
Africa/Addis_Ababa|EAT
|
|
@@ -621,6 +622,6 @@ W-SU|MSK
|
|
|
621
622
|
WET|WET|WEST
|
|
622
623
|
Zulu|UTC
|
|
623
624
|
`.trim().split(`
|
|
624
|
-
`);var xt=new Set("AT BE BG HR CY CZ DK EE FI FR DE GR HU IE IT LV LT LU MT NL PL PT RO SK SI ES SE".split(" ")),Ot=new Set("AG AI AU BB BD BM BN BS BT BW CC CK CX CY DM FJ FK GB GD GG GY HK ID IE IM IN JE JM JP KE KI KN KY LC LK LS MO MS MT MU MV MW MY MZ NA NF NP NR NU NZ PG PK PN SB SC SG SH SR SZ TC TH TL TO TT TV TZ UG VC VG WS ZA ZM ZW".split(" ")),E=864e5,Kt=7*E,ne=400*E,N=6e4,Vt=new Map(Be.map(n=>{let[e,t="",r=""]=n.slice(8).split("|"),i=[e,t,r,n.slice(2,5),n.slice(5,8)];return[n.slice(0,2),i]})),ke=n=>n||null,Ht=n=>n.length!==2||!/^[a-zA-Z]{2}$/.test(n)?"":[...n.toUpperCase()].map(e=>String.fromCodePoint(127462+e.charCodeAt(0)-65)).join(""),Ue=new Map,xe=n=>{if(!n)return null;let e=Ue.get(n);if(e!==void 0)return e;let t=Vt.get(n),r={code:n,name:t?t[0]:null,official:t?ke(t[1]):null,common:t?ke(t[2]):null,iso3:t?t[3]:null,numeric:t?t[4]:null,flag:Ht(n)||null,european_union:xt.has(n),driving_side:Ot.has(n)?"left":"right"};return Ue.set(n,r),r},Ft=new Map(Pe.map(n=>{let[e,t,r=t]=n.split("|");return[e,[t,r]]})),Le=new Map,Wt=n=>{let e=Le.get(n);if(e!==void 0)return e;let t=null;try{t=new Intl.DateTimeFormat("en-US",{timeZone:n,hour12:!1,era:"short",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{t=null}return Le.set(n,t),t},Oe=(n,e)=>{let t={};for(let s of n.formatToParts(e))t[s.type]=s.value;let r=Number(t.year)*(t.era==="BC"?-1:1),i=t.hour==="24"?0:Number(t.hour);return Date.UTC(r,Number(t.month)-1,Number(t.day),i,Number(t.minute),Number(t.second))},te=(n,e)=>Math.round((Oe(n,e)-e)/N),R=(n,e)=>{let t=te(n,e-E),r=te(n,e+E);if(t===r)return t;let i=[t,r].filter(s=>te(n,e-s*N)===s);return i.length?Math.max(...i):Math.min(t,r)},re=n=>{let e=Math.abs(n),t=String(Math.floor(e/60)).padStart(2,"0");return`${n<0?"-":"+"}${t}:${String(e%60).padStart(2,"0")}`},Ge=(n,e)=>new Date(e).toISOString().slice(0,19)+re(R(n,e)),zt=(n,e,t,r)=>{for(;t-e>1e3;){let i=e+Math.floor((t-e)/2);R(n,i)===r?e=i:t=i}return Math.floor((t+3e4)/N)*N},$t=(n,e)=>{let t=e+ne,r=[],i=e-ne,s=R(n,i);for(;i<t;){let a=i+Kt,o=R(n,a);o!==s&&r.push(zt(n,i,a,s)),s=o,i=a}return r},H=new Map,Zt=(n,e,t)=>{let r=Math.floor(t/E)*E+E/2,i=`${n}@${r}`,s=H.get(i);if(s!==void 0)return s;H.size>2048&&H.clear();let a=$t(e,r),o=[R(e,r-ne),...a.map(p=>R(e,p))],l=Math.min(...o),c=Math.max(...o),u=[l,null,null];for(let p=0;l!==c&&p+1<a.length;p+=1){let[d,f]=[a[p],a[p+1]];if(R(e,d)===c&&f>=r){u=[l,d,f];break}}return H.set(i,u),u},jt=(n,e,t)=>{let r=Ft.get(n);if(r)return t?r[1]:r[0];let i=Math.abs(e),s=String(Math.floor(i/60)).padStart(2,"0"),a=i%60;return`${e<0?"-":"+"}${s}`+(a?String(a).padStart(2,"0"):"")},_e=(n,e)=>{let t=Wt(n);if(t===null)return{timezone:n,abbreviation:null,local:null,utc_offset:null,is_dst:!1,dst_start:null,dst_end:null};let r=Oe(t,e),i=Math.round((r-e)/N),[s,a,o]=Zt(n,t,r);return{timezone:n,abbreviation:jt(n,i,i!==s),local:new Date(r).toISOString().slice(0,19)+re(i),utc_offset:re(i),is_dst:i!==s,dst_start:a===null?null:Ge(t,a),dst_end:o===null?null:Ge(t,o)}},F=new Map,Ke=(n,e)=>{if(!n)return null;if(e)return _e(n,e.getTime());let t=Math.floor(Date.now()/1e3),r=`${n}@${t}`,i=F.get(r);if(i!==void 0)return i;F.size>1024&&F.clear();let s=_e(n,t*1e3);return F.set(r,s),s};var Yt=["1.1.1.1","8.8.8.8","9.9.9.9"],Jt=["https://cloudflare-dns.com/dns-query","https://dns.google/dns-query"],Qt=["stun.l.google.com:19302","stun.cloudflare.com:3478"],Xt=["https://api.ipify.org","https://icanhazip.com"],P=2e3,qt=4096,en=36e5,tn=1232,nn=new Set([0,3]),C={A:1,CNAME:5,SOA:6,PTR:12,AAAA:28},rn=(n,e)=>{let t=n.split(".").filter(Boolean),r=t.reduce((o,l)=>o+l.length+1,0),i=new Uint8Array(12+r+1+4+11),s=new DataView(i.buffer);s.setUint16(0,Math.floor(Math.random()*65536)),s.setUint16(2,288),s.setUint16(4,1),s.setUint16(10,1);let a=12;for(let o of t){i[a]=o.length;for(let l=0;l<o.length;l+=1)i[a+1+l]=o.charCodeAt(l);a+=o.length+1}return a+=1,s.setUint16(a,C[e]),s.setUint16(a+2,1),s.setUint16(a+5,41),s.setUint16(a+7,tn),i},B=(n,e)=>{let t=[],r=e,i=-1;for(let s=0;s<128;s+=1){let a=n[r];if(a>=192){i<0&&(i=r+2),r=(a&63)<<8|n[r+1];continue}if(r+=1,!a)return[t.join("."),i<0?r:i];t.push(String.fromCharCode(...n.slice(r,r+a)).toLowerCase()),r+=a}throw new Error("name loops")},sn=(n,e,t)=>{if(t===C.A){let r=n.slice(e,e+4);return S((r[0]<<24>>>0)+(r[1]<<16)+(r[2]<<8)+r[3],!1)}if(t===C.AAAA){let r=0n;for(let i of n.slice(e,e+16))r=r<<8n|BigInt(i);return S(r,!0)}if(t===C.CNAME||t===C.PTR)return B(n,e)[0];if(t===C.SOA){let[r,i]=B(n,e);return`${r} ${B(n,i)[0]}`}return""},an=n=>{let e=new DataView(n.buffer,n.byteOffset),t=e.getUint16(2),r=[e.getUint16(4),e.getUint16(6),e.getUint16(8)],i=12;for(let a=0;a<r[0];a+=1)i=B(n,i)[1]+4;let s=[];for(let a of r.slice(1)){let o=[];for(let l=0;l<a;l+=1){let[c,u]=B(n,i),p=e.getUint16(u),d=e.getUint16(u+8);o.push({name:c,kind:p,data:sn(n,u+10,p)}),i=u+10+d}s.push(o)}return{code:t&15,authentic:(t&32)!==0,truncated:(t&512)!==0,answer:s[0],authority:s[1]}},k=(n,e,t="answer")=>n?(t==="any"?[...n.answer,...n.authority]:n.answer).filter(i=>i.kind===C[e]):[],w=(n,e)=>k(n,e).map(t=>t.data),ie=n=>{try{let e=an(n);return nn.has(e.code)?e:null}catch{return null}},$=async n=>await import(n),Fe=()=>typeof process<"u"&&!!process.versions?.node,Ve=null,on=async()=>(Ve??=(async()=>{let n=[];try{let{getServers:t}=await $("node:dns");n.push(...t())}catch{}let e=n.map(t=>t.split("%")[0].replace(/^\[|]$/g,"")).filter(t=>!/^(fe80|169\.254)/i.test(t));return[...new Set([...e,...Yt])]})(),Ve),ln=async(n,e)=>{let{connect:t}=await $("node:net");return new Promise(r=>{let i=t(53,n),s=[],a=0,o=l=>{i.destroy(),r(l)};i.setTimeout(P,()=>o(null)),i.on("error",()=>o(null)),i.on("connect",()=>{let l=new Uint8Array(e.length+2);new DataView(l.buffer).setUint16(0,e.length),l.set(e,2),i.write(l)}),i.on("data",l=>{if(s.push(l),a+=l.length,a<2)return;let c=new Uint8Array(a),u=0;for(let d of s)c.set(d,u),u+=d.length;let p=new DataView(c.buffer).getUint16(0);a>=p+2&&o(ie(c.slice(2,p+2)))})})},cn=async(n,e)=>{let{createSocket:t}=await $("node:dgram"),r=await on();return new Promise(i=>{let s=r.map(d=>t(d.includes(":")?"udp6":"udp4")),a=null,o=s.length,l=!1,c=d=>{if(!l){l=!0,clearTimeout(u);for(let f of s)f.close();i(d)}},u=setTimeout(()=>c(a),P),p=async(d,f)=>{o-=1;let h=ie(d);if(h?.truncated&&(h=await ln(f,n)),h&&(!e||k(h,e,"any").length))return c(h);a??=h,o||c(a)};s.forEach((d,f)=>{let h=r[f];d.on("error",()=>{o-=1,o||c(a)}),d.on("message",A=>{p(A,h)}),d.send(n,53,h)}),s.length||c(null)})},un=async(n,e)=>{let t=Jt.map(async i=>{let s=await fetch(i,{method:"POST",headers:{"content-type":"application/dns-message"},body:n,signal:AbortSignal.timeout(P)});if(!s.ok)throw new Error(`${s.status} from ${i}`);let a=ie(new Uint8Array(await s.arrayBuffer()));if(!a)throw new Error(`nothing from ${i}`);return a}),r=null;for(let i of await Promise.allSettled(t))if(i.status==="fulfilled"){if(!e||k(i.value,e,"any").length)return i.value;r??=i.value}return r},v=async([n,e,t])=>{let r=rn(n,e);return Fe()?cn(r,t):un(r,t)},dn=(n,e)=>{let t=k(n,"SOA","any");if(!t.length)return;let[r,i]=t[0].data.split(" "),s=i.indexOf(".");e.zone=t[0].name,e.zone_primary=r,e.zone_contact=s<0?i:`${i.slice(0,s)}@${i.slice(s+1)}`},pn=n=>({asked:n,hostname:null,hostnames:[],ipv4:null,ipv6:null,ipv4_addresses:[],ipv6_addresses:[],alias:null,zone:null,zone_primary:null,zone_contact:null,is_confirmed:!1,is_signed:!1}),We=async(n,e)=>{let t=D(n,e)[1],[r,i]=t?g(t):[n,e],[s,,a]=I(r,i),[o,l]=await Promise.all([v([a,"PTR",null]),v([a,"SOA","SOA"])]),c=pn(s);c.is_signed=!!o?.authentic,dn(l,c);let u=w(o,"PTR");if(!u.length)return c;c.hostname=u[0],c.hostnames=u;let[p,d]=await Promise.all([v([u[0],"A",null]),v([u[0],"AAAA",null])]);c.ipv4_addresses=w(p,"A"),c.ipv6_addresses=w(d,"AAAA"),c.ipv4=c.ipv4_addresses[0]??null,c.ipv6=c.ipv6_addresses[0]??null;let f=[...w(p,"CNAME"),...w(d,"CNAME")];c.alias=f[0]??null;let h=[...c.ipv4_addresses,...c.ipv6_addresses];return c.is_confirmed=h.some(A=>BigInt(g(A)[0])===BigInt(r)),c},ze=554869826,fn=257,mn=32,hn=1,Tn=/^candidate:\S+ \S+ \S+ \S+ (\S+) \S+ typ srflx/,bn=6e4,Sn=(n,e,t)=>{let r=0n;for(let i=0;i<16;i+=1){let s=t?n[4+i]:0;r=r<<8n|BigInt(n[e+i]^s)}return r},An=()=>{let n=new Uint8Array(20),e=new DataView(n.buffer);return e.setUint16(0,1),e.setUint32(4,ze),crypto.getRandomValues(n.subarray(8)),n},gn=n=>{let e=new DataView(n.buffer,n.byteOffset,n.byteLength);if(n.length<20||e.getUint16(0)!==fn)return null;let t=20;for(;t+4<=n.length;){let r=e.getUint16(t),i=e.getUint16(t+2),s=t+4,a=r===mn;if((a||r===hn)&&s+i<=n.length){let o=n[s+1];if(o===1)return S((e.getUint32(s+4)^(a?ze:0))>>>0,!1);if(o===2)return S(Sn(n,s+4,a),!0)}t=s+i+(4-i%4)%4}return null},$e=(n,e)=>{let t=!1,r=s=>{t||(t=!0,clearTimeout(i),e(),n(s))},i=setTimeout(()=>r(null),P);return r},En=async n=>{let{createSocket:e}=await $("node:dgram"),[t,r]=n.split(":");return new Promise(i=>{let s=e("udp4"),a=$e(i,()=>s.close());s.on("error",()=>a(null)),s.on("message",o=>a(gn(o))),s.send(An(),Number(r),t)})},Rn=n=>{let e=globalThis.RTCPeerConnection;return e?new Promise(t=>{let r=new e({iceServers:[{urls:`stun:${n}`}]}),i=$e(t,()=>r.close());r.onicecandidate=s=>{let a=Tn.exec(s.candidate?.candidate??"");a?i(a[1]):s.candidate||i(null)},r.createDataChannel(""),r.createOffer().then(s=>r.setLocalDescription(s)).catch(()=>i(null))}):Promise.resolve(null)},Cn=async()=>{for(let n of Xt)try{let e=await fetch(n,{signal:AbortSignal.timeout(P)});if(e.ok)return(await e.text()).trim()}catch{}return null},He=n=>{if(!n)return null;try{let[e,t]=g(n);return S(e,t)}catch{return null}},W=null,yn=async()=>{if(W&&W[0]>Date.now())return W[1];let n=null;for(let e of Qt)if(n=He(Fe()?await En(e):await Rn(e)),n)break;return n??=He(await Cn()),W=[Date.now()+bn,n],n},z=new Map,se=async(n,e)=>{let t=`${e?6:4}:${n}`,r=z.get(t);if(r&&r[0]>Date.now())return r[1];let i=await We(n,e);return z.size>=qt&&z.clear(),z.set(t,[Date.now()+en,i]),i};var U=n=>{throw new Error(`lzma: ${n}`)},L=class{bytes;length=0;done=!1;data;probs;context;positionMask;matchMask;range=-1;code=0;at=5;state=0;recent0=0;recent1=0;recent2=0;recent3=0;constructor(e,[t,r,i],s=0){(e.length<5||e[0]!==0)&&U("not a stream"),this.data=e,this.bytes=new Uint8Array(Math.max(s,e.length*4,256)),this.probs=new Uint16Array(1846+(768<<t+r)).fill(1024),this.context=t,this.positionMask=(1<<r)-1,this.matchMask=(1<<i)-1;for(let a=1;a<5;a+=1)this.code=this.code<<8|e[a]}bit(e){let t=this.probs,r=t[e],i=Math.imul(this.range>>>11,r),s=0;return(this.code^2147483648)<(i^2147483648)?(this.range=i,t[e]=r+(2048-r>>5)):(this.range=this.range-i|0,this.code=this.code-i|0,t[e]=r-(r>>5),s=1),this.range>>>24||(this.at>=this.data.length&&U("the stream ends early"),this.range<<=8,this.code=this.code<<8|this.data[this.at++]),s}direct(e){let t=0;for(let r=0;r<e;r+=1){this.range>>>=1;let i=(this.code^2147483648)>=(this.range^2147483648)?1:0;i&&(this.code=this.code-this.range|0),t=t*2+i,this.range>>>24||(this.at>=this.data.length&&U("the stream ends early"),this.range<<=8,this.code=this.code<<8|this.data[this.at++])}return t}tree(e,t){let r=1;for(let i=0;i<t;i+=1)r=r<<1|this.bit(e+r);return r-(1<<t)}reversed(e,t){let r=1,i=0;for(let s=0;s<t;s+=1){let a=this.bit(e+r);r=r<<1|a,i|=a<<s}return i}span(e,t){return this.bit(e+0)?this.bit(e+0+1)?16+this.tree(e+258,8):8+this.tree(e+130+(t<<3),3):this.tree(e+2+(t<<3),3)}distance(e){let t=this.tree(432+(Math.min(e,3)<<6),6);if(t<4)return t;let r=(t>>1)-1,i=(2|t&1)*2**r;return t<14?i+this.reversed(688+i-t-1,r):i+this.direct(r-4)*16+this.reversed(802,4)}room(e){if(this.length+e<=this.bytes.length)return;let t=new Uint8Array(Math.max(this.bytes.length*2,this.length+e));t.set(this.bytes.subarray(0,this.length)),this.bytes=t}literal(){let e=this.bytes,t=this.length,r=t?e[t-1]:0,i=1846+768*(((t&this.positionMask)<<this.context)+(r>>8-this.context)),s=1;if(this.state>=7){let o=e[t-this.recent0-1];for(;s<256;){let l=o>>7&1;o<<=1;let c=this.bit(i+(1+l<<8)+s);if(s=s<<1|c,c!==l)break}}for(;s<256;)s=s<<1|this.bit(i+s);this.room(1),this.bytes[this.length++]=s&255;let a=this.state;this.state=a<4?0:a<10?a-3:a-6}copy(e){this.room(e);let t=this.bytes,r=this.length-this.recent0-1;for(let i=0;i<e;i+=1)t[this.length+i]=t[r+i];this.length+=e}until(e){for(;!this.done&&this.length<e;)this.step();return this.bytes}step(){let e=this.length&this.matchMask,t=this.state;if(!this.bit(0+(t<<4|e))){this.literal();return}let i=this.bit(192+t)?this.repeat(t,e):this.fresh(t,e);this.done||(this.recent0>=this.length&&U("a match reaches before the start"),this.copy(i+2))}fresh(e,t){this.recent3=this.recent2,this.recent2=this.recent1,this.recent1=this.recent0;let r=this.span(818,t);return this.state=e<7?7:10,this.recent0=this.distance(r),this.done=this.recent0===4294967295,r}repeat(e,t){if(this.length||U("a repeat before any byte"),this.bit(204+e))this.rotate(e);else if(!this.bit(240+(e<<4|t)))return this.state=e<7?9:11,-1;return this.state=e<7?8:11,this.span(1332,t)}rotate(e){let t=this.recent1;this.bit(216+e)&&(t=this.recent2,this.bit(228+e)&&(t=this.recent3,this.recent3=this.recent2),this.recent2=this.recent1),this.recent1=this.recent0,this.recent0=t}},Mn=(n,e)=>{let t=new L(n,e);return t.until(Number.POSITIVE_INFINITY),t.bytes.subarray(0,t.length)};var G="PLEVIN\0",Ze=2,In=16384,Dn=512,Nn=new Set(" -,./()&_+'"),wn=1e4,vn=255,ae=16384,Bn=["place","network","abuse","prefix","rpki","roas","rir"],Pn=new Set(["place","network","abuse"]),kn=new Set(["signed","delta"]),je="network",Un={rpki:"rpki",rir:"rirs","place.granularity":"granularity","city.timezone":"timezones","city.type":"place_types","operator.category":"categories","abuse.user_type":"categories","abuse.service":"services","abuse.evidence":"evidence","abuse.threat":"threats","abuse.level":"levels"},Ln=n=>n===vn?null:n/100,Gn={"abuse.risk":Ln,"abuse.is_anycast":Boolean,"abuse.is_satellite":Boolean},le=new TextDecoder,_n=new TextEncoder,xn=(n,e,t)=>{let r="";for(let i=e;i<t;i+=1){if(n[i]>127)return null;r+=String.fromCharCode(n[i])}return r},On=(n,e,t)=>{let r=new Uint8Array(e+t.length);return r.set(n.subarray(0,e)),r.set(t,e),r},y=(n,e=In)=>{let t=new Map;return r=>{let i=t.get(r);if(i!==void 0)return i;t.size>=e&&t.clear();let s=n(r);return t.set(r,s),s}},fe=(n,e)=>{let t=0,r=1;for(;;){let i=n[e];if(e+=1,t+=(i&127)*r,i<128)return[t,e];r*=128}},ce=(n,e,t)=>{let r=[];for(let i=0;i<t;i+=1){let[s,a]=fe(n,e);r.push(s),e=a}return[r,e]},oe=(n,e,t)=>{let r=[];for(let i=0;i<t;i+=1){let s=0n,a=0n;for(;;){let o=n[e];if(e+=1,s|=BigInt(o&127)<<a,o<128)break;a+=7n}r.push(s)}return[r,e]},_=class{count;read;perBlock;perGroup;fanout;width;blocks;keys;offsets;data;tuning;cache;groups;constructor(e,t){let r=new DataView(e.buffer,e.byteOffset,e.byteLength);this.count=t.count,this.read=t.read,this.perBlock=t.block,this.perGroup=t.group,this.fanout=this.perBlock/this.perGroup,this.blocks=r.getUint32(0,!0),this.width=r.getUint32(4,!0),this.offsets=new Uint32Array(this.blocks+1);for(let s=0;s<=this.blocks;s+=1)this.offsets[s]=r.getUint32(8+s*4,!0);let i=8+4*(this.blocks+1);this.keys=[];for(let s=0;s<this.blocks;s+=1){let a=0n;for(let o=0;o<this.width;o+=1)a=a<<8n|BigInt(e[i+s*this.width+o]);this.keys.push(a)}i+=this.width*this.blocks,this.tuning=t.lzma,this.data=e.subarray(i),this.cache=y(s=>this.block(s)),this.groups=y(s=>this.values(s))}stream(e){let t=this.data.subarray(this.offsets[e],this.offsets[e+1]);return new L(t,this.tuning)}held(e){return Math.min(this.perGroup,this.count-e*this.perGroup)}block(e){throw new Error(`no block ${e}`)}values(e){throw new Error(`no group ${e}`)}at(e){throw new Error(`no row ${e}`)}},Kn=(n,e,t,r)=>{let i=0;for(let a=t-1;a>=0;a-=1)i=i*256+n[e+a];let s=2**(t*8);return r&&i>=s/2?i-s:i},j=class extends _{signed;constructor(e,t){super(e,t),this.signed=kn.has(t.encoding)}block(e){return this.stream(e)}value(e,t){let r=e.until(1)[0],i=e.until(1+(t+1)*r);return Kn(i,1+t*r,r,this.signed)}at(e){return this.value(this.cache(Math.floor(e/this.perBlock)),e%this.perBlock)}rows(e){let t=[];for(let r=0;r<this.count;r+=1)this.at(r)===e&&t.push(r);return t}},ue=class extends j{sums=y(e=>({values:[],running:0}));at(e){let t=Math.floor(e/this.perBlock),r=e%this.perBlock,i=this.sums(t),s=this.cache(t);for(;i.values.length<=r;)i.running+=this.value(s,i.values.length),i.values.push(i.running);return i.values[r]}},de=class extends _{block(e){let t=this.stream(e),r=this.count-e*this.perBlock,i=Math.min(this.fanout,Math.ceil(r/this.perGroup))-1,[s,a]=ce(t.until(i*3),0,i),o=[a];for(let l of s)o.push(o[o.length-1]+l);return o.push(Number.POSITIVE_INFINITY),[t,o]}values(e){let t=Math.floor(e/this.fanout),[r,i]=this.cache(t),s=r.until(i[e%this.fanout+1]),a=i[e%this.fanout],o=[],l="",c=null;for(let u=0;u<this.held(e);u+=1){let p=s[a],d=s[a+1];a+=2,d>127&&([d,a]=fe(s,a-1));let f=c===null?xn(s,a,a+d):null;f===null?(c=On(c??_n.encode(l),p,s.subarray(a,a+d)),l=le.decode(c)):l=l.slice(0,p)+f,a+=d,o.push(l)}return o}at(e){if(!e)return"";let t=Math.floor((e-1)/this.perGroup);return this.groups(t)[(e-1)%this.perGroup]}},pe=class extends _{hostBits;big;constructor(e,t){super(e,t),this.big=this.width!==4,this.hostBits=this.big?64:0}block(e){let t=this.stream(e),r=t.until(3+this.fanout*(this.big?22:8)),[i,s]=fe(r,0),a=Math.ceil(i/this.perGroup),[o,l]=oe(r,s,a-1),c=[this.keys[e]];for(let f of o)c.push(c[c.length-1]+f);let[u,p]=ce(r,l,a-1),d=[p];for(let f of u)d.push(d[d.length-1]+f);return d.push(Number.POSITIVE_INFINITY),[c,d,t]}values(e){let t=Math.floor(e/this.fanout),[r,i,s]=this.cache(t),a=s.until(i[e%this.fanout+1]),o=this.held(e),l=r[e%this.fanout],[c,u]=this.big?oe(a,i[e%this.fanout],o-1):ce(a,i[e%this.fanout],o-1);if(!this.big){let f=[Number(l)];for(let h of c)f.push(f[f.length-1]+h);return f}let p=[l>>BigInt(this.hostBits)];for(let f of c)p.push(p[p.length-1]+f);let[d]=oe(a,u,o);return p.map((f,h)=>f<<BigInt(this.hostBits)|d[h])}at(e){let t=Math.floor(e/this.perGroup);return this.groups(t)[e%this.perGroup]}row(e){let t=(this.big,e),r=Z(this.keys,this.big?t:BigInt(t))-1;if(r<0)return null;let[i]=this.cache(r),s=r*this.fanout+Z(i,this.big?t:BigInt(t))-1,a=Z(this.groups(s),t)-1;return a<0?null:s*this.perGroup+a}holds(e){let t=this.row(e);return t!==null&&this.at(t)===e?t:null}},Z=(n,e)=>{let t=0,r=n.length;for(;t<r;){let i=t+r>>1;n[i]<=e?t=i+1:r=i}return t},Vn={plain:[],text:[],degrees:[],coded:[],links:[]},Hn={index:pe,front:de,delta:ue},x=class{head;sections={};reads={};tables={};families;rows={};located;answers=y(e=>this.answer(e));words=null;constructor(e){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(le.decode(e.subarray(0,G.length))!==G||e[G.length]!==Ze)throw new Error(`not a plevin ${Ze} database`);let i=t.getUint32(G.length+1,!0),s=G.length+5;this.head=JSON.parse(le.decode(e.subarray(s,s+i)));let a=s+i;for(let[o,l]of Object.entries(this.head.sections)){let c=a+l.offset,u=e.subarray(c,c+l.bytes);this.sections[o]=new(Hn[l.encoding]??j)(u,l)}Object.assign(this.reads,Gn);for(let[o,l]of Object.entries(Un)){let c=this.head.vocabularies[l];c&&(this.reads[o]=u=>c[u]??"")}this.plan(),this.families={4:this.family(4),6:this.family(6)},this.located={4:y(o=>this.locateIn(4,o)),6:y(o=>this.locateIn(6,o))}}linked(e,t){return this.rows[e]??=y(r=>this.row(e,r)),this.rows[e](t)}get built(){return this.head.built}get selection(){return this.head.selection}get fields(){return this.head.fields}plan(){for(let[e,t]of Object.entries(this.sections)){let r=e.split(".");if(r.length!==3||r[0]!=="col"&&r[0]!=="link")continue;let[i,s,a]=r;this.tables[s]??={plain:[],text:[],degrees:[],coded:[],links:[]};let o=this.tables[s],l=this.reads[`${s}.${a}`];i==="link"?o.links.push([a,t]):l?o.coded.push([a,t,l]):t.read==="text"?o.text.push([a,t,this.sections.strings]):t.read?o.degrees.push([a,t]):o.plain.push([a,t])}}family(e){let t=`spine.v${e}`,r=`hosts.v${e}`;return{index:this.sections[t]??null,columns:Bn.filter(i=>`${t}.${i}`in this.sections).map(i=>[i,this.sections[`${t}.${i}`],this.reads[i]??null]),hosts:this.sections[r]??null,records:this.sections[`${r}.abuse`]??null}}row(e,t){let r=this.tables[e]??Vn,i={};for(let[s,a]of r.plain)i[s]=a.at(t);for(let[s,a,o]of r.text)i[s]=o.at(a.at(t));for(let[s,a]of r.degrees)i[s]=a.at(t)/wn;for(let[s,a,o]of r.coded)i[s]=o(a.at(t));for(let[s,a]of r.links){let o=a.at(t);o&&(i[s]=this.linked(s,o-1))}return"postal_partial"in i&&(i.postal_partial=String(i.postal).slice(0,i.postal_partial)),i}answer(e){let t=e%2?6:4,r=(e-e%2)/2,i=r%ae,s=(r-i)/ae,a={};for(let[o,l,c]of this.families[t].columns){let u=i&&o==="abuse"?i:l.at(s);Pn.has(o)?u&&(a[o]=this.linked(o,u-1)):(a[je]??={},a[je][o]=c?c(u):u)}return a}locateIn(e,t){let{index:r,hosts:i,records:s}=this.families[e],a=r===null?null:r.row(t);if(a===null)return null;if(i===null||s===null)return[e,a,0];let o=i.holds(t);return[e,a,o===null?0:s.at(o)+1]}locate(e,t){return this.located[t?6:4](e)}rowFor(e,t){let r=this.locate(e,t);return r===null?null:this.answerFor(r)}answerFor(e){let[t,r,i]=e;return this.answers((r*ae+i)*2+(t===6?1:0))}seek(e,t){let r=0,i=e.count;for(;r<i;){let s=r+i>>1;e.at(s)<t?r=s+1:i=s}return r}systemAt(e){let t=this.sections["col.network.asn"];if(!t||e<=0)return-1;let r=this.seek(t,e);return r<t.count&&t.at(r)===e?r:-1}system(e){let t=this.systemAt(e);return t<0?null:this.linked("network",t)}spans(e,t){let r=this.sections[`spine.v${t}`],i=this.sections[`spine.v${t}.network`],s=this.sections[`spine.v${t}.prefix`];if(!r||!i||!s)return[];let a=BigInt(t===6?128:32),o=new Set,l=[];for(let c of i.rows(e+1)){let u=s.at(c),p=a-BigInt(u),d=BigInt(r.at(c))>>p<<p,f=`${d}/${u}`;o.has(f)||(o.add(f),l.push([d,u]))}return l}searchable(){let e=this.sections["col.network.asn"],t=this.sections["col.network.handle"],r=this.sections["link.network.operator"],i=this.sections["link.network.carrier"],s=this.sections["col.operator.company"],a=this.sections["col.operator.peering"],o=this.sections["col.carrier.user_count"],l=this.sections.strings,c=[],u=[0],p=[],d=[];for(let f=this.seek(e,1);f<e.count;f+=1){let h=r.at(f),A=i.at(f),V=h?l.at(s.at(h-1)):"",Y=h?a.at(h-1):0,it=A?o.at(A-1):0,me=`${l.at(t.at(f))} ${V}`.toLowerCase();c.push(me),u.push(u[u.length-1]+me.length+1),p.push(Y+32-Math.clz32(it)),d.push(f)}return{haystack:c.join(`
|
|
625
|
-
`),starts:u,weights:
|
|
626
|
-
`),
|
|
625
|
+
`);var Fn=new Set("AT BE BG HR CY CZ DK EE FI FR DE GR HU IE IT LV LT LU MT NL PL PT RO SK SI ES SE".split(" ")),Hn=new Set("AG AI AU BB BD BM BN BS BT BW CC CK CX CY DM FJ FK GB GD GG GY HK ID IE IM IN JE JM JP KE KI KN KY LC LK LS MO MS MT MU MV MW MY MZ NA NF NP NR NU NZ PG PK PN SB SC SG SH SR SZ TC TH TL TO TT TV TZ UG VC VG VI WS ZA ZM ZW".split(" ")),R=864e5,Vn=7*R,re=400*R,U=6e4,Wn=new Map(ke.map(t=>[t.slice(0,2),t.split("|")])),E=t=>t||null,zn=t=>t.length!==2||!/^[a-zA-Z]{2}$/.test(t)?"":[...t.toUpperCase()].map(e=>String.fromCodePoint(127462+e.charCodeAt(0)-65)).join(""),_e=new Map,Fe=t=>{if(!t)return null;let e=_e.get(t);if(e!==void 0)return e;let[,n,r,a,i,o,s,l,c,u]=Wn.get(t)??[],d={code:t,name:E(a),official:E(i),common:E(o),iso3:E(n),numeric:E(r),flag:zn(t)||null,currency:E(s),currency_name:E(l),calling_code:E(c),languages:u?u.split(","):[],european_union:Fn.has(t),driving_side:Hn.has(t)?"left":"right"};return _e.set(t,d),d},Zn=new Map(Ge.map(t=>{let[e,n,r=n]=t.split("|");return[e,[n,r]]})),Ke=new Map,$n=t=>{let e=Ke.get(t);if(e!==void 0)return e;let n=null;try{n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{n=null}return Ke.set(t,n),n},He=(t,e)=>{let n={};for(let i of t.formatToParts(e))n[i.type]=i.value;let r=Number(n.year)*(n.era==="BC"?-1:1),a=n.hour==="24"?0:Number(n.hour);return Date.UTC(r,Number(n.month)-1,Number(n.day),a,Number(n.minute),Number(n.second))},te=(t,e)=>Math.round((He(t,e)-e)/U),C=(t,e)=>{let n=te(t,e-R),r=te(t,e+R);if(n===r)return n;let a=[n,r].filter(i=>te(t,e-i*U)===i);return a.length?Math.max(...a):Math.min(n,r)},ae=t=>{let e=Math.abs(t),n=String(Math.floor(e/60)).padStart(2,"0");return`${t<0?"-":"+"}${n}:${String(e%60).padStart(2,"0")}`},xe=(t,e)=>new Date(e).toISOString().slice(0,19)+ae(C(t,e)),Yn=(t,e,n,r)=>{for(;n-e>1e3;){let a=e+Math.floor((n-e)/2);C(t,a)===r?e=a:n=a}return Math.floor((n+3e4)/U)*U},jn=(t,e)=>{let n=e+re,r=[],a=e-re,i=C(t,a);for(;a<n;){let o=a+Vn,s=C(t,o);s!==i&&r.push(Yn(t,a,o,i)),i=s,a=o}return r},H=new Map,Jn=(t,e,n)=>{let r=Math.floor(n/R)*R+R/2,a=`${t}@${r}`,i=H.get(a);if(i!==void 0)return i;H.size>2048&&H.clear();let o=jn(e,r),s=[C(e,r-re),...o.map(d=>C(e,d))],l=Math.min(...s),c=Math.max(...s),u=[l,null,null];for(let d=0;l!==c&&d+1<o.length;d+=1){let[p,f]=[o[d],o[d+1]];if(C(e,p)===c&&f>=r){u=[l,p,f];break}}return H.set(a,u),u},Xn=(t,e,n)=>{let r=Zn.get(t);if(r)return n?r[1]:r[0];let a=Math.abs(e),i=String(Math.floor(a/60)).padStart(2,"0"),o=a%60;return`${e<0?"-":"+"}${i}`+(o?String(o).padStart(2,"0"):"")},Oe=(t,e)=>{let n=$n(t);if(n===null)return{timezone:t,abbreviation:null,local:null,utc_offset:null,is_dst:!1,dst_start:null,dst_end:null};let r=He(n,e),a=Math.round((r-e)/U),[i,o,s]=Jn(t,n,r);return{timezone:t,abbreviation:Xn(t,a,a!==i),local:new Date(r).toISOString().slice(0,19)+ae(a),utc_offset:ae(a),is_dst:a!==i,dst_start:o===null?null:xe(n,o),dst_end:s===null?null:xe(n,s)}},V=new Map,Ve=(t,e)=>{if(!t)return null;if(e)return Oe(t,e.getTime());let n=Math.floor(Date.now()/1e3),r=`${t}@${n}`,a=V.get(r);if(a!==void 0)return a;V.size>1024&&V.clear();let i=Oe(t,n*1e3);return V.set(r,i),i};var Qn=["1.1.1.1","8.8.8.8","9.9.9.9"],qn=["https://cloudflare-dns.com/dns-query","https://dns.google/dns-query"],et=["stun.l.google.com:19302","stun.cloudflare.com:3478"],nt=["https://api.ipify.org","https://icanhazip.com"],v=2e3,tt=4096,rt=36e5,at=1232,it=new Set([0,3]),y={A:1,CNAME:5,SOA:6,PTR:12,AAAA:28},ot=(t,e)=>{let n=t.split(".").filter(Boolean),r=n.reduce((s,l)=>s+l.length+1,0),a=new Uint8Array(12+r+1+4+11),i=new DataView(a.buffer);i.setUint16(0,Math.floor(Math.random()*65536)),i.setUint16(2,288),i.setUint16(4,1),i.setUint16(10,1);let o=12;for(let s of n){a[o]=s.length;for(let l=0;l<s.length;l+=1)a[o+1+l]=s.charCodeAt(l);o+=s.length+1}return o+=1,i.setUint16(o,y[e]),i.setUint16(o+2,1),i.setUint16(o+5,41),i.setUint16(o+7,at),a},B=(t,e)=>{let n=[],r=e,a=-1;for(let i=0;i<128;i+=1){let o=t[r];if(o>=192){a<0&&(a=r+2),r=(o&63)<<8|t[r+1];continue}if(r+=1,!o)return[n.join("."),a<0?r:a];n.push(String.fromCharCode(...t.slice(r,r+o)).toLowerCase()),r+=o}throw new Error("name loops")},st=(t,e,n)=>{if(n===y.A){let r=t.slice(e,e+4);return S((r[0]<<24>>>0)+(r[1]<<16)+(r[2]<<8)+r[3],!1)}if(n===y.AAAA){let r=0n;for(let a of t.slice(e,e+16))r=r<<8n|BigInt(a);return S(r,!0)}if(n===y.CNAME||n===y.PTR)return B(t,e)[0];if(n===y.SOA){let[r,a]=B(t,e);return`${r} ${B(t,a)[0]}`}return""},lt=t=>{let e=new DataView(t.buffer,t.byteOffset),n=e.getUint16(2),r=[e.getUint16(4),e.getUint16(6),e.getUint16(8)],a=12;for(let o=0;o<r[0];o+=1)a=B(t,a)[1]+4;let i=[];for(let o of r.slice(1)){let s=[];for(let l=0;l<o;l+=1){let[c,u]=B(t,a),d=e.getUint16(u),p=e.getUint16(u+8);s.push({name:c,kind:d,data:st(t,u+10,d)}),a=u+10+p}i.push(s)}return{code:n&15,authentic:(n&32)!==0,truncated:(n&512)!==0,answer:i[0],authority:i[1]}},L=(t,e,n="answer")=>t?(n==="any"?[...t.answer,...t.authority]:t.answer).filter(a=>a.kind===y[e]):[],w=(t,e)=>L(t,e).map(n=>n.data),ie=t=>{try{let e=lt(t);return it.has(e.code)?e:null}catch{return null}},Z=async t=>await import(t),Ze=()=>typeof process<"u"&&!!process.versions?.node,We=null,ct=async()=>(We??=(async()=>{let t=[];try{let{getServers:n}=await Z("node:dns");t.push(...n())}catch{}let e=t.map(n=>n.split("%")[0].replace(/^\[|]$/g,"")).filter(n=>!/^(fe80|169\.254)/i.test(n));return[...new Set([...e,...Qn])]})(),We),ut=async(t,e)=>{let{connect:n}=await Z("node:net");return new Promise(r=>{let a=n(53,t),i=[],o=0,s=l=>{a.destroy(),r(l)};a.setTimeout(v,()=>s(null)),a.on("error",()=>s(null)),a.on("connect",()=>{let l=new Uint8Array(e.length+2);new DataView(l.buffer).setUint16(0,e.length),l.set(e,2),a.write(l)}),a.on("data",l=>{if(i.push(l),o+=l.length,o<2)return;let c=new Uint8Array(o),u=0;for(let p of i)c.set(p,u),u+=p.length;let d=new DataView(c.buffer).getUint16(0);o>=d+2&&s(ie(c.slice(2,d+2)))})})},dt=async(t,e)=>{let{createSocket:n}=await Z("node:dgram"),r=await ct();return new Promise(a=>{let i=r.map(p=>n(p.includes(":")?"udp6":"udp4")),o=null,s=i.length,l=!1,c=p=>{if(!l){l=!0,clearTimeout(u);for(let f of i)f.close();a(p)}},u=setTimeout(()=>c(o),v),d=async(p,f)=>{s-=1;let h=ie(p);if(h?.truncated&&(h=await ut(f,t)),h&&(!e||L(h,e,"any").length))return c(h);o??=h,s||c(o)};i.forEach((p,f)=>{let h=r[f];p.on("error",()=>{s-=1,s||c(o)}),p.on("message",A=>{d(A,h)}),p.send(t,53,h)}),i.length||c(null)})},pt=async(t,e)=>{let n=qn.map(async a=>{let i=await fetch(a,{method:"POST",headers:{"content-type":"application/dns-message"},body:t,signal:AbortSignal.timeout(v)});if(!i.ok)throw new Error(`${i.status} from ${a}`);let o=ie(new Uint8Array(await i.arrayBuffer()));if(!o)throw new Error(`nothing from ${a}`);return o}),r=null;for(let a of await Promise.allSettled(n))if(a.status==="fulfilled"){if(!e||L(a.value,e,"any").length)return a.value;r??=a.value}return r},P=async([t,e,n])=>{let r=ot(t,e);return Ze()?dt(r,n):pt(r,n)},ft=(t,e)=>{let n=L(t,"SOA","any");if(!n.length)return;let[r,a]=n[0].data.split(" "),i=a.indexOf(".");e.zone=n[0].name,e.zone_primary=r,e.zone_contact=i<0?a:`${a.slice(0,i)}@${a.slice(i+1)}`},mt=t=>({asked:t,hostname:null,hostnames:[],ipv4:null,ipv6:null,ipv4_addresses:[],ipv6_addresses:[],alias:null,zone:null,zone_primary:null,zone_contact:null,is_confirmed:!1,is_signed:!1}),$e=async(t,e)=>{let n=N(t,e)[1],[r,a]=n?g(n):[t,e],[i,,o]=I(r,a),[s,l]=await Promise.all([P([o,"PTR",null]),P([o,"SOA","SOA"])]),c=mt(i);c.is_signed=!!s?.authentic,ft(l,c);let u=w(s,"PTR");if(!u.length)return c;c.hostname=u[0],c.hostnames=u;let[d,p]=await Promise.all([P([u[0],"A",null]),P([u[0],"AAAA",null])]);c.ipv4_addresses=w(d,"A"),c.ipv6_addresses=w(p,"AAAA"),c.ipv4=c.ipv4_addresses[0]??null,c.ipv6=c.ipv6_addresses[0]??null;let f=[...w(d,"CNAME"),...w(p,"CNAME")];c.alias=f[0]??null;let h=[...c.ipv4_addresses,...c.ipv6_addresses];return c.is_confirmed=h.some(A=>BigInt(g(A)[0])===BigInt(r)),c},Ye=554869826,ht=257,Tt=32,bt=1,St=/^candidate:\S+ \S+ \S+ \S+ (\S+) \S+ typ srflx/,At=6e4,gt=(t,e,n)=>{let r=0n;for(let a=0;a<16;a+=1){let i=n?t[4+a]:0;r=r<<8n|BigInt(t[e+a]^i)}return r},Et=()=>{let t=new Uint8Array(20),e=new DataView(t.buffer);return e.setUint16(0,1),e.setUint32(4,Ye),crypto.getRandomValues(t.subarray(8)),t},Rt=t=>{let e=new DataView(t.buffer,t.byteOffset,t.byteLength);if(t.length<20||e.getUint16(0)!==ht)return null;let n=20;for(;n+4<=t.length;){let r=e.getUint16(n),a=e.getUint16(n+2),i=n+4,o=r===Tt;if((o||r===bt)&&i+a<=t.length){let s=t[i+1];if(s===1)return S((e.getUint32(i+4)^(o?Ye:0))>>>0,!1);if(s===2)return S(gt(t,i+4,o),!0)}n=i+a+(4-a%4)%4}return null},je=(t,e)=>{let n=!1,r=i=>{n||(n=!0,clearTimeout(a),e(),t(i))},a=setTimeout(()=>r(null),v);return r},Ct=async t=>{let{createSocket:e}=await Z("node:dgram"),[n,r]=t.split(":");return new Promise(a=>{let i=e("udp4"),o=je(a,()=>i.close());i.on("error",()=>o(null)),i.on("message",s=>o(Rt(s))),i.send(Et(),Number(r),n)})},yt=t=>{let e=globalThis.RTCPeerConnection;return e?new Promise(n=>{let r=new e({iceServers:[{urls:`stun:${t}`}]}),a=je(n,()=>r.close());r.onicecandidate=i=>{let o=St.exec(i.candidate?.candidate??"");o?a(o[1]):i.candidate||a(null)},r.createDataChannel(""),r.createOffer().then(i=>r.setLocalDescription(i)).catch(()=>a(null))}):Promise.resolve(null)},Dt=async()=>{for(let t of nt)try{let e=await fetch(t,{signal:AbortSignal.timeout(v)});if(e.ok)return(await e.text()).trim()}catch{}return null},ze=t=>{if(!t)return null;try{let[e,n]=g(t);return S(e,n)}catch{return null}},W=null,Mt=async()=>{if(W&&W[0]>Date.now())return W[1];let t=null;for(let e of et)if(t=ze(Ze()?await Ct(e):await yt(e)),t)break;return t??=ze(await Dt()),W=[Date.now()+At,t],t},z=new Map,oe=async(t,e)=>{let n=`${e?6:4}:${t}`,r=z.get(n);if(r&&r[0]>Date.now())return r[1];let a=await $e(t,e);return z.size>=tt&&z.clear(),z.set(n,[Date.now()+rt,a]),a};var k=t=>{throw new Error(`lzma: ${t}`)},G=class{bytes;length=0;done=!1;data;probs;context;positionMask;matchMask;range=-1;code=0;at=5;state=0;recent0=0;recent1=0;recent2=0;recent3=0;constructor(e,[n,r,a],i=0){(e.length<5||e[0]!==0)&&k("not a stream"),this.data=e,this.bytes=new Uint8Array(Math.max(i,e.length*4,256)),this.probs=new Uint16Array(1846+(768<<n+r)).fill(1024),this.context=n,this.positionMask=(1<<r)-1,this.matchMask=(1<<a)-1;for(let o=1;o<5;o+=1)this.code=this.code<<8|e[o]}bit(e){let n=this.probs,r=n[e],a=Math.imul(this.range>>>11,r),i=0;return(this.code^2147483648)<(a^2147483648)?(this.range=a,n[e]=r+(2048-r>>5)):(this.range=this.range-a|0,this.code=this.code-a|0,n[e]=r-(r>>5),i=1),this.range>>>24||(this.at>=this.data.length&&k("the stream ends early"),this.range<<=8,this.code=this.code<<8|this.data[this.at++]),i}direct(e){let n=0;for(let r=0;r<e;r+=1){this.range>>>=1;let a=(this.code^2147483648)>=(this.range^2147483648)?1:0;a&&(this.code=this.code-this.range|0),n=n*2+a,this.range>>>24||(this.at>=this.data.length&&k("the stream ends early"),this.range<<=8,this.code=this.code<<8|this.data[this.at++])}return n}tree(e,n){let r=1;for(let a=0;a<n;a+=1)r=r<<1|this.bit(e+r);return r-(1<<n)}reversed(e,n){let r=1,a=0;for(let i=0;i<n;i+=1){let o=this.bit(e+r);r=r<<1|o,a|=o<<i}return a}span(e,n){return this.bit(e+0)?this.bit(e+0+1)?16+this.tree(e+258,8):8+this.tree(e+130+(n<<3),3):this.tree(e+2+(n<<3),3)}distance(e){let n=this.tree(432+(Math.min(e,3)<<6),6);if(n<4)return n;let r=(n>>1)-1,a=(2|n&1)*2**r;return n<14?a+this.reversed(688+a-n-1,r):a+this.direct(r-4)*16+this.reversed(802,4)}room(e){if(this.length+e<=this.bytes.length)return;let n=new Uint8Array(Math.max(this.bytes.length*2,this.length+e));n.set(this.bytes.subarray(0,this.length)),this.bytes=n}literal(){let e=this.bytes,n=this.length,r=n?e[n-1]:0,a=1846+768*(((n&this.positionMask)<<this.context)+(r>>8-this.context)),i=1;if(this.state>=7){let s=e[n-this.recent0-1];for(;i<256;){let l=s>>7&1;s<<=1;let c=this.bit(a+(1+l<<8)+i);if(i=i<<1|c,c!==l)break}}for(;i<256;)i=i<<1|this.bit(a+i);this.room(1),this.bytes[this.length++]=i&255;let o=this.state;this.state=o<4?0:o<10?o-3:o-6}copy(e){this.room(e);let n=this.bytes,r=this.length-this.recent0-1;for(let a=0;a<e;a+=1)n[this.length+a]=n[r+a];this.length+=e}until(e){for(;!this.done&&this.length<e;)this.step();return this.bytes}step(){let e=this.length&this.matchMask,n=this.state;if(!this.bit(0+(n<<4|e))){this.literal();return}let a=this.bit(192+n)?this.repeat(n,e):this.fresh(n,e);this.done||(this.recent0>=this.length&&k("a match reaches before the start"),this.copy(a+2))}fresh(e,n){this.recent3=this.recent2,this.recent2=this.recent1,this.recent1=this.recent0;let r=this.span(818,n);return this.state=e<7?7:10,this.recent0=this.distance(r),this.done=this.recent0===4294967295,r}repeat(e,n){if(this.length||k("a repeat before any byte"),this.bit(204+e))this.rotate(e);else if(!this.bit(240+(e<<4|n)))return this.state=e<7?9:11,-1;return this.state=e<7?8:11,this.span(1332,n)}rotate(e){let n=this.recent1;this.bit(216+e)&&(n=this.recent2,this.bit(228+e)&&(n=this.recent3,this.recent3=this.recent2),this.recent2=this.recent1),this.recent1=this.recent0,this.recent0=n}},It=(t,e)=>{let n=new G(t,e);return n.until(Number.POSITIVE_INFINITY),n.bytes.subarray(0,n.length)};var _="PLEVIN\0",Je=2,Nt=16384,Ut=512,wt=new Set(" -,./()&_+'"),Pt=1e4,Bt=255,se=16384,vt=["place","network","abuse","prefix","rpki","roas","rir","country","since"],Lt=new Set(["place","network","abuse"]),kt=new Set(["signed","delta"]),Xe="network",Gt={rpki:"rpki",rir:"rirs",country:"countries","place.granularity":"granularity","city.timezone":"timezones","city.type":"place_types","operator.category":"categories","abuse.user_type":"categories","abuse.service":"services","abuse.evidence":"evidence","abuse.threat":"threats","abuse.level":"levels"},_t=t=>t===Bt?null:t/100,Kt={"abuse.risk":_t,"abuse.is_anycast":Boolean,"abuse.is_satellite":Boolean},ce=new TextDecoder,xt=new TextEncoder,Ot=(t,e,n)=>{let r="";for(let a=e;a<n;a+=1){if(t[a]>127)return null;r+=String.fromCharCode(t[a])}return r},Ft=(t,e,n)=>{let r=new Uint8Array(e+n.length);return r.set(t.subarray(0,e)),r.set(n,e),r},D=(t,e=Nt)=>{let n=new Map;return r=>{let a=n.get(r);if(a!==void 0)return a;n.size>=e&&n.clear();let i=t(r);return n.set(r,i),i}},me=(t,e)=>{let n=0,r=1;for(;;){let a=t[e];if(e+=1,n+=(a&127)*r,a<128)return[n,e];r*=128}},ue=(t,e,n)=>{let r=[];for(let a=0;a<n;a+=1){let[i,o]=me(t,e);r.push(i),e=o}return[r,e]},le=(t,e,n)=>{let r=[];for(let a=0;a<n;a+=1){let i=0n,o=0n;for(;;){let s=t[e];if(e+=1,i|=BigInt(s&127)<<o,s<128)break;o+=7n}r.push(i)}return[r,e]},K=class{count;read;perBlock;perGroup;fanout;width;blocks;keys;offsets;data;tuning;cache;groups;constructor(e,n){let r=new DataView(e.buffer,e.byteOffset,e.byteLength);this.count=n.count,this.read=n.read,this.perBlock=n.block,this.perGroup=n.group,this.fanout=this.perBlock/this.perGroup,this.blocks=r.getUint32(0,!0),this.width=r.getUint32(4,!0),this.offsets=new Uint32Array(this.blocks+1);for(let i=0;i<=this.blocks;i+=1)this.offsets[i]=r.getUint32(8+i*4,!0);let a=8+4*(this.blocks+1);this.keys=[];for(let i=0;i<this.blocks;i+=1){let o=0n;for(let s=0;s<this.width;s+=1)o=o<<8n|BigInt(e[a+i*this.width+s]);this.keys.push(o)}a+=this.width*this.blocks,this.tuning=n.lzma,this.data=e.subarray(a),this.cache=D(i=>this.block(i)),this.groups=D(i=>this.values(i))}stream(e){let n=this.data.subarray(this.offsets[e],this.offsets[e+1]);return new G(n,this.tuning)}held(e){return Math.min(this.perGroup,this.count-e*this.perGroup)}block(e){throw new Error(`no block ${e}`)}values(e){throw new Error(`no group ${e}`)}at(e){throw new Error(`no row ${e}`)}},Ht=(t,e,n,r)=>{let a=0;for(let o=n-1;o>=0;o-=1)a=a*256+t[e+o];let i=2**(n*8);return r&&a>=i/2?a-i:a},Y=class extends K{signed;constructor(e,n){super(e,n),this.signed=kt.has(n.encoding)}block(e){return this.stream(e)}value(e,n){let r=e.until(1)[0],a=e.until(1+(n+1)*r);return Ht(a,1+n*r,r,this.signed)}at(e){return this.value(this.cache(Math.floor(e/this.perBlock)),e%this.perBlock)}rows(e){let n=[];for(let r=0;r<this.count;r+=1)this.at(r)===e&&n.push(r);return n}},de=class extends Y{sums=D(e=>({values:[],running:0}));at(e){let n=Math.floor(e/this.perBlock),r=e%this.perBlock,a=this.sums(n),i=this.cache(n);for(;a.values.length<=r;)a.running+=this.value(i,a.values.length),a.values.push(a.running);return a.values[r]}},pe=class extends K{block(e){let n=this.stream(e),r=this.count-e*this.perBlock,a=Math.min(this.fanout,Math.ceil(r/this.perGroup))-1,[i,o]=ue(n.until(a*3),0,a),s=[o];for(let l of i)s.push(s[s.length-1]+l);return s.push(Number.POSITIVE_INFINITY),[n,s]}values(e){let n=Math.floor(e/this.fanout),[r,a]=this.cache(n),i=r.until(a[e%this.fanout+1]),o=a[e%this.fanout],s=[],l="",c=null;for(let u=0;u<this.held(e);u+=1){let d=i[o],p=i[o+1];o+=2,p>127&&([p,o]=me(i,o-1));let f=c===null?Ot(i,o,o+p):null;f===null?(c=Ft(c??xt.encode(l),d,i.subarray(o,o+p)),l=ce.decode(c)):l=l.slice(0,d)+f,o+=p,s.push(l)}return s}at(e){if(!e)return"";let n=Math.floor((e-1)/this.perGroup);return this.groups(n)[(e-1)%this.perGroup]}},fe=class extends K{hostBits;big;constructor(e,n){super(e,n),this.big=this.width!==4,this.hostBits=this.big?64:0}block(e){let n=this.stream(e),r=n.until(3+this.fanout*(this.big?22:8)),[a,i]=me(r,0),o=Math.ceil(a/this.perGroup),[s,l]=le(r,i,o-1),c=[this.keys[e]];for(let f of s)c.push(c[c.length-1]+f);let[u,d]=ue(r,l,o-1),p=[d];for(let f of u)p.push(p[p.length-1]+f);return p.push(Number.POSITIVE_INFINITY),[c,p,n]}values(e){let n=Math.floor(e/this.fanout),[r,a,i]=this.cache(n),o=i.until(a[e%this.fanout+1]),s=this.held(e),l=r[e%this.fanout],[c,u]=this.big?le(o,a[e%this.fanout],s-1):ue(o,a[e%this.fanout],s-1);if(!this.big){let f=[Number(l)];for(let h of c)f.push(f[f.length-1]+h);return f}let d=[l>>BigInt(this.hostBits)];for(let f of c)d.push(d[d.length-1]+f);let[p]=le(o,u,s);return d.map((f,h)=>f<<BigInt(this.hostBits)|p[h])}at(e){let n=Math.floor(e/this.perGroup);return this.groups(n)[e%this.perGroup]}row(e){let n=(this.big,e),r=$(this.keys,this.big?n:BigInt(n))-1;if(r<0)return null;let[a]=this.cache(r),i=r*this.fanout+$(a,this.big?n:BigInt(n))-1,o=$(this.groups(i),n)-1;return o<0?null:i*this.perGroup+o}holds(e){let n=this.row(e);return n!==null&&this.at(n)===e?n:null}},$=(t,e)=>{let n=0,r=t.length;for(;n<r;){let a=n+r>>1;t[a]<=e?n=a+1:r=a}return n},Vt={plain:[],text:[],degrees:[],coded:[],links:[]},Wt={index:fe,front:pe,delta:de},x=class{head;sections={};reads={};tables={};families;rows={};located;answers=D(e=>this.answer(e));words=null;constructor(e){let n=new DataView(e.buffer,e.byteOffset,e.byteLength);if(ce.decode(e.subarray(0,_.length))!==_||e[_.length]!==Je)throw new Error(`not a plevin ${Je} database`);let a=n.getUint32(_.length+1,!0),i=_.length+5;this.head=JSON.parse(ce.decode(e.subarray(i,i+a)));let o=i+a;for(let[s,l]of Object.entries(this.head.sections)){let c=o+l.offset,u=e.subarray(c,c+l.bytes);this.sections[s]=new(Wt[l.encoding]??Y)(u,l)}Object.assign(this.reads,Kt);for(let[s,l]of Object.entries(Gt)){let c=this.head.vocabularies[l];c&&(this.reads[s]=u=>c[u]??"")}this.plan(),this.families={4:this.family(4),6:this.family(6)},this.located={4:D(s=>this.locateIn(4,s)),6:D(s=>this.locateIn(6,s))}}linked(e,n){return this.rows[e]??=D(r=>this.row(e,r)),this.rows[e](n)}get built(){return this.head.built}get selection(){return this.head.selection}get fields(){return this.head.fields}plan(){for(let[e,n]of Object.entries(this.sections)){let r=e.split(".");if(r.length!==3||r[0]!=="col"&&r[0]!=="link")continue;let[a,i,o]=r;this.tables[i]??={plain:[],text:[],degrees:[],coded:[],links:[]};let s=this.tables[i],l=this.reads[`${i}.${o}`];a==="link"?s.links.push([o,n]):l?s.coded.push([o,n,l]):n.read==="text"?s.text.push([o,n,this.sections.strings]):n.read?s.degrees.push([o,n]):s.plain.push([o,n])}}family(e){let n=`spine.v${e}`,r=`hosts.v${e}`;return{index:this.sections[n]??null,columns:vt.filter(a=>`${n}.${a}`in this.sections).map(a=>[a,this.sections[`${n}.${a}`],this.reads[a]??null]),hosts:this.sections[r]??null,records:this.sections[`${r}.abuse`]??null}}row(e,n){let r=this.tables[e]??Vt,a={};for(let[i,o]of r.plain)a[i]=o.at(n);for(let[i,o,s]of r.text)a[i]=s.at(o.at(n));for(let[i,o]of r.degrees)a[i]=o.at(n)/Pt;for(let[i,o,s]of r.coded)a[i]=s(o.at(n));for(let[i,o]of r.links){let s=o.at(n);s&&(a[i]=this.linked(i,s-1))}return"postal_partial"in a&&(a.postal_partial=String(a.postal).slice(0,a.postal_partial)),a}answer(e){let n=e%2?6:4,r=(e-e%2)/2,a=r%se,i=(r-a)/se,o={};for(let[s,l,c]of this.families[n].columns){let u=a&&s==="abuse"?a:l.at(i);Lt.has(s)?u&&(o[s]=this.linked(s,u-1)):(o[Xe]??={},o[Xe][s]=c?c(u):u)}return o}locateIn(e,n){let{index:r,hosts:a,records:i}=this.families[e],o=r===null?null:r.row(n);if(o===null)return null;if(a===null||i===null)return[e,o,0];let s=a.holds(n);return[e,o,s===null?0:i.at(s)+1]}locate(e,n){return this.located[n?6:4](e)}rowFor(e,n){let r=this.locate(e,n);return r===null?null:this.answerFor(r)}answerFor(e){let[n,r,a]=e;return this.answers((r*se+a)*2+(n===6?1:0))}seek(e,n){let r=0,a=e.count;for(;r<a;){let i=r+a>>1;e.at(i)<n?r=i+1:a=i}return r}systemAt(e){let n=this.sections["col.network.asn"];if(!n||e<=0)return-1;let r=this.seek(n,e);return r<n.count&&n.at(r)===e?r:-1}system(e){let n=this.systemAt(e);return n<0?null:this.linked("network",n)}spans(e,n){let r=this.sections[`spine.v${n}`],a=this.sections[`spine.v${n}.network`],i=this.sections[`spine.v${n}.prefix`];if(!r||!a||!i)return[];let o=BigInt(n===6?128:32),s=new Set,l=[];for(let c of a.rows(e+1)){let u=i.at(c),d=o-BigInt(u),p=BigInt(r.at(c))>>d<<d,f=`${p}/${u}`;s.has(f)||(s.add(f),l.push([p,u]))}return l}searchable(){let e=this.sections["col.network.asn"],n=this.sections["col.network.handle"],r=this.sections["link.network.operator"],a=this.sections["link.network.carrier"],i=this.sections["col.operator.company"],o=this.sections["col.operator.peering"],s=this.sections["col.carrier.user_count"],l=this.sections.strings,c=[],u=[0],d=[],p=[];for(let f=this.seek(e,1);f<e.count;f+=1){let h=r.at(f),A=a.at(f),F=h?l.at(i.at(h-1)):"",J=h?o.at(h-1):0,on=A?s.at(A-1):0,be=`${l.at(n.at(f))} ${F}`.toLowerCase();c.push(be),u.push(u[u.length-1]+be.length+1),d.push(J+32-Math.clz32(on)),p.push(f)}return{haystack:c.join(`
|
|
626
|
+
`),starts:u,weights:d,rows:p}}find(e,n){let r=e.trim().toLowerCase();if(!r||!("col.network.asn"in this.sections))return[];this.words??=this.searchable();let{haystack:a,starts:i,weights:o,rows:s}=this.words,l=[],c=a.indexOf(r);for(;c>=0&&l.length<Ut;){let u=$(i,c)-1,d=i[u],p=i[u+1],f=c>d&&!wt.has(a[c-1])?1:0;l.push([f,-o[u],p-d,u]),c=a.indexOf(r,p)}return l.sort((u,d)=>u[0]-d[0]||u[1]-d[1]||u[2]-d[2]),l.slice(0,n).map(([,,,u])=>this.linked("network",s[u]))}};var Qe=1024,er=1n<<128n,m=t=>t?String(t):null,T=t=>t?Number(t):null,j=t=>t==null?null:Number(t),b=(t,e)=>t?.[e],nr=t=>t?{code:T(t.code),label:m(t.label)}:null,tr=t=>t?{id:T(t.id),code:m(t.code),name:m(t.name)}:null,rr=t=>t?{id:T(t.id),code:m(t.code),iso:m(t.iso),name:m(t.name),type:m(t.type)}:null,he=t=>{let e=new WeakMap;return(n,...r)=>{if(!n)return null;let a=r.join(`
|
|
627
|
+
`),i=e.get(n);i||(i=new Map,e.set(n,i));let o=i.get(a);if(o!==void 0)return o;let s=t(n,...r);return i.set(a,s),s}},Te=he(t=>{let e=String(t.type??"");return{id:T(t.id),name:m(t.name),ascii:m(t.ascii),country:m(t.country),population:T(t.population),elevation:T(t.elevation),postal:m(t.postal),postal_partial:m(t.postal_partial),timezone:m(t.timezone),type:m(e),capital:m(Le(e)),region:rr(b(t,"region")),district:tr(b(t,"district")),metro:nr(b(t,"metro"))}}),ar=he((t,e)=>{let n=Te(t);return{id:null,name:null,ascii:null,country:n.country,population:null,elevation:null,postal:null,postal_partial:null,timezone:n.timezone,type:null,capital:null,region:e==="region"?n.region:null,district:null,metro:null}}),ir=he((t,e,n)=>{let r=String(t.company??""),a=String(t.website??""),i=String(t.abuse_email??"");return{company:m(r),brand:m(n||Pe(e,r)),domain:m(Be(a,i)),website:m(a),category:m(t.category),tier:T(t.tier),peering:T(t.peering),scope:m(t.scope),rir:m(t.rir),since:T(t.since),street:m(t.street),state:m(t.state),postal:m(t.postal),country:m(t.country),abuse_email:m(i),city:Te(b(t,"city"))}}),or=(t,e)=>{if(!t&&!e)return null;let n=t??{};return{user_type:m(e),user_count:T(n.user_count),mcc:T(n.mcc),mnc:T(n.mnc),is_mobile:e==="cellular"}},tn=(t,e,n,r)=>{if(!t&&!e)return null;let a=t??{},[i,o]=ve(String(a.service??""),n),s=String(a.name??""),l=String(a.level??"");return{name:m(s),provider:m(s||(i?r:"")),service:m(i),evidence:m(String(a.evidence??"")||o),threat:m(String(a.threat??"")),level:m(l),risk:j(a.risk),network_risk:e?j(e.risk):null,last_seen_days:T(a.last_seen_days),is_malicious:!!l,is_anycast:!!a.is_anycast,is_satellite:!!a.is_satellite,is_crawler:n===Ie,is_hosting_provider:De.has(n),is_proxy:Me.has(i),is_public_proxy:i==="public_proxy",is_residential_proxy:i==="residential_proxy",is_anonymous_vpn:i==="anonymous_vpn",is_tor_exit_node:i==="tor_exit_node",is_private_relay:i==="private_relay",is_anonymous:!!i}},sr={company:null,brand:null,domain:null,website:null,category:null,tier:null,peering:null,scope:null,rir:null,since:null,street:null,state:null,postal:null,country:null,abuse_email:null,city:null},lr=t=>{if(!t)return null;let e=String(t.granularity??""),n=b(t,"city"),r=e==="city"||!e?Te(n):ar(n,e),a=r?.country??"",i=r?.timezone??"";return[{lat:j(t.lat),lon:j(t.lon),accuracy:T(t.accuracy),confidence:T(t.confidence),granularity:m(t.granularity),city:r,country:Fe(a)},i]},cr=(t,e,n)=>{let r=b(t,"operator");return r?ir(r,e,n):n?{...sr,brand:n}:null},rn=(t,e)=>{let n=String(t.handle??"");return[{asn:T(t.asn),handle:m(n),rir:m(t.rir),country:m(t.country),since:T(t.since),rpki:m(t.rpki),roas:T(t.roas),operator:cr(t,n,String(t.brand??"")),carrier:or(b(t,"carrier"),e)},T(t.prefix)]},an=(t,e)=>String(t?.user_type||e?.user_type||""),ur=t=>{let e=b(t,"network"),n=e&&Object.values(e).some(Boolean)?e:void 0,r=b(n,"abuse"),a=an(b(t,"abuse"),r),i=n?rn(n,a):null,o=i?.[0].operator?.brand??"";return[lr(b(t,"place")),i,tn(b(t,"abuse"),r,a,o)]},qe=t=>{let e=b(t,"abuse"),n=an(void 0,e),{asn:r,handle:a,operator:i,carrier:o}=rn(t,n)[0];return{asn:r,handle:a,found:!0,network:{asn:r,handle:a,prefix:null,cidr:null,start:null,end:null,rir:null,country:null,since:null,rpki:null,roas:null,operator:i,carrier:o},abuse:tn(void 0,e,n,i?.brand??"")}},dr=(t,e)=>{let n=0n,r=0n;for(let[a,i]of[...t].sort(([o],[s])=>o<s?-1:1)){let o=a+(1n<<e-BigInt(i));o<=r||(n+=o-(a>r?a:r),r=o)}return n},en=(t,e,n)=>{let r=n===6,a=r?128n:32n,i=t.spans(e,n);return i.sort((s,l)=>s[1]-l[1]||(s[0]<l[0]?-1:1)),[i.map(([s,l])=>{let[c,u,d]=ee(s,r,l),p=1n<<a-BigInt(l);return{cidr:c,start:u,end:d,version:n,prefix:l,addresses:r?p:Number(p)}}),dr(i,a)]},nn=t=>{let e=String(t).trim().toLowerCase().replace(/^as/,"");return/^\d+$/.test(e)?Number(e):0},pr=(t,e,n)=>{let[r,a]=t,[i,o,s]=a===null?[null,null,null]:ee(e,n,a);return{...r,prefix:a,cidr:i,start:o,end:s}},fr=(t,e,n,r,a=null)=>{let[i,o,s]=I(t,e),l=Ee(t,e),[c,u]=N(t,e),[d,p,f]=Ce(t,e),h=Re(t,e),[A,F,J]=n??[null,null,null];return{ip:i,version:e?6:4,number:t,compressed:i,expanded:o,arpa:s,is_global:l===0,is_bogon:l!==0,is_private:(l&1)!==0,is_loopback:(l&2)!==0,is_multicast:(l&4)!==0,is_reserved:(l&8)!==0,is_link_local:(l&16)!==0,is_unique_local:(l&32)!==0,is_documentation:(l&64)!==0,is_shared:(l&128)!==0,is_benchmark:(l&256)!==0,is_ipv4_mapped:c===X,is_6to4:c===Q,is_teredo:c===q,tunnel:c,embedded_ipv4:u,decimal_ipv4:h,as_ipv4_mapped:d,as_6to4:p,as_nat64:f,found:n!==null,place:A===null?null:{...A[0],time:Ve(A[1],r)},network:F===null?null:pr(F,t,e),abuse:J,dns:a}},O=class{file;kept=new Map;results=new Map;announced=new Map;second=0;constructor(e){this.file=new x(e)}get built(){return this.file.built}get selection(){return this.file.selection}get fields(){return this.file.fields}storedFor(e){let n=e.join(","),r=this.kept.get(n);if(r!==void 0)return r;this.kept.size>=Qe*16&&this.kept.clear();let a=ur(this.file.answerFor(e));return this.kept.set(n,a),a}answerFor(e,n,r){let a=this.file.locate(e,n);return fr(e,n,a&&this.storedFor(a),r)}lookup(e,n){let[r,a]=g(e);if(n)return this.answerFor(r,a,n);let i=Math.floor(Date.now()/1e3);i!==this.second&&(this.second=i,this.results.clear());let o=a?r+er:BigInt(r),s=this.results.get(o);if(s!==void 0)return s;this.results.size>=Qe&&this.results.clear();let l=this.answerFor(r,a);return this.results.set(o,l),l}async resolve(e,n){let r=this.lookup(e,n?.moment);if(!n?.dns)return r;let[a,i]=g(e);return{...r,dns:await oe(a,i)}}system(e){let n=nn(e),r=this.file.system(n);return r?qe(r):{asn:n||null,handle:null,found:!1,network:null,abuse:null}}routes(e){let n=nn(e),r=this.announced.get(n);if(r)return r;let a=this.file.systemAt(n);if(a<0)return{asn:n||null,found:!1,ipv4:[],ipv6:[],ipv4_addresses:0,ipv6_addresses:0n};let[i,o]=en(this.file,a,4),[s,l]=en(this.file,a,6),c={asn:n,found:!0,ipv4:i,ipv6:s,ipv4_addresses:Number(o),ipv6_addresses:l};return this.announced.set(n,c),c}search(e,n=20){let r=this.system(e);return r.found?[r]:this.file.find(e,n).map(qe)}row(e){let[n,r]=g(e);return this.file.rowFor(n,r)}},Ur=async t=>{if(t instanceof Uint8Array)return new O(t);if(t instanceof ArrayBuffer)return new O(new Uint8Array(t));let e=t instanceof Response?t:await fetch(t);if(!e.ok)throw new Error(`${e.status} reading the database`);return new O(new Uint8Array(await e.arrayBuffer()))};export{x as File,O as Plevin,P as ask,It as decompress,$e as facts,oe as named,Ur as open,Mt as publicAddress,L as records};
|