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MAAMK,EAAS,IAAIC,eACjBR,EACA,CAAES,UAAW,CAAC,UAAW,aACzB,CAAEC,KAAM,SAIe,IAAIC,UAAUJ,EAAQL,GAC9BU,MACnB,CAkCEG,CAAYf,EAAUE,EACxB,CCjEA,MCUMc,ECTI,GDSgBC,iBJVZ,WKD6CC,EDWAC,WCVrB,IAAGD,EAAQE,MAAM,KAAK,KAAO,KAD5D,IAAoDF,EDa3D,MAAMG,UAAmBC,YACvBC,iBAAAA,GACEvC,IAEA,MAAMwC,EAAWhC,MAAMC,KAAKP,SAASuC,iBAAiB,qBACtD,IAAK,MAAMC,KAAWF,EAAU,CAE9B,MAAMtB,EAAW,IAAIC,aAAa,CAAEC,KAAM,QAASC,QAASqB,IAGtDnB,EAAS,IAAIC,eAAekB,EAAS,CAAEC,QAAS,CAAC,GAAK,IAAM,CAAEjB,KAAM,SAGpEkB,EAAY,IAAIjB,UAAUJ,EAAQL,GAGxC0B,EAAUC,SAAW,CACnBC,UAAW,QAEXC,OAAQC,IAAIC,QAAQ,KAGtBL,EAAUhB,OAEVgB,EAAUM,SAASC,MAAK,KACtBP,EAAUQ,QAAQ,GAEtB,CACF,OAG8BxD,IAA5ByD,eAAeC,IAAItB,IACrBqB,eAAeE,OAAOvB,EAAKK,E","sources":["webpack://dh-instuliv/webpack/bootstrap","webpack://dh-instuliv/./src/modules/tema/config.ts","webpack://dh-instuliv/./src/modules/tema/intro/intro-4.css?1af4","webpack://dh-instuliv/./src/modules/tema/intro/intro-4.ts","webpack://dh-instuliv/./src/modules/tema/tema.css?a86b","webpack://dh-instuliv/./src/modules/tema/client.ts","webpack://dh-instuliv/./src/lib/get-element-tag.ts"],"sourcesContent":["// 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\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","export const config = {\n moduleName: 'tema',\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"dh-sa-logo\":\"dh-sa-logo\",\"dhSaLogo\":\"dh-sa-logo\",\"intro-4\":\"intro-4\",\"intro4\":\"intro-4\",\"dh-sa-section\":\"dh-sa-section\",\"dhSaSection\":\"dh-sa-section\",\"dh-sa-part-small\":\"dh-sa-part-small\",\"dhSaPartSmall\":\"dh-sa-part-small\",\"dh-sa-part-medium\":\"dh-sa-part-medium\",\"dhSaPartMedium\":\"dh-sa-part-medium\",\"dh-sa-part-text\":\"dh-sa-part-text\",\"dhSaPartText\":\"dh-sa-part-text\",\"lys\":\"lys\",\"tre-venstre\":\"tre-venstre\",\"treVenstre\":\"tre-venstre\",\"tre-hoyre\":\"tre-hoyre\",\"treHoyre\":\"tre-hoyre\",\"dh-sa-large-text\":\"dh-sa-large-text\",\"dhSaLargeText\":\"dh-sa-large-text\"};","import s from './intro-4.css'\n\nfunction animerHus(element, timeline) {\n // eslint-disable-next-line compat/compat\n const effect = new KeyframeEffect(element, { translate: ['0 0', '0 700px'] }, { fill: 'both' })\n\n // eslint-disable-next-line compat/compat\n const venstreAnimasjon = new Animation(effect, timeline)\n venstreAnimasjon.play()\n}\n\nfunction animerVenstre(element, timeline) {\n // eslint-disable-next-line compat/compat\n const effect = new KeyframeEffect(element, { translate: ['0 75px', '0 -75px'] }, { fill: 'both' })\n\n // eslint-disable-next-line compat/compat\n const venstreAnimasjon = new Animation(effect, timeline)\n venstreAnimasjon.play()\n}\n\nfunction animerHoyre(hoyreTre, timeline) {\n // eslint-disable-next-line compat/compat\n const effect = new KeyframeEffect(\n hoyreTre,\n { translate: ['0 120px', '0 -120px'] },\n { fill: 'both' },\n )\n\n // eslint-disable-next-line compat/compat\n const venstreAnimasjon = new Animation(effect, timeline)\n venstreAnimasjon.play()\n}\n\nexport function initIntro4() {\n const textPart = document.querySelector('.intro-4 .dh-sa-part-text')\n if (!textPart) {\n return\n }\n\n const tekstbakgrunn = document.createElement('span')\n const textElement = textPart.querySelector('.dh-sa-large-text:nth-child(2)')\n tekstbakgrunn.append(...Array.from(textElement.childNodes))\n textElement.append(tekstbakgrunn)\n\n const lys = document.createElement('div')\n lys.classList.add(s.lys)\n\n const venstreTre = document.createElement('div')\n venstreTre.classList.add(s.treVenstre)\n\n const hoyreTre = document.createElement('div')\n hoyreTre.classList.add(s.treHoyre)\n\n textPart.appendChild(lys)\n textPart.appendChild(venstreTre)\n textPart.appendChild(hoyreTre)\n\n // Sett opp animasjoner\n\n // Opprett en tidslinje vi animerer dekklaget langs.\n // @ts-ignore\n const timeline = new ViewTimeline({ axis: 'block', subject: textPart })\n\n animerHus(lys, timeline)\n animerVenstre(venstreTre, timeline)\n animerHoyre(hoyreTre, timeline)\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"dh-sa-text\":\"dh-sa-text\",\"dhSaText\":\"dh-sa-text\",\"tekstur\":\"tekstur\",\"dh-sa-section\":\"dh-sa-section\",\"dhSaSection\":\"dh-sa-section\",\"fra-mork\":\"fra-mork\",\"fraMork\":\"fra-mork\",\"til-mork\":\"til-mork\",\"tilMork\":\"til-mork\",\"fra-lys\":\"fra-lys\",\"fraLys\":\"fra-lys\",\"til-lys\":\"til-lys\",\"tilLys\":\"til-lys\",\"gradient-inn\":\"gradient-inn\",\"gradientInn\":\"gradient-inn\",\"gradient-ut\":\"gradient-ut\",\"gradientUt\":\"gradient-ut\",\"journalboks\":\"journalboks\",\"dh-sa-part-small\":\"dh-sa-part-small\",\"dhSaPartSmall\":\"dh-sa-part-small\",\"dagbok\":\"dagbok\",\"oppspill\":\"oppspill\",\"fra-sak-2\":\"fra-sak-2\",\"fraSak2\":\"fra-sak-2\",\"til-sak-1\":\"til-sak-1\",\"tilSak1\":\"til-sak-1\",\"til-sak-2\":\"til-sak-2\",\"tilSak2\":\"til-sak-2\",\"til-sak-3\":\"til-sak-3\",\"tilSak3\":\"til-sak-3\",\"til-sak-4\":\"til-sak-4\",\"tilSak4\":\"til-sak-4\"};","import '../../lib/scroll-timeline.js'\nimport { getElementTag } from '../../lib/get-element-tag.ts'\nimport { config } from './config.ts'\nimport { initIntro4 } from './intro/intro-4.ts'\nimport '@nrk/core-design-tokens/dist/color/nrk-color-tokens.css'\nimport './tema.css'\nimport './intro/intro.css'\nimport './intro/intro-1.css'\nimport './intro/intro-3.css'\nimport './intro/intro-4.css'\n\nconst tag = getElementTag(__APP_NAME__, config.moduleName, __APP_VERSION__)\n\nclass AppElement extends HTMLElement {\n connectedCallback() {\n initIntro4()\n\n const headings = Array.from(document.querySelectorAll('.dh-sa-text > h2'))\n for (const heading of headings) {\n // @ts-ignore\n const timeline = new ViewTimeline({ axis: 'block', subject: heading })\n\n // eslint-disable-next-line compat/compat\n const effect = new KeyframeEffect(heading, { opacity: [0.2, 1] }, { fill: 'both' })\n\n // eslint-disable-next-line compat/compat\n const animasjon = new Animation(effect, timeline)\n\n // @ts-ignore\n animasjon.rangeEnd = {\n rangeName: 'cover',\n // eslint-disable-next-line compat/compat\n offset: CSS.percent(50),\n }\n\n animasjon.play()\n // eslint-disable-next-line promise/always-return,promise/catch-or-return\n animasjon.finished.then(() => {\n animasjon.cancel()\n })\n }\n }\n}\n\nif (customElements.get(tag) === undefined) {\n customElements.define(tag, AppElement)\n}\n","export function getElementTag(name: string, entry: string, version: string): string {\n const formattedVersion = version ? `v${version.split('.')[0]}` : ''\n return `${name}-${entry}-${formattedVersion}`\n}\n"],"names":["__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","initIntro4","textPart","document","querySelector","tekstbakgrunn","createElement","textElement","append","Array","from","childNodes","lys","classList","add","s","venstreTre","hoyreTre","appendChild","timeline","ViewTimeline","axis","subject","element","effect","KeyframeEffect","translate","fill","Animation","play","animerHus","animerVenstre","animerHoyre","tag","__APP_NAME__","version","__APP_VERSION__","split","AppElement","HTMLElement","connectedCallback","headings","querySelectorAll","heading","opacity","animasjon","rangeEnd","rangeName","offset","CSS","percent","finished","then","cancel","customElements","get","define"],"sourceRoot":""}