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Aa,EAAa,OAAS,GACnD,EAAQ,MAAQ,OAAO,QACvB,EAAQ,MAAQ,OAAO,QACvB,EAAQ,QAAU,OAAO,UACzB,EAAQ,IAAM,OAAO,MAEd,CACV,CAED,SAAS,MACL,OAAO,OAAO,KACjB,CAED,SAAS,WACL,OAAO,EAAA,SAAA,SAAO,OAAO,YAAY,OAAO,iBAC3C,CAED,SAAS,SACL,OAAO,YAAa,EAAA,oBAAA,SAAA,QAAA,QAAA,GAA8B,QAAQ,KAAM,IACnE,CAED,SAAS,QACL,OAAO,OAAO,OACjB,CAED,SAAS,QACL,OAAO,OAAO,OACjB,CAED,SAAS,UACL,OAAO,OAAO,SACjB,CAED,SAAS,MACL,OAAO,OAAO,KACjB,CAED,SAAS,SACL,OAAO,OAAO,QACjB,CAED,SAAS,MACL,OAAO,OAAO,KACjB,CAED,SAAS,QACL,OAAO,OAAO,OACjB,CAED,SAAS,OACL,OAAO,OAAO,MACjB,CAED,OAAO,QAAU,CACb,gBACA,UACA,cACA,gBACA,QACA,YACA,kBACA,QACA,cACA,YACA,YACA,gBACA,QACA","file":"/npm/random-profile-generator@2.3.0/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/random-profile-generator@2.3.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","import Chance from 'chance';\nimport moment from 'moment';\nimport uniqueRandomArray from 'unique-random-array';\nimport allNames from '../data/names.json';\nimport allAddresses from '../data/addresses.json';  \nimport allMaleNames from '../data/maleNames.json';\nimport allFemaleNames from '../data/femaleNames.json';\n\nlet chance = new Chance();\nconst avatarBase = 'https://api.adorable.io/avatars/200/';\n\nfunction name(gender) {\n    let name = uniqueRandomArray(allNames)();\n    if (!gender) {\n        return name;\n    } else if (gender.toUpperCase() === 'MALE') {\n        name = uniqueRandomArray(allMaleNames)();\n    } else if (gender.toUpperCase() === 'FEMALE') {\n        name = uniqueRandomArray(allFemaleNames)();\n    }\n    return name;\n}\n\nfunction address() {\n    return uniqueRandomArray(allAddresses)();\n}\n\nfunction profile(gender) {\n    let profile = {};\n    let fullName = name(gender);\n    let profileGender = chance.gender();\n    let bDay = moment(chance.birthday());\n    let today = moment(new Date()); \n    \n    if (!gender) {\n        profileGender = chance.gender();\n    } else if (gender.toUpperCase() === 'MALE') {\n        profileGender = 'Male';\n    } else if (gender.toUpperCase() === 'FEMALE') {\n        profileGender = 'Female';\n    }\n\n    profile.id = chance.guid();    \n    profile.fullName = fullName;\n    profile.firstName = fullName.split(' ')[0];\n    profile.lastName = fullName.split(' ')[1];\n    profile.gender = profileGender;\n    profile.birthday = bDay.format('MMM Do[,] YYYY');\n    profile.age = today.diff(bDay, 'years');\n    profile.avatar = avatarBase + fullName.replace(/ /g, '-');\n    profile.address = uniqueRandomArray(allAddresses)();\n\n    let addressParts = profile.address.split(' ');\n    profile.zip = addressParts[addressParts.length - 1];\n    profile.state = addressParts[addressParts.length - 2];\n    profile.phone = chance.phone();\n    profile.email = chance.email();\n    profile.twitter = chance.twitter();\n    profile.ssn = chance.ssn();\n    \n    return profile;\n}\n\nfunction age() {\n    return chance.age();\n}\n\nfunction birthday() {\n    return moment(chance.birthday()).format('MMM Do[,] YYYY');\n}\n\nfunction avatar() {\n    return avatarBase + uniqueRandomArray(allNames)().replace(/ /g, '-');\n}\n\nfunction phone() {\n    return chance.phone();\n}\n\nfunction email() {\n    return chance.email();\n}\n\nfunction twitter() {\n    return chance.twitter();\n}\n\nfunction ssn() {\n    return chance.ssn();\n}\n\nfunction gender() {\n    return chance.gender();\n}\n\nfunction zip() {\n    return chance.zip();\n}\n\nfunction state() {\n    return chance.state();\n}\n\nfunction guid() {\n    return chance.guid();\n}\n\nmodule.exports = {\n    profile,\n    name,\n    gender,\n    address,\n    zip,\n    state,\n    birthday,\n    age,\n    avatar,\n    phone,\n    email,\n    twitter,\n    ssn,\n    guid\n};"]}