{"version":3,"file":"Course.da44f360.js","sources":["node_modules/date-fns-tz/esm/_lib/tzIntlTimeZoneName/index.js","node_modules/date-fns-tz/esm/_lib/tzTokenizeDate/index.js","node_modules/date-fns-tz/esm/_lib/tzParseTimezone/index.js","node_modules/date-fns-tz/esm/format/formatters/index.js","node_modules/date-fns-tz/esm/toDate/index.js","node_modules/date-fns-tz/esm/format/index.js","node_modules/date-fns-tz/esm/utcToZonedTime/index.js","app/assets/vite/stores/Event.ts","app/assets/vite/stores/Course.ts"],"sourcesContent":["/**\n * Returns the formatted time zone name of the provided `timeZone` or the current\n * system time zone if omitted, accounting for DST according to the UTC value of\n * the date.\n */\nexport default function tzIntlTimeZoneName(length, date, options) {\n var dtf = getDTF(length, options.timeZone, options.locale)\n return dtf.formatToParts ? partsTimeZone(dtf, date) : hackyTimeZone(dtf, date)\n}\n\nfunction partsTimeZone(dtf, date) {\n var formatted = dtf.formatToParts(date)\n return formatted[formatted.length - 1].value\n}\n\nfunction hackyTimeZone(dtf, date) {\n var formatted = dtf.format(date).replace(/\\u200E/g, '')\n var tzNameMatch = / [\\w-+ ]+$/.exec(formatted)\n return tzNameMatch ? tzNameMatch[0].substr(1) : ''\n}\n\n// If a locale has been provided `en-US` is used as a fallback in case it is an\n// invalid locale, otherwise the locale is left undefined to use the system locale.\nfunction getDTF(length, timeZone, locale) {\n if (locale && !locale.code) {\n throw new Error(\n \"date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`\"\n )\n }\n return new Intl.DateTimeFormat(locale ? [locale.code, 'en-US'] : undefined, {\n timeZone: timeZone,\n timeZoneName: length,\n })\n}\n","/**\n * Returns the [year, month, day, hour, minute, seconds] tokens of the provided\n * `date` as it will be rendered in the `timeZone`.\n */\nexport default function tzTokenizeDate(date, timeZone) {\n var dtf = getDateTimeFormat(timeZone)\n return dtf.formatToParts ? partsOffset(dtf, date) : hackyOffset(dtf, date)\n}\n\nvar typeToPos = {\n year: 0,\n month: 1,\n day: 2,\n hour: 3,\n minute: 4,\n second: 5,\n}\n\nfunction partsOffset(dtf, date) {\n var formatted = dtf.formatToParts(date)\n var filled = []\n for (var i = 0; i < formatted.length; i++) {\n var pos = typeToPos[formatted[i].type]\n\n if (pos >= 0) {\n filled[pos] = parseInt(formatted[i].value, 10)\n }\n }\n return filled\n}\n\nfunction hackyOffset(dtf, date) {\n var formatted = dtf.format(date).replace(/\\u200E/g, '')\n var parsed = /(\\d+)\\/(\\d+)\\/(\\d+),? (\\d+):(\\d+):(\\d+)/.exec(formatted)\n // var [, fMonth, fDay, fYear, fHour, fMinute, fSecond] = parsed\n // return [fYear, fMonth, fDay, fHour, fMinute, fSecond]\n return [parsed[3], parsed[1], parsed[2], parsed[4], parsed[5], parsed[6]]\n}\n\n// Get a cached Intl.DateTimeFormat instance for the IANA `timeZone`. This can be used\n// to get deterministic local date/time output according to the `en-US` locale which\n// can be used to extract local time parts as necessary.\nvar dtfCache = {}\nfunction getDateTimeFormat(timeZone) {\n if (!dtfCache[timeZone]) {\n // New browsers use `hourCycle`, IE and Chrome <73 does not support it and uses `hour12`\n var testDateFormatted = new Intl.DateTimeFormat('en-US', {\n hour12: false,\n timeZone: 'America/New_York',\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n }).format(new Date('2014-06-25T04:00:00.123Z'))\n var hourCycleSupported =\n testDateFormatted === '06/25/2014, 00:00:00' ||\n testDateFormatted === '‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00'\n\n dtfCache[timeZone] = hourCycleSupported\n ? new Intl.DateTimeFormat('en-US', {\n hour12: false,\n timeZone: timeZone,\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n })\n : new Intl.DateTimeFormat('en-US', {\n hourCycle: 'h23',\n timeZone: timeZone,\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n })\n }\n return dtfCache[timeZone]\n}\n","import tzTokenizeDate from '../tzTokenizeDate/index.js'\n\nvar MILLISECONDS_IN_HOUR = 3600000\nvar MILLISECONDS_IN_MINUTE = 60000\n\nvar patterns = {\n timezone: /([Z+-].*)$/,\n timezoneZ: /^(Z)$/,\n timezoneHH: /^([+-])(\\d{2})$/,\n timezoneHHMM: /^([+-])(\\d{2}):?(\\d{2})$/,\n timezoneIANA: /(UTC|(?:[a-zA-Z]+\\/[a-zA-Z_-]+(?:\\/[a-zA-Z_]+)?))$/,\n}\n\n// Parse various time zone offset formats to an offset in milliseconds\nexport default function tzParseTimezone(timezoneString, date, isUtcDate) {\n var token\n var absoluteOffset\n\n // Z\n token = patterns.timezoneZ.exec(timezoneString)\n if (token) {\n return 0\n }\n\n var hours\n\n // ±hh\n token = patterns.timezoneHH.exec(timezoneString)\n if (token) {\n hours = parseInt(token[2], 10)\n\n if (!validateTimezone(hours)) {\n return NaN\n }\n\n absoluteOffset = hours * MILLISECONDS_IN_HOUR\n return token[1] === '+' ? -absoluteOffset : absoluteOffset\n }\n\n // ±hh:mm or ±hhmm\n token = patterns.timezoneHHMM.exec(timezoneString)\n if (token) {\n hours = parseInt(token[2], 10)\n var minutes = parseInt(token[3], 10)\n\n if (!validateTimezone(hours, minutes)) {\n return NaN\n }\n\n absoluteOffset = hours * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE\n return token[1] === '+' ? -absoluteOffset : absoluteOffset\n }\n\n // IANA time zone\n token = patterns.timezoneIANA.exec(timezoneString)\n if (token) {\n date = new Date(date || Date.now())\n var utcDate = isUtcDate ? date : toUtcDate(date)\n\n var offset = calcOffset(utcDate, timezoneString)\n\n var fixedOffset = isUtcDate ? offset : fixOffset(date, offset, timezoneString)\n\n return -fixedOffset\n }\n\n return 0\n}\n\nfunction toUtcDate(date) {\n return new Date(\n Date.UTC(\n date.getFullYear(),\n date.getMonth(),\n date.getDate(),\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds()\n )\n )\n}\n\nfunction calcOffset(date, timezoneString) {\n var tokens = tzTokenizeDate(date, timezoneString)\n\n var asUTC = Date.UTC(tokens[0], tokens[1] - 1, tokens[2], tokens[3] % 24, tokens[4], tokens[5])\n\n var asTS = date.getTime()\n var over = asTS % 1000\n asTS -= over >= 0 ? over : 1000 + over\n return asUTC - asTS\n}\n\nfunction fixOffset(date, offset, timezoneString) {\n var localTS = date.getTime()\n\n // Our UTC time is just a guess because our offset is just a guess\n var utcGuess = localTS - offset\n\n // Test whether the zone matches the offset for this ts\n var o2 = calcOffset(new Date(utcGuess), timezoneString)\n\n // If so, offset didn't change and we're done\n if (offset === o2) {\n return offset\n }\n\n // If not, change the ts by the difference in the offset\n utcGuess -= o2 - offset\n\n // If that gives us the local time we want, we're done\n var o3 = calcOffset(new Date(utcGuess), timezoneString)\n if (o2 === o3) {\n return o2\n }\n\n // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time\n return Math.max(o2, o3)\n}\n\nfunction validateTimezone(hours, minutes) {\n if (minutes != null && (minutes < 0 || minutes > 59)) {\n return false\n }\n\n return true\n}\n","import tzIntlTimeZoneName from '../../_lib/tzIntlTimeZoneName'\nimport tzParseTimezone from '../../_lib/tzParseTimezone'\n\nvar MILLISECONDS_IN_MINUTE = 60 * 1000\n\nvar formatters = {\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, localize, options) {\n var originalDate = options._originalDate || date\n var timezoneOffset = options.timeZone\n ? tzParseTimezone(options.timeZone, originalDate) / MILLISECONDS_IN_MINUTE\n : originalDate.getTimezoneOffset()\n\n if (timezoneOffset === 0) {\n return 'Z'\n }\n\n switch (token) {\n // Hours and optional minutes\n case 'X':\n return formatTimezoneWithOptionalMinutes(timezoneOffset)\n\n // Hours, minutes and optional seconds without `:` delimeter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n case 'XXXX':\n case 'XX': // Hours and minutes without `:` delimeter\n return formatTimezone(timezoneOffset)\n\n // Hours, minutes and optional seconds with `:` delimeter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n case 'XXXXX':\n case 'XXX': // Hours and minutes with `:` delimeter\n default:\n return formatTimezone(timezoneOffset, ':')\n }\n },\n\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, localize, options) {\n var originalDate = options._originalDate || date\n var timezoneOffset = options.timeZone\n ? tzParseTimezone(options.timeZone, originalDate) / MILLISECONDS_IN_MINUTE\n : originalDate.getTimezoneOffset()\n\n switch (token) {\n // Hours and optional minutes\n case 'x':\n return formatTimezoneWithOptionalMinutes(timezoneOffset)\n\n // Hours, minutes and optional seconds without `:` delimeter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n case 'xxxx':\n case 'xx': // Hours and minutes without `:` delimeter\n return formatTimezone(timezoneOffset)\n\n // Hours, minutes and optional seconds with `:` delimeter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n case 'xxxxx':\n case 'xxx': // Hours and minutes with `:` delimeter\n default:\n return formatTimezone(timezoneOffset, ':')\n }\n },\n\n // Timezone (GMT)\n O: function (date, token, localize, options) {\n var originalDate = options._originalDate || date\n var timezoneOffset = options.timeZone\n ? tzParseTimezone(options.timeZone, originalDate) / MILLISECONDS_IN_MINUTE\n : originalDate.getTimezoneOffset()\n\n switch (token) {\n // Short\n case 'O':\n case 'OO':\n case 'OOO':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':')\n // Long\n case 'OOOO':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':')\n }\n },\n\n // Timezone (specific non-location)\n z: function (date, token, localize, options) {\n var originalDate = options._originalDate || date\n\n switch (token) {\n // Short\n case 'z':\n case 'zz':\n case 'zzz':\n return tzIntlTimeZoneName('short', originalDate, options)\n // Long\n case 'zzzz':\n default:\n return tzIntlTimeZoneName('long', originalDate, options)\n }\n },\n}\n\nfunction addLeadingZeros(number, targetLength) {\n var sign = number < 0 ? '-' : ''\n var output = Math.abs(number).toString()\n while (output.length < targetLength) {\n output = '0' + output\n }\n return sign + output\n}\n\nfunction formatTimezone(offset, dirtyDelimeter) {\n var delimeter = dirtyDelimeter || ''\n var sign = offset > 0 ? '-' : '+'\n var absOffset = Math.abs(offset)\n var hours = addLeadingZeros(Math.floor(absOffset / 60), 2)\n var minutes = addLeadingZeros(absOffset % 60, 2)\n return sign + hours + delimeter + minutes\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, dirtyDelimeter) {\n if (offset % 60 === 0) {\n var sign = offset > 0 ? '-' : '+'\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2)\n }\n return formatTimezone(offset, dirtyDelimeter)\n}\n\nfunction formatTimezoneShort(offset, dirtyDelimeter) {\n var sign = offset > 0 ? '-' : '+'\n var absOffset = Math.abs(offset)\n var hours = Math.floor(absOffset / 60)\n var minutes = absOffset % 60\n if (minutes === 0) {\n return sign + String(hours)\n }\n var delimeter = dirtyDelimeter || ''\n return sign + String(hours) + delimeter + addLeadingZeros(minutes, 2)\n}\n\nexport default formatters\n","import toInteger from 'date-fns/esm/_lib/toInteger/index.js'\nimport getTimezoneOffsetInMilliseconds from 'date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js'\nimport tzParseTimezone from '../_lib/tzParseTimezone'\n\nvar MILLISECONDS_IN_HOUR = 3600000\nvar MILLISECONDS_IN_MINUTE = 60000\nvar DEFAULT_ADDITIONAL_DIGITS = 2\n\nvar patterns = {\n dateTimeDelimeter: /[T ]/,\n plainTime: /:/,\n timeZoneDelimeter: /[Z ]/i,\n\n // year tokens\n YY: /^(\\d{2})$/,\n YYY: [\n /^([+-]\\d{2})$/, // 0 additional digits\n /^([+-]\\d{3})$/, // 1 additional digit\n /^([+-]\\d{4})$/, // 2 additional digits\n ],\n YYYY: /^(\\d{4})/,\n YYYYY: [\n /^([+-]\\d{4})/, // 0 additional digits\n /^([+-]\\d{5})/, // 1 additional digit\n /^([+-]\\d{6})/, // 2 additional digits\n ],\n\n // date tokens\n MM: /^-(\\d{2})$/,\n DDD: /^-?(\\d{3})$/,\n MMDD: /^-?(\\d{2})-?(\\d{2})$/,\n Www: /^-?W(\\d{2})$/,\n WwwD: /^-?W(\\d{2})-?(\\d{1})$/,\n\n HH: /^(\\d{2}([.,]\\d*)?)$/,\n HHMM: /^(\\d{2}):?(\\d{2}([.,]\\d*)?)$/,\n HHMMSS: /^(\\d{2}):?(\\d{2}):?(\\d{2}([.,]\\d*)?)$/,\n\n // timezone tokens (to identify the presence of a tz)\n timezone: /([Z+-].*| UTC|(?:[a-zA-Z]+\\/[a-zA-Z_]+(?:\\/[a-zA-Z_]+)?))$/,\n}\n\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If an argument is a string, the function tries to parse it.\n * Function accepts complete ISO 8601 formats as well as partial implementations.\n * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n * If the function cannot parse the string or the values are invalid, it returns Invalid Date.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n * All *date-fns* functions will throw `RangeError` if `options.additionalDigits` is not 0, 1, 2 or undefined.\n *\n * @param {Date|String|Number} argument - the value to convert\n * @param {OptionsWithTZ} [options] - the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - the additional number of digits in the extended year format\n * @param {String} [options.timeZone=''] - used to specify the IANA time zone offset of a date String.\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // Convert string '2014-02-11T11:30:30' to date:\n * var result = toDate('2014-02-11T11:30:30')\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert string '+02014101' to date,\n * // if the additional number of digits in the extended year format is 1:\n * var result = toDate('+02014101', {additionalDigits: 1})\n * //=> Fri Apr 11 2014 00:00:00\n */\nexport default function toDate(argument, dirtyOptions) {\n if (arguments.length < 1) {\n throw new TypeError('1 argument required, but only ' + arguments.length + ' present')\n }\n\n if (argument === null) {\n return new Date(NaN)\n }\n\n var options = dirtyOptions || {}\n\n var additionalDigits =\n options.additionalDigits == null\n ? DEFAULT_ADDITIONAL_DIGITS\n : toInteger(options.additionalDigits)\n if (additionalDigits !== 2 && additionalDigits !== 1 && additionalDigits !== 0) {\n throw new RangeError('additionalDigits must be 0, 1 or 2')\n }\n\n // Clone the date\n if (\n argument instanceof Date ||\n (typeof argument === 'object' && Object.prototype.toString.call(argument) === '[object Date]')\n ) {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime())\n } else if (\n typeof argument === 'number' ||\n Object.prototype.toString.call(argument) === '[object Number]'\n ) {\n return new Date(argument)\n } else if (\n !(\n typeof argument === 'string' || Object.prototype.toString.call(argument) === '[object String]'\n )\n ) {\n return new Date(NaN)\n }\n\n var dateStrings = splitDateString(argument)\n\n var parseYearResult = parseYear(dateStrings.date, additionalDigits)\n var year = parseYearResult.year\n var restDateString = parseYearResult.restDateString\n\n var date = parseDate(restDateString, year)\n\n if (isNaN(date)) {\n return new Date(NaN)\n }\n\n if (date) {\n var timestamp = date.getTime()\n var time = 0\n var offset\n\n if (dateStrings.time) {\n time = parseTime(dateStrings.time)\n\n if (isNaN(time)) {\n return new Date(NaN)\n }\n }\n\n if (dateStrings.timezone || options.timeZone) {\n offset = tzParseTimezone(dateStrings.timezone || options.timeZone, new Date(timestamp + time))\n if (isNaN(offset)) {\n return new Date(NaN)\n }\n } else {\n // get offset accurate to hour in timezones that change offset\n offset = getTimezoneOffsetInMilliseconds(new Date(timestamp + time))\n offset = getTimezoneOffsetInMilliseconds(new Date(timestamp + time + offset))\n }\n\n return new Date(timestamp + time + offset)\n } else {\n return new Date(NaN)\n }\n}\n\nfunction splitDateString(dateString) {\n var dateStrings = {}\n var array = dateString.split(patterns.dateTimeDelimeter)\n var timeString\n\n if (patterns.plainTime.test(array[0])) {\n dateStrings.date = null\n timeString = array[0]\n } else {\n dateStrings.date = array[0]\n timeString = array[1]\n dateStrings.timezone = array[2]\n if (patterns.timeZoneDelimeter.test(dateStrings.date)) {\n dateStrings.date = dateString.split(patterns.timeZoneDelimeter)[0]\n timeString = dateString.substr(dateStrings.date.length, dateString.length)\n }\n }\n\n if (timeString) {\n var token = patterns.timezone.exec(timeString)\n if (token) {\n dateStrings.time = timeString.replace(token[1], '')\n dateStrings.timezone = token[1]\n } else {\n dateStrings.time = timeString\n }\n }\n\n return dateStrings\n}\n\nfunction parseYear(dateString, additionalDigits) {\n var patternYYY = patterns.YYY[additionalDigits]\n var patternYYYYY = patterns.YYYYY[additionalDigits]\n\n var token\n\n // YYYY or ±YYYYY\n token = patterns.YYYY.exec(dateString) || patternYYYYY.exec(dateString)\n if (token) {\n var yearString = token[1]\n return {\n year: parseInt(yearString, 10),\n restDateString: dateString.slice(yearString.length),\n }\n }\n\n // YY or ±YYY\n token = patterns.YY.exec(dateString) || patternYYY.exec(dateString)\n if (token) {\n var centuryString = token[1]\n return {\n year: parseInt(centuryString, 10) * 100,\n restDateString: dateString.slice(centuryString.length),\n }\n }\n\n // Invalid ISO-formatted year\n return {\n year: null,\n }\n}\n\nfunction parseDate(dateString, year) {\n // Invalid ISO-formatted year\n if (year === null) {\n return null\n }\n\n var token\n var date\n var month\n var week\n\n // YYYY\n if (dateString.length === 0) {\n date = new Date(0)\n date.setUTCFullYear(year)\n return date\n }\n\n // YYYY-MM\n token = patterns.MM.exec(dateString)\n if (token) {\n date = new Date(0)\n month = parseInt(token[1], 10) - 1\n\n if (!validateDate(year, month)) {\n return new Date(NaN)\n }\n\n date.setUTCFullYear(year, month)\n return date\n }\n\n // YYYY-DDD or YYYYDDD\n token = patterns.DDD.exec(dateString)\n if (token) {\n date = new Date(0)\n var dayOfYear = parseInt(token[1], 10)\n\n if (!validateDayOfYearDate(year, dayOfYear)) {\n return new Date(NaN)\n }\n\n date.setUTCFullYear(year, 0, dayOfYear)\n return date\n }\n\n // yyyy-MM-dd or YYYYMMDD\n token = patterns.MMDD.exec(dateString)\n if (token) {\n date = new Date(0)\n month = parseInt(token[1], 10) - 1\n var day = parseInt(token[2], 10)\n\n if (!validateDate(year, month, day)) {\n return new Date(NaN)\n }\n\n date.setUTCFullYear(year, month, day)\n return date\n }\n\n // YYYY-Www or YYYYWww\n token = patterns.Www.exec(dateString)\n if (token) {\n week = parseInt(token[1], 10) - 1\n\n if (!validateWeekDate(year, week)) {\n return new Date(NaN)\n }\n\n return dayOfISOWeekYear(year, week)\n }\n\n // YYYY-Www-D or YYYYWwwD\n token = patterns.WwwD.exec(dateString)\n if (token) {\n week = parseInt(token[1], 10) - 1\n var dayOfWeek = parseInt(token[2], 10) - 1\n\n if (!validateWeekDate(year, week, dayOfWeek)) {\n return new Date(NaN)\n }\n\n return dayOfISOWeekYear(year, week, dayOfWeek)\n }\n\n // Invalid ISO-formatted date\n return null\n}\n\nfunction parseTime(timeString) {\n var token\n var hours\n var minutes\n\n // hh\n token = patterns.HH.exec(timeString)\n if (token) {\n hours = parseFloat(token[1].replace(',', '.'))\n\n if (!validateTime(hours)) {\n return NaN\n }\n\n return (hours % 24) * MILLISECONDS_IN_HOUR\n }\n\n // hh:mm or hhmm\n token = patterns.HHMM.exec(timeString)\n if (token) {\n hours = parseInt(token[1], 10)\n minutes = parseFloat(token[2].replace(',', '.'))\n\n if (!validateTime(hours, minutes)) {\n return NaN\n }\n\n return (hours % 24) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE\n }\n\n // hh:mm:ss or hhmmss\n token = patterns.HHMMSS.exec(timeString)\n if (token) {\n hours = parseInt(token[1], 10)\n minutes = parseInt(token[2], 10)\n var seconds = parseFloat(token[3].replace(',', '.'))\n\n if (!validateTime(hours, minutes, seconds)) {\n return NaN\n }\n\n return (hours % 24) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE + seconds * 1000\n }\n\n // Invalid ISO-formatted time\n return null\n}\n\nfunction dayOfISOWeekYear(isoWeekYear, week, day) {\n week = week || 0\n day = day || 0\n var date = new Date(0)\n date.setUTCFullYear(isoWeekYear, 0, 4)\n var fourthOfJanuaryDay = date.getUTCDay() || 7\n var diff = week * 7 + day + 1 - fourthOfJanuaryDay\n date.setUTCDate(date.getUTCDate() + diff)\n return date\n}\n\n// Validation functions\n\nvar DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]\nvar DAYS_IN_MONTH_LEAP_YEAR = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]\n\nfunction isLeapYearIndex(year) {\n return year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0)\n}\n\nfunction validateDate(year, month, date) {\n if (month < 0 || month > 11) {\n return false\n }\n\n if (date != null) {\n if (date < 1) {\n return false\n }\n\n var isLeapYear = isLeapYearIndex(year)\n if (isLeapYear && date > DAYS_IN_MONTH_LEAP_YEAR[month]) {\n return false\n }\n if (!isLeapYear && date > DAYS_IN_MONTH[month]) {\n return false\n }\n }\n\n return true\n}\n\nfunction validateDayOfYearDate(year, dayOfYear) {\n if (dayOfYear < 1) {\n return false\n }\n\n var isLeapYear = isLeapYearIndex(year)\n if (isLeapYear && dayOfYear > 366) {\n return false\n }\n if (!isLeapYear && dayOfYear > 365) {\n return false\n }\n\n return true\n}\n\nfunction validateWeekDate(year, week, day) {\n if (week < 0 || week > 52) {\n return false\n }\n\n if (day != null && (day < 0 || day > 6)) {\n return false\n }\n\n return true\n}\n\nfunction validateTime(hours, minutes, seconds) {\n if (hours != null && (hours < 0 || hours >= 25)) {\n return false\n }\n\n if (minutes != null && (minutes < 0 || minutes >= 60)) {\n return false\n }\n\n if (seconds != null && (seconds < 0 || seconds >= 60)) {\n return false\n }\n\n return true\n}\n","import dateFnsFormat from 'date-fns/esm/format'\nimport formatters from './formatters'\nimport toDate from '../toDate'\n\nvar tzFormattingTokensRegExp = /([xXOz]+)|''|'(''|[^'])+('|$)/g\n\n/**\n * @name format\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://git.io/fxCyr\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 8 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 8 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Su | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Su, Sa | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Su | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Su, Sa | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Su | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Su, Sa | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Su | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Su, Sa | |\n * | AM, PM | a..aaa | AM, PM | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bbb | AM, PM, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 1, 2, ..., 11, 0 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 0001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | PDT, EST, CEST | 6 |\n * | | zzzz | Pacific Daylight Time | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 05/29/1453 | 7 |\n * | | PP | May 29, 1453 | 7 |\n * | | PPP | May 29th, 1453 | 7 |\n * | | PPPP | Sunday, May 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 05/29/1453, 12:00 AM | 7 |\n * | | PPpp | May 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | May 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Sunday, May 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}\n * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).\n *\n * 6. Specific non-location timezones are created using the Intl browser API. The output is determined by the\n * preferred standard of the current locale (en-US by default) which may not always give the expected result.\n * For this reason it is recommended to supply a `locale` in the format options when formatting a time zone name.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. These tokens are often confused with others. See: https://git.io/fxCyr\n *\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole\n * library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The second argument is now required for the sake of explicitness.\n *\n * ```javascript\n * // Before v2.0.0\n * format(new Date(2016, 0, 1))\n *\n * // v2.0.0 onward\n * format(new Date(2016, 0, 1), \"yyyy-MM-dd'T'HH:mm:ss.SSSxxx\")\n * ```\n *\n * - New format string API for `format` function\n * which is based on [Unicode Technical Standard\n * #35](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table). See [this\n * post](https://blog.date-fns.org/post/unicode-tokens-in-date-fns-v2-sreatyki91jg) for more details.\n *\n * - Characters are now escaped using single quote symbols (`'`) instead of square brackets.\n *\n * @param {Date|String|Number} date - the original date\n * @param {String} format - the string of tokens\n * @param {OptionsWithTZ} [options] - the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link\n * https://date-fns.org/docs/toDate}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See\n * [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {Boolean} [options.awareOfUnicodeTokens=false] - if true, allows usage of Unicode tokens causes confusion:\n * - Some of the day of year tokens (`D`, `DD`) that are confused with the day of month tokens (`d`, `dd`).\n * - Some of the local week-numbering year tokens (`YY`, `YYYY`) that are confused with the calendar year tokens\n * (`yy`, `yyyy`). See: https://git.io/fxCyr\n * @param {String} [options.timeZone=''] - used to specify the IANA time zone offset of a date String.\n * @returns {String} the formatted date string\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n * @throws {RangeError} `options.locale` must contain `localize` property\n * @throws {RangeError} `options.locale` must contain `formatLong` property\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} `options.awareOfUnicodeTokens` must be set to `true` to use `XX` token; see:\n * https://git.io/fxCyr\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * var result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/esm/locale/eo'\n * var result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * var result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport default function format(dirtyDate, dirtyFormatStr, dirtyOptions) {\n var formatStr = String(dirtyFormatStr)\n var options = dirtyOptions || {}\n\n var matches = formatStr.match(tzFormattingTokensRegExp)\n if (matches) {\n var date = toDate(dirtyDate, options)\n formatStr = matches.reduce(function (result, token) {\n return token[0] === \"'\"\n ? result\n : result.replace(token, \"'\" + formatters[token[0]](date, token, null, options) + \"'\")\n }, formatStr)\n }\n\n return dateFnsFormat(dirtyDate, formatStr, options)\n}\n","import tzParseTimezone from '../_lib/tzParseTimezone'\nimport toDate from '../toDate'\n\n/**\n * @name utcToZonedTime\n * @category Time Zone Helpers\n * @summary Get a date/time representing local time in a given time zone from the UTC date\n *\n * @description\n * Returns a date instance with values representing the local time in the time zone\n * specified of the UTC time from the date provided. In other words, when the new date\n * is formatted it will show the equivalent hours in the target time zone regardless\n * of the current system time zone.\n *\n * @param {Date|String|Number} date - the date with the relevant UTC time\n * @param {String} timeZone - the time zone to get local time for, can be an offset or IANA time zone\n * @param {OptionsWithTZ} [options] - the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * @returns {Date} the new date with the equivalent time in the time zone\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // In June 10am UTC is 6am in New York (-04:00)\n * const result = utcToZonedTime('2014-06-25T10:00:00.000Z', 'America/New_York')\n * //=> Jun 25 2014 06:00:00\n */\nexport default function utcToZonedTime(dirtyDate, timeZone, options) {\n var date = toDate(dirtyDate, options)\n\n var offsetMilliseconds = tzParseTimezone(timeZone, date, true) || 0\n\n var d = new Date(date.getTime() - offsetMilliseconds)\n\n var zonedTime = new Date(\n d.getUTCFullYear(),\n d.getUTCMonth(),\n d.getUTCDate(),\n d.getUTCHours(),\n d.getUTCMinutes(),\n d.getUTCSeconds(),\n d.getUTCMilliseconds()\n )\n\n return zonedTime\n}\n","import { store, Model } from \"hybrids\";\n\nimport { enUS } from \"date-fns/locale\";\nimport { format, utcToZonedTime } from \"date-fns-tz\";\n\nimport { get } from \"~/utils/api\";\nimport Course from \"./Course\";\n\ninterface Event {\n id: string;\n startsAt: string;\n endsAt: string;\n timezone: string;\n course: Course;\n\n // computed\n timeLabel: string;\n startsAtDate: Date;\n endsAtDate: Date;\n}\n\nconst Event: Model = {\n id: true,\n startsAt: \"\",\n endsAt: \"\",\n timezone: \"\",\n course: store.ref(() => Course),\n\n // computed\n timeLabel: ({ startsAt, endsAt, timezone }) => {\n const startDate = utcToZonedTime(startsAt, timezone);\n const endDate = utcToZonedTime(endsAt, timezone);\n\n const start = format(startDate, \"MMMM do, p\", {\n timeZone: timezone,\n locale: enUS,\n });\n\n let endDateFormat = \"p (zzz)\";\n\n if(startDate.getMonth() != endDate.getMonth()) {\n endDateFormat = \"MMMM do, \" + endDateFormat;\n } else if(startDate.getDay() != endDate.getDay()) {\n endDateFormat = \"do, \" + endDateFormat;\n }\n\n const end = format(endDate, endDateFormat, {\n timeZone: timezone,\n locale: enUS,\n });\n\n return `${start} - ${end}`;\n },\n\n startsAtDate: ({ startsAt, timezone }) =>\n utcToZonedTime(new Date(startsAt), timezone),\n\n endsAtDate: ({ endsAt, timezone }) =>\n utcToZonedTime(new Date(endsAt), timezone),\n\n [store.connect]: {\n get: (id) => get(\"/events/:id\", id),\n },\n};\n\nexport default Event;\n","import { format } from \"date-fns\";\nimport { store, Model } from \"hybrids\";\nimport { get, post } from \"~/utils/api\";\nimport Event from \"./Event\";\nimport Sponsor from \"./Sponsor\";\nimport User from \"./User\";\n\ninterface Course {\n id: string;\n name: string;\n owner: User;\n sponsors: Sponsor[];\n collaborators: User[];\n startsAt: string;\n endsAt: string;\n nextEvent: Event;\n timezone: string;\n thumbnail: string;\n poster: string;\n session: boolean;\n private: boolean;\n likeCount: number;\n url: string;\n shareUrl: string;\n currency: string;\n onlineTicketsAvailable: boolean;\n inPersonTicketsAvailable: boolean;\n donationTitle: string;\n donationDescription: string;\n donationSuggestedAmount: number;\n}\n\nexport const PER_PAGE = 30;\n\nconst Course: Model = {\n id: true,\n name: \"\",\n owner: User,\n sponsors: [Sponsor],\n collaborators: [User],\n startsAt: \"\",\n endsAt: \"\",\n nextEvent: Event,\n timezone: \"\",\n thumbnail: \"\",\n poster: \"\",\n session: false,\n private: false,\n likeCount: 0,\n url: \"\",\n shareUrl: \"\",\n currency: \"USD\",\n onlineTicketsAvailable: false,\n inPersonTicketsAvailable: false,\n donationTitle: \"\",\n donationDescription: \"\",\n donationSuggestedAmount: 0.0,\n [store.connect]: {\n get: (id) => get(\"/courses/:id\", id),\n set(id, values, keys) {\n if (id && values && keys.length == 1 && keys[0] == \"likeCount\") {\n const { likeCount } = store.get(Course, id);\n return post(\n `/courses/:id/${values.likeCount > likeCount ? \"like\" : \"dislike\"}`,\n null,\n id\n );\n }\n throw TypeError(\"Set action with provided values not supported\");\n },\n list(query) {\n if (query && typeof query === \"object\" && query.tag) {\n return get(\"/courses/tagged\", {\n tag: query.tag,\n page: query.page,\n past: query.past,\n });\n }\n\n return get(\"/courses\", query);\n },\n offline: 1000 * 60 * 60 * 24 * 7, // 7 days\n },\n};\n\nexport default Course;\n"],"names":["tzIntlTimeZoneName","length","date","options","dtf","timeZone","locale","code","Error","Intl","DateTimeFormat","timeZoneName","getDTF","formatToParts","formatted","value","partsTimeZone","format","replace","tzNameMatch","exec","substr","hackyTimeZone","tzTokenizeDate","dtfCache","testDateFormatted","hour12","year","month","day","hour","minute","second","Date","hourCycleSupported","hourCycle","getDateTimeFormat","filled","i","pos","typeToPos","type","parseInt","partsOffset","parsed","hackyOffset","patterns","timezone","timezoneZ","timezoneHH","timezoneHHMM","timezoneIANA","tzParseTimezone","timezoneString","isUtcDate","token","absoluteOffset","hours","validateTimezone","NaN","minutes","now","utcDate","UTC","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","getMilliseconds","toUtcDate","offset","calcOffset","fixedOffset","utcGuess","getTime","o2","o3","Math","max","fixOffset","tokens","asUTC","asTS","over","addLeadingZeros","number","targetLength","sign","output","abs","toString","formatTimezone","dirtyDelimeter","delimeter","absOffset","floor","formatTimezoneWithOptionalMinutes","formatters$1","X","localize","originalDate","_originalDate","timezoneOffset","getTimezoneOffset","x","O","String","formatTimezoneShort","z","dateTimeDelimeter","plainTime","timeZoneDelimeter","YY","YYY","YYYY","YYYYY","MM","DDD","MMDD","Www","WwwD","HH","HHMM","HHMMSS","toDate","argument","dirtyOptions","arguments","TypeError","additionalDigits","toInteger","RangeError","Object","prototype","call","dateStrings","splitDateString","parseYearResult","parseYear","restDateString","parseDate","isNaN","timestamp","time","parseTime","getTimezoneOffsetInMilliseconds","dateString","timeString","array","split","test","patternYYY","patternYYYYY","yearString","slice","centuryString","week","setUTCFullYear","validateDate","dayOfYear","isLeapYear","isLeapYearIndex","validateDayOfYearDate","validateWeekDate","dayOfISOWeekYear","dayOfWeek","validateTime","parseFloat","seconds","isoWeekYear","diff","getUTCDay","setUTCDate","getUTCDate","DAYS_IN_MONTH","DAYS_IN_MONTH_LEAP_YEAR","tzFormattingTokensRegExp","dirtyDate","dirtyFormatStr","formatStr","matches","match","reduce","result","formatters","dateFnsFormat","utcToZonedTime","offsetMilliseconds","d","getUTCFullYear","getUTCMonth","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","Event","id","startsAt","endsAt","course","store","ref","Course","timeLabel","startDate","endDate","start","enUS","endDateFormat","getDay","startsAtDate","endsAtDate","connect","get","PER_PAGE","name","owner","User","sponsors","Sponsor","collaborators","nextEvent","thumbnail","poster","session","private","likeCount","url","shareUrl","currency","onlineTicketsAvailable","inPersonTicketsAvailable","donationTitle","donationDescription","donationSuggestedAmount","set","values","keys","post","list","query","tag","page","past","offline","Course$1"],"mappings":"uKAKe,SAASA,EAAmBC,EAAQC,EAAMC,GACvD,IAAIC,EAiBN,SAAgBH,EAAQI,EAAUC,GAC5B,GAAAA,IAAWA,EAAOC,KACpB,MAAM,IAAIC,MACR,2HAGG,OAAA,IAAIC,KAAKC,eAAeJ,EAAS,CAACA,EAAOC,KAAM,cAAW,EAAW,CAC1EF,SAAAA,EACAM,aAAcV,IAzBNW,CAAOX,EAAQE,EAAQE,SAAUF,EAAQG,QAC5C,OAAAF,EAAIS,cAGb,SAAuBT,EAAKF,GACtB,IAAAY,EAAYV,EAAIS,cAAcX,GAC3B,OAAAY,EAAUA,EAAUb,OAAS,GAAGc,MALZC,CAAcZ,EAAKF,GAQhD,SAAuBE,EAAKF,GAC1B,IAAIY,EAAYV,EAAIa,OAAOf,GAAMgB,QAAQ,UAAW,IAChDC,EAAc,aAAaC,KAAKN,GACpC,OAAOK,EAAcA,EAAY,GAAGE,OAAO,GAAK,GAXMC,CAAclB,EAAKF,GCH5D,SAASqB,EAAerB,EAAMG,GACvC,IAAAD,EAsCN,SAA2BC,GACrB,IAACmB,EAASnB,GAAW,CAEvB,IAAIoB,EAAoB,IAAIhB,KAAKC,eAAe,QAAS,CACvDgB,QAAQ,EACRrB,SAAU,mBACVsB,KAAM,UACNC,MAAO,UACPC,IAAK,UACLC,KAAM,UACNC,OAAQ,UACRC,OAAQ,YACPf,OAAO,IAAIgB,KAAK,6BACfC,EACoB,yBAAtBT,GACsB,mCAAtBA,EAEFD,EAASnB,GA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