{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// src/Dat.ts\nimport { type Locale } from \"./locales\";\n\nexport type DurationUnit =\n  | \"second\"\n  | \"minute\"\n  | \"hour\"\n  | \"day\"\n  | \"week\"\n  | \"month\"\n  | \"year\";\n\nexport class Dat {\n  /**\n   * A map that associates units with their corresponding duration calculation methods.\n   */\n  static unitCalculators = new Map<\n    DurationUnit,\n    (firstDate: Date, secondDate: Date) => number\n  >([\n    [\"second\", Dat.secondsBetween],\n    [\"minute\", Dat.minutesBetween],\n    [\"hour\", Dat.hoursBetween],\n    [\"day\", Dat.daysBetween],\n    [\"week\", Dat.weeksBetween],\n    [\"month\", Dat.monthsBetween],\n    [\"year\", Dat.yearsBetween],\n  ]);\n\n  /**\n   * Calculates the duration from now to a future date in the specified unit.\n   * @param {Date} futureDate - The future date to compare against the current date.\n   * @param {DurationUnit} unit - The unit of time to return the duration in.\n   * @returns {number} - The duration in the specified unit.\n   */\n  static durationFromNow(futureDate: Date, unit: DurationUnit): number {\n    const now = new Date();\n    return this.calculateDuration(now, futureDate, unit);\n  }\n\n  /**\n   * Calculates the duration from a past date to now in the specified unit.\n   * @param {Date} pastDate - The past date to compare against the current date.\n   * @param {DurationUnit} unit - The unit of time to return the duration in.\n   * @returns {number} - The duration in the specified unit.\n   */\n  static durationToNow(pastDate: Date, unit: DurationUnit): number {\n    const now = new Date();\n    return this.calculateDuration(pastDate, now, unit);\n  }\n\n  /**\n   * Formats a date using Intl.DateTimeFormat with the specified locale and options.\n   * @param {Date} date - The date to format.\n   * @param {Intl.DateTimeFormatOptions & { locale?: Locale }} [options] - Optional Intl.DateTimeFormat options for custom formatting and locale code (e.g., 'en-US' or 'fr-FR').\n   * @returns {string} - The formatted date string.\n   * @example\n   * const formattedDate = Dat.formatDate(new Date(), { dateStyle: 'long', locale: 'fr-FR' });\n   * console.log(formattedDate); // e.g., \"30 Octobre, 2023\"\n   */\n\n  static formatDate(\n    date: Date,\n    options: Intl.DateTimeFormatOptions & { locale?: Locale } = { locale: \"en-US\" }\n  ): string {\n    const { locale, ...restOptions } = options;\n\n    return new Intl.DateTimeFormat(locale, restOptions).format(date);\n  }\n\n  /**\n   * Formats a duration using Intl.RelativeTimeFormat and formatToParts.\n   * @param {number} value - The duration value (positive or negative).\n   * @param {DurationUnit} unit - The unit of time for the duration.\n   * @param {Intl.RelativeTimeFormatOptions & { locale?: Locale }} [options] - Options for Intl.RelativeTimeFormat and the locale for formatting.\n   * @returns {string} - The formatted duration string.\n   * @example\n   * const durationString = Dat.formatDuration(-2, 'day', 'fr-FR');\n   * console.log(durationString); // e.g., \"il y a 2 jours\" (French locale)\n   */\n  static formatDuration(\n    value: number,\n    unit: DurationUnit,\n    options: Intl.RelativeTimeFormatOptions & { locale?: Locale } = { locale: \"en-US\" }\n  ): string {\n    const { locale, ...restOptions } = options;\n    const rtf = new Intl.RelativeTimeFormat(locale, restOptions);\n    const parts = rtf.formatToParts(value, unit);\n\n    // Combine the parts to form the final formatted string\n    return parts.map((part) => part.value).join(\"\");\n  }\n\n  /**\n   * Helper function to calculate the duration between two dates in the specified unit.\n   * Uses a map to retrieve the appropriate calculation function.\n   * @param {Date} firstDate - The first date for the duration calculation.\n   * @param {Date} secondDate - The second date for the duration calculation.\n   * @param {DurationUnit} unit - The unit of time to return the duration in.\n   * @returns {number} - The duration in the specified unit.\n   * @example\n   * const daysBetween = Dat.calculateDuration(new Date('2023-01-01'), new Date('2023-01-03'), 'day'); // Returns 2\n   */\n  static calculateDuration(\n    firstDate: Date,\n    secondDate: Date,\n    unit: DurationUnit\n  ): number {\n    const calculator = this.unitCalculators.get(unit);\n    if (!calculator) {\n      throw new Error(`Unknown unit: ${unit}`);\n    }\n    const formattedResult = calculator(firstDate, secondDate).toFixed(2);\n    return Number(formattedResult);\n  }\n\n  // Dates comparaison methods\n\n  /**\n   * Checks if the first date comes after the second date.\n   * @param {Date} firstDate The date to check.\n   * @param {Date} secondDate The date to compare against.\n   * @returns {boolean} True if firstDate comes after secondDate, false otherwise.\n   * @example\n   * const date1 = new Date('2022-01-01');\n   * const date2 = new Date('2022-01-02');\n   * console.log(isAfter(date1, date2)); // false\n   * console.log(isAfter(date2, date1)); // true\n   */\n  static isAfter(firstDate: Date, secondDate: Date): boolean {\n    return firstDate.getTime() > secondDate.getTime();\n  }\n\n  /**\n   * Checks if the first date comes before the second date.\n   * @param {Date} firstDate The date to check.\n   * @param {Date} secondDate The date to compare against.\n   * @returns {boolean} True if firstDate comes before secondDate, false otherwise.\n   * @example\n   * const date1 = new Date('2022-01-01');\n   * const date2 = new Date('2022-01-02');\n   * console.log(isBefore(date1, date2)); // true\n   * console.log(isBefore(date2, date1)); // false\n   */\n  static isBefore(firstDate: Date, secondDate: Date): boolean {\n    return firstDate.getTime() < secondDate.getTime();\n  }\n\n  /**\n   * Checks if two dates are the same.\n   * @param {Date} firstDate The first date to compare.\n   * @param {Date} secondDate The second date to compare.\n   * @returns {boolean} True if the two dates are the same, false otherwise.\n   * @example\n   * const date1 = new Date('2022-01-01');\n   * const date2 = new Date('2022-01-01');\n   * console.log(isSame(date1, date2)); // true\n   * const date3 = new Date('2022-01-02');\n   * console.log(isSame(date1, date3)); // false\n   */\n  static isSame(firstDate: Date, secondDate: Date): boolean {\n    return firstDate.getTime() === secondDate.getTime();\n  }\n\n  /**\n   * Checks if two dates have the same value based on the specified unit.\n   *\n   * @param {Date} firstDate The first date to compare.\n   * @param {Date} secondDate The second date to compare.\n   * @param {DurationUnit} unit The unit to compare.\n   * @returns {boolean} True if the two dates have the same value for the specified unit, false otherwise.\n   * @example\n   * const date1 = new Date('2022-01-01');\n   * const date2 = new Date('2022-01-02');\n   * console.log(hasSame(date1, date2, 'month')); // true\n   * console.log(hasSame(date1, date2, 'day')); // false\n   * console.log(hasSame(date1, date2, 'week')); // true\n   */\n  static hasSame(\n    firstDate: Date,\n    secondDate: Date,\n    unit: DurationUnit\n  ): boolean {\n    switch (unit) {\n      case \"year\":\n        return firstDate.getFullYear() === secondDate.getFullYear();\n      case \"month\":\n        return firstDate.getMonth() === secondDate.getMonth();\n      case \"day\":\n        return firstDate.getDate() === secondDate.getDate();\n      case \"hour\":\n        return firstDate.getHours() === secondDate.getHours();\n      case \"minute\":\n        return firstDate.getMinutes() === secondDate.getMinutes();\n      case \"second\":\n        return firstDate.getSeconds() === secondDate.getSeconds();\n      case \"week\":\n        const firstDayOfWeek = (date: Date) => {\n          const dayOfWeek = date.getDay() || 7;\n          if (dayOfWeek === 1) {\n            return date;\n          } else {\n            const diff = date.getDate() - dayOfWeek + 1;\n            return new Date(date.setDate(diff));\n          }\n        };\n        return (\n          firstDayOfWeek(firstDate).getTime() ===\n          firstDayOfWeek(secondDate).getTime()\n        );\n      default:\n        throw new Error(`Invalid unit: ${unit}`);\n    }\n  }\n\n  /**\n   * Checks if the unit value of the first date comes before the unit value of the second date.\n   * @param {Date} firstDate The first date to compare.\n   * @param {Date} secondDate The second date to compare.\n   * @param {DurationUnit} unit The unit to compare.\n   * @returns {boolean} True if the first date comes before the second date for the specified unit, false otherwise.\n   * @example\n   * const date1 = new Date('2022-01-01');\n   * const date2 = new Date('2022-01-02');\n   * console.log(hasBefore(date1, date2, 'day')); // true\n   * console.log(hasBefore(date1, date2, 'month')); // false\n   */\n  static hasBefore(\n    firstDate: Date,\n    secondDate: Date,\n    unit: DurationUnit\n  ): boolean {\n    switch (unit) {\n      case \"year\":\n        return firstDate.getFullYear() < secondDate.getFullYear();\n      case \"month\":\n        return firstDate.getMonth() < secondDate.getMonth();\n      case \"day\":\n        return firstDate.getDate() < secondDate.getDate();\n      case \"hour\":\n        return firstDate.getHours() < secondDate.getHours();\n      case \"minute\":\n        return firstDate.getMinutes() < secondDate.getMinutes();\n      case \"second\":\n        return firstDate.getSeconds() < secondDate.getSeconds();\n      case \"week\":\n        const firstDayOfWeek = (date: Date) => {\n          const dayOfWeek = date.getDay() || 7;\n          if (dayOfWeek === 1) {\n            return date;\n          } else {\n            const diff = date.getDate() - dayOfWeek + 1;\n            return new Date(date.setDate(diff));\n          }\n        };\n        return (\n          firstDayOfWeek(firstDate).getTime() <\n          firstDayOfWeek(secondDate).getTime()\n        );\n      default:\n        throw new Error(`Invalid unit: ${unit}`);\n    }\n  }\n\n  /**\n   * Checks if the unit value of the first date comes after the unit value of the second date.\n   * @param {Date} firstDate The first date to compare.\n   * @param {Date} secondDate The second date to compare.\n   * @param {DurationUnit} unit The unit to compare.\n   * @returns {boolean} True if the first date comes after the second date for the specified unit, false otherwise.\n   * @example\n   * const date1 = new Date('2022-01-01');\n   * const date2 = new Date('2022-01-02');\n   * console.log(hasAfter(date1, date2, 'day')); // false\n   * console.log(hasAfter(date1, date2, 'month')); // false\n   */\n  static hasAfter(\n    firstDate: Date,\n    secondDate: Date,\n    unit: DurationUnit\n  ): boolean {\n    switch (unit) {\n      case \"year\":\n        return firstDate.getFullYear() > secondDate.getFullYear();\n      case \"month\":\n        return firstDate.getMonth() > secondDate.getMonth();\n      case \"day\":\n        return firstDate.getDate() > secondDate.getDate();\n      case \"hour\":\n        return firstDate.getHours() > secondDate.getHours();\n      case \"minute\":\n        return firstDate.getMinutes() > secondDate.getMinutes();\n      case \"second\":\n        return firstDate.getSeconds() > secondDate.getSeconds();\n      case \"week\":\n        const firstDayOfWeek = (date: Date) => {\n          const dayOfWeek = date.getDay() || 7;\n          if (dayOfWeek === 1) {\n            return date;\n          } else {\n            const diff = date.getDate() - dayOfWeek + 1;\n            return new Date(date.setDate(diff));\n          }\n        };\n        return (\n          firstDayOfWeek(firstDate).getTime() >\n          firstDayOfWeek(secondDate).getTime()\n        );\n      default:\n        throw new Error(`Invalid unit: ${unit}`);\n    }\n  }\n\n  // Time manipulation helper methods\n\n  /**\n   * Adds the specified number of seconds to the given date.\n   * @param {Date} date - The date to add seconds to.\n   * @param {number} seconds - The number of seconds to add.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.addSeconds(new Date(), 30);\n   * console.log(result); // e.g., \"2023-01-01T00:00:30.000Z\"\n   */\n  static addSeconds(date: Date, seconds: number): Date {\n    const result = new Date(date);\n    result.setSeconds(result.getSeconds() + seconds);\n    return result;\n  }\n\n  /**\n   * Adds the specified number of minutes to the given date.\n   * @param {Date} date - The date to add minutes to.\n   * @param {number} minutes - The number of minutes to add.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.addMinutes(new Date(), 22);\n   * console.log(result); // e.g., \"2023-01-01T00:22:00.000Z\"\n   */\n  static addMinutes(date: Date, minutes: number): Date {\n    const result = new Date(date);\n    result.setMinutes(result.getMinutes() + minutes);\n    return result;\n  }\n\n  /**\n   * Adds the specified number of hours to the given date.\n   * @param {Date} date - The date to add hours to.\n   * @param {number} hours - The number of hours to add.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.addHours(new Date(), 4);\n   * console.log(result); // e.g., \"2023-01-01T04:00:00.000Z\"\n   */\n  static addHours(date: Date, hours: number): Date {\n    const result = new Date(date);\n    result.setHours(result.getHours() + hours);\n    return result;\n  }\n\n  /**\n   * Adds the specified number of days to the given date.\n   * @param {Date} date - The date to add days to.\n   * @param {number} days - The number of days to add.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.addDays(new Date('2023-01-01'), 2);\n   * console.log(result); // e.g., \"2023-01-03T00:00:00.000Z\"\n   */\n  static addDays(date: Date, days: number): Date {\n    const result = new Date(date);\n    result.setDate(result.getDate() + days);\n    return result;\n  }\n\n  /**\n   * Adds a specified number of weeks to a given date.\n   *\n   * @param {Date} date - The date to which the weeks will be added.\n   * @param {number} weeks - The number of weeks to add.\n   * @returns {Date} - The new date after adding the specified number of weeks.\n   *\n   * @example\n   * const newDate = addWeeks(new Date('2022-01-01'), 2);\n   * console.log(newDate); // \"2022-01-15\"\n   */\n  static addWeeks(date: Date, weeks: number): Date {\n    const millisecondsInWeek = 7 * 24 * 60 * 60 * 1000;\n    const newDate = new Date(date.getTime() + weeks * millisecondsInWeek);\n    return newDate;\n  }\n\n  /**\n   * Adds the specified number of months to the given date.\n   * @param {Date} date - The date to add months to.\n   * @param {number} months - The number of months to add.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.addMonths(new Date('2023-01-01'), 3);\n   * console.log(result); // e.g., \"2023-04-01T00:00:00.000Z\"\n   */\n  static addMonths(date: Date, months: number): Date {\n    const result = new Date(date);\n    result.setMonth(result.getMonth() + months);\n    return result;\n  }\n\n  /**\n   * Adds the specified number of years to the given date.\n   * @param {Date} date - The date to add years to.\n   * @param {number} years - The number of years to add.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.addYears(new Date('2023-01-01'), 2);\n   * console.log(result); // e.g., \"2025-01-01T00:00:00.000Z\"\n   */\n  static addYears(date: Date, years: number): Date {\n    const result = new Date(date);\n    result.setFullYear(result.getFullYear() + years);\n    return result;\n  }\n\n  /**\n   * Subtracts the specified number of seconds from the given date.\n   * @param {Date} date - The date to subtract seconds from.\n   * @param {number} seconds - The number of seconds to subtract.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.subtractSeconds(new Date('2023-01-01T12:00:00.000Z'), 30);\n   * console.log(result); // e.g., \"2023-01-01T11:59:30.000Z\"\n   */\n  static subtractSeconds(date: Date, seconds: number): Date {\n    return Dat.addSeconds(date, -seconds);\n  }\n\n  /**\n   * Subtracts the specified number of minutes from the given date.\n   * @param {Date} date - The date to subtract minutes from.\n   * @param {number} minutes - The number of minutes to subtract.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.subtractMinutes(new Date('2023-01-01T12:00:00.000Z'), 15);\n   * console.log(result); // e.g., \"2023-01-01T11:45:00.000Z\"\n   */\n  static subtractMinutes(date: Date, minutes: number): Date {\n    return Dat.addMinutes(date, -minutes);\n  }\n\n  /**\n   * Subtracts the specified number of hours from the given date.\n   * @param {Date} date - The date to subtract hours from.\n   * @param {number} hours - The number of hours to subtract.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.subtractHours(new Date('2023-01-01T12:00:00.000Z'), 2);\n   * console.log(result); // e.g., \"2023-01-01T10:00:00.000Z\"\n   */\n  static subtractHours(date: Date, hours: number): Date {\n    return Dat.addHours(date, -hours);\n  }\n\n  /**\n   * Subtracts the specified number of days from the given date.\n   * @param {Date} date - The date to subtract days from.\n   * @param {number} days - The number of days to subtract.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.subtractDays(new Date('2023-01-01T00:00:00.000Z'), 3);\n   * console.log(result); // e.g., \"2022-12-29T00:00:00.000Z\"\n   */\n  static subtractDays(date: Date, days: number): Date {\n    return Dat.addDays(date, -days);\n  }\n\n  /**\n   * Subtracts the specified number of weeks from the given date.\n   * @param {Date} date - The date to subtract weeks from.\n   * @param {number} weeks - The number of weeks to subtract.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.subtractWeeks(new Date('2023-01-01T00:00:00.000Z'), 2);\n   * console.log(result); // e.g., \"2022-12-18T00:00:00.000Z\"\n   */\n  static subtractWeeks(date: Date, weeks: number): Date {\n    return Dat.addWeeks(date, -weeks);\n  }\n\n  /**\n   * Subtracts the specified number of months from the given date.\n   * @param {Date} date - The date to subtract months from.\n   * @param {number} months - The number of months to subtract.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.subtractMonths(new Date('2023-01-01T00:00:00.000Z'), 3);\n   * console.log(result); // e.g., \"2022-10-01T00:00:00.000Z\"\n   */\n  static subtractMonths(date: Date, months: number): Date {\n    return Dat.addMonths(date, -months);\n  }\n\n  /**\n   * Subtracts the specified number of years from the given date.\n   * @param {Date} date - The date to subtract years from.\n   * @param {number} years - The number of years to subtract.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.subtractYears(new Date('2023-01-01T00:00:00.000Z'), 5);\n   * console.log(result); // e.g., \"2018-01-01T00:00:00.000Z\"\n   */\n  static subtractYears(date: Date, years: number): Date {\n    return Dat.addYears(date, -years);\n  }\n\n  // Duration calculation helper methods\n\n  /**\n   * Calculates the number of seconds between two dates.\n   * @param {Date} firstDate - The first date for the calculation.\n   * @param {Date} secondDate - The second date for the calculation.\n   * @returns {number} - The number of seconds between the two dates.\n   * @example\n   * const seconds = Dat.secondsBetween(new Date('2023-01-01T00:00:00Z'), new Date('2023-01-01T00:01:40Z'));\n   * console.log(seconds); // 100\n   */\n  static secondsBetween(firstDate: Date, secondDate: Date): number {\n    const msPerSecond = 1000;\n    return Math.abs((secondDate.getTime() - firstDate.getTime()) / msPerSecond);\n  }\n\n  /**\n   * Calculates the number of minutes between two dates.\n   * @param {Date} firstDate - The first date for the calculation.\n   * @param {Date} secondDate - The second date for the calculation.\n   * @returns {number} - The number of minutes between the two dates.\n   * @example\n   * const minutes = Dat.minutesBetween(new Date('2023-01-01T00:00:00Z'), new Date('2023-01-01T00:01:40Z'));\n   * console.log(minutes); // 1.67\n   */\n  static minutesBetween(firstDate: Date, secondDate: Date): number {\n    const msPerMinute = 60 * 1000;\n    return Math.abs((secondDate.getTime() - firstDate.getTime()) / msPerMinute);\n  }\n\n  /**\n   * Calculates the number of hours between two dates.\n   * @param {Date} firstDate - The first date for the calculation.\n   * @param {Date} secondDate - The second date for the calculation.\n   * @returns {number} - The number of hours between the two dates.\n   * @example\n   * const hours = Dat.hoursBetween(new Date('2023-01-01T00:00:00Z'), new Date('2023-01-01T01:40:00Z'));\n   * console.log(hours); // 1.67\n   */\n  static hoursBetween(firstDate: Date, secondDate: Date): number {\n    const msPerHour = 60 * 60 * 1000;\n    return Math.abs((secondDate.getTime() - firstDate.getTime()) / msPerHour);\n  }\n\n  /**\n   * Calculates the number of days between two dates.\n   * @param {Date} firstDate - The first date for the calculation.\n   * @param {Date} secondDate - The second date for the calculation.\n   * @returns {number} - The number of days between the two dates.\n   * @example\n   * const days = Dat.daysBetween(new Date('2023-01-01'), new Date('2023-01-03'));\n   * console.log(days); // 2\n   */\n  static daysBetween(firstDate: Date, secondDate: Date): number {\n    const msPerDay = 24 * 60 * 60 * 1000;\n    return Math.abs((secondDate.getTime() - firstDate.getTime()) / msPerDay);\n  }\n\n  /**\n   * Calculates the number of weeks between two dates.\n   * @param {Date} firstDate - The first date for the calculation.\n   * @param {Date} secondDate - The second date for the calculation.\n   * @returns {number} - The number of weeks between the two dates.\n   * @example\n   * const weeks = Dat.weeksBetween(new Date('2023-01-01'), new Date('2023-01-15'));\n   * console.log(weeks); // 2\n   */\n  static weeksBetween(firstDate: Date, secondDate: Date): number {\n    const millisecondsInWeek = 7 * 24 * 60 * 60 * 1000;\n    const diffInMilliseconds = secondDate.getTime() - firstDate.getTime();\n    return Math.abs(Math.round(diffInMilliseconds / millisecondsInWeek));\n  }\n\n  /**\n   * Calculates the number of months between two dates.\n   * @param {Date} firstDate - The first date for the calculation.\n   * @param {Date} secondDate - The second date for the calculation.\n   * @returns {number} - The number of months between the two dates.\n   * @example\n   * const months = Dat.monthsBetween(new Date('2023-01-01'), new Date('2023-03-01'));\n   * console.log(months); // 2\n   */\n  static monthsBetween(firstDate: Date, secondDate: Date): number {\n    return Math.abs(\n      (secondDate.getFullYear() - firstDate.getFullYear()) * 12 +\n        (secondDate.getMonth() - firstDate.getMonth())\n    );\n  }\n\n  /**\n   * Calculates the number of years between two dates.\n   * @param {Date} firstDate - The first date for the calculation.\n   * @param {Date} secondDate - The second date for the calculation.\n   * @returns {number} - The number of years between the two dates.\n   * @example\n   * const years = Dat.yearsBetween(new Date('2020-01-01'), new Date('2023-01-01'));\n   * console.log(years); // 3\n   */\n  static yearsBetween(firstDate: Date, secondDate: Date): number {\n    return Math.abs(secondDate.getFullYear() - firstDate.getFullYear());\n  }\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAYO,IAAM,MAAN,MAAM,KAAI;AAAA;AAAA;AAAA;AAAA,EAIf,OAAO,kBAAkB,oBAAI,IAG3B;AAAA,IACA,CAAC,UAAU,KAAI,cAAc;AAAA,IAC7B,CAAC,UAAU,KAAI,cAAc;AAAA,IAC7B,CAAC,QAAQ,KAAI,YAAY;AAAA,IACzB,CAAC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