cdn.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539
  1. (() => {
  2. var _window$dateFns;function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}var __defProp = Object.defineProperty;
  3. var __export = function __export(target, all) {
  4. for (var name in all)
  5. __defProp(target, name, {
  6. get: all[name],
  7. enumerable: true,
  8. configurable: true,
  9. set: function set(newValue) {return all[name] = function () {return newValue;};}
  10. });
  11. };
  12. // lib/locale/es/_lib/formatDistance.js
  13. var formatDistanceLocale = {
  14. lessThanXSeconds: {
  15. one: "menos de un segundo",
  16. other: "menos de {{count}} segundos"
  17. },
  18. xSeconds: {
  19. one: "1 segundo",
  20. other: "{{count}} segundos"
  21. },
  22. halfAMinute: "medio minuto",
  23. lessThanXMinutes: {
  24. one: "menos de un minuto",
  25. other: "menos de {{count}} minutos"
  26. },
  27. xMinutes: {
  28. one: "1 minuto",
  29. other: "{{count}} minutos"
  30. },
  31. aboutXHours: {
  32. one: "alrededor de 1 hora",
  33. other: "alrededor de {{count}} horas"
  34. },
  35. xHours: {
  36. one: "1 hora",
  37. other: "{{count}} horas"
  38. },
  39. xDays: {
  40. one: "1 d\xEDa",
  41. other: "{{count}} d\xEDas"
  42. },
  43. aboutXWeeks: {
  44. one: "alrededor de 1 semana",
  45. other: "alrededor de {{count}} semanas"
  46. },
  47. xWeeks: {
  48. one: "1 semana",
  49. other: "{{count}} semanas"
  50. },
  51. aboutXMonths: {
  52. one: "alrededor de 1 mes",
  53. other: "alrededor de {{count}} meses"
  54. },
  55. xMonths: {
  56. one: "1 mes",
  57. other: "{{count}} meses"
  58. },
  59. aboutXYears: {
  60. one: "alrededor de 1 a\xF1o",
  61. other: "alrededor de {{count}} a\xF1os"
  62. },
  63. xYears: {
  64. one: "1 a\xF1o",
  65. other: "{{count}} a\xF1os"
  66. },
  67. overXYears: {
  68. one: "m\xE1s de 1 a\xF1o",
  69. other: "m\xE1s de {{count}} a\xF1os"
  70. },
  71. almostXYears: {
  72. one: "casi 1 a\xF1o",
  73. other: "casi {{count}} a\xF1os"
  74. }
  75. };
  76. var formatDistance = function formatDistance(token, count, options) {
  77. var result;
  78. var tokenValue = formatDistanceLocale[token];
  79. if (typeof tokenValue === "string") {
  80. result = tokenValue;
  81. } else if (count === 1) {
  82. result = tokenValue.one;
  83. } else {
  84. result = tokenValue.other.replace("{{count}}", count.toString());
  85. }
  86. if (options !== null && options !== void 0 && options.addSuffix) {
  87. if (options.comparison && options.comparison > 0) {
  88. return "en " + result;
  89. } else {
  90. return "hace " + result;
  91. }
  92. }
  93. return result;
  94. };
  95. // lib/locale/_lib/buildFormatLongFn.js
  96. function buildFormatLongFn(args) {
  97. return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  98. var width = options.width ? String(options.width) : args.defaultWidth;
  99. var format = args.formats[width] || args.formats[args.defaultWidth];
  100. return format;
  101. };
  102. }
  103. // lib/locale/es/_lib/formatLong.js
  104. var dateFormats = {
  105. full: "EEEE, d 'de' MMMM 'de' y",
  106. long: "d 'de' MMMM 'de' y",
  107. medium: "d MMM y",
  108. short: "dd/MM/y"
  109. };
  110. var timeFormats = {
  111. full: "HH:mm:ss zzzz",
  112. long: "HH:mm:ss z",
  113. medium: "HH:mm:ss",
  114. short: "HH:mm"
  115. };
  116. var dateTimeFormats = {
  117. full: "{{date}} 'a las' {{time}}",
  118. long: "{{date}} 'a las' {{time}}",
  119. medium: "{{date}}, {{time}}",
  120. short: "{{date}}, {{time}}"
  121. };
  122. var formatLong = {
  123. date: buildFormatLongFn({
  124. formats: dateFormats,
  125. defaultWidth: "full"
  126. }),
  127. time: buildFormatLongFn({
  128. formats: timeFormats,
  129. defaultWidth: "full"
  130. }),
  131. dateTime: buildFormatLongFn({
  132. formats: dateTimeFormats,
  133. defaultWidth: "full"
  134. })
  135. };
  136. // lib/locale/es/_lib/formatRelative.js
  137. var formatRelativeLocale = {
  138. lastWeek: "'el' eeee 'pasado a la' p",
  139. yesterday: "'ayer a la' p",
  140. today: "'hoy a la' p",
  141. tomorrow: "'ma\xF1ana a la' p",
  142. nextWeek: "eeee 'a la' p",
  143. other: "P"
  144. };
  145. var formatRelativeLocalePlural = {
  146. lastWeek: "'el' eeee 'pasado a las' p",
  147. yesterday: "'ayer a las' p",
  148. today: "'hoy a las' p",
  149. tomorrow: "'ma\xF1ana a las' p",
  150. nextWeek: "eeee 'a las' p",
  151. other: "P"
  152. };
  153. var formatRelative = function formatRelative(token, date, _baseDate, _options) {
  154. if (date.getHours() !== 1) {
  155. return formatRelativeLocalePlural[token];
  156. } else {
  157. return formatRelativeLocale[token];
  158. }
  159. };
  160. // lib/locale/_lib/buildLocalizeFn.js
  161. function buildLocalizeFn(args) {
  162. return function (value, options) {
  163. var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
  164. var valuesArray;
  165. if (context === "formatting" && args.formattingValues) {
  166. var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
  167. var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
  168. valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
  169. } else {
  170. var _defaultWidth = args.defaultWidth;
  171. var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
  172. valuesArray = args.values[_width] || args.values[_defaultWidth];
  173. }
  174. var index = args.argumentCallback ? args.argumentCallback(value) : value;
  175. return valuesArray[index];
  176. };
  177. }
  178. // lib/locale/es/_lib/localize.js
  179. var eraValues = {
  180. narrow: ["AC", "DC"],
  181. abbreviated: ["AC", "DC"],
  182. wide: ["antes de cristo", "despu\xE9s de cristo"]
  183. };
  184. var quarterValues = {
  185. narrow: ["1", "2", "3", "4"],
  186. abbreviated: ["T1", "T2", "T3", "T4"],
  187. wide: ["1\xBA trimestre", "2\xBA trimestre", "3\xBA trimestre", "4\xBA trimestre"]
  188. };
  189. var monthValues = {
  190. narrow: ["e", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
  191. abbreviated: [
  192. "ene",
  193. "feb",
  194. "mar",
  195. "abr",
  196. "may",
  197. "jun",
  198. "jul",
  199. "ago",
  200. "sep",
  201. "oct",
  202. "nov",
  203. "dic"],
  204. wide: [
  205. "enero",
  206. "febrero",
  207. "marzo",
  208. "abril",
  209. "mayo",
  210. "junio",
  211. "julio",
  212. "agosto",
  213. "septiembre",
  214. "octubre",
  215. "noviembre",
  216. "diciembre"]
  217. };
  218. var dayValues = {
  219. narrow: ["d", "l", "m", "m", "j", "v", "s"],
  220. short: ["do", "lu", "ma", "mi", "ju", "vi", "s\xE1"],
  221. abbreviated: ["dom", "lun", "mar", "mi\xE9", "jue", "vie", "s\xE1b"],
  222. wide: [
  223. "domingo",
  224. "lunes",
  225. "martes",
  226. "mi\xE9rcoles",
  227. "jueves",
  228. "viernes",
  229. "s\xE1bado"]
  230. };
  231. var dayPeriodValues = {
  232. narrow: {
  233. am: "a",
  234. pm: "p",
  235. midnight: "mn",
  236. noon: "md",
  237. morning: "ma\xF1ana",
  238. afternoon: "tarde",
  239. evening: "tarde",
  240. night: "noche"
  241. },
  242. abbreviated: {
  243. am: "AM",
  244. pm: "PM",
  245. midnight: "medianoche",
  246. noon: "mediodia",
  247. morning: "ma\xF1ana",
  248. afternoon: "tarde",
  249. evening: "tarde",
  250. night: "noche"
  251. },
  252. wide: {
  253. am: "a.m.",
  254. pm: "p.m.",
  255. midnight: "medianoche",
  256. noon: "mediodia",
  257. morning: "ma\xF1ana",
  258. afternoon: "tarde",
  259. evening: "tarde",
  260. night: "noche"
  261. }
  262. };
  263. var formattingDayPeriodValues = {
  264. narrow: {
  265. am: "a",
  266. pm: "p",
  267. midnight: "mn",
  268. noon: "md",
  269. morning: "de la ma\xF1ana",
  270. afternoon: "de la tarde",
  271. evening: "de la tarde",
  272. night: "de la noche"
  273. },
  274. abbreviated: {
  275. am: "AM",
  276. pm: "PM",
  277. midnight: "medianoche",
  278. noon: "mediodia",
  279. morning: "de la ma\xF1ana",
  280. afternoon: "de la tarde",
  281. evening: "de la tarde",
  282. night: "de la noche"
  283. },
  284. wide: {
  285. am: "a.m.",
  286. pm: "p.m.",
  287. midnight: "medianoche",
  288. noon: "mediodia",
  289. morning: "de la ma\xF1ana",
  290. afternoon: "de la tarde",
  291. evening: "de la tarde",
  292. night: "de la noche"
  293. }
  294. };
  295. var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
  296. var number = Number(dirtyNumber);
  297. return number + "\xBA";
  298. };
  299. var localize = {
  300. ordinalNumber: ordinalNumber,
  301. era: buildLocalizeFn({
  302. values: eraValues,
  303. defaultWidth: "wide"
  304. }),
  305. quarter: buildLocalizeFn({
  306. values: quarterValues,
  307. defaultWidth: "wide",
  308. argumentCallback: function argumentCallback(quarter) {return Number(quarter) - 1;}
  309. }),
  310. month: buildLocalizeFn({
  311. values: monthValues,
  312. defaultWidth: "wide"
  313. }),
  314. day: buildLocalizeFn({
  315. values: dayValues,
  316. defaultWidth: "wide"
  317. }),
  318. dayPeriod: buildLocalizeFn({
  319. values: dayPeriodValues,
  320. defaultWidth: "wide",
  321. formattingValues: formattingDayPeriodValues,
  322. defaultFormattingWidth: "wide"
  323. })
  324. };
  325. // lib/locale/_lib/buildMatchPatternFn.js
  326. function buildMatchPatternFn(args) {
  327. return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  328. var matchResult = string.match(args.matchPattern);
  329. if (!matchResult)
  330. return null;
  331. var matchedString = matchResult[0];
  332. var parseResult = string.match(args.parsePattern);
  333. if (!parseResult)
  334. return null;
  335. var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
  336. value = options.valueCallback ? options.valueCallback(value) : value;
  337. var rest = string.slice(matchedString.length);
  338. return { value: value, rest: rest };
  339. };
  340. }
  341. // lib/locale/_lib/buildMatchFn.js
  342. function buildMatchFn(args) {
  343. return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  344. var width = options.width;
  345. var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
  346. var matchResult = string.match(matchPattern);
  347. if (!matchResult) {
  348. return null;
  349. }
  350. var matchedString = matchResult[0];
  351. var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
  352. var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
  353. var value;
  354. value = args.valueCallback ? args.valueCallback(key) : key;
  355. value = options.valueCallback ? options.valueCallback(value) : value;
  356. var rest = string.slice(matchedString.length);
  357. return { value: value, rest: rest };
  358. };
  359. }
  360. function findKey(object, predicate) {
  361. for (var key in object) {
  362. if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
  363. return key;
  364. }
  365. }
  366. return;
  367. }
  368. function findIndex(array, predicate) {
  369. for (var key = 0; key < array.length; key++) {
  370. if (predicate(array[key])) {
  371. return key;
  372. }
  373. }
  374. return;
  375. }
  376. // lib/locale/es/_lib/match.js
  377. var matchOrdinalNumberPattern = /^(\d+)(º)?/i;
  378. var parseOrdinalNumberPattern = /\d+/i;
  379. var matchEraPatterns = {
  380. narrow: /^(ac|dc|a|d)/i,
  381. abbreviated: /^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,
  382. wide: /^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i
  383. };
  384. var parseEraPatterns = {
  385. any: [/^ac/i, /^dc/i],
  386. wide: [
  387. /^(antes de cristo|antes de la era com[uú]n)/i,
  388. /^(despu[eé]s de cristo|era com[uú]n)/i]
  389. };
  390. var matchQuarterPatterns = {
  391. narrow: /^[1234]/i,
  392. abbreviated: /^T[1234]/i,
  393. wide: /^[1234](º)? trimestre/i
  394. };
  395. var parseQuarterPatterns = {
  396. any: [/1/i, /2/i, /3/i, /4/i]
  397. };
  398. var matchMonthPatterns = {
  399. narrow: /^[efmajsond]/i,
  400. abbreviated: /^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,
  401. wide: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i
  402. };
  403. var parseMonthPatterns = {
  404. narrow: [
  405. /^e/i,
  406. /^f/i,
  407. /^m/i,
  408. /^a/i,
  409. /^m/i,
  410. /^j/i,
  411. /^j/i,
  412. /^a/i,
  413. /^s/i,
  414. /^o/i,
  415. /^n/i,
  416. /^d/i],
  417. any: [
  418. /^en/i,
  419. /^feb/i,
  420. /^mar/i,
  421. /^abr/i,
  422. /^may/i,
  423. /^jun/i,
  424. /^jul/i,
  425. /^ago/i,
  426. /^sep/i,
  427. /^oct/i,
  428. /^nov/i,
  429. /^dic/i]
  430. };
  431. var matchDayPatterns = {
  432. narrow: /^[dlmjvs]/i,
  433. short: /^(do|lu|ma|mi|ju|vi|s[áa])/i,
  434. abbreviated: /^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,
  435. wide: /^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i
  436. };
  437. var parseDayPatterns = {
  438. narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
  439. any: [/^do/i, /^lu/i, /^ma/i, /^mi/i, /^ju/i, /^vi/i, /^sa/i]
  440. };
  441. var matchDayPeriodPatterns = {
  442. narrow: /^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,
  443. any: /^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i
  444. };
  445. var parseDayPeriodPatterns = {
  446. any: {
  447. am: /^a/i,
  448. pm: /^p/i,
  449. midnight: /^mn/i,
  450. noon: /^md/i,
  451. morning: /mañana/i,
  452. afternoon: /tarde/i,
  453. evening: /tarde/i,
  454. night: /noche/i
  455. }
  456. };
  457. var match = {
  458. ordinalNumber: buildMatchPatternFn({
  459. matchPattern: matchOrdinalNumberPattern,
  460. parsePattern: parseOrdinalNumberPattern,
  461. valueCallback: function valueCallback(value) {
  462. return parseInt(value, 10);
  463. }
  464. }),
  465. era: buildMatchFn({
  466. matchPatterns: matchEraPatterns,
  467. defaultMatchWidth: "wide",
  468. parsePatterns: parseEraPatterns,
  469. defaultParseWidth: "any"
  470. }),
  471. quarter: buildMatchFn({
  472. matchPatterns: matchQuarterPatterns,
  473. defaultMatchWidth: "wide",
  474. parsePatterns: parseQuarterPatterns,
  475. defaultParseWidth: "any",
  476. valueCallback: function valueCallback(index) {return index + 1;}
  477. }),
  478. month: buildMatchFn({
  479. matchPatterns: matchMonthPatterns,
  480. defaultMatchWidth: "wide",
  481. parsePatterns: parseMonthPatterns,
  482. defaultParseWidth: "any"
  483. }),
  484. day: buildMatchFn({
  485. matchPatterns: matchDayPatterns,
  486. defaultMatchWidth: "wide",
  487. parsePatterns: parseDayPatterns,
  488. defaultParseWidth: "any"
  489. }),
  490. dayPeriod: buildMatchFn({
  491. matchPatterns: matchDayPeriodPatterns,
  492. defaultMatchWidth: "any",
  493. parsePatterns: parseDayPeriodPatterns,
  494. defaultParseWidth: "any"
  495. })
  496. };
  497. // lib/locale/es.js
  498. var es = {
  499. code: "es",
  500. formatDistance: formatDistance,
  501. formatLong: formatLong,
  502. formatRelative: formatRelative,
  503. localize: localize,
  504. match: match,
  505. options: {
  506. weekStartsOn: 1,
  507. firstWeekContainsDate: 1
  508. }
  509. };
  510. // lib/locale/es/cdn.js
  511. window.dateFns = _objectSpread(_objectSpread({},
  512. window.dateFns), {}, {
  513. locale: _objectSpread(_objectSpread({}, (_window$dateFns =
  514. window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
  515. es: es }) });
  516. //# debugId=E519E4683169D4AD64756E2164756E21
  517. //# sourceMappingURL=cdn.js.map
  518. })();