pakdatakit 1.1.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +907 -666
- package/dist/address.cjs +17 -0
- package/dist/address.d.cts +36 -0
- package/dist/address.d.ts +36 -0
- package/dist/address.js +4 -0
- package/dist/chunk-3COX5FSL.cjs +1650 -0
- package/dist/chunk-422X6FEZ.cjs +220 -0
- package/dist/chunk-432ZYMYV.js +31 -0
- package/dist/chunk-4VVFS6FN.cjs +715 -0
- package/dist/chunk-6TSKA2PH.js +38 -0
- package/dist/chunk-APXP7OK7.cjs +226 -0
- package/dist/chunk-AUATLZA5.cjs +168 -0
- package/dist/chunk-BSS4Z7NI.cjs +422 -0
- package/dist/chunk-CEPNSHIC.js +33 -0
- package/dist/chunk-CQKK3S7A.js +217 -0
- package/dist/chunk-CYJJ7KGC.cjs +108 -0
- package/dist/chunk-EEVNLTB4.js +32 -0
- package/dist/chunk-ENQ7O7VW.js +32 -0
- package/dist/chunk-H4DVWUYH.js +231 -0
- package/dist/chunk-H6M6L26S.cjs +37 -0
- package/dist/chunk-HBOZIITD.js +351 -0
- package/dist/chunk-HTCSHHOR.cjs +35 -0
- package/dist/chunk-JKE4AMSZ.js +47 -0
- package/dist/chunk-K6CZFCX6.js +1642 -0
- package/dist/chunk-KEHCTYLO.cjs +52 -0
- package/dist/chunk-KQKW2ZEK.cjs +18 -0
- package/dist/chunk-L2BDDM2W.js +165 -0
- package/dist/chunk-L45UXUWX.js +21 -0
- package/dist/chunk-LIYNKIKS.js +709 -0
- package/dist/chunk-LVHTH4P7.cjs +41 -0
- package/dist/chunk-OVUR47QH.cjs +22 -0
- package/dist/chunk-P4CGOJEM.js +16 -0
- package/dist/chunk-PHHKIMO2.cjs +35 -0
- package/dist/chunk-QQQKISXT.js +223 -0
- package/dist/chunk-T3E4B5MJ.js +417 -0
- package/dist/chunk-VPBMIYO2.cjs +38 -0
- package/dist/chunk-WPKV5JT3.cjs +235 -0
- package/dist/chunk-XCXFGTHW.cjs +355 -0
- package/dist/chunk-XT4ZNXRC.js +20 -0
- package/dist/chunk-Y6BUGLXU.js +95 -0
- package/dist/chunk-YLWZGSFY.cjs +99 -0
- package/dist/chunk-YS7MOLK2.cjs +23 -0
- package/dist/chunk-Z5JEIQVW.js +102 -0
- package/dist/cli.js +78 -2654
- package/dist/cnic.cjs +15 -0
- package/dist/cnic.d.cts +35 -0
- package/dist/cnic.d.ts +35 -0
- package/dist/cnic.js +2 -0
- package/dist/format.cjs +14 -0
- package/dist/format.d.cts +27 -0
- package/dist/format.d.ts +27 -0
- package/dist/format.js +1 -0
- package/dist/geo.cjs +27 -0
- package/dist/geo.d.cts +43 -0
- package/dist/geo.d.ts +43 -0
- package/dist/geo.js +2 -0
- package/dist/hijri.cjs +26 -0
- package/dist/hijri.d.cts +62 -0
- package/dist/hijri.d.ts +62 -0
- package/dist/hijri.js +1 -0
- package/dist/holidays.cjs +19 -0
- package/dist/holidays.d.cts +72 -0
- package/dist/holidays.d.ts +72 -0
- package/dist/holidays.js +2 -0
- package/dist/iban.cjs +15 -0
- package/dist/iban.d.cts +21 -0
- package/dist/iban.d.ts +21 -0
- package/dist/iban.js +2 -0
- package/dist/index.cjs +211 -0
- package/dist/index.d.cts +16 -0
- package/dist/index.d.ts +16 -300
- package/dist/index.js +18 -2764
- package/dist/networks.cjs +12 -0
- package/dist/networks.d.cts +20 -0
- package/dist/networks.d.ts +20 -0
- package/dist/networks.js +3 -0
- package/dist/numbers.cjs +24 -0
- package/dist/numbers.d.cts +53 -0
- package/dist/numbers.d.ts +53 -0
- package/dist/numbers.js +3 -0
- package/dist/phone.cjs +29 -0
- package/dist/phone.d.cts +56 -0
- package/dist/phone.d.ts +56 -0
- package/dist/phone.js +4 -0
- package/dist/postal.cjs +27 -0
- package/dist/postal.d.cts +40 -0
- package/dist/postal.d.ts +40 -0
- package/dist/postal.js +2 -0
- package/dist/raast.cjs +20 -0
- package/dist/raast.d.cts +119 -0
- package/dist/raast.d.ts +119 -0
- package/dist/raast.js +3 -0
- package/dist/rules-GxgPiVws.d.cts +7 -0
- package/dist/rules-GxgPiVws.d.ts +7 -0
- package/dist/tax.cjs +20 -0
- package/dist/tax.d.cts +47 -0
- package/dist/tax.d.ts +47 -0
- package/dist/tax.js +3 -0
- package/dist/text.cjs +23 -0
- package/dist/text.d.cts +34 -0
- package/dist/text.d.ts +34 -0
- package/dist/text.js +2 -0
- package/dist/valibot.cjs +47 -0
- package/dist/valibot.d.cts +22 -0
- package/dist/valibot.d.ts +22 -0
- package/dist/valibot.js +25 -0
- package/dist/whatsapp.cjs +12 -0
- package/dist/whatsapp.d.cts +12 -0
- package/dist/whatsapp.d.ts +12 -0
- package/dist/whatsapp.js +3 -0
- package/dist/words.cjs +14 -0
- package/dist/words.d.cts +49 -0
- package/dist/words.d.ts +49 -0
- package/dist/words.js +1 -0
- package/dist/yup.cjs +32 -0
- package/dist/yup.d.cts +22 -0
- package/dist/yup.d.ts +22 -0
- package/dist/yup.js +30 -0
- package/dist/zod.cjs +27 -0
- package/dist/zod.d.cts +22 -0
- package/dist/zod.d.ts +22 -0
- package/dist/zod.js +25 -0
- package/package.json +309 -77
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,2764 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return CNIC_PATTERN.test(digits);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// src/internal/phone-utils.ts
|
|
23
|
-
function normalizePhoneDigits(phone) {
|
|
24
|
-
let digits = stripSeparators(phone);
|
|
25
|
-
if (digits.startsWith("+")) {
|
|
26
|
-
digits = digits.slice(1);
|
|
27
|
-
}
|
|
28
|
-
if (digits.startsWith("00")) {
|
|
29
|
-
digits = digits.slice(2);
|
|
30
|
-
}
|
|
31
|
-
if (digits.startsWith("92")) {
|
|
32
|
-
digits = digits.slice(2);
|
|
33
|
-
} else if (digits.startsWith("0")) {
|
|
34
|
-
digits = digits.slice(1);
|
|
35
|
-
}
|
|
36
|
-
if (!/^\d+$/.test(digits)) {
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
if (digits.length !== 10 || !digits.startsWith("3")) {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
return `92${digits}`;
|
|
43
|
-
}
|
|
44
|
-
function getPhonePrefix(phone) {
|
|
45
|
-
const digits = normalizePhoneDigits(phone);
|
|
46
|
-
if (digits === null) {
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
const local = digits.slice(2);
|
|
50
|
-
return `0${local.slice(0, 3)}`;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// data/networks.json
|
|
54
|
-
var networks_default = [
|
|
55
|
-
{ prefix: "0300", network: "Jazz" },
|
|
56
|
-
{ prefix: "0301", network: "Jazz" },
|
|
57
|
-
{ prefix: "0302", network: "Jazz" },
|
|
58
|
-
{ prefix: "0303", network: "Jazz" },
|
|
59
|
-
{ prefix: "0304", network: "Jazz" },
|
|
60
|
-
{ prefix: "0305", network: "Jazz" },
|
|
61
|
-
{ prefix: "0306", network: "Jazz" },
|
|
62
|
-
{ prefix: "0307", network: "Jazz" },
|
|
63
|
-
{ prefix: "0308", network: "Jazz" },
|
|
64
|
-
{ prefix: "0309", network: "Jazz" },
|
|
65
|
-
{ prefix: "0320", network: "Jazz" },
|
|
66
|
-
{ prefix: "0321", network: "Jazz" },
|
|
67
|
-
{ prefix: "0322", network: "Jazz" },
|
|
68
|
-
{ prefix: "0323", network: "Jazz" },
|
|
69
|
-
{ prefix: "0324", network: "Jazz" },
|
|
70
|
-
{ prefix: "0325", network: "Jazz" },
|
|
71
|
-
{ prefix: "0326", network: "Jazz" },
|
|
72
|
-
{ prefix: "0327", network: "Jazz" },
|
|
73
|
-
{ prefix: "0328", network: "Jazz" },
|
|
74
|
-
{ prefix: "0310", network: "Zong" },
|
|
75
|
-
{ prefix: "0311", network: "Zong" },
|
|
76
|
-
{ prefix: "0312", network: "Zong" },
|
|
77
|
-
{ prefix: "0313", network: "Zong" },
|
|
78
|
-
{ prefix: "0314", network: "Zong" },
|
|
79
|
-
{ prefix: "0315", network: "Zong" },
|
|
80
|
-
{ prefix: "0316", network: "Zong" },
|
|
81
|
-
{ prefix: "0317", network: "Zong" },
|
|
82
|
-
{ prefix: "0318", network: "Zong" },
|
|
83
|
-
{ prefix: "0319", network: "Zong" },
|
|
84
|
-
{ prefix: "0370", network: "Zong" },
|
|
85
|
-
{ prefix: "0371", network: "Zong" },
|
|
86
|
-
{ prefix: "0330", network: "Ufone" },
|
|
87
|
-
{ prefix: "0331", network: "Ufone" },
|
|
88
|
-
{ prefix: "0332", network: "Ufone" },
|
|
89
|
-
{ prefix: "0333", network: "Ufone" },
|
|
90
|
-
{ prefix: "0334", network: "Ufone" },
|
|
91
|
-
{ prefix: "0335", network: "Ufone" },
|
|
92
|
-
{ prefix: "0336", network: "Ufone" },
|
|
93
|
-
{ prefix: "0337", network: "Ufone" },
|
|
94
|
-
{ prefix: "0338", network: "Ufone" },
|
|
95
|
-
{ prefix: "0339", network: "Ufone" },
|
|
96
|
-
{ prefix: "0340", network: "Telenor" },
|
|
97
|
-
{ prefix: "0341", network: "Telenor" },
|
|
98
|
-
{ prefix: "0342", network: "Telenor" },
|
|
99
|
-
{ prefix: "0343", network: "Telenor" },
|
|
100
|
-
{ prefix: "0344", network: "Telenor" },
|
|
101
|
-
{ prefix: "0345", network: "Telenor" },
|
|
102
|
-
{ prefix: "0346", network: "Telenor" },
|
|
103
|
-
{ prefix: "0347", network: "Telenor" },
|
|
104
|
-
{ prefix: "0348", network: "Telenor" },
|
|
105
|
-
{ prefix: "0349", network: "Telenor" }
|
|
106
|
-
];
|
|
107
|
-
|
|
108
|
-
// src/networks.ts
|
|
109
|
-
var PREFIX_MAP = new Map(
|
|
110
|
-
networks_default.map((entry) => [
|
|
111
|
-
entry.prefix,
|
|
112
|
-
entry.network
|
|
113
|
-
])
|
|
114
|
-
);
|
|
115
|
-
function getNetwork(phone) {
|
|
116
|
-
const prefix = getPhonePrefix(phone);
|
|
117
|
-
if (prefix === null) {
|
|
118
|
-
return "Unknown";
|
|
119
|
-
}
|
|
120
|
-
return PREFIX_MAP.get(prefix) ?? "Unknown";
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// src/phone.ts
|
|
124
|
-
var VALID_PHONE_PATTERN = /^\+923\d{9}$/;
|
|
125
|
-
function validatePhone(phone) {
|
|
126
|
-
const digits = normalizePhoneDigits(phone);
|
|
127
|
-
if (digits === null) {
|
|
128
|
-
return false;
|
|
129
|
-
}
|
|
130
|
-
return VALID_PHONE_PATTERN.test(`+${digits}`);
|
|
131
|
-
}
|
|
132
|
-
function formatPhone(phone) {
|
|
133
|
-
const digits = normalizePhoneDigits(phone);
|
|
134
|
-
if (digits === null) {
|
|
135
|
-
return "";
|
|
136
|
-
}
|
|
137
|
-
return `+${digits}`;
|
|
138
|
-
}
|
|
139
|
-
function analyzePhone(phone) {
|
|
140
|
-
if (!validatePhone(phone)) {
|
|
141
|
-
return {
|
|
142
|
-
valid: false,
|
|
143
|
-
formatted: null,
|
|
144
|
-
network: "Unknown"
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
return {
|
|
148
|
-
valid: true,
|
|
149
|
-
formatted: formatPhone(phone),
|
|
150
|
-
network: getNetwork(phone)
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
// data/cities.json
|
|
155
|
-
var cities_default = [
|
|
156
|
-
{
|
|
157
|
-
city: "Faisalabad",
|
|
158
|
-
province: "Punjab"
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
city: "Gujranwala",
|
|
162
|
-
province: "Punjab"
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
city: "Hyderabad",
|
|
166
|
-
province: "Sindh"
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
city: "Islamabad",
|
|
170
|
-
province: "Islamabad Capital Territory"
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
city: "Karachi",
|
|
174
|
-
province: "Sindh"
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
city: "Lahore",
|
|
178
|
-
province: "Punjab"
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
city: "Multan",
|
|
182
|
-
province: "Punjab"
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
city: "Peshawar",
|
|
186
|
-
province: "Khyber Pakhtunkhwa"
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
city: "Quetta",
|
|
190
|
-
province: "Balochistan"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
city: "Rawalpindi",
|
|
194
|
-
province: "Punjab"
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
city: "Sialkot",
|
|
198
|
-
province: "Punjab"
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
city: "Sukkur",
|
|
202
|
-
province: "Sindh"
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
city: "Ahmadpur East",
|
|
206
|
-
province: "Punjab"
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
city: "Ali Pur Chattha",
|
|
210
|
-
province: "Punjab"
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
city: "Aliabad",
|
|
214
|
-
province: "Gilgit-Baltistan"
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
city: "Alpuri",
|
|
218
|
-
province: "Khyber Pakhtunkhwa"
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
city: "Arifwala",
|
|
222
|
-
province: "Punjab"
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
city: "Athmuqam",
|
|
226
|
-
province: "Azad Jammu and Kashmir"
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
city: "Bagh City",
|
|
230
|
-
province: "Azad Jammu and Kashmir"
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
city: "Bahrain",
|
|
234
|
-
province: "Khyber Pakhtunkhwa"
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
city: "Batkhela",
|
|
238
|
-
province: "Khyber Pakhtunkhwa"
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
city: "Bela",
|
|
242
|
-
province: "Balochistan"
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
city: "Bhalwal",
|
|
246
|
-
province: "Punjab"
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
city: "Bhawana",
|
|
250
|
-
province: "Punjab"
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
city: "Burewala",
|
|
254
|
-
province: "Punjab"
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
city: "Burewala City",
|
|
258
|
-
province: "Punjab"
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
city: "Cantt",
|
|
262
|
-
province: "Punjab"
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
city: "Chak Jhumra",
|
|
266
|
-
province: "Punjab"
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
city: "Chaman Town",
|
|
270
|
-
province: "Balochistan"
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
city: "Chhor",
|
|
274
|
-
province: "Sindh"
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
city: "Chichawatni",
|
|
278
|
-
province: "Punjab"
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
city: "Chilas",
|
|
282
|
-
province: "Gilgit-Baltistan"
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
city: "Chishtian",
|
|
286
|
-
province: "Punjab"
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
city: "Chitral",
|
|
290
|
-
province: "Khyber Pakhtunkhwa"
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
city: "Chunian",
|
|
294
|
-
province: "Punjab"
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
city: "Clifton",
|
|
298
|
-
province: "Sindh"
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
city: "Daggar",
|
|
302
|
-
province: "Khyber Pakhtunkhwa"
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
city: "Dalbandin",
|
|
306
|
-
province: "Balochistan"
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
city: "Daska",
|
|
310
|
-
province: "Punjab"
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
city: "Daska City",
|
|
314
|
-
province: "Punjab"
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
city: "Defence",
|
|
318
|
-
province: "Sindh"
|
|
319
|
-
},
|
|
320
|
-
{
|
|
321
|
-
city: "Depalpur",
|
|
322
|
-
province: "Punjab"
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
city: "Dera Allah Yar",
|
|
326
|
-
province: "Balochistan"
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
city: "Dera Murad Jamali",
|
|
330
|
-
province: "Balochistan"
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
city: "Dhadar",
|
|
334
|
-
province: "Balochistan"
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
city: "Dina",
|
|
338
|
-
province: "Punjab"
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
city: "Diplo",
|
|
342
|
-
province: "Sindh"
|
|
343
|
-
},
|
|
344
|
-
{
|
|
345
|
-
city: "Dir",
|
|
346
|
-
province: "Khyber Pakhtunkhwa"
|
|
347
|
-
},
|
|
348
|
-
{
|
|
349
|
-
city: "Dunyapur",
|
|
350
|
-
province: "Punjab"
|
|
351
|
-
},
|
|
352
|
-
{
|
|
353
|
-
city: "Fort Abbas",
|
|
354
|
-
province: "Punjab"
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
city: "Gaddani",
|
|
358
|
-
province: "Balochistan"
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
city: "Gahkuch",
|
|
362
|
-
province: "Gilgit-Baltistan"
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
city: "Gambat",
|
|
366
|
-
province: "Sindh"
|
|
367
|
-
},
|
|
368
|
-
{
|
|
369
|
-
city: "Ghalanai",
|
|
370
|
-
province: "Khyber Pakhtunkhwa"
|
|
371
|
-
},
|
|
372
|
-
{
|
|
373
|
-
city: "Gojra",
|
|
374
|
-
province: "Punjab"
|
|
375
|
-
},
|
|
376
|
-
{
|
|
377
|
-
city: "Gujar Khan",
|
|
378
|
-
province: "Punjab"
|
|
379
|
-
},
|
|
380
|
-
{
|
|
381
|
-
city: "Gulberg",
|
|
382
|
-
province: "Punjab"
|
|
383
|
-
},
|
|
384
|
-
{
|
|
385
|
-
city: "Gulshan-e-Iqbal",
|
|
386
|
-
province: "Sindh"
|
|
387
|
-
},
|
|
388
|
-
{
|
|
389
|
-
city: "Hala",
|
|
390
|
-
province: "Sindh"
|
|
391
|
-
},
|
|
392
|
-
{
|
|
393
|
-
city: "Haroonabad",
|
|
394
|
-
province: "Punjab"
|
|
395
|
-
},
|
|
396
|
-
{
|
|
397
|
-
city: "Hasilpur",
|
|
398
|
-
province: "Punjab"
|
|
399
|
-
},
|
|
400
|
-
{
|
|
401
|
-
city: "Hattian Bala Town",
|
|
402
|
-
province: "Azad Jammu and Kashmir"
|
|
403
|
-
},
|
|
404
|
-
{
|
|
405
|
-
city: "Havelian",
|
|
406
|
-
province: "Khyber Pakhtunkhwa"
|
|
407
|
-
},
|
|
408
|
-
{
|
|
409
|
-
city: "Hub",
|
|
410
|
-
province: "Balochistan"
|
|
411
|
-
},
|
|
412
|
-
{
|
|
413
|
-
city: "Hujra Shah Muqeem",
|
|
414
|
-
province: "Punjab"
|
|
415
|
-
},
|
|
416
|
-
{
|
|
417
|
-
city: "Jampur",
|
|
418
|
-
province: "Punjab"
|
|
419
|
-
},
|
|
420
|
-
{
|
|
421
|
-
city: "Jaranwala",
|
|
422
|
-
province: "Punjab"
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
city: "Jaranwala City",
|
|
426
|
-
province: "Punjab"
|
|
427
|
-
},
|
|
428
|
-
{
|
|
429
|
-
city: "Jiwani",
|
|
430
|
-
province: "Balochistan"
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
city: "Kabirwala",
|
|
434
|
-
province: "Punjab"
|
|
435
|
-
},
|
|
436
|
-
{
|
|
437
|
-
city: "Kahuta",
|
|
438
|
-
province: "Punjab"
|
|
439
|
-
},
|
|
440
|
-
{
|
|
441
|
-
city: "Kalam",
|
|
442
|
-
province: "Khyber Pakhtunkhwa"
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
city: "Kalat Town",
|
|
446
|
-
province: "Balochistan"
|
|
447
|
-
},
|
|
448
|
-
{
|
|
449
|
-
city: "Kalaya",
|
|
450
|
-
province: "Khyber Pakhtunkhwa"
|
|
451
|
-
},
|
|
452
|
-
{
|
|
453
|
-
city: "Kallar Kahar",
|
|
454
|
-
province: "Punjab"
|
|
455
|
-
},
|
|
456
|
-
{
|
|
457
|
-
city: "Kallar Syedan",
|
|
458
|
-
province: "Punjab"
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
city: "Kamalia",
|
|
462
|
-
province: "Punjab"
|
|
463
|
-
},
|
|
464
|
-
{
|
|
465
|
-
city: "Kamoke",
|
|
466
|
-
province: "Punjab"
|
|
467
|
-
},
|
|
468
|
-
{
|
|
469
|
-
city: "Kandhkot",
|
|
470
|
-
province: "Sindh"
|
|
471
|
-
},
|
|
472
|
-
{
|
|
473
|
-
city: "Kandiaro",
|
|
474
|
-
province: "Sindh"
|
|
475
|
-
},
|
|
476
|
-
{
|
|
477
|
-
city: "Khaar",
|
|
478
|
-
province: "Khyber Pakhtunkhwa"
|
|
479
|
-
},
|
|
480
|
-
{
|
|
481
|
-
city: "Khairpur Nathan Shah",
|
|
482
|
-
province: "Sindh"
|
|
483
|
-
},
|
|
484
|
-
{
|
|
485
|
-
city: "Khanpur",
|
|
486
|
-
province: "Punjab"
|
|
487
|
-
},
|
|
488
|
-
{
|
|
489
|
-
city: "Khaplu",
|
|
490
|
-
province: "Gilgit-Baltistan"
|
|
491
|
-
},
|
|
492
|
-
{
|
|
493
|
-
city: "Kharian",
|
|
494
|
-
province: "Punjab"
|
|
495
|
-
},
|
|
496
|
-
{
|
|
497
|
-
city: "Khipro",
|
|
498
|
-
province: "Sindh"
|
|
499
|
-
},
|
|
500
|
-
{
|
|
501
|
-
city: "Khurrianwala",
|
|
502
|
-
province: "Punjab"
|
|
503
|
-
},
|
|
504
|
-
{
|
|
505
|
-
city: "Khuzdar City",
|
|
506
|
-
province: "Balochistan"
|
|
507
|
-
},
|
|
508
|
-
{
|
|
509
|
-
city: "Kohlu Town",
|
|
510
|
-
province: "Balochistan"
|
|
511
|
-
},
|
|
512
|
-
{
|
|
513
|
-
city: "Kot Abdul Malik",
|
|
514
|
-
province: "Punjab"
|
|
515
|
-
},
|
|
516
|
-
{
|
|
517
|
-
city: "Kot Momin",
|
|
518
|
-
province: "Punjab"
|
|
519
|
-
},
|
|
520
|
-
{
|
|
521
|
-
city: "Kot Radha Kishan",
|
|
522
|
-
province: "Punjab"
|
|
523
|
-
},
|
|
524
|
-
{
|
|
525
|
-
city: "Kotli Loharan",
|
|
526
|
-
province: "Punjab"
|
|
527
|
-
},
|
|
528
|
-
{
|
|
529
|
-
city: "Kotri",
|
|
530
|
-
province: "Sindh"
|
|
531
|
-
},
|
|
532
|
-
{
|
|
533
|
-
city: "Landhi",
|
|
534
|
-
province: "Sindh"
|
|
535
|
-
},
|
|
536
|
-
{
|
|
537
|
-
city: "Landi Kotal",
|
|
538
|
-
province: "Khyber Pakhtunkhwa"
|
|
539
|
-
},
|
|
540
|
-
{
|
|
541
|
-
city: "Lawa",
|
|
542
|
-
province: "Punjab"
|
|
543
|
-
},
|
|
544
|
-
{
|
|
545
|
-
city: "Liaquatpur",
|
|
546
|
-
province: "Punjab"
|
|
547
|
-
},
|
|
548
|
-
{
|
|
549
|
-
city: "Loralai Town",
|
|
550
|
-
province: "Balochistan"
|
|
551
|
-
},
|
|
552
|
-
{
|
|
553
|
-
city: "Mailsi",
|
|
554
|
-
province: "Punjab"
|
|
555
|
-
},
|
|
556
|
-
{
|
|
557
|
-
city: "Mastung Town",
|
|
558
|
-
province: "Balochistan"
|
|
559
|
-
},
|
|
560
|
-
{
|
|
561
|
-
city: "Mehrabpur",
|
|
562
|
-
province: "Sindh"
|
|
563
|
-
},
|
|
564
|
-
{
|
|
565
|
-
city: "Mian Channu",
|
|
566
|
-
province: "Punjab"
|
|
567
|
-
},
|
|
568
|
-
{
|
|
569
|
-
city: "Mingora",
|
|
570
|
-
province: "Khyber Pakhtunkhwa"
|
|
571
|
-
},
|
|
572
|
-
{
|
|
573
|
-
city: "Miranshah",
|
|
574
|
-
province: "Khyber Pakhtunkhwa"
|
|
575
|
-
},
|
|
576
|
-
{
|
|
577
|
-
city: "Mithi",
|
|
578
|
-
province: "Sindh"
|
|
579
|
-
},
|
|
580
|
-
{
|
|
581
|
-
city: "Model Town",
|
|
582
|
-
province: "Punjab"
|
|
583
|
-
},
|
|
584
|
-
{
|
|
585
|
-
city: "Moro",
|
|
586
|
-
province: "Sindh"
|
|
587
|
-
},
|
|
588
|
-
{
|
|
589
|
-
city: "Nawabshah",
|
|
590
|
-
province: "Sindh"
|
|
591
|
-
},
|
|
592
|
-
{
|
|
593
|
-
city: "Nazimabad",
|
|
594
|
-
province: "Sindh"
|
|
595
|
-
},
|
|
596
|
-
{
|
|
597
|
-
city: "Okara City",
|
|
598
|
-
province: "Punjab"
|
|
599
|
-
},
|
|
600
|
-
{
|
|
601
|
-
city: "Orangi",
|
|
602
|
-
province: "Sindh"
|
|
603
|
-
},
|
|
604
|
-
{
|
|
605
|
-
city: "Ormara",
|
|
606
|
-
province: "Balochistan"
|
|
607
|
-
},
|
|
608
|
-
{
|
|
609
|
-
city: "Palandri",
|
|
610
|
-
province: "Azad Jammu and Kashmir"
|
|
611
|
-
},
|
|
612
|
-
{
|
|
613
|
-
city: "Parachinar",
|
|
614
|
-
province: "Khyber Pakhtunkhwa"
|
|
615
|
-
},
|
|
616
|
-
{
|
|
617
|
-
city: "Pasni",
|
|
618
|
-
province: "Balochistan"
|
|
619
|
-
},
|
|
620
|
-
{
|
|
621
|
-
city: "Pasrur",
|
|
622
|
-
province: "Punjab"
|
|
623
|
-
},
|
|
624
|
-
{
|
|
625
|
-
city: "Pattoki",
|
|
626
|
-
province: "Punjab"
|
|
627
|
-
},
|
|
628
|
-
{
|
|
629
|
-
city: "Phalia",
|
|
630
|
-
province: "Punjab"
|
|
631
|
-
},
|
|
632
|
-
{
|
|
633
|
-
city: "Pind Dadan Khan",
|
|
634
|
-
province: "Punjab"
|
|
635
|
-
},
|
|
636
|
-
{
|
|
637
|
-
city: "Pir Mahal",
|
|
638
|
-
province: "Punjab"
|
|
639
|
-
},
|
|
640
|
-
{
|
|
641
|
-
city: "Pishin Town",
|
|
642
|
-
province: "Balochistan"
|
|
643
|
-
},
|
|
644
|
-
{
|
|
645
|
-
city: "Ranipur",
|
|
646
|
-
province: "Sindh"
|
|
647
|
-
},
|
|
648
|
-
{
|
|
649
|
-
city: "Ratodero",
|
|
650
|
-
province: "Sindh"
|
|
651
|
-
},
|
|
652
|
-
{
|
|
653
|
-
city: "Rawalakot",
|
|
654
|
-
province: "Azad Jammu and Kashmir"
|
|
655
|
-
},
|
|
656
|
-
{
|
|
657
|
-
city: "Renala Khurd",
|
|
658
|
-
province: "Punjab"
|
|
659
|
-
},
|
|
660
|
-
{
|
|
661
|
-
city: "Renala Khurd City",
|
|
662
|
-
province: "Punjab"
|
|
663
|
-
},
|
|
664
|
-
{
|
|
665
|
-
city: "Rojhan",
|
|
666
|
-
province: "Punjab"
|
|
667
|
-
},
|
|
668
|
-
{
|
|
669
|
-
city: "Saddar",
|
|
670
|
-
province: "Sindh"
|
|
671
|
-
},
|
|
672
|
-
{
|
|
673
|
-
city: "Sadiqabad",
|
|
674
|
-
province: "Punjab"
|
|
675
|
-
},
|
|
676
|
-
{
|
|
677
|
-
city: "Sammundri",
|
|
678
|
-
province: "Punjab"
|
|
679
|
-
},
|
|
680
|
-
{
|
|
681
|
-
city: "Samundri",
|
|
682
|
-
province: "Punjab"
|
|
683
|
-
},
|
|
684
|
-
{
|
|
685
|
-
city: "Sanghar City",
|
|
686
|
-
province: "Sindh"
|
|
687
|
-
},
|
|
688
|
-
{
|
|
689
|
-
city: "Sangla Hill",
|
|
690
|
-
province: "Punjab"
|
|
691
|
-
},
|
|
692
|
-
{
|
|
693
|
-
city: "Satiana",
|
|
694
|
-
province: "Punjab"
|
|
695
|
-
},
|
|
696
|
-
{
|
|
697
|
-
city: "Sehwan",
|
|
698
|
-
province: "Sindh"
|
|
699
|
-
},
|
|
700
|
-
{
|
|
701
|
-
city: "Shahdadkot",
|
|
702
|
-
province: "Sindh"
|
|
703
|
-
},
|
|
704
|
-
{
|
|
705
|
-
city: "Shahdadpur",
|
|
706
|
-
province: "Sindh"
|
|
707
|
-
},
|
|
708
|
-
{
|
|
709
|
-
city: "Shahkot",
|
|
710
|
-
province: "Punjab"
|
|
711
|
-
},
|
|
712
|
-
{
|
|
713
|
-
city: "Shahpur",
|
|
714
|
-
province: "Punjab"
|
|
715
|
-
},
|
|
716
|
-
{
|
|
717
|
-
city: "Shakargarh",
|
|
718
|
-
province: "Punjab"
|
|
719
|
-
},
|
|
720
|
-
{
|
|
721
|
-
city: "Shorkot",
|
|
722
|
-
province: "Punjab"
|
|
723
|
-
},
|
|
724
|
-
{
|
|
725
|
-
city: "Sibi Town",
|
|
726
|
-
province: "Balochistan"
|
|
727
|
-
},
|
|
728
|
-
{
|
|
729
|
-
city: "Sohawa",
|
|
730
|
-
province: "Punjab"
|
|
731
|
-
},
|
|
732
|
-
{
|
|
733
|
-
city: "Sohbatpur Town",
|
|
734
|
-
province: "Balochistan"
|
|
735
|
-
},
|
|
736
|
-
{
|
|
737
|
-
city: "Talagang City",
|
|
738
|
-
province: "Punjab"
|
|
739
|
-
},
|
|
740
|
-
{
|
|
741
|
-
city: "Tandlianwala",
|
|
742
|
-
province: "Punjab"
|
|
743
|
-
},
|
|
744
|
-
{
|
|
745
|
-
city: "Taxila",
|
|
746
|
-
province: "Punjab"
|
|
747
|
-
},
|
|
748
|
-
{
|
|
749
|
-
city: "Timergara",
|
|
750
|
-
province: "Khyber Pakhtunkhwa"
|
|
751
|
-
},
|
|
752
|
-
{
|
|
753
|
-
city: "Turbat",
|
|
754
|
-
province: "Balochistan"
|
|
755
|
-
}
|
|
756
|
-
];
|
|
757
|
-
|
|
758
|
-
// data/districts.json
|
|
759
|
-
var districts_default = [
|
|
760
|
-
{
|
|
761
|
-
district: "Abbottabad",
|
|
762
|
-
province: "Khyber Pakhtunkhwa"
|
|
763
|
-
},
|
|
764
|
-
{
|
|
765
|
-
district: "Astore",
|
|
766
|
-
province: "Gilgit-Baltistan"
|
|
767
|
-
},
|
|
768
|
-
{
|
|
769
|
-
district: "Astore",
|
|
770
|
-
province: "Gilgit-Baltistan"
|
|
771
|
-
},
|
|
772
|
-
{
|
|
773
|
-
district: "Attock",
|
|
774
|
-
province: "Punjab"
|
|
775
|
-
},
|
|
776
|
-
{
|
|
777
|
-
district: "Awaran",
|
|
778
|
-
province: "Balochistan"
|
|
779
|
-
},
|
|
780
|
-
{
|
|
781
|
-
district: "Badin",
|
|
782
|
-
province: "Sindh"
|
|
783
|
-
},
|
|
784
|
-
{
|
|
785
|
-
district: "Bagh",
|
|
786
|
-
province: "Azad Jammu and Kashmir"
|
|
787
|
-
},
|
|
788
|
-
{
|
|
789
|
-
district: "Bahawalnagar",
|
|
790
|
-
province: "Punjab"
|
|
791
|
-
},
|
|
792
|
-
{
|
|
793
|
-
district: "Bahawalpur",
|
|
794
|
-
province: "Punjab"
|
|
795
|
-
},
|
|
796
|
-
{
|
|
797
|
-
district: "Bajaur",
|
|
798
|
-
province: "Khyber Pakhtunkhwa"
|
|
799
|
-
},
|
|
800
|
-
{
|
|
801
|
-
district: "Bannu",
|
|
802
|
-
province: "Khyber Pakhtunkhwa"
|
|
803
|
-
},
|
|
804
|
-
{
|
|
805
|
-
district: "Barkhan",
|
|
806
|
-
province: "Balochistan"
|
|
807
|
-
},
|
|
808
|
-
{
|
|
809
|
-
district: "Batagram",
|
|
810
|
-
province: "Khyber Pakhtunkhwa"
|
|
811
|
-
},
|
|
812
|
-
{
|
|
813
|
-
district: "Bhakkar",
|
|
814
|
-
province: "Punjab"
|
|
815
|
-
},
|
|
816
|
-
{
|
|
817
|
-
district: "Bhimber",
|
|
818
|
-
province: "Azad Jammu and Kashmir"
|
|
819
|
-
},
|
|
820
|
-
{
|
|
821
|
-
district: "Buner",
|
|
822
|
-
province: "Khyber Pakhtunkhwa"
|
|
823
|
-
},
|
|
824
|
-
{
|
|
825
|
-
district: "Chagai",
|
|
826
|
-
province: "Balochistan"
|
|
827
|
-
},
|
|
828
|
-
{
|
|
829
|
-
district: "Chakwal",
|
|
830
|
-
province: "Punjab"
|
|
831
|
-
},
|
|
832
|
-
{
|
|
833
|
-
district: "Chaman",
|
|
834
|
-
province: "Balochistan"
|
|
835
|
-
},
|
|
836
|
-
{
|
|
837
|
-
district: "Charsadda",
|
|
838
|
-
province: "Khyber Pakhtunkhwa"
|
|
839
|
-
},
|
|
840
|
-
{
|
|
841
|
-
district: "Chiniot",
|
|
842
|
-
province: "Punjab"
|
|
843
|
-
},
|
|
844
|
-
{
|
|
845
|
-
district: "Dadu",
|
|
846
|
-
province: "Sindh"
|
|
847
|
-
},
|
|
848
|
-
{
|
|
849
|
-
district: "Darel",
|
|
850
|
-
province: "Gilgit-Baltistan"
|
|
851
|
-
},
|
|
852
|
-
{
|
|
853
|
-
district: "Dera Bugti",
|
|
854
|
-
province: "Balochistan"
|
|
855
|
-
},
|
|
856
|
-
{
|
|
857
|
-
district: "Dera Ghazi Khan",
|
|
858
|
-
province: "Punjab"
|
|
859
|
-
},
|
|
860
|
-
{
|
|
861
|
-
district: "Dera Ismail Khan",
|
|
862
|
-
province: "Khyber Pakhtunkhwa"
|
|
863
|
-
},
|
|
864
|
-
{
|
|
865
|
-
district: "Diamer",
|
|
866
|
-
province: "Gilgit-Baltistan"
|
|
867
|
-
},
|
|
868
|
-
{
|
|
869
|
-
district: "Duki",
|
|
870
|
-
province: "Balochistan"
|
|
871
|
-
},
|
|
872
|
-
{
|
|
873
|
-
district: "Faisalabad",
|
|
874
|
-
province: "Punjab"
|
|
875
|
-
},
|
|
876
|
-
{
|
|
877
|
-
district: "Ghanche",
|
|
878
|
-
province: "Gilgit-Baltistan"
|
|
879
|
-
},
|
|
880
|
-
{
|
|
881
|
-
district: "Ghanche",
|
|
882
|
-
province: "Gilgit-Baltistan"
|
|
883
|
-
},
|
|
884
|
-
{
|
|
885
|
-
district: "Ghizer",
|
|
886
|
-
province: "Gilgit-Baltistan"
|
|
887
|
-
},
|
|
888
|
-
{
|
|
889
|
-
district: "Ghizer",
|
|
890
|
-
province: "Gilgit-Baltistan"
|
|
891
|
-
},
|
|
892
|
-
{
|
|
893
|
-
district: "Ghotki",
|
|
894
|
-
province: "Sindh"
|
|
895
|
-
},
|
|
896
|
-
{
|
|
897
|
-
district: "Gilgit",
|
|
898
|
-
province: "Gilgit-Baltistan"
|
|
899
|
-
},
|
|
900
|
-
{
|
|
901
|
-
district: "Gujranwala",
|
|
902
|
-
province: "Punjab"
|
|
903
|
-
},
|
|
904
|
-
{
|
|
905
|
-
district: "Gujrat",
|
|
906
|
-
province: "Punjab"
|
|
907
|
-
},
|
|
908
|
-
{
|
|
909
|
-
district: "Gupis-Yasin",
|
|
910
|
-
province: "Gilgit-Baltistan"
|
|
911
|
-
},
|
|
912
|
-
{
|
|
913
|
-
district: "Gwadar",
|
|
914
|
-
province: "Balochistan"
|
|
915
|
-
},
|
|
916
|
-
{
|
|
917
|
-
district: "Hafizabad",
|
|
918
|
-
province: "Punjab"
|
|
919
|
-
},
|
|
920
|
-
{
|
|
921
|
-
district: "Hangu",
|
|
922
|
-
province: "Khyber Pakhtunkhwa"
|
|
923
|
-
},
|
|
924
|
-
{
|
|
925
|
-
district: "Haripur",
|
|
926
|
-
province: "Khyber Pakhtunkhwa"
|
|
927
|
-
},
|
|
928
|
-
{
|
|
929
|
-
district: "Harnai",
|
|
930
|
-
province: "Balochistan"
|
|
931
|
-
},
|
|
932
|
-
{
|
|
933
|
-
district: "Hatian Bala",
|
|
934
|
-
province: "Azad Jammu and Kashmir"
|
|
935
|
-
},
|
|
936
|
-
{
|
|
937
|
-
district: "Haveli",
|
|
938
|
-
province: "Azad Jammu and Kashmir"
|
|
939
|
-
},
|
|
940
|
-
{
|
|
941
|
-
district: "Hunza",
|
|
942
|
-
province: "Gilgit-Baltistan"
|
|
943
|
-
},
|
|
944
|
-
{
|
|
945
|
-
district: "Hunza",
|
|
946
|
-
province: "Gilgit-Baltistan"
|
|
947
|
-
},
|
|
948
|
-
{
|
|
949
|
-
district: "Hyderabad",
|
|
950
|
-
province: "Sindh"
|
|
951
|
-
},
|
|
952
|
-
{
|
|
953
|
-
district: "Islamabad",
|
|
954
|
-
province: "Islamabad Capital Territory"
|
|
955
|
-
},
|
|
956
|
-
{
|
|
957
|
-
district: "Jacobabad",
|
|
958
|
-
province: "Sindh"
|
|
959
|
-
},
|
|
960
|
-
{
|
|
961
|
-
district: "Jaffarabad",
|
|
962
|
-
province: "Balochistan"
|
|
963
|
-
},
|
|
964
|
-
{
|
|
965
|
-
district: "Jamshoro",
|
|
966
|
-
province: "Sindh"
|
|
967
|
-
},
|
|
968
|
-
{
|
|
969
|
-
district: "Jhal Magsi",
|
|
970
|
-
province: "Balochistan"
|
|
971
|
-
},
|
|
972
|
-
{
|
|
973
|
-
district: "Jhang",
|
|
974
|
-
province: "Punjab"
|
|
975
|
-
},
|
|
976
|
-
{
|
|
977
|
-
district: "Jhelum",
|
|
978
|
-
province: "Punjab"
|
|
979
|
-
},
|
|
980
|
-
{
|
|
981
|
-
district: "Kachhi",
|
|
982
|
-
province: "Balochistan"
|
|
983
|
-
},
|
|
984
|
-
{
|
|
985
|
-
district: "Kalat",
|
|
986
|
-
province: "Balochistan"
|
|
987
|
-
},
|
|
988
|
-
{
|
|
989
|
-
district: "Karachi Central",
|
|
990
|
-
province: "Sindh"
|
|
991
|
-
},
|
|
992
|
-
{
|
|
993
|
-
district: "Karachi East",
|
|
994
|
-
province: "Sindh"
|
|
995
|
-
},
|
|
996
|
-
{
|
|
997
|
-
district: "Karachi South",
|
|
998
|
-
province: "Sindh"
|
|
999
|
-
},
|
|
1000
|
-
{
|
|
1001
|
-
district: "Karachi West",
|
|
1002
|
-
province: "Sindh"
|
|
1003
|
-
},
|
|
1004
|
-
{
|
|
1005
|
-
district: "Karak",
|
|
1006
|
-
province: "Khyber Pakhtunkhwa"
|
|
1007
|
-
},
|
|
1008
|
-
{
|
|
1009
|
-
district: "Kashmore",
|
|
1010
|
-
province: "Sindh"
|
|
1011
|
-
},
|
|
1012
|
-
{
|
|
1013
|
-
district: "Kasur",
|
|
1014
|
-
province: "Punjab"
|
|
1015
|
-
},
|
|
1016
|
-
{
|
|
1017
|
-
district: "Keamari",
|
|
1018
|
-
province: "Sindh"
|
|
1019
|
-
},
|
|
1020
|
-
{
|
|
1021
|
-
district: "Kech",
|
|
1022
|
-
province: "Balochistan"
|
|
1023
|
-
},
|
|
1024
|
-
{
|
|
1025
|
-
district: "Khairpur",
|
|
1026
|
-
province: "Sindh"
|
|
1027
|
-
},
|
|
1028
|
-
{
|
|
1029
|
-
district: "Khanewal",
|
|
1030
|
-
province: "Punjab"
|
|
1031
|
-
},
|
|
1032
|
-
{
|
|
1033
|
-
district: "Kharan",
|
|
1034
|
-
province: "Balochistan"
|
|
1035
|
-
},
|
|
1036
|
-
{
|
|
1037
|
-
district: "Kharmang",
|
|
1038
|
-
province: "Gilgit-Baltistan"
|
|
1039
|
-
},
|
|
1040
|
-
{
|
|
1041
|
-
district: "Kharmang",
|
|
1042
|
-
province: "Gilgit-Baltistan"
|
|
1043
|
-
},
|
|
1044
|
-
{
|
|
1045
|
-
district: "Khushab",
|
|
1046
|
-
province: "Punjab"
|
|
1047
|
-
},
|
|
1048
|
-
{
|
|
1049
|
-
district: "Khuzdar",
|
|
1050
|
-
province: "Balochistan"
|
|
1051
|
-
},
|
|
1052
|
-
{
|
|
1053
|
-
district: "Khyber",
|
|
1054
|
-
province: "Khyber Pakhtunkhwa"
|
|
1055
|
-
},
|
|
1056
|
-
{
|
|
1057
|
-
district: "Killa Abdullah",
|
|
1058
|
-
province: "Balochistan"
|
|
1059
|
-
},
|
|
1060
|
-
{
|
|
1061
|
-
district: "Killa Saifullah",
|
|
1062
|
-
province: "Balochistan"
|
|
1063
|
-
},
|
|
1064
|
-
{
|
|
1065
|
-
district: "Kohat",
|
|
1066
|
-
province: "Khyber Pakhtunkhwa"
|
|
1067
|
-
},
|
|
1068
|
-
{
|
|
1069
|
-
district: "Kohlu",
|
|
1070
|
-
province: "Balochistan"
|
|
1071
|
-
},
|
|
1072
|
-
{
|
|
1073
|
-
district: "Kolai-Palas",
|
|
1074
|
-
province: "Khyber Pakhtunkhwa"
|
|
1075
|
-
},
|
|
1076
|
-
{
|
|
1077
|
-
district: "Korangi",
|
|
1078
|
-
province: "Sindh"
|
|
1079
|
-
},
|
|
1080
|
-
{
|
|
1081
|
-
district: "Kot Addu",
|
|
1082
|
-
province: "Punjab"
|
|
1083
|
-
},
|
|
1084
|
-
{
|
|
1085
|
-
district: "Kotli",
|
|
1086
|
-
province: "Azad Jammu and Kashmir"
|
|
1087
|
-
},
|
|
1088
|
-
{
|
|
1089
|
-
district: "Kurram",
|
|
1090
|
-
province: "Khyber Pakhtunkhwa"
|
|
1091
|
-
},
|
|
1092
|
-
{
|
|
1093
|
-
district: "Lahore",
|
|
1094
|
-
province: "Punjab"
|
|
1095
|
-
},
|
|
1096
|
-
{
|
|
1097
|
-
district: "Lakki Marwat",
|
|
1098
|
-
province: "Khyber Pakhtunkhwa"
|
|
1099
|
-
},
|
|
1100
|
-
{
|
|
1101
|
-
district: "Larkana",
|
|
1102
|
-
province: "Sindh"
|
|
1103
|
-
},
|
|
1104
|
-
{
|
|
1105
|
-
district: "Lasbela",
|
|
1106
|
-
province: "Balochistan"
|
|
1107
|
-
},
|
|
1108
|
-
{
|
|
1109
|
-
district: "Layyah",
|
|
1110
|
-
province: "Punjab"
|
|
1111
|
-
},
|
|
1112
|
-
{
|
|
1113
|
-
district: "Lodhran",
|
|
1114
|
-
province: "Punjab"
|
|
1115
|
-
},
|
|
1116
|
-
{
|
|
1117
|
-
district: "Loralai",
|
|
1118
|
-
province: "Balochistan"
|
|
1119
|
-
},
|
|
1120
|
-
{
|
|
1121
|
-
district: "Lower Chitral",
|
|
1122
|
-
province: "Khyber Pakhtunkhwa"
|
|
1123
|
-
},
|
|
1124
|
-
{
|
|
1125
|
-
district: "Lower Dir",
|
|
1126
|
-
province: "Khyber Pakhtunkhwa"
|
|
1127
|
-
},
|
|
1128
|
-
{
|
|
1129
|
-
district: "Lower Kohistan",
|
|
1130
|
-
province: "Khyber Pakhtunkhwa"
|
|
1131
|
-
},
|
|
1132
|
-
{
|
|
1133
|
-
district: "Malakand",
|
|
1134
|
-
province: "Khyber Pakhtunkhwa"
|
|
1135
|
-
},
|
|
1136
|
-
{
|
|
1137
|
-
district: "Malir",
|
|
1138
|
-
province: "Sindh"
|
|
1139
|
-
},
|
|
1140
|
-
{
|
|
1141
|
-
district: "Mandi Bahauddin",
|
|
1142
|
-
province: "Punjab"
|
|
1143
|
-
},
|
|
1144
|
-
{
|
|
1145
|
-
district: "Mansehra",
|
|
1146
|
-
province: "Khyber Pakhtunkhwa"
|
|
1147
|
-
},
|
|
1148
|
-
{
|
|
1149
|
-
district: "Mardan",
|
|
1150
|
-
province: "Khyber Pakhtunkhwa"
|
|
1151
|
-
},
|
|
1152
|
-
{
|
|
1153
|
-
district: "Mastung",
|
|
1154
|
-
province: "Balochistan"
|
|
1155
|
-
},
|
|
1156
|
-
{
|
|
1157
|
-
district: "Matiari",
|
|
1158
|
-
province: "Sindh"
|
|
1159
|
-
},
|
|
1160
|
-
{
|
|
1161
|
-
district: "Mianwali",
|
|
1162
|
-
province: "Punjab"
|
|
1163
|
-
},
|
|
1164
|
-
{
|
|
1165
|
-
district: "Mirpur",
|
|
1166
|
-
province: "Azad Jammu and Kashmir"
|
|
1167
|
-
},
|
|
1168
|
-
{
|
|
1169
|
-
district: "Mirpur Khas",
|
|
1170
|
-
province: "Sindh"
|
|
1171
|
-
},
|
|
1172
|
-
{
|
|
1173
|
-
district: "Mohmand",
|
|
1174
|
-
province: "Khyber Pakhtunkhwa"
|
|
1175
|
-
},
|
|
1176
|
-
{
|
|
1177
|
-
district: "Multan",
|
|
1178
|
-
province: "Punjab"
|
|
1179
|
-
},
|
|
1180
|
-
{
|
|
1181
|
-
district: "Murree",
|
|
1182
|
-
province: "Punjab"
|
|
1183
|
-
},
|
|
1184
|
-
{
|
|
1185
|
-
district: "Musakhel",
|
|
1186
|
-
province: "Balochistan"
|
|
1187
|
-
},
|
|
1188
|
-
{
|
|
1189
|
-
district: "Muzaffarabad",
|
|
1190
|
-
province: "Azad Jammu and Kashmir"
|
|
1191
|
-
},
|
|
1192
|
-
{
|
|
1193
|
-
district: "Muzaffargarh",
|
|
1194
|
-
province: "Punjab"
|
|
1195
|
-
},
|
|
1196
|
-
{
|
|
1197
|
-
district: "Nagar",
|
|
1198
|
-
province: "Gilgit-Baltistan"
|
|
1199
|
-
},
|
|
1200
|
-
{
|
|
1201
|
-
district: "Nagar",
|
|
1202
|
-
province: "Gilgit-Baltistan"
|
|
1203
|
-
},
|
|
1204
|
-
{
|
|
1205
|
-
district: "Nankana Sahib",
|
|
1206
|
-
province: "Punjab"
|
|
1207
|
-
},
|
|
1208
|
-
{
|
|
1209
|
-
district: "Narowal",
|
|
1210
|
-
province: "Punjab"
|
|
1211
|
-
},
|
|
1212
|
-
{
|
|
1213
|
-
district: "Nasirabad",
|
|
1214
|
-
province: "Balochistan"
|
|
1215
|
-
},
|
|
1216
|
-
{
|
|
1217
|
-
district: "Naushahro Feroze",
|
|
1218
|
-
province: "Sindh"
|
|
1219
|
-
},
|
|
1220
|
-
{
|
|
1221
|
-
district: "Neelam",
|
|
1222
|
-
province: "Azad Jammu and Kashmir"
|
|
1223
|
-
},
|
|
1224
|
-
{
|
|
1225
|
-
district: "North Waziristan",
|
|
1226
|
-
province: "Khyber Pakhtunkhwa"
|
|
1227
|
-
},
|
|
1228
|
-
{
|
|
1229
|
-
district: "Nowshera",
|
|
1230
|
-
province: "Khyber Pakhtunkhwa"
|
|
1231
|
-
},
|
|
1232
|
-
{
|
|
1233
|
-
district: "Nushki",
|
|
1234
|
-
province: "Balochistan"
|
|
1235
|
-
},
|
|
1236
|
-
{
|
|
1237
|
-
district: "Okara",
|
|
1238
|
-
province: "Punjab"
|
|
1239
|
-
},
|
|
1240
|
-
{
|
|
1241
|
-
district: "Orakzai",
|
|
1242
|
-
province: "Khyber Pakhtunkhwa"
|
|
1243
|
-
},
|
|
1244
|
-
{
|
|
1245
|
-
district: "Pakpattan",
|
|
1246
|
-
province: "Punjab"
|
|
1247
|
-
},
|
|
1248
|
-
{
|
|
1249
|
-
district: "Panjgur",
|
|
1250
|
-
province: "Balochistan"
|
|
1251
|
-
},
|
|
1252
|
-
{
|
|
1253
|
-
district: "Peshawar",
|
|
1254
|
-
province: "Khyber Pakhtunkhwa"
|
|
1255
|
-
},
|
|
1256
|
-
{
|
|
1257
|
-
district: "Pishin",
|
|
1258
|
-
province: "Balochistan"
|
|
1259
|
-
},
|
|
1260
|
-
{
|
|
1261
|
-
district: "Poonch",
|
|
1262
|
-
province: "Azad Jammu and Kashmir"
|
|
1263
|
-
},
|
|
1264
|
-
{
|
|
1265
|
-
district: "Qambar Shahdadkot",
|
|
1266
|
-
province: "Sindh"
|
|
1267
|
-
},
|
|
1268
|
-
{
|
|
1269
|
-
district: "Quetta",
|
|
1270
|
-
province: "Balochistan"
|
|
1271
|
-
},
|
|
1272
|
-
{
|
|
1273
|
-
district: "Rahim Yar Khan",
|
|
1274
|
-
province: "Punjab"
|
|
1275
|
-
},
|
|
1276
|
-
{
|
|
1277
|
-
district: "Rajanpur",
|
|
1278
|
-
province: "Punjab"
|
|
1279
|
-
},
|
|
1280
|
-
{
|
|
1281
|
-
district: "Rawalpindi",
|
|
1282
|
-
province: "Punjab"
|
|
1283
|
-
},
|
|
1284
|
-
{
|
|
1285
|
-
district: "Rondu",
|
|
1286
|
-
province: "Gilgit-Baltistan"
|
|
1287
|
-
},
|
|
1288
|
-
{
|
|
1289
|
-
district: "Sahiwal",
|
|
1290
|
-
province: "Punjab"
|
|
1291
|
-
},
|
|
1292
|
-
{
|
|
1293
|
-
district: "Sanghar",
|
|
1294
|
-
province: "Sindh"
|
|
1295
|
-
},
|
|
1296
|
-
{
|
|
1297
|
-
district: "Sargodha",
|
|
1298
|
-
province: "Punjab"
|
|
1299
|
-
},
|
|
1300
|
-
{
|
|
1301
|
-
district: "Shaheed Benazir Abad",
|
|
1302
|
-
province: "Sindh"
|
|
1303
|
-
},
|
|
1304
|
-
{
|
|
1305
|
-
district: "Shangla",
|
|
1306
|
-
province: "Khyber Pakhtunkhwa"
|
|
1307
|
-
},
|
|
1308
|
-
{
|
|
1309
|
-
district: "Sheerani",
|
|
1310
|
-
province: "Balochistan"
|
|
1311
|
-
},
|
|
1312
|
-
{
|
|
1313
|
-
district: "Sheikhupura",
|
|
1314
|
-
province: "Punjab"
|
|
1315
|
-
},
|
|
1316
|
-
{
|
|
1317
|
-
district: "Shigar",
|
|
1318
|
-
province: "Gilgit-Baltistan"
|
|
1319
|
-
},
|
|
1320
|
-
{
|
|
1321
|
-
district: "Shigar",
|
|
1322
|
-
province: "Gilgit-Baltistan"
|
|
1323
|
-
},
|
|
1324
|
-
{
|
|
1325
|
-
district: "Shikarpur",
|
|
1326
|
-
province: "Sindh"
|
|
1327
|
-
},
|
|
1328
|
-
{
|
|
1329
|
-
district: "Sialkot",
|
|
1330
|
-
province: "Punjab"
|
|
1331
|
-
},
|
|
1332
|
-
{
|
|
1333
|
-
district: "Sibi",
|
|
1334
|
-
province: "Balochistan"
|
|
1335
|
-
},
|
|
1336
|
-
{
|
|
1337
|
-
district: "Skardu",
|
|
1338
|
-
province: "Gilgit-Baltistan"
|
|
1339
|
-
},
|
|
1340
|
-
{
|
|
1341
|
-
district: "Sohbatpur",
|
|
1342
|
-
province: "Balochistan"
|
|
1343
|
-
},
|
|
1344
|
-
{
|
|
1345
|
-
district: "South Waziristan",
|
|
1346
|
-
province: "Khyber Pakhtunkhwa"
|
|
1347
|
-
},
|
|
1348
|
-
{
|
|
1349
|
-
district: "Sudhnuti",
|
|
1350
|
-
province: "Azad Jammu and Kashmir"
|
|
1351
|
-
},
|
|
1352
|
-
{
|
|
1353
|
-
district: "Sujawal",
|
|
1354
|
-
province: "Sindh"
|
|
1355
|
-
},
|
|
1356
|
-
{
|
|
1357
|
-
district: "Sukkur",
|
|
1358
|
-
province: "Sindh"
|
|
1359
|
-
},
|
|
1360
|
-
{
|
|
1361
|
-
district: "Surab",
|
|
1362
|
-
province: "Balochistan"
|
|
1363
|
-
},
|
|
1364
|
-
{
|
|
1365
|
-
district: "Swabi",
|
|
1366
|
-
province: "Khyber Pakhtunkhwa"
|
|
1367
|
-
},
|
|
1368
|
-
{
|
|
1369
|
-
district: "Swat",
|
|
1370
|
-
province: "Khyber Pakhtunkhwa"
|
|
1371
|
-
},
|
|
1372
|
-
{
|
|
1373
|
-
district: "Talagang",
|
|
1374
|
-
province: "Punjab"
|
|
1375
|
-
},
|
|
1376
|
-
{
|
|
1377
|
-
district: "Tando Allahyar",
|
|
1378
|
-
province: "Sindh"
|
|
1379
|
-
},
|
|
1380
|
-
{
|
|
1381
|
-
district: "Tando Muhammad Khan",
|
|
1382
|
-
province: "Sindh"
|
|
1383
|
-
},
|
|
1384
|
-
{
|
|
1385
|
-
district: "Tangir",
|
|
1386
|
-
province: "Gilgit-Baltistan"
|
|
1387
|
-
},
|
|
1388
|
-
{
|
|
1389
|
-
district: "Tank",
|
|
1390
|
-
province: "Khyber Pakhtunkhwa"
|
|
1391
|
-
},
|
|
1392
|
-
{
|
|
1393
|
-
district: "Tharparkar",
|
|
1394
|
-
province: "Sindh"
|
|
1395
|
-
},
|
|
1396
|
-
{
|
|
1397
|
-
district: "Thatta",
|
|
1398
|
-
province: "Sindh"
|
|
1399
|
-
},
|
|
1400
|
-
{
|
|
1401
|
-
district: "Toba Tek Singh",
|
|
1402
|
-
province: "Punjab"
|
|
1403
|
-
},
|
|
1404
|
-
{
|
|
1405
|
-
district: "Tor Ghar",
|
|
1406
|
-
province: "Khyber Pakhtunkhwa"
|
|
1407
|
-
},
|
|
1408
|
-
{
|
|
1409
|
-
district: "Umerkot",
|
|
1410
|
-
province: "Sindh"
|
|
1411
|
-
},
|
|
1412
|
-
{
|
|
1413
|
-
district: "Upper Chitral",
|
|
1414
|
-
province: "Khyber Pakhtunkhwa"
|
|
1415
|
-
},
|
|
1416
|
-
{
|
|
1417
|
-
district: "Upper Dir",
|
|
1418
|
-
province: "Khyber Pakhtunkhwa"
|
|
1419
|
-
},
|
|
1420
|
-
{
|
|
1421
|
-
district: "Upper Kohistan",
|
|
1422
|
-
province: "Khyber Pakhtunkhwa"
|
|
1423
|
-
},
|
|
1424
|
-
{
|
|
1425
|
-
district: "Vehari",
|
|
1426
|
-
province: "Punjab"
|
|
1427
|
-
},
|
|
1428
|
-
{
|
|
1429
|
-
district: "Washuk",
|
|
1430
|
-
province: "Balochistan"
|
|
1431
|
-
},
|
|
1432
|
-
{
|
|
1433
|
-
district: "Wazirabad",
|
|
1434
|
-
province: "Punjab"
|
|
1435
|
-
},
|
|
1436
|
-
{
|
|
1437
|
-
district: "Zhob",
|
|
1438
|
-
province: "Balochistan"
|
|
1439
|
-
},
|
|
1440
|
-
{
|
|
1441
|
-
district: "Ziarat",
|
|
1442
|
-
province: "Balochistan"
|
|
1443
|
-
}
|
|
1444
|
-
];
|
|
1445
|
-
|
|
1446
|
-
// src/geo.ts
|
|
1447
|
-
var CITIES = cities_default;
|
|
1448
|
-
var DISTRICTS = districts_default;
|
|
1449
|
-
var CITY_LOOKUP = new Map(
|
|
1450
|
-
CITIES.map((entry) => [normalizeKey(entry.city), entry.province])
|
|
1451
|
-
);
|
|
1452
|
-
var DISTRICT_LOOKUP = new Map(
|
|
1453
|
-
DISTRICTS.map((entry) => [normalizeKey(entry.district), entry.province])
|
|
1454
|
-
);
|
|
1455
|
-
function getProvince(city) {
|
|
1456
|
-
const key = normalizeKey(city);
|
|
1457
|
-
if (key.length === 0) {
|
|
1458
|
-
return null;
|
|
1459
|
-
}
|
|
1460
|
-
return CITY_LOOKUP.get(key) ?? null;
|
|
1461
|
-
}
|
|
1462
|
-
function searchCities(query) {
|
|
1463
|
-
const normalizedQuery = normalizeKey(query);
|
|
1464
|
-
if (normalizedQuery.length === 0) {
|
|
1465
|
-
return [];
|
|
1466
|
-
}
|
|
1467
|
-
const matches = CITIES.filter(
|
|
1468
|
-
(entry) => normalizeKey(entry.city).includes(normalizedQuery)
|
|
1469
|
-
).map((entry) => entry.city);
|
|
1470
|
-
return [...new Set(matches)].sort((a, b) => a.localeCompare(b));
|
|
1471
|
-
}
|
|
1472
|
-
function getDistrictProvince(district) {
|
|
1473
|
-
const key = normalizeKey(district);
|
|
1474
|
-
if (key.length === 0) {
|
|
1475
|
-
return null;
|
|
1476
|
-
}
|
|
1477
|
-
return DISTRICT_LOOKUP.get(key) ?? null;
|
|
1478
|
-
}
|
|
1479
|
-
function searchDistricts(query) {
|
|
1480
|
-
const normalizedQuery = normalizeKey(query);
|
|
1481
|
-
if (normalizedQuery.length === 0) {
|
|
1482
|
-
return [];
|
|
1483
|
-
}
|
|
1484
|
-
const matches = DISTRICTS.filter(
|
|
1485
|
-
(entry) => normalizeKey(entry.district).includes(normalizedQuery)
|
|
1486
|
-
).map((entry) => entry.district);
|
|
1487
|
-
return [...new Set(matches)].sort((a, b) => a.localeCompare(b));
|
|
1488
|
-
}
|
|
1489
|
-
function getDistrictsByProvince(province) {
|
|
1490
|
-
const key = normalizeKey(province);
|
|
1491
|
-
if (key.length === 0) {
|
|
1492
|
-
return [];
|
|
1493
|
-
}
|
|
1494
|
-
return DISTRICTS.filter((entry) => normalizeKey(entry.province) === key).map((entry) => entry.district).sort((a, b) => a.localeCompare(b));
|
|
1495
|
-
}
|
|
1496
|
-
|
|
1497
|
-
// src/format.ts
|
|
1498
|
-
var LAKH = 1e5;
|
|
1499
|
-
var CRORE = 1e7;
|
|
1500
|
-
var pkrFormatter = new Intl.NumberFormat("en-PK", {
|
|
1501
|
-
maximumFractionDigits: 0
|
|
1502
|
-
});
|
|
1503
|
-
function formatPKR(amount) {
|
|
1504
|
-
const safeAmount = Number.isFinite(amount) && amount > 0 ? amount : 0;
|
|
1505
|
-
return `Rs. ${pkrFormatter.format(safeAmount)}`;
|
|
1506
|
-
}
|
|
1507
|
-
function formatScaled(value, unit) {
|
|
1508
|
-
const rounded = Math.round(value * 100) / 100;
|
|
1509
|
-
const formatted = Number.isInteger(rounded) ? String(rounded) : String(rounded);
|
|
1510
|
-
return `${formatted} ${unit}`;
|
|
1511
|
-
}
|
|
1512
|
-
function formatLakh(amount) {
|
|
1513
|
-
const safeAmount = Number.isFinite(amount) && amount > 0 ? amount : 0;
|
|
1514
|
-
if (safeAmount >= CRORE) {
|
|
1515
|
-
return formatScaled(safeAmount / CRORE, "Crore");
|
|
1516
|
-
}
|
|
1517
|
-
if (safeAmount >= LAKH) {
|
|
1518
|
-
return formatScaled(safeAmount / LAKH, "Lakh");
|
|
1519
|
-
}
|
|
1520
|
-
return formatPKR(safeAmount);
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
|
-
// src/whatsapp.ts
|
|
1524
|
-
function createWhatsAppLink(phone, message) {
|
|
1525
|
-
const digits = normalizePhoneDigits(phone);
|
|
1526
|
-
if (digits === null) {
|
|
1527
|
-
return "";
|
|
1528
|
-
}
|
|
1529
|
-
const baseUrl = `https://wa.me/${digits}`;
|
|
1530
|
-
if (message === void 0 || message.length === 0) {
|
|
1531
|
-
return baseUrl;
|
|
1532
|
-
}
|
|
1533
|
-
return `${baseUrl}?text=${encodeURIComponent(message)}`;
|
|
1534
|
-
}
|
|
1535
|
-
|
|
1536
|
-
// data/banks.json
|
|
1537
|
-
var banks_default = [
|
|
1538
|
-
{
|
|
1539
|
-
code: "ABPA",
|
|
1540
|
-
name: "Allied Bank Limited"
|
|
1541
|
-
},
|
|
1542
|
-
{
|
|
1543
|
-
code: "AIIN",
|
|
1544
|
-
name: "Al Baraka Bank (Pakistan) Limited"
|
|
1545
|
-
},
|
|
1546
|
-
{
|
|
1547
|
-
code: "ALFH",
|
|
1548
|
-
name: "Bank Alfalah Limited"
|
|
1549
|
-
},
|
|
1550
|
-
{
|
|
1551
|
-
code: "APNA",
|
|
1552
|
-
name: "Apna Microfinance Bank"
|
|
1553
|
-
},
|
|
1554
|
-
{
|
|
1555
|
-
code: "ASCM",
|
|
1556
|
-
name: "Askari Bank Limited"
|
|
1557
|
-
},
|
|
1558
|
-
{
|
|
1559
|
-
code: "BAHL",
|
|
1560
|
-
name: "Bank Al Habib Limited"
|
|
1561
|
-
},
|
|
1562
|
-
{
|
|
1563
|
-
code: "BARC",
|
|
1564
|
-
name: "Barclays Bank PLC"
|
|
1565
|
-
},
|
|
1566
|
-
{
|
|
1567
|
-
code: "BIPL",
|
|
1568
|
-
name: "Bank of Islamabad Limited"
|
|
1569
|
-
},
|
|
1570
|
-
{
|
|
1571
|
-
code: "BKIP",
|
|
1572
|
-
name: "BankIslami Pakistan Limited"
|
|
1573
|
-
},
|
|
1574
|
-
{
|
|
1575
|
-
code: "BPUN",
|
|
1576
|
-
name: "The Bank of Punjab"
|
|
1577
|
-
},
|
|
1578
|
-
{
|
|
1579
|
-
code: "CITI",
|
|
1580
|
-
name: "Citibank N.A. Pakistan"
|
|
1581
|
-
},
|
|
1582
|
-
{
|
|
1583
|
-
code: "DEUT",
|
|
1584
|
-
name: "Deutsche Bank AG"
|
|
1585
|
-
},
|
|
1586
|
-
{
|
|
1587
|
-
code: "DUIB",
|
|
1588
|
-
name: "Dubai Islamic Bank Pakistan Limited"
|
|
1589
|
-
},
|
|
1590
|
-
{
|
|
1591
|
-
code: "FAYS",
|
|
1592
|
-
name: "Faysal Bank Limited"
|
|
1593
|
-
},
|
|
1594
|
-
{
|
|
1595
|
-
code: "FINC",
|
|
1596
|
-
name: "FINCA Microfinance Bank"
|
|
1597
|
-
},
|
|
1598
|
-
{
|
|
1599
|
-
code: "FMFB",
|
|
1600
|
-
name: "First MicroFinance Bank"
|
|
1601
|
-
},
|
|
1602
|
-
{
|
|
1603
|
-
code: "FWOM",
|
|
1604
|
-
name: "First Women Bank Limited"
|
|
1605
|
-
},
|
|
1606
|
-
{
|
|
1607
|
-
code: "HABB",
|
|
1608
|
-
name: "Habib Bank Limited"
|
|
1609
|
-
},
|
|
1610
|
-
{
|
|
1611
|
-
code: "ICBK",
|
|
1612
|
-
name: "Industrial and Commercial Bank of China"
|
|
1613
|
-
},
|
|
1614
|
-
{
|
|
1615
|
-
code: "JCMA",
|
|
1616
|
-
name: "Mobilink Microfinance Bank (JazzCash)"
|
|
1617
|
-
},
|
|
1618
|
-
{
|
|
1619
|
-
code: "JSBL",
|
|
1620
|
-
name: "JS Bank Limited"
|
|
1621
|
-
},
|
|
1622
|
-
{
|
|
1623
|
-
code: "KHYB",
|
|
1624
|
-
name: "The Bank of Khyber"
|
|
1625
|
-
},
|
|
1626
|
-
{
|
|
1627
|
-
code: "KMBL",
|
|
1628
|
-
name: "Khushhali Microfinance Bank"
|
|
1629
|
-
},
|
|
1630
|
-
{
|
|
1631
|
-
code: "MCBL",
|
|
1632
|
-
name: "MCB Bank Limited"
|
|
1633
|
-
},
|
|
1634
|
-
{
|
|
1635
|
-
code: "MCIB",
|
|
1636
|
-
name: "MCB Islamic Bank Limited"
|
|
1637
|
-
},
|
|
1638
|
-
{
|
|
1639
|
-
code: "MEZN",
|
|
1640
|
-
name: "Meezan Bank Limited"
|
|
1641
|
-
},
|
|
1642
|
-
{
|
|
1643
|
-
code: "MPBL",
|
|
1644
|
-
name: "Habib Metropolitan Bank Limited"
|
|
1645
|
-
},
|
|
1646
|
-
{
|
|
1647
|
-
code: "MSHQ",
|
|
1648
|
-
name: "Mashreq Bank Pakistan"
|
|
1649
|
-
},
|
|
1650
|
-
{
|
|
1651
|
-
code: "MUCB",
|
|
1652
|
-
name: "MCB Bank Limited"
|
|
1653
|
-
},
|
|
1654
|
-
{
|
|
1655
|
-
code: "NBPA",
|
|
1656
|
-
name: "National Bank of Pakistan"
|
|
1657
|
-
},
|
|
1658
|
-
{
|
|
1659
|
-
code: "NBPB",
|
|
1660
|
-
name: "National Bank of Pakistan"
|
|
1661
|
-
},
|
|
1662
|
-
{
|
|
1663
|
-
code: "NIBP",
|
|
1664
|
-
name: "NIB Bank Limited"
|
|
1665
|
-
},
|
|
1666
|
-
{
|
|
1667
|
-
code: "NRSP",
|
|
1668
|
-
name: "NRSP Microfinance Bank"
|
|
1669
|
-
},
|
|
1670
|
-
{
|
|
1671
|
-
code: "PAKB",
|
|
1672
|
-
name: "Pak Oman Microfinance Bank"
|
|
1673
|
-
},
|
|
1674
|
-
{
|
|
1675
|
-
code: "SAMB",
|
|
1676
|
-
name: "Samba Bank Limited"
|
|
1677
|
-
},
|
|
1678
|
-
{
|
|
1679
|
-
code: "SAUD",
|
|
1680
|
-
name: "Saudi Pak Industrial Investment Bank"
|
|
1681
|
-
},
|
|
1682
|
-
{
|
|
1683
|
-
code: "SBPP",
|
|
1684
|
-
name: "State Bank of Pakistan"
|
|
1685
|
-
},
|
|
1686
|
-
{
|
|
1687
|
-
code: "SCBL",
|
|
1688
|
-
name: "Standard Chartered Bank (Pakistan) Limited"
|
|
1689
|
-
},
|
|
1690
|
-
{
|
|
1691
|
-
code: "SILK",
|
|
1692
|
-
name: "Silkbank Limited"
|
|
1693
|
-
},
|
|
1694
|
-
{
|
|
1695
|
-
code: "SIND",
|
|
1696
|
-
name: "Sindh Bank Limited"
|
|
1697
|
-
},
|
|
1698
|
-
{
|
|
1699
|
-
code: "SMEP",
|
|
1700
|
-
name: "Summit Bank Limited"
|
|
1701
|
-
},
|
|
1702
|
-
{
|
|
1703
|
-
code: "SONE",
|
|
1704
|
-
name: "Soneri Bank Limited"
|
|
1705
|
-
},
|
|
1706
|
-
{
|
|
1707
|
-
code: "TAMW",
|
|
1708
|
-
name: "Tameer Microfinance Bank"
|
|
1709
|
-
},
|
|
1710
|
-
{
|
|
1711
|
-
code: "TMFB",
|
|
1712
|
-
name: "Telenor Microfinance Bank (Easypaisa)"
|
|
1713
|
-
},
|
|
1714
|
-
{
|
|
1715
|
-
code: "UMBL",
|
|
1716
|
-
name: "U Microfinance Bank"
|
|
1717
|
-
},
|
|
1718
|
-
{
|
|
1719
|
-
code: "UNIL",
|
|
1720
|
-
name: "United Bank Limited"
|
|
1721
|
-
}
|
|
1722
|
-
];
|
|
1723
|
-
|
|
1724
|
-
// src/iban.ts
|
|
1725
|
-
var PK_IBAN_PATTERN = /^PK\d{2}[A-Z]{4}[A-Z0-9]{16}$/;
|
|
1726
|
-
var PK_IBAN_LENGTH = 24;
|
|
1727
|
-
var BANK_MAP = /* @__PURE__ */ new Map();
|
|
1728
|
-
for (const entry of banks_default) {
|
|
1729
|
-
BANK_MAP.set(entry.code, entry.name);
|
|
1730
|
-
}
|
|
1731
|
-
var BANK_ALIASES = {
|
|
1732
|
-
NBPB: "NBPA",
|
|
1733
|
-
MCBL: "MUCB"
|
|
1734
|
-
};
|
|
1735
|
-
function expandIbanChars(value) {
|
|
1736
|
-
return value.replace(/[A-Z]/g, (char) => (char.charCodeAt(0) - 55).toString());
|
|
1737
|
-
}
|
|
1738
|
-
function mod97(numericIban) {
|
|
1739
|
-
let remainder = 0;
|
|
1740
|
-
for (const digit of numericIban) {
|
|
1741
|
-
remainder = (remainder * 10 + Number(digit)) % 97;
|
|
1742
|
-
}
|
|
1743
|
-
return remainder;
|
|
1744
|
-
}
|
|
1745
|
-
function normalizeIBAN(iban) {
|
|
1746
|
-
return stripSeparators(iban).toUpperCase();
|
|
1747
|
-
}
|
|
1748
|
-
function validateIBAN(iban) {
|
|
1749
|
-
const normalized = normalizeIBAN(iban);
|
|
1750
|
-
if (normalized.length !== PK_IBAN_LENGTH) {
|
|
1751
|
-
return false;
|
|
1752
|
-
}
|
|
1753
|
-
if (!PK_IBAN_PATTERN.test(normalized)) {
|
|
1754
|
-
return false;
|
|
1755
|
-
}
|
|
1756
|
-
const rearranged = normalized.slice(4) + normalized.slice(0, 4);
|
|
1757
|
-
const expanded = expandIbanChars(rearranged);
|
|
1758
|
-
return mod97(expanded) === 1;
|
|
1759
|
-
}
|
|
1760
|
-
function getBankFromIBAN(iban) {
|
|
1761
|
-
if (!validateIBAN(iban)) {
|
|
1762
|
-
return null;
|
|
1763
|
-
}
|
|
1764
|
-
const normalized = normalizeIBAN(iban);
|
|
1765
|
-
const bankCode = normalized.slice(4, 8);
|
|
1766
|
-
const resolvedCode = BANK_ALIASES[bankCode] ?? bankCode;
|
|
1767
|
-
return BANK_MAP.get(resolvedCode) ?? BANK_MAP.get(bankCode) ?? null;
|
|
1768
|
-
}
|
|
1769
|
-
|
|
1770
|
-
// data/postal-codes.json
|
|
1771
|
-
var postal_codes_default = [
|
|
1772
|
-
{
|
|
1773
|
-
city: "Islamabad",
|
|
1774
|
-
postalCode: "44000",
|
|
1775
|
-
area: "Islamabad GPO",
|
|
1776
|
-
primary: true
|
|
1777
|
-
},
|
|
1778
|
-
{
|
|
1779
|
-
city: "Rawalpindi",
|
|
1780
|
-
postalCode: "46000",
|
|
1781
|
-
area: "Rawalpindi GPO",
|
|
1782
|
-
primary: true
|
|
1783
|
-
},
|
|
1784
|
-
{
|
|
1785
|
-
city: "Rawalpindi",
|
|
1786
|
-
postalCode: "46300",
|
|
1787
|
-
area: "Satellite Town"
|
|
1788
|
-
},
|
|
1789
|
-
{
|
|
1790
|
-
city: "Murree",
|
|
1791
|
-
postalCode: "47150",
|
|
1792
|
-
area: "Murree GPO",
|
|
1793
|
-
primary: true
|
|
1794
|
-
},
|
|
1795
|
-
{
|
|
1796
|
-
city: "Taxila",
|
|
1797
|
-
postalCode: "47040",
|
|
1798
|
-
area: "Taxila GPO",
|
|
1799
|
-
primary: true
|
|
1800
|
-
},
|
|
1801
|
-
{
|
|
1802
|
-
city: "Lahore",
|
|
1803
|
-
postalCode: "54000",
|
|
1804
|
-
area: "Lahore GPO",
|
|
1805
|
-
primary: true
|
|
1806
|
-
},
|
|
1807
|
-
{
|
|
1808
|
-
city: "Lahore",
|
|
1809
|
-
postalCode: "54660",
|
|
1810
|
-
area: "Gulberg"
|
|
1811
|
-
},
|
|
1812
|
-
{
|
|
1813
|
-
city: "Lahore",
|
|
1814
|
-
postalCode: "54700",
|
|
1815
|
-
area: "Model Town"
|
|
1816
|
-
},
|
|
1817
|
-
{
|
|
1818
|
-
city: "Lahore",
|
|
1819
|
-
postalCode: "54810",
|
|
1820
|
-
area: "Lahore Cantt"
|
|
1821
|
-
},
|
|
1822
|
-
{
|
|
1823
|
-
city: "Lahore",
|
|
1824
|
-
postalCode: "54570",
|
|
1825
|
-
area: "Iqbal Town"
|
|
1826
|
-
},
|
|
1827
|
-
{
|
|
1828
|
-
city: "Faisalabad",
|
|
1829
|
-
postalCode: "38000",
|
|
1830
|
-
area: "Faisalabad GPO",
|
|
1831
|
-
primary: true
|
|
1832
|
-
},
|
|
1833
|
-
{
|
|
1834
|
-
city: "Multan",
|
|
1835
|
-
postalCode: "60000",
|
|
1836
|
-
area: "Multan GPO",
|
|
1837
|
-
primary: true
|
|
1838
|
-
},
|
|
1839
|
-
{
|
|
1840
|
-
city: "Gujranwala",
|
|
1841
|
-
postalCode: "52250",
|
|
1842
|
-
area: "Gujranwala GPO",
|
|
1843
|
-
primary: true
|
|
1844
|
-
},
|
|
1845
|
-
{
|
|
1846
|
-
city: "Sialkot",
|
|
1847
|
-
postalCode: "51310",
|
|
1848
|
-
area: "Sialkot GPO",
|
|
1849
|
-
primary: true
|
|
1850
|
-
},
|
|
1851
|
-
{
|
|
1852
|
-
city: "Sargodha",
|
|
1853
|
-
postalCode: "40100",
|
|
1854
|
-
area: "Sargodha GPO",
|
|
1855
|
-
primary: true
|
|
1856
|
-
},
|
|
1857
|
-
{
|
|
1858
|
-
city: "Bahawalpur",
|
|
1859
|
-
postalCode: "63100",
|
|
1860
|
-
area: "Bahawalpur GPO",
|
|
1861
|
-
primary: true
|
|
1862
|
-
},
|
|
1863
|
-
{
|
|
1864
|
-
city: "Sheikhupura",
|
|
1865
|
-
postalCode: "39350",
|
|
1866
|
-
area: "Sheikhupura GPO",
|
|
1867
|
-
primary: true
|
|
1868
|
-
},
|
|
1869
|
-
{
|
|
1870
|
-
city: "Gujrat",
|
|
1871
|
-
postalCode: "50700",
|
|
1872
|
-
area: "Gujrat GPO",
|
|
1873
|
-
primary: true
|
|
1874
|
-
},
|
|
1875
|
-
{
|
|
1876
|
-
city: "Jhang",
|
|
1877
|
-
postalCode: "35200",
|
|
1878
|
-
area: "Jhang GPO",
|
|
1879
|
-
primary: true
|
|
1880
|
-
},
|
|
1881
|
-
{
|
|
1882
|
-
city: "Sahiwal",
|
|
1883
|
-
postalCode: "57000",
|
|
1884
|
-
area: "Sahiwal GPO",
|
|
1885
|
-
primary: true
|
|
1886
|
-
},
|
|
1887
|
-
{
|
|
1888
|
-
city: "Okara",
|
|
1889
|
-
postalCode: "56300",
|
|
1890
|
-
area: "Okara GPO",
|
|
1891
|
-
primary: true
|
|
1892
|
-
},
|
|
1893
|
-
{
|
|
1894
|
-
city: "Kasur",
|
|
1895
|
-
postalCode: "55050",
|
|
1896
|
-
area: "Kasur GPO",
|
|
1897
|
-
primary: true
|
|
1898
|
-
},
|
|
1899
|
-
{
|
|
1900
|
-
city: "Dera Ghazi Khan",
|
|
1901
|
-
postalCode: "32200",
|
|
1902
|
-
area: "DG Khan GPO",
|
|
1903
|
-
primary: true
|
|
1904
|
-
},
|
|
1905
|
-
{
|
|
1906
|
-
city: "Muzaffargarh",
|
|
1907
|
-
postalCode: "34200",
|
|
1908
|
-
area: "Muzaffargarh GPO",
|
|
1909
|
-
primary: true
|
|
1910
|
-
},
|
|
1911
|
-
{
|
|
1912
|
-
city: "Rahim Yar Khan",
|
|
1913
|
-
postalCode: "64200",
|
|
1914
|
-
area: "RY Khan GPO",
|
|
1915
|
-
primary: true
|
|
1916
|
-
},
|
|
1917
|
-
{
|
|
1918
|
-
city: "Bahawalnagar",
|
|
1919
|
-
postalCode: "62300",
|
|
1920
|
-
area: "Bahawalnagar GPO",
|
|
1921
|
-
primary: true
|
|
1922
|
-
},
|
|
1923
|
-
{
|
|
1924
|
-
city: "Khanewal",
|
|
1925
|
-
postalCode: "58150",
|
|
1926
|
-
area: "Khanewal GPO",
|
|
1927
|
-
primary: true
|
|
1928
|
-
},
|
|
1929
|
-
{
|
|
1930
|
-
city: "Vehari",
|
|
1931
|
-
postalCode: "61100",
|
|
1932
|
-
area: "Vehari GPO",
|
|
1933
|
-
primary: true
|
|
1934
|
-
},
|
|
1935
|
-
{
|
|
1936
|
-
city: "Pakpattan",
|
|
1937
|
-
postalCode: "57400",
|
|
1938
|
-
area: "Pakpattan GPO",
|
|
1939
|
-
primary: true
|
|
1940
|
-
},
|
|
1941
|
-
{
|
|
1942
|
-
city: "Chiniot",
|
|
1943
|
-
postalCode: "35400",
|
|
1944
|
-
area: "Chiniot GPO",
|
|
1945
|
-
primary: true
|
|
1946
|
-
},
|
|
1947
|
-
{
|
|
1948
|
-
city: "Hafizabad",
|
|
1949
|
-
postalCode: "52110",
|
|
1950
|
-
area: "Hafizabad GPO",
|
|
1951
|
-
primary: true
|
|
1952
|
-
},
|
|
1953
|
-
{
|
|
1954
|
-
city: "Mandi Bahauddin",
|
|
1955
|
-
postalCode: "50400",
|
|
1956
|
-
area: "Mandi Bahauddin GPO",
|
|
1957
|
-
primary: true
|
|
1958
|
-
},
|
|
1959
|
-
{
|
|
1960
|
-
city: "Jhelum",
|
|
1961
|
-
postalCode: "49600",
|
|
1962
|
-
area: "Jhelum GPO",
|
|
1963
|
-
primary: true
|
|
1964
|
-
},
|
|
1965
|
-
{
|
|
1966
|
-
city: "Attock",
|
|
1967
|
-
postalCode: "43600",
|
|
1968
|
-
area: "Attock GPO",
|
|
1969
|
-
primary: true
|
|
1970
|
-
},
|
|
1971
|
-
{
|
|
1972
|
-
city: "Chakwal",
|
|
1973
|
-
postalCode: "48800",
|
|
1974
|
-
area: "Chakwal GPO",
|
|
1975
|
-
primary: true
|
|
1976
|
-
},
|
|
1977
|
-
{
|
|
1978
|
-
city: "Mianwali",
|
|
1979
|
-
postalCode: "42200",
|
|
1980
|
-
area: "Mianwali GPO",
|
|
1981
|
-
primary: true
|
|
1982
|
-
},
|
|
1983
|
-
{
|
|
1984
|
-
city: "Bhakkar",
|
|
1985
|
-
postalCode: "30000",
|
|
1986
|
-
area: "Bhakkar GPO",
|
|
1987
|
-
primary: true
|
|
1988
|
-
},
|
|
1989
|
-
{
|
|
1990
|
-
city: "Khushab",
|
|
1991
|
-
postalCode: "41000",
|
|
1992
|
-
area: "Khushab GPO",
|
|
1993
|
-
primary: true
|
|
1994
|
-
},
|
|
1995
|
-
{
|
|
1996
|
-
city: "Narowal",
|
|
1997
|
-
postalCode: "51600",
|
|
1998
|
-
area: "Narowal GPO",
|
|
1999
|
-
primary: true
|
|
2000
|
-
},
|
|
2001
|
-
{
|
|
2002
|
-
city: "Nankana Sahib",
|
|
2003
|
-
postalCode: "39100",
|
|
2004
|
-
area: "Nankana Sahib GPO",
|
|
2005
|
-
primary: true
|
|
2006
|
-
},
|
|
2007
|
-
{
|
|
2008
|
-
city: "Toba Tek Singh",
|
|
2009
|
-
postalCode: "36050",
|
|
2010
|
-
area: "TTS GPO",
|
|
2011
|
-
primary: true
|
|
2012
|
-
},
|
|
2013
|
-
{
|
|
2014
|
-
city: "Lodhran",
|
|
2015
|
-
postalCode: "59320",
|
|
2016
|
-
area: "Lodhran GPO",
|
|
2017
|
-
primary: true
|
|
2018
|
-
},
|
|
2019
|
-
{
|
|
2020
|
-
city: "Layyah",
|
|
2021
|
-
postalCode: "31200",
|
|
2022
|
-
area: "Layyah GPO",
|
|
2023
|
-
primary: true
|
|
2024
|
-
},
|
|
2025
|
-
{
|
|
2026
|
-
city: "Rajanpur",
|
|
2027
|
-
postalCode: "33500",
|
|
2028
|
-
area: "Rajanpur GPO",
|
|
2029
|
-
primary: true
|
|
2030
|
-
},
|
|
2031
|
-
{
|
|
2032
|
-
city: "Wazirabad",
|
|
2033
|
-
postalCode: "52000",
|
|
2034
|
-
area: "Wazirabad GPO",
|
|
2035
|
-
primary: true
|
|
2036
|
-
},
|
|
2037
|
-
{
|
|
2038
|
-
city: "Talagang",
|
|
2039
|
-
postalCode: "48100",
|
|
2040
|
-
area: "Talagang GPO",
|
|
2041
|
-
primary: true
|
|
2042
|
-
},
|
|
2043
|
-
{
|
|
2044
|
-
city: "Kot Addu",
|
|
2045
|
-
postalCode: "34050",
|
|
2046
|
-
area: "Kot Addu GPO",
|
|
2047
|
-
primary: true
|
|
2048
|
-
},
|
|
2049
|
-
{
|
|
2050
|
-
city: "Karachi",
|
|
2051
|
-
postalCode: "74200",
|
|
2052
|
-
area: "Karachi GPO",
|
|
2053
|
-
primary: true
|
|
2054
|
-
},
|
|
2055
|
-
{
|
|
2056
|
-
city: "Karachi",
|
|
2057
|
-
postalCode: "74000",
|
|
2058
|
-
area: "Karachi City GPO"
|
|
2059
|
-
},
|
|
2060
|
-
{
|
|
2061
|
-
city: "Karachi",
|
|
2062
|
-
postalCode: "74400",
|
|
2063
|
-
area: "Karachi Saddar GPO"
|
|
2064
|
-
},
|
|
2065
|
-
{
|
|
2066
|
-
city: "Karachi",
|
|
2067
|
-
postalCode: "74800",
|
|
2068
|
-
area: "New Town GPO"
|
|
2069
|
-
},
|
|
2070
|
-
{
|
|
2071
|
-
city: "Karachi",
|
|
2072
|
-
postalCode: "74700",
|
|
2073
|
-
area: "Al-Hydri GPO"
|
|
2074
|
-
},
|
|
2075
|
-
{
|
|
2076
|
-
city: "Karachi",
|
|
2077
|
-
postalCode: "75500",
|
|
2078
|
-
area: "Defence"
|
|
2079
|
-
},
|
|
2080
|
-
{
|
|
2081
|
-
city: "Karachi",
|
|
2082
|
-
postalCode: "75600",
|
|
2083
|
-
area: "Clifton"
|
|
2084
|
-
},
|
|
2085
|
-
{
|
|
2086
|
-
city: "Karachi",
|
|
2087
|
-
postalCode: "75300",
|
|
2088
|
-
area: "Gulshan-e-Iqbal"
|
|
2089
|
-
},
|
|
2090
|
-
{
|
|
2091
|
-
city: "Karachi",
|
|
2092
|
-
postalCode: "74600",
|
|
2093
|
-
area: "Nazimabad"
|
|
2094
|
-
},
|
|
2095
|
-
{
|
|
2096
|
-
city: "Karachi",
|
|
2097
|
-
postalCode: "74900",
|
|
2098
|
-
area: "Korangi"
|
|
2099
|
-
},
|
|
2100
|
-
{
|
|
2101
|
-
city: "Karachi",
|
|
2102
|
-
postalCode: "75950",
|
|
2103
|
-
area: "Federal B Area"
|
|
2104
|
-
},
|
|
2105
|
-
{
|
|
2106
|
-
city: "Hyderabad",
|
|
2107
|
-
postalCode: "71000",
|
|
2108
|
-
area: "Hyderabad GPO",
|
|
2109
|
-
primary: true
|
|
2110
|
-
},
|
|
2111
|
-
{
|
|
2112
|
-
city: "Sukkur",
|
|
2113
|
-
postalCode: "65200",
|
|
2114
|
-
area: "Sukkur GPO",
|
|
2115
|
-
primary: true
|
|
2116
|
-
},
|
|
2117
|
-
{
|
|
2118
|
-
city: "Larkana",
|
|
2119
|
-
postalCode: "77150",
|
|
2120
|
-
area: "Larkana GPO",
|
|
2121
|
-
primary: true
|
|
2122
|
-
},
|
|
2123
|
-
{
|
|
2124
|
-
city: "Nawabshah",
|
|
2125
|
-
postalCode: "67450",
|
|
2126
|
-
area: "Nawabshah GPO",
|
|
2127
|
-
primary: true
|
|
2128
|
-
},
|
|
2129
|
-
{
|
|
2130
|
-
city: "Mirpur Khas",
|
|
2131
|
-
postalCode: "69000",
|
|
2132
|
-
area: "Mirpur Khas GPO",
|
|
2133
|
-
primary: true
|
|
2134
|
-
},
|
|
2135
|
-
{
|
|
2136
|
-
city: "Jacobabad",
|
|
2137
|
-
postalCode: "79000",
|
|
2138
|
-
area: "Jacobabad GPO",
|
|
2139
|
-
primary: true
|
|
2140
|
-
},
|
|
2141
|
-
{
|
|
2142
|
-
city: "Shikarpur",
|
|
2143
|
-
postalCode: "78100",
|
|
2144
|
-
area: "Shikarpur GPO",
|
|
2145
|
-
primary: true
|
|
2146
|
-
},
|
|
2147
|
-
{
|
|
2148
|
-
city: "Dadu",
|
|
2149
|
-
postalCode: "76200",
|
|
2150
|
-
area: "Dadu GPO",
|
|
2151
|
-
primary: true
|
|
2152
|
-
},
|
|
2153
|
-
{
|
|
2154
|
-
city: "Badin",
|
|
2155
|
-
postalCode: "72220",
|
|
2156
|
-
area: "Badin GPO",
|
|
2157
|
-
primary: true
|
|
2158
|
-
},
|
|
2159
|
-
{
|
|
2160
|
-
city: "Thatta",
|
|
2161
|
-
postalCode: "73020",
|
|
2162
|
-
area: "Thatta GPO",
|
|
2163
|
-
primary: true
|
|
2164
|
-
},
|
|
2165
|
-
{
|
|
2166
|
-
city: "Sanghar",
|
|
2167
|
-
postalCode: "68100",
|
|
2168
|
-
area: "Sanghar GPO",
|
|
2169
|
-
primary: true
|
|
2170
|
-
},
|
|
2171
|
-
{
|
|
2172
|
-
city: "Umerkot",
|
|
2173
|
-
postalCode: "69100",
|
|
2174
|
-
area: "Umerkot GPO",
|
|
2175
|
-
primary: true
|
|
2176
|
-
},
|
|
2177
|
-
{
|
|
2178
|
-
city: "Tharparkar",
|
|
2179
|
-
postalCode: "69230",
|
|
2180
|
-
area: "Mithi GPO",
|
|
2181
|
-
primary: true
|
|
2182
|
-
},
|
|
2183
|
-
{
|
|
2184
|
-
city: "Jamshoro",
|
|
2185
|
-
postalCode: "76080",
|
|
2186
|
-
area: "Jamshoro GPO",
|
|
2187
|
-
primary: true
|
|
2188
|
-
},
|
|
2189
|
-
{
|
|
2190
|
-
city: "Matiari",
|
|
2191
|
-
postalCode: "70100",
|
|
2192
|
-
area: "Matiari GPO",
|
|
2193
|
-
primary: true
|
|
2194
|
-
},
|
|
2195
|
-
{
|
|
2196
|
-
city: "Khairpur",
|
|
2197
|
-
postalCode: "66020",
|
|
2198
|
-
area: "Khairpur GPO",
|
|
2199
|
-
primary: true
|
|
2200
|
-
},
|
|
2201
|
-
{
|
|
2202
|
-
city: "Ghotki",
|
|
2203
|
-
postalCode: "65110",
|
|
2204
|
-
area: "Ghotki GPO",
|
|
2205
|
-
primary: true
|
|
2206
|
-
},
|
|
2207
|
-
{
|
|
2208
|
-
city: "Kashmore",
|
|
2209
|
-
postalCode: "79200",
|
|
2210
|
-
area: "Kashmore GPO",
|
|
2211
|
-
primary: true
|
|
2212
|
-
},
|
|
2213
|
-
{
|
|
2214
|
-
city: "Sujawal",
|
|
2215
|
-
postalCode: "73220",
|
|
2216
|
-
area: "Sujawal GPO",
|
|
2217
|
-
primary: true
|
|
2218
|
-
},
|
|
2219
|
-
{
|
|
2220
|
-
city: "Peshawar",
|
|
2221
|
-
postalCode: "25000",
|
|
2222
|
-
area: "Peshawar GPO",
|
|
2223
|
-
primary: true
|
|
2224
|
-
},
|
|
2225
|
-
{
|
|
2226
|
-
city: "Mardan",
|
|
2227
|
-
postalCode: "23200",
|
|
2228
|
-
area: "Mardan GPO",
|
|
2229
|
-
primary: true
|
|
2230
|
-
},
|
|
2231
|
-
{
|
|
2232
|
-
city: "Abbottabad",
|
|
2233
|
-
postalCode: "22010",
|
|
2234
|
-
area: "Abbottabad GPO",
|
|
2235
|
-
primary: true
|
|
2236
|
-
},
|
|
2237
|
-
{
|
|
2238
|
-
city: "Kohat",
|
|
2239
|
-
postalCode: "26000",
|
|
2240
|
-
area: "Kohat GPO",
|
|
2241
|
-
primary: true
|
|
2242
|
-
},
|
|
2243
|
-
{
|
|
2244
|
-
city: "Bannu",
|
|
2245
|
-
postalCode: "28100",
|
|
2246
|
-
area: "Bannu GPO",
|
|
2247
|
-
primary: true
|
|
2248
|
-
},
|
|
2249
|
-
{
|
|
2250
|
-
city: "Swat",
|
|
2251
|
-
postalCode: "19200",
|
|
2252
|
-
area: "Mingora GPO",
|
|
2253
|
-
primary: true
|
|
2254
|
-
},
|
|
2255
|
-
{
|
|
2256
|
-
city: "Mansehra",
|
|
2257
|
-
postalCode: "21300",
|
|
2258
|
-
area: "Mansehra GPO",
|
|
2259
|
-
primary: true
|
|
2260
|
-
},
|
|
2261
|
-
{
|
|
2262
|
-
city: "Dera Ismail Khan",
|
|
2263
|
-
postalCode: "29120",
|
|
2264
|
-
area: "DI Khan GPO",
|
|
2265
|
-
primary: true
|
|
2266
|
-
},
|
|
2267
|
-
{
|
|
2268
|
-
city: "Nowshera",
|
|
2269
|
-
postalCode: "24100",
|
|
2270
|
-
area: "Nowshera GPO",
|
|
2271
|
-
primary: true
|
|
2272
|
-
},
|
|
2273
|
-
{
|
|
2274
|
-
city: "Swabi",
|
|
2275
|
-
postalCode: "23430",
|
|
2276
|
-
area: "Swabi GPO",
|
|
2277
|
-
primary: true
|
|
2278
|
-
},
|
|
2279
|
-
{
|
|
2280
|
-
city: "Charsadda",
|
|
2281
|
-
postalCode: "24420",
|
|
2282
|
-
area: "Charsadda GPO",
|
|
2283
|
-
primary: true
|
|
2284
|
-
},
|
|
2285
|
-
{
|
|
2286
|
-
city: "Haripur",
|
|
2287
|
-
postalCode: "22620",
|
|
2288
|
-
area: "Haripur GPO",
|
|
2289
|
-
primary: true
|
|
2290
|
-
},
|
|
2291
|
-
{
|
|
2292
|
-
city: "Hangu",
|
|
2293
|
-
postalCode: "26190",
|
|
2294
|
-
area: "Hangu GPO",
|
|
2295
|
-
primary: true
|
|
2296
|
-
},
|
|
2297
|
-
{
|
|
2298
|
-
city: "Karak",
|
|
2299
|
-
postalCode: "27200",
|
|
2300
|
-
area: "Karak GPO",
|
|
2301
|
-
primary: true
|
|
2302
|
-
},
|
|
2303
|
-
{
|
|
2304
|
-
city: "Tank",
|
|
2305
|
-
postalCode: "29430",
|
|
2306
|
-
area: "Tank GPO",
|
|
2307
|
-
primary: true
|
|
2308
|
-
},
|
|
2309
|
-
{
|
|
2310
|
-
city: "Lakki Marwat",
|
|
2311
|
-
postalCode: "28420",
|
|
2312
|
-
area: "Lakki Marwat GPO",
|
|
2313
|
-
primary: true
|
|
2314
|
-
},
|
|
2315
|
-
{
|
|
2316
|
-
city: "Quetta",
|
|
2317
|
-
postalCode: "87300",
|
|
2318
|
-
area: "Quetta GPO",
|
|
2319
|
-
primary: true
|
|
2320
|
-
},
|
|
2321
|
-
{
|
|
2322
|
-
city: "Gwadar",
|
|
2323
|
-
postalCode: "91200",
|
|
2324
|
-
area: "Gwadar GPO",
|
|
2325
|
-
primary: true
|
|
2326
|
-
},
|
|
2327
|
-
{
|
|
2328
|
-
city: "Turbat",
|
|
2329
|
-
postalCode: "92600",
|
|
2330
|
-
area: "Turbat GPO",
|
|
2331
|
-
primary: true
|
|
2332
|
-
},
|
|
2333
|
-
{
|
|
2334
|
-
city: "Khuzdar",
|
|
2335
|
-
postalCode: "89100",
|
|
2336
|
-
area: "Khuzdar GPO",
|
|
2337
|
-
primary: true
|
|
2338
|
-
},
|
|
2339
|
-
{
|
|
2340
|
-
city: "Sibi",
|
|
2341
|
-
postalCode: "82000",
|
|
2342
|
-
area: "Sibi GPO",
|
|
2343
|
-
primary: true
|
|
2344
|
-
},
|
|
2345
|
-
{
|
|
2346
|
-
city: "Loralai",
|
|
2347
|
-
postalCode: "84800",
|
|
2348
|
-
area: "Loralai GPO",
|
|
2349
|
-
primary: true
|
|
2350
|
-
},
|
|
2351
|
-
{
|
|
2352
|
-
city: "Zhob",
|
|
2353
|
-
postalCode: "85200",
|
|
2354
|
-
area: "Zhob GPO",
|
|
2355
|
-
primary: true
|
|
2356
|
-
},
|
|
2357
|
-
{
|
|
2358
|
-
city: "Chaman",
|
|
2359
|
-
postalCode: "86000",
|
|
2360
|
-
area: "Chaman GPO",
|
|
2361
|
-
primary: true
|
|
2362
|
-
},
|
|
2363
|
-
{
|
|
2364
|
-
city: "Hub",
|
|
2365
|
-
postalCode: "90250",
|
|
2366
|
-
area: "Hub GPO",
|
|
2367
|
-
primary: true
|
|
2368
|
-
},
|
|
2369
|
-
{
|
|
2370
|
-
city: "Muzaffarabad",
|
|
2371
|
-
postalCode: "13100",
|
|
2372
|
-
area: "Muzaffarabad GPO",
|
|
2373
|
-
primary: true
|
|
2374
|
-
},
|
|
2375
|
-
{
|
|
2376
|
-
city: "Mirpur",
|
|
2377
|
-
postalCode: "10250",
|
|
2378
|
-
area: "Mirpur GPO",
|
|
2379
|
-
primary: true
|
|
2380
|
-
},
|
|
2381
|
-
{
|
|
2382
|
-
city: "Kotli",
|
|
2383
|
-
postalCode: "11100",
|
|
2384
|
-
area: "Kotli GPO",
|
|
2385
|
-
primary: true
|
|
2386
|
-
},
|
|
2387
|
-
{
|
|
2388
|
-
city: "Rawalakot",
|
|
2389
|
-
postalCode: "12350",
|
|
2390
|
-
area: "Rawalakot GPO",
|
|
2391
|
-
primary: true
|
|
2392
|
-
},
|
|
2393
|
-
{
|
|
2394
|
-
city: "Bagh",
|
|
2395
|
-
postalCode: "12500",
|
|
2396
|
-
area: "Bagh GPO",
|
|
2397
|
-
primary: true
|
|
2398
|
-
},
|
|
2399
|
-
{
|
|
2400
|
-
city: "Gilgit",
|
|
2401
|
-
postalCode: "15700",
|
|
2402
|
-
area: "Gilgit GPO",
|
|
2403
|
-
primary: true
|
|
2404
|
-
},
|
|
2405
|
-
{
|
|
2406
|
-
city: "Skardu",
|
|
2407
|
-
postalCode: "16100",
|
|
2408
|
-
area: "Skardu GPO",
|
|
2409
|
-
primary: true
|
|
2410
|
-
}
|
|
2411
|
-
];
|
|
2412
|
-
|
|
2413
|
-
// src/postal.ts
|
|
2414
|
-
var POSTAL_ENTRIES = postal_codes_default;
|
|
2415
|
-
var POSTAL_BY_CODE = new Map(
|
|
2416
|
-
POSTAL_ENTRIES.map((entry) => [entry.postalCode, entry.city])
|
|
2417
|
-
);
|
|
2418
|
-
var POSTAL_BY_CITY = /* @__PURE__ */ new Map();
|
|
2419
|
-
for (const entry of POSTAL_ENTRIES) {
|
|
2420
|
-
const key = normalizeKey(entry.city);
|
|
2421
|
-
const existing = POSTAL_BY_CITY.get(key);
|
|
2422
|
-
if (existing === void 0 || entry.primary === true) {
|
|
2423
|
-
POSTAL_BY_CITY.set(key, entry.postalCode);
|
|
2424
|
-
}
|
|
2425
|
-
}
|
|
2426
|
-
function getCityByPostalCode(postalCode) {
|
|
2427
|
-
const code = stripPostalCode(postalCode);
|
|
2428
|
-
if (code.length === 0) {
|
|
2429
|
-
return null;
|
|
2430
|
-
}
|
|
2431
|
-
return POSTAL_BY_CODE.get(code) ?? null;
|
|
2432
|
-
}
|
|
2433
|
-
function getPostalCode(city) {
|
|
2434
|
-
const key = normalizeKey(city);
|
|
2435
|
-
if (key.length === 0) {
|
|
2436
|
-
return null;
|
|
2437
|
-
}
|
|
2438
|
-
return POSTAL_BY_CITY.get(key) ?? null;
|
|
2439
|
-
}
|
|
2440
|
-
function getPostalCodes(city) {
|
|
2441
|
-
const key = normalizeKey(city);
|
|
2442
|
-
if (key.length === 0) {
|
|
2443
|
-
return [];
|
|
2444
|
-
}
|
|
2445
|
-
return POSTAL_ENTRIES.filter((entry) => normalizeKey(entry.city) === key).map((entry) => entry.postalCode).sort((a, b) => a.localeCompare(b));
|
|
2446
|
-
}
|
|
2447
|
-
function searchPostalCodes(query) {
|
|
2448
|
-
const normalizedQuery = normalizeKey(query);
|
|
2449
|
-
if (normalizedQuery.length === 0) {
|
|
2450
|
-
return [];
|
|
2451
|
-
}
|
|
2452
|
-
const matches = POSTAL_ENTRIES.filter((entry) => {
|
|
2453
|
-
const cityKey = normalizeKey(entry.city);
|
|
2454
|
-
const areaKey = entry.area ? normalizeKey(entry.area) : "";
|
|
2455
|
-
return cityKey.includes(normalizedQuery) || areaKey.includes(normalizedQuery) || entry.postalCode.startsWith(query.trim());
|
|
2456
|
-
}).map((entry) => entry.postalCode);
|
|
2457
|
-
return [...new Set(matches)].sort((a, b) => a.localeCompare(b));
|
|
2458
|
-
}
|
|
2459
|
-
function getPostalAreas(city) {
|
|
2460
|
-
const key = normalizeKey(city);
|
|
2461
|
-
if (key.length === 0) {
|
|
2462
|
-
return [];
|
|
2463
|
-
}
|
|
2464
|
-
return POSTAL_ENTRIES.filter(
|
|
2465
|
-
(entry) => normalizeKey(entry.city) === key && entry.area
|
|
2466
|
-
).map((entry) => entry.area).sort((a, b) => a.localeCompare(b));
|
|
2467
|
-
}
|
|
2468
|
-
function stripPostalCode(postalCode) {
|
|
2469
|
-
return postalCode.trim().replace(/\s+/g, "");
|
|
2470
|
-
}
|
|
2471
|
-
|
|
2472
|
-
// src/address.ts
|
|
2473
|
-
var CITY_NAMES = cities_default.map((entry) => entry.city).sort((a, b) => b.length - a.length);
|
|
2474
|
-
var DISTRICT_NAMES = districts_default.map((entry) => entry.district).sort((a, b) => b.length - a.length);
|
|
2475
|
-
var PROVINCES = [
|
|
2476
|
-
"Islamabad Capital Territory",
|
|
2477
|
-
"Azad Jammu and Kashmir",
|
|
2478
|
-
"Gilgit-Baltistan",
|
|
2479
|
-
"Khyber Pakhtunkhwa",
|
|
2480
|
-
"Balochistan",
|
|
2481
|
-
"Punjab",
|
|
2482
|
-
"Sindh"
|
|
2483
|
-
];
|
|
2484
|
-
function parseAddress(address) {
|
|
2485
|
-
const raw = normalizeWhitespace(address);
|
|
2486
|
-
if (raw.length === 0) {
|
|
2487
|
-
return emptyParsedAddress(raw);
|
|
2488
|
-
}
|
|
2489
|
-
let working = raw;
|
|
2490
|
-
let postalCode = null;
|
|
2491
|
-
const postalMatch = working.match(/\b(\d{5})\b/);
|
|
2492
|
-
if (postalMatch?.[1]) {
|
|
2493
|
-
postalCode = postalMatch[1];
|
|
2494
|
-
working = working.replace(postalMatch[0], " ").trim();
|
|
2495
|
-
}
|
|
2496
|
-
const segments = working.split(",").map((part) => normalizeWhitespace(part)).filter((part) => part.length > 0);
|
|
2497
|
-
const consumed = /* @__PURE__ */ new Set();
|
|
2498
|
-
let province = null;
|
|
2499
|
-
let city = null;
|
|
2500
|
-
let district = null;
|
|
2501
|
-
for (let i = segments.length - 1; i >= 0; i -= 1) {
|
|
2502
|
-
const segment = segments[i];
|
|
2503
|
-
if (segment === void 0 || consumed.has(i)) {
|
|
2504
|
-
continue;
|
|
2505
|
-
}
|
|
2506
|
-
if (province === null) {
|
|
2507
|
-
const matchedProvince = matchFromList(segment, PROVINCES);
|
|
2508
|
-
if (matchedProvince) {
|
|
2509
|
-
province = matchedProvince;
|
|
2510
|
-
consumed.add(i);
|
|
2511
|
-
continue;
|
|
2512
|
-
}
|
|
2513
|
-
}
|
|
2514
|
-
if (city === null) {
|
|
2515
|
-
const matchedCity = matchFromList(segment, CITY_NAMES);
|
|
2516
|
-
if (matchedCity) {
|
|
2517
|
-
city = matchedCity;
|
|
2518
|
-
consumed.add(i);
|
|
2519
|
-
continue;
|
|
2520
|
-
}
|
|
2521
|
-
}
|
|
2522
|
-
if (district === null) {
|
|
2523
|
-
const matchedDistrict = matchFromList(segment, DISTRICT_NAMES);
|
|
2524
|
-
if (matchedDistrict) {
|
|
2525
|
-
district = matchedDistrict;
|
|
2526
|
-
if (city === null) {
|
|
2527
|
-
city = matchedDistrict;
|
|
2528
|
-
}
|
|
2529
|
-
consumed.add(i);
|
|
2530
|
-
}
|
|
2531
|
-
}
|
|
2532
|
-
}
|
|
2533
|
-
if (postalCode !== null && city === null) {
|
|
2534
|
-
city = getCityByPostalCode(postalCode);
|
|
2535
|
-
}
|
|
2536
|
-
if (city !== null && province === null) {
|
|
2537
|
-
province = getProvince(city) ?? getDistrictProvince(city);
|
|
2538
|
-
}
|
|
2539
|
-
if (district !== null && province === null) {
|
|
2540
|
-
province = getDistrictProvince(district);
|
|
2541
|
-
}
|
|
2542
|
-
const remaining = segments.filter((_, index) => !consumed.has(index));
|
|
2543
|
-
const street = remaining.length > 0 ? remaining[0] ?? null : null;
|
|
2544
|
-
const area = remaining.length > 1 ? remaining.slice(1).join(", ") : null;
|
|
2545
|
-
return {
|
|
2546
|
-
raw,
|
|
2547
|
-
street,
|
|
2548
|
-
area,
|
|
2549
|
-
city,
|
|
2550
|
-
district,
|
|
2551
|
-
province,
|
|
2552
|
-
postalCode
|
|
2553
|
-
};
|
|
2554
|
-
}
|
|
2555
|
-
function formatAddress(parts) {
|
|
2556
|
-
const segments = [];
|
|
2557
|
-
if (parts.street) {
|
|
2558
|
-
segments.push(parts.street);
|
|
2559
|
-
}
|
|
2560
|
-
if (parts.area) {
|
|
2561
|
-
segments.push(parts.area);
|
|
2562
|
-
}
|
|
2563
|
-
if (parts.city) {
|
|
2564
|
-
segments.push(parts.city);
|
|
2565
|
-
} else if (parts.district) {
|
|
2566
|
-
segments.push(parts.district);
|
|
2567
|
-
}
|
|
2568
|
-
if (parts.province) {
|
|
2569
|
-
segments.push(parts.province);
|
|
2570
|
-
}
|
|
2571
|
-
let formatted = segments.join(", ");
|
|
2572
|
-
const postal = parts.postalCode ?? (parts.city ? getPostalCode(parts.city) : null);
|
|
2573
|
-
if (postal) {
|
|
2574
|
-
formatted = formatted.length > 0 ? `${formatted} ${postal}` : postal;
|
|
2575
|
-
}
|
|
2576
|
-
return formatted.length > 0 ? formatted : parts.raw;
|
|
2577
|
-
}
|
|
2578
|
-
function emptyParsedAddress(raw) {
|
|
2579
|
-
return {
|
|
2580
|
-
raw,
|
|
2581
|
-
street: null,
|
|
2582
|
-
area: null,
|
|
2583
|
-
city: null,
|
|
2584
|
-
district: null,
|
|
2585
|
-
province: null,
|
|
2586
|
-
postalCode: null
|
|
2587
|
-
};
|
|
2588
|
-
}
|
|
2589
|
-
function matchFromList(segment, options) {
|
|
2590
|
-
const key = normalizeKey(segment);
|
|
2591
|
-
for (const option of options) {
|
|
2592
|
-
if (normalizeKey(option) === key) {
|
|
2593
|
-
return option;
|
|
2594
|
-
}
|
|
2595
|
-
}
|
|
2596
|
-
return null;
|
|
2597
|
-
}
|
|
2598
|
-
|
|
2599
|
-
// src/text.ts
|
|
2600
|
-
var URDU_DIGITS = ["\u06F0", "\u06F1", "\u06F2", "\u06F3", "\u06F4", "\u06F5", "\u06F6", "\u06F7", "\u06F8", "\u06F9"];
|
|
2601
|
-
var ENGLISH_DIGITS = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
2602
|
-
var ARABIC_INDIC_DIGITS = "\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669";
|
|
2603
|
-
var ROMAN_URDU_REPLACEMENTS = [
|
|
2604
|
-
[/\bkia\b/gi, "kya"],
|
|
2605
|
-
[/\bker\b/gi, "kar"],
|
|
2606
|
-
[/\bkr\b/gi, "kar"],
|
|
2607
|
-
[/\bhai\b/gi, "hai"],
|
|
2608
|
-
[/\bhy\b/gi, "hai"],
|
|
2609
|
-
[/\bmujhe\b/gi, "mujhe"],
|
|
2610
|
-
[/\bmujhay\b/gi, "mujhe"],
|
|
2611
|
-
[/\bap\b/gi, "aap"],
|
|
2612
|
-
[/\btum\b/gi, "tum"],
|
|
2613
|
-
[/\bshukria\b/gi, "shukriya"],
|
|
2614
|
-
[/\bmein\b/gi, "main"],
|
|
2615
|
-
[/\bmen\b/gi, "main"],
|
|
2616
|
-
[/\bnahi\b/gi, "nahi"],
|
|
2617
|
-
[/\bnhi\b/gi, "nahi"],
|
|
2618
|
-
[/\bassalamu alaikum\b/gi, "assalamualaikum"],
|
|
2619
|
-
[/\bassalam o alaikum\b/gi, "assalamualaikum"],
|
|
2620
|
-
[/\bkhuda hafiz\b/gi, "khuda hafiz"],
|
|
2621
|
-
[/\ballah hafiz\b/gi, "allah hafiz"]
|
|
2622
|
-
];
|
|
2623
|
-
function normalizeText(text) {
|
|
2624
|
-
return normalizeWhitespace(text.normalize("NFC"));
|
|
2625
|
-
}
|
|
2626
|
-
function normalizeRomanUrdu(text) {
|
|
2627
|
-
let result = normalizeText(toEnglishDigits(text));
|
|
2628
|
-
for (const [pattern, replacement] of ROMAN_URDU_REPLACEMENTS) {
|
|
2629
|
-
result = result.replace(pattern, replacement);
|
|
2630
|
-
}
|
|
2631
|
-
return result;
|
|
2632
|
-
}
|
|
2633
|
-
function toUrduDigits(text) {
|
|
2634
|
-
return replaceDigitSets(text, ENGLISH_DIGITS, URDU_DIGITS, ARABIC_INDIC_DIGITS);
|
|
2635
|
-
}
|
|
2636
|
-
function toEnglishDigits(text) {
|
|
2637
|
-
let result = text;
|
|
2638
|
-
for (let i = 0; i < URDU_DIGITS.length; i += 1) {
|
|
2639
|
-
const urdu = URDU_DIGITS[i];
|
|
2640
|
-
const english = ENGLISH_DIGITS[i];
|
|
2641
|
-
if (urdu !== void 0 && english !== void 0) {
|
|
2642
|
-
result = result.replaceAll(urdu, english);
|
|
2643
|
-
}
|
|
2644
|
-
}
|
|
2645
|
-
for (let i = 0; i < ARABIC_INDIC_DIGITS.length; i += 1) {
|
|
2646
|
-
const arabic = ARABIC_INDIC_DIGITS[i];
|
|
2647
|
-
const english = ENGLISH_DIGITS[i];
|
|
2648
|
-
if (arabic !== void 0 && english !== void 0) {
|
|
2649
|
-
result = result.replaceAll(arabic, english);
|
|
2650
|
-
}
|
|
2651
|
-
}
|
|
2652
|
-
return result;
|
|
2653
|
-
}
|
|
2654
|
-
function replaceDigitSets(text, fromEnglish, toUrdu, fromArabic) {
|
|
2655
|
-
let result = text;
|
|
2656
|
-
for (let i = 0; i < fromEnglish.length; i += 1) {
|
|
2657
|
-
const english = fromEnglish[i];
|
|
2658
|
-
const urdu = toUrdu[i];
|
|
2659
|
-
if (english !== void 0 && urdu !== void 0) {
|
|
2660
|
-
result = result.replaceAll(english, urdu);
|
|
2661
|
-
}
|
|
2662
|
-
}
|
|
2663
|
-
for (let i = 0; i < fromArabic.length; i += 1) {
|
|
2664
|
-
const arabic = fromArabic[i];
|
|
2665
|
-
const urdu = toUrdu[i];
|
|
2666
|
-
if (arabic !== void 0 && urdu !== void 0) {
|
|
2667
|
-
result = result.replaceAll(arabic, urdu);
|
|
2668
|
-
}
|
|
2669
|
-
}
|
|
2670
|
-
return result;
|
|
2671
|
-
}
|
|
2672
|
-
|
|
2673
|
-
// src/hijri.ts
|
|
2674
|
-
var HIJRI_MONTHS = [
|
|
2675
|
-
"Muharram",
|
|
2676
|
-
"Safar",
|
|
2677
|
-
"Rabi al-Awwal",
|
|
2678
|
-
"Rabi al-Thani",
|
|
2679
|
-
"Jumada al-Awwal",
|
|
2680
|
-
"Jumada al-Thani",
|
|
2681
|
-
"Rajab",
|
|
2682
|
-
"Shaaban",
|
|
2683
|
-
"Ramadan",
|
|
2684
|
-
"Shawwal",
|
|
2685
|
-
"Dhu al-Qadah",
|
|
2686
|
-
"Dhu al-Hijjah"
|
|
2687
|
-
];
|
|
2688
|
-
function toHijri(date) {
|
|
2689
|
-
const jd = gregorianToJulianDay(
|
|
2690
|
-
date.getFullYear(),
|
|
2691
|
-
date.getMonth() + 1,
|
|
2692
|
-
date.getDate()
|
|
2693
|
-
);
|
|
2694
|
-
return julianDayToHijri(jd);
|
|
2695
|
-
}
|
|
2696
|
-
function fromHijri(hijri) {
|
|
2697
|
-
const jd = hijriToJulianDay(hijri.year, hijri.month, hijri.day);
|
|
2698
|
-
const { year, month, day } = julianDayToGregorian(jd);
|
|
2699
|
-
return new Date(year, month - 1, day);
|
|
2700
|
-
}
|
|
2701
|
-
function formatHijri(date) {
|
|
2702
|
-
const hijri = toHijri(date);
|
|
2703
|
-
const monthName = getHijriMonthName(hijri.month);
|
|
2704
|
-
return `${hijri.day} ${monthName} ${hijri.year}`;
|
|
2705
|
-
}
|
|
2706
|
-
function getHijriMonthName(month) {
|
|
2707
|
-
if (month < 1 || month > 12) {
|
|
2708
|
-
return "";
|
|
2709
|
-
}
|
|
2710
|
-
return HIJRI_MONTHS[month - 1] ?? "";
|
|
2711
|
-
}
|
|
2712
|
-
function isRamadan(date) {
|
|
2713
|
-
return toHijri(date).month === 9;
|
|
2714
|
-
}
|
|
2715
|
-
function gregorianToJulianDay(year, month, day) {
|
|
2716
|
-
let y = year;
|
|
2717
|
-
let m = month;
|
|
2718
|
-
if (m <= 2) {
|
|
2719
|
-
y -= 1;
|
|
2720
|
-
m += 12;
|
|
2721
|
-
}
|
|
2722
|
-
const A = Math.floor(y / 100);
|
|
2723
|
-
const B = 2 - A + Math.floor(A / 4);
|
|
2724
|
-
return Math.floor(365.25 * (y + 4716)) + Math.floor(30.6001 * (m + 1)) + day + B - 1524.5;
|
|
2725
|
-
}
|
|
2726
|
-
function julianDayToGregorian(jd) {
|
|
2727
|
-
const Z = Math.floor(jd + 0.5);
|
|
2728
|
-
const F = jd + 0.5 - Z;
|
|
2729
|
-
let A = Z;
|
|
2730
|
-
if (Z >= 2299161) {
|
|
2731
|
-
const alpha = Math.floor((Z - 186721625e-2) / 36524.25);
|
|
2732
|
-
A = Z + 1 + alpha - Math.floor(alpha / 4);
|
|
2733
|
-
}
|
|
2734
|
-
const B = A + 1524;
|
|
2735
|
-
const C = Math.floor((B - 122.1) / 365.25);
|
|
2736
|
-
const D = Math.floor(365.25 * C);
|
|
2737
|
-
const E = Math.floor((B - D) / 30.6001);
|
|
2738
|
-
const day = B - D - Math.floor(30.6001 * E) + F;
|
|
2739
|
-
const month = E < 14 ? E - 1 : E - 13;
|
|
2740
|
-
const year = month > 2 ? C - 4716 : C - 4715;
|
|
2741
|
-
return {
|
|
2742
|
-
year: Math.floor(year),
|
|
2743
|
-
month,
|
|
2744
|
-
day: Math.floor(day)
|
|
2745
|
-
};
|
|
2746
|
-
}
|
|
2747
|
-
function julianDayToHijri(jd) {
|
|
2748
|
-
const l = Math.floor(jd - 1948440 + 10632);
|
|
2749
|
-
const n = Math.floor((l - 1) / 10631);
|
|
2750
|
-
const l2 = l - 10631 * n + 354;
|
|
2751
|
-
const j = Math.floor((10985 - l2) / 5316) * Math.floor(50 * l2 / 17719) + Math.floor(l2 / 5670) * Math.floor(43 * l2 / 15238);
|
|
2752
|
-
const l3 = l2 - Math.floor((30 - j) / 15) * Math.floor(17719 * j / 50) - Math.floor(j / 16) * Math.floor(15238 * j / 43) + 29;
|
|
2753
|
-
const month = Math.floor(24 * l3 / 709);
|
|
2754
|
-
const day = l3 - Math.floor(709 * month / 24);
|
|
2755
|
-
const year = 30 * n + j - 30;
|
|
2756
|
-
return { year, month, day };
|
|
2757
|
-
}
|
|
2758
|
-
function hijriToJulianDay(year, month, day) {
|
|
2759
|
-
return Math.floor((11 * year + 3) / 30) + 354 * year + 30 * month - Math.floor((month - 1) / 2) + day + 1948440 - 385;
|
|
2760
|
-
}
|
|
2761
|
-
|
|
2762
|
-
export { analyzePhone, createWhatsAppLink, formatAddress, formatHijri, formatLakh, formatPKR, formatPhone, fromHijri, getBankFromIBAN, getCityByPostalCode, getDistrictProvince, getDistrictsByProvince, getHijriMonthName, getNetwork, getPostalAreas, getPostalCode, getPostalCodes, getProvince, isRamadan, normalizeRomanUrdu, normalizeText, parseAddress, searchCities, searchDistricts, searchPostalCodes, toEnglishDigits, toHijri, toUrduDigits, validateCNIC, validateIBAN, validatePhone };
|
|
2763
|
-
//# sourceMappingURL=index.js.map
|
|
2764
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export { amountInWords, numberToWords } from './chunk-QQQKISXT.js';
|
|
2
|
+
export { analyzeNumber, getAreaCode, getNumberType, validateLandline } from './chunk-T3E4B5MJ.js';
|
|
3
|
+
export { analyzePhone, formatPhone, validatePhone } from './chunk-432ZYMYV.js';
|
|
4
|
+
export { getNetwork } from './chunk-L45UXUWX.js';
|
|
5
|
+
export { createMerchantQr, createRaastP2PQr, parseRaastQr } from './chunk-H4DVWUYH.js';
|
|
6
|
+
export { analyzeNTN, validateNTN, validateSTRN } from './chunk-CEPNSHIC.js';
|
|
7
|
+
export { normalizeRomanUrdu, normalizeText, toEnglishDigits, toUrduDigits } from './chunk-JKE4AMSZ.js';
|
|
8
|
+
export { createWhatsAppLink } from './chunk-P4CGOJEM.js';
|
|
9
|
+
import './chunk-Y6BUGLXU.js';
|
|
10
|
+
export { formatAddress, parseAddress } from './chunk-L2BDDM2W.js';
|
|
11
|
+
export { getCityByPostalCode, getPostalAreas, getPostalCode, getPostalCodes, searchPostalCodes } from './chunk-LIYNKIKS.js';
|
|
12
|
+
export { getCNICInfo, validateCNIC } from './chunk-EEVNLTB4.js';
|
|
13
|
+
export { formatLakh, formatPKR } from './chunk-6TSKA2PH.js';
|
|
14
|
+
export { getDistrictProvince, getDistrictsByProvince, getProvince, searchCities, searchDistricts } from './chunk-K6CZFCX6.js';
|
|
15
|
+
export { getHolidaysOn, getPakistanHolidays, isPakistanHoliday } from './chunk-HBOZIITD.js';
|
|
16
|
+
export { formatHijri, fromHijri, getHijriMonthName, isRamadan, toHijri } from './chunk-Z5JEIQVW.js';
|
|
17
|
+
export { getBankFromIBAN, validateIBAN } from './chunk-CQKK3S7A.js';
|
|
18
|
+
import './chunk-ENQ7O7VW.js';
|