{"ast":null,"code":"import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nexport function leftPad(str, length) {\n  var fill = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '0';\n  var current = String(str);\n  while (current.length < length) {\n    current = \"\".concat(fill).concat(current);\n  }\n  return current;\n}\n\n/**\n * Convert `value` to array. Will provide `[]` if is null or undefined.\n */\nexport function toArray(val) {\n  if (val === null || val === undefined) {\n    return [];\n  }\n  return Array.isArray(val) ? val : [val];\n}\nexport function fillIndex(ori, index, value) {\n  var clone = _toConsumableArray(ori);\n  clone[index] = value;\n  return clone;\n}\n\n/** Pick props from the key list. Will filter empty value */\nexport function pickProps(props, keys) {\n  var clone = {};\n  var mergedKeys = keys || Object.keys(props);\n  mergedKeys.forEach(function (key) {\n    if (props[key] !== undefined) {\n      clone[key] = props[key];\n    }\n  });\n  return clone;\n}\nexport function getRowFormat(picker, locale, format) {\n  if (format) {\n    return format;\n  }\n  switch (picker) {\n    // All from the `locale.fieldXXXFormat` first\n    case 'time':\n      return locale.fieldTimeFormat;\n    case 'datetime':\n      return locale.fieldDateTimeFormat;\n    case 'month':\n      return locale.fieldMonthFormat;\n    case 'year':\n      return locale.fieldYearFormat;\n    case 'quarter':\n      return locale.fieldQuarterFormat;\n    case 'week':\n      return locale.fieldWeekFormat;\n    default:\n      return locale.fieldDateFormat;\n  }\n}","map":{"version":3,"names":["_toConsumableArray","leftPad","str","length","fill","arguments","undefined","current","String","concat","toArray","val","Array","isArray","fillIndex","ori","index","value","clone","pickProps","props","keys","mergedKeys","Object","forEach","key","getRowFormat","picker","locale","format","fieldTimeFormat","fieldDateTimeFormat","fieldMonthFormat","fieldYearFormat","fieldQuarterFormat","fieldWeekFormat","fieldDateFormat"],"sources":["/Users/shanyi/Desktop/Projects/UC_Trains_Voice/react-demo/node_modules/rc-picker/es/utils/miscUtil.js"],"sourcesContent":["import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nexport function leftPad(str, length) {\n  var fill = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '0';\n  var current = String(str);\n  while (current.length < length) {\n    current = \"\".concat(fill).concat(current);\n  }\n  return current;\n}\n\n/**\n * Convert `value` to array. Will provide `[]` if is null or undefined.\n */\nexport function toArray(val) {\n  if (val === null || val === undefined) {\n    return [];\n  }\n  return Array.isArray(val) ? val : [val];\n}\nexport function fillIndex(ori, index, value) {\n  var clone = _toConsumableArray(ori);\n  clone[index] = value;\n  return clone;\n}\n\n/** Pick props from the key list. Will filter empty value */\nexport function pickProps(props, keys) {\n  var clone = {};\n  var mergedKeys = keys || Object.keys(props);\n  mergedKeys.forEach(function (key) {\n    if (props[key] !== undefined) {\n      clone[key] = props[key];\n    }\n  });\n  return clone;\n}\nexport function getRowFormat(picker, locale, format) {\n  if (format) {\n    return format;\n  }\n  switch (picker) {\n    // All from the `locale.fieldXXXFormat` first\n    case 'time':\n      return locale.fieldTimeFormat;\n    case 'datetime':\n      return locale.fieldDateTimeFormat;\n    case 'month':\n      return locale.fieldMonthFormat;\n    case 'year':\n      return locale.fieldYearFormat;\n    case 'quarter':\n      return locale.fieldQuarterFormat;\n    case 'week':\n      return locale.fieldWeekFormat;\n    default:\n      return locale.fieldDateFormat;\n  }\n}"],"mappings":"AAAA,OAAOA,kBAAkB,MAAM,8CAA8C;AAC7E,OAAO,SAASC,OAAOA,CAACC,GAAG,EAAEC,MAAM,EAAE;EACnC,IAAIC,IAAI,GAAGC,SAAS,CAACF,MAAM,GAAG,CAAC,IAAIE,SAAS,CAAC,CAAC,CAAC,KAAKC,SAAS,GAAGD,SAAS,CAAC,CAAC,CAAC,GAAG,GAAG;EAClF,IAAIE,OAAO,GAAGC,MAAM,CAACN,GAAG,CAAC;EACzB,OAAOK,OAAO,CAACJ,MAAM,GAAGA,MAAM,EAAE;IAC9BI,OAAO,GAAG,EAAE,CAACE,MAAM,CAACL,IAAI,CAAC,CAACK,MAAM,CAACF,OAAO,CAAC;EAC3C;EACA,OAAOA,OAAO;A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AAM;MACT,OAAON,MAAM,CAACO,eAAe;IAC/B;MACE,OAAOP,MAAM,CAACQ,eAAe;EACjC;AACF","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}