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.
Files changed (127) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +907 -666
  3. package/dist/address.cjs +17 -0
  4. package/dist/address.d.cts +36 -0
  5. package/dist/address.d.ts +36 -0
  6. package/dist/address.js +4 -0
  7. package/dist/chunk-3COX5FSL.cjs +1650 -0
  8. package/dist/chunk-422X6FEZ.cjs +220 -0
  9. package/dist/chunk-432ZYMYV.js +31 -0
  10. package/dist/chunk-4VVFS6FN.cjs +715 -0
  11. package/dist/chunk-6TSKA2PH.js +38 -0
  12. package/dist/chunk-APXP7OK7.cjs +226 -0
  13. package/dist/chunk-AUATLZA5.cjs +168 -0
  14. package/dist/chunk-BSS4Z7NI.cjs +422 -0
  15. package/dist/chunk-CEPNSHIC.js +33 -0
  16. package/dist/chunk-CQKK3S7A.js +217 -0
  17. package/dist/chunk-CYJJ7KGC.cjs +108 -0
  18. package/dist/chunk-EEVNLTB4.js +32 -0
  19. package/dist/chunk-ENQ7O7VW.js +32 -0
  20. package/dist/chunk-H4DVWUYH.js +231 -0
  21. package/dist/chunk-H6M6L26S.cjs +37 -0
  22. package/dist/chunk-HBOZIITD.js +351 -0
  23. package/dist/chunk-HTCSHHOR.cjs +35 -0
  24. package/dist/chunk-JKE4AMSZ.js +47 -0
  25. package/dist/chunk-K6CZFCX6.js +1642 -0
  26. package/dist/chunk-KEHCTYLO.cjs +52 -0
  27. package/dist/chunk-KQKW2ZEK.cjs +18 -0
  28. package/dist/chunk-L2BDDM2W.js +165 -0
  29. package/dist/chunk-L45UXUWX.js +21 -0
  30. package/dist/chunk-LIYNKIKS.js +709 -0
  31. package/dist/chunk-LVHTH4P7.cjs +41 -0
  32. package/dist/chunk-OVUR47QH.cjs +22 -0
  33. package/dist/chunk-P4CGOJEM.js +16 -0
  34. package/dist/chunk-PHHKIMO2.cjs +35 -0
  35. package/dist/chunk-QQQKISXT.js +223 -0
  36. package/dist/chunk-T3E4B5MJ.js +417 -0
  37. package/dist/chunk-VPBMIYO2.cjs +38 -0
  38. package/dist/chunk-WPKV5JT3.cjs +235 -0
  39. package/dist/chunk-XCXFGTHW.cjs +355 -0
  40. package/dist/chunk-XT4ZNXRC.js +20 -0
  41. package/dist/chunk-Y6BUGLXU.js +95 -0
  42. package/dist/chunk-YLWZGSFY.cjs +99 -0
  43. package/dist/chunk-YS7MOLK2.cjs +23 -0
  44. package/dist/chunk-Z5JEIQVW.js +102 -0
  45. package/dist/cli.js +78 -2654
  46. package/dist/cnic.cjs +15 -0
  47. package/dist/cnic.d.cts +35 -0
  48. package/dist/cnic.d.ts +35 -0
  49. package/dist/cnic.js +2 -0
  50. package/dist/format.cjs +14 -0
  51. package/dist/format.d.cts +27 -0
  52. package/dist/format.d.ts +27 -0
  53. package/dist/format.js +1 -0
  54. package/dist/geo.cjs +27 -0
  55. package/dist/geo.d.cts +43 -0
  56. package/dist/geo.d.ts +43 -0
  57. package/dist/geo.js +2 -0
  58. package/dist/hijri.cjs +26 -0
  59. package/dist/hijri.d.cts +62 -0
  60. package/dist/hijri.d.ts +62 -0
  61. package/dist/hijri.js +1 -0
  62. package/dist/holidays.cjs +19 -0
  63. package/dist/holidays.d.cts +72 -0
  64. package/dist/holidays.d.ts +72 -0
  65. package/dist/holidays.js +2 -0
  66. package/dist/iban.cjs +15 -0
  67. package/dist/iban.d.cts +21 -0
  68. package/dist/iban.d.ts +21 -0
  69. package/dist/iban.js +2 -0
  70. package/dist/index.cjs +211 -0
  71. package/dist/index.d.cts +16 -0
  72. package/dist/index.d.ts +16 -300
  73. package/dist/index.js +18 -2764
  74. package/dist/networks.cjs +12 -0
  75. package/dist/networks.d.cts +20 -0
  76. package/dist/networks.d.ts +20 -0
  77. package/dist/networks.js +3 -0
  78. package/dist/numbers.cjs +24 -0
  79. package/dist/numbers.d.cts +53 -0
  80. package/dist/numbers.d.ts +53 -0
  81. package/dist/numbers.js +3 -0
  82. package/dist/phone.cjs +29 -0
  83. package/dist/phone.d.cts +56 -0
  84. package/dist/phone.d.ts +56 -0
  85. package/dist/phone.js +4 -0
  86. package/dist/postal.cjs +27 -0
  87. package/dist/postal.d.cts +40 -0
  88. package/dist/postal.d.ts +40 -0
  89. package/dist/postal.js +2 -0
  90. package/dist/raast.cjs +20 -0
  91. package/dist/raast.d.cts +119 -0
  92. package/dist/raast.d.ts +119 -0
  93. package/dist/raast.js +3 -0
  94. package/dist/rules-GxgPiVws.d.cts +7 -0
  95. package/dist/rules-GxgPiVws.d.ts +7 -0
  96. package/dist/tax.cjs +20 -0
  97. package/dist/tax.d.cts +47 -0
  98. package/dist/tax.d.ts +47 -0
  99. package/dist/tax.js +3 -0
  100. package/dist/text.cjs +23 -0
  101. package/dist/text.d.cts +34 -0
  102. package/dist/text.d.ts +34 -0
  103. package/dist/text.js +2 -0
  104. package/dist/valibot.cjs +47 -0
  105. package/dist/valibot.d.cts +22 -0
  106. package/dist/valibot.d.ts +22 -0
  107. package/dist/valibot.js +25 -0
  108. package/dist/whatsapp.cjs +12 -0
  109. package/dist/whatsapp.d.cts +12 -0
  110. package/dist/whatsapp.d.ts +12 -0
  111. package/dist/whatsapp.js +3 -0
  112. package/dist/words.cjs +14 -0
  113. package/dist/words.d.cts +49 -0
  114. package/dist/words.d.ts +49 -0
  115. package/dist/words.js +1 -0
  116. package/dist/yup.cjs +32 -0
  117. package/dist/yup.d.cts +22 -0
  118. package/dist/yup.d.ts +22 -0
  119. package/dist/yup.js +30 -0
  120. package/dist/zod.cjs +27 -0
  121. package/dist/zod.d.cts +22 -0
  122. package/dist/zod.d.ts +22 -0
  123. package/dist/zod.js +25 -0
  124. package/package.json +309 -77
  125. package/dist/cli.d.ts +0 -1
  126. package/dist/cli.js.map +0 -1
  127. package/dist/index.js.map +0 -1
@@ -0,0 +1,715 @@
1
+ 'use strict';
2
+
3
+ var chunkVPBMIYO2_cjs = require('./chunk-VPBMIYO2.cjs');
4
+
5
+ // data/postal-codes.json
6
+ var postal_codes_default = [
7
+ {
8
+ city: "Islamabad",
9
+ postalCode: "44000",
10
+ area: "Islamabad GPO",
11
+ primary: true
12
+ },
13
+ {
14
+ city: "Rawalpindi",
15
+ postalCode: "46000",
16
+ area: "Rawalpindi GPO",
17
+ primary: true
18
+ },
19
+ {
20
+ city: "Rawalpindi",
21
+ postalCode: "46300",
22
+ area: "Satellite Town"
23
+ },
24
+ {
25
+ city: "Murree",
26
+ postalCode: "47150",
27
+ area: "Murree GPO",
28
+ primary: true
29
+ },
30
+ {
31
+ city: "Taxila",
32
+ postalCode: "47040",
33
+ area: "Taxila GPO",
34
+ primary: true
35
+ },
36
+ {
37
+ city: "Lahore",
38
+ postalCode: "54000",
39
+ area: "Lahore GPO",
40
+ primary: true
41
+ },
42
+ {
43
+ city: "Lahore",
44
+ postalCode: "54660",
45
+ area: "Gulberg"
46
+ },
47
+ {
48
+ city: "Lahore",
49
+ postalCode: "54700",
50
+ area: "Model Town"
51
+ },
52
+ {
53
+ city: "Lahore",
54
+ postalCode: "54810",
55
+ area: "Lahore Cantt"
56
+ },
57
+ {
58
+ city: "Lahore",
59
+ postalCode: "54570",
60
+ area: "Iqbal Town"
61
+ },
62
+ {
63
+ city: "Faisalabad",
64
+ postalCode: "38000",
65
+ area: "Faisalabad GPO",
66
+ primary: true
67
+ },
68
+ {
69
+ city: "Multan",
70
+ postalCode: "60000",
71
+ area: "Multan GPO",
72
+ primary: true
73
+ },
74
+ {
75
+ city: "Gujranwala",
76
+ postalCode: "52250",
77
+ area: "Gujranwala GPO",
78
+ primary: true
79
+ },
80
+ {
81
+ city: "Sialkot",
82
+ postalCode: "51310",
83
+ area: "Sialkot GPO",
84
+ primary: true
85
+ },
86
+ {
87
+ city: "Sargodha",
88
+ postalCode: "40100",
89
+ area: "Sargodha GPO",
90
+ primary: true
91
+ },
92
+ {
93
+ city: "Bahawalpur",
94
+ postalCode: "63100",
95
+ area: "Bahawalpur GPO",
96
+ primary: true
97
+ },
98
+ {
99
+ city: "Sheikhupura",
100
+ postalCode: "39350",
101
+ area: "Sheikhupura GPO",
102
+ primary: true
103
+ },
104
+ {
105
+ city: "Gujrat",
106
+ postalCode: "50700",
107
+ area: "Gujrat GPO",
108
+ primary: true
109
+ },
110
+ {
111
+ city: "Jhang",
112
+ postalCode: "35200",
113
+ area: "Jhang GPO",
114
+ primary: true
115
+ },
116
+ {
117
+ city: "Sahiwal",
118
+ postalCode: "57000",
119
+ area: "Sahiwal GPO",
120
+ primary: true
121
+ },
122
+ {
123
+ city: "Okara",
124
+ postalCode: "56300",
125
+ area: "Okara GPO",
126
+ primary: true
127
+ },
128
+ {
129
+ city: "Kasur",
130
+ postalCode: "55050",
131
+ area: "Kasur GPO",
132
+ primary: true
133
+ },
134
+ {
135
+ city: "Dera Ghazi Khan",
136
+ postalCode: "32200",
137
+ area: "DG Khan GPO",
138
+ primary: true
139
+ },
140
+ {
141
+ city: "Muzaffargarh",
142
+ postalCode: "34200",
143
+ area: "Muzaffargarh GPO",
144
+ primary: true
145
+ },
146
+ {
147
+ city: "Rahim Yar Khan",
148
+ postalCode: "64200",
149
+ area: "RY Khan GPO",
150
+ primary: true
151
+ },
152
+ {
153
+ city: "Bahawalnagar",
154
+ postalCode: "62300",
155
+ area: "Bahawalnagar GPO",
156
+ primary: true
157
+ },
158
+ {
159
+ city: "Khanewal",
160
+ postalCode: "58150",
161
+ area: "Khanewal GPO",
162
+ primary: true
163
+ },
164
+ {
165
+ city: "Vehari",
166
+ postalCode: "61100",
167
+ area: "Vehari GPO",
168
+ primary: true
169
+ },
170
+ {
171
+ city: "Pakpattan",
172
+ postalCode: "57400",
173
+ area: "Pakpattan GPO",
174
+ primary: true
175
+ },
176
+ {
177
+ city: "Chiniot",
178
+ postalCode: "35400",
179
+ area: "Chiniot GPO",
180
+ primary: true
181
+ },
182
+ {
183
+ city: "Hafizabad",
184
+ postalCode: "52110",
185
+ area: "Hafizabad GPO",
186
+ primary: true
187
+ },
188
+ {
189
+ city: "Mandi Bahauddin",
190
+ postalCode: "50400",
191
+ area: "Mandi Bahauddin GPO",
192
+ primary: true
193
+ },
194
+ {
195
+ city: "Jhelum",
196
+ postalCode: "49600",
197
+ area: "Jhelum GPO",
198
+ primary: true
199
+ },
200
+ {
201
+ city: "Attock",
202
+ postalCode: "43600",
203
+ area: "Attock GPO",
204
+ primary: true
205
+ },
206
+ {
207
+ city: "Chakwal",
208
+ postalCode: "48800",
209
+ area: "Chakwal GPO",
210
+ primary: true
211
+ },
212
+ {
213
+ city: "Mianwali",
214
+ postalCode: "42200",
215
+ area: "Mianwali GPO",
216
+ primary: true
217
+ },
218
+ {
219
+ city: "Bhakkar",
220
+ postalCode: "30000",
221
+ area: "Bhakkar GPO",
222
+ primary: true
223
+ },
224
+ {
225
+ city: "Khushab",
226
+ postalCode: "41000",
227
+ area: "Khushab GPO",
228
+ primary: true
229
+ },
230
+ {
231
+ city: "Narowal",
232
+ postalCode: "51600",
233
+ area: "Narowal GPO",
234
+ primary: true
235
+ },
236
+ {
237
+ city: "Nankana Sahib",
238
+ postalCode: "39100",
239
+ area: "Nankana Sahib GPO",
240
+ primary: true
241
+ },
242
+ {
243
+ city: "Toba Tek Singh",
244
+ postalCode: "36050",
245
+ area: "TTS GPO",
246
+ primary: true
247
+ },
248
+ {
249
+ city: "Lodhran",
250
+ postalCode: "59320",
251
+ area: "Lodhran GPO",
252
+ primary: true
253
+ },
254
+ {
255
+ city: "Layyah",
256
+ postalCode: "31200",
257
+ area: "Layyah GPO",
258
+ primary: true
259
+ },
260
+ {
261
+ city: "Rajanpur",
262
+ postalCode: "33500",
263
+ area: "Rajanpur GPO",
264
+ primary: true
265
+ },
266
+ {
267
+ city: "Wazirabad",
268
+ postalCode: "52000",
269
+ area: "Wazirabad GPO",
270
+ primary: true
271
+ },
272
+ {
273
+ city: "Talagang",
274
+ postalCode: "48100",
275
+ area: "Talagang GPO",
276
+ primary: true
277
+ },
278
+ {
279
+ city: "Kot Addu",
280
+ postalCode: "34050",
281
+ area: "Kot Addu GPO",
282
+ primary: true
283
+ },
284
+ {
285
+ city: "Karachi",
286
+ postalCode: "74200",
287
+ area: "Karachi GPO",
288
+ primary: true
289
+ },
290
+ {
291
+ city: "Karachi",
292
+ postalCode: "74000",
293
+ area: "Karachi City GPO"
294
+ },
295
+ {
296
+ city: "Karachi",
297
+ postalCode: "74400",
298
+ area: "Karachi Saddar GPO"
299
+ },
300
+ {
301
+ city: "Karachi",
302
+ postalCode: "74800",
303
+ area: "New Town GPO"
304
+ },
305
+ {
306
+ city: "Karachi",
307
+ postalCode: "74700",
308
+ area: "Al-Hydri GPO"
309
+ },
310
+ {
311
+ city: "Karachi",
312
+ postalCode: "75500",
313
+ area: "Defence"
314
+ },
315
+ {
316
+ city: "Karachi",
317
+ postalCode: "75600",
318
+ area: "Clifton"
319
+ },
320
+ {
321
+ city: "Karachi",
322
+ postalCode: "75300",
323
+ area: "Gulshan-e-Iqbal"
324
+ },
325
+ {
326
+ city: "Karachi",
327
+ postalCode: "74600",
328
+ area: "Nazimabad"
329
+ },
330
+ {
331
+ city: "Karachi",
332
+ postalCode: "74900",
333
+ area: "Korangi"
334
+ },
335
+ {
336
+ city: "Karachi",
337
+ postalCode: "75950",
338
+ area: "Federal B Area"
339
+ },
340
+ {
341
+ city: "Hyderabad",
342
+ postalCode: "71000",
343
+ area: "Hyderabad GPO",
344
+ primary: true
345
+ },
346
+ {
347
+ city: "Sukkur",
348
+ postalCode: "65200",
349
+ area: "Sukkur GPO",
350
+ primary: true
351
+ },
352
+ {
353
+ city: "Larkana",
354
+ postalCode: "77150",
355
+ area: "Larkana GPO",
356
+ primary: true
357
+ },
358
+ {
359
+ city: "Nawabshah",
360
+ postalCode: "67450",
361
+ area: "Nawabshah GPO",
362
+ primary: true
363
+ },
364
+ {
365
+ city: "Mirpur Khas",
366
+ postalCode: "69000",
367
+ area: "Mirpur Khas GPO",
368
+ primary: true
369
+ },
370
+ {
371
+ city: "Jacobabad",
372
+ postalCode: "79000",
373
+ area: "Jacobabad GPO",
374
+ primary: true
375
+ },
376
+ {
377
+ city: "Shikarpur",
378
+ postalCode: "78100",
379
+ area: "Shikarpur GPO",
380
+ primary: true
381
+ },
382
+ {
383
+ city: "Dadu",
384
+ postalCode: "76200",
385
+ area: "Dadu GPO",
386
+ primary: true
387
+ },
388
+ {
389
+ city: "Badin",
390
+ postalCode: "72220",
391
+ area: "Badin GPO",
392
+ primary: true
393
+ },
394
+ {
395
+ city: "Thatta",
396
+ postalCode: "73020",
397
+ area: "Thatta GPO",
398
+ primary: true
399
+ },
400
+ {
401
+ city: "Sanghar",
402
+ postalCode: "68100",
403
+ area: "Sanghar GPO",
404
+ primary: true
405
+ },
406
+ {
407
+ city: "Umerkot",
408
+ postalCode: "69100",
409
+ area: "Umerkot GPO",
410
+ primary: true
411
+ },
412
+ {
413
+ city: "Tharparkar",
414
+ postalCode: "69230",
415
+ area: "Mithi GPO",
416
+ primary: true
417
+ },
418
+ {
419
+ city: "Jamshoro",
420
+ postalCode: "76080",
421
+ area: "Jamshoro GPO",
422
+ primary: true
423
+ },
424
+ {
425
+ city: "Matiari",
426
+ postalCode: "70100",
427
+ area: "Matiari GPO",
428
+ primary: true
429
+ },
430
+ {
431
+ city: "Khairpur",
432
+ postalCode: "66020",
433
+ area: "Khairpur GPO",
434
+ primary: true
435
+ },
436
+ {
437
+ city: "Ghotki",
438
+ postalCode: "65110",
439
+ area: "Ghotki GPO",
440
+ primary: true
441
+ },
442
+ {
443
+ city: "Kashmore",
444
+ postalCode: "79200",
445
+ area: "Kashmore GPO",
446
+ primary: true
447
+ },
448
+ {
449
+ city: "Sujawal",
450
+ postalCode: "73220",
451
+ area: "Sujawal GPO",
452
+ primary: true
453
+ },
454
+ {
455
+ city: "Peshawar",
456
+ postalCode: "25000",
457
+ area: "Peshawar GPO",
458
+ primary: true
459
+ },
460
+ {
461
+ city: "Mardan",
462
+ postalCode: "23200",
463
+ area: "Mardan GPO",
464
+ primary: true
465
+ },
466
+ {
467
+ city: "Abbottabad",
468
+ postalCode: "22010",
469
+ area: "Abbottabad GPO",
470
+ primary: true
471
+ },
472
+ {
473
+ city: "Kohat",
474
+ postalCode: "26000",
475
+ area: "Kohat GPO",
476
+ primary: true
477
+ },
478
+ {
479
+ city: "Bannu",
480
+ postalCode: "28100",
481
+ area: "Bannu GPO",
482
+ primary: true
483
+ },
484
+ {
485
+ city: "Swat",
486
+ postalCode: "19200",
487
+ area: "Mingora GPO",
488
+ primary: true
489
+ },
490
+ {
491
+ city: "Mansehra",
492
+ postalCode: "21300",
493
+ area: "Mansehra GPO",
494
+ primary: true
495
+ },
496
+ {
497
+ city: "Dera Ismail Khan",
498
+ postalCode: "29120",
499
+ area: "DI Khan GPO",
500
+ primary: true
501
+ },
502
+ {
503
+ city: "Nowshera",
504
+ postalCode: "24100",
505
+ area: "Nowshera GPO",
506
+ primary: true
507
+ },
508
+ {
509
+ city: "Swabi",
510
+ postalCode: "23430",
511
+ area: "Swabi GPO",
512
+ primary: true
513
+ },
514
+ {
515
+ city: "Charsadda",
516
+ postalCode: "24420",
517
+ area: "Charsadda GPO",
518
+ primary: true
519
+ },
520
+ {
521
+ city: "Haripur",
522
+ postalCode: "22620",
523
+ area: "Haripur GPO",
524
+ primary: true
525
+ },
526
+ {
527
+ city: "Hangu",
528
+ postalCode: "26190",
529
+ area: "Hangu GPO",
530
+ primary: true
531
+ },
532
+ {
533
+ city: "Karak",
534
+ postalCode: "27200",
535
+ area: "Karak GPO",
536
+ primary: true
537
+ },
538
+ {
539
+ city: "Tank",
540
+ postalCode: "29430",
541
+ area: "Tank GPO",
542
+ primary: true
543
+ },
544
+ {
545
+ city: "Lakki Marwat",
546
+ postalCode: "28420",
547
+ area: "Lakki Marwat GPO",
548
+ primary: true
549
+ },
550
+ {
551
+ city: "Quetta",
552
+ postalCode: "87300",
553
+ area: "Quetta GPO",
554
+ primary: true
555
+ },
556
+ {
557
+ city: "Gwadar",
558
+ postalCode: "91200",
559
+ area: "Gwadar GPO",
560
+ primary: true
561
+ },
562
+ {
563
+ city: "Turbat",
564
+ postalCode: "92600",
565
+ area: "Turbat GPO",
566
+ primary: true
567
+ },
568
+ {
569
+ city: "Khuzdar",
570
+ postalCode: "89100",
571
+ area: "Khuzdar GPO",
572
+ primary: true
573
+ },
574
+ {
575
+ city: "Sibi",
576
+ postalCode: "82000",
577
+ area: "Sibi GPO",
578
+ primary: true
579
+ },
580
+ {
581
+ city: "Loralai",
582
+ postalCode: "84800",
583
+ area: "Loralai GPO",
584
+ primary: true
585
+ },
586
+ {
587
+ city: "Zhob",
588
+ postalCode: "85200",
589
+ area: "Zhob GPO",
590
+ primary: true
591
+ },
592
+ {
593
+ city: "Chaman",
594
+ postalCode: "86000",
595
+ area: "Chaman GPO",
596
+ primary: true
597
+ },
598
+ {
599
+ city: "Hub",
600
+ postalCode: "90250",
601
+ area: "Hub GPO",
602
+ primary: true
603
+ },
604
+ {
605
+ city: "Muzaffarabad",
606
+ postalCode: "13100",
607
+ area: "Muzaffarabad GPO",
608
+ primary: true
609
+ },
610
+ {
611
+ city: "Mirpur",
612
+ postalCode: "10250",
613
+ area: "Mirpur GPO",
614
+ primary: true
615
+ },
616
+ {
617
+ city: "Kotli",
618
+ postalCode: "11100",
619
+ area: "Kotli GPO",
620
+ primary: true
621
+ },
622
+ {
623
+ city: "Rawalakot",
624
+ postalCode: "12350",
625
+ area: "Rawalakot GPO",
626
+ primary: true
627
+ },
628
+ {
629
+ city: "Bagh",
630
+ postalCode: "12500",
631
+ area: "Bagh GPO",
632
+ primary: true
633
+ },
634
+ {
635
+ city: "Gilgit",
636
+ postalCode: "15700",
637
+ area: "Gilgit GPO",
638
+ primary: true
639
+ },
640
+ {
641
+ city: "Skardu",
642
+ postalCode: "16100",
643
+ area: "Skardu GPO",
644
+ primary: true
645
+ }
646
+ ];
647
+
648
+ // src/postal.ts
649
+ var POSTAL_ENTRIES = postal_codes_default;
650
+ var postalByCode = chunkVPBMIYO2_cjs.lazy(
651
+ () => new Map(
652
+ POSTAL_ENTRIES.map((entry) => [entry.postalCode, entry.city])
653
+ )
654
+ );
655
+ var postalByCity = chunkVPBMIYO2_cjs.lazy(() => {
656
+ const map = /* @__PURE__ */ new Map();
657
+ for (const entry of POSTAL_ENTRIES) {
658
+ const key = chunkVPBMIYO2_cjs.normalizeKey(entry.city);
659
+ if (!map.has(key) || entry.primary === true) {
660
+ map.set(key, entry.postalCode);
661
+ }
662
+ }
663
+ return map;
664
+ });
665
+ function getCityByPostalCode(postalCode) {
666
+ const code = stripPostalCode(postalCode);
667
+ if (code.length === 0) {
668
+ return null;
669
+ }
670
+ return postalByCode().get(code) ?? null;
671
+ }
672
+ function getPostalCode(city) {
673
+ const key = chunkVPBMIYO2_cjs.normalizeKey(city);
674
+ if (key.length === 0) {
675
+ return null;
676
+ }
677
+ return postalByCity().get(key) ?? null;
678
+ }
679
+ function getPostalCodes(city) {
680
+ const key = chunkVPBMIYO2_cjs.normalizeKey(city);
681
+ if (key.length === 0) {
682
+ return [];
683
+ }
684
+ return POSTAL_ENTRIES.filter((entry) => chunkVPBMIYO2_cjs.normalizeKey(entry.city) === key).map((entry) => entry.postalCode).sort((a, b) => a.localeCompare(b));
685
+ }
686
+ function searchPostalCodes(query) {
687
+ const normalizedQuery = chunkVPBMIYO2_cjs.normalizeKey(query);
688
+ if (normalizedQuery.length === 0) {
689
+ return [];
690
+ }
691
+ const matches = POSTAL_ENTRIES.filter((entry) => {
692
+ const cityKey = chunkVPBMIYO2_cjs.normalizeKey(entry.city);
693
+ const areaKey = entry.area ? chunkVPBMIYO2_cjs.normalizeKey(entry.area) : "";
694
+ return cityKey.includes(normalizedQuery) || areaKey.includes(normalizedQuery) || entry.postalCode.startsWith(query.trim());
695
+ }).map((entry) => entry.postalCode);
696
+ return [...new Set(matches)].sort((a, b) => a.localeCompare(b));
697
+ }
698
+ function getPostalAreas(city) {
699
+ const key = chunkVPBMIYO2_cjs.normalizeKey(city);
700
+ if (key.length === 0) {
701
+ return [];
702
+ }
703
+ return POSTAL_ENTRIES.filter(
704
+ (entry) => chunkVPBMIYO2_cjs.normalizeKey(entry.city) === key && entry.area
705
+ ).map((entry) => entry.area).sort((a, b) => a.localeCompare(b));
706
+ }
707
+ function stripPostalCode(postalCode) {
708
+ return postalCode.trim().replace(/\s+/g, "");
709
+ }
710
+
711
+ exports.getCityByPostalCode = getCityByPostalCode;
712
+ exports.getPostalAreas = getPostalAreas;
713
+ exports.getPostalCode = getPostalCode;
714
+ exports.getPostalCodes = getPostalCodes;
715
+ exports.searchPostalCodes = searchPostalCodes;