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zB,CACA,mBAAIxC,GACF,OAAOn/B,KAAKuR,aAAa,MAAqB,CAChD,CACA,mBAAI4tB,CAAgB7d,IAClB,QAAgBthB,KAAM,GAAkBshB,EAC1C,CACA,oBAAI7E,GACF,OAAOzc,KAAKmW,aAAa,GAC3B,CACA,oBAAIsG,CAAiB6E,GACnBthB,KAAK+C,aAAa,GAAwBue,EAC5C,E,OCjLclW,OAAOmC,eACNnC,OAAO4E,iBACA5E,OAAO2E,0BACL3E,OAAOuE,sBACdvE,OAAOvL,UAAUuV,eACjBhK,OAAOvL,UAAUkjC,qBAoMpC,IC7LIC,GAAY,wBAgEhB,SAASC,GAAUtjC,QAEamN,IAA1Bo2B,WAAWF,MAEbE,WAAWF,IAAa,SAAUG,GAChCD,WAAWF,IAAWxV,EAAEtsB,KAAKiiC,EAC/B,EACAD,WAAWF,IAAWxV,EAAI,IAe9B,SAAkB4V,GAEhB,GADgB/gC,SAASkf,cAAc,eAAkB6hB,EAAM,MAE7D,OAEF,IAAIC,EAAShhC,SAASC,cAAc,UACpC+gC,EAAOC,OAAQ,EACfD,EAAOD,IAAMA,EACb/gC,SAAS+U,KAAK7U,YAAY8gC,EAC5B,CApBIE,CAASC,wEAIXN,WAAWF,IAAWrjC,EACxB,CC5FA,MAAM8jC,GAAS,CACb,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,WAWa,SAASC,GAAaC,GACnC,GAAI,KAAK7pB,KAAK6pB,GACZ,MAAMt2B,MAAM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AkBK,QAE1B,GAEJ,CACE7gC,UAAW,CAAC,GAGZ6H,WAAY,0BAIhBurB,GAAAz7B,KAAIymC,IAAAA,IAAgBv1B,QAAQlR,MAC9B,CAAC,SAAAgnC,KAYqB,IAAAmC,EAAAC,EAChB,OAAJD,EAAA1N,GAAAz7B,KAAIymC,IAAAA,MAAJ0C,EAAqBh4B,aACjB,OAAJi4B,EAAA3N,GAAAz7B,KAAI0mC,IAAAA,MAAJ0C,EAAoBj4B,YACtB,CAWFi1B,GAAWlwB,GAAK6wB,G","sources":["webpack://dh-introscroll/webpack/runtime/import chunk loading","webpack://dh-introscroll/./node_modules/balance-text/balancetext.js","webpack://dh-introscroll/./node_modules/cuid/index.js","webpack://dh-introscroll/./node_modules/cuid/lib/fingerprint.browser.js","webpack://dh-introscroll/./node_modules/cuid/lib/getRandomValue.browser.js","webpack://dh-introscroll/./node_modules/cuid/lib/pad.js","webpack://dh-introscroll/./node_modules/debounce/index.js","webpack://dh-introscroll/./node_modules/@nrk/dh-server-libs/get-element-tag.js","webpack://dh-introscroll/./node_modules/@nrk/dh-server-libs/html.js","webpack://dh-introscroll/./node_modules/@nrk/dh-server-libs/src/get-element-tag.js","webpack://dh-introscroll/./node_modules/@nrk/dh-server-libs/src/html-tagged-template-literal.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://dh-introscroll/./node_modules/@nrk/dh-basis-common/dist/index.esm.js","webpack://dh-introscroll/webpack/bootstrap","webpack://dh-introscroll/webpack/runtime/amd options","webpack://dh-introscroll/webpack/runtime/compat get default export","webpack://dh-introscroll/webpack/runtime/define property getters","webpack://dh-introscroll/webpack/runtime/ensure chunk","webpack://dh-introscroll/webpack/runtime/get javascript chunk filename","webpack://dh-introscroll/webpack/runtime/get mini-css chunk filename","webpack://dh-introscroll/webpack/runtime/hasOwnProperty shorthand","webpack://dh-introscroll/webpack/runtime/make namespace object","webpack://dh-introscroll/webpack/runtime/node module decorator","webpack://dh-introscroll/webpack/runtime/publicPath","webpack://dh-introscroll/webpack/runtime/css loading","webpack://dh-introscroll/./node_modules/@nrk/dh-vh/dist/index.mjs","webpack://dh-introscroll/./src/polyfills.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/assertClassBrand.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js","webpack://dh-introscroll/./node_modules/@nrk/dh-basis-mixins/dist/index.esm.js","webpack://dh-introscroll/./node_modules/@nrk/dh-basis-scrollhistorie/dist/index.esm.js","webpack://dh-introscroll/./src/lib/balance-text-wrapper.js","webpack://dh-introscroll/./node_modules/date-fns/locale/nb/_lib/formatDistance.js","webpack://dh-introscroll/./node_modules/date-fns/locale/_lib/buildFormatLongFn.js","webpack://dh-introscroll/./node_modules/date-fns/locale/nb/_lib/formatLong.js","webpack://dh-introscroll/./node_modules/date-fns/locale/nb/_lib/formatRelative.js","webpack://dh-introscroll/./node_modules/date-fns/locale/_lib/buildLocalizeFn.js","webpack://dh-introscroll/./node_modules/date-fns/locale/_lib/buildMatchFn.js","webpack://dh-introscroll/./node_modules/date-fns/locale/_lib/buildMatchPatternFn.js","webpack://dh-introscroll/./node_modules/date-fns/locale/nb/_lib/match.js","webpack://dh-introscroll/./node_modules/date-fns/locale/nb.js","webpack://dh-introscroll/./node_modules/date-fns/locale/nb/_lib/localize.js","webpack://dh-introscroll/./node_modules/date-fns/locale/en-US/_lib/formatDistance.js","webpack://dh-introscroll/./node_modules/date-fns/locale/en-US/_lib/formatLong.js","webpack://dh-introscroll/./node_modules/date-fns/locale/en-US/_lib/formatRelative.js","webpack://dh-introscroll/./node_modules/date-fns/locale/en-US.js","webpack://dh-introscroll/./node_modules/date-fns/locale/en-US/_lib/localize.js","webpack://dh-introscroll/./node_modules/date-fns/locale/en-US/_lib/match.js","webpack://dh-introscroll/./node_modules/date-fns/_lib/defaultOptions.js","webpack://dh-introscroll/./node_modules/date-fns/constants.js","webpack://dh-introscroll/./node_modules/date-fns/constructFrom.js","webpack://dh-introscroll/./node_modules/date-fns/toDate.js","webpack://dh-introscroll/./node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js","webpack://dh-introscroll/./node_modules/date-fns/startOfDay.js","webpack://dh-introscroll/./node_modules/date-fns/differenceInCalendarDays.js","webpack://dh-introscroll/./node_modules/date-fns/_lib/normalizeDates.js","webpack://dh-introscroll/./node_modules/date-fns/startOfYear.js","webpack://dh-introscroll/./node_modules/date-fns/getDayOfYear.js","webpack://dh-introscroll/./node_modules/date-fns/startOfWeek.js","webpack://dh-introscroll/./node_modules/date-fns/startOfISOWeek.js","webpack://dh-introscroll/./node_modules/date-fns/getISOWeekYear.js","webpack://dh-introscroll/./node_modules/date-fns/startOfISOWeekYear.js","webpack://dh-introscroll/./node_modules/date-fns/getISOWeek.js","webpack://dh-introscroll/./node_modules/date-fns/getWeekYear.js","webpack://dh-introscroll/./node_modules/date-fns/startOfWeekYear.js","webpack://dh-introscroll/./node_modules/date-fns/getWeek.js","webpack://dh-introscroll/./node_modules/date-fns/_lib/addLeadingZeros.js","webpack://dh-introscroll/./node_modules/date-fns/_lib/format/lightFormatters.js","webpack://dh-introscroll/./node_modules/date-fns/_lib/format/formatters.js","webpack://dh-introscroll/./node_modules/date-fns/_lib/format/longFormatters.js","webpack://dh-introscroll/./node_modules/date-fns/_lib/protectedTokens.js","webpack://dh-introscroll/./node_modules/date-fns/isDate.js","webpack://dh-introscroll/./node_modules/date-fns/isValid.js","webpack://dh-introscroll/./node_modules/date-fns/format.js","webpack://dh-introscroll/./node_modules/date-fns/getDefaultOptions.js","webpack://dh-introscroll/./node_modules/date-fns-tz/dist/esm/_lib/tzIntlTimeZoneName/index.js","webpack://dh-introscroll/./node_modules/date-fns-tz/dist/esm/_lib/tzTokenizeDate/index.js","webpack://dh-introscroll/./node_modules/date-fns-tz/dist/esm/_lib/newDateUTC/index.js","webpack://dh-introscroll/./node_modules/date-fns-tz/dist/esm/_lib/tzParseTimezone/index.js","webpack://dh-introscroll/./node_modules/date-fns-tz/dist/esm/format/formatters/index.js","webpack://dh-introscroll/./node_modules/date-fns-tz/dist/esm/_lib/getTimezoneOffsetInMilliseconds/index.js","webpack://dh-introscroll/./node_modules/date-fns-tz/dist/esm/_lib/tzPattern/index.js","webpack://dh-introscroll/./node_modules/date-fns-tz/dist/esm/toDate/index.js","webpack://dh-introscroll/./node_modules/date-fns-tz/dist/esm/format/index.js","webpack://dh-introscroll/./node_modules/date-fns-tz/dist/esm/formatInTimeZone/index.js","webpack://dh-introscroll/./node_modules/date-fns-tz/dist/esm/toZonedTime/index.js","webpack://dh-introscroll/./src/components/article-info.ts","webpack://dh-introscroll/./src/components/introscroll.module.css?4b5f","webpack://dh-introscroll/./src/components/introscroll.js","webpack://dh-introscroll/./src/components/background.module.css?5643","webpack://dh-introscroll/./src/components/cards/cards.module.css?fefa","webpack://dh-introscroll/./src/components/media/spesialmodul.js","webpack://dh-introscroll/./node_modules/@nrk/dh-basis-stegvis-video/dist/index.esm.js","webpack://dh-introscroll/./node_modules/@nrk/dh-basis-levende-stillbilde/dist/index.esm.js","webpack://dh-introscroll/./node_modules/@nrk/nrkno-snowplow/node_modules/@nrk/snowplow-web/index.js","webpack://dh-introscroll/./node_modules/@nrk/nrkno-snowplow/build-npm/nrkno-snowplow.package.mjs","webpack://dh-introscroll/./node_modules/@nrk/debug/debug.js","webpack://dh-introscroll/./node_modules/@nrk/snowplow-web/index.js","webpack://dh-introscroll/./node_modules/@nrk/dh-snowplow/dist/index.mjs","webpack://dh-introscroll/./node_modules/@nrk/dh-snowplow/dist/shared/dh-snowplow.1ee613bf.mjs","webpack://dh-introscroll/./src/client.js"],"sourcesContent":["// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t792: 0\n};\n\nvar installChunk = (data) => {\n\tvar {ids, modules, runtime} = data;\n\t// add \"modules\" to the modules object,\n\t// then flag all \"ids\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tfor(moduleId in modules) {\n\t\tif(__webpack_require__.o(modules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = modules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\tfor(;i < ids.length; i++) {\n\t\tchunkId = ids[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[ids[i]] = 0;\n\t}\n\n}\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// import() chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[1]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = import(\"./\" + __webpack_require__.u(chunkId)).then(installChunk, (e) => {\n\t\t\t\t\t\tif(installedChunks[chunkId] !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t});\n\t\t\t\t\tvar promise = Promise.race([promise, new Promise((resolve) => (installedChunkData = installedChunks[chunkId] = [resolve]))])\n\t\t\t\t\tpromises.push(installedChunkData[1] = promise);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no external install chunk\n\n// no on chunks loaded","/*\n * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License. *\n */\n/**\n * balancetext.js\n *\n * Author: Randy Edmunds\n */\n\n/* global define, module */\n\n/*\n * Copyright (c) 2007-2009 unscriptable.com and John M. Hann\n *\n * Permission is hereby granted, free of charge, to any person\n * obtaining a copy of this software and associated documentation\n * files (the “Software”), to deal in the Software without\n * restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following\n * conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n *\n * Except as contained in this notice, the name(s) of the above\n * copyright holders (unscriptable.com and John M. Hann) shall not be\n * used in advertising or otherwise to promote the sale, use or other\n * dealings in this Software without prior written authorization.\n *\n * http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/\n *\n * Tested to work on (lowest browser):\n * - Sarari 4\n * - Chrome 16\n * - Firefox 10\n * - IE 9\n * - Edge 13\n */\n\n(function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([], factory);\n } else if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n } else {\n root.balanceText = factory();\n }\n}(this, () => {\n /**\n * Line breaking global vars\n */\n let breakMatches, wsnwMatches, wsnwOffset;\n\n /**\n * Selectors and elements to watch;\n * calling $.balanceText(elements) adds \"elements\" to this list.\n */\n const watching = {\n sel: [], // default class to watch\n el: [],\n };\n\n /**\n * Have handlers been initialized?\n */\n let handlersInitialized = false;\n\n /**\n * Is this a polyfill?\n */\n let polyfilled = false;\n\n\n /**\n * Do nothing\n */\n function noop() { }\n\n /**\n * Loop that works with array-likes\n * @param {Array-like} elements - List of elements to run a function on\n * @param {Function} callback - The function to call on each supplied element\n */\n function forEach(elements, callback) {\n Array.prototype.forEach.call(elements, callback);\n }\n\n /**\n * Polyfill for $(document).ready()\n *\n * @param {Function} fn - The function to execute when the document is ready\n */\n function ready(fn) {\n if (document.readyState !== \"loading\") {\n fn();\n } else if (document.addEventListener) {\n document.addEventListener(\"DOMContentLoaded\", fn);\n } else {\n document.attachEvent(\"onreadystatechange\", () => {\n if (document.readyState !== \"loading\") {\n fn();\n }\n });\n }\n }\n\n /**\n * Debounces a function over a threshold\n *\n * @param {Function} func - The function to debounce\n * @param {number} threshold - time in ms\n * @param {boolean} execAsap - when true, execute immediately\n * @param args\n * @return {Function} Debounced function\n */\n function debounce(func, threshold, execAsap, ...args) {\n let timeout;\n\n return function () {\n const obj = this;\n\n function delayed() {\n if (!execAsap) {\n func.apply(obj, args);\n }\n timeout = null;\n }\n\n if (timeout) {\n clearTimeout(timeout);\n } else if (execAsap) {\n func.apply(obj, args);\n }\n timeout = setTimeout(delayed, threshold || 100);\n };\n }\n\n /**\n * Determine whether the document supports TextWrap\n * @return {boolean}\n */\n function hasTextWrap() {\n if (typeof window === \"undefined\") {\n return false;\n }\n const { style } = document.documentElement;\n return style.textWrap || style.WebkitTextWrap || style.MozTextWrap || style.MsTextWrap;\n }\n\n /**\n * Object for tracking next whitespace params\n */\n // eslint-disable-next-line camelcase\n function NextWS_params() {\n this.reset();\n }\n\n NextWS_params.prototype.reset = function () {\n this.index = 0;\n this.width = 0;\n };\n\n /**\n * Check if index is contained in previously calculated list of white-space:nowrap ranges\n *\n * @param {number} index - the index of the character to check\n * @return {boolean}\n */\n function isWhiteSpaceNoWrap(index) {\n // Is index inside 1 of the ranges?\n // start and end are breakable, but not inside range\n return wsnwMatches.some(range => (range.start < index && index < range.end));\n }\n\n /**\n * Recursively calculate white-space:nowrap offsets for line.\n *\n * @param {Node} el - the element to act on\n * @param {boolean} includeTag - include length of tag itself\n */\n function recursiveCalcNoWrapOffsetsForLine(el, includeTag) {\n if (el.nodeType === el.ELEMENT_NODE) {\n // Found an embedded tag\n const style = window.getComputedStyle(el);\n if (style.whiteSpace === \"nowrap\") {\n // Tag with white-space:nowrap - add match, skip children\n const len = el.outerHTML.length;\n wsnwMatches.push({ start: wsnwOffset, end: wsnwOffset + len });\n wsnwOffset += len;\n } else {\n // Tag without white-space:nowrap - recursively check children of tag\n forEach(el.childNodes, (child) => {\n recursiveCalcNoWrapOffsetsForLine(child, true);\n });\n if (includeTag) {\n // Length of opening tag, attributes, and closing tag\n wsnwOffset += (el.outerHTML.length - el.innerHTML.length);\n }\n }\n } else if (el.nodeType === el.COMMENT_NODE) {\n wsnwOffset += el.length + 7; // delimiter: \n } else if (el.nodeType === el.PROCESSING_INSTRUCTION_NODE) {\n wsnwOffset += el.length + 2; // delimiter: < >\n } else {\n // Text node: add length\n wsnwOffset += el.length;\n }\n }\n\n /**\n * Calculate white-space:nowrap offsets for line.\n *\n * @param {Node} el - the element to act on\n * @param {string} oldWS - \"old\" whitespace setting for temporarily resetting\n * @param {number} lineCharOffset - char offset of current line from start of text\n */\n function calcNoWrapOffsetsForLine(el, oldWS, lineCharOffset) {\n // For first line (lineCharOffset === 0), calculate start and end offsets for each\n // white-space:nowrap element in the line.\n if (lineCharOffset === 0) {\n // Reset whiteSpace setting when breakMatches is being calculated\n // so white-space:nowrap can be detected in text\n el.style.whiteSpace = oldWS;\n\n wsnwOffset = 0;\n wsnwMatches = [];\n recursiveCalcNoWrapOffsetsForLine(el, false);\n\n // Restore temporary whitespace setting to recalc width\n el.style.whiteSpace = \"nowrap\";\n } else {\n // For all other lines, update the offsets for current line\n // 1. Ignore matches less than offset\n // 2. Subtract offset from remaining matches\n const newMatches = [];\n wsnwMatches.forEach((match) => {\n if (match.start > lineCharOffset) {\n newMatches.push({ start: match.start - lineCharOffset, end: match.end - lineCharOffset });\n }\n });\n wsnwMatches = newMatches;\n }\n }\n\n /**\n * Strip balance-text tags from an element inserted in previous run\n *\n * @param {Node} el - the element to act on\n */\n function removeTags(el) {\n // Remove soft-hyphen breaks\n let brs = el.querySelectorAll('br[data-owner=\"balance-text-hyphen\"]');\n forEach(brs, (br) => {\n br.outerHTML = \"\";\n });\n\n // Replace other breaks with whitespace\n brs = el.querySelectorAll('br[data-owner=\"balance-text\"]');\n forEach(brs, (br) => {\n br.outerHTML = \" \";\n });\n\n // Restore hyphens inserted for soft-hyphens\n let spans = el.querySelectorAll('span[data-owner=\"balance-text-softhyphen\"]');\n if (spans.length > 0) {\n forEach(spans, (span) => {\n const textNode = document.createTextNode(\"\\u00ad\");\n span.parentNode.insertBefore(textNode, span);\n span.parentNode.removeChild(span);\n });\n }\n\n // Remove spans inserted for justified text\n spans = el.querySelectorAll('span[data-owner=\"balance-text-justify\"]');\n if (spans.length > 0) {\n let txt = \"\";\n forEach(spans, (span) => {\n txt += span.textContent;\n span.parentNode.removeChild(span);\n });\n el.innerHTML = txt;\n }\n }\n\n /**\n * Checks to see if we should justify the balanced text with the\n * element based on the textAlign property in the computed CSS\n *\n * @param {Node} el - element to check\n * @return {boolean}\n */\n const isJustified = function (el) {\n const style = el.currentStyle || window.getComputedStyle(el, null);\n return (style.textAlign === \"justify\");\n };\n\n /**\n * Add whitespace after words in text to justify the string to\n * the specified size.\n * @param {Node} el - the element to justify\n * @param {string} txt - text string\n * @param {number} conWidth - container width\n * @return {string} Justified text\n */\n function justify(el, txt, conWidth) {\n txt = txt.trim();\n const words = txt.split(\" \").length;\n txt = `${txt} `;\n\n // if we don't have at least 2 words, no need to justify.\n if (words < 2) {\n return txt;\n }\n\n // Find width of text in the DOM\n const tmp = document.createElement(\"span\");\n tmp.innerHTML = txt;\n el.appendChild(tmp);\n const size = tmp.offsetWidth;\n tmp.parentNode.removeChild(tmp);\n\n // Figure out our word spacing and return the element\n const wordSpacing = Math.floor((conWidth - size) / (words - 1));\n tmp.style.wordSpacing = `${wordSpacing}px`;\n tmp.setAttribute(\"data-owner\", \"balance-text-justify\");\n\n const div = document.createElement(\"div\");\n div.appendChild(tmp);\n return div.innerHTML;\n }\n\n /**\n * Returns true iff char at index is a break char outside of HTML < > tags.\n * Break char can be: whitespace (except non-breaking-space: u00a0),\n * hypen, emdash (u2014), endash (u2013), or soft-hyphen (u00ad).\n *\n * @param {string} txt - the text to check\n * @param {number} index - the index of the character to check\n * @return {boolean}\n */\n function isBreakChar(txt, index) {\n const re = /([^\\S\\u00a0]|-|\\u2014|\\u2013|\\u00ad)(?![^<]*>)/g;\n let match;\n\n if (!breakMatches) {\n // Only calc break matches once per line\n breakMatches = [];\n match = re.exec(txt);\n while (match !== null) {\n if (!isWhiteSpaceNoWrap(match.index)) {\n breakMatches.push(match.index);\n }\n match = re.exec(txt);\n }\n }\n\n return breakMatches.indexOf(index) !== -1;\n }\n\n /**\n * In the current implementation, an index is a break\n * opportunity in txt iff it is:\n * - 0 or txt.length\n * - index of a non-whitespace char immediately preceded by a\n * whitespace, hyphen, soft-hyphen, em-dash, or en-dash char.\n *\n * Thus, it doesn't honour \"white-space\" or any other Unicode\n * line-breaking classes.)\n *\n * @precondition 0 <= index && index <= txt.length\n *\n * @param {string} txt - the text to check\n * @param {number} index - the index to check\n * @return {boolean}\n */\n function isBreakOpportunity(txt, index) {\n return ((index === 0) || (index === txt.length) ||\n (isBreakChar(txt, index - 1) && !isBreakChar(txt, index)));\n }\n\n /**\n * Finds the first break opportunity (@see isBreakOpportunity)\n * in txt that's both after-or-equal-to index c in the direction dir\n * and resulting in line width equal to or past clamp(desWidth,\n * 0, conWidth) in direction dir. Sets ret.index and ret.width\n * to the corresponding index and line width (from the start of\n * txt to ret.index).\n *\n * @param {Node} el - element\n * @param {string} txt - text string\n * @param {number} conWidth - container width\n * @param {number} desWidth - desired width\n * @param {number} dir - direction (-1 or +1)\n * @param {number} c - char index (0 <= c && c <= txt.length)\n * @param {Object} ret - return {index: {number}, width: {number}} of previous/next break\n */\n function findBreakOpportunity(el, txt, conWidth, desWidth, dir, c, ret) {\n let w;\n\n if (txt && typeof txt === \"string\") {\n for (;;) {\n while (!isBreakOpportunity(txt, c)) {\n c += dir;\n }\n\n el.innerHTML = txt.substr(0, c);\n w = el.offsetWidth;\n\n if (dir < 0) {\n if ((w <= desWidth) || (w <= 0) || (c === 0)) {\n break;\n }\n } else if ((desWidth <= w) || (conWidth <= w) || (c === txt.length)) {\n break;\n }\n\n c += dir;\n }\n }\n ret.index = c;\n ret.width = w;\n }\n\n /**\n * Detects the width of a non-breaking space character, given the height of\n * the element with no-wrap applied.\n *\n * @param {Node} el - element\n * @param {number} h - height\n * @return {number}\n */\n function getSpaceWidth(el, h) {\n const container = document.createElement(\"div\");\n\n container.style.display = \"block\";\n container.style.position = \"absolute\";\n container.style.bottom = 0;\n container.style.right = 0;\n container.style.width = 0;\n container.style.height = 0;\n container.style.margin = 0;\n container.style.padding = 0;\n container.style.visibility = \"hidden\";\n container.style.overflow = \"hidden\";\n\n const space = document.createElement(\"span\");\n\n space.style.fontSize = \"2000px\";\n space.innerHTML = \" \";\n\n container.appendChild(space);\n\n el.appendChild(container);\n\n const dims = space.getBoundingClientRect();\n container.parentNode.removeChild(container);\n\n const spaceRatio = dims.height / dims.width;\n\n return (h / spaceRatio);\n }\n\n /**\n * Get a list of elements regardless of input\n *\n * @param {string|Node|Array-like} elements - The selector to query, one or more elements\n * @return {Array<{Node}>}\n */\n function getElementsList(elements) {\n if (!elements) {\n return [];\n }\n\n // is selector\n if (typeof elements === \"string\") {\n return document.querySelectorAll(elements);\n }\n\n // is single element\n if (elements.tagName && elements.querySelectorAll) {\n return [elements];\n }\n\n return elements;\n }\n\n /**\n * When a browser has native support for the text-wrap property,\n * the text balanceText plugin will let the browser handle it natively,\n * otherwise it will apply its own text balancing code.\n *\n * @param {string|Node|Array-like} elements - the list of elements to balance\n */\n function balanceText(elements) {\n forEach(getElementsList(elements), (el) => {\n // In a lower level language, this algorithm takes time\n // comparable to normal text layout other than the fact\n // that we do two passes instead of one, so we should\n // be able to do without this limit.\n const maxTextWidth = 5000;\n\n // strip balance-text generated tags\n removeTags(el);\n\n // save settings\n const oldWS = el.style.whiteSpace;\n const oldFloat = el.style.float;\n const oldDisplay = el.style.display;\n const oldPosition = el.style.position;\n const oldLH = el.style.lineHeight;\n\n // remove line height before measuring container size\n el.style.lineHeight = \"normal\";\n\n const containerWidth = el.offsetWidth;\n const containerHeight = el.offsetHeight;\n\n // temporary settings\n el.style.whiteSpace = \"nowrap\";\n el.style.float = \"none\";\n el.style.display = \"inline\";\n el.style.position = \"static\";\n\n let nowrapWidth = el.offsetWidth;\n const nowrapHeight = el.offsetHeight;\n\n // An estimate of the average line width reduction due\n // to trimming trailing space that we expect over all\n // lines other than the last.\n const spaceWidth = ((oldWS === \"pre-wrap\") ? 0 : getSpaceWidth(el, nowrapHeight));\n\n if (containerWidth > 0 && // prevent divide by zero\n nowrapWidth > containerWidth && // text is more than 1 line\n nowrapWidth < maxTextWidth) { // text is less than arbitrary limit (make this a param?)\n let remainingText = el.innerHTML;\n let newText = \"\";\n let lineText = \"\";\n const shouldJustify = isJustified(el);\n const totLines = Math.round(containerHeight / nowrapHeight);\n let remLines = totLines;\n let lineCharOffset = 0;\n\n // loop vars\n let desiredWidth, guessIndex, le, ge, splitIndex, isHyphen, isSoftHyphen;\n\n // Determine where to break:\n while (remLines > 1) {\n // clear whitespace match cache for each line\n breakMatches = null;\n\n // Must calc white-space:nowrap offsets before first call to findBreakOpportunity()\n calcNoWrapOffsetsForLine(el, oldWS, lineCharOffset);\n\n desiredWidth = Math.round((nowrapWidth + spaceWidth) / remLines - spaceWidth);\n\n // Guessed char index\n guessIndex = Math.round((remainingText.length + 1) / remLines) - 1;\n\n le = new NextWS_params();\n\n // Find a breaking space somewhere before (or equal to) desired width,\n // not necessarily the closest to the desired width.\n findBreakOpportunity(el, remainingText, containerWidth, desiredWidth, -1, guessIndex, le);\n\n // Find first breaking char after (or equal to) desired width.\n ge = new NextWS_params();\n guessIndex = le.index;\n findBreakOpportunity(el, remainingText, containerWidth, desiredWidth, +1, guessIndex, ge);\n\n // Find first breaking char before (or equal to) desired width.\n le.reset();\n guessIndex = ge.index;\n findBreakOpportunity(el, remainingText, containerWidth, desiredWidth, -1, guessIndex, le);\n\n // Find closest string to desired length\n if (le.index === 0) {\n splitIndex = ge.index;\n } else if ((containerWidth < ge.width) || (le.index === ge.index)) {\n splitIndex = le.index;\n } else {\n splitIndex = ((Math.abs(desiredWidth - le.width) < Math.abs(ge.width - desiredWidth))\n ? le.index\n : ge.index);\n }\n\n // Break string\n lineText = remainingText.substr(0, splitIndex).replace(/\\s$/, \"\");\n\n isSoftHyphen = Boolean(lineText.match(/\\u00ad$/));\n if (isSoftHyphen) {\n // Replace soft-hyphen causing break with explicit hyphen\n lineText = lineText.replace(/\\u00ad$/, '-');\n }\n\n if (shouldJustify) {\n newText += justify(el, lineText, containerWidth);\n } else {\n newText += lineText;\n isHyphen = isSoftHyphen || Boolean(lineText.match(/(-|\\u2014|\\u2013)$/));\n newText += isHyphen ? '
'\n : '
';\n }\n remainingText = remainingText.substr(splitIndex);\n lineCharOffset = splitIndex;\n\n // update counters\n remLines--;\n el.innerHTML = remainingText;\n nowrapWidth = el.offsetWidth;\n }\n\n if (shouldJustify) {\n el.innerHTML = newText + justify(el, remainingText, containerWidth);\n } else {\n el.innerHTML = newText + remainingText;\n }\n }\n\n // restore settings\n el.style.whiteSpace = oldWS;\n el.style.float = oldFloat;\n el.style.display = oldDisplay;\n el.style.position = oldPosition;\n el.style.lineHeight = oldLH;\n });\n }\n\n /**\n * Call the balanceText plugin on elements that it's watching.\n */\n function updateWatched() {\n const selectors = watching.sel.join(\",\");\n const selectedElements = getElementsList(selectors);\n const elements = Array.prototype.concat.apply(watching.el, selectedElements);\n balanceText(elements);\n }\n\n /**\n * Initialize the events for which to re-apply BalanceText. They are:\n * - Document ready\n * - Document full load\n * - Window resize\n */\n function initHandlers() {\n if (handlersInitialized) {\n return;\n }\n\n // Apply on DOM ready\n ready(updateWatched);\n\n // Reapply on full load\n window.addEventListener(\"load\", updateWatched);\n\n // Reapply on resize\n window.addEventListener(\"resize\", debounce(updateWatched));\n\n handlersInitialized = true;\n }\n\n /**\n * Apply the BalanceText routine on the document and watch the list\n * of elements. On window resize, re-apply BalanceText to the given elements\n *\n * @param {string|Node|Array-like} elements - the elements to watch after applying BalanceText\n */\n function balanceTextAndWatch(elements) {\n if (typeof elements === \"string\") {\n watching.sel.push(elements);\n } else {\n forEach(getElementsList(elements), (el) => {\n watching.el.push(el);\n });\n }\n\n initHandlers();\n updateWatched();\n }\n\n /**\n * Stop watching elements\n *\n * @param {string|Node|Array-like} elements\n */\n function unwatch(elements) {\n if (typeof elements === \"string\") {\n watching.sel = watching.sel.filter(el => el !== elements);\n } else {\n elements = getElementsList(elements);\n watching.el = watching.el.filter(el => elements.indexOf(el) === -1);\n }\n }\n\n /**\n * Treat this app as a polyfill. Watch for changes to the .balance-text selector\n */\n function polyfill() {\n if (polyfilled) {\n return;\n }\n\n watching.sel.push(\".balance-text\");\n initHandlers();\n polyfilled = true;\n }\n\n /**\n * Public interface\n *\n * @param {string|Node|Array-like} elements - elements to balance\n * @param {Object} options - processing options\n * - {boolean} watch - watch elements for resize\n */\n function publicInterface(elements, options) {\n if (!elements) {\n // empty call means polyfill (watch for changes)\n polyfill();\n } else if (options && options.watch === true) {\n balanceTextAndWatch(elements);\n } else if (options && options.watch === false) {\n unwatch(elements);\n } else {\n balanceText(elements);\n }\n }\n\n publicInterface.updateWatched = updateWatched;\n\n if (hasTextWrap()) {\n noop.updateWatched = noop;\n return noop;\n }\n return publicInterface;\n}));\n","/**\n * cuid.js\n * Collision-resistant UID generator for browsers and node.\n * Sequential for fast db lookups and recency sorting.\n * Safe for element IDs and server-side lookups.\n *\n * Extracted from CLCTR\n *\n * Copyright (c) Eric Elliott 2012\n * MIT License\n */\n\nvar fingerprint = require('./lib/fingerprint.js');\nvar pad = require('./lib/pad.js');\nvar getRandomValue = require('./lib/getRandomValue.js');\n\nvar c = 0,\n blockSize = 4,\n base = 36,\n discreteValues = Math.pow(base, blockSize);\n\nfunction randomBlock () {\n return pad((getRandomValue() *\n discreteValues << 0)\n .toString(base), blockSize);\n}\n\nfunction safeCounter () {\n c = c < discreteValues ? c : 0;\n c++; // this is not subliminal\n return c - 1;\n}\n\nfunction cuid () {\n // Starting with a lowercase letter makes\n // it HTML element ID friendly.\n var letter = 'c', // hard-coded allows for sequential access\n\n // timestamp\n // warning: this exposes the exact date and time\n // that the uid was created.\n timestamp = (new Date().getTime()).toString(base),\n\n // Prevent same-machine collisions.\n counter = pad(safeCounter().toString(base), blockSize),\n\n // A few chars to generate distinct ids for different\n // clients (so different computers are far less\n // likely to generate the same id)\n print = fingerprint(),\n\n // Grab some more chars from Math.random()\n random = randomBlock() + randomBlock();\n\n return letter + timestamp + counter + print + random;\n}\n\ncuid.slug = function slug () {\n var date = new Date().getTime().toString(36),\n counter = safeCounter().toString(36).slice(-4),\n print = fingerprint().slice(0, 1) +\n fingerprint().slice(-1),\n random = randomBlock().slice(-2);\n\n return date.slice(-2) +\n counter + print + random;\n};\n\ncuid.isCuid = function isCuid (stringToCheck) {\n if (typeof stringToCheck !== 'string') return false;\n if (stringToCheck.startsWith('c')) return true;\n return false;\n};\n\ncuid.isSlug = function isSlug (stringToCheck) {\n if (typeof stringToCheck !== 'string') return false;\n var stringLength = stringToCheck.length;\n if (stringLength >= 7 && stringLength <= 10) return true;\n return false;\n};\n\ncuid.fingerprint = fingerprint;\n\nmodule.exports = cuid;\n","var pad = require('./pad.js');\n\nvar env = typeof window === 'object' ? window : self;\nvar globalCount = Object.keys(env).length;\nvar mimeTypesLength = navigator.mimeTypes ? navigator.mimeTypes.length : 0;\nvar clientId = pad((mimeTypesLength +\n navigator.userAgent.length).toString(36) +\n globalCount.toString(36), 4);\n\nmodule.exports = function fingerprint () {\n return clientId;\n};\n","\nvar getRandomValue;\n\nvar crypto = typeof window !== 'undefined' &&\n (window.crypto || window.msCrypto) ||\n typeof self !== 'undefined' &&\n self.crypto;\n\nif (crypto) {\n var lim = Math.pow(2, 32) - 1;\n getRandomValue = function () {\n return Math.abs(crypto.getRandomValues(new Uint32Array(1))[0] / lim);\n };\n} else {\n getRandomValue = Math.random;\n}\n\nmodule.exports = getRandomValue;\n","module.exports = function pad (num, size) {\n var s = '000000000' + num;\n return s.substr(s.length - size);\n};\n","function debounce(function_, wait = 100, options = {}) {\n\tif (typeof function_ !== 'function') {\n\t\tthrow new TypeError(`Expected the first parameter to be a function, got \\`${typeof function_}\\`.`);\n\t}\n\n\tif (wait < 0) {\n\t\tthrow new RangeError('`wait` must not be negative.');\n\t}\n\n\t// TODO: Deprecate the boolean parameter at some point.\n\tconst {immediate} = typeof options === 'boolean' ? {immediate: options} : options;\n\n\tlet storedContext;\n\tlet storedArguments;\n\tlet timeoutId;\n\tlet timestamp;\n\tlet result;\n\n\tfunction run() {\n\t\tconst callContext = storedContext;\n\t\tconst callArguments = storedArguments;\n\t\tstoredContext = undefined;\n\t\tstoredArguments = undefined;\n\t\tresult = function_.apply(callContext, callArguments);\n\t\treturn result;\n\t}\n\n\tfunction later() {\n\t\tconst last = Date.now() - timestamp;\n\n\t\tif (last < wait && last >= 0) {\n\t\t\ttimeoutId = setTimeout(later, wait - last);\n\t\t} else {\n\t\t\ttimeoutId = undefined;\n\n\t\t\tif (!immediate) {\n\t\t\t\tresult = run();\n\t\t\t}\n\t\t}\n\t}\n\n\tconst debounced = function (...arguments_) {\n\t\tif (\n\t\t\tstoredContext\n\t\t\t&& this !== storedContext\n\t\t\t&& Object.getPrototypeOf(this) === Object.getPrototypeOf(storedContext)\n\t\t) {\n\t\t\tthrow new Error('Debounced method called with different contexts of the same prototype.');\n\t\t}\n\n\t\tstoredContext = this; // eslint-disable-line unicorn/no-this-assignment\n\t\tstoredArguments = arguments_;\n\t\ttimestamp = Date.now();\n\n\t\tconst callNow = immediate && !timeoutId;\n\n\t\tif (!timeoutId) {\n\t\t\ttimeoutId = setTimeout(later, wait);\n\t\t}\n\n\t\tif (callNow) {\n\t\t\tresult = run();\n\t\t}\n\n\t\treturn result;\n\t};\n\n\tObject.defineProperty(debounced, 'isPending', {\n\t\tget() {\n\t\t\treturn timeoutId !== undefined;\n\t\t},\n\t});\n\n\tdebounced.clear = () => {\n\t\tif (!timeoutId) {\n\t\t\treturn;\n\t\t}\n\n\t\tclearTimeout(timeoutId);\n\t\ttimeoutId = undefined;\n\t};\n\n\tdebounced.flush = () => {\n\t\tif (!timeoutId) {\n\t\t\treturn;\n\t\t}\n\n\t\tdebounced.trigger();\n\t};\n\n\tdebounced.trigger = () => {\n\t\tresult = run();\n\n\t\tdebounced.clear();\n\t};\n\n\treturn debounced;\n}\n\n// Adds compatibility for ES modules\nmodule.exports.debounce = debounce;\n\nmodule.exports = debounce;\n","module.exports = require('./src/get-element-tag')\n","module.exports = require('./src/html-tagged-template-literal.js')\n","/**\n * Creates a valid custom element name that is versioned (major)\n */\nfunction getElementTag(name, version) {\n const formattedVersion = version ? `-v${version.split('.')[0]}` : ''\n return name + formattedVersion\n}\n\nmodule.exports.getElementTag = getElementTag\n","/**\n * Concats a template literal and interpolates values correctly, as well as removes formatting whitespace and HTML comments\n */\nfunction html(strings, ...interpolations) {\n let str = strings[0]\n for (let i = 0; i < interpolations.length; i++) {\n str += interpolations[i]\n str += strings[i + 1]\n }\n\n return str.replace(/>\\s+<')\n}\n\nmodule.exports.html = html\n","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import _defineProperty from '@babel/runtime/helpers/defineProperty';\n\n/* eslint-disable compat/compat */\n\nvar defaultRoot;\nfunction isDocumentRootSupported() {\n try {\n // eslint-disable-next-line no-new\n new IntersectionObserver(() => {}, {\n root: document\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Returns default root for IntersectionObserver (document if supported and null otherwise).\n *\n * Intersections will be detected against the top level viewport if root is null.\n * This works fine in standalone pages.\n * But, in frame previews we want the intersection to be against the documents scrollport and not the viewport of the parent page.\n *\n * https://github.com/w3c/IntersectionObserver/issues/372\n *\n * @return {Document | null}\n */\nfunction getDefaultRoot() {\n if (typeof defaultRoot === 'undefined') {\n defaultRoot = isDocumentRootSupported() ? document : null;\n }\n return defaultRoot;\n}\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nvar defaultConfig = {\n rootMargin: '0px 0px 0px 0px',\n threshold: [0, 0.5, 1],\n root: getDefaultRoot()\n};\nclass ElementIntersectionObserver {\n constructor(elements, onChange, config) {\n _defineProperty(this, \"intersections\", void 0);\n _defineProperty(this, \"elements\", void 0);\n this.elements = elements.slice(0);\n this.intersections = elements.map(target => ({\n target,\n isIntersecting: false,\n ratio: null\n }));\n this.intersectionObserver = new IntersectionObserver(entries => {\n var intersections = this.intersections.slice(0);\n entries.forEach(entry => {\n var idx = elements.indexOf(entry.target);\n intersections.splice(idx, 1, {\n target: entry.target,\n isIntersecting: entry.isIntersecting,\n ratio: entry.intersectionRatio\n });\n });\n this.intersections = intersections;\n onChange(this.intersections);\n }, _objectSpread(_objectSpread({}, defaultConfig), config));\n elements.forEach(elm => this.intersectionObserver.observe(elm));\n }\n disconnect() {\n // Unregister trigger elements\n this.elements.forEach(elm => this.intersectionObserver.unobserve(elm));\n\n // Disconnect intersection observer\n this.intersectionObserver.disconnect();\n }\n}\n\nfunction toggleAttribute(el, name, boolValue) {\n if (!el) {\n return;\n }\n var nextValue;\n if (typeof boolValue !== 'undefined') {\n nextValue = !!boolValue;\n } else {\n nextValue = el.hasAttribute(name);\n }\n if (nextValue) {\n el.setAttribute(name, '');\n } else {\n el.removeAttribute(name);\n }\n}\nfunction setAttribute(el, name, nextValue) {\n if (!el) {\n return;\n }\n if (nextValue) {\n el.setAttribute(name, nextValue);\n } else {\n el.removeAttribute(name);\n }\n}\nvar closest = (() => {\n var proto = typeof window === 'undefined' ? {} : window.Element.prototype;\n var match = proto.matches || proto.msMatchesSelector || proto.webkitMatchesSelector;\n if (proto.closest) {\n return (el, css) => el.closest(css);\n } else {\n return (el, css) => {\n for (; el; el = el.parentElement) if (match.call(el, css)) return el;\n return null;\n };\n }\n})();\nfunction addStyle(nodeName, css) {\n var key = \"style-\".concat(nodeName.toLowerCase());\n var min = css.replace(/\\/\\*[^!][^*]*\\*\\//g, '').replace(/\\s*(^|[:;,{}]|$)\\s*/g, '$1');\n document.getElementById(key) || document.head.insertAdjacentHTML('afterbegin', \"\"));\n}\nfunction toArray(nodeList) {\n return [].slice.call(nodeList);\n}\nfunction dispatchEvent(element, name) {\n var detail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var ignore = \"prevent_recursive_dispatch_maximum_callstack\".concat(name);\n var event;\n if (element[ignore]) return true;\n // We are already processing this event, so skip sending a new one\n else element[ignore] = true; // Add name to dispatching ignore\n\n if (typeof window.CustomEvent === 'function') {\n event = new window.CustomEvent(name, {\n bubbles: true,\n cancelable: true,\n detail\n });\n } else {\n event = document.createEvent('CustomEvent');\n event.initCustomEvent(name, true, true, detail);\n }\n // IE reports incorrect event.defaultPrevented\n // but correct return value on element.dispatchEvent\n var result = element.dispatchEvent(event);\n element[ignore] = null; // Remove name from dispatching ignore\n\n return result; // Follow W3C standard for return value\n}\n\nfunction easeOutQuint(t) {\n return 1 + --t * t * t * t * t;\n}\nclass VerticalScroll {\n constructor(container) {\n _defineProperty(this, \"container\", void 0);\n this.container = container;\n }\n cancel() {\n this._cancelled = true;\n }\n to(top) {\n var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000;\n var callback = arguments.length > 2 ? arguments[2] : undefined;\n var from = this.container.scrollTop;\n var distance = top - from;\n var startTime = null;\n var loop = currentTime => {\n if (this._cancelled) {\n return;\n }\n if (!startTime) {\n startTime = currentTime - 1;\n }\n var timeElapsed = currentTime - startTime;\n if (timeElapsed < duration) {\n this.container.scrollTop = from + distance * easeOutQuint(timeElapsed / duration);\n window.requestAnimationFrame(loop);\n } else {\n this.container.scrollTop = top;\n callback && callback();\n }\n };\n\n // eslint-disable-next-line compat/compat\n window.requestAnimationFrame(loop);\n }\n}\nclass HorizontalScroll {\n constructor(container) {\n _defineProperty(this, \"container\", void 0);\n this.container = container;\n }\n cancel() {\n this._cancelled = true;\n }\n to(left) {\n var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000;\n var callback = arguments.length > 2 ? arguments[2] : undefined;\n var from = this.container.scrollLeft;\n var distance = left - from;\n var startTime = null;\n var loop = currentTime => {\n if (this._cancelled) {\n return;\n }\n if (!startTime) {\n startTime = currentTime - 1;\n }\n var timeElapsed = currentTime - startTime;\n if (timeElapsed < duration) {\n this.container.scrollLeft = from + distance * easeOutQuint(timeElapsed / duration);\n window.requestAnimationFrame(loop);\n } else {\n this.container.scrollLeft = left;\n callback && callback();\n }\n };\n\n // eslint-disable-next-line compat/compat\n window.requestAnimationFrame(loop);\n }\n}\n\nfunction testReducedMotion() {\n if (typeof window !== 'undefined') {\n return !!window.matchMedia && window.matchMedia('(prefers-reduced-motion)').matches;\n }\n return false;\n}\n\nvar MAX_SAFE_INTEGER = 9007199254740991;\nfunction withinRange(current) {\n var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var stop = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : MAX_SAFE_INTEGER;\n return current >= start && current <= stop;\n}\nfunction withinStops(currentTime, stops, targetStop) {\n var nrOfStops = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;\n var uniqueStops = stops.filter(unique);\n var targetTime = stops[targetStop];\n var prevTime = uniqueStops[uniqueStops.indexOf(targetTime) - nrOfStops];\n var nextTime = uniqueStops[uniqueStops.indexOf(targetTime) + nrOfStops];\n return withinRange(currentTime, prevTime, nextTime);\n}\nfunction unique(value, index, self) {\n return self.indexOf(value) === index;\n}\n\n/*\n * 'loading=\"lazy\"' is defined in terms of IntersectionObserver and the initial root.\n * As a result images with 'loading=\"lazy\"' inside a scroll container will not load\n * until they at least have one pixel visible in the viewport.\n *\n * This will hopefully fixed in a future version of the spec:\n * https://github.com/w3c/IntersectionObserver/issues/431\n *\n * scroll-container-lazy-load observes images and a scroll container.\n * Once images are close to intersecting it will change 'loading=\"lazy\"' to 'loading=\"eager\"'.\n * */\nfunction loadImage(image) {\n if (image.loading === 'lazy') {\n image.loading = 'eager';\n }\n}\nfunction connectScrollContainerLazyLoad(container, images) {\n var containerIntersecting = false;\n var deferredImages = [];\n\n // eslint-disable-next-line compat/compat\n var containerObserver = new IntersectionObserver(entries => {\n containerIntersecting = entries === null || entries === void 0 ? void 0 : entries[0].isIntersecting;\n if (containerIntersecting) {\n deferredImages.forEach(image => loadImage(image));\n deferredImages = [];\n }\n }, {\n root: getDefaultRoot(),\n threshold: [0.0]\n });\n containerObserver.observe(container);\n\n // eslint-disable-next-line compat/compat\n var imageObserver = new IntersectionObserver(entries => {\n for (var entry of entries) {\n if (entry.isIntersecting) {\n var image = entry.target;\n imageObserver.unobserve(image);\n if (containerIntersecting) {\n loadImage(image);\n } else {\n /* Defer loading of if the container is not intersecting the viewport */\n deferredImages.push(image);\n }\n }\n }\n }, {\n root: container,\n rootMargin: '300px',\n threshold: 0.0\n });\n for (var image of images) {\n imageObserver.observe(image);\n }\n return () => {\n containerObserver.disconnect();\n imageObserver.disconnect();\n };\n}\n\nfunction debounce(fn, delay) {\n var timeout;\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n clearTimeout(timeout);\n timeout = setTimeout(() => fn(...args), delay);\n };\n}\n\nexport { ElementIntersectionObserver, HorizontalScroll, VerticalScroll, addStyle, closest, connectScrollContainerLazyLoad, debounce, dispatchEvent, setAttribute, testReducedMotion, toArray, toggleAttribute, withinRange, withinStops };\n//# sourceMappingURL=index.esm.js.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + ({\"199\":\"dh-karthistorie\",\"667\":\"dh-stegvis-lottie\"}[chunkId] || chunkId) + \"-chunk-\" + {\"199\":\"0813fb78909452efc7fd\",\"529\":\"2848f8ae1f80417f50ab\",\"667\":\"093c87e18dcb15824345\"}[chunkId] + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + \"a829592c9123ececa37f\" + \".css\";\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"https://static.nrk.no/dh/module/introscroll/static/\";","if (typeof document === \"undefined\") return;\nvar createStylesheet = (chunkId, fullhref, oldTag, resolve, reject) => {\n\tvar linkTag = document.createElement(\"link\");\n\n\tlinkTag.rel = \"stylesheet\";\n\tlinkTag.type = \"text/css\";\n\tif (__webpack_require__.nc) {\n\t\tlinkTag.nonce = __webpack_require__.nc;\n\t}\n\tvar onLinkComplete = (event) => {\n\t\t// avoid mem leaks.\n\t\tlinkTag.onerror = linkTag.onload = null;\n\t\tif (event.type === 'load') {\n\t\t\tresolve();\n\t\t} else {\n\t\t\tvar errorType = event && event.type;\n\t\t\tvar realHref = event && event.target && event.target.href || fullhref;\n\t\t\tvar err = new Error(\"Loading CSS chunk \" + chunkId + \" failed.\\n(\" + errorType + \": \" + realHref + \")\");\n\t\t\terr.name = \"ChunkLoadError\";\n\t\t\terr.code = \"CSS_CHUNK_LOAD_FAILED\";\n\t\t\terr.type = errorType;\n\t\t\terr.request = realHref;\n\t\t\tif (linkTag.parentNode) linkTag.parentNode.removeChild(linkTag)\n\t\t\treject(err);\n\t\t}\n\t}\n\tlinkTag.onerror = linkTag.onload = onLinkComplete;\n\tlinkTag.href = fullhref;\n\n\n\tif (oldTag) {\n\t\toldTag.parentNode.insertBefore(linkTag, oldTag.nextSibling);\n\t} else {\n\t\tdocument.head.appendChild(linkTag);\n\t}\n\treturn linkTag;\n};\nvar findStylesheet = (href, fullhref) => {\n\tvar existingLinkTags = document.getElementsByTagName(\"link\");\n\tfor(var i = 0; i < existingLinkTags.length; i++) {\n\t\tvar tag = existingLinkTags[i];\n\t\tvar dataHref = tag.getAttribute(\"data-href\") || tag.getAttribute(\"href\");\n\t\tif(tag.rel === \"stylesheet\" && (dataHref === href || dataHref === fullhref)) return tag;\n\t}\n\tvar existingStyleTags = document.getElementsByTagName(\"style\");\n\tfor(var i = 0; i < existingStyleTags.length; i++) {\n\t\tvar tag = existingStyleTags[i];\n\t\tvar dataHref = tag.getAttribute(\"data-href\");\n\t\tif(dataHref === href || dataHref === fullhref) return tag;\n\t}\n};\nvar loadStylesheet = (chunkId) => {\n\treturn new Promise((resolve, reject) => {\n\t\tvar href = __webpack_require__.miniCssF(chunkId);\n\t\tvar fullhref = __webpack_require__.p + href;\n\t\tif(findStylesheet(href, fullhref)) return resolve();\n\t\tcreateStylesheet(chunkId, fullhref, null, resolve, reject);\n\t});\n}\n// object to store loaded CSS chunks\nvar installedCssChunks = {\n\t792: 0\n};\n\n__webpack_require__.f.miniCss = (chunkId, promises) => {\n\tvar cssChunks = {\"529\":1};\n\tif(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);\n\telse if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {\n\t\tpromises.push(installedCssChunks[chunkId] = loadStylesheet(chunkId).then(() => {\n\t\t\tinstalledCssChunks[chunkId] = 0;\n\t\t}, (e) => {\n\t\t\tdelete installedCssChunks[chunkId];\n\t\t\tthrow e;\n\t\t}));\n\t}\n};\n\n// no hmr\n\n// no prefetching\n\n// no preloaded","function t(){var t,e=navigator.userAgent||navigator.vendor||window.opera,i=e.toLowerCase();return!!e&&(!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform)&&(t=/fban|fbav|instagram|firefox|opera|fxios/),t&&t.test(i))}var e={ssrOrientation:null,mode:\"max\"},i=function(t){var i,n,o;void 0===t&&(t={}),this.destroyed=!1,this.mounted=!1,this.listeners=[],this.value={portrait:0,landscape:0},this.opts=Object.assign({},e,t),this.orientation=this.getOrientation(),this.update(),this.handleUpdate=this.handleUpdate.bind(this),this.throttledUpdate=(i=this.handleUpdate,function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=this;o?(clearTimeout(n),n=setTimeout(function(){Date.now()-o>=100&&(i.apply(r,t),o=Date.now())},100-(Date.now()-o))):(i.apply(r,t),o=Date.now())})};function n(){var t=new i;return t.listen(function(t){try{document.getElementsByTagName(\"html\")[0].style.setProperty(\"--dh-vh\",t+\"px\")}catch(t){console.error(t)}}),t}function o(){return\"Dh Vh\"}i.prototype.mount=function(){\"undefined\"!=typeof window&&(window.addEventListener(\"resize\",this.throttledUpdate),window.addEventListener(\"orientationchange\",this.handleUpdate)),this.mounted=!0},i.prototype.destroy=function(){\"undefined\"!=typeof window&&(window.removeEventListener(\"resize\",this.throttledUpdate),window.removeEventListener(\"orientationchange\",this.handleUpdate)),this.mounted=!1},i.prototype.getOrientation=function(){return\"undefined\"!=typeof window?window.innerHeight>window.innerWidth?\"portrait\":\"landscape\":this.opts.ssrOrientation},i.prototype.handleUpdate=function(){this.update()},i.prototype.listen=function(t){var e=this;return this.listeners.push(t),!1===this.mounted&&this.mount(),function(){e.listeners=e.listeners.filter(function(e){return e!==t})}},i.prototype.emit=function(){var t=this,e=this.getVh(),i=this.getHeight();this.listeners.forEach(function(n){return n(e,i,t.orientation)})},i.prototype.getHeight=function(){return this.orientation?this.value[this.orientation]:0},i.prototype.getVh=function(){return this.orientation?this.value[this.orientation]/100:0},i.prototype.update=function(){var t=this.orientation;if(this.orientation=this.getOrientation(),this.orientation){var e=this.value[this.orientation],i=window.innerHeight;t!==this.orientation?(i>e&&(this.value[this.orientation]=i),this.emit()):i>e&&(this.value[this.orientation]=i,this.emit())}};export{o as test,t as checkHasVhBug,n as fixVhBug};\n//# sourceMappingURL=index.mjs.map\n","import { checkHasVhBug, fixVhBug } from '@nrk/dh-vh'\n\nif (checkHasVhBug()) {\n fixVhBug()\n}\n","import assertClassBrand from \"./assertClassBrand.js\";\nfunction _classPrivateFieldGet2(s, a) {\n return s.get(assertClassBrand(s, a));\n}\nexport { _classPrivateFieldGet2 as default };","function _assertClassBrand(e, t, n) {\n if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;\n throw new TypeError(\"Private element is not present on this object\");\n}\nexport { _assertClassBrand as default };","import classApplyDescriptorGet from \"./classApplyDescriptorGet.js\";\nimport classPrivateFieldGet2 from \"./classPrivateFieldGet2.js\";\nfunction _classPrivateFieldGet(e, t) {\n var r = classPrivateFieldGet2(t, e);\n return classApplyDescriptorGet(e, r);\n}\nexport { _classPrivateFieldGet as default };","function _classApplyDescriptorGet(e, t) {\n return t.get ? t.get.call(e) : t.value;\n}\nexport { _classApplyDescriptorGet as default };","import classApplyDescriptorSet from \"./classApplyDescriptorSet.js\";\nimport classPrivateFieldGet2 from \"./classPrivateFieldGet2.js\";\nfunction _classPrivateFieldSet(e, t, r) {\n var s = classPrivateFieldGet2(t, e);\n return classApplyDescriptorSet(e, s, r), r;\n}\nexport { _classPrivateFieldSet as default };","function _classApplyDescriptorSet(e, t, l) {\n if (t.set) t.set.call(e, l);else {\n if (!t.writable) throw new TypeError(\"attempted to set read only private field\");\n t.value = l;\n }\n}\nexport { _classApplyDescriptorSet as default };","import _classPrivateFieldGet from '@babel/runtime/helpers/classPrivateFieldGet';\nimport _classPrivateFieldSet from '@babel/runtime/helpers/classPrivateFieldSet';\nimport _defineProperty from '@babel/runtime/helpers/defineProperty';\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nvar dedupeId = 0;\n\n/**\n * @template {HTMLElement} BaseClass\n * @param {(base: BaseClass) => BaseClass} mixin\n */\nfunction dedupeMixin(mixin) {\n var mixinId = dedupeId++;\n return base => {\n var _base$_appliedMixins, _base$_appliedMixins2;\n if ((_base$_appliedMixins = base._appliedMixins) !== null && _base$_appliedMixins !== void 0 && _base$_appliedMixins[mixinId]) {\n return base;\n }\n var extended = mixin(base);\n extended._appliedMixins = _objectSpread({}, (_base$_appliedMixins2 = base._appliedMixins) !== null && _base$_appliedMixins2 !== void 0 ? _base$_appliedMixins2 : {});\n extended._appliedMixins[mixinId] = true;\n return extended;\n };\n}\n\nfunction _classPrivateMethodInitSpec$1(obj, privateSet) { _checkPrivateRedeclaration$1(obj, privateSet); privateSet.add(obj); }\nfunction _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration$1(obj, privateMap); privateMap.set(obj, value); }\nfunction _checkPrivateRedeclaration$1(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\nfunction _classPrivateMethodGet$1(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError(\"attempted to get private field on non-instance\"); } return fn; }\nvar VIEWPORT_POSITION_ATTR = 'viewport-position';\nvar VIEWPORT_POSITIONS = {\n aboveViewport: 'ABOVE-VIEWPORT',\n inViewport: 'IN-VIEWPORT',\n belowViewport: 'BELOW-VIEWPORT'\n};\n\n/**\n * Check if element represents the browser viewport\n *\n * @param viewportContainer Element to check\n * @returns {boolean} True if element represents the browser viewport and not a scroll container\n */\nfunction isViewport(viewportContainer) {\n return (\n // eslint-disable-next-line compat/compat\n viewportContainer === document.scrollingElement || viewportContainer === document.documentElement\n );\n}\n\n/**\n * Custom Element mixin.\n *\n * Updates the `viewport-position` attribute according to whether the element is in the viewport or not.\n * Possible values for the attribute is `IN-VIEWPORT`, `ABOVE-VIEWPORT` and `BELOW-VIEWPORT`\n *\n * @template {HTMLElement} BaseClass\n * @param {BaseClass} Base\n */\nfunction _ViewportPositionMixin(Base) {\n var _observer, _createIntersectionObserver, _disconnectIntersectionObserver, _handleIntersectionChange;\n return _observer = /*#__PURE__*/new WeakMap(), _createIntersectionObserver = /*#__PURE__*/new WeakSet(), _disconnectIntersectionObserver = /*#__PURE__*/new WeakSet(), _handleIntersectionChange = /*#__PURE__*/new WeakMap(), class extends Base {\n constructor() {\n super(...arguments);\n _classPrivateMethodInitSpec$1(this, _disconnectIntersectionObserver);\n _classPrivateMethodInitSpec$1(this, _createIntersectionObserver);\n _classPrivateFieldInitSpec(this, _observer, {\n writable: true,\n value: void 0\n });\n _classPrivateFieldInitSpec(this, _handleIntersectionChange, {\n writable: true,\n value: _ref => {\n var [intersection] = _ref;\n if (intersection.isIntersecting) {\n if (this.viewportPosition !== VIEWPORT_POSITIONS.inViewport) {\n this.viewportPosition = VIEWPORT_POSITIONS.inViewport;\n }\n } else {\n if (!this.viewportPosition || this.viewportPosition === VIEWPORT_POSITIONS.inViewport) {\n var {\n top,\n bottom\n } = this.getBoundingClientRect();\n\n // The latest chrome reports bcr.bottom to be 0.5\n // Instead of checking that the bottom is outside the viewport\n // we check that the top of the element is above the viewport,\n // and that the bottom of the element is above the bottom of the viewport\n var isAbove = top <= 0 && bottom <= window.innerHeight;\n this.viewportPosition = isAbove ? VIEWPORT_POSITIONS.aboveViewport : VIEWPORT_POSITIONS.belowViewport;\n }\n }\n }\n });\n }\n static get observedAttributes() {\n var _super$observedAttrib;\n return [...((_super$observedAttrib = super.observedAttributes) !== null && _super$observedAttrib !== void 0 ? _super$observedAttrib : []), VIEWPORT_POSITION_ATTR];\n }\n connectedCallback() {\n var _super$connectedCallb;\n (_super$connectedCallb = super.connectedCallback) === null || _super$connectedCallb === void 0 || _super$connectedCallb.call(this);\n _classPrivateMethodGet$1(this, _createIntersectionObserver, _createIntersectionObserver2).call(this);\n }\n disconnectedCallback() {\n var _super$disconnectedCa;\n (_super$disconnectedCa = super.disconnectedCallback) === null || _super$disconnectedCa === void 0 || _super$disconnectedCa.call(this);\n _classPrivateMethodGet$1(this, _disconnectIntersectionObserver, _disconnectIntersectionObserver2).call(this);\n }\n /**\n * Get the viewport or the scroll container element that is used as a replacement for the viewport.\n *\n * @returns {Element|HTMLElement} viewportContainer\n */\n get viewportContainer() {\n var _document$scrollingEl;\n /*\n * Using root/document.scrollingElement to represent the viewport,\n * as this presents a unified API for scrolling for both the viewport and scrolling elements.\n * (scrollTop, scrollLeft, scrollTo)\n *\n * Some API's such as IntersectionObserver use different values for the viewport\n * (such as null and document), so take care.\n */\n\n // eslint-disable-next-line compat/compat\n return (_document$scrollingEl = document.scrollingElement) !== null && _document$scrollingEl !== void 0 ? _document$scrollingEl : document.documentElement;\n }\n\n /**\n * Get the intersection root\n * @returns {null|Element|HTMLElement|Document}\n */\n get viewportIntersectionRoot() {\n var viewportContainer = this.viewportContainer;\n if (isViewport(viewportContainer)) {\n var isIFrame = window.location !== window.parent.location;\n if (isIFrame) {\n /* Use document as intersection root in iframes */\n return document;\n } else {\n return null;\n }\n } else {\n return viewportContainer;\n }\n }\n\n /**\n * Position of this element relative to the viewport.\n *\n * @type {'ABOVE-VIEWPORT' | 'IN-VIEWPORT' | 'BELOW-VIEWPORT' }\n */\n set viewportPosition(value) {\n var currentValue = this.getAttribute(VIEWPORT_POSITION_ATTR);\n if (value !== currentValue) {\n this.setAttribute(VIEWPORT_POSITION_ATTR, value);\n }\n }\n\n /**\n * Position of this element relative to the viewport.\n *\n * @type {'ABOVE-VIEWPORT' | 'IN-VIEWPORT' | 'BELOW-VIEWPORT' }\n */\n get viewportPosition() {\n return this.getAttribute(VIEWPORT_POSITION_ATTR);\n }\n };\n function _createIntersectionObserver2() {\n // eslint-disable-next-line compat/compat\n _classPrivateFieldSet(this, _observer, new IntersectionObserver(_classPrivateFieldGet(this, _handleIntersectionChange), {\n threshold: [0],\n // Intersection observer uses null or document for regular viewport\n root: this.viewportIntersectionRoot,\n // Scroll snapping elements trigger intersection when they are perfectly aligned with the screen,\n // both above and below the viewport. Using -1px as root margin to prevent intersection.\n rootMargin: '-1px 0px -1px 0px'\n }));\n _classPrivateFieldGet(this, _observer).observe(this);\n }\n function _disconnectIntersectionObserver2() {\n var _classPrivateFieldGet2, _classPrivateFieldGet3;\n (_classPrivateFieldGet2 = _classPrivateFieldGet(this, _observer)) === null || _classPrivateFieldGet2 === void 0 || _classPrivateFieldGet2.unobserve(this);\n (_classPrivateFieldGet3 = _classPrivateFieldGet(this, _observer)) === null || _classPrivateFieldGet3 === void 0 || _classPrivateFieldGet3.disconnect();\n }\n}\n\n/**\n * @template {HTMLElement} BaseClass\n * @param {BaseClass} Base */\nvar ViewportPositionMixin = dedupeMixin(_ViewportPositionMixin);\n\nfunction _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }\nfunction _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\nfunction _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError(\"attempted to get private field on non-instance\"); } return fn; }\nfunction _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) { _classCheckPrivateStaticAccess(receiver, classConstructor); _classCheckPrivateStaticFieldDescriptor(descriptor, \"get\"); return _classApplyDescriptorGet(receiver, descriptor); }\nfunction _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }\nfunction _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) { _classCheckPrivateStaticAccess(receiver, classConstructor); _classCheckPrivateStaticFieldDescriptor(descriptor, \"set\"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\nfunction _classCheckPrivateStaticFieldDescriptor(descriptor, action) { if (descriptor === undefined) { throw new TypeError(\"attempted to \" + action + \" private static field before its declaration\"); } }\nfunction _classCheckPrivateStaticAccess(receiver, classConstructor) { if (receiver !== classConstructor) { throw new TypeError(\"Private static access of wrong provenance\"); } }\nfunction _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError(\"attempted to set read only private field\"); } descriptor.value = value; } }\n\n/**\n * @typedef BoundAttributeConfig\n * @property {string} attribute – name of attribute to bind, or name of source and target attributes separated with a semicolon\n * @property {string | function } targets – selector string or function that takes element as argument and returns list of target elements\n */\n\n/**\n * Custom element mixin that creates a one way binding between an attribute on\n * the custom element and a given attribute on it's children.\n *\n * @template {HTMLElement} BaseClass\n * @param {BaseClass} Base\n */\nfunction _AttributeBindingMixin(Base) {\n var _class, _getTargetElements, _boundAttributes;\n return _getTargetElements = /*#__PURE__*/new WeakSet(), (_class = class AttributeBindingMixinDef extends Base {\n constructor() {\n super(...arguments);\n _classPrivateMethodInitSpec(this, _getTargetElements);\n }\n /**\n * Configure the bound attributes.\n *\n * @returns {BoundAttributeConfig[]}\n */\n static get boundAttributes() {\n return [];\n }\n static get observedAttributes() {\n var _super$observedAttrib;\n var boundAttributes = {};\n\n // Parse and store configuration for faster lookup\n for (var {\n attribute,\n targets\n } of this.boundAttributes) {\n if (typeof attribute !== 'string') {\n throw Error('Bound attribute configuration must have `attribute` property of string type');\n }\n var [sourceAttribute, targetAttribute = sourceAttribute] = attribute.split(':');\n boundAttributes[sourceAttribute] = {\n sourceAttributeName: sourceAttribute,\n targetAttributeName: targetAttribute,\n targets\n };\n }\n _classStaticPrivateFieldSpecSet(AttributeBindingMixinDef, _class, _boundAttributes, boundAttributes);\n\n // Observe bound attributes\n return [...((_super$observedAttrib = super.observedAttributes) !== null && _super$observedAttrib !== void 0 ? _super$observedAttrib : []), ...Object.keys(boundAttributes)];\n }\n attributeChangedCallback(name, oldValue, newValue) {\n var _super$attributeChang;\n (_super$attributeChang = super.attributeChangedCallback) === null || _super$attributeChang === void 0 || _super$attributeChang.call(this, name, oldValue, newValue);\n if (newValue === oldValue) {\n return;\n }\n var boundAttributes = _classStaticPrivateFieldSpecGet(AttributeBindingMixinDef, _class, _boundAttributes);\n if (name in boundAttributes) {\n var configuration = boundAttributes[name];\n var targets = configuration.targets;\n var targetElements = _classPrivateMethodGet(this, _getTargetElements, _getTargetElements2).call(this, targets);\n for (var element of targetElements) {\n if (newValue !== null) {\n element.setAttribute(configuration.targetAttributeName, newValue);\n } else {\n element.removeAttribute(configuration.targetAttributeName);\n }\n }\n }\n }\n }, _boundAttributes = {\n writable: true,\n value: void 0\n }, _class);\n function _getTargetElements2(targets) {\n if (typeof targets === 'function') {\n return targets(this);\n } else if (typeof targets === 'string') {\n return Array.from(this.querySelectorAll(targets));\n } else {\n throw new Error(\"Unsupported targets type: \".concat(typeof targets));\n }\n }\n}\n\n/**\n * @template {HTMLElement} BaseClass\n * @param {BaseClass} Base\n */\nvar AttributeBindingMixin = dedupeMixin(_AttributeBindingMixin);\n\nexport { AttributeBindingMixin, VIEWPORT_POSITIONS, VIEWPORT_POSITION_ATTR, ViewportPositionMixin };\n//# sourceMappingURL=index.esm.js.map\n","import _classPrivateFieldGet from '@babel/runtime/helpers/classPrivateFieldGet';\nimport _classPrivateFieldSet from '@babel/runtime/helpers/classPrivateFieldSet';\nimport { toArray, setAttribute, dispatchEvent, ElementIntersectionObserver } from '@nrk/dh-basis-common';\nimport { ViewportPositionMixin, AttributeBindingMixin, VIEWPORT_POSITION_ATTR, VIEWPORT_POSITIONS } from '@nrk/dh-basis-mixins';\n\nfunction _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }\nfunction _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }\nfunction _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\nfunction _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError(\"attempted to get private field on non-instance\"); } return fn; }\n\n/* Attributes */\n// VIEWPORT_POSITION_ATTR – Added by ViewportPositionMixin\nvar ACTIVE_BACKGROUND_ATTR = 'active-background-id';\nvar ROOT_MARGIN_ATTR = 'root-margin';\n\n/* Child attributes */\nvar BG_ID_ATTR = 'data-background-id';\nvar SHOW_BACKGROUND_ATTR = 'data-show-background';\nvar ATTRIBUTE_NAME = 'data-attribute-name';\nvar ATTRIBUTE_VALUE = 'data-attribute-value';\nvar STATE_ATTR = 'data-state';\nvar VIEWPORT_POSITION_DATA_ATTR = 'data-viewport-position';\n\n/* Events */\nvar TRIGGER_ACTIVATED_EVENT = 'dh-basis-scrollhistorie-trigger-activated';\nfunction isTrigger(elm) {\n return elm.hasAttribute(SHOW_BACKGROUND_ATTR);\n}\nfunction isBackground(elm) {\n return elm.hasAttribute(BG_ID_ATTR);\n}\n\n/**\n * Custom element that manages a set of background and trigger elements.\n *\n * Background elements are annotated with a `data-background-id` attribute.\n *\n * Trigger elements are annotated with a `data-show-background` attribute,\n * `data-attribute-name` and `data-attribute-value` attributes.\n *\n *\n * When a trigger element comes into view it will set the `data-state` attribute\n * of the corresponding background to `ACTIVE`.\n * The previous and next background will get `data-state`=`PREV` and `NEXT`.\n */\nvar _activeTriggerIndex = /*#__PURE__*/new WeakMap();\nvar _observer = /*#__PURE__*/new WeakMap();\nvar _createIntersectionObserver = /*#__PURE__*/new WeakSet();\nvar _disconnectIntersectionObserver = /*#__PURE__*/new WeakSet();\nvar _handleTriggerChange = /*#__PURE__*/new WeakMap();\nvar _prepareBackgrounds = /*#__PURE__*/new WeakSet();\nvar _updateBackgrounds = /*#__PURE__*/new WeakSet();\nvar _getBackgroundId = /*#__PURE__*/new WeakSet();\nclass Scrollhistorie extends ViewportPositionMixin(AttributeBindingMixin(HTMLElement)) {\n constructor() {\n super(...arguments);\n _classPrivateMethodInitSpec(this, _getBackgroundId);\n _classPrivateMethodInitSpec(this, _updateBackgrounds);\n _classPrivateMethodInitSpec(this, _prepareBackgrounds);\n _classPrivateMethodInitSpec(this, _disconnectIntersectionObserver);\n _classPrivateMethodInitSpec(this, _createIntersectionObserver);\n _classPrivateFieldInitSpec(this, _activeTriggerIndex, {\n writable: true,\n value: void 0\n });\n _classPrivateFieldInitSpec(this, _observer, {\n writable: true,\n value: void 0\n });\n _classPrivateFieldInitSpec(this, _handleTriggerChange, {\n writable: true,\n value: intersections => {\n var activeIntersection = intersections.filter(i => i.isIntersecting).pop();\n if (!activeIntersection || !activeIntersection.target) {\n _classPrivateFieldSet(this, _activeTriggerIndex, null);\n return;\n }\n var triggerElement = activeIntersection.target;\n\n // Set active background\n this.activeBackgroundId = triggerElement.getAttribute(SHOW_BACKGROUND_ATTR);\n\n // Update attribute on active background\n var attributeName = triggerElement.getAttribute(ATTRIBUTE_NAME);\n var attributeValue = triggerElement.getAttribute(ATTRIBUTE_VALUE);\n if (attributeName) {\n var _this$activeBackgroun;\n (_this$activeBackgroun = this.activeBackground) === null || _this$activeBackgroun === void 0 || _this$activeBackgroun.setAttribute(attributeName, attributeValue);\n }\n this.triggerElements.forEach(elm => setAttribute(elm, STATE_ATTR, elm === triggerElement ? 'ACTIVE' : undefined));\n var triggerIndex = this.triggerElements.indexOf(triggerElement);\n if (triggerIndex !== _classPrivateFieldGet(this, _activeTriggerIndex)) {\n _classPrivateFieldSet(this, _activeTriggerIndex, triggerIndex);\n dispatchEvent(this, TRIGGER_ACTIVATED_EVENT, {\n triggerIndex,\n backgroundId: this.activeBackgroundId,\n attributeName,\n attributeValue\n });\n }\n }\n });\n }\n static get observedAttributes() {\n return [...super.observedAttributes, ROOT_MARGIN_ATTR, ACTIVE_BACKGROUND_ATTR];\n }\n\n // Binding VIEWPORT-POSITION attribute to background DATA-VIEWPORT-POSITION attribute\n static get boundAttributes() {\n return [{\n attribute: \"\".concat(VIEWPORT_POSITION_ATTR, \":\").concat(VIEWPORT_POSITION_DATA_ATTR),\n targets: instance => instance.backgrounds\n }];\n }\n connectedCallback() {\n super.connectedCallback();\n _classPrivateMethodGet(this, _updateBackgrounds, _updateBackgrounds2).call(this);\n _classPrivateMethodGet(this, _createIntersectionObserver, _createIntersectionObserver2).call(this);\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n _classPrivateMethodGet(this, _disconnectIntersectionObserver, _disconnectIntersectionObserver2).call(this);\n }\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback(name, oldValue, newValue);\n if (name === ROOT_MARGIN_ATTR) {\n _classPrivateMethodGet(this, _disconnectIntersectionObserver, _disconnectIntersectionObserver2).call(this);\n _classPrivateMethodGet(this, _createIntersectionObserver, _createIntersectionObserver2).call(this);\n } else if (name === VIEWPORT_POSITION_ATTR) {\n _classPrivateMethodGet(this, _prepareBackgrounds, _prepareBackgrounds2).call(this);\n _classPrivateMethodGet(this, _updateBackgrounds, _updateBackgrounds2).call(this);\n } else if (name === ACTIVE_BACKGROUND_ATTR) {\n _classPrivateMethodGet(this, _updateBackgrounds, _updateBackgrounds2).call(this);\n }\n }\n get triggerElements() {\n return toArray(this.children).filter(isTrigger);\n }\n get backgrounds() {\n return toArray(this.children).filter(isBackground);\n }\n\n /* Mirrored attributes: */\n\n get rootMargin() {\n return this.getAttribute(ROOT_MARGIN_ATTR) || '0px 0px 0px 0px';\n }\n set rootMargin(val) {\n this.setAttribute(ROOT_MARGIN_ATTR, val || '0px 0px 0px 0px');\n }\n set activeBackgroundId(value) {\n if (value !== this.activeBackgroundId) {\n this.setAttribute(ACTIVE_BACKGROUND_ATTR, value);\n }\n }\n get activeBackgroundId() {\n return this.getAttribute(ACTIVE_BACKGROUND_ATTR);\n }\n get activeBackground() {\n return this.querySelector(\"[\".concat(BG_ID_ATTR, \"=\\\"\").concat(this.activeBackgroundId, \"\\\"]\"));\n }\n}\nfunction _createIntersectionObserver2() {\n _classPrivateFieldSet(this, _observer, new ElementIntersectionObserver(this.triggerElements, _classPrivateFieldGet(this, _handleTriggerChange), {\n root: this.viewportIntersectionRoot,\n rootMargin: this.rootMargin\n }));\n}\nfunction _disconnectIntersectionObserver2() {\n if (_classPrivateFieldGet(this, _observer)) {\n _classPrivateFieldGet(this, _observer).disconnect();\n }\n}\nfunction _prepareBackgrounds2() {\n var viewportPosition = this.viewportPosition;\n if (viewportPosition === VIEWPORT_POSITIONS.aboveViewport || viewportPosition === VIEWPORT_POSITIONS.belowViewport) {\n var triggerElements = this.triggerElements;\n if (triggerElements.length > 0) {\n var triggerIndex = viewportPosition === VIEWPORT_POSITIONS.aboveViewport ? triggerElements.length - 1 : 0;\n this.activeBackgroundId = triggerElements[triggerIndex].getAttribute(SHOW_BACKGROUND_ATTR);\n }\n }\n}\nfunction _updateBackgrounds2() {\n var activeBackgroundId = this.activeBackgroundId;\n var backgrounds = this.backgrounds;\n backgrounds.forEach((background, idx) => {\n var backgroundId = background.getAttribute(BG_ID_ATTR);\n var isActive = backgroundId === activeBackgroundId;\n var nextActive = _classPrivateMethodGet(this, _getBackgroundId, _getBackgroundId2).call(this, backgrounds, idx + 1) === activeBackgroundId;\n var prevActive = _classPrivateMethodGet(this, _getBackgroundId, _getBackgroundId2).call(this, backgrounds, idx - 1) === activeBackgroundId;\n var state;\n if (isActive) {\n state = 'ACTIVE';\n } else if (nextActive) {\n state = 'PREV';\n } else if (prevActive) {\n state = 'NEXT';\n }\n var currentState = background.getAttribute(STATE_ATTR);\n if (state !== currentState) {\n setAttribute(background, STATE_ATTR, state);\n }\n });\n}\nfunction _getBackgroundId2(backgrounds, index) {\n if (backgrounds[index]) {\n return backgrounds[index].getAttribute(BG_ID_ATTR);\n }\n}\n\nexport { Scrollhistorie as default };\n//# sourceMappingURL=index.esm.js.map\n","import balanceText from 'balance-text'\n\nconst watching = []\nlet handlersInitialized = false\n\nfunction debounce(func, threshold, execAsap, ...args) {\n let timeout\n\n return function () {\n const obj = this\n\n function delayed() {\n if (!execAsap) {\n func.apply(obj, args)\n }\n timeout = null\n }\n\n if (timeout) {\n clearTimeout(timeout)\n } else if (execAsap) {\n func.apply(obj, args)\n }\n timeout = setTimeout(delayed, threshold || 100)\n }\n}\n\nfunction ready(fn) {\n if (document.readyState !== 'loading') {\n fn()\n } else if (document.addEventListener) {\n document.addEventListener('DOMContentLoaded', fn)\n } else {\n document.attachEvent('onreadystatechange', () => {\n if (document.readyState !== 'loading') {\n fn()\n }\n })\n }\n}\n\nfunction updateWatched() {\n watching.forEach((element) => {\n const padding = window.getComputedStyle(element).padding\n const oldDisplay = element.style.display\n const oldMargin = element.style.margin\n const oldPadding = element.style.padding\n /*\n Display span as block when balancing text.\n Padding is moved to margin so that width is calculated correctly\n */\n element.style.display = 'block'\n element.style.margin = padding\n element.style.padding = 0\n balanceText(element)\n element.style.display = oldDisplay\n element.style.margin = oldMargin\n element.style.padding = oldPadding\n })\n}\n\nfunction initializeHandlers() {\n if (handlersInitialized) {\n return\n }\n\n // Apply on DOM ready\n ready(updateWatched)\n\n // Reapply on full load\n window.addEventListener('load', updateWatched)\n\n // Reapply on resize\n window.addEventListener('resize', debounce(updateWatched))\n\n handlersInitialized = true\n}\n\nexport function balanceAndWatch(elements) {\n watching.push(...elements)\n initializeHandlers()\n updateWatched()\n}\n","const formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"mindre enn ett sekund\",\n other: \"mindre enn {{count}} sekunder\",\n },\n\n xSeconds: {\n one: \"ett sekund\",\n other: \"{{count}} sekunder\",\n },\n\n halfAMinute: \"et halvt minutt\",\n\n lessThanXMinutes: {\n one: \"mindre enn ett minutt\",\n other: \"mindre enn {{count}} minutter\",\n },\n\n xMinutes: {\n one: \"ett minutt\",\n other: \"{{count}} minutter\",\n },\n\n aboutXHours: {\n one: \"omtrent en time\",\n other: \"omtrent {{count}} timer\",\n },\n\n xHours: {\n one: \"en time\",\n other: \"{{count}} timer\",\n },\n\n xDays: {\n one: \"en dag\",\n other: \"{{count}} dager\",\n },\n\n aboutXWeeks: {\n one: \"omtrent en uke\",\n other: \"omtrent {{count}} uker\",\n },\n\n xWeeks: {\n one: \"en uke\",\n other: \"{{count}} uker\",\n },\n\n aboutXMonths: {\n one: \"omtrent en måned\",\n other: \"omtrent {{count}} måneder\",\n },\n\n xMonths: {\n one: \"en måned\",\n other: \"{{count}} måneder\",\n },\n\n aboutXYears: {\n one: \"omtrent ett år\",\n other: \"omtrent {{count}} år\",\n },\n\n xYears: {\n one: \"ett år\",\n other: \"{{count}} år\",\n },\n\n overXYears: {\n one: \"over ett år\",\n other: \"over {{count}} år\",\n },\n\n almostXYears: {\n one: \"nesten ett år\",\n other: \"nesten {{count}} år\",\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n let result;\n\n const tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", String(count));\n }\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return \"om \" + result;\n } else {\n return result + \" siden\";\n }\n }\n\n return result;\n};\n","export function buildFormatLongFn(args) {\n return (options = {}) => {\n // TODO: Remove String()\n const width = options.width ? String(options.width) : args.defaultWidth;\n const format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\n\nconst dateFormats = {\n full: \"EEEE d. MMMM y\",\n long: \"d. MMMM y\",\n medium: \"d. MMM y\",\n short: \"dd.MM.y\",\n};\n\nconst timeFormats = {\n full: \"'kl'. HH:mm:ss zzzz\",\n long: \"HH:mm:ss z\",\n medium: \"HH:mm:ss\",\n short: \"HH:mm\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} 'kl.' {{time}}\",\n long: \"{{date}} 'kl.' {{time}}\",\n medium: \"{{date}} {{time}}\",\n short: \"{{date}} {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n","const formatRelativeLocale = {\n lastWeek: \"'forrige' eeee 'kl.' p\",\n yesterday: \"'i går kl.' p\",\n today: \"'i dag kl.' p\",\n tomorrow: \"'i morgen kl.' p\",\n nextWeek: \"EEEE 'kl.' p\",\n other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n formatRelativeLocale[token];\n","/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n return (value, options) => {\n const context = options?.context ? String(options.context) : \"standalone\";\n\n let valuesArray;\n if (context === \"formatting\" && args.formattingValues) {\n const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n const width = options?.width ? String(options.width) : defaultWidth;\n\n valuesArray =\n args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n const defaultWidth = args.defaultWidth;\n const width = options?.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[width] || args.values[defaultWidth];\n }\n const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n return valuesArray[index];\n };\n}\n","export function buildMatchFn(args) {\n return (string, options = {}) => {\n const width = options.width;\n\n const matchPattern =\n (width && args.matchPatterns[width]) ||\n args.matchPatterns[args.defaultMatchWidth];\n const matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n const matchedString = matchResult[0];\n\n const parsePatterns =\n (width && args.parsePatterns[width]) ||\n args.parsePatterns[args.defaultParseWidth];\n\n const key = Array.isArray(parsePatterns)\n ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n : // [TODO] -- I challenge you to fix the type\n findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n let value;\n\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback\n ? // [TODO] -- I challenge you to fix the type\n options.valueCallback(value)\n : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n\nfunction findKey(object, predicate) {\n for (const key in object) {\n if (\n Object.prototype.hasOwnProperty.call(object, key) &&\n predicate(object[key])\n ) {\n return key;\n }\n }\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (let key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n return undefined;\n}\n","export function buildMatchPatternFn(args) {\n return (string, options = {}) => {\n const matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n const matchedString = matchResult[0];\n\n const parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n let value = args.valueCallback\n ? args.valueCallback(parseResult[0])\n : parseResult[0];\n\n // [TODO] I challenge you to fix the type\n value = options.valueCallback ? options.valueCallback(value) : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.js\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.js\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)\\.?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(f\\.? ?Kr\\.?|fvt\\.?|e\\.? ?Kr\\.?|evt\\.?)/i,\n abbreviated: /^(f\\.? ?Kr\\.?|fvt\\.?|e\\.? ?Kr\\.?|evt\\.?)/i,\n wide: /^(før Kristus|før vår tid|etter Kristus|vår tid)/i,\n};\nconst parseEraPatterns = {\n any: [/^f/i, /^e/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](\\.)? kvartal/i,\n};\nconst parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\\.?/i,\n wide: /^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i,\n};\nconst parseMonthPatterns = {\n narrow: [\n /^j/i,\n /^f/i,\n /^m/i,\n /^a/i,\n /^m/i,\n /^j/i,\n /^j/i,\n /^a/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n\n any: [\n /^ja/i,\n /^f/i,\n /^mar/i,\n /^ap/i,\n /^mai/i,\n /^jun/i,\n /^jul/i,\n /^aug/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^[smtofl]/i,\n short: /^(sø|ma|ti|on|to|fr|lø)/i,\n abbreviated: /^(søn|man|tir|ons|tor|fre|lør)/i,\n wide: /^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i,\n};\nconst parseDayPatterns = {\n any: [/^s/i, /^m/i, /^ti/i, /^o/i, /^to/i, /^f/i, /^l/i],\n};\n\nconst matchDayPeriodPatterns = {\n narrow:\n /^(midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten)|[ap])/i,\n any: /^([ap]\\.?\\s?m\\.?|midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten))/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^a(\\.?\\s?m\\.?)?$/i,\n pm: /^p(\\.?\\s?m\\.?)?$/i,\n midnight: /^midn/i,\n noon: /^midd/i,\n morning: /morgen/i,\n afternoon: /ettermiddag/i,\n evening: /kveld/i,\n night: /natt/i,\n },\n};\n\nexport const match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: (value) => parseInt(value, 10),\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseEraPatterns,\n defaultParseWidth: \"any\",\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: \"any\",\n valueCallback: (index) => index + 1,\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: \"any\",\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPatterns,\n defaultParseWidth: \"any\",\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: \"any\",\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: \"any\",\n }),\n};\n","import { formatDistance } from \"./nb/_lib/formatDistance.js\";\nimport { formatLong } from \"./nb/_lib/formatLong.js\";\nimport { formatRelative } from \"./nb/_lib/formatRelative.js\";\nimport { localize } from \"./nb/_lib/localize.js\";\nimport { match } from \"./nb/_lib/match.js\";\n\n/**\n * @category Locales\n * @summary Norwegian Bokmål locale.\n * @language Norwegian Bokmål\n * @iso-639-2 nob\n * @author Hans-Kristian Koren [@Hanse](https://github.com/Hanse)\n * @author Mikolaj Grzyb [@mikolajgrzyb](https://github.com/mikolajgrzyb)\n * @author Dag Stuan [@dagstuan](https://github.com/dagstuan)\n */\nexport const nb = {\n code: \"nb\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 1 /* Monday */,\n firstWeekContainsDate: 4,\n },\n};\n\n// Fallback for modularized imports:\nexport default nb;\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.js\";\n\nconst eraValues = {\n narrow: [\"f.Kr.\", \"e.Kr.\"],\n abbreviated: [\"f.Kr.\", \"e.Kr.\"],\n wide: [\"før Kristus\", \"etter Kristus\"],\n};\n\nconst quarterValues = {\n narrow: [\"1\", \"2\", \"3\", \"4\"],\n abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n wide: [\"1. kvartal\", \"2. kvartal\", \"3. kvartal\", \"4. kvartal\"],\n};\n\nconst monthValues = {\n narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n abbreviated: [\n \"jan.\",\n \"feb.\",\n \"mars\",\n \"apr.\",\n \"mai\",\n \"juni\",\n \"juli\",\n \"aug.\",\n \"sep.\",\n \"okt.\",\n \"nov.\",\n \"des.\",\n ],\n\n wide: [\n \"januar\",\n \"februar\",\n \"mars\",\n \"april\",\n \"mai\",\n \"juni\",\n \"juli\",\n \"august\",\n \"september\",\n \"oktober\",\n \"november\",\n \"desember\",\n ],\n};\n\nconst dayValues = {\n narrow: [\"S\", \"M\", \"T\", \"O\", \"T\", \"F\", \"L\"],\n short: [\"sø\", \"ma\", \"ti\", \"on\", \"to\", \"fr\", \"lø\"],\n abbreviated: [\"søn\", \"man\", \"tir\", \"ons\", \"tor\", \"fre\", \"lør\"],\n wide: [\n \"søndag\",\n \"mandag\",\n \"tirsdag\",\n \"onsdag\",\n \"torsdag\",\n \"fredag\",\n \"lørdag\",\n ],\n};\n\nconst dayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"midnatt\",\n noon: \"middag\",\n morning: \"på morg.\",\n afternoon: \"på etterm.\",\n evening: \"på kvelden\",\n night: \"på natten\",\n },\n abbreviated: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnatt\",\n noon: \"middag\",\n morning: \"på morg.\",\n afternoon: \"på etterm.\",\n evening: \"på kvelden\",\n night: \"på natten\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnatt\",\n noon: \"middag\",\n morning: \"på morgenen\",\n afternoon: \"på ettermiddagen\",\n evening: \"på kvelden\",\n night: \"på natten\",\n },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n const number = Number(dirtyNumber);\n return number + \".\";\n};\n\nexport const localize = {\n ordinalNumber,\n\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: \"wide\",\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: \"wide\",\n argumentCallback: (quarter) => quarter - 1,\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: \"wide\",\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: \"wide\",\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: \"wide\",\n }),\n};\n","const formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"less than a second\",\n other: \"less than {{count}} seconds\",\n },\n\n xSeconds: {\n one: \"1 second\",\n other: \"{{count}} seconds\",\n },\n\n halfAMinute: \"half a minute\",\n\n lessThanXMinutes: {\n one: \"less than a minute\",\n other: \"less than {{count}} minutes\",\n },\n\n xMinutes: {\n one: \"1 minute\",\n other: \"{{count}} minutes\",\n },\n\n aboutXHours: {\n one: \"about 1 hour\",\n other: \"about {{count}} hours\",\n },\n\n xHours: {\n one: \"1 hour\",\n other: \"{{count}} hours\",\n },\n\n xDays: {\n one: \"1 day\",\n other: \"{{count}} days\",\n },\n\n aboutXWeeks: {\n one: \"about 1 week\",\n other: \"about {{count}} weeks\",\n },\n\n xWeeks: {\n one: \"1 week\",\n other: \"{{count}} weeks\",\n },\n\n aboutXMonths: {\n one: \"about 1 month\",\n other: \"about {{count}} months\",\n },\n\n xMonths: {\n one: \"1 month\",\n other: \"{{count}} months\",\n },\n\n aboutXYears: {\n one: \"about 1 year\",\n other: \"about {{count}} years\",\n },\n\n xYears: {\n one: \"1 year\",\n other: \"{{count}} years\",\n },\n\n overXYears: {\n one: \"over 1 year\",\n other: \"over {{count}} years\",\n },\n\n almostXYears: {\n one: \"almost 1 year\",\n other: \"almost {{count}} years\",\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n let result;\n\n const tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", count.toString());\n }\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return \"in \" + result;\n } else {\n return result + \" ago\";\n }\n }\n\n return result;\n};\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\n\nconst dateFormats = {\n full: \"EEEE, MMMM do, y\",\n long: \"MMMM do, y\",\n medium: \"MMM d, y\",\n short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n full: \"h:mm:ss a zzzz\",\n long: \"h:mm:ss a z\",\n medium: \"h:mm:ss a\",\n short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: \"{{date}}, {{time}}\",\n short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n","const formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n formatRelativeLocale[token];\n","import { formatDistance } from \"./en-US/_lib/formatDistance.js\";\nimport { formatLong } from \"./en-US/_lib/formatLong.js\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.js\";\nimport { localize } from \"./en-US/_lib/localize.js\";\nimport { match } from \"./en-US/_lib/match.js\";\n\n/**\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)\n * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)\n */\nexport const enUS = {\n code: \"en-US\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0 /* Sunday */,\n firstWeekContainsDate: 1,\n },\n};\n\n// Fallback for modularized imports:\nexport default enUS;\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.js\";\n\nconst eraValues = {\n narrow: [\"B\", \"A\"],\n abbreviated: [\"BC\", \"AD\"],\n wide: [\"Before Christ\", \"Anno Domini\"],\n};\n\nconst quarterValues = {\n narrow: [\"1\", \"2\", \"3\", \"4\"],\n abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n wide: [\"1st quarter\", \"2nd quarter\", \"3rd quarter\", \"4th quarter\"],\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nconst monthValues = {\n narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n abbreviated: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n\n wide: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n};\n\nconst dayValues = {\n narrow: [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"],\n short: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n abbreviated: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n wide: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n};\n\nconst dayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n};\n\nconst formattingDayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n const number = Number(dirtyNumber);\n\n // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n const rem100 = number % 100;\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + \"st\";\n case 2:\n return number + \"nd\";\n case 3:\n return number + \"rd\";\n }\n }\n return number + \"th\";\n};\n\nexport const localize = {\n ordinalNumber,\n\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: \"wide\",\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: \"wide\",\n argumentCallback: (quarter) => quarter - 1,\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: \"wide\",\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: \"wide\",\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: \"wide\",\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: \"wide\",\n }),\n};\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.js\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.js\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i,\n};\nconst parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i,\n};\nconst parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,\n};\nconst parseMonthPatterns = {\n narrow: [\n /^j/i,\n /^f/i,\n /^m/i,\n /^a/i,\n /^m/i,\n /^j/i,\n /^j/i,\n /^a/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n\n any: [\n /^ja/i,\n /^f/i,\n /^mar/i,\n /^ap/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^au/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,\n};\nconst parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i,\n },\n};\n\nexport const match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: (value) => parseInt(value, 10),\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseEraPatterns,\n defaultParseWidth: \"any\",\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: \"any\",\n valueCallback: (index) => index + 1,\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: \"any\",\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPatterns,\n defaultParseWidth: \"any\",\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: \"any\",\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: \"any\",\n }),\n};\n","let defaultOptions = {};\n\nexport function getDefaultOptions() {\n return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}\n","/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n\n/**\n * @constant\n * @name constructFromSymbol\n * @summary Symbol enabling Date extensions to inherit properties from the reference date.\n *\n * The symbol is used to enable the `constructFrom` function to construct a date\n * using a reference date and a value. It allows to transfer extra properties\n * from the reference date to the new date. It's useful for extensions like\n * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as\n * a constructor argument.\n */\nexport const constructFromSymbol = Symbol.for(\"constructDateFrom\");\n","import { constructFromSymbol } from \"./constants.js\";\n\n/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * Starting from v3.7.0, it allows to construct a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from \"./constructFrom/date-fns\";\n *\n * // A function that clones a date preserving the original type\n * function cloneDate(date: DateType): DateType {\n * return constructFrom(\n * date, // Use constructor from the given date\n * date.getTime() // Use the date value to create a new date\n * );\n * }\n */\nexport function constructFrom(date, value) {\n if (typeof date === \"function\") return date(value);\n\n if (date && typeof date === \"object\" && constructFromSymbol in date)\n return date[constructFromSymbol](value);\n\n if (date instanceof Date) return new date.constructor(value);\n\n return new Date(value);\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n","import { constructFrom } from \"./constructFrom.js\";\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 the argument is none of the above, the function returns Invalid Date.\n *\n * Starting from v3.7.0, it clones a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument, context) {\n // [TODO] Get rid of `toDate` or `constructFrom`?\n return constructFrom(context || argument, argument);\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n","import { toDate } from \"../toDate.js\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n const _date = toDate(date);\n const utcDate = 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 utcDate.setUTCFullYear(_date.getFullYear());\n return +date - +utcDate;\n}\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfDay} function options.\n */\n\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nexport function startOfDay(date, options) {\n const _date = toDate(date, options?.in);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfDay;\n","import { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { millisecondsInDay } from \"./constants.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link differenceInCalendarDays} function options.\n */\n\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - The options object\n *\n * @returns The number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\nexport function differenceInCalendarDays(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const laterStartOfDay = startOfDay(laterDate_);\n const earlierStartOfDay = startOfDay(earlierDate_);\n\n const laterTimestamp =\n +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);\n const earlierTimestamp =\n +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);\n\n // Round the number of days to the nearest integer because the number of\n // milliseconds in a day is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarDays;\n","import { constructFrom } from \"../constructFrom.js\";\n\nexport function normalizeDates(context, ...dates) {\n const normalize = constructFrom.bind(\n null,\n context || dates.find((date) => typeof date === \"object\"),\n );\n return dates.map(normalize);\n}\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfYear} function options.\n */\n\n/**\n * @name startOfYear\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\nexport function startOfYear(date, options) {\n const date_ = toDate(date, options?.in);\n date_.setFullYear(date_.getFullYear(), 0, 1);\n date_.setHours(0, 0, 0, 0);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default startOfYear;\n","import { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\nimport { startOfYear } from \"./startOfYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDayOfYear} function options.\n */\n\n/**\n * @name getDayOfYear\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * const result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nexport function getDayOfYear(date, options) {\n const _date = toDate(date, options?.in);\n const diff = differenceInCalendarDays(_date, startOfYear(_date));\n const dayOfYear = diff + 1;\n return dayOfYear;\n}\n\n// Fallback for modularized imports:\nexport default getDayOfYear;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfWeek} function options.\n */\n\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n\n _date.setDate(_date.getDate() - diff);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeek;\n","import { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfISOWeek} function options.\n */\n\n/**\n * @name startOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfISOWeek(date, options) {\n return startOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeek;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeekYear} function options.\n */\n\n/**\n * @name getISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n *\n * @returns The ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nexport function getISOWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n\n const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n if (_date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (_date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getISOWeekYear;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getISOWeekYear } from \"./getISOWeekYear.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\n\n/**\n * The {@link startOfISOWeekYear} function options.\n */\n\n/**\n * @name startOfISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week-numbering year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * const result = startOfISOWeekYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfISOWeekYear(date, options) {\n const year = getISOWeekYear(date, options);\n const fourthOfJanuary = constructFrom(options?.in || date, 0);\n fourthOfJanuary.setFullYear(year, 0, 4);\n fourthOfJanuary.setHours(0, 0, 0, 0);\n return startOfISOWeek(fourthOfJanuary);\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeekYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { startOfISOWeekYear } from \"./startOfISOWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeek} function options.\n */\n\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nexport function getISOWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getISOWeek;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeekYear} function options.\n */\n\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The local week-numbering year\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\nexport function getWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const firstWeekOfNextYear = constructFrom(options?.in || date, 0);\n firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n\n const firstWeekOfThisYear = constructFrom(options?.in || date, 0);\n firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\n\n if (+_date >= +startOfNextYear) {\n return year + 1;\n } else if (+_date >= +startOfThisYear) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getWeekYear;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { getWeekYear } from \"./getWeekYear.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfWeekYear} function options.\n */\n\n/**\n * @name startOfWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Return the start of a local week-numbering year for the given date.\n *\n * @description\n * Return the start of a local week-numbering year.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week-numbering year\n *\n * @example\n * // The start of an a week-numbering year for 2 July 2005 with default settings:\n * const result = startOfWeekYear(new Date(2005, 6, 2))\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // The start of a week-numbering year for 2 July 2005\n * // if Monday is the first day of week\n * // and 4 January is always in the first week of the year:\n * const result = startOfWeekYear(new Date(2005, 6, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfWeekYear(date, options) {\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const year = getWeekYear(date, options);\n const firstWeek = constructFrom(options?.in || date, 0);\n firstWeek.setFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setHours(0, 0, 0, 0);\n const _date = startOfWeek(firstWeek, options);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeekYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { startOfWeekYear } from \"./startOfWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeek} function options.\n */\n\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The week\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> 53\n */\nexport function getWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getWeek;\n","export function addLeadingZeros(number, targetLength) {\n const sign = number < 0 ? \"-\" : \"\";\n const output = Math.abs(number).toString().padStart(targetLength, \"0\");\n return sign + output;\n}\n","import { addLeadingZeros } from \"../addLeadingZeros.js\";\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nexport const lightFormatters = {\n // Year\n y(date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === \"yy\" ? year % 100 : year, token.length);\n },\n\n // Month\n M(date, token) {\n const month = date.getMonth();\n return token === \"M\" ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n\n // Day of the month\n d(date, token) {\n return addLeadingZeros(date.getDate(), token.length);\n },\n\n // AM or PM\n a(date, token) {\n const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return dayPeriodEnumValue.toUpperCase();\n case \"aaa\":\n return dayPeriodEnumValue;\n case \"aaaaa\":\n return dayPeriodEnumValue[0];\n case \"aaaa\":\n default:\n return dayPeriodEnumValue === \"am\" ? \"a.m.\" : \"p.m.\";\n }\n },\n\n // Hour [1-12]\n h(date, token) {\n return addLeadingZeros(date.getHours() % 12 || 12, token.length);\n },\n\n // Hour [0-23]\n H(date, token) {\n return addLeadingZeros(date.getHours(), token.length);\n },\n\n // Minute\n m(date, token) {\n return addLeadingZeros(date.getMinutes(), token.length);\n },\n\n // Second\n s(date, token) {\n return addLeadingZeros(date.getSeconds(), token.length);\n },\n\n // Fraction of second\n S(date, token) {\n const numberOfDigits = token.length;\n const milliseconds = date.getMilliseconds();\n const fractionalSeconds = Math.trunc(\n milliseconds * Math.pow(10, numberOfDigits - 3),\n );\n return addLeadingZeros(fractionalSeconds, token.length);\n },\n};\n","import { getDayOfYear } from \"../../getDayOfYear.js\";\nimport { getISOWeek } from \"../../getISOWeek.js\";\nimport { getISOWeekYear } from \"../../getISOWeekYear.js\";\nimport { getWeek } from \"../../getWeek.js\";\nimport { getWeekYear } from \"../../getWeekYear.js\";\n\nimport { addLeadingZeros } from \"../addLeadingZeros.js\";\nimport { lightFormatters } from \"./lightFormatters.js\";\n\nconst dayPeriodEnum = {\n am: \"am\",\n pm: \"pm\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n};\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nexport const formatters = {\n // Era\n G: function (date, token, localize) {\n const era = date.getFullYear() > 0 ? 1 : 0;\n switch (token) {\n // AD, BC\n case \"G\":\n case \"GG\":\n case \"GGG\":\n return localize.era(era, { width: \"abbreviated\" });\n // A, B\n case \"GGGGG\":\n return localize.era(era, { width: \"narrow\" });\n // Anno Domini, Before Christ\n case \"GGGG\":\n default:\n return localize.era(era, { width: \"wide\" });\n }\n },\n\n // Year\n y: function (date, token, localize) {\n // Ordinal number\n if (token === \"yo\") {\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, { unit: \"year\" });\n }\n\n return lightFormatters.y(date, token);\n },\n\n // Local week-numbering year\n Y: function (date, token, localize, options) {\n const signedWeekYear = getWeekYear(date, options);\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n // Two digit year\n if (token === \"YY\") {\n const twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n }\n\n // Ordinal number\n if (token === \"Yo\") {\n return localize.ordinalNumber(weekYear, { unit: \"year\" });\n }\n\n // Padding\n return addLeadingZeros(weekYear, token.length);\n },\n\n // ISO week-numbering year\n R: function (date, token) {\n const isoWeekYear = getISOWeekYear(date);\n\n // Padding\n return addLeadingZeros(isoWeekYear, token.length);\n },\n\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\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 u: function (date, token) {\n const year = date.getFullYear();\n return addLeadingZeros(year, token.length);\n },\n\n // Quarter\n Q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"Q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"QQ\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"Qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"QQQ\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"QQQQQ\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"QQQQ\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone quarter\n q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"qq\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"qqq\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"qqqqq\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"qqqq\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // Month\n M: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n case \"M\":\n case \"MM\":\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n case \"Mo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"MMM\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // J, F, ..., D\n case \"MMMMM\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // January, February, ..., December\n case \"MMMM\":\n default:\n return localize.month(month, { width: \"wide\", context: \"formatting\" });\n }\n },\n\n // Stand-alone month\n L: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n // 1, 2, ..., 12\n case \"L\":\n return String(month + 1);\n // 01, 02, ..., 12\n case \"LL\":\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n case \"Lo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"LLL\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // J, F, ..., D\n case \"LLLLL\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // January, February, ..., December\n case \"LLLL\":\n default:\n return localize.month(month, { width: \"wide\", context: \"standalone\" });\n }\n },\n\n // Local week of year\n w: function (date, token, localize, options) {\n const week = getWeek(date, options);\n\n if (token === \"wo\") {\n return localize.ordinalNumber(week, { unit: \"week\" });\n }\n\n return addLeadingZeros(week, token.length);\n },\n\n // ISO week of year\n I: function (date, token, localize) {\n const isoWeek = getISOWeek(date);\n\n if (token === \"Io\") {\n return localize.ordinalNumber(isoWeek, { unit: \"week\" });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n\n // Day of the month\n d: function (date, token, localize) {\n if (token === \"do\") {\n return localize.ordinalNumber(date.getDate(), { unit: \"date\" });\n }\n\n return lightFormatters.d(date, token);\n },\n\n // Day of year\n D: function (date, token, localize) {\n const dayOfYear = getDayOfYear(date);\n\n if (token === \"Do\") {\n return localize.ordinalNumber(dayOfYear, { unit: \"dayOfYear\" });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n\n // Day of week\n E: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n switch (token) {\n // Tue\n case \"E\":\n case \"EE\":\n case \"EEE\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"EEEEE\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"EEEEEE\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"EEEE\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Local day of week\n e: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case \"e\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"ee\":\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n case \"eo\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"eee\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"eeeee\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"eeeeee\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"eeee\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone local day of week\n c: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (same as in `e`)\n case \"c\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"cc\":\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n case \"co\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"ccc\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // T\n case \"ccccc\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // Tu\n case \"cccccc\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"standalone\",\n });\n // Tuesday\n case \"cccc\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // ISO day of week\n i: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n switch (token) {\n // 2\n case \"i\":\n return String(isoDayOfWeek);\n // 02\n case \"ii\":\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n case \"io\":\n return localize.ordinalNumber(isoDayOfWeek, { unit: \"day\" });\n // Tue\n case \"iii\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"iiiii\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"iiiiii\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"iiii\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM or PM\n a: function (date, token, localize) {\n const hours = date.getHours();\n const dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"aaa\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"aaaaa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"aaaa\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM, PM, midnight, noon\n b: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n }\n\n switch (token) {\n case \"b\":\n case \"bb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"bbb\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"bbbbb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"bbbb\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // in the morning, in the afternoon, in the evening, at night\n B: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case \"B\":\n case \"BB\":\n case \"BBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"BBBBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"BBBB\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Hour [1-12]\n h: function (date, token, localize) {\n if (token === \"ho\") {\n let hours = date.getHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return lightFormatters.h(date, token);\n },\n\n // Hour [0-23]\n H: function (date, token, localize) {\n if (token === \"Ho\") {\n return localize.ordinalNumber(date.getHours(), { unit: \"hour\" });\n }\n\n return lightFormatters.H(date, token);\n },\n\n // Hour [0-11]\n K: function (date, token, localize) {\n const hours = date.getHours() % 12;\n\n if (token === \"Ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Hour [1-24]\n k: function (date, token, localize) {\n let hours = date.getHours();\n if (hours === 0) hours = 24;\n\n if (token === \"ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Minute\n m: function (date, token, localize) {\n if (token === \"mo\") {\n return localize.ordinalNumber(date.getMinutes(), { unit: \"minute\" });\n }\n\n return lightFormatters.m(date, token);\n },\n\n // Second\n s: function (date, token, localize) {\n if (token === \"so\") {\n return localize.ordinalNumber(date.getSeconds(), { unit: \"second\" });\n }\n\n return lightFormatters.s(date, token);\n },\n\n // Fraction of second\n S: function (date, token) {\n return lightFormatters.S(date, token);\n },\n\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, _localize) {\n const timezoneOffset = date.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 `:` delimiter\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 `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\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 `:` delimiter\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) {\n const timezoneOffset = date.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 `:` delimiter\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 `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\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 `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (GMT)\n O: function (date, token, _localize) {\n const timezoneOffset = date.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) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"z\":\n case \"zz\":\n case \"zzz\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"zzzz\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Seconds timestamp\n t: function (date, token, _localize) {\n const timestamp = Math.trunc(+date / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n\n // Milliseconds timestamp\n T: function (date, token, _localize) {\n return addLeadingZeros(+date, token.length);\n },\n};\n\nfunction formatTimezoneShort(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = Math.trunc(absOffset / 60);\n const minutes = absOffset % 60;\n if (minutes === 0) {\n return sign + String(hours);\n }\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, delimiter) {\n if (offset % 60 === 0) {\n const sign = offset > 0 ? \"-\" : \"+\";\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n return formatTimezone(offset, delimiter);\n}\n\nfunction formatTimezone(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);\n const minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n","const dateLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"P\":\n return formatLong.date({ width: \"short\" });\n case \"PP\":\n return formatLong.date({ width: \"medium\" });\n case \"PPP\":\n return formatLong.date({ width: \"long\" });\n case \"PPPP\":\n default:\n return formatLong.date({ width: \"full\" });\n }\n};\n\nconst timeLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"p\":\n return formatLong.time({ width: \"short\" });\n case \"pp\":\n return formatLong.time({ width: \"medium\" });\n case \"ppp\":\n return formatLong.time({ width: \"long\" });\n case \"pppp\":\n default:\n return formatLong.time({ width: \"full\" });\n }\n};\n\nconst dateTimeLongFormatter = (pattern, formatLong) => {\n const matchResult = pattern.match(/(P+)(p+)?/) || [];\n const datePattern = matchResult[1];\n const timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n\n let dateTimeFormat;\n\n switch (datePattern) {\n case \"P\":\n dateTimeFormat = formatLong.dateTime({ width: \"short\" });\n break;\n case \"PP\":\n dateTimeFormat = formatLong.dateTime({ width: \"medium\" });\n break;\n case \"PPP\":\n dateTimeFormat = formatLong.dateTime({ width: \"long\" });\n break;\n case \"PPPP\":\n default:\n dateTimeFormat = formatLong.dateTime({ width: \"full\" });\n break;\n }\n\n return dateTimeFormat\n .replace(\"{{date}}\", dateLongFormatter(datePattern, formatLong))\n .replace(\"{{time}}\", timeLongFormatter(timePattern, formatLong));\n};\n\nexport const longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter,\n};\n","const dayOfYearTokenRE = /^D+$/;\nconst weekYearTokenRE = /^Y+$/;\n\nconst throwTokens = [\"D\", \"DD\", \"YY\", \"YYYY\"];\n\nexport function isProtectedDayOfYearToken(token) {\n return dayOfYearTokenRE.test(token);\n}\n\nexport function isProtectedWeekYearToken(token) {\n return weekYearTokenRE.test(token);\n}\n\nexport function warnOrThrowProtectedError(token, format, input) {\n const _message = message(token, format, input);\n console.warn(_message);\n if (throwTokens.includes(token)) throw new RangeError(_message);\n}\n\nfunction message(token, format, input) {\n const subject = token[0] === \"Y\" ? \"years\" : \"days of the month\";\n return `Use \\`${token.toLowerCase()}\\` instead of \\`${token}\\` (in \\`${format}\\`) for formatting ${subject} to the input \\`${input}\\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;\n}\n","/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param value - The value to check\n *\n * @returns True if the given value is a date\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport function isDate(value) {\n return (\n value instanceof Date ||\n (typeof value === \"object\" &&\n Object.prototype.toString.call(value) === \"[object Date]\")\n );\n}\n\n// Fallback for modularized imports:\nexport default isDate;\n","import { isDate } from \"./isDate.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param date - The date to check\n *\n * @returns The date is valid\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertible into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport function isValid(date) {\n return !((!isDate(date) && typeof date !== \"number\") || isNaN(+toDate(date)));\n}\n\n// Fallback for modularized imports:\nexport default isValid;\n","import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { formatters } from \"./_lib/format/formatters.js\";\nimport { longFormatters } from \"./_lib/format/longFormatters.js\";\nimport {\n isProtectedDayOfYearToken,\n isProtectedWeekYearToken,\n warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.js\";\nimport { isValid } from \"./isValid.js\";\nimport { toDate } from \"./toDate.js\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { formatters, longFormatters };\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\nexport { format as formatDate };\n\n/**\n * The {@link format} function options.\n */\n\n/**\n * @name format\n * @alias formatDate\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://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\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 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\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, ..., Sun | 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, Sa, Su | 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, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\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, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | 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 | 01, 02, ..., 11, 00 | |\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, 001, ..., 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 | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 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 | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 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 | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 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](https://date-fns.org/docs/getISOWeekYear)\n * and [getWeekYear](https://date-fns.org/docs/getWeekYear)).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\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. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param date - The original date\n * @param format - The string of tokens\n * @param options - An object with options\n *\n * @returns The formatted date string\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `localize` property\n * @throws `options.locale` must contain `formatLong` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const 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/locale/eo'\n * const 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 * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const originalDate = toDate(date, options?.in);\n\n if (!isValid(originalDate)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n let parts = formatStr\n .match(longFormattingTokensRegExp)\n .map((substring) => {\n const firstCharacter = substring[0];\n if (firstCharacter === \"p\" || firstCharacter === \"P\") {\n const longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n })\n .join(\"\")\n .match(formattingTokensRegExp)\n .map((substring) => {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return { isToken: false, value: \"'\" };\n }\n\n const firstCharacter = substring[0];\n if (firstCharacter === \"'\") {\n return { isToken: false, value: cleanEscapedString(substring) };\n }\n\n if (formatters[firstCharacter]) {\n return { isToken: true, value: substring };\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError(\n \"Format string contains an unescaped latin alphabet character `\" +\n firstCharacter +\n \"`\",\n );\n }\n\n return { isToken: false, value: substring };\n });\n\n // invoke localize preprocessor (only for french locales at the moment)\n if (locale.localize.preprocessor) {\n parts = locale.localize.preprocessor(originalDate, parts);\n }\n\n const formatterOptions = {\n firstWeekContainsDate,\n weekStartsOn,\n locale,\n };\n\n return parts\n .map((part) => {\n if (!part.isToken) return part.value;\n\n const token = part.value;\n\n if (\n (!options?.useAdditionalWeekYearTokens &&\n isProtectedWeekYearToken(token)) ||\n (!options?.useAdditionalDayOfYearTokens &&\n isProtectedDayOfYearToken(token))\n ) {\n warnOrThrowProtectedError(token, formatStr, String(date));\n }\n\n const formatter = formatters[token[0]];\n return formatter(originalDate, token, locale.localize, formatterOptions);\n })\n .join(\"\");\n}\n\nfunction cleanEscapedString(input) {\n const matched = input.match(escapedStringRegExp);\n\n if (!matched) {\n return input;\n }\n\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default format;\n","import { getDefaultOptions as getInternalDefaultOptions } from \"./_lib/defaultOptions.js\";\n\n/**\n * @name getDefaultOptions\n * @category Common Helpers\n * @summary Get default options.\n * @pure false\n *\n * @description\n * Returns an object that contains defaults for\n * `options.locale`, `options.weekStartsOn` and `options.firstWeekContainsDate`\n * arguments for all functions.\n *\n * You can change these with [setDefaultOptions](https://date-fns.org/docs/setDefaultOptions).\n *\n * @returns The default options\n *\n * @example\n * const result = getDefaultOptions()\n * //=> {}\n *\n * @example\n * setDefaultOptions({ weekStarsOn: 1, firstWeekContainsDate: 4 })\n * const result = getDefaultOptions()\n * //=> { weekStarsOn: 1, firstWeekContainsDate: 4 }\n */\nexport function getDefaultOptions() {\n return Object.assign({}, getInternalDefaultOptions());\n}\n\n// Fallback for modularized imports:\nexport default getDefaultOptions;\n","import { getDefaultOptions } from 'date-fns';\n/**\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 function tzIntlTimeZoneName(length, date, options) {\n const defaultOptions = getDefaultOptions();\n const dtf = getDTF(length, options.timeZone, options.locale ?? defaultOptions.locale);\n return 'formatToParts' in dtf ? partsTimeZone(dtf, date) : hackyTimeZone(dtf, date);\n}\nfunction partsTimeZone(dtf, date) {\n const formatted = dtf.formatToParts(date);\n for (let i = formatted.length - 1; i >= 0; --i) {\n if (formatted[i].type === 'timeZoneName') {\n return formatted[i].value;\n }\n }\n return undefined;\n}\nfunction hackyTimeZone(dtf, date) {\n const formatted = dtf.format(date).replace(/\\u200E/g, '');\n const tzNameMatch = / [\\w-+ ]+$/.exec(formatted);\n return tzNameMatch ? tzNameMatch[0].substr(1) : '';\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 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 function tzTokenizeDate(date, timeZone) {\n const dtf = getDateTimeFormat(timeZone);\n return 'formatToParts' in dtf ? partsOffset(dtf, date) : hackyOffset(dtf, date);\n}\nconst typeToPos = {\n year: 0,\n month: 1,\n day: 2,\n hour: 3,\n minute: 4,\n second: 5,\n};\nfunction partsOffset(dtf, date) {\n try {\n const formatted = dtf.formatToParts(date);\n const filled = [];\n for (let i = 0; i < formatted.length; i++) {\n const pos = typeToPos[formatted[i].type];\n if (pos !== undefined) {\n filled[pos] = parseInt(formatted[i].value, 10);\n }\n }\n return filled;\n }\n catch (error) {\n if (error instanceof RangeError) {\n return [NaN];\n }\n throw error;\n }\n}\nfunction hackyOffset(dtf, date) {\n const formatted = dtf.format(date);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const parsed = /(\\d+)\\/(\\d+)\\/(\\d+),? (\\d+):(\\d+):(\\d+)/.exec(formatted);\n // const [, fMonth, fDay, fYear, fHour, fMinute, fSecond] = parsed\n // return [fYear, fMonth, fDay, fHour, fMinute, fSecond]\n return [\n parseInt(parsed[3], 10),\n parseInt(parsed[1], 10),\n parseInt(parsed[2], 10),\n parseInt(parsed[4], 10),\n parseInt(parsed[5], 10),\n parseInt(parsed[6], 10),\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.\nconst dtfCache = {};\n// New browsers use `hourCycle`, IE and Chrome <73 does not support it and uses `hour12`\nconst testDateFormatted = new Intl.DateTimeFormat('en-US', {\n hourCycle: 'h23',\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'));\nconst hourCycleSupported = testDateFormatted === '06/25/2014, 00:00:00' ||\n testDateFormatted === '06/25/2014 00:00:00';\nfunction getDateTimeFormat(timeZone) {\n if (!dtfCache[timeZone]) {\n dtfCache[timeZone] = hourCycleSupported\n ? new Intl.DateTimeFormat('en-US', {\n hourCycle: 'h23',\n timeZone: timeZone,\n year: 'numeric',\n month: 'numeric',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n })\n : new Intl.DateTimeFormat('en-US', {\n hour12: false,\n timeZone: timeZone,\n year: 'numeric',\n month: 'numeric',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n });\n }\n return dtfCache[timeZone];\n}\n","/**\n * Use instead of `new Date(Date.UTC(...))` to support years below 100 which doesn't work\n * otherwise due to the nature of the\n * [`Date` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years.\n *\n * For `Date.UTC(...)`, use `newDateUTC(...).getTime()`.\n */\nexport function newDateUTC(fullYear, month, day, hour, minute, second, millisecond) {\n const utcDate = new Date(0);\n utcDate.setUTCFullYear(fullYear, month, day);\n utcDate.setUTCHours(hour, minute, second, millisecond);\n return utcDate;\n}\n","import { tzTokenizeDate } from '../tzTokenizeDate/index.js';\nimport { newDateUTC } from '../newDateUTC/index.js';\nconst MILLISECONDS_IN_HOUR = 3600000;\nconst MILLISECONDS_IN_MINUTE = 60000;\nconst patterns = {\n timezone: /([Z+-].*)$/,\n timezoneZ: /^(Z)$/,\n timezoneHH: /^([+-]\\d{2})$/,\n timezoneHHMM: /^([+-])(\\d{2}):?(\\d{2})$/,\n};\n// Parse constious time zone offset formats to an offset in milliseconds\nexport function tzParseTimezone(timezoneString, date, isUtcDate) {\n // Empty string\n if (!timezoneString) {\n return 0;\n }\n // Z\n let token = patterns.timezoneZ.exec(timezoneString);\n if (token) {\n return 0;\n }\n let hours;\n let absoluteOffset;\n // ±hh\n token = patterns.timezoneHH.exec(timezoneString);\n if (token) {\n hours = parseInt(token[1], 10);\n if (!validateTimezone(hours)) {\n return NaN;\n }\n return -(hours * MILLISECONDS_IN_HOUR);\n }\n // ±hh:mm or ±hhmm\n token = patterns.timezoneHHMM.exec(timezoneString);\n if (token) {\n hours = parseInt(token[2], 10);\n const minutes = parseInt(token[3], 10);\n if (!validateTimezone(hours, minutes)) {\n return NaN;\n }\n absoluteOffset = Math.abs(hours) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE;\n return token[1] === '+' ? -absoluteOffset : absoluteOffset;\n }\n // IANA time zone\n if (isValidTimezoneIANAString(timezoneString)) {\n date = new Date(date || Date.now());\n const utcDate = isUtcDate ? date : toUtcDate(date);\n const offset = calcOffset(utcDate, timezoneString);\n const fixedOffset = isUtcDate ? offset : fixOffset(date, offset, timezoneString);\n return -fixedOffset;\n }\n return NaN;\n}\nfunction toUtcDate(date) {\n return newDateUTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n}\nfunction calcOffset(date, timezoneString) {\n const tokens = tzTokenizeDate(date, timezoneString);\n // ms dropped because it's not provided by tzTokenizeDate\n const asUTC = newDateUTC(tokens[0], tokens[1] - 1, tokens[2], tokens[3] % 24, tokens[4], tokens[5], 0).getTime();\n let asTS = date.getTime();\n const over = asTS % 1000;\n asTS -= over >= 0 ? over : 1000 + over;\n return asUTC - asTS;\n}\nfunction fixOffset(date, offset, timezoneString) {\n const localTS = date.getTime();\n // Our UTC time is just a guess because our offset is just a guess\n let utcGuess = localTS - offset;\n // Test whether the zone matches the offset for this ts\n const o2 = calcOffset(new Date(utcGuess), timezoneString);\n // If so, offset didn't change, and we're done\n if (offset === o2) {\n return offset;\n }\n // If not, change the ts by the difference in the offset\n utcGuess -= o2 - offset;\n // If that gives us the local time we want, we're done\n const o3 = calcOffset(new Date(utcGuess), timezoneString);\n if (o2 === o3) {\n return o2;\n }\n // If it's different, we're in a hole time. The offset has changed, but we don't adjust the time\n return Math.max(o2, o3);\n}\nfunction validateTimezone(hours, minutes) {\n return -23 <= hours && hours <= 23 && (minutes == null || (0 <= minutes && minutes <= 59));\n}\nconst validIANATimezoneCache = {};\nfunction isValidTimezoneIANAString(timeZoneString) {\n if (validIANATimezoneCache[timeZoneString])\n return true;\n try {\n new Intl.DateTimeFormat(undefined, { timeZone: timeZoneString });\n validIANATimezoneCache[timeZoneString] = true;\n return true;\n }\n catch (error) {\n return false;\n }\n}\n","import { tzIntlTimeZoneName } from '../../_lib/tzIntlTimeZoneName/index.js';\nimport { tzParseTimezone } from '../../_lib/tzParseTimezone/index.js';\nconst MILLISECONDS_IN_MINUTE = 60 * 1000;\nexport const formatters = {\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, options) {\n const timezoneOffset = getTimeZoneOffset(options.timeZone, date);\n if (timezoneOffset === 0) {\n return 'Z';\n }\n switch (token) {\n // Hours and optional minutes\n case 'X':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\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 // 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 // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, options) {\n const timezoneOffset = getTimeZoneOffset(options.timeZone, date);\n switch (token) {\n // Hours and optional minutes\n case 'x':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\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 // 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 // Timezone (GMT)\n O: function (date, token, options) {\n const timezoneOffset = getTimeZoneOffset(options.timeZone, date);\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 // Timezone (specific non-location)\n z: function (date, token, options) {\n switch (token) {\n // Short\n case 'z':\n case 'zz':\n case 'zzz':\n return tzIntlTimeZoneName('short', date, options);\n // Long\n case 'zzzz':\n default:\n return tzIntlTimeZoneName('long', date, options);\n }\n },\n};\nfunction getTimeZoneOffset(timeZone, originalDate) {\n const timeZoneOffset = timeZone\n ? tzParseTimezone(timeZone, originalDate, true) / MILLISECONDS_IN_MINUTE\n : originalDate?.getTimezoneOffset() ?? 0;\n if (Number.isNaN(timeZoneOffset)) {\n throw new RangeError('Invalid time zone specified: ' + timeZone);\n }\n return timeZoneOffset;\n}\nfunction addLeadingZeros(number, targetLength) {\n const sign = number < 0 ? '-' : '';\n let output = Math.abs(number).toString();\n while (output.length < targetLength) {\n output = '0' + output;\n }\n return sign + output;\n}\nfunction formatTimezone(offset, delimiter = '') {\n const sign = offset > 0 ? '-' : '+';\n const absOffset = Math.abs(offset);\n const hours = addLeadingZeros(Math.floor(absOffset / 60), 2);\n const minutes = addLeadingZeros(Math.floor(absOffset % 60), 2);\n return sign + hours + delimiter + minutes;\n}\nfunction formatTimezoneWithOptionalMinutes(offset, delimiter) {\n if (offset % 60 === 0) {\n const sign = offset > 0 ? '-' : '+';\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n return formatTimezone(offset, delimiter);\n}\nfunction formatTimezoneShort(offset, delimiter = '') {\n const sign = offset > 0 ? '-' : '+';\n const absOffset = Math.abs(offset);\n const hours = Math.floor(absOffset / 60);\n const minutes = absOffset % 60;\n if (minutes === 0) {\n return sign + String(hours);\n }\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n","/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n const utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));\n utcDate.setUTCFullYear(date.getFullYear());\n return +date - +utcDate;\n}\n","/** Regex to identify the presence of a time zone specifier in a date string */\nexport const tzPattern = /(Z|[+-]\\d{2}(?::?\\d{2})?| UTC| [a-zA-Z]+\\/[a-zA-Z_]+(?:\\/[a-zA-Z_]+)?)$/;\n","import { getTimezoneOffsetInMilliseconds } from '../_lib/getTimezoneOffsetInMilliseconds/index.js';\nimport { tzParseTimezone } from '../_lib/tzParseTimezone/index.js';\nimport { tzPattern } from '../_lib/tzPattern/index.js';\nconst MILLISECONDS_IN_HOUR = 3600000;\nconst MILLISECONDS_IN_MINUTE = 60000;\nconst DEFAULT_ADDITIONAL_DIGITS = 2;\nconst patterns = {\n dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,\n datePattern: /^([0-9W+-]+)(.*)/,\n plainTime: /:/,\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 // 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 HH: /^(\\d{2}([.,]\\d*)?)$/,\n HHMM: /^(\\d{2}):?(\\d{2}([.,]\\d*)?)$/,\n HHMMSS: /^(\\d{2}):?(\\d{2}):?(\\d{2}([.,]\\d*)?)$/,\n // time zone tokens (to identify the presence of a tz)\n timeZone: tzPattern,\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 argument the value to convert\n * @param 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 *\n * @returns 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 * const 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 * const result = toDate('+02014101', {additionalDigits: 1})\n * //=> Fri Apr 11 2014 00:00:00\n */\nexport function toDate(argument, options = {}) {\n if (arguments.length < 1) {\n throw new TypeError('1 argument required, but only ' + arguments.length + ' present');\n }\n if (argument === null) {\n return new Date(NaN);\n }\n const additionalDigits = options.additionalDigits == null ? DEFAULT_ADDITIONAL_DIGITS : Number(options.additionalDigits);\n if (additionalDigits !== 2 && additionalDigits !== 1 && additionalDigits !== 0) {\n throw new RangeError('additionalDigits must be 0, 1 or 2');\n }\n // Clone the date\n if (argument instanceof Date ||\n (typeof argument === 'object' && Object.prototype.toString.call(argument) === '[object Date]')) {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime());\n }\n else if (typeof argument === 'number' ||\n Object.prototype.toString.call(argument) === '[object Number]') {\n return new Date(argument);\n }\n else if (!(Object.prototype.toString.call(argument) === '[object String]')) {\n return new Date(NaN);\n }\n const dateStrings = splitDateString(argument);\n const { year, restDateString } = parseYear(dateStrings.date, additionalDigits);\n const date = parseDate(restDateString, year);\n if (date === null || isNaN(date.getTime())) {\n return new Date(NaN);\n }\n if (date) {\n const timestamp = date.getTime();\n let time = 0;\n let offset;\n if (dateStrings.time) {\n time = parseTime(dateStrings.time);\n if (time === null || isNaN(time)) {\n return new Date(NaN);\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 }\n else {\n // get offset accurate to hour in time zones that change offset\n offset = getTimezoneOffsetInMilliseconds(new Date(timestamp + time));\n offset = getTimezoneOffsetInMilliseconds(new Date(timestamp + time + offset));\n }\n return new Date(timestamp + time + offset);\n }\n else {\n return new Date(NaN);\n }\n}\nfunction splitDateString(dateString) {\n const dateStrings = {};\n let parts = patterns.dateTimePattern.exec(dateString);\n let timeString;\n if (!parts) {\n parts = patterns.datePattern.exec(dateString);\n if (parts) {\n dateStrings.date = parts[1];\n timeString = parts[2];\n }\n else {\n dateStrings.date = null;\n timeString = dateString;\n }\n }\n else {\n dateStrings.date = parts[1];\n timeString = parts[3];\n }\n if (timeString) {\n const token = patterns.timeZone.exec(timeString);\n if (token) {\n dateStrings.time = timeString.replace(token[1], '');\n dateStrings.timeZone = token[1].trim();\n }\n else {\n dateStrings.time = timeString;\n }\n }\n return dateStrings;\n}\nfunction parseYear(dateString, additionalDigits) {\n if (dateString) {\n const patternYYY = patterns.YYY[additionalDigits];\n const patternYYYYY = patterns.YYYYY[additionalDigits];\n // YYYY or ±YYYYY\n let token = patterns.YYYY.exec(dateString) || patternYYYYY.exec(dateString);\n if (token) {\n const yearString = token[1];\n return {\n year: parseInt(yearString, 10),\n restDateString: dateString.slice(yearString.length),\n };\n }\n // YY or ±YYY\n token = patterns.YY.exec(dateString) || patternYYY.exec(dateString);\n if (token) {\n const 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}\nfunction parseDate(dateString, year) {\n // Invalid ISO-formatted year\n if (year === null) {\n return null;\n }\n let date;\n let month;\n let week;\n // YYYY\n if (!dateString || !dateString.length) {\n date = new Date(0);\n date.setUTCFullYear(year);\n return date;\n }\n // YYYY-MM\n let token = patterns.MM.exec(dateString);\n if (token) {\n date = new Date(0);\n month = parseInt(token[1], 10) - 1;\n if (!validateDate(year, month)) {\n return new Date(NaN);\n }\n date.setUTCFullYear(year, month);\n return date;\n }\n // YYYY-DDD or YYYYDDD\n token = patterns.DDD.exec(dateString);\n if (token) {\n date = new Date(0);\n const dayOfYear = parseInt(token[1], 10);\n if (!validateDayOfYearDate(year, dayOfYear)) {\n return new Date(NaN);\n }\n date.setUTCFullYear(year, 0, dayOfYear);\n return date;\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 const day = parseInt(token[2], 10);\n if (!validateDate(year, month, day)) {\n return new Date(NaN);\n }\n date.setUTCFullYear(year, month, day);\n return date;\n }\n // YYYY-Www or YYYYWww\n token = patterns.Www.exec(dateString);\n if (token) {\n week = parseInt(token[1], 10) - 1;\n if (!validateWeekDate(week)) {\n return new Date(NaN);\n }\n return dayOfISOWeekYear(year, week);\n }\n // YYYY-Www-D or YYYYWwwD\n token = patterns.WwwD.exec(dateString);\n if (token) {\n week = parseInt(token[1], 10) - 1;\n const dayOfWeek = parseInt(token[2], 10) - 1;\n if (!validateWeekDate(week, dayOfWeek)) {\n return new Date(NaN);\n }\n return dayOfISOWeekYear(year, week, dayOfWeek);\n }\n // Invalid ISO-formatted date\n return null;\n}\nfunction parseTime(timeString) {\n let hours;\n let minutes;\n // hh\n let token = patterns.HH.exec(timeString);\n if (token) {\n hours = parseFloat(token[1].replace(',', '.'));\n if (!validateTime(hours)) {\n return NaN;\n }\n return (hours % 24) * MILLISECONDS_IN_HOUR;\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 if (!validateTime(hours, minutes)) {\n return NaN;\n }\n return (hours % 24) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE;\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 const seconds = parseFloat(token[3].replace(',', '.'));\n if (!validateTime(hours, minutes, seconds)) {\n return NaN;\n }\n return (hours % 24) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE + seconds * 1000;\n }\n // Invalid ISO-formatted time\n return null;\n}\nfunction dayOfISOWeekYear(isoWeekYear, week, day) {\n week = week || 0;\n day = day || 0;\n const date = new Date(0);\n date.setUTCFullYear(isoWeekYear, 0, 4);\n const fourthOfJanuaryDay = date.getUTCDay() || 7;\n const diff = week * 7 + day + 1 - fourthOfJanuaryDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n}\n// Validation functions\nconst DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst DAYS_IN_MONTH_LEAP_YEAR = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nfunction isLeapYearIndex(year) {\n return year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0);\n}\nfunction validateDate(year, month, date) {\n if (month < 0 || month > 11) {\n return false;\n }\n if (date != null) {\n if (date < 1) {\n return false;\n }\n const 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 return true;\n}\nfunction validateDayOfYearDate(year, dayOfYear) {\n if (dayOfYear < 1) {\n return false;\n }\n const isLeapYear = isLeapYearIndex(year);\n if (isLeapYear && dayOfYear > 366) {\n return false;\n }\n if (!isLeapYear && dayOfYear > 365) {\n return false;\n }\n return true;\n}\nfunction validateWeekDate(week, day) {\n if (week < 0 || week > 52) {\n return false;\n }\n if (day != null && (day < 0 || day > 6)) {\n return false;\n }\n return true;\n}\nfunction validateTime(hours, minutes, seconds) {\n if (hours < 0 || hours >= 25) {\n return false;\n }\n if (minutes != null && (minutes < 0 || minutes >= 60)) {\n return false;\n }\n if (seconds != null && (seconds < 0 || seconds >= 60)) {\n return false;\n }\n return true;\n}\n","import { format as dateFnsFormat } from 'date-fns/format';\nimport { formatters } from './formatters/index.js';\nimport { toDate } from '../toDate/index.js';\nconst tzFormattingTokensRegExp = /([xXOz]+)|''|'(''|[^'])+('|$)/g;\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 consty 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 the original date\n * @param formatStr the string of tokens\n * @param 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 * @param {Date|Number} [options.originalDate] - can be used to pass the original unmodified date to `format` to\n * improve correctness of the replaced timezone token close to the DST threshold.\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 * const 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/locale/eo'\n * const 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 * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options = {}) {\n formatStr = String(formatStr);\n const matches = formatStr.match(tzFormattingTokensRegExp);\n if (matches) {\n const d = toDate(options.originalDate || date, options);\n // Work through each match and replace the tz token in the format string with the quoted\n // formatted time zone so the remaining tokens can be filled in by date-fns#format.\n formatStr = matches.reduce(function (result, token) {\n if (token[0] === \"'\") {\n return result; // This is a quoted portion, matched only to ensure we don't match inside it\n }\n const pos = result.indexOf(token);\n const precededByQuotedSection = result[pos - 1] === \"'\";\n const replaced = result.replace(token, \"'\" + formatters[token[0]](d, token, options) + \"'\");\n // If the replacement results in two adjoining quoted strings, the back to back quotes\n // are removed, so it doesn't look like an escaped quote.\n return precededByQuotedSection\n ? replaced.substring(0, pos - 1) + replaced.substring(pos + 1)\n : replaced;\n }, formatStr);\n }\n return dateFnsFormat(date, formatStr, options);\n}\n","import { format } from '../format/index.js';\nimport { toZonedTime } from '../toZonedTime/index.js';\n/**\n * @name formatInTimeZone\n * @category Time Zone Helpers\n * @summary Gets the offset in milliseconds between the time zone and Universal Coordinated Time (UTC)\n *\n * @param date the date representing the local time / real UTC time\n * @param timeZone the time zone this date should be formatted for; can be an offset or IANA time zone\n * @param formatStr the string of tokens\n * @param 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 */\nexport function formatInTimeZone(date, timeZone, formatStr, options) {\n options = {\n ...options,\n timeZone,\n originalDate: date,\n };\n return format(toZonedTime(date, timeZone, { timeZone: options.timeZone }), formatStr, options);\n}\n","import { tzParseTimezone } from '../_lib/tzParseTimezone/index.js';\nimport { toDate } from '../toDate/index.js';\n/**\n * @name toZonedTime\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 the date with the relevant UTC time\n * @param timeZone the time zone to get local time for, can be an offset or IANA time zone\n * @param 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 *\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 = toZonedTime('2014-06-25T10:00:00.000Z', 'America/New_York')\n * //=> Jun 25 2014 06:00:00\n */\nexport function toZonedTime(date, timeZone, options) {\n date = toDate(date, options);\n const offsetMilliseconds = tzParseTimezone(timeZone, date, true);\n const d = new Date(date.getTime() - offsetMilliseconds);\n const resultDate = new Date(0);\n resultDate.setFullYear(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate());\n resultDate.setHours(d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds());\n return resultDate;\n}\n","import { nb } from 'date-fns/locale'\nimport { formatInTimeZone } from 'date-fns-tz'\n\nexport function getArticleInfo() {\n if (document.querySelector('article.dh-sa-article')) {\n // Hent informasjon fra Stilbar Artikkel\n return {\n authors: getSAAuthors(),\n publishedStrings: getSAPublishedStrings(),\n }\n }\n\n // Default XL-article or feature with similar setup\n return {\n authors: getXLAuthors(),\n publishedStrings: getXLPublishedStrings(),\n }\n}\n\nfunction getLinkedData() {\n const element = document.querySelector('script[type=\"application/ld+json\"]') as\n | HTMLElement\n | undefined\n return element ? JSON.parse(element?.innerText) : {}\n}\n\nfunction getXLAuthors() {\n return Array.from(document.querySelectorAll('.author__body')).map((authorElm) => {\n const authNameElm = authorElm.querySelector('.author__name') as HTMLAnchorElement\n const authRoleElm = authorElm.querySelector('.author__role')\n return {\n name: Array.from(authNameElm.childNodes ?? [])\n .filter((n) => n.nodeName === '#text')\n .map((n) => n.textContent)\n .join('')\n .trim(),\n href: authNameElm.href,\n role: authRoleElm.textContent,\n }\n })\n}\n\nfunction formatDate(date) {\n return formatInTimeZone(date, 'Europe/Oslo', `dd. MMM yyyy 'KL.' HH:mm`, { locale: nb })\n}\n\nfunction getXLPublishedStrings() {\n const { datePublished, dateModified } = getLinkedData()\n if (!datePublished) {\n return ['Upublisert']\n }\n if (!dateModified) {\n return [`Publisert ${formatDate(datePublished)}`]\n }\n return [`Publisert ${formatDate(datePublished)}`, `Oppdatert ${formatDate(dateModified)}`]\n}\n\nfunction getSAAuthors() {\n const articleInfo = getLinkedData()\n return (\n articleInfo?.author?.map((author: any) => {\n return {\n name: author.name,\n href: author.email ? `mailto:${author.email}` : undefined,\n role: author.role,\n }\n }) ?? []\n )\n}\n\nfunction getSAPublishedStrings() {\n const articleInfo = getLinkedData()\n if (!articleInfo?.datePublished) {\n return ['']\n }\n\n const formattedDate = new Intl.DateTimeFormat('no', {\n dateStyle: 'medium',\n timeZone: 'CET',\n }).format(new Date(articleInfo?.datePublished))\n\n return [`Publisert ${formattedDate}`]\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"logo-wrapper\":\"dhis__logo-wrapper--db0f8\",\"logoWrapper\":\"dhis__logo-wrapper--db0f8\",\"nrklogo\":\"dhis__nrklogo--d16ef\",\"introscroll\":\"dhis__introscroll--c059f\",\"introscroll__error\":\"dhis__introscroll__error--c25da\",\"introscrollError\":\"dhis__introscroll__error--c25da\"};","import { html } from '@nrk/dh-server-libs/html'\nimport Scrollhistorie from '@nrk/dh-basis-scrollhistorie'\nimport { closest } from '@nrk/dh-basis-common'\nimport { balanceAndWatch } from '../lib/balance-text-wrapper.js'\nimport debounce from 'debounce'\nimport { getArticleInfo } from './article-info.ts'\n\n/* styles */\nimport styles from './introscroll.module.css'\nimport backgroundStyles from './background.module.css'\nimport cardStyles from './cards/cards.module.css'\n\nconst s = { ...styles, ...backgroundStyles, ...cardStyles }\n\nexport default class Introscroll extends Scrollhistorie {\n static get observedAttributes() {\n return ['background-color', ...super.observedAttributes]\n }\n\n #updating = false\n #viewport = { height: 0, width: 0 }\n #currentPercentage\n #debouncedUpdateSizes\n\n connectedCallback() {\n super.connectedCallback()\n this.#updateSizes()\n this.#debouncedUpdateSizes = debounce(this.#updateSizes, 500)\n window.addEventListener('resize', this.#debouncedUpdateSizes)\n // eslint-disable-next-line compat/compat\n if (document?.fonts?.ready?.then) {\n // eslint-disable-next-line promise/catch-or-return\n document.fonts.ready.then(this.#updateTitle)\n }\n\n this.#updateByline()\n\n // Date in byline is calculated on the client. Update byline to include new date.\n setTimeout(() => this.#updateByline(), 100)\n setTimeout(() => this.#updateByline(), 5000)\n\n /*\n Make media elements focusable so that we can adjust the scroll\n when a background image is focused (i.e. with a screen reader)\n */\n for (const elm of this.querySelectorAll('img, video, [role=img]')) {\n elm.tabIndex = '-1'\n }\n this.addEventListener('focus', this.#handleFocus, true)\n\n /*\n Polyfill text-wrap: balance.\n TODO: remove once Safari fully supports text-wrap: balance\n (There's currently a bug in Safari that disables text-wrap balance when used with box-decoration)\n https://bugs.webkit.org/show_bug.cgi?id=274145\n */\n if (!CSS.supports('text-wrap', 'balance') || navigator?.userAgent?.includes?.('Safari')) {\n requestAnimationFrame(() => {\n balanceAndWatch(this.querySelectorAll('.balance-text'))\n })\n }\n\n /*\n Fallback for when `animation-timeline: view()` is not supported\n TODO: remove once Safari supports scroll-driven animations\n */\n if (!CSS.supports('animation-timeline: view()')) {\n document.addEventListener('scroll', this)\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n this.removeEventListener('focus', this.#handleFocus, true)\n window.removeEventListener('resize', this.#debouncedUpdateSizes)\n\n /* TODO: remove once Safari supports scroll-driven animations */\n document.removeEventListener('scroll', this)\n }\n\n attributeChangedCallback(name, prevValue, newValue) {\n super.attributeChangedCallback(name, prevValue, newValue)\n\n if (name === 'background-color' && typeof newValue === 'string') {\n this.style.setProperty('--introscroll-background-color', newValue)\n }\n }\n\n handleEvent(event) {\n if (event.type === 'scroll') {\n this.#updateVisiblePercentage()\n }\n }\n\n /**\n * When a background image is focused:\n * - Adjust the scroll position to ensure that the background is visible.\n */\n #handleFocus = (e) => {\n const backgroundElement = e.target && closest(e.target, '[data-background-id]')\n if (!backgroundElement) {\n return\n }\n\n const backgroundId = backgroundElement.getAttribute('data-background-id')\n if (this.activeBackgroundId !== backgroundId) {\n const triggerElement = this.triggerElements.find(\n (elm) => elm.getAttribute('data-show-background') === backgroundId,\n )\n if (triggerElement) {\n window.scrollTo(0, triggerElement.offsetTop - window.innerHeight / 2)\n }\n }\n }\n\n /**\n * Update how many percent of the screen is filled with introscroll.\n * Used to fade out and translate up the last card for browsers that doesn't support scroll-driven animations.\n *\n * TODO: Remove once Safari supports scroll-driven animations\n *\n * @private\n */\n #updateVisiblePercentage() {\n if (this.#updating || this.viewportPosition !== 'IN-VIEWPORT') {\n return\n }\n this.#updating = true\n requestAnimationFrame(() => {\n const bottom = Math.min(\n Math.max(this.offsetHeight - window.scrollY, 0),\n this.#viewport.height,\n )\n const percentage = bottom / this.#viewport.height\n if (percentage !== this.#currentPercentage) {\n this.style.setProperty('--fallback-progress', percentage.toFixed(3))\n this.#currentPercentage = percentage\n }\n\n this.#updating = false\n })\n }\n\n #updateByline() {\n const { authors, publishedStrings } = getArticleInfo()\n\n const container = this.querySelector(`.${s.byline}`)\n const expandable = authors.length > 3\n\n const authorHTML = authors.map((author) => {\n return html`\n \n `\n })\n const expandHTML = html`\n \n Vis ${authors.length - 1} bidragsytere til\n +${authors.length - 1} til\n \n `\n authorHTML.splice(1, 0, expandHTML)\n\n container.innerHTML = html`\n ${authorHTML.join('')}
\n ${publishedStrings?.map((str) => `${str}
`).join('') ??\n ''}\n `\n }\n\n #updateSizes = () => {\n if (this.#viewport.height !== document.documentElement.clientHeight) {\n this.#viewport.height = document.documentElement.clientHeight\n }\n\n if (this.#viewport.width !== document.documentElement.clientWidth) {\n this.#viewport.width = document.documentElement.clientWidth\n this.#updateTitle()\n }\n }\n\n #updateTitle = () => {\n const titleCardContainer = this.querySelector(`.${s.titleCard} .${s.textContainer}`)\n let fontReduce = 0\n this.style.setProperty('--introscroll-font-reduce', `${fontReduce}px`)\n while (titleCardContainer.scrollWidth > titleCardContainer.offsetWidth && fontReduce < 20) {\n fontReduce++\n this.style.setProperty('--introscroll-font-reduce', `${fontReduce}px`)\n }\n }\n\n get backgroundColor() {\n this.getAttribute('background-color')\n }\n\n set backgroundColor(val) {\n this.setAttribute('background-color', val)\n }\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"background\":\"dhis__background--dd0c3\",\"vertical\":\"dhis__vertical--ddc6d\",\"horizontal\":\"dhis__horizontal--dba9e\",\"credit\":\"dhis__credit--b3d94\",\"horizontal-cover\":\"dhis__horizontal-cover--f46ea\",\"horizontalCover\":\"dhis__horizontal-cover--f46ea\",\"horizontal-contain\":\"dhis__horizontal-contain--ff75a\",\"horizontalContain\":\"dhis__horizontal-contain--ff75a\",\"vertical-cover\":\"dhis__vertical-cover--ada53\",\"verticalCover\":\"dhis__vertical-cover--ada53\",\"vertical-contain\":\"dhis__vertical-contain--b143b\",\"verticalContain\":\"dhis__vertical-contain--b143b\",\"introscroll\":\"dhis__introscroll--a00bc\"};","// extracted by mini-css-extract-plugin\nexport default {\"card\":\"dhis__card--fd4d0\",\"text-container\":\"dhis__text-container--df1ed\",\"textContainer\":\"dhis__text-container--df1ed\",\"first\":\"dhis__first--cd235\",\"last\":\"dhis__last--ba7bd\",\"fade-up\":\"dhis__fade-up--db9ec\",\"fadeUp\":\"dhis__fade-up--db9ec\",\"title-card\":\"dhis__title-card--d2a9c\",\"titleCard\":\"dhis__title-card--d2a9c\",\"title-layout\":\"dhis__title-layout--b10fb\",\"titleLayout\":\"dhis__title-layout--b10fb\",\"large\":\"dhis__large--c57e1\",\"byline\":\"dhis__byline--eff27\",\"authors\":\"dhis__authors--a4208\",\"author\":\"dhis__author--afbf6\",\"author__name\":\"dhis__author__name--dcd8b\",\"authorName\":\"dhis__author__name--dcd8b\",\"author__role\":\"dhis__author__role--dbf9a\",\"authorRole\":\"dhis__author__role--dbf9a\",\"expandable\":\"dhis__expandable--bec76\",\"publish__date\":\"dhis__publish__date--d7da8\",\"publishDate\":\"dhis__publish__date--d7da8\"};","import { toArray, setAttribute } from '@nrk/dh-basis-common'\n\nconst CHILD_SELECTOR = '[dh-receive-introscroll-attributes]'\nconst STATE_ATTR = 'data-state'\nconst VIEWPORT_POSITION_ATTR = 'viewport-position'\nconst VIEWPORT_POSITION_DATA_ATTR = 'data-viewport-position'\n\nconst STOPS_ATTR = 'stops'\nconst TARGET_STOP_ATTR = 'target-stop'\n\n/*\n * Copies down the 'data-state' attribute to child.\n * Detects and sets 'data-viewport-position' on child.\n * */\nexport default class Spesialmodul extends HTMLElement {\n static get observedAttributes() {\n return [STATE_ATTR, VIEWPORT_POSITION_ATTR, STOPS_ATTR, TARGET_STOP_ATTR]\n }\n\n connectedCallback() {}\n\n disconnectedCallback() {}\n\n attributeChangedCallback(name, prev, next) {\n if (prev === next) {\n return\n }\n this._updateChildElements()\n }\n\n _updateChildElements() {\n const state = this.state\n const viewportPosition = this.viewportPosition\n const spesialmoduler = this.spesialmoduler\n const stops = this.stops\n const targetStop = this.targetStop\n spesialmoduler.forEach((spesialmodul) => {\n setAttribute(spesialmodul, STATE_ATTR, state)\n setAttribute(spesialmodul, VIEWPORT_POSITION_DATA_ATTR, viewportPosition)\n if (stops && stops.length) {\n setAttribute(spesialmodul, STOPS_ATTR, stops)\n setAttribute(spesialmodul, TARGET_STOP_ATTR, targetStop)\n }\n })\n }\n\n get spesialmoduler() {\n return toArray(this.querySelectorAll(CHILD_SELECTOR))\n }\n\n get viewportPosition() {\n return this.getAttribute(VIEWPORT_POSITION_ATTR)\n }\n\n set viewportPosition(value) {\n setAttribute(this, VIEWPORT_POSITION_ATTR, value)\n }\n\n get state() {\n return this.getAttribute(STATE_ATTR)\n }\n\n set state(value) {\n setAttribute(this, STATE_ATTR, value)\n }\n\n get stops() {\n return this.getAttribute(STOPS_ATTR)\n }\n\n set stops(val) {\n this.setAttribute(STOPS_ATTR, val)\n }\n\n get targetStop() {\n return Number(this.getAttribute(TARGET_STOP_ATTR))\n }\n\n set targetStop(val) {\n this.setAttribute(TARGET_STOP_ATTR, val)\n }\n}\n","import _defineProperty from '@babel/runtime/helpers/defineProperty';\nimport { closest, testReducedMotion, withinStops, toArray, setAttribute, toggleAttribute, withinRange } from '@nrk/dh-basis-common';\n\nvar STOPS_ATTR = 'stops';\nvar TARGET_STOP_ATTR = 'target-stop';\nvar AUTOPLAY_BLOCKED = 'autoplay-blocked';\nvar STATE_ATTR = 'data-state'; // Data attribute, so that it can be used on other elements\nvar VIEWPORT_POSITION_ATTR = 'data-viewport-position';\nvar READY_STATE = {\n HAVE_NOTHING: 0,\n HAVE_METADATA: 1,\n HAVE_CURRENT_DATA: 2,\n HAVE_FUTURE_DATA: 3,\n HAVE_ENOUGH_DATA: 4 // Can play through\n};\n\n// Most videos have a frame-rate of 25 fps, but not all. Use with care.\n// Used to calculate target zone.\nvar FRAME_RATE = 25;\nvar isVisible = child => child.offsetWidth > 0 || child.offsetHeight > 0;\n\n/* Ponyfill Math.sign */\nfunction sign(val) {\n return val >= 0 ? 1 : -1;\n}\nfunction round(num, decimals) {\n var multiplier = Math.pow(10.0, decimals);\n return Math.round(num * multiplier) / multiplier;\n}\nclass StegvisVideo extends HTMLElement {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"_paused\", true);\n _defineProperty(this, \"_disconnecting\", false);\n _defineProperty(this, \"_reducedMotionSeekEnabled\", false);\n _defineProperty(this, \"_onReadyStateChange\", e => {\n if (isVisible(e.target) && e.target.readyState >= READY_STATE.HAVE_ENOUGH_DATA) {\n this._startSeek();\n }\n });\n _defineProperty(this, \"_handleClick\", e => {\n var btn = closest(e.target, 'button');\n if (!btn) {\n return;\n }\n\n /* Triggers play if autoplay was blocked */\n var videoElement = this.videoElement;\n if (videoElement !== null && videoElement !== void 0 && videoElement.paused) {\n var playPromise = videoElement.play() || Promise.resolve();\n playPromise.then(() => {\n this.autoplayBlocked = false;\n });\n }\n });\n }\n static get observedAttributes() {\n return [TARGET_STOP_ATTR, STATE_ATTR, VIEWPORT_POSITION_ATTR];\n }\n connectedCallback() {\n this.addEventListener('click', this._handleClick);\n this.videoElements.forEach(videoElement => videoElement.addEventListener('canplaythrough', this._onReadyStateChange));\n }\n disconnectedCallback() {\n this._disconnecting = true;\n this.removeEventListener('click', this._handleClick);\n this.videoElements.forEach(videoElement => videoElement.removeEventListener('canplaythrough', this._onReadyStateChange));\n }\n attributeChangedCallback(name, prevValue, newValue) {\n var hasValue = newValue !== null;\n var valueChanged = prevValue !== newValue;\n if (!valueChanged) {\n return;\n }\n if (name === STATE_ATTR) {\n this._stateChanged(prevValue, newValue);\n } else if (name === VIEWPORT_POSITION_ATTR) {\n this._viewportChanged(newValue);\n } else if (name === TARGET_STOP_ATTR) {\n hasValue && this._startSeek();\n }\n }\n _stateChanged(prevState, nextState) {\n if (nextState === 'ACTIVE') {\n if (prevState === 'NEXT') {\n this._gotoStart();\n } else if (prevState === 'PREV') {\n this._gotoEnd();\n }\n this._startSeek();\n } else {\n this._paused = true;\n }\n }\n _viewportChanged(newValue) {\n if (newValue === 'IN-VIEWPORT') {\n this._preload();\n this._startSeek();\n } else if (newValue === 'ABOVE-VIEWPORT') {\n this._paused = true;\n this._gotoEnd();\n } else if (newValue === 'BELOW-VIEWPORT') {\n this._paused = true;\n this._gotoStart();\n }\n }\n _shouldPlay() {\n var _this$videoElement;\n var inViewport = typeof this.viewportPosition === 'undefined' || this.viewportPosition === 'IN-VIEWPORT';\n return ((_this$videoElement = this.videoElement) === null || _this$videoElement === void 0 ? void 0 : _this$videoElement.readyState) >= READY_STATE.HAVE_ENOUGH_DATA && inViewport && this.state === 'ACTIVE';\n }\n _preload() {\n var videoElement = this.videoElement;\n if ((videoElement === null || videoElement === void 0 ? void 0 : videoElement.readyState) < READY_STATE.HAVE_ENOUGH_DATA) {\n videoElement === null || videoElement === void 0 || videoElement.load();\n }\n }\n _gotoStart() {\n if (this.autoplayBlocked) {\n return;\n }\n var videoElement = this.videoElement;\n if (videoElement && videoElement.currentTime !== 0) {\n videoElement.currentTime = 0;\n }\n }\n _gotoEnd() {\n if (this.autoplayBlocked) {\n return;\n }\n var videoElement = this.videoElement;\n var duration = videoElement === null || videoElement === void 0 ? void 0 : videoElement.duration;\n if (Number.isFinite(duration)) {\n videoElement.currentTime = duration;\n }\n }\n _enableSeekOnReducedMotion() {\n var videoElement = this.videoElement;\n if (this._reducedMotionSeekEnabled || !videoElement) {\n return Promise.resolve();\n }\n return (videoElement.play() || Promise.resolve(true)).then(() => {\n videoElement.pause();\n this._reducedMotionSeekEnabled = true;\n }).catch(e => {\n // Ignore error\n });\n }\n _startSeek() {\n if (!this._paused || !this._shouldPlay()) {\n return;\n }\n var reducedMotion = testReducedMotion();\n this._paused = false;\n var prevTime;\n var loop = timestamp => {\n var videoElement = this.videoElement;\n var targetTime = this.stops[this.targetStop];\n if (this._disconnecting || this._paused || !videoElement || !isFinite(targetTime)) {\n this._paused = true;\n videoElement === null || videoElement === void 0 || videoElement.pause();\n return;\n }\n if (!prevTime) {\n prevTime = timestamp;\n }\n this.invisibleVideoElements.filter(video => !video.paused).forEach(invisibleVideo => invisibleVideo.pause());\n var dt = (timestamp - prevTime) / 1000;\n var framesPerTick = Math.max(Math.ceil(Math.abs(dt * FRAME_RATE)), 1);\n var buffer = 0.5 * framesPerTick / FRAME_RATE;\n var currentTime = videoElement.currentTime;\n var atTargetStop = withinRange(currentTime, targetTime - buffer, targetTime + buffer);\n if (atTargetStop) {\n if (videoElement.currentTime !== targetTime) {\n videoElement.currentTime = targetTime;\n }\n this._paused = true;\n videoElement.pause();\n } else if (reducedMotion) {\n this._enableSeekOnReducedMotion().then(() => {\n videoElement.currentTime = targetTime;\n this._paused = true;\n });\n } else {\n var speed = this._calculateSpeed(currentTime);\n var direction = sign(targetTime - currentTime);\n if (this.autoplayBlocked) ; else if (direction === 1) {\n // Use normal playback for forward playback\n videoElement.playbackRate = speed;\n if (videoElement.paused) {\n var playPromise = videoElement.play() || Promise.resolve();\n playPromise.catch(e => {\n console.error(e);\n this.autoplayBlocked = true;\n });\n }\n } else {\n // Use seeking for reverse playback:\n // https://github.com/whatwg/html/issues/3754\n videoElement.pause();\n var nextTime = round(currentTime + dt * speed * direction, 2.0);\n if (currentTime !== nextTime) {\n videoElement.currentTime = nextTime;\n }\n }\n prevTime = timestamp;\n requestAnimationFrame(loop);\n }\n };\n // eslint-disable-next-line compat/compat\n requestAnimationFrame(loop);\n }\n _calculateSpeed(currentTime) {\n return withinStops(currentTime, this.stops, this.targetStop, 1) ? 1 : 3;\n }\n get videoElement() {\n return this.videoElements.find(isVisible);\n }\n get invisibleVideoElements() {\n return this.videoElements.filter(child => !isVisible(child));\n }\n get videoElements() {\n return toArray(this.children).filter(child => child.nodeName === 'VIDEO');\n }\n get stops() {\n var stopString = this.getAttribute(STOPS_ATTR) || '';\n return stopString.replace(/[[\\]]/g, '').split(',').map(s => s.trim()).filter(Boolean).map(s => Number(s));\n }\n set stops(val) {\n this.setAttribute(STOPS_ATTR, val.map(num => num.toFixed(2)).join(','));\n }\n get targetStop() {\n return Number(this.getAttribute(TARGET_STOP_ATTR) || 0);\n }\n set targetStop(val) {\n this.setAttribute(TARGET_STOP_ATTR, val);\n }\n get state() {\n return this.getAttribute(STATE_ATTR);\n }\n set state(val) {\n setAttribute(this, STATE_ATTR, val);\n }\n get viewportPosition() {\n return this.getAttribute(VIEWPORT_POSITION_ATTR);\n }\n set viewportPosition(val) {\n this.setAttribute(VIEWPORT_POSITION_ATTR, val);\n }\n get autoplayBlocked() {\n return this.hasAttribute(AUTOPLAY_BLOCKED) || false;\n }\n set autoplayBlocked(val) {\n toggleAttribute(this, AUTOPLAY_BLOCKED, val);\n }\n}\n\nexport { StegvisVideo as default };\n//# sourceMappingURL=index.esm.js.map\n","import _defineProperty from '@babel/runtime/helpers/defineProperty';\nimport { dispatchEvent, testReducedMotion, toArray, toggleAttribute } from '@nrk/dh-basis-common';\n\nvar STATE_ATTR = 'data-state';\nvar VIEWPORT_POSITION_ATTR = 'data-viewport-position';\nvar DISABLE_FORCED_ATTRIBUTES_ATTR = 'disable-forced-attributes';\nvar IS_PAUSED = 'is-paused';\nvar AUTOPLAY_BLOCKED = 'autoplay-blocked';\nvar READY_STATE = {\n HAVE_NOTHING: 0,\n HAVE_METADATA: 1,\n HAVE_CURRENT_DATA: 2,\n HAVE_FUTURE_DATA: 3,\n HAVE_ENOUGH_DATA: 4 // Can play through\n};\nvar isVisible = child => !!child.offsetParent;\nclass LevendeStillbilde extends HTMLElement {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"_disconnecting\", false);\n _defineProperty(this, \"_visibleVideoElement\", void 0);\n _defineProperty(this, \"_handlePlayChange\", e => {\n if (e.type === 'play') {\n dispatchEvent(this, 'dh-basis-autoplay-succeeded');\n }\n if (e.target === this._visibleVideoElement) {\n this.isPaused = this._visibleVideoElement.paused;\n }\n });\n _defineProperty(this, \"_updatePlayState\", () => {\n if (!this._visibleVideoElement) {\n return;\n }\n if (this._shouldPlay()) {\n this._playVideo();\n } else {\n this._pauseVideo();\n }\n });\n _defineProperty(this, \"_handleResize\", () => {\n this._updateVisibleVideoElement();\n });\n }\n static get observedAttributes() {\n return [STATE_ATTR, DISABLE_FORCED_ATTRIBUTES_ATTR, VIEWPORT_POSITION_ATTR];\n }\n connectedCallback() {\n this._setVideoAttributes();\n this._setEventListeners();\n this._updateVisibleVideoElement();\n }\n disconnectedCallback() {\n this._disconnecting = true;\n this._removeEventListeners();\n }\n attributeChangedCallback(name, prevValue, newValue) {\n var valueChanged = prevValue !== newValue;\n if (name === STATE_ATTR || name === VIEWPORT_POSITION_ATTR) {\n if (valueChanged) {\n this._updateVisibleVideoElement();\n this._updatePlayState();\n if (name === VIEWPORT_POSITION_ATTR && newValue === 'IN-VIEWPORT') {\n this._preload();\n }\n }\n }\n }\n _setEventListeners() {\n window.addEventListener('resize', this._handleResize);\n this.videoElements.forEach(el => {\n el.addEventListener('pause', this._handlePlayChange);\n el.addEventListener('play', this._handlePlayChange);\n el.addEventListener('canplaythrough', this._updatePlayState);\n });\n }\n _removeEventListeners() {\n window.removeEventListener('resize', this._handleResize);\n this.videoElements.forEach(el => {\n el.removeEventListener('pause', this._handlePlayChange);\n el.removeEventListener('play', this._handlePlayChange);\n el.removeEventListener('canplaythrough', this._updatePlayState);\n });\n }\n _updateVisibleVideoElement() {\n // eslint-disable-next-line compat/compat\n requestAnimationFrame(() => {\n var nextVisibleVideo = this.videoElements.find(isVisible);\n if (nextVisibleVideo !== this._visibleVideoElement) {\n // Pause previous video\n this._pauseVideo();\n this._visibleVideoElement = nextVisibleVideo;\n if (this._shouldPreload()) {\n this._preload();\n }\n this._updatePlayState();\n }\n });\n }\n _setVideoAttributes() {\n if (!this.disableForcedAttributes) {\n this.videoElements.forEach(el => {\n el.setAttribute('playsInline', '');\n el.setAttribute('loop', '');\n el.setAttribute('disableRemotePlayback', '');\n el.setAttribute('x-webkit-airplay', 'deny');\n });\n }\n }\n _shouldPlay() {\n var _this$_visibleVideoEl;\n /*\n * Safari 14-15.5 hides poster on play, leaving a transparent element until enough data is available to play through.\n * We have to wait for the canplaythrough event and readystate = READY_STATE.HAVE_ENOUGH_DATA before calling `.play()`\n * */\n return ((_this$_visibleVideoEl = this._visibleVideoElement) === null || _this$_visibleVideoEl === void 0 ? void 0 : _this$_visibleVideoEl.readyState) >= READY_STATE.HAVE_ENOUGH_DATA && this.state === 'ACTIVE' && this.viewportPosition === 'IN-VIEWPORT';\n }\n _shouldPreload() {\n return this.viewportPosition === 'IN-VIEWPORT';\n }\n _preload() {\n var _this$_visibleVideoEl2;\n if (((_this$_visibleVideoEl2 = this._visibleVideoElement) === null || _this$_visibleVideoEl2 === void 0 ? void 0 : _this$_visibleVideoEl2.readyState) < READY_STATE.HAVE_ENOUGH_DATA) {\n var _this$_visibleVideoEl3;\n (_this$_visibleVideoEl3 = this._visibleVideoElement) === null || _this$_visibleVideoEl3 === void 0 || _this$_visibleVideoEl3.load();\n }\n }\n _playVideo() {\n dispatchEvent(this, 'dh-basis-autoplay-attempted');\n var reducedMotion = testReducedMotion();\n var videoElement = this._visibleVideoElement;\n if (videoElement.paused && !reducedMotion && !this.autoplayBlocked) {\n var playPromise = videoElement.play() || Promise.resolve();\n playPromise.catch(e => {\n console.error(e);\n this.autoplayBlocked = true;\n });\n }\n }\n _pauseVideo() {\n var videoElement = this._visibleVideoElement;\n if (videoElement && !videoElement.paused) {\n videoElement.pause();\n }\n }\n get videoElements() {\n return toArray(this.querySelectorAll('video'));\n }\n get disableForcedAttributes() {\n return this.hasAttribute(DISABLE_FORCED_ATTRIBUTES_ATTR);\n }\n get state() {\n return this.getAttribute(STATE_ATTR);\n }\n set state(val) {\n this.setAttribute(STATE_ATTR, val);\n }\n get isPaused() {\n return this.getAttribute(IS_PAUSED);\n }\n set isPaused(val) {\n if (val) {\n this.setAttribute(IS_PAUSED, '');\n } else {\n this.removeAttribute(IS_PAUSED);\n }\n }\n get autoplayBlocked() {\n return this.hasAttribute(AUTOPLAY_BLOCKED) || false;\n }\n set autoplayBlocked(val) {\n toggleAttribute(this, AUTOPLAY_BLOCKED, val);\n }\n get viewportPosition() {\n return this.getAttribute(VIEWPORT_POSITION_ATTR);\n }\n set viewportPosition(val) {\n this.setAttribute(VIEWPORT_POSITION_ATTR, val);\n }\n}\n\nexport { LevendeStillbilde as default };\n//# sourceMappingURL=index.esm.js.map\n","var __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\n\n// src/nrk-types.ts\nvar ClickEventKind = /* @__PURE__ */ ((ClickEventKind2) => {\n ClickEventKind2[\"Content\"] = \"content\";\n ClickEventKind2[\"Other\"] = \"other\";\n return ClickEventKind2;\n})(ClickEventKind || {});\nvar ImpressionEventKind = /* @__PURE__ */ ((ImpressionEventKind2) => {\n ImpressionEventKind2[\"Impression\"] = \"impression\";\n return ImpressionEventKind2;\n})(ImpressionEventKind || {});\nvar PlaybackEventKind = /* @__PURE__ */ ((PlaybackEventKind2) => {\n PlaybackEventKind2[\"Complete\"] = \"complete\";\n PlaybackEventKind2[\"Exit\"] = \"exit\";\n PlaybackEventKind2[\"Progress\"] = \"progress\";\n PlaybackEventKind2[\"Start\"] = \"start\";\n return PlaybackEventKind2;\n})(PlaybackEventKind || {});\nvar SearchSource = /* @__PURE__ */ ((SearchSource2) => {\n SearchSource2[\"PopularSearch\"] = \"popular-search\";\n SearchSource2[\"PreviousResult\"] = \"previous-result\";\n SearchSource2[\"Search\"] = \"search\";\n return SearchSource2;\n})(SearchSource || {});\nvar ViewportEventKind = /* @__PURE__ */ ((ViewportEventKind2) => {\n ViewportEventKind2[\"Entry\"] = \"entry\";\n ViewportEventKind2[\"Exit\"] = \"exit\";\n return ViewportEventKind2;\n})(ViewportEventKind || {});\nvar EventSchema = /* @__PURE__ */ ((EventSchema3) => {\n EventSchema3[\"BackstageEvent\"] = \"iglu:no.nrk.innlogging/backstage-event/jsonschema/1-0-0\";\n EventSchema3[\"BridgeEvent\"] = \"iglu:no.nrk/bridge-event/jsonschema/1-0-0\";\n EventSchema3[\"ClickEvent\"] = \"iglu:no.nrk/click-event/jsonschema/1-0-0\";\n EventSchema3[\"FrontstageServerEvent\"] = \"iglu:no.nrk.innlogging/frontstage-server-event/jsonschema/1-0-0\";\n EventSchema3[\"ImpressionEvent\"] = \"iglu:no.nrk/impression-event/jsonschema/1-0-0\";\n EventSchema3[\"LoginRegisterFlowEvent\"] = \"iglu:no.nrk.innlogging/login-register-flow-event/jsonschema/1-0-0\";\n EventSchema3[\"NotificationEvent\"] = \"iglu:no.nrk/notification-event/jsonschema/1-0-0\";\n EventSchema3[\"PlaybackEvent\"] = \"iglu:no.nrk/playback-event/jsonschema/1-0-0\";\n EventSchema3[\"ProfilePageEvent\"] = \"iglu:no.nrk.innlogging/profile-page-event/jsonschema/1-0-0\";\n EventSchema3[\"RadioEvent\"] = \"iglu:no.nrk.radio/radio-event/jsonschema/1-0-0\";\n EventSchema3[\"SearchEvent\"] = \"iglu:no.nrk/search-event/jsonschema/1-0-0\";\n EventSchema3[\"StepEvent\"] = \"iglu:no.nrk.dh/step-event/jsonschema/1-0-0\";\n EventSchema3[\"TimeSpentEvent\"] = \"iglu:no.nrk/time-spent-event/jsonschema/1-0-0\";\n EventSchema3[\"ViewportEvent\"] = \"iglu:no.nrk.dh/viewport-event/jsonschema/1-0-0\";\n return EventSchema3;\n})(EventSchema || {});\nvar EntitySchema = /* @__PURE__ */ ((EntitySchema2) => {\n EntitySchema2[\"Bridge\"] = \"iglu:no.nrk/bridge/jsonschema/1-0-0\";\n EntitySchema2[\"ClientID\"] = \"iglu:no.nrk.innlogging/client-id/jsonschema/1-0-0\";\n EntitySchema2[\"Content\"] = \"iglu:no.nrk/content/jsonschema/1-0-1\";\n EntitySchema2[\"Experiment\"] = \"iglu:no.nrk/experiment/jsonschema/1-0-0\";\n EntitySchema2[\"Link\"] = \"iglu:no.nrk/link/jsonschema/2-0-0\";\n EntitySchema2[\"NrkSession\"] = \"iglu:no.nrk/nrk-session/jsonschema/1-0-0\";\n EntitySchema2[\"NrkUser\"] = \"iglu:no.nrk/nrk-user/jsonschema/1-0-0\";\n EntitySchema2[\"Plug\"] = \"iglu:no.nrk/plug/jsonschema/3-0-1\";\n EntitySchema2[\"PreviousWebPage\"] = \"iglu:no.nrk/previous-web-page/jsonschema/1-0-0\";\n EntitySchema2[\"RegistrationContext\"] = \"iglu:no.nrk.innlogging/registration-context/jsonschema/1-0-0\";\n EntitySchema2[\"SearchResult\"] = \"iglu:no.nrk/search-result/jsonschema/1-0-1\";\n EntitySchema2[\"Service\"] = \"iglu:no.nrk/service/jsonschema/2-0-0\";\n EntitySchema2[\"Application\"] = \"iglu:com.snowplowanalytics.mobile/application/jsonschema/1-0-0\";\n return EntitySchema2;\n})(EntitySchema || {});\n\n// src/nrk-base-tracker.ts\nimport cuid from \"cuid\";\nvar NrkBaseTracker = class {\n constructor(snowplow, config) {\n this.sharedEntities = {};\n var _a, _b, _c;\n this.snowplow = snowplow;\n this.trackerId = (_a = config.trackerId) != null ? _a : cuid.slug();\n this.setSharedEntity(\"iglu:no.nrk/service/jsonschema/2-0-0\" /* Service */, { id: config.serviceId, environment: (_b = config.environment) != null ? _b : null });\n if (config.appVersion && config.appBuild) {\n this.setSharedEntity(\"iglu:com.snowplowanalytics.mobile/application/jsonschema/1-0-0\" /* Application */, { build: config.appBuild, version: config.appVersion });\n }\n snowplow.newTracker(this.trackerId, config.collectorUrl, {\n postPath: \"/nrk/wd6\",\n appId: config.appId,\n plugins: config.plugins,\n platform: (_c = config.platform) != null ? _c : \"web\",\n contexts: {\n webPage: config.disableWebContext !== true\n },\n stateStorageStrategy: config.disableLocalStorage ? \"cookie\" : void 0\n });\n }\n /**\n * Track page view.\n */\n trackPageView(contentEntity) {\n if (contentEntity) {\n this.snowplow.trackPageView(\n {\n context: entitiesToContexts(__spreadProps(__spreadValues({}, this.sharedEntities), {\n [\"iglu:no.nrk/content/jsonschema/1-0-1\" /* Content */]: contentEntity\n }))\n },\n [this.trackerId]\n );\n } else {\n this.snowplow.trackPageView({ context: entitiesToContexts(this.sharedEntities) }, [this.trackerId]);\n }\n }\n /**\n * Generic track event for custom schemas, typed up to only support NRK\n * events and entities. All shared entities are included, and can be\n * overridden by specified entities.\n */\n trackSchemaEvent(schema, data, entities) {\n const context = entitiesToContexts(__spreadValues(__spreadValues({}, this.sharedEntities), entities));\n this.snowplow.trackSelfDescribingEvent(\n {\n event: { schema, data: __spreadValues({}, data) },\n context\n },\n [this.trackerId]\n );\n }\n /**\n * Send a standard structured event.\n */\n trackEvent(data, entities) {\n const context = entitiesToContexts(__spreadValues(__spreadValues({}, this.sharedEntities), entities));\n this.snowplow.trackStructEvent(__spreadProps(__spreadValues({}, data), { context }), [this.trackerId]);\n }\n /**\n * Set the logged in user.\n */\n setUser(userId) {\n this.snowplow.setUserId(userId, [this.trackerId]);\n this.setSharedEntity(\"iglu:no.nrk/nrk-user/jsonschema/1-0-0\" /* NrkUser */, { id: userId });\n }\n /**\n * Clear the user when logged out.\n */\n clearUser() {\n this.snowplow.setUserId(null, [this.trackerId]);\n this.removeSharedEntity(\"iglu:no.nrk/nrk-user/jsonschema/1-0-0\" /* NrkUser */);\n }\n /**\n * Add a plugin to the tracker.\n */\n addPlugin(configuration) {\n this.snowplow.addPlugin(configuration, [this.trackerId]);\n }\n /**\n * Set data for a shared entity for all events of this tracker.\n *\n * The `snowplow.addGlobalContexts()` method could potentially be used, but\n * `removeGlobalContexts()` requires the data as argument as well (awkward),\n * and there's no `getGlobalContexts()` to help with that.\n */\n setSharedEntity(schema, data) {\n this.sharedEntities[schema] = data;\n }\n /**\n * Returns any shared entities for an entity schema.\n */\n getSharedEntity(schema) {\n return this.sharedEntities[schema];\n }\n /**\n * Remove all shared entities for an entity schema.\n */\n removeSharedEntity(schema) {\n if (schema in this.sharedEntities) {\n delete this.sharedEntities[schema];\n }\n }\n};\nfunction entitiesToContexts(entities) {\n const contexts = [];\n Object.entries(entities).forEach(([schema, data]) => {\n const dataList = Array.isArray(data) ? data : [data];\n for (const entityData of dataList) {\n contexts.push({ schema, data: __spreadValues({}, entityData) });\n }\n });\n return contexts;\n}\n\n// src/nrk-player-tracker.ts\nvar NrkPlayerTracker = class extends NrkBaseTracker {\n /**\n * Tell the tracker what the current media is.\n */\n setMedia(mediaId, details) {\n const content = { id: mediaId };\n if (details == null ? void 0 : details.source) {\n content.source = details == null ? void 0 : details.source;\n }\n if (details == null ? void 0 : details.kind) {\n content.kind = details == null ? void 0 : details.kind;\n }\n this.setSharedEntity(\"iglu:no.nrk/content/jsonschema/1-0-1\" /* Content */, content);\n if (details == null ? void 0 : details.channelId) {\n this.channelId = details.channelId;\n }\n if (details && \"autoplay\" in details && details.autoplay !== void 0) {\n this.autoplay = details.autoplay;\n }\n }\n /**\n * Set autoplay for the current media.\n */\n setMediaAutoplay(autoplay) {\n this.autoplay = autoplay;\n }\n /**\n * Tell the tracker that media is unknown (like for gaps in the EPG).\n */\n setUnknownMedia(channelId) {\n this.setSharedEntity(\"iglu:no.nrk/content/jsonschema/1-0-1\" /* Content */, { id: \"unknown\", kind: \"unknown\" });\n this.channelId = channelId;\n }\n /**\n * Send a playback event of kind 'start'.\n *\n * Should be called when time starts running:\n * - After changing media.\n * - After user pauses playback.\n * - At replay.\n */\n sendStartEvent(startTime, live) {\n if (this.getSharedEntity(\"iglu:no.nrk/content/jsonschema/1-0-1\" /* Content */) === void 0) {\n throw new Error(\"Must use setMedia() first!\");\n }\n const start = Math.max(0, Math.floor(startTime));\n this.trackSchemaEvent(\"iglu:no.nrk/playback-event/jsonschema/1-0-0\" /* PlaybackEvent */, {\n kind: \"start\" /* Start */,\n startTime: start,\n endTime: start,\n autoplay: this.autoplay,\n live,\n channelId: this.channelId\n });\n }\n /**\n * Send a playback event of kind 'progress'.\n *\n * Should be called when time stops for any reason other than complete or\n * exit.\n */\n sendProgressEvent(startTime, endTime, live) {\n this.sendPlaybackEvent(\"progress\" /* Progress */, startTime, endTime, live);\n }\n /**\n * Send a playback event of kind 'complete'.\n *\n * Should be called when:\n * - Playback reaches the end (100%) of the media (for ODM it stops, for\n * channels it continues to play the next program in the EPG).\n * - When a skip-to-next media function is invoked when binging.\n */\n sendCompleteEvent(startTime, endTime, live) {\n this.sendPlaybackEvent(\"complete\" /* Complete */, startTime, endTime != null ? endTime : startTime, live);\n }\n /**\n * Send a playback event of kind 'exit'.\n *\n * Should be called when leaving the media before a 'complete'-event is sent,\n * including when seeking away from a program in the EPG to another.\n */\n sendExitEvent(startTime, endTime, live) {\n this.sendPlaybackEvent(\"exit\" /* Exit */, startTime, endTime != null ? endTime : startTime, live);\n }\n sendPlaybackEvent(kind, startTime, endTime, live) {\n const start = Math.max(0, Math.floor(startTime));\n const end = Math.max(0, Math.floor(endTime));\n if (start === end && kind === \"progress\" /* Progress */) {\n return;\n }\n if (start > end) {\n throw new Error(`Start time can't be after end time (${start} vs ${end}). Event was ${kind}`);\n }\n this.trackSchemaEvent(\"iglu:no.nrk/playback-event/jsonschema/1-0-0\" /* PlaybackEvent */, {\n kind,\n startTime: start,\n endTime: end,\n live,\n channelId: this.channelId\n });\n }\n};\n\n// src/service-id.ts\nvar ServiceID = /* @__PURE__ */ ((ServiceID2) => {\n ServiceID2[\"Embed\"] = \"embed\";\n ServiceID2[\"Nrkbeta\"] = \"nrkbeta\";\n ServiceID2[\"Nrkinnlogging\"] = \"nrkinnlogging\";\n ServiceID2[\"Nrkno\"] = \"nrkno\";\n ServiceID2[\"Nrkp3\"] = \"nrkp3\";\n ServiceID2[\"Nrkradio\"] = \"nrkradio\";\n ServiceID2[\"Nrksuper\"] = \"nrksuper\";\n ServiceID2[\"Nrktv\"] = \"nrktv\";\n ServiceID2[\"Yr\"] = \"yr\";\n return ServiceID2;\n})(ServiceID || {});\n\n// src/snowplow-global.ts\nvar SnowplowGlobal = class {\n constructor() {\n this.snowplow = window.snowplow;\n if (this.snowplow === void 0) {\n throw new Error(\"There is no global Snowplow function.\");\n }\n }\n /**\n * Check if the global API is available (provided by the \"Snowplow tag\"). No\n * distinction is made between sp.js and sp.lite.js.\n */\n static isAvailable() {\n return window.snowplow !== void 0;\n }\n /**\n * Modify newTracker() to support adding plugins via the tracker\n * configuration. See \"Creating your own plugins\" in the JavaScript tracker\n * Snowplow docs.\n *\n * Note: The tracker configuration hasn't been thoroughly checked for\n * inconsistencies between the global API and @snowplow/browser-tracker.\n * There might be issues.\n */\n newTracker(trackerId, collectorUrl, configuration) {\n this.snowplow(\"newTracker\", trackerId, collectorUrl, configuration);\n if ((configuration == null ? void 0 : configuration.plugins) !== void 0) {\n configuration.plugins.forEach((plugin) => {\n this.addPlugin({ plugin }, [trackerId]);\n });\n }\n }\n setUserId(...args) {\n this.proxy(\"setUserId\", args, 2);\n }\n trackPageView(...args) {\n this.proxy(\"trackPageView\", args, 2);\n }\n trackSelfDescribingEvent(...args) {\n this.proxy(\"trackSelfDescribingEvent\", args, 2);\n }\n trackStructEvent(...args) {\n this.proxy(\"trackStructEvent\", args, 2);\n }\n preservePageViewId(...args) {\n this.proxy(\"preservePageViewId\", args, 1);\n }\n addPlugin(config, trackers) {\n const args = [{ Plugin: () => config.plugin }, \"Plugin\", trackers];\n this.proxy(\"addPlugin\", args, args.length);\n }\n /**\n * Make a call to the global Snowplow API, with the specified method and\n * arguments. It only supports methods which have a `trackers` argument as\n * the last (optional) argument.\n *\n * The `trackers` argument of the Snowplow methods is optional and not always\n * in the same position. The `maxArgs` argument specifies the maximum number\n * of arguments the method supports and so in which position the `trackers`\n * argument is, when present. This is necessary in order to transform the use\n * of `trackers` between the Snowplow API and the global API. So if\n * `Args['length']` is `1 | 2`, then `maxArgs` should be 2.\n */\n proxy(method, args, maxArgs) {\n const trackerIds = args.length === maxArgs ? args.pop() : void 0;\n if (trackerIds && trackerIds.length > 0) {\n trackerIds.forEach((trackerId) => {\n this.snowplow(`${method}:${trackerId}`, ...args);\n });\n } else {\n this.snowplow(method, ...args);\n }\n }\n};\nexport {\n ClickEventKind,\n EntitySchema,\n EventSchema,\n ImpressionEventKind,\n NrkBaseTracker,\n NrkPlayerTracker,\n PlaybackEventKind,\n SearchSource,\n ServiceID,\n SnowplowGlobal,\n ViewportEventKind,\n entitiesToContexts\n};\n","import { EntitySchema, EventSchema } from '@nrk/snowplow-web';\n\n/**\n * Root path to snowplow bundle on static.nrk.no.\n */\nvar staticSnowplowRoot = \"https://static.nrk.no/nrkno-snowplow\";\n/**\n * The current major version\n */\nvar staticSnowplowMajorVersion = \"1\";\n\n//@ts-expect-error post-fix version to allow multiple versions to co-exists at the same time\nvar globalKey = \"nrknoOnTrackerReady-\" + staticSnowplowMajorVersion;\n\n/**\n * Modified version of @nrk/snowplow-web. Does not allow array or undefined\n */\n\n/**\n * Typecheck and generate `{schema, data}`\n */\nfunction getTyped(schema, data) {\n return {\n schema,\n data\n };\n}\n\n/**\n * No-op type check\n */\nfunction isTypedContext(_schema, _data) {}\n/**\n * No-op type check\n */\nfunction isTypedEvent(_schema, _data) {}\n/**\n * No-op type check\n */\nfunction isTyped(_schema, _data) {}\n\n/**\n * No-op type check\n */\nfunction isTypedArray(_schema, _data) {}\n\n/**\n * Typechecks a context and return the Snowplow type\n */\nfunction asSnowplowContext(data) {\n return data;\n}\nfunction asSnowplowEntity(data) {\n return data;\n}\n\nvar typeUtil = /*#__PURE__*/Object.freeze({\n __proto__: null,\n EntitySchema: EntitySchema,\n EventSchema: EventSchema,\n asSnowplowContext: asSnowplowContext,\n asSnowplowEntity: asSnowplowEntity,\n getTyped: getTyped,\n isTyped: isTyped,\n isTypedArray: isTypedArray,\n isTypedContext: isTypedContext,\n isTypedEvent: isTypedEvent\n});\n\n/// \n/**\n * Takes a callback that will be called with the bundled JS when ready.\n *\n * This function will load the major version (defined above in JS file) from `static.nrk.no`\n * @note the callback will never be called if a network error occurs.\n */\nfunction getBundle(callback) {\n // Add callback queue placeholder if needed\n if (globalThis[globalKey] === undefined) {\n //@ts-expect-error `q` is next line\n globalThis[globalKey] = function (cb) {\n globalThis[globalKey].q.push(cb);\n };\n globalThis[globalKey].q = [];\n }\n {\n // load script if needed\n loadOnce(staticSnowplowRoot + \"/major/\" + staticSnowplowMajorVersion + \"/nrkno-snowplow-entry.js\");\n }\n\n // add callback\n globalThis[globalKey](callback);\n}\n/**\n * loadOnce loads the given script IFF it is not already present in the DOM.\n * @param {string} src URL for script\n * @returns {undefined}\n */\nfunction loadOnce(src) {\n var hasScript = document.querySelector(\"script[src=\\\"\" + src + \"\\\"]\");\n if (hasScript) {\n return;\n }\n var script = document.createElement('script');\n script.async = true;\n script.src = src;\n document.head.appendChild(script);\n}\n\nexport { typeUtil as TypeUtils, getBundle };\n","const COLORS = [\n '#0000CC',\n '#0000FF',\n '#0033CC',\n '#0033FF',\n '#0066CC',\n '#0066FF',\n '#0099CC',\n '#0099FF',\n '#00CC00',\n '#00CC33',\n '#00CC66',\n '#00CC99',\n '#00CCCC',\n '#00CCFF',\n '#3300CC',\n '#3300FF',\n '#3333CC',\n '#3333FF',\n '#3366CC',\n '#3366FF',\n '#3399CC',\n '#3399FF',\n '#33CC00',\n '#33CC33',\n '#33CC66',\n '#33CC99',\n '#33CCCC',\n '#33CCFF',\n '#6600CC',\n '#6600FF',\n '#6633CC',\n '#6633FF',\n '#66CC00',\n '#66CC33',\n '#9900CC',\n '#9900FF',\n '#9933CC',\n '#9933FF',\n '#99CC00',\n '#99CC33',\n '#CC0000',\n '#CC0033',\n '#CC0066',\n '#CC0099',\n '#CC00CC',\n '#CC00FF',\n '#CC3300',\n '#CC3333',\n '#CC3366',\n '#CC3399',\n '#CC33CC',\n '#CC33FF',\n '#CC6600',\n '#CC6633',\n '#CC9900',\n '#CC9933',\n '#CCCC00',\n '#CCCC33',\n '#FF0000',\n '#FF0033',\n '#FF0066',\n '#FF0099',\n '#FF00CC',\n '#FF00FF',\n '#FF3300',\n '#FF3333',\n '#FF3366',\n '#FF3399',\n '#FF33CC',\n '#FF33FF',\n '#FF6600',\n '#FF6633',\n '#FF9900',\n '#FF9933',\n '#FFCC00',\n '#FFCC33',\n];\n\n/**\n * Factory for creating namespaced logging functions.\n * Namespaces are enabled via the `debug` localStorage key,\n * and support multiple comma/space separated namespaces with or without `*` wildcards.\n *\n * @param { string } namespace\n * @returns { (...data: Array) => void }\n */\nexport default function debugFactory(namespace) {\n if (/\\s/.test(namespace)) {\n throw Error('debug namespaces cannot include whitespace');\n }\n\n if (!isEnabled(namespace)) {\n return function debug() {\n // no-op\n };\n }\n\n const color = selectColor(namespace);\n let lastCalled = 0;\n\n return function debug(...data) {\n const now = Date.now();\n const diff = now - (lastCalled || now);\n\n console.log(`%c${namespace} +${diff}ms`, `color: ${color}`, ...data);\n lastCalled = now;\n };\n}\n\n/**\n * @param { string } namespace\n * @returns boolean\n */\nfunction isEnabled(namespace) {\n try {\n const patterns = (localStorage.getItem('debug') || '').split(/[\\s,]+/g);\n\n for (const pattern of patterns) {\n if (pattern === '') {\n continue;\n }\n\n const wildcardIdx = pattern.indexOf('*');\n\n if (wildcardIdx > -1) {\n if (namespace.startsWith(pattern.slice(0, wildcardIdx))) {\n return true;\n }\n } else {\n if (namespace === pattern) {\n return true;\n }\n }\n }\n } catch (err) {\n // localStorage error\n }\n\n return false;\n}\n\n/**\n * @param { string } namespace\n * @returns { string }\n * @see https://github.com/debug-js/debug/blob/c0805cc4d3b2c7c987567e99ecaec78840516d7b/src/common.js#L41\n */\nfunction selectColor(namespace) {\n let hash = 0;\n\n for (let i = 0; i < namespace.length; i++) {\n hash = (hash << 5) - hash + namespace.charCodeAt(i);\n hash |= 0; // Convert to 32bit integer\n }\n\n return COLORS[Math.abs(hash) % COLORS.length];\n}\n","var __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __typeError = (msg) => {\n throw TypeError(msg);\n};\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar __accessCheck = (obj, member, msg) => member.has(obj) || __typeError(\"Cannot \" + msg);\nvar __privateGet = (obj, member, getter) => (__accessCheck(obj, member, \"read from private field\"), getter ? getter.call(obj) : member.get(obj));\nvar __privateAdd = (obj, member, value) => member.has(obj) ? __typeError(\"Cannot add the same private member more than once\") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);\nvar __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, \"write to private field\"), setter ? setter.call(obj, value) : member.set(obj, value), value);\n\n// src/nrk-base-tracker.ts\nimport Debug from \"@nrk/debug\";\nimport cuid from \"cuid\";\n\n// src/nrk-types.ts\nvar ClickEventKind = /* @__PURE__ */ ((ClickEventKind2) => {\n ClickEventKind2[\"Content\"] = \"content\";\n ClickEventKind2[\"Other\"] = \"other\";\n return ClickEventKind2;\n})(ClickEventKind || {});\nvar ImpressionEventKind = /* @__PURE__ */ ((ImpressionEventKind2) => {\n ImpressionEventKind2[\"Impression\"] = \"impression\";\n return ImpressionEventKind2;\n})(ImpressionEventKind || {});\nvar PlaybackEventKind = /* @__PURE__ */ ((PlaybackEventKind2) => {\n PlaybackEventKind2[\"Complete\"] = \"complete\";\n PlaybackEventKind2[\"Exit\"] = \"exit\";\n PlaybackEventKind2[\"Progress\"] = \"progress\";\n PlaybackEventKind2[\"Start\"] = \"start\";\n return PlaybackEventKind2;\n})(PlaybackEventKind || {});\nvar SearchSource = /* @__PURE__ */ ((SearchSource2) => {\n SearchSource2[\"PopularSearch\"] = \"popular-search\";\n SearchSource2[\"PreviousResult\"] = \"previous-result\";\n SearchSource2[\"Search\"] = \"search\";\n return SearchSource2;\n})(SearchSource || {});\nvar ViewportEventKind = /* @__PURE__ */ ((ViewportEventKind2) => {\n ViewportEventKind2[\"Entry\"] = \"entry\";\n ViewportEventKind2[\"Exit\"] = \"exit\";\n return ViewportEventKind2;\n})(ViewportEventKind || {});\nvar EventSchema = /* @__PURE__ */ ((EventSchema2) => {\n EventSchema2[\"BackstageEvent\"] = \"iglu:no.nrk.innlogging/backstage-event/jsonschema/1-0-0\";\n EventSchema2[\"BridgeEvent\"] = \"iglu:no.nrk/bridge-event/jsonschema/1-0-0\";\n EventSchema2[\"ClickEvent\"] = \"iglu:no.nrk/click-event/jsonschema/1-0-0\";\n EventSchema2[\"FrontstageServerEvent\"] = \"iglu:no.nrk.innlogging/frontstage-server-event/jsonschema/1-0-0\";\n EventSchema2[\"ImpressionEvent\"] = \"iglu:no.nrk/impression-event/jsonschema/1-0-0\";\n EventSchema2[\"LoginRegisterFlowEvent\"] = \"iglu:no.nrk.innlogging/login-register-flow-event/jsonschema/1-0-0\";\n EventSchema2[\"NotificationEvent\"] = \"iglu:no.nrk/notification-event/jsonschema/1-0-0\";\n EventSchema2[\"PlaybackEvent\"] = \"iglu:no.nrk/playback-event/jsonschema/1-0-0\";\n EventSchema2[\"ProfilePageEvent\"] = \"iglu:no.nrk.innlogging/profile-page-event/jsonschema/1-0-0\";\n EventSchema2[\"RadioEvent\"] = \"iglu:no.nrk.radio/radio-event/jsonschema/1-0-0\";\n EventSchema2[\"SearchEvent\"] = \"iglu:no.nrk/search-event/jsonschema/1-0-0\";\n EventSchema2[\"StepEvent\"] = \"iglu:no.nrk.dh/step-event/jsonschema/1-0-0\";\n EventSchema2[\"TimeSpentEvent\"] = \"iglu:no.nrk/time-spent-event/jsonschema/1-0-0\";\n EventSchema2[\"ViewportEvent\"] = \"iglu:no.nrk.dh/viewport-event/jsonschema/1-0-0\";\n return EventSchema2;\n})(EventSchema || {});\nvar EntitySchema = /* @__PURE__ */ ((EntitySchema2) => {\n EntitySchema2[\"Bridge\"] = \"iglu:no.nrk/bridge/jsonschema/1-0-0\";\n EntitySchema2[\"ClientID\"] = \"iglu:no.nrk.innlogging/client-id/jsonschema/1-0-0\";\n EntitySchema2[\"Content\"] = \"iglu:no.nrk/content/jsonschema/1-0-1\";\n EntitySchema2[\"Experiment\"] = \"iglu:no.nrk/experiment/jsonschema/1-0-0\";\n EntitySchema2[\"Link\"] = \"iglu:no.nrk/link/jsonschema/2-0-0\";\n EntitySchema2[\"NrkSession\"] = \"iglu:no.nrk/nrk-session/jsonschema/1-0-0\";\n EntitySchema2[\"NrkUser\"] = \"iglu:no.nrk/nrk-user/jsonschema/1-0-0\";\n EntitySchema2[\"Plug\"] = \"iglu:no.nrk/plug/jsonschema/3-0-1\";\n EntitySchema2[\"PreviousWebPage\"] = \"iglu:no.nrk/previous-web-page/jsonschema/1-0-0\";\n EntitySchema2[\"RegistrationContext\"] = \"iglu:no.nrk.innlogging/registration-context/jsonschema/1-0-0\";\n EntitySchema2[\"SearchResult\"] = \"iglu:no.nrk/search-result/jsonschema/1-0-1\";\n EntitySchema2[\"Service\"] = \"iglu:no.nrk/service/jsonschema/2-0-0\";\n EntitySchema2[\"Application\"] = \"iglu:com.snowplowanalytics.mobile/application/jsonschema/1-0-0\";\n return EntitySchema2;\n})(EntitySchema || {});\n\n// src/nrk-base-tracker.ts\nvar debug = Debug(\"app:snowplow:tracker\");\nvar _sharedEntities;\nvar NrkBaseTracker = class {\n constructor(snowplow, config) {\n __privateAdd(this, _sharedEntities, {});\n var _a, _b, _c;\n this.snowplow = snowplow;\n this.trackerId = (_a = config.trackerId) != null ? _a : cuid.slug();\n debug(`Setting shared entity ${\"iglu:no.nrk/service/jsonschema/2-0-0\" /* Service */} with id ${config.serviceId}`);\n this.setSharedEntity(\"iglu:no.nrk/service/jsonschema/2-0-0\" /* Service */, { id: config.serviceId, environment: (_b = config.environment) != null ? _b : null });\n if (config.appVersion && config.appBuild) {\n debug(\n `Setting shared entity ${\"iglu:com.snowplowanalytics.mobile/application/jsonschema/1-0-0\" /* Application */} with build ${config.appBuild} and version ${config.appVersion}`\n );\n this.setSharedEntity(\"iglu:com.snowplowanalytics.mobile/application/jsonschema/1-0-0\" /* Application */, { build: config.appBuild, version: config.appVersion });\n }\n snowplow.newTracker(this.trackerId, config.collectorUrl, {\n postPath: \"/nrk/wd6\",\n appId: config.appId,\n plugins: config.plugins,\n platform: (_c = config.platform) != null ? _c : \"web\",\n contexts: {\n webPage: config.disableWebContext !== true\n },\n stateStorageStrategy: config.disableLocalStorage ? \"cookie\" : void 0\n });\n }\n /**\n * Track page view.\n */\n trackPageView(contentEntity) {\n if (contentEntity) {\n debug(`Tracking page view with entity ${contentEntity.kind}/${contentEntity.id} (tracker: ${this.trackerId})`);\n this.snowplow.trackPageView(\n {\n context: entitiesToContexts(__spreadProps(__spreadValues({}, __privateGet(this, _sharedEntities)), {\n [\"iglu:no.nrk/content/jsonschema/1-0-1\" /* Content */]: contentEntity\n }))\n },\n [this.trackerId]\n );\n } else {\n debug(`Tracking page view without contentEntity (tracker: ${this.trackerId})`);\n this.snowplow.trackPageView({ context: entitiesToContexts(__privateGet(this, _sharedEntities)) }, [this.trackerId]);\n }\n }\n /**\n * Generic track event for custom schemas, typed up to only support NRK\n * events and entities. All shared entities are included, and can be\n * overridden by specified entities.\n */\n trackSchemaEvent(schema, data, entities) {\n const context = entitiesToContexts(__spreadValues(__spreadValues({}, __privateGet(this, _sharedEntities)), entities));\n debug(`Tracking event with schema ${schema} and data ${JSON.stringify(data)} (tracker: ${this.trackerId})`);\n this.snowplow.trackSelfDescribingEvent(\n {\n event: { schema, data: __spreadValues({}, data) },\n context\n },\n [this.trackerId]\n );\n }\n /**\n * Send a standard structured event.\n */\n trackEvent(data, entities) {\n const context = entitiesToContexts(__spreadValues(__spreadValues({}, __privateGet(this, _sharedEntities)), entities));\n debug(`Tracking structured event width enitites ${entities} (tracker: ${this.trackerId})`);\n this.snowplow.trackStructEvent(__spreadProps(__spreadValues({}, data), { context }), [this.trackerId]);\n }\n /**\n * Set the logged in user.\n */\n setUser(userId) {\n this.snowplow.setUserId(userId, [this.trackerId]);\n debug(`Setting shared entity ${\"iglu:no.nrk/nrk-user/jsonschema/1-0-0\" /* NrkUser */} with id ${userId}`);\n this.setSharedEntity(\"iglu:no.nrk/nrk-user/jsonschema/1-0-0\" /* NrkUser */, { id: userId });\n }\n /**\n * Clear the user when logged out.\n */\n clearUser() {\n this.snowplow.setUserId(null, [this.trackerId]);\n debug(`Removing shared entity ${\"iglu:no.nrk/nrk-user/jsonschema/1-0-0\" /* NrkUser */}`);\n this.removeSharedEntity(\"iglu:no.nrk/nrk-user/jsonschema/1-0-0\" /* NrkUser */);\n }\n /**\n * Add a plugin to the tracker.\n */\n addPlugin(configuration) {\n this.snowplow.addPlugin(configuration, [this.trackerId]);\n }\n /**\n * Set data for a shared entity for all events of this tracker.\n *\n * The `snowplow.addGlobalContexts()` method could potentially be used, but\n * `removeGlobalContexts()` requires the data as argument as well (awkward),\n * and there's no `getGlobalContexts()` to help with that.\n */\n setSharedEntity(schema, data) {\n __privateGet(this, _sharedEntities)[schema] = data;\n }\n /**\n * Returns any shared entities for an entity schema.\n */\n getSharedEntity(schema) {\n return __privateGet(this, _sharedEntities)[schema];\n }\n /**\n * Remove all shared entities for an entity schema.\n */\n removeSharedEntity(schema) {\n if (schema in __privateGet(this, _sharedEntities)) {\n delete __privateGet(this, _sharedEntities)[schema];\n }\n }\n};\n_sharedEntities = new WeakMap();\nfunction entitiesToContexts(entities) {\n const contexts = [];\n for (const [schema, data] of Object.entries(entities)) {\n const dataList = Array.isArray(data) ? data : [data];\n for (const entityData of dataList) {\n contexts.push({ schema, data: __spreadValues({}, entityData) });\n }\n }\n return contexts;\n}\n\n// src/nrk-player-tracker.ts\nvar _channelId, _autoplay;\nvar NrkPlayerTracker = class extends NrkBaseTracker {\n constructor() {\n super(...arguments);\n __privateAdd(this, _channelId);\n __privateAdd(this, _autoplay);\n }\n /**\n * Tell the tracker what the current media is.\n */\n setMedia(mediaId, details) {\n const content = { id: mediaId };\n if (details == null ? void 0 : details.source) {\n content.source = details == null ? void 0 : details.source;\n }\n if (details == null ? void 0 : details.kind) {\n content.kind = details == null ? void 0 : details.kind;\n }\n this.setSharedEntity(\"iglu:no.nrk/content/jsonschema/1-0-1\" /* Content */, content);\n if (details == null ? void 0 : details.channelId) {\n __privateSet(this, _channelId, details.channelId);\n }\n if (details && \"autoplay\" in details && details.autoplay !== void 0) {\n __privateSet(this, _autoplay, details.autoplay);\n }\n }\n /**\n * Set autoplay for the current media.\n */\n setMediaAutoplay(autoplay) {\n __privateSet(this, _autoplay, autoplay);\n }\n /**\n * Tell the tracker that media is unknown (like for gaps in the EPG).\n */\n setUnknownMedia(channelId) {\n this.setSharedEntity(\"iglu:no.nrk/content/jsonschema/1-0-1\" /* Content */, { id: \"unknown\", kind: \"unknown\" });\n __privateSet(this, _channelId, channelId);\n }\n /**\n * Send a playback event of kind 'start'.\n *\n * Should be called when time starts running:\n * - After changing media.\n * - After user pauses playback.\n * - At replay.\n */\n sendStartEvent(startTime, live) {\n if (this.getSharedEntity(\"iglu:no.nrk/content/jsonschema/1-0-1\" /* Content */) === void 0) {\n throw new Error(\"Must use setMedia() first!\");\n }\n const start = Math.max(0, Math.floor(startTime));\n this.trackSchemaEvent(\"iglu:no.nrk/playback-event/jsonschema/1-0-0\" /* PlaybackEvent */, {\n kind: \"start\" /* Start */,\n startTime: start,\n endTime: start,\n autoplay: __privateGet(this, _autoplay),\n live,\n channelId: __privateGet(this, _channelId)\n });\n }\n /**\n * Send a playback event of kind 'progress'.\n *\n * Should be called when time stops for any reason other than complete or\n * exit.\n */\n sendProgressEvent(startTime, endTime, live) {\n this.sendPlaybackEvent(\"progress\" /* Progress */, startTime, endTime, live);\n }\n /**\n * Send a playback event of kind 'complete'.\n *\n * Should be called when:\n * - Playback reaches the end (100%) of the media (for ODM it stops, for\n * channels it continues to play the next program in the EPG).\n * - When a skip-to-next media function is invoked when binging.\n */\n sendCompleteEvent(startTime, endTime, live) {\n this.sendPlaybackEvent(\"complete\" /* Complete */, startTime, endTime != null ? endTime : startTime, live);\n }\n /**\n * Send a playback event of kind 'exit'.\n *\n * Should be called when leaving the media before a 'complete'-event is sent,\n * including when seeking away from a program in the EPG to another.\n */\n sendExitEvent(startTime, endTime, live) {\n this.sendPlaybackEvent(\"exit\" /* Exit */, startTime, endTime != null ? endTime : startTime, live);\n }\n sendPlaybackEvent(kind, startTime, endTime, live) {\n const start = Math.max(0, Math.floor(startTime));\n const end = Math.max(0, Math.floor(endTime));\n if (start === end && kind === \"progress\" /* Progress */) {\n return;\n }\n if (start > end) {\n throw new Error(`Start time can't be after end time (${start} vs ${end}). Event was ${kind}`);\n }\n this.trackSchemaEvent(\"iglu:no.nrk/playback-event/jsonschema/1-0-0\" /* PlaybackEvent */, {\n kind,\n startTime: start,\n endTime: end,\n live,\n channelId: __privateGet(this, _channelId)\n });\n }\n};\n_channelId = new WeakMap();\n_autoplay = new WeakMap();\n\n// src/service-id.ts\nvar ServiceID = /* @__PURE__ */ ((ServiceID2) => {\n ServiceID2[\"Embed\"] = \"embed\";\n ServiceID2[\"Nrkbeta\"] = \"nrkbeta\";\n ServiceID2[\"Nrkinnlogging\"] = \"nrkinnlogging\";\n ServiceID2[\"Nrkno\"] = \"nrkno\";\n ServiceID2[\"Nrkp3\"] = \"nrkp3\";\n ServiceID2[\"Nrkradio\"] = \"nrkradio\";\n ServiceID2[\"Nrksuper\"] = \"nrksuper\";\n ServiceID2[\"Nrktv\"] = \"nrktv\";\n ServiceID2[\"Yr\"] = \"yr\";\n return ServiceID2;\n})(ServiceID || {});\n\n// src/snowplow-global.ts\nimport Debug2 from \"@nrk/debug\";\nvar debug2 = Debug2(\"app:snowplow:tracker\");\nvar SnowplowGlobal = class {\n constructor() {\n debug2(\"Initializing SnowplowGlobal accessing window.snowplow\");\n this.snowplow = window.snowplow;\n if (this.snowplow === void 0) {\n throw new Error(\"There is no global Snowplow function.\");\n }\n }\n /**\n * Check if the global API is available (provided by the \"Snowplow tag\"). No\n * distinction is made between sp.js and sp.lite.js.\n */\n static isAvailable() {\n return window.snowplow !== void 0;\n }\n /**\n * Modify newTracker() to support adding plugins via the tracker\n * configuration. See \"Creating your own plugins\" in the JavaScript tracker\n * Snowplow docs.\n *\n * Note: The tracker configuration hasn't been thoroughly checked for\n * inconsistencies between the global API and @snowplow/browser-tracker.\n * There might be issues.\n */\n newTracker(trackerId, collectorUrl, configuration) {\n debug2(`Creating new tracker with id ${trackerId}`);\n this.snowplow(\"newTracker\", trackerId, collectorUrl, configuration);\n if ((configuration == null ? void 0 : configuration.plugins) !== void 0) {\n for (const plugin of configuration.plugins) {\n debug2(`Adding plugin ${plugin} for tracker ${trackerId}`);\n this.addPlugin({ plugin }, [trackerId]);\n }\n }\n }\n setUserId(...args) {\n debug2(`setUserId() called with ${args}`);\n this.proxy(\"setUserId\", args, 2);\n }\n trackPageView(...args) {\n debug2(`trackPageView() called with ${args}`);\n this.proxy(\"trackPageView\", args, 2);\n }\n trackSelfDescribingEvent(...args) {\n debug2(`trackSelfDescribingEvent() called with ${args}`);\n this.proxy(\"trackSelfDescribingEvent\", args, 2);\n }\n trackStructEvent(...args) {\n debug2(`trackStructEvent() called with ${args}`);\n this.proxy(\"trackStructEvent\", args, 2);\n }\n preservePageViewId(...args) {\n debug2(`preservePageViewId() called with ${args}`);\n this.proxy(\"preservePageViewId\", args, 1);\n }\n addPlugin(config, trackers) {\n const args = [{ Plugin: () => config.plugin }, \"Plugin\", trackers];\n this.proxy(\"addPlugin\", args, args.length);\n }\n /**\n * Make a call to the global Snowplow API, with the specified method and\n * arguments. It only supports methods which have a `trackers` argument as\n * the last (optional) argument.\n *\n * The `trackers` argument of the Snowplow methods is optional and not always\n * in the same position. The `maxArgs` argument specifies the maximum number\n * of arguments the method supports and so in which position the `trackers`\n * argument is, when present. This is necessary in order to transform the use\n * of `trackers` between the Snowplow API and the global API. So if\n * `Args['length']` is `1 | 2`, then `maxArgs` should be 2.\n */\n proxy(method, args, maxArgs) {\n const trackerIds = args.length === maxArgs ? args.pop() : void 0;\n if (trackerIds && trackerIds.length > 0) {\n for (const trackerId of trackerIds) {\n this.snowplow(`${method}:${trackerId}`, ...args);\n }\n } else {\n this.snowplow(method, ...args);\n }\n }\n};\nexport {\n ClickEventKind,\n EntitySchema,\n EventSchema,\n ImpressionEventKind,\n NrkBaseTracker,\n NrkPlayerTracker,\n PlaybackEventKind,\n SearchSource,\n ServiceID,\n SnowplowGlobal,\n ViewportEventKind,\n entitiesToContexts\n};\n","import { getBundle } from '@nrk/nrkno-snowplow';\nimport { EntitySchema } from '@nrk/snowplow-web';\nimport { g as getHost } from './shared/dh-snowplow.1ee613bf.mjs';\n\nconst APP_ID = \"no.nrk.dh\";\nfunction resolveOrTimeout(promise, wait) {\n return Promise.race([\n promise.then(() => true),\n new Promise((resolve) => {\n setTimeout(() => {\n resolve(false);\n }, wait);\n })\n ]);\n}\nfunction createTracker(trackerId, { environment, contentContext }) {\n let trackerReady = false;\n let bundle;\n const host = getHost(environment);\n const eventQueue = [];\n const contexts = [\"service\", \"user\"];\n const trackOrQueue = (callback) => {\n if (trackerReady) {\n callback(bundle);\n } else {\n eventQueue.push(callback);\n }\n };\n const trackStructuredEvent = (event) => trackOrQueue(({ NrknoUtils, Snowplow }) => {\n Snowplow.trackStructEvent(\n {\n ...event,\n context: NrknoUtils.context.collect(contexts)\n },\n [trackerId]\n );\n });\n const trackSelfDescribingEvent = (event) => trackOrQueue(\n ({ NrknoUtils, Snowplow }) => Snowplow.trackSelfDescribingEvent(\n {\n event,\n context: NrknoUtils.context.collect(contexts)\n },\n [trackerId]\n )\n );\n getBundle((nrknoBundle) => {\n bundle = nrknoBundle;\n const { NrknoUtils } = nrknoBundle;\n NrknoUtils.newTracker(trackerId, APP_ID, host);\n if (contentContext) {\n const contentContextId = `${trackerId}-${contentContext.id}`;\n contexts.push(contentContextId);\n NrknoUtils.context.set(contentContextId, EntitySchema.Content, {\n source: contentContext.source,\n id: contentContext.id\n });\n }\n resolveOrTimeout(NrknoUtils.trackers.whenReady(\"main-tracker\"), 1e3).then((isResolved) => {\n trackerReady = true;\n if (isResolved === false) {\n console.warn(\"nrkno tracker not available\");\n }\n while (eventQueue.length) {\n const fn = eventQueue.pop();\n fn(bundle);\n }\n return;\n }).catch(console.error);\n });\n return {\n trackSelfDescribingEvent,\n trackStructuredEvent\n };\n}\n\nexport { createTracker, getHost };\n","function getHost(environment = \"development\") {\n if (environment === \"production\") {\n return \"https://data.nrk.no\";\n }\n return \"https://no-nrk-prod1.mini.snplow.net\";\n}\n\nexport { getHost as g };\n","import './polyfills.js'\nimport { getElementTag } from '@nrk/dh-server-libs/get-element-tag'\nimport introscroll from './components/introscroll.js'\nimport spesialmodul from './components/media/spesialmodul.js'\nimport stegvisVideo from '@nrk/dh-basis-stegvis-video'\nimport levendeStillbilde from '@nrk/dh-basis-levende-stillbilde'\nimport { toArray } from '@nrk/dh-basis-common'\nimport { createTracker } from '@nrk/dh-snowplow'\nimport { EventSchema, ViewportEventKind } from '@nrk/snowplow-web'\n\nimport styles from './components/introscroll.module.css'\nimport './components/cards/alt-text.module.css'\nimport './client.module.css'\n\nconst tag = getElementTag(__APP_NAME__, __APP_VERSION__)\n\nfunction safeDefine(elementName, constructor) {\n if (typeof customElements.get(elementName) === 'undefined') {\n customElements.define(elementName, constructor)\n }\n}\n\nexport class AppElement extends HTMLElement {\n name = tag\n #tracker\n #entryObserver\n #exitObserver\n\n connectedCallback() {\n this.initCustomElements()\n\n this.#createTracker()\n this.#startViewportLogger()\n this.addEventListener('dh-basis-scrollhistorie-trigger-activated', this.#handleTriggerActivated)\n }\n\n disconnectedCallback() {\n this.#stopViewportLogger()\n this.removeEventListener(\n 'dh-basis-scrollhistorie-trigger-activated',\n this.#handleTriggerActivated,\n )\n }\n\n async initCustomElements() {\n safeDefine('dh-introscroll', introscroll)\n safeDefine('dh-ints-basis-stegvis-video', stegvisVideo)\n safeDefine('dh-ints-basis-levende-stillbilde', levendeStillbilde)\n safeDefine('dh-ints-spesialmodul', spesialmodul)\n if (\n this.features.lottie &&\n typeof customElements.get('dh-ints-basis-stegvis-lottie') === 'undefined'\n ) {\n const stegvisLottie = (\n await import('@nrk/dh-basis-stegvis-lottie' /* webpackChunkName: \"dh-stegvis-lottie\" */)\n ).default\n\n safeDefine('dh-ints-basis-stegvis-lottie', stegvisLottie)\n }\n\n if (this.features.kart && typeof customElements.get('dh-ints-kart') === 'undefined') {\n const kart = (\n await import('./lib/karthistorie-chunk.js' /* webpackChunkName: \"dh-karthistorie\" */)\n ).default\n\n safeDefine('dh-ints-kart', kart)\n }\n\n if (location.hostname.startsWith('preview') || location.hostname.startsWith('localhost')) {\n toArray(this.querySelectorAll(`.${styles.introscroll__error}`)).forEach((error) => {\n error.style.display = 'block'\n })\n }\n }\n\n #createTracker() {\n if (window.preventTracking) {\n return\n }\n\n if (process.env.DEV) {\n import('@nrk/dh-snowplow/mock').then(({ mock }) => mock()).catch(console.error)\n }\n\n this.#tracker = createTracker('dh-introscroll', {\n environment: process.env.ENVIRONMENT,\n contentContext: {\n source: 'pp',\n id: this.dataset.selfId,\n },\n })\n }\n\n #startViewportLogger() {\n if (window.preventTracking) {\n return\n }\n\n this.#entryObserver = new IntersectionObserver((entries) => {\n if (!entries[0]?.isIntersecting) {\n return\n }\n this.#entryObserver?.disconnect()\n this.#exitObserver?.observe(this)\n this.#tracker?.trackSelfDescribingEvent({\n schema: EventSchema.ViewportEvent,\n data: {\n kind: ViewportEventKind.Entry,\n },\n })\n }, {})\n\n this.#exitObserver = new IntersectionObserver(\n (entries) => {\n if (!entries[0]?.isIntersecting) {\n return\n }\n this.#exitObserver?.disconnect()\n this.#tracker?.trackSelfDescribingEvent({\n schema: EventSchema.ViewportEvent,\n data: {\n kind: ViewportEventKind.Exit,\n },\n })\n },\n {\n threshold: [1],\n // `margin-block: 99000px -100%` setter opp et rektangel over skjermen\n // `margin-inline: 10%` sikrer at komponenter som stikker litt ut på høyre og venstre side trigger threshold på 1\n rootMargin: '99000px 10% -100% 10%',\n },\n )\n\n this.#entryObserver.observe(this)\n }\n\n #handleTriggerActivated = (e) => {\n this.#tracker?.trackSelfDescribingEvent({\n schema: EventSchema.StepEvent,\n data: {\n current: e.detail.triggerIndex + 1,\n total: this.cards.length,\n },\n })\n }\n\n #stopViewportLogger() {\n this.#entryObserver?.disconnect()\n this.#exitObserver?.disconnect()\n }\n\n get cards() {\n return this.querySelectorAll('[data-show-background]')\n }\n\n get features() {\n return JSON.parse(this.getAttribute('features'))\n }\n}\n\nsafeDefine(tag, AppElement)\n"],"names":["installedChunks","installChunk","breakMatches","wsnwMatches","wsnwOffset","watching","sel","el","handlersInitialized","polyfilled","noop","forEach","elements","callback","Array","prototype","call","NextWS_params","this","reset","isWhiteSpaceNoWrap","index","some","range","start","end","recursiveCalcNoWrapOffsetsForLine","includeTag","nodeType","ELEMENT_NODE","window","getComputedStyle","whiteSpace","len","outerHTML","length","push","childNodes","child","innerHTML","COMMENT_NODE","PROCESSING_INSTRUCTION_NODE","calcNoWrapOffsetsForLine","oldWS","lineCharOffset","style","newMatches","match","justify","txt","conWidth","words","trim","split","tmp","document","createElement","appendChild","size","offsetWidth","parentNode","removeChild","wordSpacing","Math","floor","setAttribute","div","isBreakChar","re","exec","indexOf","isBreakOpportunity","findBreakOpportunity","desWidth","dir","c","ret","w","substr","width","getElementsList","querySelectorAll","tagName","balanceText","brs","br","spans","span","textNode","createTextNode","insertBefore","textContent","removeTags","oldFloat","float","oldDisplay","display","oldPosition","position","oldLH","lineHeight","containerWidth","containerHeight","offsetHeight","nowrapWidth","nowrapHeight","spaceWidth","h","container","bottom","right","height","margin","padding","visibility","overflow","space","fontSize","dims","getBoundingClientRect","getSpaceWidth","remainingText","newText","lineText","shouldJustify","currentStyle","textAlign","isJustified","desiredWidth","guessIndex","le","ge","splitIndex","isHyphen","isSoftHyphen","remLines","round","abs","replace","Boolean","updateWatched","selectedElements","join","concat","apply","initHandlers","fn","readyState","addEventListener","attachEvent","func","threshold","execAsap","args","timeout","obj","clearTimeout","setTimeout","debounce","publicInterface","options","watch","balanceTextAndWatch","filter","unwatch","documentElement","textWrap","WebkitTextWrap","MozTextWrap","MsTextWrap","hasTextWrap","fingerprint","pad","getRandomValue","discreteValues","pow","randomBlock","toString","safeCounter","cuid","Date","getTime","slug","date","counter","slice","print","random","isCuid","stringToCheck","startsWith","isSlug","stringLength","module","exports","env","self","globalCount","Object","keys","clientId","navigator","mimeTypes","userAgent","crypto","msCrypto","lim","getRandomValues","Uint32Array","num","s","function_","wait","TypeError","RangeError","immediate","storedContext","storedArguments","timeoutId","timestamp","result","run","callContext","callArguments","undefined","later","last","now","debounced","arguments_","getPrototypeOf","Error","callNow","defineProperty","get","clear","flush","trigger","getElementTag","name","version","html","strings","interpolations","str","i","_typeof","o","Symbol","iterator","constructor","toPropertyKey","t","r","e","toPrimitive","String","Number","_defineProperty","value","enumerable","configurable","writable","defaultRoot","getDefaultRoot","IntersectionObserver","root","isDocumentRootSupported","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","_objectSpread","arguments","getOwnPropertyDescriptors","defineProperties","defaultConfig","rootMargin","ElementIntersectionObserver","onChange","config","intersections","map","target","isIntersecting","ratio","intersectionObserver","entries","entry","idx","splice","intersectionRatio","elm","observe","disconnect","unobserve","toggleAttribute","boolValue","hasAttribute","removeAttribute","nextValue","proto","closest","Element","matches","msMatchesSelector","webkitMatchesSelector","css","parentElement","toArray","nodeList","dispatchEvent","element","event","detail","ignore","CustomEvent","bubbles","cancelable","createEvent","initCustomEvent","testReducedMotion","matchMedia","MAX_SAFE_INTEGER","withinRange","current","withinStops","currentTime","stops","targetStop","nrOfStops","uniqueStops","unique","targetTime","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","id","loaded","__webpack_modules__","m","amdO","n","getter","__esModule","d","a","definition","key","f","chunkId","Promise","all","reduce","promises","u","miniCssF","prop","hasOwnProperty","toStringTag","nmd","paths","children","p","loadStylesheet","resolve","reject","href","fullhref","existingLinkTags","getElementsByTagName","dataHref","tag","getAttribute","rel","existingStyleTags","findStylesheet","oldTag","linkTag","type","nc","nonce","onerror","onload","errorType","realHref","err","code","request","nextSibling","head","createStylesheet","installedCssChunks","miniCss","then","data","ids","modules","runtime","j","installedChunkData","promise","import","race","ssrOrientation","mode","destroyed","mounted","listeners","portrait","landscape","opts","assign","orientation","getOrientation","update","handleUpdate","bind","throttledUpdate","mount","destroy","removeEventListener","innerHeight","innerWidth","listen","emit","getVh","getHeight","vendor","opera","toLowerCase","platform","test","checkHasVhBug","setProperty","console","error","fixVhBug","_classPrivateFieldGet2","has","_classPrivateFieldGet","_classPrivateFieldSet","l","set","dedupeId","dedupeMixin","mixin","mixinId","base","_base$_appliedMixins","_base$_appliedMixins2","_appliedMixins","extended","_classPrivateMethodInitSpec$1","privateSet","_checkPrivateRedeclaration$1","add","_classPrivateFieldInitSpec","privateMap","privateCollection","_classPrivateMethodGet$1","receiver","VIEWPORT_POSITION_ATTR","VIEWPORT_POSITIONS","ViewportPositionMixin","Base","_observer","_createIntersectionObserver","_disconnectIntersectionObserver","_handleIntersectionChange","WeakMap","WeakSet","super","_ref","intersection","viewportPosition","top","isAbove","observedAttributes","_super$observedAttrib","connectedCallback","_super$connectedCallb","_createIntersectionObserver2","disconnectedCallback","_super$disconnectedCa","_disconnectIntersectionObserver2","viewportContainer","_document$scrollingEl","scrollingElement","viewportIntersectionRoot","isViewport","location","parent","_classPrivateFieldGet3","_classPrivateMethodInitSpec","_checkPrivateRedeclaration","_classStaticPrivateFieldSpecSet","classConstructor","descriptor","_classCheckPrivateStaticAccess","_classCheckPrivateStaticFieldDescriptor","action","AttributeBindingMixin","_class","_getTargetElements","_boundAttributes","AttributeBindingMixinDef","boundAttributes","attribute","targets","sourceAttribute","targetAttribute","sourceAttributeName","targetAttributeName","attributeChangedCallback","oldValue","newValue","_super$attributeChang","configuration","targetElements","_classPrivateMethodGet","_getTargetElements2","from","ACTIVE_BACKGROUND_ATTR","ROOT_MARGIN_ATTR","BG_ID_ATTR","SHOW_BACKGROUND_ATTR","STATE_ATTR","isTrigger","isBackground","_activeTriggerIndex","_handleTriggerChange","_prepareBackgrounds","_updateBackgrounds","_getBackgroundId","Scrollhistorie","HTMLElement","activeIntersection","pop","triggerElement","activeBackgroundId","_this$activeBackgroun","attributeName","attributeValue","activeBackground","triggerElements","triggerIndex","backgroundId","instance","backgrounds","_updateBackgrounds2","_prepareBackgrounds2","val","querySelector","background","state","isActive","nextActive","_getBackgroundId2","prevActive","oldMargin","oldPadding","initializeHandlers","formatDistanceLocale","lessThanXSeconds","one","other","xSeconds","halfAMinute","lessThanXMinutes","xMinutes","aboutXHours","xHours","xDays","aboutXWeeks","xWeeks","aboutXMonths","xMonths","aboutXYears","xYears","overXYears","almostXYears","buildFormatLongFn","defaultWidth","formats","formatLong","full","long","medium","short","time","dateTime","formatRelativeLocale","lastWeek","yesterday","today","tomorrow","nextWeek","buildLocalizeFn","valuesArray","context","formattingValues","defaultFormattingWidth","values","argumentCallback","buildMatchFn","string","matchPattern","matchPatterns","defaultMatchWidth","matchResult","matchedString","parsePatterns","defaultParseWidth","isArray","array","predicate","findIndex","pattern","object","findKey","valueCallback","rest","buildMatchPatternFn","parseResult","parsePattern","nb","formatDistance","token","count","tokenValue","addSuffix","comparison","formatRelative","_date","_baseDate","_options","localize","ordinalNumber","dirtyNumber","era","narrow","abbreviated","wide","quarter","month","day","dayPeriod","am","pm","midnight","noon","morning","afternoon","evening","night","parseInt","any","weekStartsOn","firstWeekContainsDate","enUS","number","rem100","defaultOptions","getDefaultOptions","millisecondsInWeek","constructFromSymbol","for","constructFrom","argument","getTimezoneOffsetInMilliseconds","utcDate","UTC","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","getMilliseconds","setUTCFullYear","startOfDay","in","setHours","differenceInCalendarDays","laterDate","earlierDate","laterDate_","earlierDate_","dates","normalize","find","normalizeDates","laterStartOfDay","earlierStartOfDay","laterTimestamp","earlierTimestamp","startOfYear","date_","setFullYear","getDayOfYear","startOfWeek","locale","getDay","diff","setDate","startOfISOWeek","getISOWeekYear","year","fourthOfJanuaryOfNextYear","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","startOfISOWeekYear","fourthOfJanuary","getISOWeek","getWeekYear","firstWeekOfNextYear","firstWeekOfThisYear","startOfWeekYear","firstWeek","getWeek","addLeadingZeros","targetLength","padStart","lightFormatters","y","signedYear","M","dayPeriodEnumValue","toUpperCase","H","S","numberOfDigits","milliseconds","trunc","dayPeriodEnum","formatters","G","unit","Y","signedWeekYear","weekYear","R","Q","ceil","q","L","week","I","isoWeek","D","dayOfYear","E","dayOfWeek","localDayOfWeek","isoDayOfWeek","b","hours","B","K","k","X","_localize","timezoneOffset","getTimezoneOffset","formatTimezoneWithOptionalMinutes","formatTimezone","x","O","formatTimezoneShort","z","T","offset","delimiter","sign","absOffset","minutes","dateLongFormatter","timeLongFormatter","longFormatters","P","datePattern","timePattern","dateTimeFormat","dayOfYearTokenRE","weekYearTokenRE","throwTokens","isDate","isValid","isNaN","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","unescapedLatinCharacterRegExp","format","formatStr","originalDate","parts","substring","firstCharacter","longFormatter","isToken","cleanEscapedString","preprocessor","formatterOptions","part","useAdditionalWeekYearTokens","isProtectedWeekYearToken","useAdditionalDayOfYearTokens","isProtectedDayOfYearToken","input","_message","subject","message","warn","includes","warnOrThrowProtectedError","formatter","matched","tzIntlTimeZoneName","dtf","timeZone","Intl","DateTimeFormat","timeZoneName","getDTF","formatted","formatToParts","partsTimeZone","tzNameMatch","hackyTimeZone","tzTokenizeDate","dtfCache","hourCycleSupported","hourCycle","hour","minute","second","hour12","getDateTimeFormat","filled","pos","typeToPos","NaN","partsOffset","parsed","hackyOffset","testDateFormatted","fullYear","millisecond","setUTCHours","MILLISECONDS_IN_HOUR","patterns","timezone","timezoneZ","timezoneHH","timezoneHHMM","timezoneString","isUtcDate","absoluteOffset","validateTimezone","timeZoneString","validIANATimezoneCache","isValidTimezoneIANAString","toUtcDate","calcOffset","fixedOffset","localTS","utcGuess","o2","o3","max","fixOffset","tokens","asUTC","asTS","over","getTimeZoneOffset","timeZoneOffset","output","dateTimePattern","plainTime","YY","YYY","YYYY","YYYYY","MM","DDD","MMDD","Www","WwwD","HH","HHMM","HHMMSS","additionalDigits","dateStrings","dateString","timeString","splitDateString","restDateString","patternYYY","patternYYYYY","yearString","centuryString","parseYear","validateDate","isLeapYear","isLeapYearIndex","validateDayOfYearDate","validateWeekDate","dayOfISOWeekYear","parseDate","parseFloat","validateTime","seconds","parseTime","isoWeekYear","getUTCDay","setUTCDate","getUTCDate","DAYS_IN_MONTH","DAYS_IN_MONTH_LEAP_YEAR","tzFormattingTokensRegExp","formatInTimeZone","precededByQuotedSection","replaced","offsetMilliseconds","resultDate","getUTCFullYear","getUTCMonth","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","toZonedTime","getLinkedData","JSON","parse","innerText","formatDate","getXLPublishedStrings","datePublished","dateModified","getSAAuthors","_articleInfo$author$m","_articleInfo$author","articleInfo","author","email","role","getSAPublishedStrings","dateStyle","styles","_updating","_classPrivateFieldLooseKey","_viewport","_currentPercentage","_debouncedUpdateSizes","_handleFocus","_updateVisiblePercentage","_updateByline","_updateSizes","_updateTitle","Introscroll","_updateByline2","_updateVisiblePercentage2","backgroundElement","scrollTo","offsetTop","_classPrivateFieldLooseBase","clientHeight","clientWidth","titleCardContainer","titleCard","textContainer","fontReduce","scrollWidth","_document","_navigator","fonts","ready","tabIndex","CSS","supports","requestAnimationFrame","prevValue","handleEvent","backgroundColor","percentage","min","scrollY","toFixed","_publishedStrings$map","authors","publishedStrings","authorElm","_authNameElm$childNod","authNameElm","authRoleElm","nodeName","byline","expandable","authorHTML","_t","_","author__name","author__role","expandHTML","_t2","_t3","publish__date","STOPS_ATTR","TARGET_STOP_ATTR","Spesialmodul","prev","next","_updateChildElements","spesialmoduler","spesialmodul","AUTOPLAY_BLOCKED","READY_STATE","isVisible","StegvisVideo","_startSeek","videoElement","paused","play","autoplayBlocked","_handleClick","videoElements","_onReadyStateChange","_disconnecting","hasValue","_stateChanged","_viewportChanged","prevState","nextState","_gotoStart","_gotoEnd","_paused","_preload","_shouldPlay","_this$videoElement","inViewport","load","duration","isFinite","_enableSeekOnReducedMotion","_reducedMotionSeekEnabled","pause","catch","prevTime","reducedMotion","loop","invisibleVideoElements","video","invisibleVideo","decimals","multiplier","dt","buffer","speed","_calculateSpeed","direction","playbackRate","nextTime","DISABLE_FORCED_ATTRIBUTES_ATTR","IS_PAUSED","offsetParent","LevendeStillbilde","_visibleVideoElement","isPaused","_playVideo","_pauseVideo","_updateVisibleVideoElement","_setVideoAttributes","_setEventListeners","_removeEventListeners","_updatePlayState","_handleResize","_handlePlayChange","nextVisibleVideo","_shouldPreload","disableForcedAttributes","_this$_visibleVideoEl","_this$_visibleVideoEl2","_this$_visibleVideoEl3","propertyIsEnumerable","globalKey","getBundle","globalThis","cb","src","script","async","loadOnce","staticSnowplowRoot","COLORS","debugFactory","namespace","localStorage","getItem","wildcardIdx","isEnabled","color","hash","charCodeAt","selectColor","lastCalled","log","ViewportEventKind2","EventSchema2","EntitySchema2","createTracker","trackerId","environment","contentContext","bundle","trackerReady","host","getHost","eventQueue","contexts","trackOrQueue","nrknoBundle","NrknoUtils","newTracker","contentContextId","Content","source","trackers","whenReady","isResolved","trackSelfDescribingEvent","Snowplow","collect","trackStructuredEvent","trackStructEvent","__APP_NAME__","__APP_VERSION__","safeDefine","elementName","customElements","define","_tracker","_entryObserver","_exitObserver","_createTracker","_startViewportLogger","_handleTriggerActivated","_stopViewportLogger","AppElement","_stopViewportLogger2","_startViewportLogger2","_createTracker2","_classPrivateFieldLoo","schema","EventSchema","StepEvent","total","cards","initCustomElements","introscroll","stegvisVideo","levendeStillbilde","features","lottie","default","kart","hostname","introscroll__error","preventTracking","process","dataset","selfId","_entries$","_classPrivateFieldLoo2","_classPrivateFieldLoo3","_classPrivateFieldLoo4","ViewportEvent","kind","ViewportEventKind","Entry","_entries$2","_classPrivateFieldLoo5","_classPrivateFieldLoo6","Exit","_classPrivateFieldLoo7","_classPrivateFieldLoo8"],"sourceRoot":""}