{"version":3,"sources":["jsdelivr-header.js","/npm/cnp-decoder@1.2.0/dist/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aACA,OAAO,eAAe,QAAS,aAAc,CAAE,OAAO,IACtD,QAAQ,eAAY,EACpB,MAAM,YAAc,QAAQ,eACtB,SAAW,QAAQ,sBACnB,YAAc,QAAQ,yBACtB,QAAU,QAAQ,qBACxB,SAAS,UAAU,GACf,MAAM,EAAM,EAAM,WAElB,KADmB,EAAI,QAAQ,aAAa,GAExC,MAAM,IAAI,MAAM,6BAQpB,MAAO,CACH,QANW,EAAI,YAAY,WAAW,GAOtC,WANc,EAAI,YAAY,cAAc,GAO5C,KANQ,EAAI,SAAS,QAAQ,GAO7B,QANW,EAAI,YAAY,WAAW,GAOtC,YANe,EAAI,YAAY,iBAAiB,GAQxD,CACA,QAAQ,UAAY","file":"/npm/cnp-decoder@1.2.0/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/cnp-decoder@1.2.0/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.decodeCNP = void 0;\r\nconst functions_1 = require(\"./functions\");\r\nconst getAge_1 = require(\"./functions/getAge\");\r\nconst getCounty_1 = require(\"./functions/getCounty\");\r\nconst utils_1 = require(\"./functions/utils\");\r\nfunction decodeCNP(input) {\r\n    const cnp = input.toString();\r\n    const cnpIsValid = (0, utils_1.validateCNP)(cnp);\r\n    if (!cnpIsValid) {\r\n        throw new Error('Provided CNP is not valid');\r\n        return;\r\n    }\r\n    const gender = (0, functions_1.getGender)(cnp);\r\n    const birthDate = (0, functions_1.getBirthDate)(cnp);\r\n    const age = (0, getAge_1.getAge)(cnp);\r\n    const county = (0, getCounty_1.getCounty)(cnp);\r\n    const isResident = (0, functions_1.checkIfResident)(cnp);\r\n    return {\r\n        gender,\r\n        birthDate,\r\n        age,\r\n        county,\r\n        isResident\r\n    };\r\n}\r\nexports.decodeCNP = decodeCNP;\r\n"]}