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C,SAGvB,CAAC,SAAAvB,KAGCS,GAAApvB,KAAIkuB,IAAAA,IAAkB,IAAIld,sBAAsBC,IAAY,IAAAkf,EAC3C,OAAXA,EAAClf,EAAQ,KAARkf,EAAYtf,iBAGjBue,GAAApvB,KAAIkuB,IAAAA,IAAgB1c,aACpB4d,GAAApvB,KAAIouB,IAAAA,IAAe7c,QAAQvR,MAC3BA,KAAK6uB,QAAQtB,yBAAyB,CACpCuB,OAAQC,GAAYqB,cACpBrY,KAAM,CACJsY,KAAMC,GAAkBC,SAE1B,GACD,CAAC,GAEJnB,GAAApvB,KAAIouB,IAAAA,IAAiB,IAAIpd,sBACtBC,IAAY,IAAAuf,EACI,OAAXA,EAACvf,EAAQ,KAARuf,EAAY3f,iBAGjBue,GAAApvB,KAAIouB,IAAAA,IAAe5c,aACnBxR,KAAK6uB,QAAQtB,yBAAyB,CACpCuB,OAAQC,GAAYqB,cACpBrY,KAAM,CACJsY,KAAMC,GAAkBG,QAE1B,GAEJ,CAAEpoB,UAAW,CAAC,GAAIiI,WAAY,0BAGhC8e,GAAApvB,KAAIkuB,IAAAA,IAAgB3c,QAAQvR,KAC9B,CAAC,SAAA0uB,KAYqB,IAAAgC,EAAAC,EAChB,OAAJD,EAAAtB,GAAApvB,KAAIkuB,IAAAA,MAAJwC,EAAqBlf,aACjB,OAAJmf,EAAAvB,GAAApvB,KAAIouB,IAAAA,MAAJuC,EAAoBnf,YACtB,CAWFsc,GAAWrX,GAAKgY,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/classExtractFieldDescriptor.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/@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/@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/./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/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\t179: 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(258 != chunkId) {\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} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\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","/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing. The function also has a property 'clear' \n * that is a function which will clear the timer to prevent previously scheduled executions. \n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\nfunction debounce(func, wait, immediate){\n var timeout, args, context, timestamp, result;\n if (null == wait) wait = 100;\n\n function later() {\n var last = Date.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n context = args = null;\n }\n }\n };\n\n var debounced = function(){\n context = this;\n args = arguments;\n timestamp = Date.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n\n debounced.clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n \n debounced.flush = function() {\n if (timeout) {\n result = func.apply(context, args);\n context = args = null;\n \n clearTimeout(timeout);\n timeout = null;\n }\n };\n\n return debounced;\n};\n\n// Adds compatibility for ES modules\ndebounce.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","export default function _classExtractFieldDescriptor(receiver, privateMap, action) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to \" + action + \" private field on non-instance\");\n }\n return privateMap.get(receiver);\n}","import classApplyDescriptorGet from \"./classApplyDescriptorGet.js\";\nimport classExtractFieldDescriptor from \"./classExtractFieldDescriptor.js\";\nexport default function _classPrivateFieldGet(receiver, privateMap) {\n var descriptor = classExtractFieldDescriptor(receiver, privateMap, \"get\");\n return classApplyDescriptorGet(receiver, descriptor);\n}","export default function _classApplyDescriptorGet(receiver, descriptor) {\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n return descriptor.value;\n}","import classApplyDescriptorSet from \"./classApplyDescriptorSet.js\";\nimport classExtractFieldDescriptor from \"./classExtractFieldDescriptor.js\";\nexport default function _classPrivateFieldSet(receiver, privateMap, value) {\n var descriptor = classExtractFieldDescriptor(receiver, privateMap, \"set\");\n classApplyDescriptorSet(receiver, descriptor, value);\n return value;\n}","export default function _classApplyDescriptorSet(receiver, descriptor, value) {\n if (descriptor.set) {\n descriptor.set.call(receiver, value);\n } else {\n if (!descriptor.writable) {\n throw new TypeError(\"attempted to set read only private field\");\n }\n descriptor.value = value;\n }\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import _defineProperty from '@babel/runtime/helpers/defineProperty';\n\n/* eslint-disable compat/compat */\nfunction getDefaultRoot() {\n /*\n Use document if supported\n IntersectionObserver will otherwise default to top level document,\n and IntersectionObserver will not work as expected in an iframe.\n https://github.com/w3c/IntersectionObserver/issues/372\n */\n\n /*\n Safari does not throw error on root: document, but does not trigger events as expected\n returning null for now until better feature detection is possible\n */\n return null;\n\n /*\n try {\n // eslint-disable-next-line no-new\n new IntersectionObserver(() => {}, { root: document })\n return document\n } catch (e) {\n return null\n }\n */\n}\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\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 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 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 \"\" + ({\"141\":\"dh-karthistorie\",\"577\":\"dh-stegvis-lottie\"}[chunkId] || chunkId) + \"-chunk-\" + {\"141\":\"0a371945b91fb6b60b40\",\"258\":\"741d7243b8e882e1550f\",\"577\":\"2b4a9eefe0c0d16f7760\"}[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 + \"-\" + \"ac2ddef5b331c98bbb25\" + \".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\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 === 'load' ? 'missing' : 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(\" + realHref + \")\");\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\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\t179: 0\n};\n\n__webpack_require__.f.miniCss = (chunkId, promises) => {\n\tvar cssChunks = {\"258\":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","function t(){var t=navigator.userAgent||navigator.vendor||window.opera,e=t.toLowerCase();if(!t)return!1;var i,n=/android/.test(e),o=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);return n?i=/fban|fbav|instagram|snapchat|nrk|firefox|opera|klar\\//:o&&(i=/fban|fbav|instagram|snapchat|nrk|firefox|opera|chrome|fxios|crios/),i&&i.test(e)}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 _classPrivateFieldGet from '@babel/runtime/helpers/classPrivateFieldGet';\nimport _classPrivateFieldSet from '@babel/runtime/helpers/classPrivateFieldSet';\nimport _defineProperty from '@babel/runtime/helpers/defineProperty';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\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 ? 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 ? 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 _navigator, _navigator$userAgent, _navigator$userAgent$;\n var isIFrame = window.location !== window.parent.location;\n var isChrome = (_navigator = navigator) === null || _navigator === void 0 ? void 0 : (_navigator$userAgent = _navigator.userAgent) === null || _navigator$userAgent === void 0 ? void 0 : (_navigator$userAgent$ = _navigator$userAgent.includes) === null || _navigator$userAgent$ === void 0 ? void 0 : _navigator$userAgent$.call(_navigator$userAgent, 'Chrome');\n // Chrome has a bug when using document in as IntersectionObserver root: https://bugs.chromium.org/p/chromium/issues/detail?id=1420155\n if (isIFrame && !isChrome) {\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 ? void 0 : _classPrivateFieldGet2.unobserve(this);\n (_classPrivateFieldGet3 = _classPrivateFieldGet(this, _observer)) === null || _classPrivateFieldGet3 === void 0 ? 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 ? 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 ? 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","// 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'\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\nfunction toArray(nodeList) {\n return [].slice.call(nodeList)\n}\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\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 toArray(this.querySelectorAll('img, video, [role=img]')).forEach((elm) => {\n elm.tabIndex = '-1'\n })\n this.addEventListener('focus', this._handleFocus, true)\n\n /* Polyfill text-wrap: balance. TODO: remove once Safari supports text-wrap: balance */\n if (!CSS.supports('text-wrap', 'balance')) {\n requestAnimationFrame(() => {\n balanceAndWatch(this.querySelectorAll('.balance-text'))\n })\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n this.removeEventListener('focus', this._handleFocus, true)\n window.removeEventListener('resize', this._debouncedUpdateSizes)\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 } else if (name === 'viewport-position') {\n /* TODO: remove once Safari supports scroll-driven animations */\n if (!CSS.supports('animation-timeline', 'view()')) {\n this._updateVisiblePercentage()\n }\n }\n }\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) {\n return\n }\n this._updating = true\n\n const loop = () => {\n if (this.viewportPosition !== 'IN-VIEWPORT') {\n this._updating = false\n } else {\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('--introscroll-percentage', percentage.toFixed(3))\n this._currentPercentage = percentage\n }\n requestAnimationFrame(loop)\n }\n }\n requestAnimationFrame(loop)\n }\n\n updateByline() {\n const authors = toArray(document.querySelectorAll('.author__body')).map((authorElm) => {\n const authNameElm = authorElm.querySelector('.author__name')\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 const container = this.querySelector(`.${s.byline}`)\n const publishDateElm = document.querySelector('.article-dateline__full')\n const publishDate = publishDateElm ? publishDateElm.textContent : ''\n\n const annotationElm = document.querySelector('.article-dateline-annotation')\n const publishAnnotation = annotationElm ? annotationElm.textContent : ''\n const expandable = authors.length > 3\n\n const authorHTML = authors.map((author) => {\n return html`\n