main repo

This commit is contained in:
Basilosaurusrex
2025-11-24 18:09:40 +01:00
parent b636ee5e70
commit f027651f9b
34146 changed files with 4436636 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
import type { FormatDistanceFn } from "../../types.js";
export declare const formatDistance: FormatDistanceFn;

View File

@@ -0,0 +1,2 @@
import type { FormatDistanceFn } from "../../types.js";
export declare const formatDistance: FormatDistanceFn;

138
node_modules/date-fns/locale/ar/_lib/formatDistance.js generated vendored Normal file
View File

@@ -0,0 +1,138 @@
"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: "أقل من ثانية",
two: "أقل من ثانيتين",
threeToTen: "أقل من {{count}} ثواني",
other: "أقل من {{count}} ثانية",
},
xSeconds: {
one: "ثانية واحدة",
two: "ثانيتان",
threeToTen: "{{count}} ثواني",
other: "{{count}} ثانية",
},
halfAMinute: "نصف دقيقة",
lessThanXMinutes: {
one: "أقل من دقيقة",
two: "أقل من دقيقتين",
threeToTen: "أقل من {{count}} دقائق",
other: "أقل من {{count}} دقيقة",
},
xMinutes: {
one: "دقيقة واحدة",
two: "دقيقتان",
threeToTen: "{{count}} دقائق",
other: "{{count}} دقيقة",
},
aboutXHours: {
one: "ساعة واحدة تقريباً",
two: "ساعتين تقريبا",
threeToTen: "{{count}} ساعات تقريباً",
other: "{{count}} ساعة تقريباً",
},
xHours: {
one: "ساعة واحدة",
two: "ساعتان",
threeToTen: "{{count}} ساعات",
other: "{{count}} ساعة",
},
xDays: {
one: "يوم واحد",
two: "يومان",
threeToTen: "{{count}} أيام",
other: "{{count}} يوم",
},
aboutXWeeks: {
one: "أسبوع واحد تقريبا",
two: "أسبوعين تقريبا",
threeToTen: "{{count}} أسابيع تقريبا",
other: "{{count}} أسبوعا تقريبا",
},
xWeeks: {
one: "أسبوع واحد",
two: "أسبوعان",
threeToTen: "{{count}} أسابيع",
other: "{{count}} أسبوعا",
},
aboutXMonths: {
one: "شهر واحد تقريباً",
two: "شهرين تقريبا",
threeToTen: "{{count}} أشهر تقريبا",
other: "{{count}} شهرا تقريباً",
},
xMonths: {
one: "شهر واحد",
two: "شهران",
threeToTen: "{{count}} أشهر",
other: "{{count}} شهرا",
},
aboutXYears: {
one: "سنة واحدة تقريباً",
two: "سنتين تقريبا",
threeToTen: "{{count}} سنوات تقريباً",
other: "{{count}} سنة تقريباً",
},
xYears: {
one: "سنة واحد",
two: "سنتان",
threeToTen: "{{count}} سنوات",
other: "{{count}} سنة",
},
overXYears: {
one: "أكثر من سنة",
two: "أكثر من سنتين",
threeToTen: "أكثر من {{count}} سنوات",
other: "أكثر من {{count}} سنة",
},
almostXYears: {
one: "ما يقارب سنة واحدة",
two: "ما يقارب سنتين",
threeToTen: "ما يقارب {{count}} سنوات",
other: "ما يقارب {{count}} سنة",
},
};
const formatDistance = (token, count, options) => {
const usageGroup = formatDistanceLocale[token];
let result;
if (typeof usageGroup === "string") {
result = usageGroup;
} else if (count === 1) {
result = usageGroup.one;
} else if (count === 2) {
result = usageGroup.two;
} else if (count <= 10) {
result = usageGroup.threeToTen.replace("{{count}}", String(count));
} else {
result = usageGroup.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "خلال " + result;
} else {
return "منذ " + result;
}
}
return result;
};
exports.formatDistance = formatDistance;

134
node_modules/date-fns/locale/ar/_lib/formatDistance.mjs generated vendored Normal file
View File

@@ -0,0 +1,134 @@
const formatDistanceLocale = {
lessThanXSeconds: {
one: "أقل من ثانية",
two: "أقل من ثانيتين",
threeToTen: "أقل من {{count}} ثواني",
other: "أقل من {{count}} ثانية",
},
xSeconds: {
one: "ثانية واحدة",
two: "ثانيتان",
threeToTen: "{{count}} ثواني",
other: "{{count}} ثانية",
},
halfAMinute: "نصف دقيقة",
lessThanXMinutes: {
one: "أقل من دقيقة",
two: "أقل من دقيقتين",
threeToTen: "أقل من {{count}} دقائق",
other: "أقل من {{count}} دقيقة",
},
xMinutes: {
one: "دقيقة واحدة",
two: "دقيقتان",
threeToTen: "{{count}} دقائق",
other: "{{count}} دقيقة",
},
aboutXHours: {
one: "ساعة واحدة تقريباً",
two: "ساعتين تقريبا",
threeToTen: "{{count}} ساعات تقريباً",
other: "{{count}} ساعة تقريباً",
},
xHours: {
one: "ساعة واحدة",
two: "ساعتان",
threeToTen: "{{count}} ساعات",
other: "{{count}} ساعة",
},
xDays: {
one: "يوم واحد",
two: "يومان",
threeToTen: "{{count}} أيام",
other: "{{count}} يوم",
},
aboutXWeeks: {
one: "أسبوع واحد تقريبا",
two: "أسبوعين تقريبا",
threeToTen: "{{count}} أسابيع تقريبا",
other: "{{count}} أسبوعا تقريبا",
},
xWeeks: {
one: "أسبوع واحد",
two: "أسبوعان",
threeToTen: "{{count}} أسابيع",
other: "{{count}} أسبوعا",
},
aboutXMonths: {
one: "شهر واحد تقريباً",
two: "شهرين تقريبا",
threeToTen: "{{count}} أشهر تقريبا",
other: "{{count}} شهرا تقريباً",
},
xMonths: {
one: "شهر واحد",
two: "شهران",
threeToTen: "{{count}} أشهر",
other: "{{count}} شهرا",
},
aboutXYears: {
one: "سنة واحدة تقريباً",
two: "سنتين تقريبا",
threeToTen: "{{count}} سنوات تقريباً",
other: "{{count}} سنة تقريباً",
},
xYears: {
one: "سنة واحد",
two: "سنتان",
threeToTen: "{{count}} سنوات",
other: "{{count}} سنة",
},
overXYears: {
one: "أكثر من سنة",
two: "أكثر من سنتين",
threeToTen: "أكثر من {{count}} سنوات",
other: "أكثر من {{count}} سنة",
},
almostXYears: {
one: "ما يقارب سنة واحدة",
two: "ما يقارب سنتين",
threeToTen: "ما يقارب {{count}} سنوات",
other: "ما يقارب {{count}} سنة",
},
};
export const formatDistance = (token, count, options) => {
const usageGroup = formatDistanceLocale[token];
let result;
if (typeof usageGroup === "string") {
result = usageGroup;
} else if (count === 1) {
result = usageGroup.one;
} else if (count === 2) {
result = usageGroup.two;
} else if (count <= 10) {
result = usageGroup.threeToTen.replace("{{count}}", String(count));
} else {
result = usageGroup.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "خلال " + result;
} else {
return "منذ " + result;
}
}
return result;
};

View File

@@ -0,0 +1,2 @@
import type { FormatLong } from "../../types.js";
export declare const formatLong: FormatLong;

2
node_modules/date-fns/locale/ar/_lib/formatLong.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { FormatLong } from "../../types.js";
export declare const formatLong: FormatLong;

41
node_modules/date-fns/locale/ar/_lib/formatLong.js generated vendored Normal file
View File

@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.js");
const dateFormats = {
full: "EEEE، do MMMM y",
long: "do MMMM y",
medium: "d MMM y",
short: "dd/MM/yyyy",
};
const timeFormats = {
full: "HH:mm:ss",
long: "HH:mm:ss",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
full: "{{date}} 'عند الساعة' {{time}}",
long: "{{date}} 'عند الساعة' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});

39
node_modules/date-fns/locale/ar/_lib/formatLong.mjs generated vendored Normal file
View File

@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.mjs";
const dateFormats = {
full: "EEEE، do MMMM y",
long: "do MMMM y",
medium: "d MMM y",
short: "dd/MM/yyyy",
};
const timeFormats = {
full: "HH:mm:ss",
long: "HH:mm:ss",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
full: "{{date}} 'عند الساعة' {{time}}",
long: "{{date}} 'عند الساعة' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};

View File

@@ -0,0 +1,2 @@
import type { FormatRelativeFn } from "../../types.js";
export declare const formatRelative: FormatRelativeFn;

View File

@@ -0,0 +1,2 @@
import type { FormatRelativeFn } from "../../types.js";
export declare const formatRelative: FormatRelativeFn;

14
node_modules/date-fns/locale/ar/_lib/formatRelative.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
"use strict";
exports.formatRelative = void 0;
const formatRelativeLocale = {
lastWeek: "eeee 'الماضي عند الساعة' p",
yesterday: "'الأمس عند الساعة' p",
today: "'اليوم عند الساعة' p",
tomorrow: "'غدا عند الساعة' p",
nextWeek: "eeee 'القادم عند الساعة' p",
other: "P",
};
const formatRelative = (token) => formatRelativeLocale[token];
exports.formatRelative = formatRelative;

View File

@@ -0,0 +1,10 @@
const formatRelativeLocale = {
lastWeek: "eeee 'الماضي عند الساعة' p",
yesterday: "'الأمس عند الساعة' p",
today: "'اليوم عند الساعة' p",
tomorrow: "'غدا عند الساعة' p",
nextWeek: "eeee 'القادم عند الساعة' p",
other: "P",
};
export const formatRelative = (token) => formatRelativeLocale[token];

2
node_modules/date-fns/locale/ar/_lib/localize.d.mts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { Localize } from "../../types.js";
export declare const localize: Localize;

2
node_modules/date-fns/locale/ar/_lib/localize.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { Localize } from "../../types.js";
export declare const localize: Localize;

164
node_modules/date-fns/locale/ar/_lib/localize.js generated vendored Normal file
View File

@@ -0,0 +1,164 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.js");
const eraValues = {
narrow: ["ق", "ب"],
abbreviated: ["ق.م.", "ب.م."],
wide: ["قبل الميلاد", "بعد الميلاد"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["ر1", "ر2", "ر3", "ر4"],
wide: ["الربع الأول", "الربع الثاني", "الربع الثالث", "الربع الرابع"],
};
const monthValues = {
narrow: ["ي", "ف", "م", "أ", "م", "ي", "ي", "أ", "س", "أ", "ن", "د"],
abbreviated: [
"يناير",
"فبراير",
"مارس",
"أبريل",
"مايو",
"يونيو",
"يوليو",
"أغسطس",
"سبتمبر",
"أكتوبر",
"نوفمبر",
"ديسمبر",
],
wide: [
"يناير",
"فبراير",
"مارس",
"أبريل",
"مايو",
"يونيو",
"يوليو",
"أغسطس",
"سبتمبر",
"أكتوبر",
"نوفمبر",
"ديسمبر",
],
};
const dayValues = {
narrow: ["ح", "ن", "ث", "ر", "خ", "ج", "س"],
short: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"],
abbreviated: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"],
wide: [
"الأحد",
"الاثنين",
"الثلاثاء",
"الأربعاء",
"الخميس",
"الجمعة",
"السبت",
],
};
const dayPeriodValues = {
narrow: {
am: "ص",
pm: "م",
morning: "الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "المساء",
night: "الليل",
midnight: "منتصف الليل",
},
abbreviated: {
am: "ص",
pm: "م",
morning: "الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "المساء",
night: "الليل",
midnight: "منتصف الليل",
},
wide: {
am: "ص",
pm: "م",
morning: "الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "المساء",
night: "الليل",
midnight: "منتصف الليل",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "ص",
pm: "م",
morning: "في الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "في المساء",
night: "في الليل",
midnight: "منتصف الليل",
},
abbreviated: {
am: "ص",
pm: "م",
morning: "في الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "في المساء",
night: "في الليل",
midnight: "منتصف الليل",
},
wide: {
am: "ص",
pm: "م",
morning: "في الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "في المساء",
night: "في الليل",
midnight: "منتصف الليل",
},
};
const ordinalNumber = (num) => String(num);
const localize = (exports.localize = {
ordinalNumber: ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});

162
node_modules/date-fns/locale/ar/_lib/localize.mjs generated vendored Normal file
View File

@@ -0,0 +1,162 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.mjs";
const eraValues = {
narrow: ["ق", "ب"],
abbreviated: ["ق.م.", "ب.م."],
wide: ["قبل الميلاد", "بعد الميلاد"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["ر1", "ر2", "ر3", "ر4"],
wide: ["الربع الأول", "الربع الثاني", "الربع الثالث", "الربع الرابع"],
};
const monthValues = {
narrow: ["ي", "ف", "م", "أ", "م", "ي", "ي", "أ", "س", "أ", "ن", "د"],
abbreviated: [
"يناير",
"فبراير",
"مارس",
"أبريل",
"مايو",
"يونيو",
"يوليو",
"أغسطس",
"سبتمبر",
"أكتوبر",
"نوفمبر",
"ديسمبر",
],
wide: [
"يناير",
"فبراير",
"مارس",
"أبريل",
"مايو",
"يونيو",
"يوليو",
"أغسطس",
"سبتمبر",
"أكتوبر",
"نوفمبر",
"ديسمبر",
],
};
const dayValues = {
narrow: ["ح", "ن", "ث", "ر", "خ", "ج", "س"],
short: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"],
abbreviated: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"],
wide: [
"الأحد",
"الاثنين",
"الثلاثاء",
"الأربعاء",
"الخميس",
"الجمعة",
"السبت",
],
};
const dayPeriodValues = {
narrow: {
am: "ص",
pm: "م",
morning: "الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "المساء",
night: "الليل",
midnight: "منتصف الليل",
},
abbreviated: {
am: "ص",
pm: "م",
morning: "الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "المساء",
night: "الليل",
midnight: "منتصف الليل",
},
wide: {
am: "ص",
pm: "م",
morning: "الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "المساء",
night: "الليل",
midnight: "منتصف الليل",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "ص",
pm: "م",
morning: "في الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "في المساء",
night: "في الليل",
midnight: "منتصف الليل",
},
abbreviated: {
am: "ص",
pm: "م",
morning: "في الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "في المساء",
night: "في الليل",
midnight: "منتصف الليل",
},
wide: {
am: "ص",
pm: "م",
morning: "في الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "في المساء",
night: "في الليل",
midnight: "منتصف الليل",
},
};
const ordinalNumber = (num) => String(num);
export const localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

2
node_modules/date-fns/locale/ar/_lib/match.d.mts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { Match } from "../../types.js";
export declare const match: Match;

2
node_modules/date-fns/locale/ar/_lib/match.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { Match } from "../../types.js";
export declare const match: Match;

145
node_modules/date-fns/locale/ar/_lib/match.js generated vendored Normal file
View File

@@ -0,0 +1,145 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchPatternFn.js");
var _index2 = require("../../_lib/buildMatchFn.js");
const matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /[قب]/,
abbreviated: /[قب]\.م\./,
wide: /(قبل|بعد) الميلاد/,
};
const parseEraPatterns = {
any: [/قبل/, /بعد/],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /ر[1234]/,
wide: /الربع (الأول|الثاني|الثالث|الرابع)/,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[أيفمسند]/,
abbreviated:
/^(يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/,
wide: /^(يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/,
};
const parseMonthPatterns = {
narrow: [
/^ي/i,
/^ف/i,
/^م/i,
/^أ/i,
/^م/i,
/^ي/i,
/^ي/i,
/^أ/i,
/^س/i,
/^أ/i,
/^ن/i,
/^د/i,
],
any: [
/^يناير/i,
/^فبراير/i,
/^مارس/i,
/^أبريل/i,
/^مايو/i,
/^يونيو/i,
/^يوليو/i,
/^أغسطس/i,
/^سبتمبر/i,
/^أكتوبر/i,
/^نوفمبر/i,
/^ديسمبر/i,
],
};
const matchDayPatterns = {
narrow: /^[حنثرخجس]/i,
short: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
abbreviated: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
wide: /^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i,
};
const parseDayPatterns = {
narrow: [/^ح/i, /^ن/i, /^ث/i, /^ر/i, /^خ/i, /^ج/i, /^س/i],
wide: [
/^الأحد/i,
/^الاثنين/i,
/^الثلاثاء/i,
/^الأربعاء/i,
/^الخميس/i,
/^الجمعة/i,
/^السبت/i,
],
any: [/^أح/i, /^اث/i, /^ث/i, /^أر/i, /^خ/i, /^ج/i, /^س/i],
};
const matchDayPeriodPatterns = {
narrow: /^(ص|م|منتصف الليل|الظهر|بعد الظهر|في الصباح|في المساء|في الليل)/,
any: /^(ص|م|منتصف الليل|الظهر|بعد الظهر|في الصباح|في المساء|في الليل)/,
};
const parseDayPeriodPatterns = {
any: {
am: /^ص/,
pm: /^م/,
midnight: /منتصف الليل/,
noon: /الظهر/,
afternoon: /بعد الظهر/,
morning: /في الصباح/,
evening: /في المساء/,
night: /في الليل/,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index2.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index2.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index2.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index2.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index2.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

143
node_modules/date-fns/locale/ar/_lib/match.mjs generated vendored Normal file
View File

@@ -0,0 +1,143 @@
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.mjs";
import { buildMatchFn } from "../../_lib/buildMatchFn.mjs";
const matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /[قب]/,
abbreviated: /[قب]\.م\./,
wide: /(قبل|بعد) الميلاد/,
};
const parseEraPatterns = {
any: [/قبل/, /بعد/],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /ر[1234]/,
wide: /الربع (الأول|الثاني|الثالث|الرابع)/,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[أيفمسند]/,
abbreviated:
/^(يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/,
wide: /^(يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/,
};
const parseMonthPatterns = {
narrow: [
/^ي/i,
/^ف/i,
/^م/i,
/^أ/i,
/^م/i,
/^ي/i,
/^ي/i,
/^أ/i,
/^س/i,
/^أ/i,
/^ن/i,
/^د/i,
],
any: [
/^يناير/i,
/^فبراير/i,
/^مارس/i,
/^أبريل/i,
/^مايو/i,
/^يونيو/i,
/^يوليو/i,
/^أغسطس/i,
/^سبتمبر/i,
/^أكتوبر/i,
/^نوفمبر/i,
/^ديسمبر/i,
],
};
const matchDayPatterns = {
narrow: /^[حنثرخجس]/i,
short: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
abbreviated: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
wide: /^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i,
};
const parseDayPatterns = {
narrow: [/^ح/i, /^ن/i, /^ث/i, /^ر/i, /^خ/i, /^ج/i, /^س/i],
wide: [
/^الأحد/i,
/^الاثنين/i,
/^الثلاثاء/i,
/^الأربعاء/i,
/^الخميس/i,
/^الجمعة/i,
/^السبت/i,
],
any: [/^أح/i, /^اث/i, /^ث/i, /^أر/i, /^خ/i, /^ج/i, /^س/i],
};
const matchDayPeriodPatterns = {
narrow: /^(ص|م|منتصف الليل|الظهر|بعد الظهر|في الصباح|في المساء|في الليل)/,
any: /^(ص|م|منتصف الليل|الظهر|بعد الظهر|في الصباح|في المساء|في الليل)/,
};
const parseDayPeriodPatterns = {
any: {
am: /^ص/,
pm: /^م/,
midnight: /منتصف الليل/,
noon: /الظهر/,
afternoon: /بعد الظهر/,
morning: /في الصباح/,
evening: /في المساء/,
night: /في الليل/,
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};