{"version":3,"file":"setupDateFns-BeEFSOG1.js","sources":["../../node_modules/date-fns/esm/setDefaultOptions/index.js","../../node_modules/@hejdoktor/resx-compiler/format.mjs","../../Client/Common/Toast.ts","../../node_modules/date-fns/esm/locale/da/_lib/formatDistance/index.js","../../node_modules/date-fns/esm/locale/da/_lib/formatLong/index.js","../../node_modules/date-fns/esm/locale/da/_lib/formatRelative/index.js","../../node_modules/date-fns/esm/locale/da/_lib/localize/index.js","../../node_modules/date-fns/esm/locale/da/_lib/match/index.js","../../node_modules/date-fns/esm/locale/da/index.js","../../node_modules/date-fns/esm/locale/en-GB/_lib/formatLong/index.js","../../node_modules/date-fns/esm/locale/en-GB/index.js","../../Client/setupDateFns.ts"],"sourcesContent":["import { getDefaultOptions, setDefaultOptions as setInternalDefaultOptions } from \"../_lib/defaultOptions/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setDefaultOptions\n * @category Common Helpers\n * @summary Set default options including locale.\n * @pure false\n *\n * @description\n * Sets the defaults for\n * `options.locale`, `options.weekStartsOn` and `options.firstWeekContainsDate`\n * arguments for all functions.\n *\n * @param {Object} newOptions - an object with options.\n * @param {Locale} [newOptions.locale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [newOptions.weekStartsOn] - the index of the first day of the week (0 - Sunday)\n * @param {1|2|3|4|5|6|7} [newOptions.firstWeekContainsDate] - the day of January, which is always in the first week of the year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Set global locale:\n * import { es } from 'date-fns/locale'\n * setDefaultOptions({ locale: es })\n * const result = format(new Date(2014, 8, 2), 'PPPP')\n * //=> 'martes, 2 de septiembre de 2014'\n *\n * @example\n * // Start of the week for 2 September 2014:\n * const result = startOfWeek(new Date(2014, 8, 2))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // Start of the week for 2 September 2014,\n * // when we set that week starts on Monday by default:\n * setDefaultOptions({ weekStartsOn: 1 })\n * const result = startOfWeek(new Date(2014, 8, 2))\n * //=> Mon Sep 01 2014 00:00:00\n *\n * @example\n * // Manually set options take priority over default options:\n * setDefaultOptions({ weekStartsOn: 1 })\n * const result = startOfWeek(new Date(2014, 8, 2), { weekStartsOn: 0 })\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // Remove the option by setting it to `undefined`:\n * setDefaultOptions({ weekStartsOn: 1 })\n * setDefaultOptions({ weekStartsOn: undefined })\n * const result = startOfWeek(new Date(2014, 8, 2))\n * //=> Sun Aug 31 2014 00:00:00\n */\nexport default function setDefaultOptions(newOptions) {\n requiredArgs(1, arguments);\n var result = {};\n var defaultOptions = getDefaultOptions();\n for (var property in defaultOptions) {\n if (Object.prototype.hasOwnProperty.call(defaultOptions, property)) {\n ;\n result[property] = defaultOptions[property];\n }\n }\n for (var _property in newOptions) {\n if (Object.prototype.hasOwnProperty.call(newOptions, _property)) {\n if (newOptions[_property] === undefined) {\n delete result[_property];\n } else {\n ;\n result[_property] = newOptions[_property];\n }\n }\n }\n setInternalDefaultOptions(result);\n}","export function format(translation, ...args) {\n\tfor (let i = 0; i < args.length; i++) {\n\t\ttranslation = translation.replace(new RegExp('\\\\{' + i + '}', 'g'), args[i]);\n\t}\n\n\treturn translation;\n};\n","type ToastElement = HTMLLIElement & {\n timeoutId?: number;\n closeCallback?: () => void;\n};\n\nconst iconUrls = {\n success: '/images/falck/toast-icon-success.svg',\n info: '/images/falck/toast-icon-info.svg',\n warning: '/images/falck/toast-icon-warning.svg',\n error: '/images/falck/toast-icon-error.svg',\n};\n\n/**\n * Toasts - a class for creating and managing toast notifications.\n *\n * Toasts are small notifications that appear at the top of the screen.\n *\n * They are used to provide feedback to the user, such as when an action has been completed successfully, or when an error has occurred.\n *\n * @param {HTMLULElement} container - The container to which the toast message should be added. This should be a `