soff-phone 0.0.6 → 0.0.8

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 (113) hide show
  1. package/dist/{ar-JxzqPct0.d.cts → ar-GEGiRgO-.d.cts} +1 -1
  2. package/dist/{ar-BRemFHRv.d.ts → ar-tFIt4w8t.d.ts} +1 -1
  3. package/dist/{br-COFIo49r.d.cts → br-BT6qg54j.d.cts} +1 -1
  4. package/dist/{br-Ct41H5gk.d.ts → br-DDdWmYiI.d.ts} +1 -1
  5. package/dist/{ca-C0PYBvZK.d.cts → ca-DCSAnAM6.d.cts} +1 -1
  6. package/dist/{ca-CNnuf6qY.d.ts → ca-_dlgNQpK.d.ts} +1 -1
  7. package/dist/{cl-W_f2Hza8.d.ts → cl-BnJa59XK.d.ts} +1 -1
  8. package/dist/{cl-BSQlXUww.d.cts → cl-FomUh7u7.d.cts} +1 -1
  9. package/dist/{co-XlKvHbFg.d.ts → co-D3zWUbcg.d.ts} +1 -1
  10. package/dist/{co-Cmyehxbk.d.cts → co-HLHZhdf-.d.cts} +1 -1
  11. package/dist/{cr-UzSwttKD.d.ts → cr-CkAZd-e7.d.ts} +1 -1
  12. package/dist/{cr-C3m9H-RU.d.cts → cr-TYetkCTg.d.cts} +1 -1
  13. package/dist/{de-bIFBVR-K.d.ts → de-D-lK2VKQ.d.ts} +1 -1
  14. package/dist/{de-ZAyw44MG.d.cts → de-l5sbcQdU.d.cts} +1 -1
  15. package/dist/{ec-CCV5mLhv.d.ts → ec-CLItBhMX.d.ts} +1 -1
  16. package/dist/{ec-D7HUkRKn.d.cts → ec-G_GvdmHT.d.cts} +1 -1
  17. package/dist/{es-DVVnhfSE.d.ts → es-C0cTzz5Q.d.ts} +1 -1
  18. package/dist/{es-C7dIuFpf.d.cts → es-DBWm_0BJ.d.cts} +1 -1
  19. package/dist/{fr-C8OxubJ3.d.ts → fr-BE6W1TEy.d.ts} +1 -1
  20. package/dist/{fr-BSghMzs5.d.cts → fr-BFsuh3v2.d.cts} +1 -1
  21. package/dist/{gb-DDivDdMy.d.ts → gb-Cvog8XpH.d.ts} +1 -1
  22. package/dist/{gb-B5NBNoma.d.cts → gb-Dsiq1sFD.d.cts} +1 -1
  23. package/dist/{gt-DiiNa6Vm.d.ts → gt-BJOTX_KH.d.ts} +1 -1
  24. package/dist/{gt-uZfIOMWw.d.cts → gt-CHOp9jw8.d.cts} +1 -1
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.cts +19 -19
  28. package/dist/index.d.ts +19 -19
  29. package/dist/index.js +1 -1
  30. package/dist/index.js.map +1 -1
  31. package/dist/{it-BtfZnlF6.d.cts → it-Cvn0ckKc.d.cts} +1 -1
  32. package/dist/{it-DollYcFl.d.ts → it-DRkyyTTW.d.ts} +1 -1
  33. package/dist/locales/ar.d.cts +2 -2
  34. package/dist/locales/ar.d.ts +2 -2
  35. package/dist/locales/br.cjs +1 -1
  36. package/dist/locales/br.cjs.map +1 -1
  37. package/dist/locales/br.d.cts +2 -2
  38. package/dist/locales/br.d.ts +2 -2
  39. package/dist/locales/br.js +1 -1
  40. package/dist/locales/br.js.map +1 -1
  41. package/dist/locales/ca.d.cts +2 -2
  42. package/dist/locales/ca.d.ts +2 -2
  43. package/dist/locales/cl.cjs +1 -1
  44. package/dist/locales/cl.cjs.map +1 -1
  45. package/dist/locales/cl.d.cts +2 -2
  46. package/dist/locales/cl.d.ts +2 -2
  47. package/dist/locales/cl.js +1 -1
  48. package/dist/locales/cl.js.map +1 -1
  49. package/dist/locales/co.cjs +1 -1
  50. package/dist/locales/co.cjs.map +1 -1
  51. package/dist/locales/co.d.cts +2 -2
  52. package/dist/locales/co.d.ts +2 -2
  53. package/dist/locales/co.js +1 -1
  54. package/dist/locales/co.js.map +1 -1
  55. package/dist/locales/cr.d.cts +2 -2
  56. package/dist/locales/cr.d.ts +2 -2
  57. package/dist/locales/de.cjs +1 -1
  58. package/dist/locales/de.cjs.map +1 -1
  59. package/dist/locales/de.d.cts +2 -2
  60. package/dist/locales/de.d.ts +2 -2
  61. package/dist/locales/de.js +1 -1
  62. package/dist/locales/de.js.map +1 -1
  63. package/dist/locales/ec.cjs +1 -1
  64. package/dist/locales/ec.cjs.map +1 -1
  65. package/dist/locales/ec.d.cts +2 -2
  66. package/dist/locales/ec.d.ts +2 -2
  67. package/dist/locales/ec.js +1 -1
  68. package/dist/locales/ec.js.map +1 -1
  69. package/dist/locales/es.cjs +1 -1
  70. package/dist/locales/es.cjs.map +1 -1
  71. package/dist/locales/es.d.cts +2 -2
  72. package/dist/locales/es.d.ts +2 -2
  73. package/dist/locales/es.js +1 -1
  74. package/dist/locales/es.js.map +1 -1
  75. package/dist/locales/fr.d.cts +2 -2
  76. package/dist/locales/fr.d.ts +2 -2
  77. package/dist/locales/gb.d.cts +2 -2
  78. package/dist/locales/gb.d.ts +2 -2
  79. package/dist/locales/gt.d.cts +2 -2
  80. package/dist/locales/gt.d.ts +2 -2
  81. package/dist/locales/it.cjs +1 -1
  82. package/dist/locales/it.cjs.map +1 -1
  83. package/dist/locales/it.d.cts +2 -2
  84. package/dist/locales/it.d.ts +2 -2
  85. package/dist/locales/it.js +1 -1
  86. package/dist/locales/it.js.map +1 -1
  87. package/dist/locales/mx.d.cts +2 -2
  88. package/dist/locales/mx.d.ts +2 -2
  89. package/dist/locales/pa.d.cts +2 -2
  90. package/dist/locales/pa.d.ts +2 -2
  91. package/dist/locales/pe.cjs +1 -1
  92. package/dist/locales/pe.cjs.map +1 -1
  93. package/dist/locales/pe.d.cts +2 -2
  94. package/dist/locales/pe.d.ts +2 -2
  95. package/dist/locales/pe.js +1 -1
  96. package/dist/locales/pe.js.map +1 -1
  97. package/dist/locales/us.d.cts +2 -2
  98. package/dist/locales/us.d.ts +2 -2
  99. package/dist/locales/ve.d.cts +2 -2
  100. package/dist/locales/ve.d.ts +2 -2
  101. package/dist/{mx-BaMV1Q-C.d.cts → mx-CmkrNDw0.d.cts} +1 -1
  102. package/dist/{mx-gjjuvO94.d.ts → mx-DkRS3Aa-.d.ts} +1 -1
  103. package/dist/{pa-CEAa_MLu.d.cts → pa-BPfQzrBx.d.cts} +1 -1
  104. package/dist/{pa-CeerPsSh.d.ts → pa-Dyi3iuWW.d.ts} +1 -1
  105. package/dist/{pe-CHVFUsc1.d.cts → pe-B_5pgsR0.d.cts} +1 -1
  106. package/dist/{pe-ZpTRwvEa.d.ts → pe-NCsXTXmc.d.ts} +1 -1
  107. package/dist/{types-ClMaPMkH.d.cts → types-BCr040RT.d.cts} +1 -1
  108. package/dist/{types-ClMaPMkH.d.ts → types-BCr040RT.d.ts} +1 -1
  109. package/dist/{us-BV-jF4X9.d.cts → us-BaYu0g3a.d.cts} +1 -1
  110. package/dist/{us-DcxF3Jrz.d.ts → us-KOpobREo.d.ts} +1 -1
  111. package/dist/{ve-Czf_bYd9.d.ts → ve-BFLV2qGp.d.ts} +1 -1
  112. package/dist/{ve-DMPrCtKR.d.cts → ve-BomxppQL.d.cts} +1 -1
  113. package/package.json +10 -10
@@ -1,2 +1,2 @@
1
- function s(e){return e.replace(/\D/g,"")}function a(e,n){return `+${e}${n}`}var i="49";function m(e,n){let r=s(e),t=r;if(r.startsWith(i)&&(t=r.slice(i.length)),t.startsWith("0")&&(t=t.slice(1)),t.length<9||t.length>11)return {isValid:false,error:"Phone number must be 9-11 digits"};let o="unknown";/^1[567]/.test(t)?o="mobile":o="landline";let l=t;return n?.format==="e164"?l=a(i,t):n?.format==="international"&&(l=`+${i} ${t}`),{isValid:true,type:o,formatted:l}}export{m as validate};//# sourceMappingURL=de.js.map
1
+ function s(e){return e.replace(/\D/g,"")}function a(e,n){return `+${e}${n}`}var i="49";function h(e,n){let r=s(e),t=r;if(r.startsWith(i)&&(t=r.slice(i.length)),t.startsWith("0")&&(t=t.slice(1)),t.length<9||t.length>11)return {isValid:false,error:"Phone number must be 9-11 digits"};let l=/^1[567]/.test(t)?"mobile":"landline",o=t;return n?.format==="e164"?o=a(i,t):n?.format==="international"&&(o=`+${i} ${t}`),{isValid:true,type:l,formatted:o}}export{h as validate};//# sourceMappingURL=de.js.map
2
2
  //# sourceMappingURL=de.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/de.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,EAASJ,CAAAA,CAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAWf,GAVIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,CAAA,GACjCI,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,GAK1CI,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,GACzBA,CAAAA,CAAWA,CAAAA,CAAS,MAAM,CAAC,CAAA,CAAA,CAGzBA,CAAAA,CAAS,MAAA,CAAS,CAAA,EAAKA,CAAAA,CAAS,OAAS,EAAA,CAC3C,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,kCAAmC,CAAA,CAGrE,IAAIC,CAAAA,CAA0C,SAAA,CAG1C,SAAA,CAAU,IAAA,CAAKD,CAAQ,CAAA,CACzBC,CAAAA,CAAO,QAAA,CAIPA,CAAAA,CAAO,UAAA,CAGT,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"de.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '49';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE)) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // German numbers: variable length (10-11 digits including area code)\n // Often start with 0 for domestic dialing\n if (national.startsWith('0')) {\n national = national.slice(1);\n }\n\n if (national.length < 9 || national.length > 11) {\n return { isValid: false, error: 'Phone number must be 9-11 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 15, 16, 17\n if (/^1[567]/.test(national)) {\n type = 'mobile';\n }\n // Landline: various area codes\n else {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/de.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,EAAuB,CAChD,OAAOA,EAAM,OAAA,CAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,EAAWC,CAAAA,CAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,GAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,CAAAA,CAAeK,EAA+C,CACrF,IAAMC,EAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAWf,GAVIA,EAAQ,UAAA,CAAWH,CAAY,CAAA,GACjCI,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,EAAa,MAAM,CAAA,CAAA,CAK1CI,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,GACzBA,EAAWA,CAAAA,CAAS,KAAA,CAAM,CAAC,CAAA,CAAA,CAGzBA,CAAAA,CAAS,OAAS,CAAA,EAAKA,CAAAA,CAAS,MAAA,CAAS,EAAA,CAC3C,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,kCAAmC,CAAA,CAGrE,IAAMC,CAAAA,CAAO,UAAU,IAAA,CAAKD,CAAQ,CAAA,CAAI,QAAA,CAAW,UAAA,CAE/CE,CAAAA,CAAYF,EAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,CAAAA,CAAWE,EAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,CAAAA,CAAY,IAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,KAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"de.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '49';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE)) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // German numbers: variable length (10-11 digits including area code)\n // Often start with 0 for domestic dialing\n if (national.startsWith('0')) {\n national = national.slice(1);\n }\n\n if (national.length < 9 || national.length > 11) {\n return { isValid: false, error: 'Phone number must be 9-11 digits' };\n }\n\n const type = /^1[567]/.test(national) ? 'mobile' : 'landline';\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -1,2 +1,2 @@
1
- 'use strict';function a(t){return t.replace(/\D/g,"")}function s(t,n){return `+${t}${n}`}var i="593";function d(t,n){let r=a(t),e=r;if(r.startsWith(i)&&r.length>9&&(e=r.slice(i.length)),e.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let o="unknown";if(e.startsWith("9"))o="mobile";else if(/^[2-7]/.test(e))o="landline";else return {isValid:false,error:"Invalid prefix for Ecuador"};let l=e;return n?.format==="e164"?l=s(i,e):n?.format==="international"&&(l=`+${i} ${e}`),{isValid:true,type:o,formatted:l}}exports.validate=d;//# sourceMappingURL=ec.cjs.map
1
+ 'use strict';function s(e){return e.replace(/\D/g,"")}function l(e,n){return `+${e}${n}`}var i="593";function d(e,n){let r=s(e),t=r;if(r.startsWith(i)&&r.length>9&&(t=r.slice(i.length)),t.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let a=t.startsWith("9")?"mobile":/^[2-7]/.test(t)?"landline":void 0;if(!a)return {isValid:false,error:"Invalid prefix for Ecuador"};let o=t;return n?.format==="e164"?o=l(i,t):n?.format==="international"&&(o=`+${i} ${t}`),{isValid:true,type:a,formatted:o}}exports.validate=d;//# sourceMappingURL=ec.cjs.map
2
2
  //# sourceMappingURL=ec.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/ec.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,KAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,CAAA,CACtB,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,+BAAgC,CAAA,CAGlE,IAAIC,CAAAA,CAA0C,UAG9C,GAAID,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,iBAGA,QAAA,CAAS,IAAA,CAAKD,CAAQ,CAAA,CAC7BC,CAAAA,CAAO,UAAA,CAAA,KAEP,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,4BAA6B,CAAA,CAG/D,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"ec.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '593';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Ecuadorian numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 9\n if (national.startsWith('9')) {\n type = 'mobile';\n }\n // Landline: Starts with 2-7 (area codes)\n else if (/^[2-7]/.test(national)) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid prefix for Ecuador' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/ec.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,KAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,CAAA,CACtB,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,+BAAgC,CAAA,CAGlE,IAAMC,CAAAA,CAAOD,EAAS,UAAA,CAAW,GAAG,CAAA,CAChC,QAAA,CACA,QAAA,CAAS,IAAA,CAAKA,CAAQ,CAAA,CACpB,UAAA,CACA,MAAA,CAEN,GAAI,CAACC,CAAAA,CACH,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,4BAA6B,CAAA,CAG/D,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"ec.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '593';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Ecuadorian numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n const type = national.startsWith('9')\n ? 'mobile'\n : /^[2-7]/.test(national)\n ? 'landline'\n : undefined;\n\n if (!type) {\n return { isValid: false, error: 'Invalid prefix for Ecuador' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.cjs';
2
- export { v as validate } from '../ec-D7HUkRKn.cjs';
1
+ import '../types-BCr040RT.cjs';
2
+ export { v as validate } from '../ec-G_GvdmHT.cjs';
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.js';
2
- export { v as validate } from '../ec-CCV5mLhv.js';
1
+ import '../types-BCr040RT.js';
2
+ export { v as validate } from '../ec-CLItBhMX.js';
@@ -1,2 +1,2 @@
1
- function a(t){return t.replace(/\D/g,"")}function s(t,n){return `+${t}${n}`}var i="593";function d(t,n){let r=a(t),e=r;if(r.startsWith(i)&&r.length>9&&(e=r.slice(i.length)),e.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let o="unknown";if(e.startsWith("9"))o="mobile";else if(/^[2-7]/.test(e))o="landline";else return {isValid:false,error:"Invalid prefix for Ecuador"};let l=e;return n?.format==="e164"?l=s(i,e):n?.format==="international"&&(l=`+${i} ${e}`),{isValid:true,type:o,formatted:l}}export{d as validate};//# sourceMappingURL=ec.js.map
1
+ function s(e){return e.replace(/\D/g,"")}function l(e,n){return `+${e}${n}`}var i="593";function d(e,n){let r=s(e),t=r;if(r.startsWith(i)&&r.length>9&&(t=r.slice(i.length)),t.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let a=t.startsWith("9")?"mobile":/^[2-7]/.test(t)?"landline":void 0;if(!a)return {isValid:false,error:"Invalid prefix for Ecuador"};let o=t;return n?.format==="e164"?o=l(i,t):n?.format==="international"&&(o=`+${i} ${t}`),{isValid:true,type:a,formatted:o}}export{d as validate};//# sourceMappingURL=ec.js.map
2
2
  //# sourceMappingURL=ec.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/ec.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,KAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,CAAA,CACtB,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,+BAAgC,CAAA,CAGlE,IAAIC,CAAAA,CAA0C,UAG9C,GAAID,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,iBAGA,QAAA,CAAS,IAAA,CAAKD,CAAQ,CAAA,CAC7BC,CAAAA,CAAO,UAAA,CAAA,KAEP,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,4BAA6B,CAAA,CAG/D,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"ec.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '593';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Ecuadorian numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 9\n if (national.startsWith('9')) {\n type = 'mobile';\n }\n // Landline: Starts with 2-7 (area codes)\n else if (/^[2-7]/.test(national)) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid prefix for Ecuador' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/ec.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,KAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,CAAA,CACtB,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,+BAAgC,CAAA,CAGlE,IAAMC,CAAAA,CAAOD,EAAS,UAAA,CAAW,GAAG,CAAA,CAChC,QAAA,CACA,QAAA,CAAS,IAAA,CAAKA,CAAQ,CAAA,CACpB,UAAA,CACA,MAAA,CAEN,GAAI,CAACC,CAAAA,CACH,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,4BAA6B,CAAA,CAG/D,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"ec.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '593';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Ecuadorian numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n const type = national.startsWith('9')\n ? 'mobile'\n : /^[2-7]/.test(national)\n ? 'landline'\n : undefined;\n\n if (!type) {\n return { isValid: false, error: 'Invalid prefix for Ecuador' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -1,2 +1,2 @@
1
- 'use strict';function a(t){return t.replace(/\D/g,"")}function s(t,n){return `+${t}${n}`}var r="34";function m(t,n){let i=a(t),e=i;if(i.startsWith(r)&&i.length>9&&(e=i.slice(r.length)),e.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let o="unknown";if(/^[67]/.test(e))o="mobile";else if(/^[89]/.test(e))o="landline";else return {isValid:false,error:"Invalid prefix for Spain"};let l=e;return n?.format==="e164"?l=s(r,e):n?.format==="international"&&(l=`+${r} ${e}`),{isValid:true,type:o,formatted:l}}exports.validate=m;//# sourceMappingURL=es.cjs.map
1
+ 'use strict';function l(e){return e.replace(/\D/g,"")}function s(e,n){return `+${e}${n}`}var i="34";function d(e,n){let r=l(e),t=r;if(r.startsWith(i)&&r.length>9&&(t=r.slice(i.length)),t.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let a=/^[67]/.test(t)?"mobile":/^[89]/.test(t)?"landline":void 0;if(!a)return {isValid:false,error:"Invalid prefix for Spain"};let o=t;return n?.format==="e164"?o=s(i,t):n?.format==="international"&&(o=`+${i} ${t}`),{isValid:true,type:a,formatted:o}}exports.validate=d;//# sourceMappingURL=es.cjs.map
2
2
  //# sourceMappingURL=es.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/es.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,CAAA,CACtB,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,+BAAgC,CAAA,CAGlE,IAAIC,CAAAA,CAA0C,UAG9C,GAAI,OAAA,CAAQ,IAAA,CAAKD,CAAQ,CAAA,CACvBC,CAAAA,CAAO,iBAGA,OAAA,CAAQ,IAAA,CAAKD,CAAQ,CAAA,CAC5BC,CAAAA,CAAO,UAAA,CAAA,KAEP,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,0BAA2B,CAAA,CAG7D,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"es.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '34';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Spanish numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 6 or 7\n if (/^[67]/.test(national)) {\n type = 'mobile';\n }\n // Landline: Starts with 8 or 9\n else if (/^[89]/.test(national)) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid prefix for Spain' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/es.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,CAAA,CACtB,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,+BAAgC,CAAA,CAGlE,IAAMC,CAAAA,CAAO,QAAQ,IAAA,CAAKD,CAAQ,CAAA,CAAI,QAAA,CAAW,OAAA,CAAQ,IAAA,CAAKA,CAAQ,CAAA,CAAI,UAAA,CAAa,MAAA,CAEvF,GAAI,CAACC,CAAAA,CACH,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,0BAA2B,CAAA,CAG7D,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"es.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '34';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Spanish numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n const type = /^[67]/.test(national) ? 'mobile' : /^[89]/.test(national) ? 'landline' : undefined;\n\n if (!type) {\n return { isValid: false, error: 'Invalid prefix for Spain' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.cjs';
2
- export { v as validate } from '../es-C7dIuFpf.cjs';
1
+ import '../types-BCr040RT.cjs';
2
+ export { v as validate } from '../es-DBWm_0BJ.cjs';
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.js';
2
- export { v as validate } from '../es-DVVnhfSE.js';
1
+ import '../types-BCr040RT.js';
2
+ export { v as validate } from '../es-C0cTzz5Q.js';
@@ -1,2 +1,2 @@
1
- function a(t){return t.replace(/\D/g,"")}function s(t,n){return `+${t}${n}`}var r="34";function m(t,n){let i=a(t),e=i;if(i.startsWith(r)&&i.length>9&&(e=i.slice(r.length)),e.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let o="unknown";if(/^[67]/.test(e))o="mobile";else if(/^[89]/.test(e))o="landline";else return {isValid:false,error:"Invalid prefix for Spain"};let l=e;return n?.format==="e164"?l=s(r,e):n?.format==="international"&&(l=`+${r} ${e}`),{isValid:true,type:o,formatted:l}}export{m as validate};//# sourceMappingURL=es.js.map
1
+ function l(e){return e.replace(/\D/g,"")}function s(e,n){return `+${e}${n}`}var i="34";function d(e,n){let r=l(e),t=r;if(r.startsWith(i)&&r.length>9&&(t=r.slice(i.length)),t.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let a=/^[67]/.test(t)?"mobile":/^[89]/.test(t)?"landline":void 0;if(!a)return {isValid:false,error:"Invalid prefix for Spain"};let o=t;return n?.format==="e164"?o=s(i,t):n?.format==="international"&&(o=`+${i} ${t}`),{isValid:true,type:a,formatted:o}}export{d as validate};//# sourceMappingURL=es.js.map
2
2
  //# sourceMappingURL=es.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/es.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,CAAA,CACtB,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,+BAAgC,CAAA,CAGlE,IAAIC,CAAAA,CAA0C,UAG9C,GAAI,OAAA,CAAQ,IAAA,CAAKD,CAAQ,CAAA,CACvBC,CAAAA,CAAO,iBAGA,OAAA,CAAQ,IAAA,CAAKD,CAAQ,CAAA,CAC5BC,CAAAA,CAAO,UAAA,CAAA,KAEP,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,0BAA2B,CAAA,CAG7D,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"es.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '34';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Spanish numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 6 or 7\n if (/^[67]/.test(national)) {\n type = 'mobile';\n }\n // Landline: Starts with 8 or 9\n else if (/^[89]/.test(national)) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid prefix for Spain' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/es.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,CAAA,CACtB,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,+BAAgC,CAAA,CAGlE,IAAMC,CAAAA,CAAO,QAAQ,IAAA,CAAKD,CAAQ,CAAA,CAAI,QAAA,CAAW,OAAA,CAAQ,IAAA,CAAKA,CAAQ,CAAA,CAAI,UAAA,CAAa,MAAA,CAEvF,GAAI,CAACC,CAAAA,CACH,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,0BAA2B,CAAA,CAG7D,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"es.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '34';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Spanish numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n const type = /^[67]/.test(national) ? 'mobile' : /^[89]/.test(national) ? 'landline' : undefined;\n\n if (!type) {\n return { isValid: false, error: 'Invalid prefix for Spain' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.cjs';
2
- export { v as validate } from '../fr-BSghMzs5.cjs';
1
+ import '../types-BCr040RT.cjs';
2
+ export { v as validate } from '../fr-BFsuh3v2.cjs';
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.js';
2
- export { v as validate } from '../fr-C8OxubJ3.js';
1
+ import '../types-BCr040RT.js';
2
+ export { v as validate } from '../fr-BE6W1TEy.js';
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.cjs';
2
- export { v as validate } from '../gb-B5NBNoma.cjs';
1
+ import '../types-BCr040RT.cjs';
2
+ export { v as validate } from '../gb-Dsiq1sFD.cjs';
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.js';
2
- export { v as validate } from '../gb-DDivDdMy.js';
1
+ import '../types-BCr040RT.js';
2
+ export { v as validate } from '../gb-Cvog8XpH.js';
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.cjs';
2
- export { v as validate } from '../gt-uZfIOMWw.cjs';
1
+ import '../types-BCr040RT.cjs';
2
+ export { v as validate } from '../gt-CHOp9jw8.cjs';
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.js';
2
- export { v as validate } from '../gt-DiiNa6Vm.js';
1
+ import '../types-BCr040RT.js';
2
+ export { v as validate } from '../gt-BJOTX_KH.js';
@@ -1,2 +1,2 @@
1
- 'use strict';function s(e){return e.replace(/\D/g,"")}function a(e,n){return `+${e}${n}`}var r="39";function u(e,n){let i=s(e),t=i;if(i.startsWith(r)&&i.length>9&&(t=i.slice(r.length)),t.startsWith("0")&&(t=t.slice(1)),t.length<9||t.length>10)return {isValid:false,error:"Phone number must be 9-10 digits"};let o="unknown";t.startsWith("3")?o="mobile":o="landline";let l=t;return n?.format==="e164"?l=a(r,t):n?.format==="international"&&(l=`+${r} ${t}`),{isValid:true,type:o,formatted:l}}exports.validate=u;//# sourceMappingURL=it.cjs.map
1
+ 'use strict';function s(e){return e.replace(/\D/g,"")}function a(e,n){return `+${e}${n}`}var r="39";function c(e,n){let i=s(e),t=i;if(i.startsWith(r)&&i.length>9&&(t=i.slice(r.length)),t.startsWith("0")&&(t=t.slice(1)),t.length<9||t.length>10)return {isValid:false,error:"Phone number must be 9-10 digits"};let l=t.startsWith("3")?"mobile":"landline",o=t;return n?.format==="e164"?o=a(r,t):n?.format==="international"&&(o=`+${r} ${t}`),{isValid:true,type:l,formatted:o}}exports.validate=c;//# sourceMappingURL=it.cjs.map
2
2
  //# sourceMappingURL=it.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/it.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAWf,GAVIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAK1CI,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,GACzBA,CAAAA,CAAWA,EAAS,KAAA,CAAM,CAAC,CAAA,CAAA,CAGzBA,CAAAA,CAAS,MAAA,CAAS,CAAA,EAAKA,EAAS,MAAA,CAAS,EAAA,CAC3C,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,MAAO,kCAAmC,CAAA,CAGrE,IAAIC,CAAAA,CAA0C,SAAA,CAG1CD,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,QAAA,CAIPA,CAAAA,CAAO,UAAA,CAGT,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"it.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '39';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Italian numbers: variable length (9-10 digits)\n // Often start with 0 for domestic dialing\n if (national.startsWith('0')) {\n national = national.slice(1);\n }\n\n if (national.length < 9 || national.length > 10) {\n return { isValid: false, error: 'Phone number must be 9-10 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 3\n if (national.startsWith('3')) {\n type = 'mobile';\n }\n // Landline: various area codes (0, 1, 2, 4, 5, 6, 7, 8, 9)\n else {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/it.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,EAASJ,CAAAA,CAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAWf,GAVIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,CAAA,EAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,MAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAK1CI,CAAAA,CAAS,UAAA,CAAW,GAAG,IACzBA,CAAAA,CAAWA,CAAAA,CAAS,KAAA,CAAM,CAAC,CAAA,CAAA,CAGzBA,CAAAA,CAAS,OAAS,CAAA,EAAKA,CAAAA,CAAS,MAAA,CAAS,EAAA,CAC3C,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,kCAAmC,CAAA,CAGrE,IAAMC,CAAAA,CAAOD,EAAS,UAAA,CAAW,GAAG,CAAA,CAAI,QAAA,CAAW,UAAA,CAE/CE,CAAAA,CAAYF,EAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,CAAAA,CAAWE,EAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,CAAAA,CAAY,IAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,KAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"it.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '39';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Italian numbers: variable length (9-10 digits)\n // Often start with 0 for domestic dialing\n if (national.startsWith('0')) {\n national = national.slice(1);\n }\n\n if (national.length < 9 || national.length > 10) {\n return { isValid: false, error: 'Phone number must be 9-10 digits' };\n }\n\n const type = national.startsWith('3') ? 'mobile' : 'landline';\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.cjs';
2
- export { v as validate } from '../it-BtfZnlF6.cjs';
1
+ import '../types-BCr040RT.cjs';
2
+ export { v as validate } from '../it-Cvn0ckKc.cjs';
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.js';
2
- export { v as validate } from '../it-DollYcFl.js';
1
+ import '../types-BCr040RT.js';
2
+ export { v as validate } from '../it-DRkyyTTW.js';
@@ -1,2 +1,2 @@
1
- function s(e){return e.replace(/\D/g,"")}function a(e,n){return `+${e}${n}`}var r="39";function u(e,n){let i=s(e),t=i;if(i.startsWith(r)&&i.length>9&&(t=i.slice(r.length)),t.startsWith("0")&&(t=t.slice(1)),t.length<9||t.length>10)return {isValid:false,error:"Phone number must be 9-10 digits"};let o="unknown";t.startsWith("3")?o="mobile":o="landline";let l=t;return n?.format==="e164"?l=a(r,t):n?.format==="international"&&(l=`+${r} ${t}`),{isValid:true,type:o,formatted:l}}export{u as validate};//# sourceMappingURL=it.js.map
1
+ function s(e){return e.replace(/\D/g,"")}function a(e,n){return `+${e}${n}`}var r="39";function c(e,n){let i=s(e),t=i;if(i.startsWith(r)&&i.length>9&&(t=i.slice(r.length)),t.startsWith("0")&&(t=t.slice(1)),t.length<9||t.length>10)return {isValid:false,error:"Phone number must be 9-10 digits"};let l=t.startsWith("3")?"mobile":"landline",o=t;return n?.format==="e164"?o=a(r,t):n?.format==="international"&&(o=`+${r} ${t}`),{isValid:true,type:l,formatted:o}}export{c as validate};//# sourceMappingURL=it.js.map
2
2
  //# sourceMappingURL=it.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/it.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAWf,GAVIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAK1CI,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,GACzBA,CAAAA,CAAWA,EAAS,KAAA,CAAM,CAAC,CAAA,CAAA,CAGzBA,CAAAA,CAAS,MAAA,CAAS,CAAA,EAAKA,EAAS,MAAA,CAAS,EAAA,CAC3C,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,MAAO,kCAAmC,CAAA,CAGrE,IAAIC,CAAAA,CAA0C,SAAA,CAG1CD,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,QAAA,CAIPA,CAAAA,CAAO,UAAA,CAGT,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"it.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '39';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Italian numbers: variable length (9-10 digits)\n // Often start with 0 for domestic dialing\n if (national.startsWith('0')) {\n national = national.slice(1);\n }\n\n if (national.length < 9 || national.length > 10) {\n return { isValid: false, error: 'Phone number must be 9-10 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 3\n if (national.startsWith('3')) {\n type = 'mobile';\n }\n // Landline: various area codes (0, 1, 2, 4, 5, 6, 7, 8, 9)\n else {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/it.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,EAASJ,CAAAA,CAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAWf,GAVIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,CAAA,EAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,MAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAK1CI,CAAAA,CAAS,UAAA,CAAW,GAAG,IACzBA,CAAAA,CAAWA,CAAAA,CAAS,KAAA,CAAM,CAAC,CAAA,CAAA,CAGzBA,CAAAA,CAAS,OAAS,CAAA,EAAKA,CAAAA,CAAS,MAAA,CAAS,EAAA,CAC3C,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,kCAAmC,CAAA,CAGrE,IAAMC,CAAAA,CAAOD,EAAS,UAAA,CAAW,GAAG,CAAA,CAAI,QAAA,CAAW,UAAA,CAE/CE,CAAAA,CAAYF,EAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,CAAAA,CAAWE,EAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,CAAAA,CAAY,IAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,KAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"it.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '39';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Italian numbers: variable length (9-10 digits)\n // Often start with 0 for domestic dialing\n if (national.startsWith('0')) {\n national = national.slice(1);\n }\n\n if (national.length < 9 || national.length > 10) {\n return { isValid: false, error: 'Phone number must be 9-10 digits' };\n }\n\n const type = national.startsWith('3') ? 'mobile' : 'landline';\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.cjs';
2
- export { v as validate } from '../mx-BaMV1Q-C.cjs';
1
+ import '../types-BCr040RT.cjs';
2
+ export { v as validate } from '../mx-CmkrNDw0.cjs';
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.js';
2
- export { v as validate } from '../mx-gjjuvO94.js';
1
+ import '../types-BCr040RT.js';
2
+ export { v as validate } from '../mx-DkRS3Aa-.js';
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.cjs';
2
- export { v as validate } from '../pa-CEAa_MLu.cjs';
1
+ import '../types-BCr040RT.cjs';
2
+ export { v as validate } from '../pa-BPfQzrBx.cjs';
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.js';
2
- export { v as validate } from '../pa-CeerPsSh.js';
1
+ import '../types-BCr040RT.js';
2
+ export { v as validate } from '../pa-Dyi3iuWW.js';
@@ -1,2 +1,2 @@
1
- 'use strict';function a(t){return t.replace(/\D/g,"")}function s(t,n){return `+${t}${n}`}var i="51";function m(t,n){let r=a(t),e=r;if(r.startsWith(i)&&r.length>9&&(e=r.slice(i.length)),e.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let o="unknown";if(e.startsWith("9"))o="mobile";else if(/^[01]/.test(e))o="landline";else return {isValid:false,error:"Invalid prefix for Peru"};let l=e;return n?.format==="e164"?l=s(i,e):n?.format==="international"&&(l=`+${i} ${e}`),{isValid:true,type:o,formatted:l}}exports.validate=m;//# sourceMappingURL=pe.cjs.map
1
+ 'use strict';function s(e){return e.replace(/\D/g,"")}function l(e,n){return `+${e}${n}`}var i="51";function d(e,n){let r=s(e),t=r;if(r.startsWith(i)&&r.length>9&&(t=r.slice(i.length)),t.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let a=t.startsWith("9")?"mobile":/^[01]/.test(t)?"landline":void 0;if(!a)return {isValid:false,error:"Invalid prefix for Peru"};let o=t;return n?.format==="e164"?o=l(i,t):n?.format==="international"&&(o=`+${i} ${t}`),{isValid:true,type:a,formatted:o}}exports.validate=d;//# sourceMappingURL=pe.cjs.map
2
2
  //# sourceMappingURL=pe.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/pe.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,CAAA,CACtB,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,+BAAgC,CAAA,CAGlE,IAAIC,CAAAA,CAA0C,UAG9C,GAAID,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,iBAGA,OAAA,CAAQ,IAAA,CAAKD,CAAQ,CAAA,CAC5BC,CAAAA,CAAO,UAAA,CAAA,KAEP,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,yBAA0B,CAAA,CAG5D,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"pe.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '51';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Peruvian numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 9\n if (national.startsWith('9')) {\n type = 'mobile';\n }\n // Landline: Starts with 1 (Lima) or other area codes (0)\n else if (/^[01]/.test(national)) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid prefix for Peru' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/pe.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,CAAA,CACtB,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,+BAAgC,CAAA,CAGlE,IAAMC,CAAAA,CAAOD,EAAS,UAAA,CAAW,GAAG,CAAA,CAChC,QAAA,CACA,OAAA,CAAQ,IAAA,CAAKA,CAAQ,CAAA,CACnB,UAAA,CACA,MAAA,CAEN,GAAI,CAACC,CAAAA,CACH,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,yBAA0B,CAAA,CAG5D,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"pe.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '51';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Peruvian numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n const type = national.startsWith('9')\n ? 'mobile'\n : /^[01]/.test(national)\n ? 'landline'\n : undefined;\n\n if (!type) {\n return { isValid: false, error: 'Invalid prefix for Peru' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.cjs';
2
- export { v as validate } from '../pe-CHVFUsc1.cjs';
1
+ import '../types-BCr040RT.cjs';
2
+ export { v as validate } from '../pe-B_5pgsR0.cjs';
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.js';
2
- export { v as validate } from '../pe-ZpTRwvEa.js';
1
+ import '../types-BCr040RT.js';
2
+ export { v as validate } from '../pe-NCsXTXmc.js';
@@ -1,2 +1,2 @@
1
- function a(t){return t.replace(/\D/g,"")}function s(t,n){return `+${t}${n}`}var i="51";function m(t,n){let r=a(t),e=r;if(r.startsWith(i)&&r.length>9&&(e=r.slice(i.length)),e.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let o="unknown";if(e.startsWith("9"))o="mobile";else if(/^[01]/.test(e))o="landline";else return {isValid:false,error:"Invalid prefix for Peru"};let l=e;return n?.format==="e164"?l=s(i,e):n?.format==="international"&&(l=`+${i} ${e}`),{isValid:true,type:o,formatted:l}}export{m as validate};//# sourceMappingURL=pe.js.map
1
+ function s(e){return e.replace(/\D/g,"")}function l(e,n){return `+${e}${n}`}var i="51";function d(e,n){let r=s(e),t=r;if(r.startsWith(i)&&r.length>9&&(t=r.slice(i.length)),t.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let a=t.startsWith("9")?"mobile":/^[01]/.test(t)?"landline":void 0;if(!a)return {isValid:false,error:"Invalid prefix for Peru"};let o=t;return n?.format==="e164"?o=l(i,t):n?.format==="international"&&(o=`+${i} ${t}`),{isValid:true,type:a,formatted:o}}export{d as validate};//# sourceMappingURL=pe.js.map
2
2
  //# sourceMappingURL=pe.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/pe.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,CAAA,CACtB,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,+BAAgC,CAAA,CAGlE,IAAIC,CAAAA,CAA0C,UAG9C,GAAID,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,iBAGA,OAAA,CAAQ,IAAA,CAAKD,CAAQ,CAAA,CAC5BC,CAAAA,CAAO,UAAA,CAAA,KAEP,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,yBAA0B,CAAA,CAG5D,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"pe.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '51';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Peruvian numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 9\n if (national.startsWith('9')) {\n type = 'mobile';\n }\n // Landline: Starts with 1 (Lima) or other area codes (0)\n else if (/^[01]/.test(national)) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid prefix for Peru' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/pe.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,CAAA,CACtB,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,+BAAgC,CAAA,CAGlE,IAAMC,CAAAA,CAAOD,EAAS,UAAA,CAAW,GAAG,CAAA,CAChC,QAAA,CACA,OAAA,CAAQ,IAAA,CAAKA,CAAQ,CAAA,CACnB,UAAA,CACA,MAAA,CAEN,GAAI,CAACC,CAAAA,CACH,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,yBAA0B,CAAA,CAG5D,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"pe.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '51';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Peruvian numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n const type = national.startsWith('9')\n ? 'mobile'\n : /^[01]/.test(national)\n ? 'landline'\n : undefined;\n\n if (!type) {\n return { isValid: false, error: 'Invalid prefix for Peru' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.cjs';
2
- export { v as validate } from '../us-BV-jF4X9.cjs';
1
+ import '../types-BCr040RT.cjs';
2
+ export { v as validate } from '../us-BaYu0g3a.cjs';
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.js';
2
- export { v as validate } from '../us-DcxF3Jrz.js';
1
+ import '../types-BCr040RT.js';
2
+ export { v as validate } from '../us-KOpobREo.js';
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.cjs';
2
- export { a as validate } from '../ve-DMPrCtKR.cjs';
1
+ import '../types-BCr040RT.cjs';
2
+ export { a as validate } from '../ve-BomxppQL.cjs';
@@ -1,2 +1,2 @@
1
- import '../types-ClMaPMkH.js';
2
- export { a as validate } from '../ve-Czf_bYd9.js';
1
+ import '../types-BCr040RT.js';
2
+ export { a as validate } from '../ve-BFLV2qGp.js';
@@ -1,4 +1,4 @@
1
- import { a as PhoneOptions, P as PhoneValidationResult } from './types-ClMaPMkH.cjs';
1
+ import { P as PhoneOptions, a as PhoneValidationResult } from './types-BCr040RT.cjs';
2
2
 
3
3
  declare function validate(phone: string, options?: PhoneOptions): PhoneValidationResult;
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as PhoneOptions, P as PhoneValidationResult } from './types-ClMaPMkH.js';
1
+ import { P as PhoneOptions, a as PhoneValidationResult } from './types-BCr040RT.js';
2
2
 
3
3
  declare function validate(phone: string, options?: PhoneOptions): PhoneValidationResult;
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as PhoneOptions, P as PhoneValidationResult } from './types-ClMaPMkH.cjs';
1
+ import { P as PhoneOptions, a as PhoneValidationResult } from './types-BCr040RT.cjs';
2
2
 
3
3
  declare function validate(phone: string, options?: PhoneOptions): PhoneValidationResult;
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as PhoneOptions, P as PhoneValidationResult } from './types-ClMaPMkH.js';
1
+ import { P as PhoneOptions, a as PhoneValidationResult } from './types-BCr040RT.js';
2
2
 
3
3
  declare function validate(phone: string, options?: PhoneOptions): PhoneValidationResult;
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as PhoneOptions, P as PhoneValidationResult } from './types-ClMaPMkH.cjs';
1
+ import { P as PhoneOptions, a as PhoneValidationResult } from './types-BCr040RT.cjs';
2
2
 
3
3
  declare function validate(phone: string, options?: PhoneOptions): PhoneValidationResult;
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as PhoneOptions, P as PhoneValidationResult } from './types-ClMaPMkH.js';
1
+ import { P as PhoneOptions, a as PhoneValidationResult } from './types-BCr040RT.js';
2
2
 
3
3
  declare function validate(phone: string, options?: PhoneOptions): PhoneValidationResult;
4
4
 
@@ -8,4 +8,4 @@ interface PhoneOptions {
8
8
  format?: 'national' | 'international' | 'e164';
9
9
  }
10
10
 
11
- export type { PhoneValidationResult as P, PhoneOptions as a };
11
+ export type { PhoneOptions as P, PhoneValidationResult as a };
@@ -8,4 +8,4 @@ interface PhoneOptions {
8
8
  format?: 'national' | 'international' | 'e164';
9
9
  }
10
10
 
11
- export type { PhoneValidationResult as P, PhoneOptions as a };
11
+ export type { PhoneOptions as P, PhoneValidationResult as a };
@@ -1,4 +1,4 @@
1
- import { a as PhoneOptions, P as PhoneValidationResult } from './types-ClMaPMkH.cjs';
1
+ import { P as PhoneOptions, a as PhoneValidationResult } from './types-BCr040RT.cjs';
2
2
 
3
3
  declare function validate(phone: string, options?: PhoneOptions): PhoneValidationResult;
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as PhoneOptions, P as PhoneValidationResult } from './types-ClMaPMkH.js';
1
+ import { P as PhoneOptions, a as PhoneValidationResult } from './types-BCr040RT.js';
2
2
 
3
3
  declare function validate(phone: string, options?: PhoneOptions): PhoneValidationResult;
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as PhoneOptions, P as PhoneValidationResult } from './types-ClMaPMkH.js';
1
+ import { P as PhoneOptions, a as PhoneValidationResult } from './types-BCr040RT.js';
2
2
 
3
3
  declare function validate(phone: string, options?: PhoneOptions): PhoneValidationResult;
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as PhoneOptions, P as PhoneValidationResult } from './types-ClMaPMkH.cjs';
1
+ import { P as PhoneOptions, a as PhoneValidationResult } from './types-BCr040RT.cjs';
2
2
 
3
3
  declare function validate(phone: string, options?: PhoneOptions): PhoneValidationResult;
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "soff-phone",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "Lightweight phone number validation and formatting library for global markets",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -268,18 +268,18 @@
268
268
  "node": ">=20"
269
269
  },
270
270
  "devDependencies": {
271
- "@eslint/js": "^9.39.2",
271
+ "@eslint/js": "^10.0.1",
272
272
  "@soff/tsconfig": "*",
273
- "@vitest/coverage-v8": "^4.0.16",
274
- "eslint": "^9.39.2",
273
+ "@vitest/coverage-v8": "^4.1.10",
274
+ "eslint": "^10.7.0",
275
275
  "eslint-config-prettier": "^10.1.8",
276
- "globals": "^17.0.0",
277
- "prettier": "^3.7.4",
278
- "rimraf": "^6.1.2",
276
+ "globals": "^17.7.0",
277
+ "prettier": "^3.9.5",
278
+ "rimraf": "^6.1.3",
279
279
  "tsup": "^8.5.1",
280
- "typescript": "^5.9.3",
281
- "typescript-eslint": "^8.52.0",
282
- "vitest": "^4.0.15"
280
+ "typescript": "^6.0.3",
281
+ "typescript-eslint": "^8.63.0",
282
+ "vitest": "^4.1.5"
283
283
  },
284
284
  "publishConfig": {
285
285
  "access": "public",