{"version":3,"sources":["webpack:////home/jenkins/agent/workspace/rAlWnROk32481EutLuZS/node_modules/prop-validators/dist/index.js"],"names":["Object","defineProperty","exports","value","genericPropType","props","propName","componentName","undefined","Error","cardSpecsPropType","cardSpecs","cardTypes","keys","length","cardSpecPropType","cardSpec","fields","type","stateListPropType","stateList","Array","isArray","$id"],"mappings":"0FAEAA,OAAOC,eAAeC,EAAS,aAAc,CAC5CC,OAAO,IAERD,EAAQE,gBAiBR,SAAyBC,EAAOC,EAAUC,GACzC,QAAwBC,IAApBH,EAAMC,GACT,OAAO,IAAIG,MAAM,iBAAmBH,EAAW,kBAAoBC,EAAgB,yBAEpF,OAAO,MApBRL,EAAQQ,kBA8BR,SAA2BL,EAAOC,EAAUC,GAC3C,IAAII,EAAYN,EAAMC,GACtB,IAAKK,EACJ,OAAO,IAAIF,MAAM,kBAAoBH,EAAW,2BAA6BC,EAAgB,qEACvF,IAAKI,EAAUC,WAAaD,EAAUC,YAAcZ,OAAOa,KAAKF,EAAUC,WAAWE,OAC3F,OAAO,IAAIL,MAAM,iBAAmBH,EAAW,kBAAoBC,EAAgB,qEAEpF,OAAO,MApCRL,EAAQa,iBA8CR,SAA0BV,EAAOC,EAAUC,GAC1C,IAAIS,EAAWX,EAAMC,GACrB,IAAKU,EACJ,OAAO,IAAIP,MAAM,kBAAoBH,EAAW,2BAA6BC,EAAgB,qEACvF,IAAKS,EAASC,SAAWD,EAASE,KACxC,OAAO,IAAIT,MAAM,iBAAmBH,EAAW,kBAAoBC,EAAgB,qEAEpF,OAAO,MApDRL,EAAQiB,kBA8DR,SAA2Bd,EAAOC,EAAUC,GAC3C,IAAIa,EAAYf,EAAMC,GAGtB,IAAKc,EACJ,OAAO,IAAIX,MAAM,kBAAoBH,EAAW,2BAA6BC,EAAgB,+EACvF,IAAKc,MAAMC,QAAQF,IAAcA,EAAUN,SAAWM,EAAU,GAAGG,IACzE,OAAO,IAAId,MAAM,iBAAmBH,EAAW,kBAAoBC,EAAgB,+EAEpF,OAAO","file":"default~addBillingAddressOverpanel~addCardMessenger~addCardOverpanel~addShippingAddressOverpanel~fun~39930a87.esm.js","sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.genericPropType = genericPropType;\nexports.cardSpecsPropType = cardSpecsPropType;\nexports.cardSpecPropType = cardSpecPropType;\nexports.stateListPropType = stateListPropType;\n/**\n * PropType Validators\n */\n\n/**\n * Awesome generic PropType validator\n * Basically just checks if the prop provided is defined\n * - needed for checking connected components passed as props\n * @param {Object} props component props\n * @param {String} propName propName we're validating\n * @param {String} componentName the component\n * @return {Error} a new error or null if there's no error\n */\nfunction genericPropType(props, propName, componentName) {\n\tif (props[propName] === undefined) {\n\t\treturn new Error(\"Invalid prop `\" + propName + \"` supplied to `\" + componentName + \"`. Validation failed.\");\n\t}\n\treturn null;\n}\n\n/**\n * cardSpecs PropType validator\n * @param {Object} props - component props\n * @param {String} propName - propName we're validating (cardSpec)\n * @param {String} componentName - the component\n * @return {Error} - a new error or null if there's no error\n */\nfunction cardSpecsPropType(props, propName, componentName) {\n\tvar cardSpecs = props[propName];\n\tif (!cardSpecs) {\n\t\treturn new Error(\"Required prop `\" + propName + \"` was not specified in `\" + componentName + \"`. Please supply the config object you get back consumerweb-card.\");\n\t} else if (!cardSpecs.cardTypes || cardSpecs.cardTypes && !Object.keys(cardSpecs.cardTypes).length) {\n\t\treturn new Error(\"Invalid prop `\" + propName + \"` supplied to `\" + componentName + \"`. Please supply the config object you get back consumerweb-card.\");\n\t}\n\treturn null;\n}\n\n/**\n * cardSpec PropType validator\n * @param {Object} props - component props\n * @param {String} propName - propName we're validating (cardSpec)\n * @param {String} componentName - the component\n * @return {Error} - a new error or null if there's no error\n */\nfunction cardSpecPropType(props, propName, componentName) {\n\tvar cardSpec = props[propName];\n\tif (!cardSpec) {\n\t\treturn new Error(\"Required prop `\" + propName + \"` was not specified in `\" + componentName + \"`. Please supply the config object you get back consumerweb-card.\");\n\t} else if (!cardSpec.fields || !cardSpec.type) {\n\t\treturn new Error(\"Invalid prop `\" + propName + \"` supplied to `\" + componentName + \"`. Please supply the config object you get back consumerweb-card.\");\n\t}\n\treturn null;\n}\n\n/**\n * stateList PropType validator\n * @param {Object} props - component props\n * @param {String} propName - propName we're validating (stateList)\n * @param {String} componentName - the component\n * @return {Error} - a new error or null if there's no error\n */\nfunction stateListPropType(props, propName, componentName) {\n\tvar stateList = props[propName];\n\n\t// if we don't get the array of states we're expecting from Griffin, return an error\n\tif (!stateList) {\n\t\treturn new Error(\"Required prop `\" + propName + \"` was not specified in `\" + componentName + \"`. Please supply the array you get back from griffin.formatCoarseAddress().\");\n\t} else if (!Array.isArray(stateList) || stateList.length && !stateList[0].$id) {\n\t\treturn new Error(\"Invalid prop `\" + propName + \"` supplied to `\" + componentName + \"`. Please supply the array you get back from griffin.formatCoarseAddress().\");\n\t}\n\treturn null;\n}"],"sourceRoot":""}