UNPKG

@keyhowl/reservation-form

Version:

In order to use this form, you need to have a registration in Keyhowl. There is a detailed tutorial on how to use this package on the [Keyhowl website](https://keyhowl.com).

340 lines (339 loc) 7.97 kB
import { b as u, a as i, c as m, d as o } from "./main-e152d45e.mjs"; import { i as h } from "./index-fcb4e140.mjs"; import "react"; var d = { lessThanXSeconds: { one: "不到 1 秒", other: "不到 {{count}} 秒" }, xSeconds: { one: "1 秒", other: "{{count}} 秒" }, halfAMinute: "半分钟", lessThanXMinutes: { one: "不到 1 分钟", other: "不到 {{count}} 分钟" }, xMinutes: { one: "1 分钟", other: "{{count}} 分钟" }, xHours: { one: "1 小时", other: "{{count}} 小时" }, aboutXHours: { one: "大约 1 小时", other: "大约 {{count}} 小时" }, xDays: { one: "1 天", other: "{{count}} 天" }, aboutXWeeks: { one: "大约 1 个星期", other: "大约 {{count}} 个星期" }, xWeeks: { one: "1 个星期", other: "{{count}} 个星期" }, aboutXMonths: { one: "大约 1 个月", other: "大约 {{count}} 个月" }, xMonths: { one: "1 个月", other: "{{count}} 个月" }, aboutXYears: { one: "大约 1 年", other: "大约 {{count}} 年" }, xYears: { one: "1 年", other: "{{count}} 年" }, overXYears: { one: "超过 1 年", other: "超过 {{count}} 年" }, almostXYears: { one: "将近 1 年", other: "将近 {{count}} 年" } }; function l(e, r, t) { t = t || {}; var a; return typeof d[e] == "string" ? a = d[e] : r === 1 ? a = d[e].one : a = d[e].other.replace("{{count}}", r), t.addSuffix ? t.comparison > 0 ? a + "内" : a + "前" : a; } var c = { full: "y'年'M'月'd'日' EEEE", long: "y'年'M'月'd'日'", medium: "yyyy-MM-dd", short: "yy-MM-dd" }, f = { full: "zzzz a h:mm:ss", long: "z a h:mm:ss", medium: "a h:mm:ss", short: "a h:mm" }, v = { full: "{{date}} {{time}}", long: "{{date}} {{time}}", medium: "{{date}} {{time}}", short: "{{date}} {{time}}" }, g = { date: u({ formats: c, defaultWidth: "full" }), time: u({ formats: f, defaultWidth: "full" }), dateTime: u({ formats: v, defaultWidth: "full" }) }; const P = g; function s(e, r, t, a) { return h(e, r, t) ? a : e.getTime() > r.getTime() ? "'下个'" + a : "'上个'" + a; } var b = { lastWeek: s, // days before yesterday, maybe in this week or last week yesterday: "'昨天' p", today: "'今天' p", tomorrow: "'明天' p", nextWeek: s, // days after tomorrow, maybe in this week or next week other: "PP p" }; function y(e, r, t, a) { var n = b[e]; return typeof n == "function" ? n(r, t, a, "eeee p") : n; } var w = { narrow: ["前", "公元"], abbreviated: ["前", "公元"], wide: ["公元前", "公元"] }, p = { narrow: ["1", "2", "3", "4"], abbreviated: ["第一季", "第二季", "第三季", "第四季"], wide: ["第一季度", "第二季度", "第三季度", "第四季度"] }, W = { narrow: ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二"], abbreviated: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], wide: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"] }, M = { narrow: ["日", "一", "二", "三", "四", "五", "六"], short: ["日", "一", "二", "三", "四", "五", "六"], abbreviated: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], wide: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"] }, S = { narrow: { am: "上", pm: "下", midnight: "凌晨", noon: "午", morning: "早", afternoon: "下午", evening: "晚", night: "夜" }, abbreviated: { am: "上午", pm: "下午", midnight: "凌晨", noon: "中午", morning: "早晨", afternoon: "中午", evening: "晚上", night: "夜间" }, wide: { am: "上午", pm: "下午", midnight: "凌晨", noon: "中午", morning: "早晨", afternoon: "中午", evening: "晚上", night: "夜间" } }, x = { narrow: { am: "上", pm: "下", midnight: "凌晨", noon: "午", morning: "早", afternoon: "下午", evening: "晚", night: "夜" }, abbreviated: { am: "上午", pm: "下午", midnight: "凌晨", noon: "中午", morning: "早晨", afternoon: "中午", evening: "晚上", night: "夜间" }, wide: { am: "上午", pm: "下午", midnight: "凌晨", noon: "中午", morning: "早晨", afternoon: "中午", evening: "晚上", night: "夜间" } }; function z(e, r) { var t = Number(e), a = r || {}, n = String(a.unit); switch (n) { case "date": return t.toString() + "日"; case "hour": return t.toString() + "时"; case "minute": return t.toString() + "分"; case "second": return t.toString() + "秒"; default: return "第 " + t.toString(); } } var k = { ordinalNumber: z, era: i({ values: w, defaultWidth: "wide" }), quarter: i({ values: p, defaultWidth: "wide", argumentCallback: function(e) { return Number(e) - 1; } }), month: i({ values: W, defaultWidth: "wide" }), day: i({ values: M, defaultWidth: "wide" }), dayPeriod: i({ values: S, defaultWidth: "wide", formattingValues: x, defaultFormattingWidth: "wide" }) }; const D = k; var N = /^(第\s*)?\d+(日|时|分|秒)?/i, X = /\d+/i, F = { narrow: /^(前)/i, abbreviated: /^(前)/i, wide: /^(公元前|公元)/i }, L = { any: [/^(前)/i, /^(公元)/i] }, T = { narrow: /^[1234]/i, abbreviated: /^第[一二三四]刻/i, wide: /^第[一二三四]刻钟/i }, V = { any: [/(1|一)/i, /(2|二)/i, /(3|三)/i, /(4|四)/i] }, C = { narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i, abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i, wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i }, E = { narrow: [/^一/i, /^二/i, /^三/i, /^四/i, /^五/i, /^六/i, /^七/i, /^八/i, /^九/i, /^十(?!(一|二))/i, /^十一/i, /^十二/i], any: [/^一|1/i, /^二|2/i, /^三|3/i, /^四|4/i, /^五|5/i, /^六|6/i, /^七|7/i, /^八|8/i, /^九|9/i, /^十(?!(一|二))|10/i, /^十一|11/i, /^十二|12/i] }, Y = { narrow: /^[一二三四五六日]/i, short: /^[一二三四五六日]/i, abbreviated: /^周[一二三四五六日]/i, wide: /^星期[一二三四五六日]/i }, q = { any: [/日/i, /一/i, /二/i, /三/i, /四/i, /五/i, /六/i] }, O = { any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i }, R = { any: { am: /^上午?/i, pm: /^下午?/i, midnight: /^午夜/i, noon: /^[中正]午/i, morning: /^早上/i, afternoon: /^下午/i, evening: /^晚上?/i, night: /^凌晨/i } }, $ = { ordinalNumber: m({ matchPattern: N, parsePattern: X, valueCallback: function(e) { return parseInt(e, 10); } }), era: o({ matchPatterns: F, defaultMatchWidth: "wide", parsePatterns: L, defaultParseWidth: "any" }), quarter: o({ matchPatterns: T, defaultMatchWidth: "wide", parsePatterns: V, defaultParseWidth: "any", valueCallback: function(e) { return e + 1; } }), month: o({ matchPatterns: C, defaultMatchWidth: "wide", parsePatterns: E, defaultParseWidth: "any" }), day: o({ matchPatterns: Y, defaultMatchWidth: "wide", parsePatterns: q, defaultParseWidth: "any" }), dayPeriod: o({ matchPatterns: O, defaultMatchWidth: "any", parsePatterns: R, defaultParseWidth: "any" }) }; const H = $; var U = { code: "zh-CN", formatDistance: l, formatLong: P, formatRelative: y, localize: D, match: H, options: { weekStartsOn: 1, firstWeekContainsDate: 4 } }; export { U as default };